!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FormMakingV3={},e.Vue)}(this,(function(exports,vue){"use strict";var normalize=""; /*! * shared v9.14.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */const inBrowser="undefined"!=typeof window,makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,o)=>friendlyJSONstringify({l:e,k:t,s:o}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber$2=e=>"number"==typeof e&&isFinite(e),isDate$1=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject$2(e)&&0===Object.keys(e).length,assign$2=Object.assign,_create=Object.create,create=(e=null)=>_create(e);let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:create());function escapeHtml(e){return e.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const hasOwnProperty$1=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty$1.call(e,t)}const isArray$1=Array.isArray,isFunction$2=e=>"function"==typeof e,isString$3=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isObject$3=e=>null!==e&&"object"==typeof e,isPromise=e=>isObject$3(e)&&isFunction$2(e.then)&&isFunction$2(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject$2=e=>{if(!isObject$3(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray$1(e)||isPlainObject$2(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join$1(e,t=""){return e.reduce(((e,o,n)=>0===n?e+o:e+t+o),"")}function incrementer(e){let t=e;return()=>++t}function warn(e,t){}const isNotObjectOrIsArray=e=>!isObject$3(e)||isArray$1(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw new Error("Invalid value");const o=[{src:e,des:t}];for(;o.length;){const{src:e,des:t}=o.pop();Object.keys(e).forEach((n=>{"__proto__"!==n&&(isObject$3(e[n])&&!isObject$3(t[n])&&(t[n]=Array.isArray(e[n])?[]:create()),isNotObjectOrIsArray(t[n])||isNotObjectOrIsArray(e[n])?t[n]=e[n]:o.push({src:e[n],des:t[n]}))}))}} /*! * message-compiler v9.14.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */function createPosition(e,t,o){return{line:e,column:t,offset:o}}function createLocation(e,t,o){const n={start:e,end:t};return null!=o&&(n.source=o),n}const RE_ARGS=/\{([0-9a-zA-Z]+)\}/g;function format$1(e,...t){return 1===t.length&&isObject$2(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(RE_ARGS,((e,o)=>t.hasOwnProperty(o)?t[o]:""))}const assign$1=Object.assign,isString$2=e=>"string"==typeof e,isObject$2=e=>null!==e&&"object"==typeof e;function join(e,t=""){return e.reduce(((e,o,n)=>0===n?e+o:e+t+o),"")}const CompileWarnCodes={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},warnMessages={[CompileWarnCodes.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function createCompileWarn(e,t,...o){const n=format$1(warnMessages[e]||"",...o||[]),i={message:String(n),code:e};return t&&(i.location=t),i}const CompileErrorCodes={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},errorMessages={[CompileErrorCodes.EXPECTED_TOKEN]:"Expected token: '{0}'",[CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[CompileErrorCodes.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[CompileErrorCodes.EMPTY_PLACEHOLDER]:"Empty placeholder",[CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[CompileErrorCodes.INVALID_LINKED_FORMAT]:"Invalid linked format",[CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function createCompileError(e,t,o={}){const{domain:n,messages:i,args:l}=o,a=format$1((i||errorMessages)[e]||"",...l||[]),r=new SyntaxError(String(a));return r.code=e,t&&(r.location=t),r.domain=n,r}function defaultOnError(e){throw e}const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let o=0,n=1,i=1,l=0;const a=e=>t[e]===CHAR_CR&&t[e+1]===CHAR_LF,r=e=>t[e]===CHAR_PS,s=e=>t[e]===CHAR_LS,d=e=>a(e)||(e=>t[e]===CHAR_LF)(e)||r(e)||s(e),u=e=>a(e)||r(e)||s(e)?CHAR_LF:t[e];function c(){return l=0,d(o)&&(n++,i=0),a(o)&&o++,o++,i++,t[o]}return{index:()=>o,line:()=>n,column:()=>i,peekOffset:()=>l,charAt:u,currentChar:()=>u(o),currentPeek:()=>u(o+l),next:c,peek:function(){return a(o+l)&&l++,l++,t[o+l]},reset:function(){o=0,n=1,i=1,l=0},resetPeek:function(e=0){l=e},skipToPeek:function(){const e=o+l;for(;e!==o;)c();l=0}}}const EOF=void 0,DOT=".",LITERAL_DELIMITER="'",ERROR_DOMAIN$3="tokenizer";function createTokenizer(e,t={}){const o=!1!==t.location,n=createScanner(e),i=()=>n.index(),l=()=>createPosition(n.line(),n.column(),n.index()),a=l(),r=i(),s={currentType:14,offset:r,startLoc:a,endLoc:a,lastType:14,lastOffset:r,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},d=()=>s,{onError:u}=t;function c(e,t,n,...i){const l=d();if(t.column+=n,t.offset+=n,u){const n=createCompileError(e,o?createLocation(l.startLoc,t):null,{domain:ERROR_DOMAIN$3,args:i});u(n)}}function m(e,t,n){e.endLoc=l(),e.currentType=t;const i={type:t};return o&&(i.loc=createLocation(e.startLoc,e.endLoc)),null!=n&&(i.value=n),i}const p=e=>m(e,14);function f(e,t){return e.currentChar()===t?(e.next(),t):(c(CompileErrorCodes.EXPECTED_TOKEN,l(),0,t),"")}function h(e){let t="";for(;e.currentPeek()===CHAR_SP||e.currentPeek()===CHAR_LF;)t+=e.currentPeek(),e.peek();return t}function v(e){const t=h(e);return e.skipToPeek(),t}function g(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function y(e,t){const{currentType:o}=t;if(2!==o)return!1;h(e);const n=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),n}function b(e){h(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function k(e,t=!0){const o=(t=!1,n="",i=!1)=>{const l=e.currentPeek();return"{"===l?"%"!==n&&t:"@"!==l&&l?"%"===l?(e.peek(),o(t,"%",!0)):"|"===l?!("%"!==n&&!i)||!(n===CHAR_SP||n===CHAR_LF):l===CHAR_SP?(e.peek(),o(!0,CHAR_SP,i)):l!==CHAR_LF||(e.peek(),o(!0,CHAR_LF,i)):"%"===n||t},n=o();return t&&e.resetPeek(),n}function w(e,t){const o=e.currentChar();return o===EOF?EOF:t(o)?(e.next(),o):null}function C(e){const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}function _(e){return w(e,C)}function x(e){const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t||45===t}function S(e){return w(e,x)}function V(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function $(e){return w(e,V)}function N(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function E(e){return w(e,N)}function B(e){let t="",o="";for(;t=$(e);)o+=t;return o}function D(e){let t="";for(;;){const o=e.currentChar();if("{"===o||"}"===o||"@"===o||"|"===o||!o)break;if("%"===o){if(!k(e))break;t+=o,e.next()}else if(o===CHAR_SP||o===CHAR_LF)if(k(e))t+=o,e.next();else{if(b(e))break;t+=o,e.next()}else t+=o,e.next()}return t}function T(e){return e!==LITERAL_DELIMITER&&e!==CHAR_LF}function F(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return O(e,t,4);case"U":return O(e,t,6);default:return c(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,l(),0,t),""}}function O(e,t,o){f(e,t);let n="";for(let i=0;i=1&&c(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,l(),0),e.next(),o=m(t,2,"{"),v(e),t.braceNest++,o;case"}":return t.braceNest>0&&2===t.currentType&&c(CompileErrorCodes.EMPTY_PLACEHOLDER,l(),0),e.next(),o=m(t,3,"}"),t.braceNest--,t.braceNest>0&&v(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),o;case"@":return t.braceNest>0&&c(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,l(),0),o=L(e,t)||p(t),t.braceNest=0,o;default:{let n=!0,i=!0,a=!0;if(b(e))return t.braceNest>0&&c(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,l(),0),o=m(t,1,M(e)),t.braceNest=0,t.inLinked=!1,o;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return c(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,l(),0),t.braceNest=0,A(e,t);if(n=function(e,t){const{currentType:o}=t;if(2!==o)return!1;h(e);const n=g(e.currentPeek());return e.resetPeek(),n}(e,t))return o=m(t,5,function(e){v(e);let t="",o="";for(;t=S(e);)o+=t;return e.currentChar()===EOF&&c(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,l(),0),o}(e)),v(e),o;if(i=y(e,t))return o=m(t,6,function(e){v(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${B(e)}`):t+=B(e),e.currentChar()===EOF&&c(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,l(),0),t}(e)),v(e),o;if(a=function(e,t){const{currentType:o}=t;if(2!==o)return!1;h(e);const n=e.currentPeek()===LITERAL_DELIMITER;return e.resetPeek(),n}(e,t))return o=m(t,7,function(e){v(e),f(e,"'");let t="",o="";for(;t=w(e,T);)o+="\\"===t?F(e):t;const n=e.currentChar();return n===CHAR_LF||n===EOF?(c(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,l(),0),n===CHAR_LF&&(e.next(),f(e,"'")),o):(f(e,"'"),o)}(e)),v(e),o;if(!n&&!i&&!a)return o=m(t,13,function(e){v(e);let t="",o="";for(;t=w(e,I);)o+=t;return o}(e)),c(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,l(),0,o.value),v(e),o;break}}return o}function L(e,t){const{currentType:o}=t;let n=null;const i=e.currentChar();switch(8!==o&&9!==o&&12!==o&&10!==o||i!==CHAR_LF&&i!==CHAR_SP||c(CompileErrorCodes.INVALID_LINKED_FORMAT,l(),0),i){case"@":return e.next(),n=m(t,8,"@"),t.inLinked=!0,n;case".":return v(e),e.next(),m(t,9,".");case":":return v(e),e.next(),m(t,10,":");default:return b(e)?(n=m(t,1,M(e)),t.braceNest=0,t.inLinked=!1,n):function(e,t){const{currentType:o}=t;if(8!==o)return!1;h(e);const n="."===e.currentPeek();return e.resetPeek(),n}(e,t)||function(e,t){const{currentType:o}=t;if(8!==o&&12!==o)return!1;h(e);const n=":"===e.currentPeek();return e.resetPeek(),n}(e,t)?(v(e),L(e,t)):function(e,t){const{currentType:o}=t;if(9!==o)return!1;h(e);const n=g(e.currentPeek());return e.resetPeek(),n}(e,t)?(v(e),m(t,12,function(e){let t="",o="";for(;t=_(e);)o+=t;return o}(e))):function(e,t){const{currentType:o}=t;if(10!==o)return!1;const n=()=>{const t=e.currentPeek();return"{"===t?g(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===CHAR_SP||!t)&&(t===CHAR_LF?(e.peek(),n()):k(e,!1))},i=n();return e.resetPeek(),i}(e,t)?(v(e),"{"===i?P(e,t)||n:m(t,11,function(e){const t=o=>{const n=e.currentChar();return"{"!==n&&"%"!==n&&"@"!==n&&"|"!==n&&"("!==n&&")"!==n&&n?n===CHAR_SP?o:(o+=n,e.next(),t(o)):o};return t("")}(e))):(8===o&&c(CompileErrorCodes.INVALID_LINKED_FORMAT,l(),0),t.braceNest=0,t.inLinked=!1,A(e,t))}}function A(e,t){let o={type:14};if(t.braceNest>0)return P(e,t)||p(t);if(t.inLinked)return L(e,t)||p(t);switch(e.currentChar()){case"{":return P(e,t)||p(t);case"}":return c(CompileErrorCodes.UNBALANCED_CLOSING_BRACE,l(),0),e.next(),m(t,3,"}");case"@":return L(e,t)||p(t);default:{if(b(e))return o=m(t,1,M(e)),t.braceNest=0,t.inLinked=!1,o;const{isModulo:n,hasSpace:i}=function(e){const t=h(e),o="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:o,hasSpace:t.length>0}}(e);if(n)return i?m(t,0,D(e)):m(t,4,function(e){v(e);const t=e.currentChar();return"%"!==t&&c(CompileErrorCodes.EXPECTED_TOKEN,l(),0,t),e.next(),"%"}(e));if(k(e))return m(t,0,D(e));break}}return o}return{nextToken:function(){const{currentType:e,offset:t,startLoc:o,endLoc:a}=s;return s.lastType=e,s.lastOffset=t,s.lastStartLoc=o,s.lastEndLoc=a,s.offset=i(),s.startLoc=l(),n.currentChar()===EOF?m(s,14):A(n,s)},currentOffset:i,currentPosition:l,context:d}}const ERROR_DOMAIN$2="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,o){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||o,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:o,onWarn:n}=e;function i(e,n,i,l,...a){const r=e.currentPosition();if(r.offset+=l,r.column+=l,o){const e=createCompileError(n,t?createLocation(i,r):null,{domain:ERROR_DOMAIN$2,args:a});o(e)}}function l(e,o,i,l,...a){const r=e.currentPosition();if(r.offset+=l,r.column+=l,n){const e=t?createLocation(i,r):null;n(createCompileWarn(o,e,a))}}function a(e,o,n){const i={type:e};return t&&(i.start=o,i.end=o,i.loc={start:n,end:n}),i}function r(e,o,n,i){i&&(e.type=i),t&&(e.end=o,e.loc&&(e.loc.end=n))}function s(e,t){const o=e.context(),n=a(3,o.offset,o.startLoc);return n.value=t,r(n,e.currentOffset(),e.currentPosition()),n}function d(e,t){const o=e.context(),{lastOffset:n,lastStartLoc:i}=o,l=a(5,n,i);return l.index=parseInt(t,10),e.nextToken(),r(l,e.currentOffset(),e.currentPosition()),l}function u(e,t,o){const n=e.context(),{lastOffset:i,lastStartLoc:l}=n,s=a(4,i,l);return s.key=t,!0===o&&(s.modulo=!0),e.nextToken(),r(s,e.currentOffset(),e.currentPosition()),s}function c(e,t){const o=e.context(),{lastOffset:n,lastStartLoc:i}=o,l=a(9,n,i);return l.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),r(l,e.currentOffset(),e.currentPosition()),l}function m(e){const t=e.context(),o=a(6,t.offset,t.startLoc);let n=e.nextToken();if(9===n.type){const t=function(e){const t=e.nextToken(),o=e.context(),{lastOffset:n,lastStartLoc:l}=o,s=a(8,n,l);return 12!==t.type?(i(e,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,o.lastStartLoc,0),s.value="",r(s,n,l),{nextConsumeToken:t,node:s}):(null==t.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,o.lastStartLoc,0,getTokenCaption(t)),s.value=t.value||"",r(s,e.currentOffset(),e.currentPosition()),{node:s})}(e);o.modifier=t.node,n=t.nextConsumeToken||e.nextToken()}switch(10!==n.type&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(n)),n=e.nextToken(),2===n.type&&(n=e.nextToken()),n.type){case 11:null==n.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(n)),o.key=function(e,t){const o=e.context(),n=a(7,o.offset,o.startLoc);return n.value=t,r(n,e.currentOffset(),e.currentPosition()),n}(e,n.value||"");break;case 5:null==n.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(n)),o.key=u(e,n.value||"");break;case 6:null==n.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(n)),o.key=d(e,n.value||"");break;case 7:null==n.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(n)),o.key=c(e,n.value||"");break;default:{i(e,CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);const l=e.context(),s=a(7,l.offset,l.startLoc);return s.value="",r(s,l.offset,l.startLoc),o.key=s,r(o,l.offset,l.startLoc),{nextConsumeToken:n,node:o}}}return r(o,e.currentOffset(),e.currentPosition()),{node:o}}function p(e){const t=e.context(),o=a(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);o.items=[];let n=null,p=null;do{const a=n||e.nextToken();switch(n=null,a.type){case 0:null==a.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(a)),o.items.push(s(e,a.value||""));break;case 6:null==a.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(a)),o.items.push(d(e,a.value||""));break;case 4:p=!0;break;case 5:null==a.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(a)),o.items.push(u(e,a.value||"",!!p)),p&&(l(e,CompileWarnCodes.USE_MODULO_SYNTAX,t.lastStartLoc,0,getTokenCaption(a)),p=null);break;case 7:null==a.value&&i(e,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,getTokenCaption(a)),o.items.push(c(e,a.value||""));break;case 8:{const t=m(e);o.items.push(t.node),n=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return r(o,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),o}function f(e){const t=e.context(),{offset:o,startLoc:n}=t,l=p(e);return 14===t.currentType?l:function(e,t,o,n){const l=e.context();let s=0===n.items.length;const d=a(1,t,o);d.cases=[],d.cases.push(n);do{const t=p(e);s||(s=0===t.items.length),d.cases.push(t)}while(14!==l.currentType);return s&&i(e,CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,o,0),r(d,e.currentOffset(),e.currentPosition()),d}(e,o,n,l)}return{parse:function(o){const n=createTokenizer(o,assign$1({},e)),l=n.context(),s=a(0,l.offset,l.startLoc);return t&&s.loc&&(s.loc.source=o),s.body=f(n),e.onCacheKey&&(s.cacheKey=e.onCacheKey(o)),14!==l.currentType&&i(n,CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,l.lastStartLoc,0,o[l.offset]||""),r(s,n.currentOffset(),n.currentPosition()),s}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const o={ast:e,helpers:new Set};return{context:()=>o,helper:e=>(o.helpers.add(e),e)}}function traverseNodes(e,t){for(let o=0;ooptimizeMessageNode(e))),e}function optimizeMessageNode(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let o=0;or,push:s,indent:function(e=!0){const t=++r.indentLevel;e&&d(t)},deindent:function(e=!0){const t=--r.indentLevel;e&&d(t)},newline:function(){d(r.indentLevel)},helper:e=>`_${e}`,needIndent:()=>r.needIndent}}function generateLinkedNode(e,t){const{helper:o}=e;e.push(`${o("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:o,needIndent:n}=e;e.push(`${o("normalize")}([`),e.indent(n());const i=t.items.length;for(let l=0;l1){e.push(`${o("plural")}([`),e.indent(n());const i=t.cases.length;for(let o=0;o{const o=isString$2(t.mode)?t.mode:"normal",n=isString$2(t.filename)?t.filename:"message.intl",i=!!t.sourceMap,l=null!=t.breakLineCode?t.breakLineCode:"arrow"===o?";":"\n",a=t.needIndent?t.needIndent:"arrow"!==o,r=e.helpers||[],s=createCodeGenerator(e,{mode:o,filename:n,sourceMap:i,breakLineCode:l,needIndent:a});s.push("normal"===o?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(a),r.length>0&&(s.push(`const { ${join(r.map((e=>`${e}: _${e}`)),", ")} } = ctx`),s.newline()),s.push("return "),generateNode(s,e),s.deindent(a),s.push("}"),delete e.helpers;const{code:d,map:u}=s.context();return{ast:e,code:d,map:u?u.toJSON():void 0}};function baseCompile$1(e,t={}){const o=assign$1({},t),n=!!o.jit,i=!!o.minify,l=null==o.optimize||o.optimize,a=createParser(o).parse(e);return n?(l&&optimize(a),i&&minify(a),{ast:a,code:""}):(transform(a,o),generate(a,o))} /*! * core-base v9.14.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */function initFeatureFlags$1(){"boolean"!=typeof __INTLIFY_PROD_DEVTOOLS__&&(getGlobalThis().__INTLIFY_PROD_DEVTOOLS__=!1),"boolean"!=typeof __INTLIFY_JIT_COMPILATION__&&(getGlobalThis().__INTLIFY_JIT_COMPILATION__=!1),"boolean"!=typeof __INTLIFY_DROP_MESSAGE_COMPILER__&&(getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}const pathStateMachine=[];pathStateMachine[0]={w:[0],i:[3,0],"[":[4],o:[7]},pathStateMachine[1]={w:[1],".":[2],"[":[4],o:[7]},pathStateMachine[2]={w:[2],i:[3,0],0:[3,0]},pathStateMachine[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pathStateMachine[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pathStateMachine[5]={"'":[4,0],o:8,l:[5,0]},pathStateMachine[6]={'"':[4,0],o:8,l:[6,0]};const literalValueRE=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function isLiteral(e){return literalValueRE.test(e)}function stripQuotes(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}function getPathCharType(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function formatSubPath(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(isLiteral(t)?stripQuotes(t):"*"+t)}function parse(e){const t=[];let o,n,i,l,a,r,s,d=-1,u=0,c=0;const m=[];function p(){const t=e[d+1];if(5===u&&"'"===t||6===u&&'"'===t)return d++,i="\\"+t,m[0](),!0}for(m[0]=()=>{void 0===n?n=i:n+=i},m[1]=()=>{void 0!==n&&(t.push(n),n=void 0)},m[2]=()=>{m[0](),c++},m[3]=()=>{if(c>0)c--,u=4,m[0]();else{if(c=0,void 0===n)return!1;if(n=formatSubPath(n),!1===n)return!1;m[1]()}};null!==u;)if(d++,o=e[d],"\\"!==o||!p()){if(l=getPathCharType(o),s=pathStateMachine[u],a=s[l]||s.l||8,8===a)return;if(u=a[0],void 0!==a[1]&&(r=m[a[1]],r&&(i=o,!1===r())))return;if(7===u)return t}}const cache=new Map;function resolveWithKeyValue(e,t){return isObject$3(e)?e[t]:null}function resolveValue$1(e,t){if(!isObject$3(e))return null;let o=cache.get(t);if(o||(o=parse(t),o&&cache.set(t,o)),!o)return null;const n=o.length;let i=e,l=0;for(;le,DEFAULT_MESSAGE=e=>"",DEFAULT_MESSAGE_DATA_TYPE="text",DEFAULT_NORMALIZE=e=>0===e.length?"":join$1(e),DEFAULT_INTERPOLATE=toDisplayString;function pluralDefault(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function getPluralIndex(e){const t=isNumber$2(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(isNumber$2(e.named.count)||isNumber$2(e.named.n))?isNumber$2(e.named.count)?e.named.count:isNumber$2(e.named.n)?e.named.n:t:t}function normalizeNamed(e,t){t.count||(t.count=e),t.n||(t.n=e)}function createMessageContext(e={}){const t=e.locale,o=getPluralIndex(e),n=isObject$3(e.pluralRules)&&isString$3(t)&&isFunction$2(e.pluralRules[t])?e.pluralRules[t]:pluralDefault,i=isObject$3(e.pluralRules)&&isString$3(t)&&isFunction$2(e.pluralRules[t])?pluralDefault:void 0,l=e.list||[],a=e.named||create();isNumber$2(e.pluralIndex)&&normalizeNamed(o,a);function r(t){const o=isFunction$2(e.messages)?e.messages(t):!!isObject$3(e.messages)&&e.messages[t];return o||(e.parent?e.parent.message(t):DEFAULT_MESSAGE)}const s=isPlainObject$2(e.processor)&&isFunction$2(e.processor.normalize)?e.processor.normalize:DEFAULT_NORMALIZE,d=isPlainObject$2(e.processor)&&isFunction$2(e.processor.interpolate)?e.processor.interpolate:DEFAULT_INTERPOLATE,u={list:e=>l[e],named:e=>a[e],plural:e=>e[n(o,e.length,i)],linked:(t,...o)=>{const[n,i]=o;let l="text",a="";1===o.length?isObject$3(n)?(a=n.modifier||a,l=n.type||l):isString$3(n)&&(a=n||a):2===o.length&&(isString$3(n)&&(a=n||a),isString$3(i)&&(l=i||l));const s=r(t)(u),d="vnode"===l&&isArray$1(s)&&a?s[0]:s;return a?(c=a,e.modifiers?e.modifiers[c]:DEFAULT_MODIFIER)(d,l):d;var c},message:r,type:isPlainObject$2(e.processor)&&isString$3(e.processor.type)?e.processor.type:DEFAULT_MESSAGE_DATA_TYPE,interpolate:d,normalize:s,values:assign$2(create(),l,a)};return u}let devtools=null;function setDevToolsHook(e){devtools=e}function initI18nDevTools(e,t,o){devtools&&devtools.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:o})}const translateDevTools=createDevToolsHook("function:translate");function createDevToolsHook(e){return t=>devtools&&devtools.emit(e,t)}const code$1$1=CompileWarnCodes.__EXTEND_POINT__,inc$1$1=incrementer(code$1$1),CoreWarnCodes={NOT_FOUND_KEY:code$1$1,FALLBACK_TO_TRANSLATE:inc$1$1(),CANNOT_FORMAT_NUMBER:inc$1$1(),FALLBACK_TO_NUMBER_FORMAT:inc$1$1(),CANNOT_FORMAT_DATE:inc$1$1(),FALLBACK_TO_DATE_FORMAT:inc$1$1(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:inc$1$1(),__EXTEND_POINT__:inc$1$1()},code$2=CompileErrorCodes.__EXTEND_POINT__,inc$2=incrementer(code$2),CoreErrorCodes={INVALID_ARGUMENT:code$2,INVALID_DATE_ARGUMENT:inc$2(),INVALID_ISO_DATE_ARGUMENT:inc$2(),NOT_SUPPORT_NON_STRING_MESSAGE:inc$2(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:inc$2(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:inc$2(),NOT_SUPPORT_LOCALE_TYPE:inc$2(),__EXTEND_POINT__:inc$2()};function createCoreError(e){return createCompileError(e,null,void 0)}function getLocale(e,t){return null!=t.locale?resolveLocale(t.locale):resolveLocale(e.locale)}let _resolveLocale;function resolveLocale(e){if(isString$3(e))return e;if(isFunction$2(e)){if(e.resolvedOnce&&null!=_resolveLocale)return _resolveLocale;if("Function"===e.constructor.name){const t=e();if(isPromise(t))throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _resolveLocale=t}throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE)}function fallbackWithSimple(e,t,o){return[...new Set([o,...isArray$1(t)?t:isObject$3(t)?Object.keys(t):isString$3(t)?[t]:[o]])]}function fallbackWithLocaleChain(e,t,o){const n=isString$3(o)?o:DEFAULT_LOCALE,i=e;i.__localeChainCache||(i.__localeChainCache=new Map);let l=i.__localeChainCache.get(n);if(!l){l=[];let e=[o];for(;isArray$1(e);)e=appendBlockToChain(l,e,t);const a=isArray$1(t)||!isPlainObject$2(t)?t:t.default?t.default:null;e=isString$3(a)?[a]:a,isArray$1(e)&&appendBlockToChain(l,e,!1),i.__localeChainCache.set(n,l)}return l}function appendBlockToChain(e,t,o){let n=!0;for(let i=0;i`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function getDefaultLinkedModifiers(){return{upper:(e,t)=>"text"===t&&isString$3(e)?e.toUpperCase():"vnode"===t&&isObject$3(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&isString$3(e)?e.toLowerCase():"vnode"===t&&isObject$3(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&isString$3(e)?capitalize(e):"vnode"===t&&isObject$3(e)&&"__v_isVNode"in e?capitalize(e.children):e}}let _compiler,_resolver,_fallbacker;function registerMessageCompiler(e){_compiler=e}function registerMessageResolver(e){_resolver=e}function registerLocaleFallbacker(e){_fallbacker=e}let _additionalMeta=null;const setAdditionalMeta=e=>{_additionalMeta=e},getAdditionalMeta=()=>_additionalMeta;let _fallbackContext=null;const setFallbackContext=e=>{_fallbackContext=e},getFallbackContext=()=>_fallbackContext;let _cid=0;function createCoreContext(e={}){const t=isFunction$2(e.onWarn)?e.onWarn:warn,o=isString$3(e.version)?e.version:VERSION$2,n=isString$3(e.locale)||isFunction$2(e.locale)?e.locale:DEFAULT_LOCALE,i=isFunction$2(n)?DEFAULT_LOCALE:n,l=isArray$1(e.fallbackLocale)||isPlainObject$2(e.fallbackLocale)||isString$3(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:i,a=isPlainObject$2(e.messages)?e.messages:createResources(i),r=isPlainObject$2(e.datetimeFormats)?e.datetimeFormats:createResources(i),s=isPlainObject$2(e.numberFormats)?e.numberFormats:createResources(i),d=assign$2(create(),e.modifiers,getDefaultLinkedModifiers()),u=e.pluralRules||create(),c=isFunction$2(e.missing)?e.missing:null,m=!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,p=!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,f=!!e.fallbackFormat,h=!!e.unresolving,v=isFunction$2(e.postTranslation)?e.postTranslation:null,g=isPlainObject$2(e.processor)?e.processor:null,y=!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,b=!!e.escapeParameter,k=isFunction$2(e.messageCompiler)?e.messageCompiler:_compiler,w=isFunction$2(e.messageResolver)?e.messageResolver:_resolver||resolveWithKeyValue,C=isFunction$2(e.localeFallbacker)?e.localeFallbacker:_fallbacker||fallbackWithSimple,_=isObject$3(e.fallbackContext)?e.fallbackContext:void 0,x=e,S=isObject$3(x.__datetimeFormatters)?x.__datetimeFormatters:new Map,V=isObject$3(x.__numberFormatters)?x.__numberFormatters:new Map,$=isObject$3(x.__meta)?x.__meta:{};_cid++;const N={version:o,cid:_cid,locale:n,fallbackLocale:l,messages:a,modifiers:d,pluralRules:u,missing:c,missingWarn:m,fallbackWarn:p,fallbackFormat:f,unresolving:h,postTranslation:v,processor:g,warnHtmlMessage:y,escapeParameter:b,messageCompiler:k,messageResolver:w,localeFallbacker:C,fallbackContext:_,onWarn:t,__meta:$};return N.datetimeFormats=r,N.numberFormats=s,N.__datetimeFormatters=S,N.__numberFormatters=V,__INTLIFY_PROD_DEVTOOLS__&&initI18nDevTools(N,o,$),N}const createResources=e=>({[e]:create()});function handleMissing(e,t,o,n,i){const{missing:l,onWarn:a}=e;if(null!==l){const n=l(e,o,t,i);return isString$3(n)?n:t}return t}function updateFallbackLocale(e,t,o){e.__localeChainCache=new Map,e.localeFallbacker(e,o,t)}function isAlmostSameLocale(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function isImplicitFallback(e,t){const o=t.indexOf(e);if(-1===o)return!1;for(let n=o+1;nformatParts(t,e)}function formatParts(e,t){const o=resolveBody(t);if(null==o)throw createUnhandleNodeError(0);if(1===resolveType(o)){const t=resolveCases(o);return e.plural(t.reduce(((t,o)=>[...t,formatMessageParts(e,o)]),[]))}return formatMessageParts(e,o)}const PROPS_BODY=["b","body"];function resolveBody(e){return resolveProps(e,PROPS_BODY)}const PROPS_CASES=["c","cases"];function resolveCases(e){return resolveProps(e,PROPS_CASES,[])}function formatMessageParts(e,t){const o=resolveStatic(t);if(null!=o)return"text"===e.type?o:e.normalize([o]);{const o=resolveItems(t).reduce(((t,o)=>[...t,formatMessagePart(e,o)]),[]);return e.normalize(o)}}const PROPS_STATIC=["s","static"];function resolveStatic(e){return resolveProps(e,PROPS_STATIC)}const PROPS_ITEMS=["i","items"];function resolveItems(e){return resolveProps(e,PROPS_ITEMS,[])}function formatMessagePart(e,t){const o=resolveType(t);switch(o){case 3:case 9:case 7:case 8:return resolveValue(t,o);case 4:{const n=t;if(hasOwn(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(hasOwn(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw createUnhandleNodeError(o)}case 5:{const n=t;if(hasOwn(n,"i")&&isNumber$2(n.i))return e.interpolate(e.list(n.i));if(hasOwn(n,"index")&&isNumber$2(n.index))return e.interpolate(e.list(n.index));throw createUnhandleNodeError(o)}case 6:{const o=t,n=resolveLinkedModifier(o),i=resolveLinkedKey(o);return e.linked(formatMessagePart(e,i),n?formatMessagePart(e,n):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${o}`)}}const PROPS_TYPE=["t","type"];function resolveType(e){return resolveProps(e,PROPS_TYPE)}const PROPS_VALUE=["v","value"];function resolveValue(e,t){const o=resolveProps(e,PROPS_VALUE);if(o)return o;throw createUnhandleNodeError(t)}const PROPS_MODIFIER=["m","modifier"];function resolveLinkedModifier(e){return resolveProps(e,PROPS_MODIFIER)}const PROPS_KEY=["k","key"];function resolveLinkedKey(e){const t=resolveProps(e,PROPS_KEY);if(t)return t;throw createUnhandleNodeError(6)}function resolveProps(e,t,o){for(let n=0;ne;let compileCache=create();function isMessageAST(e){return isObject$3(e)&&0===resolveType(e)&&(hasOwn(e,"b")||hasOwn(e,"body"))}function baseCompile(e,t={}){let o=!1;const n=t.onError||defaultOnError;return t.onError=e=>{o=!0,n(e)},{...baseCompile$1(e,t),detectError:o}}const compileToFunction=(e,t)=>{if(!isString$3(e))throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);{!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const o=(t.onCacheKey||defaultOnCacheKey)(e),n=compileCache[o];if(n)return n;const{code:i,detectError:l}=baseCompile(e,t),a=new Function(`return ${i}`)();return l?a:compileCache[o]=a}};function compile(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&isString$3(e)){!isBoolean(t.warnHtmlMessage)||t.warnHtmlMessage;const o=(t.onCacheKey||defaultOnCacheKey)(e),n=compileCache[o];if(n)return n;const{ast:i,detectError:l}=baseCompile(e,{...t,location:!1,jit:!0}),a=format(i);return l?a:compileCache[o]=a}{const t=e.cacheKey;if(t){const o=compileCache[t];return o||(compileCache[t]=format(e))}return format(e)}}const NOOP_MESSAGE_FUNCTION=()=>"",isMessageFunction=e=>isFunction$2(e);function translate(e,...t){const{fallbackFormat:o,postTranslation:n,unresolving:i,messageCompiler:l,fallbackLocale:a,messages:r}=e,[s,d]=parseTranslateArgs(...t),u=isBoolean(d.missingWarn)?d.missingWarn:e.missingWarn,c=isBoolean(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,m=isBoolean(d.escapeParameter)?d.escapeParameter:e.escapeParameter,p=!!d.resolvedMessage,f=isString$3(d.default)||isBoolean(d.default)?isBoolean(d.default)?l?s:()=>s:d.default:o?l?s:()=>s:"",h=o||""!==f,v=getLocale(e,d);m&&escapeParams(d);let[g,y,b]=p?[s,v,r[v]||create()]:resolveMessageFormat(e,s,v,a,c,u),k=g,w=s;if(p||isString$3(k)||isMessageAST(k)||isMessageFunction(k)||h&&(k=f,w=k),!(p||(isString$3(k)||isMessageAST(k)||isMessageFunction(k))&&isString$3(y)))return i?NOT_REOSLVED:s;let C=!1;const _=isMessageFunction(k)?k:compileMessageFormat(e,s,y,k,w,(()=>{C=!0}));if(C)return k;const x=evaluateMessage(e,_,createMessageContext(getMessageContextOptions(e,y,b,d))),S=n?n(x,s):x;if(__INTLIFY_PROD_DEVTOOLS__){const t={timestamp:Date.now(),key:isString$3(s)?s:isMessageFunction(k)?k.key:"",locale:y||(isMessageFunction(k)?k.locale:""),format:isString$3(k)?k:isMessageFunction(k)?k.source:"",message:S};t.meta=assign$2({},e.__meta,getAdditionalMeta()||{}),translateDevTools(t)}return S}function escapeParams(e){isArray$1(e.list)?e.list=e.list.map((e=>isString$3(e)?escapeHtml(e):e)):isObject$3(e.named)&&Object.keys(e.named).forEach((t=>{isString$3(e.named[t])&&(e.named[t]=escapeHtml(e.named[t]))}))}function resolveMessageFormat(e,t,o,n,i,l){const{messages:a,onWarn:r,messageResolver:s,localeFallbacker:d}=e,u=d(e,n,o);let c,m=create(),p=null;for(let f=0;fn;return e.locale=o,e.key=t,e}const s=a(n,getCompileContext(e,o,i,n,r,l));return s.locale=o,s.key=t,s.source=n,s}function evaluateMessage(e,t,o){return t(o)}function parseTranslateArgs(...e){const[t,o,n]=e,i=create();if(!(isString$3(t)||isNumber$2(t)||isMessageFunction(t)||isMessageAST(t)))throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);const l=isNumber$2(t)?String(t):(isMessageFunction(t),t);return isNumber$2(o)?i.plural=o:isString$3(o)?i.default=o:isPlainObject$2(o)&&!isEmptyObject(o)?i.named=o:isArray$1(o)&&(i.list=o),isNumber$2(n)?i.plural=n:isString$3(n)?i.default=n:isPlainObject$2(n)&&assign$2(i,n),[l,i]}function getCompileContext(e,t,o,n,i,l){return{locale:t,key:o,warnHtmlMessage:i,onError:e=>{throw l&&l(e),e},onCacheKey:e=>generateFormatCacheKey(t,o,e)}}function getMessageContextOptions(e,t,o,n){const{modifiers:i,pluralRules:l,messageResolver:a,fallbackLocale:r,fallbackWarn:s,missingWarn:d,fallbackContext:u}=e,c={locale:t,modifiers:i,pluralRules:l,messages:n=>{let i=a(o,n);if(null==i&&u){const[,,e]=resolveMessageFormat(u,n,t,r,s,d);i=a(e,n)}if(isString$3(i)||isMessageAST(i)){let o=!1;const l=compileMessageFormat(e,n,t,i,n,(()=>{o=!0}));return o?NOOP_MESSAGE_FUNCTION:l}return isMessageFunction(i)?i:NOOP_MESSAGE_FUNCTION}};return e.processor&&(c.processor=e.processor),n.list&&(c.list=n.list),n.named&&(c.named=n.named),isNumber$2(n.plural)&&(c.pluralIndex=n.plural),c}function datetime(e,...t){const{datetimeFormats:o,unresolving:n,fallbackLocale:i,onWarn:l,localeFallbacker:a}=e,{__datetimeFormatters:r}=e,[s,d,u,c]=parseDateTimeArgs(...t),m=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,f=getLocale(e,u),h=a(e,i,f);if(!isString$3(s)||""===s)return new Intl.DateTimeFormat(f,c).format(d);let v,g={},y=null;for(let w=0;w{DATETIME_FORMAT_OPTIONS_KEYS.includes(e)?r[e]=o[e]:l[e]=o[e]})),isString$3(n)?l.locale=n:isPlainObject$2(n)&&(r=n),isPlainObject$2(i)&&(r=i),[l.key||"",a,l,r]}function clearDateTimeFormat(e,t,o){const n=e;for(const i in o){const e=`${t}__${i}`;n.__datetimeFormatters.has(e)&&n.__datetimeFormatters.delete(e)}}function number(e,...t){const{numberFormats:o,unresolving:n,fallbackLocale:i,onWarn:l,localeFallbacker:a}=e,{__numberFormatters:r}=e,[s,d,u,c]=parseNumberArgs(...t),m=isBoolean(u.missingWarn)?u.missingWarn:e.missingWarn;isBoolean(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,f=getLocale(e,u),h=a(e,i,f);if(!isString$3(s)||""===s)return new Intl.NumberFormat(f,c).format(d);let v,g={},y=null;for(let w=0;w{NUMBER_FORMAT_OPTIONS_KEYS.includes(e)?a[e]=o[e]:l[e]=o[e]})),isString$3(n)?l.locale=n:isPlainObject$2(n)&&(a=n),isPlainObject$2(i)&&(a=i),[l.key||"",r,l,a]}function clearNumberFormat(e,t,o){const n=e;for(const i in o){const e=`${t}__${i}`;n.__numberFormatters.has(e)&&n.__numberFormatters.delete(e)}}initFeatureFlags$1(); /*! * vue-i18n v9.14.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ const VERSION$1="9.14.2";function initFeatureFlags(){"boolean"!=typeof __VUE_I18N_FULL_INSTALL__&&(getGlobalThis().__VUE_I18N_FULL_INSTALL__=!0),"boolean"!=typeof __VUE_I18N_LEGACY_API__&&(getGlobalThis().__VUE_I18N_LEGACY_API__=!0),"boolean"!=typeof __INTLIFY_JIT_COMPILATION__&&(getGlobalThis().__INTLIFY_JIT_COMPILATION__=!1),"boolean"!=typeof __INTLIFY_DROP_MESSAGE_COMPILER__&&(getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),"boolean"!=typeof __INTLIFY_PROD_DEVTOOLS__&&(getGlobalThis().__INTLIFY_PROD_DEVTOOLS__=!1)}const code$1=CoreWarnCodes.__EXTEND_POINT__,inc$1=incrementer(code$1);inc$1(),inc$1(),inc$1(),inc$1(),inc$1(),inc$1(),inc$1(),inc$1(),inc$1();const code=CoreErrorCodes.__EXTEND_POINT__,inc=incrementer(code),I18nErrorCodes={UNEXPECTED_RETURN_TYPE:code,INVALID_ARGUMENT:inc(),MUST_BE_CALL_SETUP_TOP:inc(),NOT_INSTALLED:inc(),NOT_AVAILABLE_IN_LEGACY_MODE:inc(),REQUIRED_VALUE:inc(),INVALID_VALUE:inc(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:inc(),NOT_INSTALLED_WITH_PROVIDE:inc(),UNEXPECTED_ERROR:inc(),NOT_COMPATIBLE_LEGACY_VUE_I18N:inc(),BRIDGE_SUPPORT_VUE_2_ONLY:inc(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:inc(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:inc(),__EXTEND_POINT__:inc()};function createI18nError(e,...t){return createCompileError(e,null,void 0)}const TranslateVNodeSymbol=makeSymbol("__translateVNode"),DatetimePartsSymbol=makeSymbol("__datetimeParts"),NumberPartsSymbol=makeSymbol("__numberParts"),SetPluralRulesSymbol=makeSymbol("__setPluralRules");makeSymbol("__intlifyMeta");const InejctWithOptionSymbol=makeSymbol("__injectWithOption"),DisposeSymbol=makeSymbol("__dispose");function handleFlatJson(e){if(!isObject$3(e))return e;for(const t in e)if(hasOwn(e,t))if(t.includes(".")){const o=t.split("."),n=o.length-1;let i=e,l=!1;for(let e=0;e{if("locale"in e&&"resource"in e){const{locale:t,resource:o}=e;t?(a[t]=a[t]||create(),deepCopy(o,a[t])):deepCopy(o,a)}else isString$3(e)&&deepCopy(JSON.parse(e),a)})),null==i&&l)for(const r in a)hasOwn(a,r)&&handleFlatJson(a[r]);return a}function getComponentOptions(e){return e.type}function adjustI18nResources(e,t,o){let n=isObject$3(t.messages)?t.messages:create();"__i18nGlobal"in o&&(n=getLocaleMessages(e.locale.value,{messages:n,__i18n:o.__i18nGlobal}));const i=Object.keys(n);if(i.length&&i.forEach((t=>{e.mergeLocaleMessage(t,n[t])})),isObject$3(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach((o=>{e.mergeDateTimeFormat(o,t.datetimeFormats[o])}))}if(isObject$3(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach((o=>{e.mergeNumberFormat(o,t.numberFormats[o])}))}}function createTextNode(e){return vue.createVNode(vue.Text,null,e,0)}const DEVTOOLS_META="__INTLIFY_META__",NOOP_RETURN_ARRAY=()=>[],NOOP_RETURN_FALSE=()=>!1;let composerID=0;function defineCoreMissingHandler(e){return(t,o,n,i)=>e(o,n,vue.getCurrentInstance()||void 0,i)}const getMetaInfo=()=>{const e=vue.getCurrentInstance();let t=null;return e&&(t=getComponentOptions(e)[DEVTOOLS_META])?{[DEVTOOLS_META]:t}:null};function createComposer(e={},t){const{__root:o,__injectWithOption:n}=e,i=void 0===o,l=e.flatJson,a=inBrowser?vue.ref:vue.shallowRef,r=!!e.translateExistCompatible;let s=!isBoolean(e.inheritLocale)||e.inheritLocale;const d=a(o&&s?o.locale.value:isString$3(e.locale)?e.locale:DEFAULT_LOCALE),u=a(o&&s?o.fallbackLocale.value:isString$3(e.fallbackLocale)||isArray$1(e.fallbackLocale)||isPlainObject$2(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:d.value),c=a(getLocaleMessages(d.value,e)),m=a(isPlainObject$2(e.datetimeFormats)?e.datetimeFormats:{[d.value]:{}}),p=a(isPlainObject$2(e.numberFormats)?e.numberFormats:{[d.value]:{}});let f=o?o.missingWarn:!isBoolean(e.missingWarn)&&!isRegExp(e.missingWarn)||e.missingWarn,h=o?o.fallbackWarn:!isBoolean(e.fallbackWarn)&&!isRegExp(e.fallbackWarn)||e.fallbackWarn,v=o?o.fallbackRoot:!isBoolean(e.fallbackRoot)||e.fallbackRoot,g=!!e.fallbackFormat,y=isFunction$2(e.missing)?e.missing:null,b=isFunction$2(e.missing)?defineCoreMissingHandler(e.missing):null,k=isFunction$2(e.postTranslation)?e.postTranslation:null,w=o?o.warnHtmlMessage:!isBoolean(e.warnHtmlMessage)||e.warnHtmlMessage,C=!!e.escapeParameter;const _=o?o.modifiers:isPlainObject$2(e.modifiers)?e.modifiers:{};let x,S=e.pluralRules||o&&o.pluralRules;x=(()=>{i&&setFallbackContext(null);const t={version:VERSION$1,locale:d.value,fallbackLocale:u.value,messages:c.value,modifiers:_,pluralRules:S,missing:null===b?void 0:b,missingWarn:f,fallbackWarn:h,fallbackFormat:g,unresolving:!0,postTranslation:null===k?void 0:k,warnHtmlMessage:w,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};t.datetimeFormats=m.value,t.numberFormats=p.value,t.__datetimeFormatters=isPlainObject$2(x)?x.__datetimeFormatters:void 0,t.__numberFormatters=isPlainObject$2(x)?x.__numberFormatters:void 0;const o=createCoreContext(t);return i&&setFallbackContext(o),o})(),updateFallbackLocale(x,d.value,u.value);const V=vue.computed({get:()=>d.value,set:e=>{d.value=e,x.locale=d.value}}),$=vue.computed({get:()=>u.value,set:e=>{u.value=e,x.fallbackLocale=u.value,updateFallbackLocale(x,d.value,e)}}),N=vue.computed((()=>c.value)),E=vue.computed((()=>m.value)),B=vue.computed((()=>p.value));const D=(e,t,n,l,a,r)=>{let s;d.value,u.value,c.value,m.value,p.value;try{__INTLIFY_PROD_DEVTOOLS__&&setAdditionalMeta(getMetaInfo()),i||(x.fallbackContext=o?getFallbackContext():void 0),s=e(x)}finally{__INTLIFY_PROD_DEVTOOLS__&&setAdditionalMeta(null),i||(x.fallbackContext=void 0)}if("translate exists"!==n&&isNumber$2(s)&&s===NOT_REOSLVED||"translate exists"===n&&!s){const[e,n]=t();return o&&v?l(o):a(e)}if(r(s))return s;throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE)};function T(...e){return D((t=>Reflect.apply(translate,null,[t,...e])),(()=>parseTranslateArgs(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>isString$3(e)))}const F={normalize:function(e){return e.map((e=>isString$3(e)||isNumber$2(e)||isBoolean(e)?createTextNode(String(e)):e))},interpolate:e=>e,type:"vnode"};function O(e){return c.value[e]||{}}composerID++,o&&inBrowser&&(vue.watch(o.locale,(e=>{s&&(d.value=e,x.locale=e,updateFallbackLocale(x,d.value,u.value))})),vue.watch(o.fallbackLocale,(e=>{s&&(u.value=e,x.fallbackLocale=e,updateFallbackLocale(x,d.value,u.value))})));const I={id:composerID,locale:V,fallbackLocale:$,get inheritLocale(){return s},set inheritLocale(e){s=e,e&&o&&(d.value=o.locale.value,u.value=o.fallbackLocale.value,updateFallbackLocale(x,d.value,u.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:N,get modifiers(){return _},get pluralRules(){return S||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(e){f=e,x.missingWarn=f},get fallbackWarn(){return h},set fallbackWarn(e){h=e,x.fallbackWarn=h},get fallbackRoot(){return v},set fallbackRoot(e){v=e},get fallbackFormat(){return g},set fallbackFormat(e){g=e,x.fallbackFormat=g},get warnHtmlMessage(){return w},set warnHtmlMessage(e){w=e,x.warnHtmlMessage=e},get escapeParameter(){return C},set escapeParameter(e){C=e,x.escapeParameter=e},t:T,getLocaleMessage:O,setLocaleMessage:function(e,t){if(l){const o={[e]:t};for(const e in o)hasOwn(o,e)&&handleFlatJson(o[e]);t=o[e]}c.value[e]=t,x.messages=c.value},mergeLocaleMessage:function(e,t){c.value[e]=c.value[e]||{};const o={[e]:t};if(l)for(const n in o)hasOwn(o,n)&&handleFlatJson(o[n]);deepCopy(t=o[e],c.value[e]),x.messages=c.value},getPostTranslationHandler:function(){return isFunction$2(k)?k:null},setPostTranslationHandler:function(e){k=e,x.postTranslation=e},getMissingHandler:function(){return y},setMissingHandler:function(e){null!==e&&(b=defineCoreMissingHandler(e)),y=e,x.missing=b},[SetPluralRulesSymbol]:function(e){S=e,x.pluralRules=S}};return I.datetimeFormats=E,I.numberFormats=B,I.rt=function(...e){const[t,o,n]=e;if(n&&!isObject$3(n))throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);return T(t,o,assign$2({resolvedMessage:!0},n||{}))},I.te=function(e,t){return D((()=>{if(!e)return!1;const o=O(isString$3(t)?t:d.value),n=x.messageResolver(o,e);return r?null!=n:isMessageAST(n)||isMessageFunction(n)||isString$3(n)}),(()=>[e]),"translate exists",(o=>Reflect.apply(o.te,o,[e,t])),NOOP_RETURN_FALSE,(e=>isBoolean(e)))},I.tm=function(e){const t=function(e){let t=null;const o=fallbackWithLocaleChain(x,u.value,d.value);for(let n=0;nReflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString$3(e)))},I.n=function(...e){return D((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>MISSING_RESOLVE_VALUE),(e=>isString$3(e)))},I.getDateTimeFormat=function(e){return m.value[e]||{}},I.setDateTimeFormat=function(e,t){m.value[e]=t,x.datetimeFormats=m.value,clearDateTimeFormat(x,e,t)},I.mergeDateTimeFormat=function(e,t){m.value[e]=assign$2(m.value[e]||{},t),x.datetimeFormats=m.value,clearDateTimeFormat(x,e,t)},I.getNumberFormat=function(e){return p.value[e]||{}},I.setNumberFormat=function(e,t){p.value[e]=t,x.numberFormats=p.value,clearNumberFormat(x,e,t)},I.mergeNumberFormat=function(e,t){p.value[e]=assign$2(p.value[e]||{},t),x.numberFormats=p.value,clearNumberFormat(x,e,t)},I[InejctWithOptionSymbol]=n,I[TranslateVNodeSymbol]=function(...e){return D((t=>{let o;const n=t;try{n.processor=F,o=Reflect.apply(translate,null,[n,...e])}finally{n.processor=null}return o}),(()=>parseTranslateArgs(...e)),"translate",(t=>t[TranslateVNodeSymbol](...e)),(e=>[createTextNode(e)]),(e=>isArray$1(e)))},I[DatetimePartsSymbol]=function(...e){return D((t=>Reflect.apply(datetime,null,[t,...e])),(()=>parseDateTimeArgs(...e)),"datetime format",(t=>t[DatetimePartsSymbol](...e)),NOOP_RETURN_ARRAY,(e=>isString$3(e)||isArray$1(e)))},I[NumberPartsSymbol]=function(...e){return D((t=>Reflect.apply(number,null,[t,...e])),(()=>parseNumberArgs(...e)),"number format",(t=>t[NumberPartsSymbol](...e)),NOOP_RETURN_ARRAY,(e=>isString$3(e)||isArray$1(e)))},I}function convertComposerOptions(e){const t=isString$3(e.locale)?e.locale:DEFAULT_LOCALE,o=isString$3(e.fallbackLocale)||isArray$1(e.fallbackLocale)||isPlainObject$2(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:t,n=isFunction$2(e.missing)?e.missing:void 0,i=!isBoolean(e.silentTranslationWarn)&&!isRegExp(e.silentTranslationWarn)||!e.silentTranslationWarn,l=!isBoolean(e.silentFallbackWarn)&&!isRegExp(e.silentFallbackWarn)||!e.silentFallbackWarn,a=!isBoolean(e.fallbackRoot)||e.fallbackRoot,r=!!e.formatFallbackMessages,s=isPlainObject$2(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,u=isFunction$2(e.postTranslation)?e.postTranslation:void 0,c=!isString$3(e.warnHtmlInMessage)||"off"!==e.warnHtmlInMessage,m=!!e.escapeParameterHtml,p=!isBoolean(e.sync)||e.sync;let f=e.messages;if(isPlainObject$2(e.sharedMessages)){const t=e.sharedMessages;f=Object.keys(t).reduce(((e,o)=>{const n=e[o]||(e[o]={});return assign$2(n,t[o]),e}),f||{})}const{__i18n:h,__root:v,__injectWithOption:g}=e,y=e.datetimeFormats,b=e.numberFormats,k=e.flatJson,w=e.translateExistCompatible;return{locale:t,fallbackLocale:o,messages:f,flatJson:k,datetimeFormats:y,numberFormats:b,missing:n,missingWarn:i,fallbackWarn:l,fallbackRoot:a,fallbackFormat:r,modifiers:s,pluralRules:d,postTranslation:u,warnHtmlMessage:c,escapeParameter:m,messageResolver:e.messageResolver,inheritLocale:p,translateExistCompatible:w,__i18n:h,__root:v,__injectWithOption:g}}function createVueI18n(e={},t){{const t=createComposer(convertComposerOptions(e)),{__extender:o}=e,n={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get formatter(){return{interpolate:()=>[]}},set formatter(e){},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return isBoolean(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=isBoolean(e)?!e:e},get silentFallbackWarn(){return isBoolean(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=isBoolean(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(e){t.warnHtmlMessage="off"!==e},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(e){},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){const[o,n,i]=e,l={};let a=null,r=null;if(!isString$3(o))throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);const s=o;return isString$3(n)?l.locale=n:isArray$1(n)?a=n:isPlainObject$2(n)&&(r=n),isArray$1(i)?a=i:isPlainObject$2(i)&&(r=i),Reflect.apply(t.t,t,[s,a||r||{},l])},rt:(...e)=>Reflect.apply(t.rt,t,[...e]),tc(...e){const[o,n,i]=e,l={plural:1};let a=null,r=null;if(!isString$3(o))throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);const s=o;return isString$3(n)?l.locale=n:isNumber$2(n)?l.plural=n:isArray$1(n)?a=n:isPlainObject$2(n)&&(r=n),isString$3(i)?l.locale=i:isArray$1(i)?a=i:isPlainObject$2(i)&&(r=i),Reflect.apply(t.t,t,[s,a||r||{},l])},te:(e,o)=>t.te(e,o),tm:e=>t.tm(e),getLocaleMessage:e=>t.getLocaleMessage(e),setLocaleMessage(e,o){t.setLocaleMessage(e,o)},mergeLocaleMessage(e,o){t.mergeLocaleMessage(e,o)},d:(...e)=>Reflect.apply(t.d,t,[...e]),getDateTimeFormat:e=>t.getDateTimeFormat(e),setDateTimeFormat(e,o){t.setDateTimeFormat(e,o)},mergeDateTimeFormat(e,o){t.mergeDateTimeFormat(e,o)},n:(...e)=>Reflect.apply(t.n,t,[...e]),getNumberFormat:e=>t.getNumberFormat(e),setNumberFormat(e,o){t.setNumberFormat(e,o)},mergeNumberFormat(e,o){t.mergeNumberFormat(e,o)},getChoiceIndex:(e,t)=>-1};return n.__extender=o,n}}const baseFormatProps={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function getInterpolateArg({slots:e},t){if(1===t.length&&"default"===t[0]){return(e.default?e.default():[]).reduce(((e,t)=>[...e,...t.type===vue.Fragment?t.children:[t]]),[])}return t.reduce(((t,o)=>{const n=e[o];return n&&(t[o]=n()),t}),create())}function getFragmentableTag(e){return vue.Fragment}const TranslationImpl=vue.defineComponent({name:"i18n-t",props:assign$2({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>isNumber$2(e)||!isNaN(e)}},baseFormatProps),setup(e,t){const{slots:o,attrs:n}=t,i=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(o).filter((e=>"_"!==e)),a=create();e.locale&&(a.locale=e.locale),void 0!==e.plural&&(a.plural=isString$3(e.plural)?+e.plural:e.plural);const r=getInterpolateArg(t,l),s=i[TranslateVNodeSymbol](e.keypath,r,a),d=assign$2(create(),n),u=isString$3(e.tag)||isObject$3(e.tag)?e.tag:getFragmentableTag();return vue.h(u,d,s)}}}),Translation=TranslationImpl;function isVNode(e){return isArray$1(e)&&!isString$3(e[0])}function renderFormatter(e,t,o,n){const{slots:i,attrs:l}=t;return()=>{const t={part:!0};let a=create();e.locale&&(t.locale=e.locale),isString$3(e.format)?t.key=e.format:isObject$3(e.format)&&(isString$3(e.format.key)&&(t.key=e.format.key),a=Object.keys(e.format).reduce(((t,n)=>o.includes(n)?assign$2(create(),t,{[n]:e.format[n]}):t),create()));const r=n(e.value,t,a);let s=[t.key];isArray$1(r)?s=r.map(((e,t)=>{const o=i[e.type],n=o?o({[e.type]:e.value,index:t,parts:r}):[e.value];return isVNode(n)&&(n[0].key=`${e.type}-${t}`),n})):isString$3(r)&&(s=[r]);const d=assign$2(create(),l),u=isString$3(e.tag)||isObject$3(e.tag)?e.tag:getFragmentableTag();return vue.h(u,d,s)}}const NumberFormatImpl=vue.defineComponent({name:"i18n-n",props:assign$2({value:{type:Number,required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const o=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return renderFormatter(e,t,NUMBER_FORMAT_OPTIONS_KEYS,((...e)=>o[NumberPartsSymbol](...e)))}}),NumberFormat=NumberFormatImpl,DatetimeFormatImpl=vue.defineComponent({name:"i18n-d",props:assign$2({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},baseFormatProps),setup(e,t){const o=e.i18n||useI18n({useScope:e.scope,__useComponent:!0});return renderFormatter(e,t,DATETIME_FORMAT_OPTIONS_KEYS,((...e)=>o[DatetimePartsSymbol](...e)))}}),DatetimeFormat=DatetimeFormatImpl;function getComposer$2(e,t){const o=e;if("composition"===e.mode)return o.__getInstance(t)||e.global;{const n=o.__getInstance(t);return null!=n?n.__composer:e.global.__composer}}function vTDirective(e){const t=t=>{const{instance:o,modifiers:n,value:i}=t;if(!o||!o.$)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);const l=getComposer$2(e,o.$),a=parseValue(i);return[Reflect.apply(l.t,l,[...makeParams(a)]),l]};return{created:(o,n)=>{const[i,l]=t(n);inBrowser&&e.global===l&&(o.__i18nWatcher=vue.watch(l.locale,(()=>{n.instance&&n.instance.$forceUpdate()}))),o.__composer=l,o.textContent=i},unmounted:e=>{inBrowser&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){const o=e.__composer,n=parseValue(t);e.textContent=Reflect.apply(o.t,o,[...makeParams(n)])}},getSSRProps:e=>{const[o]=t(e);return{textContent:o}}}}function parseValue(e){if(isString$3(e))return{path:e};if(isPlainObject$2(e)){if(!("path"in e))throw createI18nError(I18nErrorCodes.REQUIRED_VALUE,"path");return e}throw createI18nError(I18nErrorCodes.INVALID_VALUE)}function makeParams(e){const{path:t,locale:o,args:n,choice:i,plural:l}=e,a={},r=n||{};return isString$3(o)&&(a.locale=o),isNumber$2(i)&&(a.plural=i),isNumber$2(l)&&(a.plural=l),[t,r,a]}function apply(e,t,...o){const n=isPlainObject$2(o[0])?o[0]:{},i=!!n.useI18nComponentName;(!isBoolean(n.globalInstall)||n.globalInstall)&&([i?"i18n":Translation.name,"I18nT"].forEach((t=>e.component(t,Translation))),[NumberFormat.name,"I18nN"].forEach((t=>e.component(t,NumberFormat))),[DatetimeFormat.name,"I18nD"].forEach((t=>e.component(t,DatetimeFormat)))),e.directive("t",vTDirective(t))}function defineMixin(e,t,o){return{beforeCreate(){const n=vue.getCurrentInstance();if(!n)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const n=i.i18n;if(i.__i18n&&(n.__i18n=i.__i18n),n.__root=t,this===this.$root)this.$i18n=mergeToGlobal(e,n);else{n.__injectWithOption=!0,n.__extender=o.__vueI18nExtend,this.$i18n=createVueI18n(n);const e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=mergeToGlobal(e,i);else{this.$i18n=createVueI18n({__i18n:i.__i18n,__injectWithOption:!0,__extender:o.__vueI18nExtend,__root:t});const e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&adjustI18nResources(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$tc=(...e)=>this.$i18n.tc(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),o.__setInstance(n,this.$i18n)},mounted(){},unmounted(){const e=vue.getCurrentInstance();if(!e)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);const t=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),o.__deleteInstance(e),delete this.$i18n}}}function mergeToGlobal(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[SetPluralRulesSymbol](t.pluralizationRules||e.pluralizationRules);const o=getLocaleMessages(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(o).forEach((t=>e.mergeLocaleMessage(t,o[t]))),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach((o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o]))),t.numberFormats&&Object.keys(t.numberFormats).forEach((o=>e.mergeNumberFormat(o,t.numberFormats[o]))),e}const I18nInjectionKey=makeSymbol("global-vue-i18n");function createI18n(e={},t){const o=__VUE_I18N_LEGACY_API__&&isBoolean(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=!isBoolean(e.globalInjection)||e.globalInjection,i=!__VUE_I18N_LEGACY_API__||!o||!!e.allowComposition,l=new Map,[a,r]=createGlobal(e,o),s=makeSymbol("");{const e={get mode(){return __VUE_I18N_LEGACY_API__&&o?"legacy":"composition"},get allowComposition(){return i},async install(t,...i){if(t.__VUE_I18N_SYMBOL__=s,t.provide(t.__VUE_I18N_SYMBOL__,e),isPlainObject$2(i[0])){const t=i[0];e.__composerExtend=t.__composerExtend,e.__vueI18nExtend=t.__vueI18nExtend}let l=null;!o&&n&&(l=injectGlobalFields(t,e.global)),__VUE_I18N_FULL_INSTALL__&&apply(t,e,...i),__VUE_I18N_LEGACY_API__&&o&&t.mixin(defineMixin(r,r.__composer,e));const a=t.unmount;t.unmount=()=>{l&&l(),e.dispose(),a()}},get global(){return r},dispose(){a.stop()},__instances:l,__getInstance:function(e){return l.get(e)||null},__setInstance:function(e,t){l.set(e,t)},__deleteInstance:function(e){l.delete(e)}};return e}}function useI18n(e={}){const t=vue.getCurrentInstance();if(null==t)throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&null!=t.appContext.app&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw createI18nError(I18nErrorCodes.NOT_INSTALLED);const o=getI18nInstance(t),n=getGlobalComposer(o),i=getComponentOptions(t),l=getScope(e,i);if(__VUE_I18N_LEGACY_API__&&"legacy"===o.mode&&!e.__useComponent){if(!o.allowComposition)throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);return useI18nForLegacy(t,l,n,e)}if("global"===l)return adjustI18nResources(n,e,i),n;if("parent"===l){let i=getComposer(o,t,e.__useComponent);return null==i&&(i=n),i}const a=o;let r=a.__getInstance(t);if(null==r){const o=assign$2({},e);"__i18n"in i&&(o.__i18n=i.__i18n),n&&(o.__root=n),r=createComposer(o),a.__composerExtend&&(r[DisposeSymbol]=a.__composerExtend(r)),setupLifeCycle(a,t,r),a.__setInstance(t,r)}return r}function createGlobal(e,t,o){const n=vue.effectScope();{const o=__VUE_I18N_LEGACY_API__&&t?n.run((()=>createVueI18n(e))):n.run((()=>createComposer(e)));if(null==o)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);return[n,o]}}function getI18nInstance(e){{const t=vue.inject(e.isCE?I18nInjectionKey:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw createI18nError(e.isCE?I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE:I18nErrorCodes.UNEXPECTED_ERROR);return t}}function getScope(e,t){return isEmptyObject(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function getGlobalComposer(e){return"composition"===e.mode?e.global:e.global.__composer}function getComposer(e,t,o=!1){let n=null;const i=t.root;let l=getParentComponentInstance(t,o);for(;null!=l;){const t=e;if("composition"===e.mode)n=t.__getInstance(l);else if(__VUE_I18N_LEGACY_API__){const e=t.__getInstance(l);null!=e&&(n=e.__composer,o&&n&&!n[InejctWithOptionSymbol]&&(n=null))}if(null!=n)break;if(i===l)break;l=l.parent}return n}function getParentComponentInstance(e,t=!1){return null==e?null:t&&e.vnode.ctx||e.parent}function setupLifeCycle(e,t,o){vue.onMounted((()=>{}),t),vue.onUnmounted((()=>{const n=o;e.__deleteInstance(t);const i=n[DisposeSymbol];i&&(i(),delete n[DisposeSymbol])}),t)}function useI18nForLegacy(e,t,o,n={}){const i="local"===t,l=vue.shallowRef(null);if(i&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw createI18nError(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const a=isBoolean(n.inheritLocale)?n.inheritLocale:!isString$3(n.locale),r=vue.ref(!i||a?o.locale.value:isString$3(n.locale)?n.locale:DEFAULT_LOCALE),s=vue.ref(!i||a?o.fallbackLocale.value:isString$3(n.fallbackLocale)||isArray$1(n.fallbackLocale)||isPlainObject$2(n.fallbackLocale)||!1===n.fallbackLocale?n.fallbackLocale:r.value),d=vue.ref(getLocaleMessages(r.value,n)),u=vue.ref(isPlainObject$2(n.datetimeFormats)?n.datetimeFormats:{[r.value]:{}}),c=vue.ref(isPlainObject$2(n.numberFormats)?n.numberFormats:{[r.value]:{}}),m=i?o.missingWarn:!isBoolean(n.missingWarn)&&!isRegExp(n.missingWarn)||n.missingWarn,p=i?o.fallbackWarn:!isBoolean(n.fallbackWarn)&&!isRegExp(n.fallbackWarn)||n.fallbackWarn,f=i?o.fallbackRoot:!isBoolean(n.fallbackRoot)||n.fallbackRoot,h=!!n.fallbackFormat,v=isFunction$2(n.missing)?n.missing:null,g=isFunction$2(n.postTranslation)?n.postTranslation:null,y=i?o.warnHtmlMessage:!isBoolean(n.warnHtmlMessage)||n.warnHtmlMessage,b=!!n.escapeParameter,k=i?o.modifiers:isPlainObject$2(n.modifiers)?n.modifiers:{},w=n.pluralRules||i&&o.pluralRules;function C(e){return r.value,s.value,d.value,u.value,c.value,e()}const _={get id(){return l.value?l.value.id:-1},locale:vue.computed({get:()=>l.value?l.value.locale.value:r.value,set:e=>{l.value&&(l.value.locale.value=e),r.value=e}}),fallbackLocale:vue.computed({get:()=>l.value?l.value.fallbackLocale.value:s.value,set:e=>{l.value&&(l.value.fallbackLocale.value=e),s.value=e}}),messages:vue.computed((()=>l.value?l.value.messages.value:d.value)),datetimeFormats:vue.computed((()=>u.value)),numberFormats:vue.computed((()=>c.value)),get inheritLocale(){return l.value?l.value.inheritLocale:a},set inheritLocale(e){l.value&&(l.value.inheritLocale=e)},get availableLocales(){return l.value?l.value.availableLocales:Object.keys(d.value)},get modifiers(){return l.value?l.value.modifiers:k},get pluralRules(){return l.value?l.value.pluralRules:w},get isGlobal(){return!!l.value&&l.value.isGlobal},get missingWarn(){return l.value?l.value.missingWarn:m},set missingWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackWarn(){return l.value?l.value.fallbackWarn:p},set fallbackWarn(e){l.value&&(l.value.missingWarn=e)},get fallbackRoot(){return l.value?l.value.fallbackRoot:f},set fallbackRoot(e){l.value&&(l.value.fallbackRoot=e)},get fallbackFormat(){return l.value?l.value.fallbackFormat:h},set fallbackFormat(e){l.value&&(l.value.fallbackFormat=e)},get warnHtmlMessage(){return l.value?l.value.warnHtmlMessage:y},set warnHtmlMessage(e){l.value&&(l.value.warnHtmlMessage=e)},get escapeParameter(){return l.value?l.value.escapeParameter:b},set escapeParameter(e){l.value&&(l.value.escapeParameter=e)},t:function(...e){return l.value?C((()=>Reflect.apply(l.value.t,null,[...e]))):C((()=>""))},getPostTranslationHandler:function(){return l.value?l.value.getPostTranslationHandler():g},setPostTranslationHandler:function(e){l.value&&l.value.setPostTranslationHandler(e)},getMissingHandler:function(){return l.value?l.value.getMissingHandler():v},setMissingHandler:function(e){l.value&&l.value.setMissingHandler(e)},rt:function(...e){return l.value?Reflect.apply(l.value.rt,null,[...e]):""},d:function(...e){return l.value?C((()=>Reflect.apply(l.value.d,null,[...e]))):C((()=>""))},n:function(...e){return l.value?C((()=>Reflect.apply(l.value.n,null,[...e]))):C((()=>""))},tm:function(e){return l.value?l.value.tm(e):{}},te:function(e,t){return!!l.value&&l.value.te(e,t)},getLocaleMessage:function(e){return l.value?l.value.getLocaleMessage(e):{}},setLocaleMessage:function(e,t){l.value&&(l.value.setLocaleMessage(e,t),d.value[e]=t)},mergeLocaleMessage:function(e,t){l.value&&l.value.mergeLocaleMessage(e,t)},getDateTimeFormat:function(e){return l.value?l.value.getDateTimeFormat(e):{}},setDateTimeFormat:function(e,t){l.value&&(l.value.setDateTimeFormat(e,t),u.value[e]=t)},mergeDateTimeFormat:function(e,t){l.value&&l.value.mergeDateTimeFormat(e,t)},getNumberFormat:function(e){return l.value?l.value.getNumberFormat(e):{}},setNumberFormat:function(e,t){l.value&&(l.value.setNumberFormat(e,t),c.value[e]=t)},mergeNumberFormat:function(e,t){l.value&&l.value.mergeNumberFormat(e,t)}};return vue.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const o=l.value=e.proxy.$i18n.__composer;"global"===t?(r.value=o.locale.value,s.value=o.fallbackLocale.value,d.value=o.messages.value,u.value=o.datetimeFormats.value,c.value=o.numberFormats.value):i&&function(e){e.locale.value=r.value,e.fallbackLocale.value=s.value,Object.keys(d.value).forEach((t=>{e.mergeLocaleMessage(t,d.value[t])})),Object.keys(u.value).forEach((t=>{e.mergeDateTimeFormat(t,u.value[t])})),Object.keys(c.value).forEach((t=>{e.mergeNumberFormat(t,c.value[t])})),e.escapeParameter=b,e.fallbackFormat=h,e.fallbackRoot=f,e.fallbackWarn=p,e.missingWarn=m,e.warnHtmlMessage=y}(o)})),_}const globalExportProps=["locale","fallbackLocale","availableLocales"],globalExportMethods=["t","rt","d","n","tm","te"];function injectGlobalFields(e,t){const o=Object.create(null);globalExportProps.forEach((e=>{const n=Object.getOwnPropertyDescriptor(t,e);if(!n)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);const i=vue.isRef(n.value)?{get:()=>n.value.value,set(e){n.value.value=e}}:{get:()=>n.get&&n.get()};Object.defineProperty(o,e,i)})),e.config.globalProperties.$i18n=o,globalExportMethods.forEach((o=>{const n=Object.getOwnPropertyDescriptor(t,o);if(!n||!n.value)throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,n)}));return()=>{delete e.config.globalProperties.$i18n,globalExportMethods.forEach((t=>{delete e.config.globalProperties[`$${t}`]}))}}if(initFeatureFlags(),__INTLIFY_JIT_COMPILATION__?registerMessageCompiler(compile):registerMessageCompiler(compileToFunction),registerMessageResolver(resolveValue$1),registerLocaleFallbacker(fallbackWithLocaleChain),__INTLIFY_PROD_DEVTOOLS__){const e=getGlobalThis();e.__INTLIFY__=!0,setDevToolsHook(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)} /**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT */function ownKeys$1(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function _objectSpread2$1(e){for(var t=1;t=0||(i[o]=e[o]);return i}function _objectWithoutProperties(e,t){if(null==e)return{};var o,n,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}var version$1="1.14.0";function userAgent(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(e,t,o){e.addEventListener(t,o,!IE11OrLess&&captureMode)}function off(e,t,o){e.removeEventListener(t,o,!IE11OrLess&&captureMode)}function matches(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(o){return!1}return!1}}function getParentOrHost(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function closest(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&matches(e,t):matches(e,t))||n&&e===o)return e;if(e===o)break}while(e=getParentOrHost(e))}return null}var R_SPACE=/\s+/g,_throttleTimeout;function toggleClass$1(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(R_SPACE," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(R_SPACE," ")}}function css(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function matrix(e,t){var o="";if("string"==typeof e)o=e;else do{var n=css(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(o)}function find(e,t,o){if(e){var n=e.getElementsByTagName(t),i=0,l=n.length;if(o)for(;i=l:i<=l))return n;if(n===getWindowScrollingElement())break;n=getParentAutoScrollElement(n,!1)}return!1}function getChild(e,t,o,n){for(var i=0,l=0,a=e.children;l2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,i=_objectWithoutProperties(o,_excluded);PluginManager.pluginEvent.bind(Sortable)(e,t,_objectSpread2$1({dragEl:dragEl,parentEl:parentEl,ghostEl:ghostEl,rootEl:rootEl,nextEl:nextEl,lastDownEl:lastDownEl,cloneEl:cloneEl,cloneHidden:cloneHidden,dragStarted:moved,putSortable:putSortable,activeSortable:Sortable.active,originalEvent:n,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(e){_dispatchEvent({sortable:t,name:e,originalEvent:n})}},i))};function _dispatchEvent(e){dispatchEvent$1(_objectSpread2$1({putSortable:putSortable,cloneEl:cloneEl,targetEl:dragEl,rootEl:rootEl,oldIndex:oldIndex,oldDraggableIndex:oldDraggableIndex,newIndex:newIndex,newDraggableIndex:newDraggableIndex},e))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists="undefined"!=typeof document,PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),_detectDirection=function(e,t){var o=css(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=getChild(e,0,t),l=getChild(e,1,t),a=i&&css(i),r=l&&css(l),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+getRect(i).width,d=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+getRect(l).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!l||"both"!==r.clear&&r.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=n&&"none"===o[CSSFloatProperty]||l&&"none"===o[CSSFloatProperty]&&s+d>n)?"vertical":"horizontal"},_dragElInRowColumn=function(e,t,o){var n=o?e.left:e.top,i=o?e.right:e.bottom,l=o?e.width:e.height,a=o?t.left:t.top,r=o?t.right:t.bottom,s=o?t.width:t.height;return n===a||i===r||n+l/2===a+s/2},_detectNearestEmptySortable=function(e,t){var o;return sortables.some((function(n){var i=n[expando].options.emptyInsertThreshold;if(i&&!lastChild(n)){var l=getRect(n),a=e>=l.left-i&&e<=l.right+i,r=t>=l.top-i&&t<=l.bottom+i;return a&&r?o=n:void 0}})),o},_prepareGroup=function(e){function t(e,o){return function(n,i,l,a){var r=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==e&&(o||r))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,i,l,a),o)(n,i,l,a);var s=(o?n:i).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var o={},n=e.group;n&&"object"==_typeof$1(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&document.addEventListener("click",(function(e){if(ignoreNextClick)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ignoreNextClick=!1,!1}),!0);var nearestEmptyInsertDetectEvent=function(e){if(dragEl){e=e.touches?e.touches[0]:e;var t=_detectNearestEmptySortable(e.clientX,e.clientY);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[expando]._onDragOver(o)}}},_checkOutsideTargetEl=function(e){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(e.target)};function Sortable(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=_extends({},t),e[expando]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Sortable.supportPointer&&"PointerEvent"in window&&!Safari,emptyInsertThreshold:5};for(var n in PluginManager.initializePlugins(this,e,o),o)!(n in t)&&(t[n]=o[n]);for(var i in _prepareGroup(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?on(e,"pointerdown",this._onTapStart):(on(e,"mousedown",this._onTapStart),on(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(e,"dragover",this),on(e,"dragenter",this)),sortables.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),_extends(this,AnimationStateManager())}function _globalDragOver(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function _onMove(e,t,o,n,i,l,a,r){var s,d,u=e[expando],c=u.options.onMove;return!window.CustomEvent||IE11OrLess||Edge?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=o,s.draggedRect=n,s.related=i||t,s.relatedRect=l||getRect(t),s.willInsertAfter=r,s.originalEvent=a,e.dispatchEvent(s),c&&(d=c.call(u,s,a)),d}function _disableDraggable(e){e.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsFirst(e,t,o){var n=getRect(getChild(o.el,0,o.options,!0));return t?e.clientXn.right+10||e.clientX<=n.right&&e.clientY>n.bottom&&e.clientX>=n.left:e.clientX>n.right&&e.clientY>n.top||e.clientX<=n.right&&e.clientY>n.bottom+10}function _getSwapDirection(e,t,o,n,i,l,a,r){var s=n?e.clientY:e.clientX,d=n?o.height:o.width,u=n?o.top:o.left,c=n?o.bottom:o.right,m=!1;if(!a)if(r&&targetMoveDistanceu+d*l/2:sc-targetMoveDistance)return-lastDirection}else if(s>u+d*(1-i)/2&&sc-d*l/2)?s>u+d/2?1:-1:0}function _getInsertDirection(e){return index$2(dragEl)=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag),off(e,"touchend",this._disableDelayedDrag),off(e,"touchcancel",this._disableDelayedDrag),off(e,"mousemove",this._delayedDragTouchMoveHandler),off(e,"touchmove",this._delayedDragTouchMoveHandler),off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):on(document,t?"touchmove":"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(e,t){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:t}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var o=this.options;!e&&toggleClass$1(dragEl,o.dragClass,!1),toggleClass$1(dragEl,o.ghostClass,!0),Sortable.active=this,e&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY))!==t;)t=e;if(dragEl.parentNode[expando]._isOutsideThisEl(e),t)do{if(t[expando]){if(t[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);_unhideGhostForTarget()}},_onTouchMove:function(e){if(tapEvt){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,i=e.touches?e.touches[0]:e,l=ghostEl&&matrix(ghostEl,!0),a=ghostEl&&l&&l.a,r=ghostEl&&l&&l.d,s=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),d=(i.clientX-tapEvt.clientX+n.x)/(a||1)+(s?s[0]-ghostRelativeParentInitialScroll[0]:0)/(a||1),u=(i.clientY-tapEvt.clientY+n.y)/(r||1)+(s?s[1]-ghostRelativeParentInitialScroll[1]:0)/(r||1);if(!Sortable.active&&!awaitingDragStarted){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),Sortable.active&&(null!=newIndex&&-1!==newIndex||(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach((function(e){e.checked=!0})),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(e),_globalDragOver(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,i=o.length,l=this.options;ne.replace(regex,((e,t)=>t.toUpperCase())))),manageAndEmit$1=["Start","Add","Remove","Update","End"],emit$1=["Choose","Unchoose","Sort","Filter","Clone"],manage$1=["Move"],eventHandlerNames=[manage$1,manageAndEmit$1,emit$1].flatMap((e=>e)).map((e=>`on${e}`)),events$1={manage:manage$1,manageAndEmit:manageAndEmit$1,emit:emit$1};function isReadOnly(e){return-1!==eventHandlerNames.indexOf(e)}const tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function isHtmlTag(e){return tags.includes(e)}function isTransition(e){return["transition-group","TransitionGroup"].includes(e)}function isHtmlAttribute(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function project(e){return e.reduce(((e,[t,o])=>(e[t]=o,e)),{})}function getComponentAttributes({$attrs:e,componentData:t={}}){return{...project(Object.entries(e).filter((([e,t])=>isHtmlAttribute(e)))),...t}}function createSortableOption({$attrs:e,callBackBuilder:t}){const o=project(getValidSortableEntries(e));Object.entries(t).forEach((([e,t])=>{events$1[e].forEach((e=>{o[`on${e}`]=t(e)}))}));const n=`[data-draggable]${o.draggable||""}`;return{...o,draggable:n}}function getValidSortableEntries(e){return Object.entries(e).filter((([e,t])=>!isHtmlAttribute(e))).map((([e,t])=>[camelize(e),t])).filter((([e,t])=>!isReadOnly(e)))}const getHtmlElementFromNode=({el:e})=>e,addContext=(e,t)=>e.__draggable_context=t,getContext=e=>e.__draggable_context;class ComponentStructure{constructor({nodes:{header:e,default:t,footer:o},root:n,realList:i}){this.defaultNodes=t,this.children=[...e,...t,...o],this.externalComponent=n.externalComponent,this.rootTransition=n.transition,this.tag=n.tag,this.realList=i}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(e,t){const{tag:o,children:n,_isRootComponent:i}=this;return e(o,t,i?{default:()=>n}:n)}updated(){const{defaultNodes:e,realList:t}=this;e.forEach(((e,o)=>{addContext(getHtmlElementFromNode(e),{element:t[o],index:o})}))}getUnderlyingVm(e){return getContext(e)}getVmIndexFromDomIndex(e,t){const{defaultNodes:o}=this,{length:n}=o,i=t.children,l=i.item(e);if(null===l)return n;const a=getContext(l);if(a)return a.index;if(0===n)return 0;const r=getHtmlElementFromNode(o[0]);return e<[...i].findIndex((e=>e===r))?0:n}}function getSlot(e,t){const o=e[t];return o?o():[]}function computeNodes({$slots:e,realList:t,getKey:o}){const n=t||[],[i,l]=["header","footer"].map((t=>getSlot(e,t))),{item:a}=e;if(!a)throw new Error("draggable element must have an item slot");const r=n.flatMap(((e,t)=>a({element:e,index:t}).map((t=>(t.key=o(e),t.props={...t.props||{},"data-draggable":!0},t)))));if(r.length!==n.length)throw new Error("Item slot must have only one child");return{header:i,footer:l,default:r}}function getRootInformation(e){const t=isTransition(e),o=!isHtmlTag(e)&&!t;return{transition:t,externalComponent:o,tag:o?vue.resolveComponent(e):t?vue.TransitionGroup:e}}function computeComponentStructure({$slots:e,tag:t,realList:o,getKey:n}){const i=computeNodes({$slots:e,realList:o,getKey:n}),l=getRootInformation(t);return new ComponentStructure({nodes:i,root:l,realList:o})}function emit(e,t){vue.nextTick((()=>this.$emit(e.toLowerCase(),t)))}function manage(e){return(t,o)=>{if(null!==this.realList)return this[`onDrag${e}`](t,o)}}function manageAndEmit(e){const t=manage.call(this,e);return(o,n)=>{t.call(this,o,n),emit.call(this,e,o)}}let draggingElement=null;const props={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},emits=["update:modelValue","change",...[...events$1.manageAndEmit,...events$1.emit].map((e=>e.toLowerCase()))],draggableComponent=vue.defineComponent({name:"draggable",inheritAttrs:!1,props:props,emits:emits,data:()=>({error:!1}),render(){try{this.error=!1;const{$slots:e,$attrs:t,tag:o,componentData:n,realList:i,getKey:l}=this,a=computeComponentStructure({$slots:e,tag:o,realList:i,getKey:l});this.componentStructure=a;const r=getComponentAttributes({$attrs:t,componentData:n});return a.render(vue.h,r)}catch(e){return this.error=!0,vue.h("pre",{style:{color:"red"}},e.stack)}},created(){null!==this.list&&null!==this.modelValue&&console$1.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:e,$el:t,componentStructure:o}=this;o.updated();const n=createSortableOption({$attrs:e,callBackBuilder:{manageAndEmit:e=>manageAndEmit.call(this,e),emit:e=>emit.bind(this,e),manage:e=>manage.call(this,e)}}),i=1===t.nodeType?t:t.parentElement;this._sortable=new Sortable(i,n),this.targetDomElement=i,i.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){void 0!==this._sortable&&this._sortable.destroy()},computed:{realList(){const{list:e}=this;return e||this.modelValue},getKey(){const{itemKey:e}=this;return"function"==typeof e?e:t=>t[e]}},watch:{$attrs:{handler(e){const{_sortable:t}=this;t&&getValidSortableEntries(e).forEach((([e,o])=>{t.option(e,o)}))},deep:!0}},methods:{getUnderlyingVm(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent:e=>e.__draggable_component__,emitChanges(e){vue.nextTick((()=>this.$emit("change",e)))},alterList(e){if(this.list)return void e(this.list);const t=[...this.modelValue];e(t),this.$emit("update:modelValue",t)},spliceList(){this.alterList((e=>e.splice(...arguments)))},updatePosition(e,t){this.alterList((o=>o.splice(t,0,o.splice(e,1)[0])))},getRelatedContextFromMoveEvent({to:e,related:t}){const o=this.getUnderlyingPotencialDraggableComponent(e);if(!o)return{component:o};const n=o.realList,i={list:n,component:o};if(e!==t&&n){return{...o.getUnderlyingVm(t)||{},...i}}return i},getVmIndexFromDomIndex(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),draggingElement=e.item},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;removeNode(e.item);const o=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(o,0,t);const n={element:t,newIndex:o};this.emitChanges({added:n})},onDragRemove(e){if(insertNodeAt(this.$el,e.item,e.oldIndex),"clone"===e.pullMode)return void removeNode(e.clone);const{index:t,element:o}=this.context;this.spliceList(t,1);const n={element:o,oldIndex:t};this.emitChanges({removed:n})},onDragUpdate(e){removeNode(e.item),insertNodeAt(e.from,e.item,e.oldIndex);const t=this.context.index,o=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(t,o);const n={element:this.context.element,oldIndex:t,newIndex:o};this.emitChanges({moved:n})},computeFutureIndex(e,t){if(!e.element)return 0;const o=[...t.to.children].filter((e=>"none"!==e.style.display)),n=o.indexOf(t.related),i=e.component.getVmIndexFromDomIndex(n);return-1!==o.indexOf(draggingElement)||!t.willInsertAfter?i:i+1},onDragMove(e,t){const{move:o,realList:n}=this;if(!o||!n)return!0;const i=this.getRelatedContextFromMoveEvent(e),l=this.computeFutureIndex(i,e),a={...this.context,futureIndex:l};return o({...e,relatedContext:i,draggedContext:a},t)},onDragEnd(){draggingElement=null}}}),loadJs=e=>new Promise(((t,o)=>{const n=document.createElement("script");n.src=e,n.type="text/javascript",document.body.appendChild(n),n.onload=()=>{t()}})),generateKeyToTD=e=>{for(let t=0;t{for(let t=0;t{for(let t=0;t{if(!e)return[];return e.split(/}\s+./).filter((e=>e)).map((e=>("."!==(e=e.trim())[0]&&(e="."+e),"}"!==e[e.length-1]&&(e+="}"),e)))},splitSheetName=e=>Array.from(new Set(e.map((e=>{let t=e.indexOf(" "),o=e.indexOf("{"),n=o;return t>0&&t{let o=document.styleSheets[0];if(o.href){let e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e.appendChild(t),o=t.sheet||t.styleSheet}let n=0;for(;o.cssRules.length>n;)o.cssRules[n].selectorText&&0===o.cssRules[n].selectorText.indexOf(t)?o.deleteRule(n):n++;for(let i=0;i{let t=document.styleSheets[0];if(t.href)return!1;let o=0;for(;t.cssRules.length>o;)t.cssRules[o].selectorText&&0===t.cssRules[o].selectorText.indexOf(e)?t.deleteRule(o):o++},fixDraggbleList=(e,t)=>{const o=e.findIndex((e=>!e.key));o>=0&&e.splice(t,0,e.splice(o,1)[0])},getBindModels=(e,t)=>{let o={};return Object.keys(t).forEach((n=>{"object"==typeof t[n]&&e[n]?Array.isArray(e[n])?o[n]=e[n].map((e=>getBindModels(e,t[n]))):o[n]=getBindModels(e[n],t[n]):o[n]=e[n]})),o},addClass$1=(e,t)=>{e.classList.add(t)},removeClass$1=(e,t)=>{e.classList.remove(t)},consoleError=e=>{Function(`\n window.console && console.error('[FormMaking error]: ${e}');\n `)()};var index_vue_vue_type_style_index_0_lang$a="",_export_sfc=(e,t)=>{const o=e.__vccOpts||e;for(const[n,i]of t)o[n]=i;return o};const _sfc_main$1I={name:"code-editor",props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},mode:{type:String,default:"xml"},modelValue:{type:[String,Object,Array]},fontSize:{type:Number,default:13},wrap:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{id:"code_"+Math.random().toString(36).slice(-8),codeValue:this.modelValue,loading:!0,observer:null,editor:null}},computed:{aceMode(){switch(this.mode){case"xml":default:return"ace/mode/xml";case"html":return"ace/mode/html";case"json":return"ace/mode/json";case"css":return"ace/mode/css";case"javascript":return"ace/mode/javascript";case"tsx":return"ace/mode/tsx"}}},mounted(){setTimeout((()=>{window.ace?this.loadEditor():window.FormMaking_OPTIONS.aceurl&&loadJs(`${window.FormMaking_OPTIONS.aceurl}/ace.js`).then((()=>{loadJs(`${window.FormMaking_OPTIONS.aceurl}/ext-language_tools.js`).then((()=>{this.loadEditor()}))})),this.observer=new MutationObserver(((e,t)=>{this.loadEditor()})),this.observer.observe(document.getElementsByTagName("html")[0],{attributes:!0})}),0)},methods:{loadEditor(){this.loading=!1,ace.require("ace/ext/language_tools"),this.editor=ace.edit(this.$refs[this.id+"Ref"]),this.editor.session.setMode(this.aceMode),this.editor.setFontSize(this.fontSize),this.editor.getSession().setTabSize(2),this.editor.setShowPrintMargin(!1),this.wrap&&this.editor.getSession().setUseWrapMode(!0),document.querySelector("html").className.indexOf("dark")>-1?this.editor.setTheme("ace/theme/nord_dark"):this.editor.setTheme("ace/theme/textmate"),this.editor.setOptions({enableSnippets:!0,enableLiveAutocompletion:!0}),this.editor.commands.addCommand({name:"myCommand",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:function(e){e.selection.getCursor(),e.selection.moveCursorLineEnd(),e.selection.moveTo(e.selection.getCursor().row,e.selection.getCursor().column),e.session.insert(e.getCursorPosition(),"\n")}}),this.editor.setValue("string"==typeof this.codeValue?this.codeValue:JSON.stringify(this.codeValue,null,"\t"),-1),this.editor.on("change",(e=>{this.codeValue=this.editor.getValue()})),this.editor.on("paste",(e=>{"json"===this.mode&&setTimeout((()=>{this.editor.setValue(JSON.stringify(JSON.parse(e.text),null,2),-1)}))}))},setValue(e){this.editor.setValue(JSON.stringify(JSON.parse(e),null,2),-1)}},beforeUnmount(){var e,t,o;null==(e=this.observer)||e.disconnect(),null==(t=this.editor)||t.destroy(),null==(o=this.editor)||o.container.remove()},watch:{modelValue(e){this.codeValue=e},codeValue(e){this.$emit("update:modelValue",e)}}},_hoisted_1$19=["id"];function _sfc_render$1B(e,t,o,n,i,l){const a=vue.resolveDirective("loading");return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",{id:i.id,class:"fm-code-editor",style:vue.normalizeStyle({width:o.width,height:o.height}),ref:i.id+"Ref"},null,12,_hoisted_1$19)),[[a,i.loading]])}var CodeEditor=_export_sfc(_sfc_main$1I,[["render",_sfc_render$1B]]),CusDialog_vue_vue_type_style_index_0_lang="";const _sfc_main$1H={props:{visible:Boolean,loadingText:{type:String,default:""},title:{type:String,default:""},width:{type:String,default:"600px"},form:{type:Boolean,default:!1},action:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!1},closeOnPressEscape:{type:Boolean,default:!0},customClass:{type:String,default:""},beforeClose:Function},emits:["on-submit","on-close"],computed:{show(){return!this.form||this.showForm}},data(){return{loading:!1,dialogVisible:this.visible,showForm:!1}},methods:{close(){this.dialogVisible=!1},submit(){this.loading=!0,this.$emit("on-submit")},end(){this.loading=!1}},mounted(){},watch:{dialogVisible(e){e?this.showForm=!0:(this.loading=!1,this.$emit("on-close"),setTimeout((()=>{this.showForm=!1}),300))},visible(e){this.dialogVisible=e}}},_hoisted_1$18={key:0},_hoisted_2$_=["element-loading-text"];function _sfc_render$1A(e,t,o,n,i,l){const a=vue.resolveComponent("el-button"),r=vue.resolveComponent("el-dialog"),s=vue.resolveDirective("loading");return vue.openBlock(),vue.createBlock(r,{class:vue.normalizeClass(o.customClass+" cus-dialog-container fm-dialog"),title:o.title,modelValue:i.dialogVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>i.dialogVisible=e),"close-on-click-modal":o.closeOnClickModal,"close-on-press-escape":o.closeOnPressEscape,"append-to-body":!0,center:"",width:o.width,ref:"elDialog",fullscreen:o.fullscreen,top:"10vh",draggable:"","destroy-on-close":"","before-close":o.beforeClose},vue.createSlots({default:vue.withCtx((()=>[l.show?(vue.openBlock(),vue.createElementBlock("span",_hoisted_1$18,[vue.renderSlot(e.$slots,"default")])):vue.createCommentVNode("",!0)])),_:2},[o.action?{name:"footer",fn:vue.withCtx((()=>[vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:"dialog-footer","element-loading-text":o.loadingText},[vue.renderSlot(e.$slots,"action",{},(()=>[vue.createVNode(a,{onClick:l.close},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.cancel")),1)])),_:1},8,["onClick"]),vue.createVNode(a,{type:"primary",onClick:l.submit},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.confirm")),1)])),_:1},8,["onClick"])]))],8,_hoisted_2$_)),[[s,i.loading]])])),key:"0"}:void 0]),1032,["class","title","modelValue","close-on-click-modal","close-on-press-escape","width","fullscreen","before-close"])}var CusDialog=_export_sfc(_sfc_main$1H,[["render",_sfc_render$1A]]),CodeDialog_vue_vue_type_style_index_0_lang="";const _sfc_main$1G={components:{CusDialog:CusDialog,CodeEditor:CodeEditor},props:{mode:{type:String,default:"xml"},title:{type:String,default:""},help:{type:String,default:""},width:{type:String,default:"900px"},codeHeight:{type:String,default:"460px"}},emits:["on-confirm"],data:()=>({templateVisible:!1,templ:""}),methods:{handleSubmit(){this.$emit("on-confirm",this.templ)},open(e){this.templ=e,this.templateVisible=!0},close(){this.templateVisible=!1},end(){this.$refs.codeDialog.end()},handleHelp(){window.open(this.help)}}},_hoisted_1$17={key:0,class:"code-dialog-help"};function _sfc_render$1z(e,t,o,n,i,l){const a=vue.resolveComponent("code-editor"),r=vue.resolveComponent("el-button"),s=vue.resolveComponent("cus-dialog");return vue.openBlock(),vue.createBlock(s,{visible:i.templateVisible,onOnClose:t[1]||(t[1]=e=>i.templateVisible=!1),ref:"codeDialog",width:o.width,title:o.title,onOnSubmit:l.handleSubmit,"custom-class":"code-dialog-container"},{default:vue.withCtx((()=>[vue.createVNode(a,{height:o.codeHeight,mode:this.mode,modelValue:i.templ,"onUpdate:modelValue":t[0]||(t[0]=e=>i.templ=e)},null,8,["height","mode","modelValue"]),o.help?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$17,[vue.createVNode(r,{link:"",type:"danger",onClick:l.handleHelp},{default:vue.withCtx((()=>t[2]||(t[2]=[vue.createTextVNode("帮助"),vue.createElementVNode("i",{class:"fm-iconfont icon-question-circle"},null,-1)]))),_:1},8,["onClick"])])):vue.createCommentVNode("",!0)])),_:1},8,["visible","width","title","onOnSubmit"])}var CodeDialog=_export_sfc(_sfc_main$1G,[["render",_sfc_render$1z]]),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lodash={exports:{}},module2,exports2; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */module2=lodash,exports2=lodash.exports,function(){var e,t="Expected a function",o="__lodash_hash_undefined__",n="__lodash_placeholder__",i=16,l=32,a=64,r=128,s=256,d=1/0,u=9007199254740991,c=NaN,m=4294967295,p=[["ary",r],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",l],["partialRight",a],["rearg",s]],f="[object Arguments]",h="[object Array]",v="[object Boolean]",g="[object Date]",y="[object Error]",b="[object Function]",k="[object GeneratorFunction]",w="[object Map]",C="[object Number]",_="[object Object]",x="[object Promise]",S="[object RegExp]",V="[object Set]",$="[object String]",N="[object Symbol]",E="[object WeakMap]",B="[object ArrayBuffer]",D="[object DataView]",T="[object Float32Array]",F="[object Float64Array]",O="[object Int8Array]",I="[object Int16Array]",M="[object Int32Array]",P="[object Uint8Array]",L="[object Uint8ClampedArray]",A="[object Uint16Array]",R="[object Uint32Array]",W=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,j=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,H=RegExp(j.source),K=RegExp(G.source),q=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),oe=/^\s+/,ne=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,re=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,se=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ce=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,he=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",_e="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\ufe0e\\ufe0f",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ve="['’]",$e="[\\ud800-\\udfff]",Ne="["+Se+"]",Ee="["+ke+"]",Be="\\d+",De="[\\u2700-\\u27bf]",Te="["+Ce+"]",Fe="[^\\ud800-\\udfff"+Se+Be+we+Ce+_e+"]",Oe="\\ud83c[\\udffb-\\udfff]",Ie="[^\\ud800-\\udfff]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="["+_e+"]",Ae="(?:"+Te+"|"+Fe+")",Re="(?:"+Le+"|"+Fe+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ue="(?:['’](?:D|LL|M|RE|S|T|VE))?",ze="(?:"+Ee+"|"+Oe+")?",je="[\\ufe0e\\ufe0f]?",Ge=je+ze+"(?:\\u200d(?:"+[Ie,Me,Pe].join("|")+")"+je+ze+")*",He="(?:"+[De,Me,Pe].join("|")+")"+Ge,Ke="(?:"+[Ie+Ee+"?",Ee,Me,Pe,$e].join("|")+")",qe=RegExp(Ve,"g"),Ye=RegExp(Ee,"g"),Xe=RegExp(Oe+"(?="+Oe+")|"+Ke+Ge,"g"),Je=RegExp([Le+"?"+Te+"+"+We+"(?="+[Ne,Le,"$"].join("|")+")",Re+"+"+Ue+"(?="+[Ne,Le+Ae,"$"].join("|")+")",Le+"?"+Ae+"+"+We,Le+"+"+Ue,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Be,He].join("|"),"g"),Qe=RegExp("[\\u200d\\ud800-\\udfff"+ke+xe+"]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],tt=-1,ot={};ot[T]=ot[F]=ot[O]=ot[I]=ot[M]=ot[P]=ot[L]=ot[A]=ot[R]=!0,ot[f]=ot[h]=ot[B]=ot[v]=ot[D]=ot[g]=ot[y]=ot[b]=ot[w]=ot[C]=ot[_]=ot[S]=ot[V]=ot[$]=ot[E]=!1;var nt={};nt[f]=nt[h]=nt[B]=nt[D]=nt[v]=nt[g]=nt[T]=nt[F]=nt[O]=nt[I]=nt[M]=nt[w]=nt[C]=nt[_]=nt[S]=nt[V]=nt[$]=nt[N]=nt[P]=nt[L]=nt[A]=nt[R]=!0,nt[y]=nt[b]=nt[E]=!1;var it={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,at=parseInt,rt="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,st="object"==typeof self&&self&&self.Object===Object&&self,dt=rt||st||Function("return this")(),ut=exports2&&!exports2.nodeType&&exports2,ct=ut&&module2&&!module2.nodeType&&module2,mt=ct&&ct.exports===ut,pt=mt&&rt.process,ft=function(){try{var e=ct&&ct.require&&ct.require("util").types;return e||pt&&pt.binding&&pt.binding("util")}catch(t){}}(),ht=ft&&ft.isArrayBuffer,vt=ft&&ft.isDate,gt=ft&&ft.isMap,yt=ft&&ft.isRegExp,bt=ft&&ft.isSet,kt=ft&&ft.isTypedArray;function wt(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}function Ct(e,t,o,n){for(var i=-1,l=null==e?0:e.length;++i-1}function Nt(e,t,o){for(var n=-1,i=null==e?0:e.length;++n-1;);return o}function Jt(e,t){for(var o=e.length;o--&&Pt(t,e[o],0)>-1;);return o}function Qt(e,t){for(var o=e.length,n=0;o--;)e[o]===t&&++n;return n}var Zt=Ut({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),eo=Ut({"&":"&","<":"<",">":">",'"':""","'":"'"});function to(e){return"\\"+it[e]}function oo(e){return Qe.test(e)}function no(e){var t=-1,o=Array(e.size);return e.forEach((function(e,n){o[++t]=[n,e]})),o}function io(e,t){return function(o){return e(t(o))}}function lo(e,t){for(var o=-1,i=e.length,l=0,a=[];++o",""":'"',"'":"'"}),mo=function ne(ke){var we,Ce=(ke=null==ke?dt:mo.defaults(dt.Object(),ke,mo.pick(dt,et))).Array,_e=ke.Date,xe=ke.Error,Se=ke.Function,Ve=ke.Math,$e=ke.Object,Ne=ke.RegExp,Ee=ke.String,Be=ke.TypeError,De=Ce.prototype,Te=Se.prototype,Fe=$e.prototype,Oe=ke["__core-js_shared__"],Ie=Te.toString,Me=Fe.hasOwnProperty,Pe=0,Le=(we=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+we:"",Ae=Fe.toString,Re=Ie.call($e),We=dt._,Ue=Ne("^"+Ie.call(Me).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=mt?ke.Buffer:e,je=ke.Symbol,Ge=ke.Uint8Array,He=ze?ze.allocUnsafe:e,Ke=io($e.getPrototypeOf,$e),Xe=$e.create,Qe=Fe.propertyIsEnumerable,it=De.splice,rt=je?je.isConcatSpreadable:e,st=je?je.iterator:e,ut=je?je.toStringTag:e,ct=function(){try{var e=pl($e,"defineProperty");return e({},"",{}),e}catch(t){}}(),pt=ke.clearTimeout!==dt.clearTimeout&&ke.clearTimeout,ft=_e&&_e.now!==dt.Date.now&&_e.now,Ot=ke.setTimeout!==dt.setTimeout&&ke.setTimeout,Ut=Ve.ceil,po=Ve.floor,fo=$e.getOwnPropertySymbols,ho=ze?ze.isBuffer:e,vo=ke.isFinite,go=De.join,yo=io($e.keys,$e),bo=Ve.max,ko=Ve.min,wo=_e.now,Co=ke.parseInt,_o=Ve.random,xo=De.reverse,So=pl(ke,"DataView"),Vo=pl(ke,"Map"),$o=pl(ke,"Promise"),No=pl(ke,"Set"),Eo=pl(ke,"WeakMap"),Bo=pl($e,"create"),Do=Eo&&new Eo,To={},Fo=zl(So),Oo=zl(Vo),Io=zl($o),Mo=zl(No),Po=zl(Eo),Lo=je?je.prototype:e,Ao=Lo?Lo.valueOf:e,Ro=Lo?Lo.toString:e;function Wo(e){if(ar(e)&&!Ya(e)&&!(e instanceof Go)){if(e instanceof jo)return e;if(Me.call(e,"__wrapped__"))return jl(e)}return new jo(e)}var Uo=function(){function t(){}return function(o){if(!lr(o))return{};if(Xe)return Xe(o);t.prototype=o;var n=new t;return t.prototype=e,n}}();function zo(){}function jo(t,o){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=e}function Go(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Ho(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t=o?t:o)),t}function un(t,o,n,i,l,a){var r,s=1&o,d=2&o,u=4&o;if(n&&(r=l?n(t,i,l,a):n(t)),r!==e)return r;if(!lr(t))return t;var c=Ya(t);if(c){if(r=function(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(o.index=e.index,o.input=e.input),o}(t),!s)return Di(t,r)}else{var m=vl(t),p=m==b||m==k;if(Za(t))return Si(t,s);if(m==_||m==f||p&&!l){if(r=d||p?{}:yl(t),!s)return d?function(e,t){return Ti(e,hl(e),t)}(t,function(e,t){return e&&Ti(t,Pr(t),e)}(r,t)):function(e,t){return Ti(e,fl(e),t)}(t,an(r,t))}else{if(!nt[m])return l?t:{};r=function(e,t,o){var n,i=e.constructor;switch(t){case B:return Vi(e);case v:case g:return new i(+e);case D:return function(e,t){var o=t?Vi(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}(e,o);case T:case F:case O:case I:case M:case P:case L:case A:case R:return $i(e,o);case w:return new i;case C:case $:return new i(e);case S:return function(e){var t=new e.constructor(e.source,ce.exec(e));return t.lastIndex=e.lastIndex,t}(e);case V:return new i;case N:return n=e,Ao?$e(Ao.call(n)):{}}}(t,m,s)}}a||(a=new Xo);var h=a.get(t);if(h)return h;a.set(t,r),cr(t)?t.forEach((function(e){r.add(un(e,o,n,e,t,a))})):rr(t)&&t.forEach((function(e,i){r.set(i,un(e,o,n,i,t,a))}));var y=c?e:(u?d?al:ll:d?Pr:Mr)(t);return _t(y||t,(function(e,i){y&&(e=t[i=e]),on(r,i,un(e,o,n,i,t,a))})),r}function cn(t,o,n){var i=n.length;if(null==t)return!i;for(t=$e(t);i--;){var l=n[i],a=o[l],r=t[l];if(r===e&&!(l in t)||!a(r))return!1}return!0}function mn(o,n,i){if("function"!=typeof o)throw new Be(t);return Fl((function(){o.apply(e,i)}),n)}function pn(e,t,o,n){var i=-1,l=$t,a=!0,r=e.length,s=[],d=t.length;if(!r)return s;o&&(t=Et(t,Kt(o))),n?(l=Nt,a=!1):t.length>=200&&(l=Yt,a=!1,t=new Yo(t));e:for(;++i-1},Ko.prototype.set=function(e,t){var o=this.__data__,n=nn(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this},qo.prototype.clear=function(){this.size=0,this.__data__={hash:new Ho,map:new(Vo||Ko),string:new Ho}},qo.prototype.delete=function(e){var t=cl(this,e).delete(e);return this.size-=t?1:0,t},qo.prototype.get=function(e){return cl(this,e).get(e)},qo.prototype.has=function(e){return cl(this,e).has(e)},qo.prototype.set=function(e,t){var o=cl(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this},Yo.prototype.add=Yo.prototype.push=function(e){return this.__data__.set(e,o),this},Yo.prototype.has=function(e){return this.__data__.has(e)},Xo.prototype.clear=function(){this.__data__=new Ko,this.size=0},Xo.prototype.delete=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o},Xo.prototype.get=function(e){return this.__data__.get(e)},Xo.prototype.has=function(e){return this.__data__.has(e)},Xo.prototype.set=function(e,t){var o=this.__data__;if(o instanceof Ko){var n=o.__data__;if(!Vo||n.length<199)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new qo(n)}return o.set(e,t),this.size=o.size,this};var fn=Ii(Cn),hn=Ii(_n,!0);function vn(e,t){var o=!0;return fn(e,(function(e,n,i){return o=!!t(e,n,i)})),o}function gn(t,o,n){for(var i=-1,l=t.length;++i0&&o(r)?t>1?bn(r,t-1,o,n,i):Bt(i,r):n||(i[i.length]=r)}return i}var kn=Mi(),wn=Mi(!0);function Cn(e,t){return e&&kn(e,t,Mr)}function _n(e,t){return e&&wn(e,t,Mr)}function xn(e,t){return Vt(t,(function(t){return or(e[t])}))}function Sn(t,o){for(var n=0,i=(o=wi(o,t)).length;null!=t&&nt}function En(e,t){return null!=e&&Me.call(e,t)}function Bn(e,t){return null!=e&&t in $e(e)}function Dn(t,o,n){for(var i=n?Nt:$t,l=t[0].length,a=t.length,r=a,s=Ce(a),d=1/0,u=[];r--;){var c=t[r];r&&o&&(c=Et(c,Kt(o))),d=ko(c.length,d),s[r]=!n&&(o||l>=120&&c.length>=120)?new Yo(r&&c):e}c=t[0];var m=-1,p=s[0];e:for(;++m=r?s:s*("desc"==o[n]?-1:1)}return e.index-t.index}(e,t,o)}))}function Kn(e,t,o){for(var n=-1,i=t.length,l={};++n-1;)r!==e&&it.call(r,s,1),it.call(e,s,1);return e}function Yn(e,t){for(var o=e?t.length:0,n=o-1;o--;){var i=t[o];if(o==n||i!==l){var l=i;kl(i)?it.call(e,i,1):pi(e,i)}}return e}function Xn(e,t){return e+po(_o()*(t-e+1))}function Jn(e,t){var o="";if(!e||t<1||t>u)return o;do{t%2&&(o+=e),(t=po(t/2))&&(e+=e)}while(t);return o}function Qn(e,t){return Ol(Nl(e,t,ss),e+"")}function Zn(e){return Qo(Gr(e))}function ei(e,t){var o=Gr(e);return Pl(o,dn(t,0,o.length))}function ti(t,o,n,i){if(!lr(t))return t;for(var l=-1,a=(o=wi(o,t)).length,r=a-1,s=t;null!=s&&++li?0:i+t),(o=o>i?i:o)<0&&(o+=i),i=t>o?0:o-t>>>0,t>>>=0;for(var l=Ce(i);++n>>1,a=e[l];null!==a&&!pr(a)&&(o?a<=t:a=200){var d=t?null:Ji(e);if(d)return ao(d);a=!1,i=Yt,s=new Yo}else s=t?[]:r;e:for(;++n=i?t:li(t,o,n)}var xi=pt||function(e){return dt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var o=e.length,n=He?He(o):new e.constructor(o);return e.copy(n),n}function Vi(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function $i(e,t){var o=t?Vi(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Ni(t,o){if(t!==o){var n=t!==e,i=null===t,l=t==t,a=pr(t),r=o!==e,s=null===o,d=o==o,u=pr(o);if(!s&&!u&&!a&&t>o||a&&r&&d&&!s&&!u||i&&r&&d||!n&&d||!l)return 1;if(!i&&!a&&!u&&t1?n[l-1]:e,r=l>2?n[2]:e;for(a=t.length>3&&"function"==typeof a?(l--,a):e,r&&wl(n[0],n[1],r)&&(a=l<3?e:a,l=1),o=$e(o);++i-1?l[a?o[r]:r]:e}}function Wi(o){return il((function(n){var i=n.length,l=i,a=jo.prototype.thru;for(o&&n.reverse();l--;){var r=n[l];if("function"!=typeof r)throw new Be(t);if(a&&!s&&"wrapper"==sl(r))var s=new jo([],!0)}for(l=s?l:i;++l1&&y.reverse(),m&&us))return!1;var u=a.get(t),c=a.get(o);if(u&&c)return u==o&&c==t;var m=-1,p=!0,f=2&n?new Yo:e;for(a.set(t,o),a.set(o,t);++m-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(o>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return _t(p,(function(o){var n="_."+o[0];t&o[1]&&!$t(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ae):[]}(n),o)))}function Ml(t){var o=0,n=0;return function(){var i=wo(),l=16-(i-n);if(n=i,l>0){if(++o>=800)return arguments[0]}else o=0;return t.apply(e,arguments)}}function Pl(t,o){var n=-1,i=t.length,l=i-1;for(o=o===e?i:o;++n1?t[o-1]:e;return n="function"==typeof n?(t.pop(),n):e,ua(t,n)}));function ga(e){var t=Wo(e);return t.__chain__=!0,t}function ya(e,t){return t(e)}var ba=il((function(t){var o=t.length,n=o?t[0]:0,i=this.__wrapped__,l=function(e){return sn(e,t)};return!(o>1||this.__actions__.length)&&i instanceof Go&&kl(n)?((i=i.slice(n,+n+(o?1:0))).__actions__.push({func:ya,args:[l],thisArg:e}),new jo(i,this.__chain__).thru((function(t){return o&&!t.length&&t.push(e),t}))):this.thru(l)})),ka=Fi((function(e,t,o){Me.call(e,o)?++e[o]:rn(e,o,1)})),wa=Ri(ql),Ca=Ri(Yl);function _a(e,t){return(Ya(e)?_t:fn)(e,ul(t,3))}function xa(e,t){return(Ya(e)?xt:hn)(e,ul(t,3))}var Sa=Fi((function(e,t,o){Me.call(e,o)?e[o].push(t):rn(e,o,[t])})),Va=Qn((function(e,t,o){var n=-1,i="function"==typeof t,l=Ja(e)?Ce(e.length):[];return fn(e,(function(e){l[++n]=i?wt(t,e,o):Tn(e,t,o)})),l})),$a=Fi((function(e,t,o){rn(e,o,t)}));function Na(e,t){return(Ya(e)?Et:Wn)(e,ul(t,3))}var Ea=Fi((function(e,t,o){e[o?0:1].push(t)}),(function(){return[[],[]]})),Ba=Qn((function(e,t){if(null==e)return[];var o=t.length;return o>1&&wl(e,t[0],t[1])?t=[]:o>2&&wl(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,bn(t,1),[])})),Da=ft||function(){return dt.Date.now()};function Ta(t,o,n){return o=n?e:o,o=t&&null==o?t.length:o,Zi(t,r,e,e,e,e,o)}function Fa(o,n){var i;if("function"!=typeof n)throw new Be(t);return o=br(o),function(){return--o>0&&(i=n.apply(this,arguments)),o<=1&&(n=e),i}}var Oa=Qn((function(e,t,o){var n=1;if(o.length){var i=lo(o,dl(Oa));n|=l}return Zi(e,n,t,o,i)})),Ia=Qn((function(e,t,o){var n=3;if(o.length){var i=lo(o,dl(Ia));n|=l}return Zi(t,n,e,o,i)}));function Ma(o,n,i){var l,a,r,s,d,u,c=0,m=!1,p=!1,f=!0;if("function"!=typeof o)throw new Be(t);function h(t){var n=l,i=a;return l=a=e,c=t,s=o.apply(i,n)}function v(e){return c=e,d=Fl(y,n),m?h(e):s}function g(t){var o=t-u;return u===e||o>=n||o<0||p&&t-c>=r}function y(){var e=Da();if(g(e))return b(e);d=Fl(y,function(e){var t=n-(e-u);return p?ko(t,r-(e-c)):t}(e))}function b(t){return d=e,f&&l?h(t):(l=a=e,s)}function k(){var t=Da(),o=g(t);if(l=arguments,a=this,u=t,o){if(d===e)return v(u);if(p)return xi(d),d=Fl(y,n),h(u)}return d===e&&(d=Fl(y,n)),s}return n=wr(n)||0,lr(i)&&(m=!!i.leading,r=(p="maxWait"in i)?bo(wr(i.maxWait)||0,n):r,f="trailing"in i?!!i.trailing:f),k.cancel=function(){d!==e&&xi(d),c=0,l=u=a=d=e},k.flush=function(){return d===e?s:b(Da())},k}var Pa=Qn((function(e,t){return mn(e,1,t)})),La=Qn((function(e,t,o){return mn(e,wr(t)||0,o)}));function Aa(e,o){if("function"!=typeof e||null!=o&&"function"!=typeof o)throw new Be(t);var n=function(){var t=arguments,i=o?o.apply(this,t):t[0],l=n.cache;if(l.has(i))return l.get(i);var a=e.apply(this,t);return n.cache=l.set(i,a)||l,a};return n.cache=new(Aa.Cache||qo),n}function Ra(e){if("function"!=typeof e)throw new Be(t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Aa.Cache=qo;var Wa=Ci((function(e,t){var o=(t=1==t.length&&Ya(t[0])?Et(t[0],Kt(ul())):Et(bn(t,1),Kt(ul()))).length;return Qn((function(n){for(var i=-1,l=ko(n.length,o);++i=t})),qa=Fn(function(){return arguments}())?Fn:function(e){return ar(e)&&Me.call(e,"callee")&&!Qe.call(e,"callee")},Ya=Ce.isArray,Xa=ht?Kt(ht):function(e){return ar(e)&&$n(e)==B};function Ja(e){return null!=e&&ir(e.length)&&!or(e)}function Qa(e){return ar(e)&&Ja(e)}var Za=ho||ws,er=vt?Kt(vt):function(e){return ar(e)&&$n(e)==g};function tr(e){if(!ar(e))return!1;var t=$n(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!dr(e)}function or(e){if(!lr(e))return!1;var t=$n(e);return t==b||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function nr(e){return"number"==typeof e&&e==br(e)}function ir(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}function lr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ar(e){return null!=e&&"object"==typeof e}var rr=gt?Kt(gt):function(e){return ar(e)&&vl(e)==w};function sr(e){return"number"==typeof e||ar(e)&&$n(e)==C}function dr(e){if(!ar(e)||$n(e)!=_)return!1;var t=Ke(e);if(null===t)return!0;var o=Me.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&Ie.call(o)==Re}var ur=yt?Kt(yt):function(e){return ar(e)&&$n(e)==S},cr=bt?Kt(bt):function(e){return ar(e)&&vl(e)==V};function mr(e){return"string"==typeof e||!Ya(e)&&ar(e)&&$n(e)==$}function pr(e){return"symbol"==typeof e||ar(e)&&$n(e)==N}var fr=kt?Kt(kt):function(e){return ar(e)&&ir(e.length)&&!!ot[$n(e)]},hr=qi(Rn),vr=qi((function(e,t){return e<=t}));function gr(e){if(!e)return[];if(Ja(e))return mr(e)?so(e):Di(e);if(st&&e[st])return function(e){for(var t,o=[];!(t=e.next()).done;)o.push(t.value);return o}(e[st]());var t=vl(e);return(t==w?no:t==V?ao:Gr)(e)}function yr(e){return e?(e=wr(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function br(e){var t=yr(e),o=t%1;return t==t?o?t-o:t:0}function kr(e){return e?dn(br(e),0,m):0}function wr(e){if("number"==typeof e)return e;if(pr(e))return c;if(lr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=lr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var o=pe.test(e);return o||he.test(e)?at(e.slice(2),o?2:8):me.test(e)?c:+e}function Cr(e){return Ti(e,Pr(e))}function _r(e){return null==e?"":ci(e)}var xr=Oi((function(e,t){if(Sl(t)||Ja(t))Ti(t,Mr(t),e);else for(var o in t)Me.call(t,o)&&on(e,o,t[o])})),Sr=Oi((function(e,t){Ti(t,Pr(t),e)})),Vr=Oi((function(e,t,o,n){Ti(t,Pr(t),e,n)})),$r=Oi((function(e,t,o,n){Ti(t,Mr(t),e,n)})),Nr=il(sn),Er=Qn((function(t,o){t=$e(t);var n=-1,i=o.length,l=i>2?o[2]:e;for(l&&wl(o[0],o[1],l)&&(i=1);++n1),t})),Ti(e,al(e),o),n&&(o=un(o,7,ol));for(var i=t.length;i--;)pi(o,t[i]);return o})),Wr=il((function(e,t){return null==e?{}:function(e,t){return Kn(e,t,(function(t,o){return Tr(e,o)}))}(e,t)}));function Ur(e,t){if(null==e)return{};var o=Et(al(e),(function(e){return[e]}));return t=ul(t),Kn(e,o,(function(e,o){return t(e,o[0])}))}var zr=Qi(Mr),jr=Qi(Pr);function Gr(e){return null==e?[]:qt(e,Mr(e))}var Hr=Li((function(e,t,o){return t=t.toLowerCase(),e+(o?Kr(t):t)}));function Kr(e){return ts(_r(e).toLowerCase())}function qr(e){return(e=_r(e))&&e.replace(ge,Zt).replace(Ye,"")}var Yr=Li((function(e,t,o){return e+(o?"-":"")+t.toLowerCase()})),Xr=Li((function(e,t,o){return e+(o?" ":"")+t.toLowerCase()})),Jr=Pi("toLowerCase"),Qr=Li((function(e,t,o){return e+(o?"_":"")+t.toLowerCase()})),Zr=Li((function(e,t,o){return e+(o?" ":"")+ts(t)})),es=Li((function(e,t,o){return e+(o?" ":"")+t.toUpperCase()})),ts=Pi("toUpperCase");function os(t,o,n){return t=_r(t),(o=n?e:o)===e?function(e){return Ze.test(e)}(t)?function(e){return e.match(Je)||[]}(t):function(e){return e.match(re)||[]}(t):t.match(o)||[]}var ns=Qn((function(t,o){try{return wt(t,e,o)}catch(n){return tr(n)?n:new xe(n)}})),is=il((function(e,t){return _t(t,(function(t){t=Ul(t),rn(e,t,Oa(e[t],e))})),e}));function ls(e){return function(){return e}}var as=Wi(),rs=Wi(!0);function ss(e){return e}function ds(e){return Pn("function"==typeof e?e:un(e,1))}var us=Qn((function(e,t){return function(o){return Tn(o,e,t)}})),cs=Qn((function(e,t){return function(o){return Tn(e,o,t)}}));function ms(e,t,o){var n=Mr(t),i=xn(t,n);null!=o||lr(t)&&(i.length||!n.length)||(o=t,t=e,e=this,i=xn(t,Mr(t)));var l=!(lr(o)&&"chain"in o&&!o.chain),a=or(e);return _t(i,(function(o){var n=t[o];e[o]=n,a&&(e.prototype[o]=function(){var t=this.__chain__;if(l||t){var o=e(this.__wrapped__),i=o.__actions__=Di(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),o.__chain__=t,o}return n.apply(e,Bt([this.value()],arguments))})})),e}function ps(){}var fs=Gi(Et),hs=Gi(St),vs=Gi(Ft);function gs(e){return Cl(e)?Wt(Ul(e)):function(e){return function(t){return Sn(t,e)}}(e)}var ys=Ki(),bs=Ki(!0);function ks(){return[]}function ws(){return!1}var Cs,_s=ji((function(e,t){return e+t}),0),xs=Xi("ceil"),Ss=ji((function(e,t){return e/t}),1),Vs=Xi("floor"),$s=ji((function(e,t){return e*t}),1),Ns=Xi("round"),Es=ji((function(e,t){return e-t}),0);return Wo.after=function(e,o){if("function"!=typeof o)throw new Be(t);return e=br(e),function(){if(--e<1)return o.apply(this,arguments)}},Wo.ary=Ta,Wo.assign=xr,Wo.assignIn=Sr,Wo.assignInWith=Vr,Wo.assignWith=$r,Wo.at=Nr,Wo.before=Fa,Wo.bind=Oa,Wo.bindAll=is,Wo.bindKey=Ia,Wo.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ya(e)?e:[e]},Wo.chain=ga,Wo.chunk=function(t,o,n){o=(n?wl(t,o,n):o===e)?1:bo(br(o),0);var i=null==t?0:t.length;if(!i||o<1)return[];for(var l=0,a=0,r=Ce(Ut(i/o));ll?0:l+n),(i=i===e||i>l?l:br(i))<0&&(i+=l),i=n>i?0:kr(i);n>>0)?(t=_r(t))&&("string"==typeof o||null!=o&&!ur(o))&&!(o=ci(o))&&oo(t)?_i(so(t),0,n):t.split(o,n):[]},Wo.spread=function(e,o){if("function"!=typeof e)throw new Be(t);return o=null==o?0:bo(br(o),0),Qn((function(t){var n=t[o],i=_i(t,0,o);return n&&Bt(i,n),wt(e,this,i)}))},Wo.tail=function(e){var t=null==e?0:e.length;return t?li(e,1,t):[]},Wo.take=function(t,o,n){return t&&t.length?li(t,0,(o=n||o===e?1:br(o))<0?0:o):[]},Wo.takeRight=function(t,o,n){var i=null==t?0:t.length;return i?li(t,(o=i-(o=n||o===e?1:br(o)))<0?0:o,i):[]},Wo.takeRightWhile=function(e,t){return e&&e.length?hi(e,ul(t,3),!1,!0):[]},Wo.takeWhile=function(e,t){return e&&e.length?hi(e,ul(t,3)):[]},Wo.tap=function(e,t){return t(e),e},Wo.throttle=function(e,o,n){var i=!0,l=!0;if("function"!=typeof e)throw new Be(t);return lr(n)&&(i="leading"in n?!!n.leading:i,l="trailing"in n?!!n.trailing:l),Ma(e,o,{leading:i,maxWait:o,trailing:l})},Wo.thru=ya,Wo.toArray=gr,Wo.toPairs=zr,Wo.toPairsIn=jr,Wo.toPath=function(e){return Ya(e)?Et(e,Ul):pr(e)?[e]:Di(Wl(_r(e)))},Wo.toPlainObject=Cr,Wo.transform=function(e,t,o){var n=Ya(e),i=n||Za(e)||fr(e);if(t=ul(t,4),null==o){var l=e&&e.constructor;o=i?n?new l:[]:lr(e)&&or(l)?Uo(Ke(e)):{}}return(i?_t:Cn)(e,(function(e,n,i){return t(o,e,n,i)})),o},Wo.unary=function(e){return Ta(e,1)},Wo.union=aa,Wo.unionBy=ra,Wo.unionWith=sa,Wo.uniq=function(e){return e&&e.length?mi(e):[]},Wo.uniqBy=function(e,t){return e&&e.length?mi(e,ul(t,2)):[]},Wo.uniqWith=function(t,o){return o="function"==typeof o?o:e,t&&t.length?mi(t,e,o):[]},Wo.unset=function(e,t){return null==e||pi(e,t)},Wo.unzip=da,Wo.unzipWith=ua,Wo.update=function(e,t,o){return null==e?e:fi(e,t,ki(o))},Wo.updateWith=function(t,o,n,i){return i="function"==typeof i?i:e,null==t?t:fi(t,o,ki(n),i)},Wo.values=Gr,Wo.valuesIn=function(e){return null==e?[]:qt(e,Pr(e))},Wo.without=ca,Wo.words=os,Wo.wrap=function(e,t){return Ua(ki(t),e)},Wo.xor=ma,Wo.xorBy=pa,Wo.xorWith=fa,Wo.zip=ha,Wo.zipObject=function(e,t){return yi(e||[],t||[],on)},Wo.zipObjectDeep=function(e,t){return yi(e||[],t||[],ti)},Wo.zipWith=va,Wo.entries=zr,Wo.entriesIn=jr,Wo.extend=Sr,Wo.extendWith=Vr,ms(Wo,Wo),Wo.add=_s,Wo.attempt=ns,Wo.camelCase=Hr,Wo.capitalize=Kr,Wo.ceil=xs,Wo.clamp=function(t,o,n){return n===e&&(n=o,o=e),n!==e&&(n=(n=wr(n))==n?n:0),o!==e&&(o=(o=wr(o))==o?o:0),dn(wr(t),o,n)},Wo.clone=function(e){return un(e,4)},Wo.cloneDeep=function(e){return un(e,5)},Wo.cloneDeepWith=function(t,o){return un(t,5,o="function"==typeof o?o:e)},Wo.cloneWith=function(t,o){return un(t,4,o="function"==typeof o?o:e)},Wo.conformsTo=function(e,t){return null==t||cn(e,t,Mr(t))},Wo.deburr=qr,Wo.defaultTo=function(e,t){return null==e||e!=e?t:e},Wo.divide=Ss,Wo.endsWith=function(t,o,n){t=_r(t),o=ci(o);var i=t.length,l=n=n===e?i:dn(br(n),0,i);return(n-=o.length)>=0&&t.slice(n,l)==o},Wo.eq=Ga,Wo.escape=function(e){return(e=_r(e))&&K.test(e)?e.replace(G,eo):e},Wo.escapeRegExp=function(e){return(e=_r(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Wo.every=function(t,o,n){var i=Ya(t)?St:vn;return n&&wl(t,o,n)&&(o=e),i(t,ul(o,3))},Wo.find=wa,Wo.findIndex=ql,Wo.findKey=function(e,t){return It(e,ul(t,3),Cn)},Wo.findLast=Ca,Wo.findLastIndex=Yl,Wo.findLastKey=function(e,t){return It(e,ul(t,3),_n)},Wo.floor=Vs,Wo.forEach=_a,Wo.forEachRight=xa,Wo.forIn=function(e,t){return null==e?e:kn(e,ul(t,3),Pr)},Wo.forInRight=function(e,t){return null==e?e:wn(e,ul(t,3),Pr)},Wo.forOwn=function(e,t){return e&&Cn(e,ul(t,3))},Wo.forOwnRight=function(e,t){return e&&_n(e,ul(t,3))},Wo.get=Dr,Wo.gt=Ha,Wo.gte=Ka,Wo.has=function(e,t){return null!=e&&gl(e,t,En)},Wo.hasIn=Tr,Wo.head=Jl,Wo.identity=ss,Wo.includes=function(e,t,o,n){e=Ja(e)?e:Gr(e),o=o&&!n?br(o):0;var i=e.length;return o<0&&(o=bo(i+o,0)),mr(e)?o<=i&&e.indexOf(t,o)>-1:!!i&&Pt(e,t,o)>-1},Wo.indexOf=function(e,t,o){var n=null==e?0:e.length;if(!n)return-1;var i=null==o?0:br(o);return i<0&&(i=bo(n+i,0)),Pt(e,t,i)},Wo.inRange=function(t,o,n){return o=yr(o),n===e?(n=o,o=0):n=yr(n),function(e,t,o){return e>=ko(t,o)&&e=-9007199254740991&&e<=u},Wo.isSet=cr,Wo.isString=mr,Wo.isSymbol=pr,Wo.isTypedArray=fr,Wo.isUndefined=function(t){return t===e},Wo.isWeakMap=function(e){return ar(e)&&vl(e)==E},Wo.isWeakSet=function(e){return ar(e)&&"[object WeakSet]"==$n(e)},Wo.join=function(e,t){return null==e?"":go.call(e,t)},Wo.kebabCase=Yr,Wo.last=ta,Wo.lastIndexOf=function(t,o,n){var i=null==t?0:t.length;if(!i)return-1;var l=i;return n!==e&&(l=(l=br(n))<0?bo(i+l,0):ko(l,i-1)),o==o?function(e,t,o){for(var n=o+1;n--;)if(e[n]===t)return n;return n}(t,o,l):Mt(t,At,l,!0)},Wo.lowerCase=Xr,Wo.lowerFirst=Jr,Wo.lt=hr,Wo.lte=vr,Wo.max=function(t){return t&&t.length?gn(t,ss,Nn):e},Wo.maxBy=function(t,o){return t&&t.length?gn(t,ul(o,2),Nn):e},Wo.mean=function(e){return Rt(e,ss)},Wo.meanBy=function(e,t){return Rt(e,ul(t,2))},Wo.min=function(t){return t&&t.length?gn(t,ss,Rn):e},Wo.minBy=function(t,o){return t&&t.length?gn(t,ul(o,2),Rn):e},Wo.stubArray=ks,Wo.stubFalse=ws,Wo.stubObject=function(){return{}},Wo.stubString=function(){return""},Wo.stubTrue=function(){return!0},Wo.multiply=$s,Wo.nth=function(t,o){return t&&t.length?Gn(t,br(o)):e},Wo.noConflict=function(){return dt._===this&&(dt._=We),this},Wo.noop=ps,Wo.now=Da,Wo.pad=function(e,t,o){e=_r(e);var n=(t=br(t))?ro(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Hi(po(i),o)+e+Hi(Ut(i),o)},Wo.padEnd=function(e,t,o){e=_r(e);var n=(t=br(t))?ro(e):0;return t&&no){var i=t;t=o,o=i}if(n||t%1||o%1){var l=_o();return ko(t+l*(o-t+lt("1e-"+((l+"").length-1))),o)}return Xn(t,o)},Wo.reduce=function(e,t,o){var n=Ya(e)?Dt:zt,i=arguments.length<3;return n(e,ul(t,4),o,i,fn)},Wo.reduceRight=function(e,t,o){var n=Ya(e)?Tt:zt,i=arguments.length<3;return n(e,ul(t,4),o,i,hn)},Wo.repeat=function(t,o,n){return o=(n?wl(t,o,n):o===e)?1:br(o),Jn(_r(t),o)},Wo.replace=function(){var e=arguments,t=_r(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Wo.result=function(t,o,n){var i=-1,l=(o=wi(o,t)).length;for(l||(l=1,t=e);++iu)return[];var o=m,n=ko(e,m);t=ul(t),e-=m;for(var i=Gt(n,t);++o=a)return t;var s=n-ro(i);if(s<1)return i;var d=r?_i(r,0,s).join(""):t.slice(0,s);if(l===e)return d+i;if(r&&(s+=d.length-s),ur(l)){if(t.slice(s).search(l)){var u,c=d;for(l.global||(l=Ne(l.source,_r(ce.exec(l))+"g")),l.lastIndex=0;u=l.exec(c);)var m=u.index;d=d.slice(0,m===e?s:m)}}else if(t.indexOf(ci(l),s)!=s){var p=d.lastIndexOf(l);p>-1&&(d=d.slice(0,p))}return d+i},Wo.unescape=function(e){return(e=_r(e))&&H.test(e)?e.replace(j,co):e},Wo.uniqueId=function(e){var t=++Pe;return _r(e)+t},Wo.upperCase=es,Wo.upperFirst=ts,Wo.each=_a,Wo.eachRight=xa,Wo.first=Jl,ms(Wo,(Cs={},Cn(Wo,(function(e,t){Me.call(Wo.prototype,t)||(Cs[t]=e)})),Cs),{chain:!1}),Wo.VERSION="4.17.21",_t(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Wo[e].placeholder=Wo})),_t(["drop","take"],(function(t,o){Go.prototype[t]=function(n){n=n===e?1:bo(br(n),0);var i=this.__filtered__&&!o?new Go(this):this.clone();return i.__filtered__?i.__takeCount__=ko(n,i.__takeCount__):i.__views__.push({size:ko(n,m),type:t+(i.__dir__<0?"Right":"")}),i},Go.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),_t(["filter","map","takeWhile"],(function(e,t){var o=t+1,n=1==o||3==o;Go.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ul(e,3),type:o}),t.__filtered__=t.__filtered__||n,t}})),_t(["head","last"],(function(e,t){var o="take"+(t?"Right":"");Go.prototype[e]=function(){return this[o](1).value()[0]}})),_t(["initial","tail"],(function(e,t){var o="drop"+(t?"":"Right");Go.prototype[e]=function(){return this.__filtered__?new Go(this):this[o](1)}})),Go.prototype.compact=function(){return this.filter(ss)},Go.prototype.find=function(e){return this.filter(e).head()},Go.prototype.findLast=function(e){return this.reverse().find(e)},Go.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new Go(this):this.map((function(o){return Tn(o,e,t)}))})),Go.prototype.reject=function(e){return this.filter(Ra(ul(e)))},Go.prototype.slice=function(t,o){t=br(t);var n=this;return n.__filtered__&&(t>0||o<0)?new Go(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),o!==e&&(n=(o=br(o))<0?n.dropRight(-o):n.take(o-t)),n)},Go.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Go.prototype.toArray=function(){return this.take(m)},Cn(Go.prototype,(function(t,o){var n=/^(?:filter|find|map|reject)|While$/.test(o),i=/^(?:head|last)$/.test(o),l=Wo[i?"take"+("last"==o?"Right":""):o],a=i||/^find/.test(o);l&&(Wo.prototype[o]=function(){var o=this.__wrapped__,r=i?[1]:arguments,s=o instanceof Go,d=r[0],u=s||Ya(o),c=function(e){var t=l.apply(Wo,Bt([e],r));return i&&m?t[0]:t};u&&n&&"function"==typeof d&&1!=d.length&&(s=u=!1);var m=this.__chain__,p=!!this.__actions__.length,f=a&&!m,h=s&&!p;if(!a&&u){o=h?o:new Go(this);var v=t.apply(o,r);return v.__actions__.push({func:ya,args:[c],thisArg:e}),new jo(v,m)}return f&&h?t.apply(this,r):(v=this.thru(c),f?i?v.value()[0]:v.value():v)})})),_t(["pop","push","shift","sort","splice","unshift"],(function(e){var t=De[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Wo.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ya(i)?i:[],e)}return this[o]((function(o){return t.apply(Ya(o)?o:[],e)}))}})),Cn(Go.prototype,(function(e,t){var o=Wo[t];if(o){var n=o.name+"";Me.call(To,n)||(To[n]=[]),To[n].push({name:t,func:o})}})),To[Ui(e,2).name]=[{name:"wrapper",func:e}],Go.prototype.clone=function(){var e=new Go(this.__wrapped__);return e.__actions__=Di(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Di(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Di(this.__views__),e},Go.prototype.reverse=function(){if(this.__filtered__){var e=new Go(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Go.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,o=Ya(e),n=t<0,i=o?e.length:0,l=function(e,t,o){for(var n=-1,i=o.length;++n=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Wo.prototype.plant=function(t){for(var o,n=this;n instanceof zo;){var i=jl(n);i.__index__=0,i.__values__=e,o?l.__wrapped__=i:o=i;var l=i;n=n.__wrapped__}return l.__wrapped__=t,o},Wo.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Go){var o=t;return this.__actions__.length&&(o=new Go(this)),(o=o.reverse()).__actions__.push({func:ya,args:[la],thisArg:e}),new jo(o,this.__chain__)}return this.thru(la)},Wo.prototype.toJSON=Wo.prototype.valueOf=Wo.prototype.value=function(){return vi(this.__wrapped__,this.__actions__)},Wo.prototype.first=Wo.prototype.head,st&&(Wo.prototype[st]=function(){return this}),Wo}();ct?((ct.exports=mo)._=mo,ut._=mo):dt._=mo}.call(commonjsGlobal);var _=lodash.exports;const isExpression=e=>/^\s*{{[\s\S]*?}}\s*$/.test(e),extractExpression=e=>{const t=/^\s*{{([\s\S]*?)}}\s*$/.exec(e);return t?t[1]:""},executeExpression=(e,t,o)=>{try{return o?Function("args",`return ${e}`).bind(o)(t):Function("args",`return ${e}`)(t)}catch(n){return null}};var index_vue_vue_type_style_index_0_lang$9="";const _sfc_main$1F={components:{GenerateElementItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return GenerateElementItem$4}))))},props:["columns","showControl","paging","pageSize","currentPage","displayFields","group","widget"],data(){return{scrollLeft:0,tableData:_.cloneDeep(this.data)}},emits:["remove-row","table-change","table-item-change"],inject:["dynamicHideFields","formContext"],mounted(){this.$refs.bodyWrapper.addEventListener("scroll",this.handleScroll)},beforeUnmount(){this.$refs.bodyWrapper.removeEventListener("scroll",this.handleScroll)},computed:{rowWidthCalc(){let e=this.showControl?"50px":"0";return this.widget.options.selection&&(e+=" + 50px"),this.columns.forEach((t=>{this.displayFields[t.model]&&(e+=" + "+(t.options.width||"200px"))})),e},rowLeftWidthCalc(){let e=this.widget.options.selection?"50px":"0px";return this.columns.forEach((t=>{this.displayFields[t.model]&&t.options.fixedColumn&&"right"!=t.options.fixedColumnPosition&&(e+=" + "+(t.options.width||"200px"))})),e},rowRightWidthCalc(){let e="0px";return this.columns.forEach((t=>{this.displayFields[t.model]&&t.options.fixedColumn&&"right"==t.options.fixedColumnPosition&&(e+=" + "+(t.options.width||"200px"))})),e}},methods:{handleScroll({scrollLeft:e,scrollTop:t}){this.scrollLeft=this.$refs.bodyWrapper.scrollLeft},columnDisplay(e,t){let o=this.group?`${this.group}.${this.widget.model}.${e}`:`${this.widget.model}.${e}`;return null!=this.dynamicHideFields[o]?!this.dynamicHideFields[o]:"boolean"==typeof t.options.hidden?!t.options.hidden:!isExpression(t.options.hidden)||!executeExpression(extractExpression(t.options.hidden),{},this.formContext)}}},_hoisted_1$16={class:"fm-virtual-table"},_hoisted_2$Z={role:"table",class:"fm-virtual-table-main"},_hoisted_3$M={class:"fm-virtual-table__body"},_hoisted_4$H={class:"fm-virtual-table__body-wrapper",ref:"bodyWrapper"},_hoisted_5$E={class:"fm-virtual-table__header"},_hoisted_6$q={class:"fm-virtual-table__header-content"},_hoisted_7$m={key:0,class:"fm-virtual-table__header-cell",style:{width:"50px"}},_hoisted_8$g=["title"],_hoisted_9$e={role:"table",class:"fm-virtual-table-main fm-virtual-table-main__left"},_hoisted_10$c={class:"fm-virtual-table__body"},_hoisted_11$6={class:"fm-virtual-table__header"},_hoisted_12$5={class:"fm-virtual-table__header-content"},_hoisted_13$3={class:"fm-virtual-table__header-row"},_hoisted_14$2={key:0,class:"fm-virtual-table__header-cell",style:{width:"50px"}},_hoisted_15$2={class:"fm-virtual-table__header-cell-text",title:"Column"},_hoisted_16$1={key:1,class:"fm-virtual-table__header-cell",style:{width:"50px"}},_hoisted_17$1=["title"],_hoisted_18$1={role:"table",class:"fm-virtual-table-main fm-virtual-table-main__right"},_hoisted_19$1={class:"fm-virtual-table__body"},_hoisted_20$1={class:"fm-virtual-table__header"},_hoisted_21$1={class:"fm-virtual-table__header-content"},_hoisted_22$1={class:"fm-virtual-table__header-row"},_hoisted_23$1=["title"];function _sfc_render$1y(e,t,o,n,i,l){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$16,[vue.createElementVNode("div",_hoisted_2$Z,[vue.createElementVNode("div",_hoisted_3$M,[vue.createElementVNode("div",_hoisted_4$H,[vue.renderSlot(e.$slots,"default",{rowWidthCalc:l.rowWidthCalc,rowLeftWidthCalc:l.rowLeftWidthCalc,rowRightWidthCalc:l.rowRightWidthCalc})],512)]),vue.createElementVNode("div",_hoisted_5$E,[vue.createElementVNode("div",_hoisted_6$q,[vue.createElementVNode("div",{class:"fm-virtual-table__header-row",style:vue.normalizeStyle({left:-i.scrollLeft+"px","min-width":`calc(${l.rowWidthCalc})`,width:`calc(${l.rowWidthCalc})`})},[o.showControl?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$m)):vue.createCommentVNode("",!0),"0px"!=l.rowLeftWidthCalc?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"fm-virtual-table__header-cell",style:vue.normalizeStyle({width:`calc(${l.rowLeftWidthCalc})`})},null,4)):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.columns,(e=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[l.columnDisplay(e.model,e)&&!e.options.fixedColumn?(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["fm-virtual-table__header-cell",{"is-require":e.options.required,[e.options&&e.options.customClass]:!!e.options.customClass}]),key:e.key,style:vue.normalizeStyle({width:e.options.width})},[vue.createElementVNode("div",{class:"fm-virtual-table__header-cell-text",title:e.options.hideLabel?"":e.name},vue.toDisplayString(e.options.hideLabel?"":e.name),9,_hoisted_8$g)],6)):vue.createCommentVNode("",!0)],64)))),256)),"0px"!=l.rowRightWidthCalc?(vue.openBlock(),vue.createElementBlock("div",{key:2,class:"fm-virtual-table__header-cell",style:vue.normalizeStyle({width:`calc(${l.rowRightWidthCalc})`})},null,4)):vue.createCommentVNode("",!0)],4)])])]),vue.createElementVNode("div",_hoisted_9$e,[vue.createElementVNode("div",_hoisted_10$c,[vue.createElementVNode("div",null,[vue.renderSlot(e.$slots,"left")])]),vue.createElementVNode("div",_hoisted_11$6,[vue.createElementVNode("div",_hoisted_12$5,[vue.createElementVNode("div",_hoisted_13$3,[o.widget.options.selection?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14$2,[vue.createElementVNode("div",_hoisted_15$2,[vue.renderSlot(e.$slots,"selection")])])):vue.createCommentVNode("",!0),o.showControl?(vue.openBlock(),vue.createElementBlock("div",_hoisted_16$1,t[0]||(t[0]=[vue.createElementVNode("div",{class:"fm-virtual-table__header-cell-text",title:"Column"}," # ",-1)]))):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.columns,(e=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[o.displayFields[e.model]&&e.options.fixedColumn&&"right"!=e.options.fixedColumnPosition?(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["fm-virtual-table__header-cell",{"is-require":e.options.required,[e.options&&e.options.customClass]:!!e.options.customClass}]),key:e.key,style:vue.normalizeStyle({width:e.options.width})},[vue.createElementVNode("div",{class:"fm-virtual-table__header-cell-text",title:e.options.hideLabel?"":e.name},vue.toDisplayString(e.options.hideLabel?"":e.name),9,_hoisted_17$1)],6)):vue.createCommentVNode("",!0)],64)))),256))])])])]),vue.createElementVNode("div",_hoisted_18$1,[vue.createElementVNode("div",_hoisted_19$1,[vue.createElementVNode("div",null,[vue.renderSlot(e.$slots,"right")])]),vue.createElementVNode("div",_hoisted_20$1,[vue.createElementVNode("div",_hoisted_21$1,[vue.createElementVNode("div",_hoisted_22$1,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.columns,(e=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[o.displayFields[e.model]&&e.options.fixedColumn&&"right"==e.options.fixedColumnPosition?(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["fm-virtual-table__header-cell",{"is-require":e.options.required,[e.options&&e.options.customClass]:!!e.options.customClass}]),key:e.key,style:vue.normalizeStyle({width:e.options.width})},[vue.createElementVNode("div",{class:"fm-virtual-table__header-cell-text",title:e.options.hideLabel?"":e.name},vue.toDisplayString(e.options.hideLabel?"":e.name),9,_hoisted_23$1)],6)):vue.createCommentVNode("",!0)],64)))),256))])])])])])}var VirtualTable=_export_sfc(_sfc_main$1F,[["render",_sfc_render$1y]]);const _sfc_main$1E={props:["rowWidthCalc","rowIndex","tableKey"],data:()=>({resizeObserver:null,eles:[],rowHeight:0}),mounted(){this.eles=document.querySelectorAll(`.fm-virtual-table__row.row_${this.rowIndex}>div`),this.resizeObserver=new ResizeObserver((e=>{this.rowHeight=this.clacRowHeight()})),this.eles.forEach((e=>{this.resizeObserver.observe(e)}))},unmounted(){this.eles.forEach((e=>{this.resizeObserver.unobserve(e)}))},methods:{handleMouseover(){addClass$1(document.querySelectorAll(".fm-virtual-table__row.main.row_"+this.tableKey)[this.rowIndex],"is-hover"),addClass$1(document.querySelectorAll(".fm-virtual-table__row.left.row_"+this.tableKey)[this.rowIndex],"is-hover"),addClass$1(document.querySelectorAll(".fm-virtual-table__row.right.row_"+this.tableKey)[this.rowIndex],"is-hover")},handleMouseout(){removeClass$1(document.querySelectorAll(".fm-virtual-table__row.main.row_"+this.tableKey)[this.rowIndex],"is-hover"),removeClass$1(document.querySelectorAll(".fm-virtual-table__row.left.row_"+this.tableKey)[this.rowIndex],"is-hover"),removeClass$1(document.querySelectorAll(".fm-virtual-table__row.right.row_"+this.tableKey)[this.rowIndex],"is-hover")},clacRowHeight(){let e=0;return this.eles.forEach((t=>{el.handleMouseover&&l.handleMouseover(...e)),onMouseout:t[1]||(t[1]=(...e)=>l.handleMouseout&&l.handleMouseout(...e)),ref:"tableRow",style:vue.normalizeStyle({"min-width":`calc(${o.rowWidthCalc})`,"min-height":i.rowHeight+"px"})},[vue.renderSlot(e.$slots,"default",{rowHeight:i.rowHeight})],38)}var VirtualRow=_export_sfc(_sfc_main$1E,[["render",_sfc_render$1x]]);const _sfc_main$1D={props:["width","rowHeight"]};function _sfc_render$1w(e,t,o,n,i,l){return vue.openBlock(),vue.createElementBlock("div",{class:"fm-virtual-table__row-cell",style:vue.normalizeStyle({width:o.width,"min-height":o.rowHeight-.5+"px"})},[vue.renderSlot(e.$slots,"default")],4)}var VirtualCell=_export_sfc(_sfc_main$1D,[["render",_sfc_render$1w]]);const updateClassName=(e,t,o,n)=>{for(let i=0;i{updateClassName(e.list,t,o,n)}));else if("tabs"===e[i].type)e[i].tabs.forEach((e=>{updateClassName(e.list,t,o,n)}));else if("collapse"===e[i].type)e[i].tabs.forEach((e=>{updateClassName(e.list,t,o,n)}));else if("report"===e[i].type)e[i].rows.forEach((e=>{e.columns.forEach((e=>{updateClassName(e.list,t,o,n)}))}));else if("inline"===e[i].type)updateClassName(e[i].list,t,o,n);else if("card"===e[i].type)updateClassName(e[i].list,t,o,n);else if(1===t.length){if(e[i].model===t[0]&&("add"!=n||e[i].options.customClass.split(" ").includes(o)||(e[i].options.customClass=[...e[i].options.customClass.split(" "),o].join(" ")),"remove"==n&&e[i].options.customClass.split(" ").includes(o))){let t=e[i].options.customClass.split(" ");t.splice(t.findIndex((e=>e==o)),1),e[i].options.customClass=t.join(" ")}}else if(e[i].model===t[0]){let l=[...t];l.splice(0,1),"table"===e[i].type&&updateClassName(e[i].tableColumns,l,o,n),"subform"===e[i].type&&updateClassName(e[i].list,l,o,n),"group"===e[i].type&&updateClassName(e[i].list,l,o,n),"dialog"===e[i].type&&updateClassName(e[i].list,l,o,n)}},formTableMixin={props:["config","columns","value","models","remote","blanks","disableddata","rules","name","remoteOption","preview","platform","dataSourceValue","eventFunction","widget","printRead","paging","pageSize","isDelete","isAdd","containerKey","showControl","isDialog","dialogName","group","fieldNode"],emits:["update:value"],data:()=>({tableData:[],displayFields:{},disabledFields:{},changeItem:{},pagingData:[],pagingLength:0,currentPage:1,tableHideFields:[],tableDisabledFields:[],mobileScreen:window.innerWidth<768,tableKey:Math.random().toString(36).slice(-8),checkAll:!1,checkIndeterminate:!1}),created(){for(let e=0;e({...e,fm_key:e.fm_key||Math.random().toString(36).slice(-8)}))):[],this.tableHideFields=this.value?this.value.map((e=>Object.fromEntries(Object.keys(this.displayFields).map((e=>[e,!this.displayFields[e]]))))):[],this.tableDisabledFields=this.value?this.value.map((e=>Object.fromEntries(Object.keys(this.disabledFields).map((e=>[e,this.disabledFields[e]]))))):[],window.addEventListener("resize",this.getMobileScreen),this.loadPagingData()},provide(){return{setTableData:this.setTableData}},inject:["onFormDisabled","dynamicHideFields","onFormHide","onFormDisplay","formContext"],methods:{columnDisplay(e,t){let o=this.group?`${this.group}.${this.widget.model}.${e}`:`${this.widget.model}.${e}`;return null!=this.dynamicHideFields[o]?!this.dynamicHideFields[o]:"boolean"==typeof t.options.hidden?!t.options.hidden:!isExpression(t.options.hidden)||!executeExpression(extractExpression(t.options.hidden),{},this.formContext)},getMobileScreen(){this.mobileScreen=window.innerWidth<768},setData(e,t){return new Promise("number"!=typeof e?o=>{t=e,this.tableData.forEach(((e,o)=>{Object.keys(t).forEach((e=>{this.setTableData(t[e],o,e)}))})),o()}:o=>{this.$nextTick((()=>{Object.keys(t).forEach((o=>{this.setTableData(t[o],e,o)})),o()}))})},setTableData(e,t,o){const n=_.cloneDeep(this.tableData);n[t][o]=e,this.tableData=n},handleAddRow(){let e={},t={},o={};for(let n=0;n{if(this.widget&&this.widget.events&&this.widget.events.onRowAdd){let e=this.widget.events.onRowAdd;this.eventFunction[e]({rowIndex:this.tableData.length-1,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}this.paging&&(this.tableData.length>this.currentPage*this.pageSize&&(this.currentPage=parseInt((this.tableData.length-1)/this.pageSize)+1),this.loadPagingData()),this.calcCheckStatus()}))},hide(e){"string"==typeof e&&(e=[e]),e.forEach((e=>{this.onFormHide(`${this.fieldNode}.${e}`)}))},display(e){"string"==typeof e&&(e=[e]),e.forEach((e=>{this.onFormDisplay(`${this.fieldNode}.${e}`)}))},hideChild(e,t){"string"==typeof t&&(t=[t]),t.forEach((t=>{this.onFormHide(`${this.fieldNode}.${e}.${t}`)}))},displayChild(e,t){"string"==typeof t&&(t=[t]),t.forEach((t=>{this.onFormDisplay(`${this.fieldNode}.${e}.${t}`)}))},disabled(e,t){"string"==typeof e&&(e=[e]);for(let o=0;o=0&&(this.columns[o].options.disabled=t,this.disabledFields[this.columns[o].model]=t);this.tableData.forEach(((o,n)=>{e.forEach((e=>{this.tableDisabledFields[n][e]=t}))}))},disabledChild(e,t,o){"string"==typeof t&&(t=[t]),t.forEach((t=>{this.tableDisabledFields[e][t]=o,this.onFormDisabled(`${this.fieldNode}.${e}.${t}`,o)}))},setOptions(e,t){"string"==typeof e&&(e=[e]);for(let o=0;o=0&&Object.keys(t).forEach((e=>{this.columns[o].options[e]=t[e]}))},addClassName(e,t){"string"==typeof e&&(e=[e]),e.forEach((e=>{updateClassName(this.columns,e.split("."),t,"add")}))},removeClassName(e,t){"string"==typeof e&&(e=[e]),e.forEach((e=>{updateClassName(this.columns,e.split("."),t,"remove")}))},handleTableChange(e){this.changeItem=e},handlePageChange(e){if(this.currentPage=e,this.pagingData=[],this.pagingLength=0,this.$nextTick((()=>{this.loadPagingData()})),this.widget&&this.widget.events&&this.widget.events.onPageChange){let t=this.widget.events.onPageChange;this.eventFunction[t]({currentPage:e,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}},loadPagingData(){let e=(this.currentPage-1)*this.pageSize,t=e+this.pageSize;this.pagingData=this.tableData.slice(e,t),this.pagingLength=this.pagingData.length}},beforeUnmount(){window.removeEventListener("resize",this.getMobileScreen)},watch:{value(e){var t,o,n,i,l,a;e.forEach((e=>{e.fm_key||(e.fm_key=Math.random().toString(36).slice(-8))})),this.tableData=e;let r=[],s=[];for(let d=0;d{this.calcCheckStatus()}))},tableData:{deep:!0,handler(e){this.loadPagingData(),this.$emit("update:value",e)}}}};var index_vue_vue_type_style_index_0_lang$8="";const _sfc_main$1C={components:{VirtualTable:VirtualTable,VirtualRow:VirtualRow,VirtualCell:VirtualCell,GenerateFormItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return GenerateFormItem$5})))),GenerateElementItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return GenerateElementItem$4}))))},mixins:[formTableMixin],data:()=>({checkSelectKeys:[]}),computed:{checkSelectLength(){return this.checkSelectKeys.map((e=>this.tableData.find((t=>t.fm_key==e)))).filter((e=>e)).length}},methods:{handleRemove(e){const t={...this.tableData[e]};(this.preview&&"mobile"!=this.platform||!this.preview&&!this.mobileScreen)&&!this.widget.options.virtualTable?this.$refs.formTable.toggleRowSelection(this.tableData[e],!1):this.handleCheckSelectChange(e,!1);const o=[...this.tableData];if(o.splice(e,1),this.tableData=o,this.widget&&this.widget.events&&this.widget.events.onRowRemove){let o=this.widget.events.onRowRemove;this.eventFunction[o]({removeIndex:e,removeData:t,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}this.changeItem={},this.pagingData=[],this.pagingLength=0,this.$nextTick((()=>{this.paging&&(this.tableData.length%this.pageSize==0&&this.currentPage>parseInt(this.tableData.length/this.pageSize)&&(this.currentPage=parseInt(this.tableData.length/this.pageSize)),this.loadPagingData()),this.calcCheckStatus()}))},handleCheckSelectChange(e,t){t?this.checkSelectKeys.includes(this.tableData[e].fm_key)||this.checkSelectKeys.push(this.tableData[e].fm_key):this.checkSelectKeys.includes(this.tableData[e].fm_key)&&this.checkSelectKeys.splice(this.checkSelectKeys.indexOf(this.tableData[e].fm_key),1),this.$nextTick((()=>{this.calcCheckStatus()}))},handleCheckAllChange(e){this.checkIndeterminate=!1,this.checkSelectKeys=e?this.tableData.map((e=>e.fm_key)):[]},calcCheckStatus(){0==this.checkSelectLength?(this.checkAll=!1,this.checkIndeterminate=!1):this.checkSelectLength==this.tableData.length?(this.checkAll=!0,this.checkIndeterminate=!1):(this.checkAll=!1,this.checkIndeterminate=!0)},getSelection(){return(this.preview&&"mobile"!=this.platform||!this.preview&&!this.mobileScreen)&&!this.widget.options.virtualTable?this.$refs.formTable.getSelectionRows():this.checkSelectKeys.map((e=>this.tableData.find((t=>t.fm_key==e)))).filter((e=>e))},clearSelection(){(this.preview&&"mobile"!=this.platform||!this.preview&&!this.mobileScreen)&&!this.widget.options.virtualTable?this.$refs.formTable.clearSelection():(this.checkSelectKeys=[],this.$nextTick((()=>{this.calcCheckStatus()})))}}},_hoisted_1$15={class:"scope-index"},_hoisted_2$Y={class:"scope-action"},_hoisted_3$L={key:1},_hoisted_4$G={class:"scope-index"},_hoisted_5$D={class:"scope-action"},_hoisted_6$p={key:1},_hoisted_7$l={class:"form-table-mobile-item__top"},_hoisted_8$f={class:"form-table-mobile-item__content"};function _sfc_render$1v(e,t,o,n,i,l){const a=vue.resolveComponent("el-table-column"),r=vue.resolveComponent("el-button"),s=vue.resolveComponent("el-popconfirm"),d=vue.resolveComponent("generate-form-item"),u=vue.resolveComponent("el-table"),c=vue.resolveComponent("VirtualCell"),m=vue.resolveComponent("VirtualRow"),p=vue.resolveComponent("el-checkbox"),f=vue.resolveComponent("VirtualTable"),h=vue.resolveComponent("el-col"),v=vue.resolveComponent("el-pagination"),g=vue.resolveComponent("el-row");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["form-table",{"is-disabled":e.disableddata}])},[e.preview&&"mobile"!=e.platform||!e.preview&&!e.mobileScreen?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[e.widget.options.virtualTable?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(u,{key:0,data:e.paging?e.pagingData:e.tableData,border:"",class:vue.normalizeClass({"form-table-pc":!e.preview}),ref:"formTable","row-key":"fm_key"},{default:vue.withCtx((()=>[e.widget.options.selection?(vue.openBlock(),vue.createBlock(a,{key:0,type:"selection",fixed:"left",width:"50","reserve-selection":""})):vue.createCommentVNode("",!0),e.showControl?(vue.openBlock(),vue.createBlock(a,{key:1,label:"#",fixed:"",width:"50"},{default:vue.withCtx((o=>[vue.createElementVNode("div",_hoisted_1$15,[vue.createElementVNode("span",null,vue.toDisplayString((e.paging?e.pageSize*(e.currentPage-1):0)+o.$index+1),1)]),vue.createElementVNode("div",_hoisted_2$Y,[!e.printRead&&e.isDelete?(vue.openBlock(),vue.createBlock(s,{key:0,teleported:!0,title:e.$t("fm.description.deleteConfirm"),onConfirm:t=>l.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+o.$index)},{reference:vue.withCtx((()=>[vue.createVNode(r,{disabled:e.disableddata,type:"danger",size:"small",circle:""},{default:vue.withCtx((()=>t[1]||(t[1]=[vue.createElementVNode("i",{class:"fm-iconfont icon-trash",style:{"font-size":"12px",margin:"5px"}},null,-1)]))),_:1},8,["disabled"])])),_:2},1032,["title","onConfirm"])):vue.createCommentVNode("",!0),e.printRead||!e.isDelete?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$L,vue.toDisplayString((e.paging?e.pageSize*(e.currentPage-1):0)+o.$index+1),1)):vue.createCommentVNode("",!0)])])),_:1})):vue.createCommentVNode("",!0),0==e.columns.length?(vue.openBlock(),vue.createBlock(a,{key:2})):(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:3},vue.renderList(e.columns,(t=>{var o;return vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:t.model},[e.columnDisplay(t.model,t)?(vue.openBlock(),vue.createBlock(a,{key:0,label:t.options.hideLabel?"":t.name,width:t.options.width,"label-class-name":t.options.required?"required":"","class-name":null==(o=t.options)?void 0:o.customClass,fixed:!!t.options.fixedColumn&&(t.options.fixedColumnPosition||"left"),"column-key":t.key},{default:vue.withCtx((o=>[(vue.openBlock(),vue.createBlock(d,{models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o.$index],rules:e.rules,widget:t,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!1,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+o.$index,"table-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?`${e.group}.${e.name}`:e.name,"field-node":`${e.fieldNode}.${(e.paging?e.pageSize*(e.currentPage-1):0)+o.$index}`,key:`${e.fieldNode}.${(e.paging?e.pageSize*(e.currentPage-1):0)+o.$index}.${t.key}`},vue.createSlots({_:2},[vue.renderList(e.blanks,(t=>({name:t.name,fn:vue.withCtx((o=>[vue.renderSlot(e.$slots,t.name,{model:o.model})]))})))]),1032,["models","rules","widget","remote","blanks","display","sub-hide-fields","sub-disabled-fields","edit","remote-option","platform","preview","container-key","data-source-value","event-function","print-read","row-index","table-name","is-dialog","dialog-name","group","field-node"]))])),_:2},1032,["label","width","label-class-name","class-name","fixed","column-key"])):vue.createCommentVNode("",!0)],64)})),128))])),_:3},8,["data","class"])),e.widget.options.virtualTable?(vue.openBlock(),vue.createBlock(f,{key:1,columns:e.columns,showControl:e.showControl,paging:e.paging,pageSize:e.pageSize,currentPage:e.currentPage,displayFields:e.displayFields,group:e.group,widget:e.widget,ref:"virtualTable"},{default:vue.withCtx((({rowWidthCalc:t,rowLeftWidthCalc:o,rowRightWidthCalc:n})=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.paging?e.pagingLength:e.tableData,((i,l)=>(vue.openBlock(),vue.createBlock(m,{rowWidthCalc:t,key:(e.paging?e.pageSize*(e.currentPage-1):0)+l,"row-index":l,class:"main","table-key":e.tableKey},{default:vue.withCtx((()=>[e.showControl?(vue.openBlock(),vue.createBlock(c,{key:0,width:"50px"})):vue.createCommentVNode("",!0),"0px"!=o?(vue.openBlock(),vue.createBlock(c,{key:1,width:`calc(${o})`},null,8,["width"])):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.columns,(t=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[e.columnDisplay(t.model,t)&&!t.options.fixedColumn?(vue.openBlock(),vue.createBlock(c,{key:t.key,width:t.options.width},{default:vue.withCtx((()=>[vue.createVNode(d,{models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+l],rules:e.rules,widget:t,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!1,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+l,"table-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?`${e.group}.${e.name}`:e.name,"field-node":`${e.fieldNode}.${(e.paging?e.pageSize*(e.currentPage-1):0)+l}`},vue.createSlots({_:2},[vue.renderList(e.blanks,(t=>({name:t.name,fn:vue.withCtx((o=>[vue.renderSlot(e.$slots,t.name,{model:o.model})]))})))]),1032,["models","rules","widget","remote","blanks","display","sub-hide-fields","sub-disabled-fields","edit","remote-option","platform","preview","container-key","data-source-value","event-function","print-read","row-index","table-name","is-dialog","dialog-name","group","field-node"])])),_:2},1032,["width"])):vue.createCommentVNode("",!0)],64)))),256)),"0px"!=n?(vue.openBlock(),vue.createBlock(c,{key:2,width:`calc(${n})`},null,8,["width"])):vue.createCommentVNode("",!0)])),_:2},1032,["rowWidthCalc","row-index","table-key"])))),128))])),left:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.paging?e.pagingLength:e.tableData,((o,n)=>(vue.openBlock(),vue.createBlock(m,{key:(e.paging?e.pageSize*(e.currentPage-1):0)+n,rowIndex:n,class:"left","table-key":e.tableKey},{default:vue.withCtx((()=>[e.widget.options.selection?(vue.openBlock(),vue.createBlock(c,{key:0,width:"50px",class:"fm-table-check"},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:i.checkSelectKeys.includes(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+n].fm_key),onChange:t=>l.handleCheckSelectChange((e.paging?e.pageSize*(e.currentPage-1):0)+n,t)},null,8,["modelValue","onChange"])])),_:2},1024)):vue.createCommentVNode("",!0),e.showControl?(vue.openBlock(),vue.createBlock(c,{key:1,width:"50px"},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_4$G,[vue.createElementVNode("span",null,vue.toDisplayString((e.paging?e.pageSize*(e.currentPage-1):0)+n+1),1)]),vue.createElementVNode("div",_hoisted_5$D,[!e.printRead&&e.isDelete?(vue.openBlock(),vue.createBlock(s,{key:0,teleported:!0,title:e.$t("fm.description.deleteConfirm"),onConfirm:t=>l.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+n)},{reference:vue.withCtx((()=>[vue.createVNode(r,{disabled:e.disableddata,type:"danger",size:"small",circle:""},{default:vue.withCtx((()=>t[2]||(t[2]=[vue.createElementVNode("i",{class:"fm-iconfont icon-trash",style:{"font-size":"12px",margin:"5px"}},null,-1)]))),_:1},8,["disabled"])])),_:2},1032,["title","onConfirm"])):vue.createCommentVNode("",!0),e.printRead||!e.isDelete?(vue.openBlock(),vue.createElementBlock("span",_hoisted_6$p,vue.toDisplayString((e.paging?e.pageSize*(e.currentPage-1):0)+n+1),1)):vue.createCommentVNode("",!0)])])),_:2},1024)):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.columns,(t=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[e.columnDisplay(t.model,t)&&t.options.fixedColumn&&"right"!=t.options.fixedColumnPosition?(vue.openBlock(),vue.createBlock(c,{key:t.key,width:t.options.width},{default:vue.withCtx((()=>[vue.createVNode(d,{models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+n],rules:e.rules,widget:t,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!1,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+n,"table-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?`${e.group}.${e.name}`:e.name,"field-node":`${e.fieldNode}.${(e.paging?e.pageSize*(e.currentPage-1):0)+n}`},vue.createSlots({_:2},[vue.renderList(e.blanks,(t=>({name:t.name,fn:vue.withCtx((o=>[vue.renderSlot(e.$slots,t.name,{model:o.model})]))})))]),1032,["models","rules","widget","remote","blanks","display","sub-hide-fields","sub-disabled-fields","edit","remote-option","platform","preview","container-key","data-source-value","event-function","print-read","row-index","table-name","is-dialog","dialog-name","group","field-node"])])),_:2},1032,["width"])):vue.createCommentVNode("",!0)],64)))),256))])),_:2},1032,["rowIndex","table-key"])))),128))])),right:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.paging?e.pagingLength:e.tableData,((t,o)=>(vue.openBlock(),vue.createBlock(m,{key:(e.paging?e.pageSize*(e.currentPage-1):0)+o,rowIndex:o,class:"right","table-key":e.tableKey},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.columns,(t=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[e.columnDisplay(t.model,t)&&t.options.fixedColumn&&"right"==t.options.fixedColumnPosition?(vue.openBlock(),vue.createBlock(c,{key:t.key,width:t.options.width},{default:vue.withCtx((()=>[vue.createVNode(d,{models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+o],rules:e.rules,widget:t,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!1,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+o,"table-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?`${e.group}.${e.name}`:e.name,"field-node":`${e.fieldNode}.${(e.paging?e.pageSize*(e.currentPage-1):0)+o}`},vue.createSlots({_:2},[vue.renderList(e.blanks,(t=>({name:t.name,fn:vue.withCtx((o=>[vue.renderSlot(e.$slots,t.name,{model:o.model})]))})))]),1032,["models","rules","widget","remote","blanks","display","sub-hide-fields","sub-disabled-fields","edit","remote-option","platform","preview","container-key","data-source-value","event-function","print-read","row-index","table-name","is-dialog","dialog-name","group","field-node"])])),_:2},1032,["width"])):vue.createCommentVNode("",!0)],64)))),256))])),_:2},1032,["rowIndex","table-key"])))),128))])),selection:vue.withCtx((()=>[vue.createVNode(p,{modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=t=>e.checkAll=t),indeterminate:e.checkIndeterminate,onChange:l.handleCheckAllChange},null,8,["modelValue","indeterminate","onChange"])])),_:3},8,["columns","showControl","paging","pageSize","currentPage","displayFields","group","widget"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),e.preview&&"mobile"===e.platform||!e.preview&&e.mobileScreen?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:"form-table-mobile",style:vue.normalizeStyle({display:e.preview&&"mobile"===e.platform?"block":""})},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.paging?e.pagingLength:e.tableData,((o,n)=>(vue.openBlock(),vue.createElementBlock("div",{class:"form-table-mobile-item",key:(e.paging?e.pageSize*(e.currentPage-1):0)+n},[vue.createElementVNode("div",_hoisted_7$l,[e.widget.options.selection?(vue.openBlock(),vue.createBlock(p,{key:0,modelValue:i.checkSelectKeys.includes(e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+n].fm_key),onChange:t=>l.handleCheckSelectChange((e.paging?e.pageSize*(e.currentPage-1):0)+n,t),style:{"margin-right":"10px"}},null,8,["modelValue","onChange"])):vue.createCommentVNode("",!0),vue.createElementVNode("span",null,"# "+vue.toDisplayString((e.paging?e.pageSize*(e.currentPage-1):0)+n+1),1),e.showControl&&!e.printRead&&e.isDelete?(vue.openBlock(),vue.createBlock(s,{key:1,teleported:!1,title:e.$t("fm.description.deleteConfirm"),onConfirm:t=>l.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+n)},{reference:vue.withCtx((()=>[vue.createVNode(r,{disabled:e.disableddata,type:"danger",size:"small",circle:""},{default:vue.withCtx((()=>t[3]||(t[3]=[vue.createElementVNode("i",{class:"fm-iconfont icon-trash",style:{"font-size":"12px",margin:"5px"}},null,-1)]))),_:1},8,["disabled"])])),_:2},1032,["title","onConfirm"])):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_8$f,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.columns,(t=>(vue.openBlock(),vue.createBlock(d,{key:t.key,models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+n],rules:e.rules,widget:t,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+n,"table-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?`${e.group}.${e.name}`:e.name,"field-node":`${e.fieldNode}.${(e.paging?e.pageSize*(e.currentPage-1):0)+n}`},vue.createSlots({_:2},[vue.renderList(e.blanks,(t=>({name:t.name,fn:vue.withCtx((o=>[vue.renderSlot(e.$slots,t.name,{model:o.model})]))})))]),1032,["models","rules","widget","remote","blanks","display","sub-hide-fields","sub-disabled-fields","edit","remote-option","platform","preview","container-key","data-source-value","event-function","print-read","row-index","table-name","is-dialog","dialog-name","group","field-node"])))),128))])])))),128))],4)):vue.createCommentVNode("",!0),vue.createVNode(g,null,{default:vue.withCtx((()=>[vue.createVNode(h,{span:e.preview&&"mobile"!=e.platform||!e.preview?12:24,xs:24},{default:vue.withCtx((()=>[!e.disableddata&&e.isAdd?(vue.openBlock(),vue.createBlock(r,{key:0,link:"",type:"primary",onClick:e.handleAddRow},{default:vue.withCtx((()=>[t[4]||(t[4]=vue.createElementVNode("i",{class:"fm-iconfont icon-plus",style:{"font-size":"12px",margin:"5px"}},null,-1)),vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.add")),1)])),_:1},8,["onClick"])):vue.createCommentVNode("",!0)])),_:1},8,["span"]),vue.createVNode(h,{span:(!e.preview||"mobile"==e.platform)&&e.preview||e.disableddata?24:12,xs:24},{default:vue.withCtx((()=>[e.paging&&e.tableData.length?(vue.openBlock(),vue.createBlock(v,{key:0,style:{float:"right"},layout:"total, prev, pager, next","page-size":e.pageSize,"current-page":e.currentPage,total:e.tableData.length,"pager-count":5,onCurrentChange:e.handlePageChange},null,8,["page-size","current-page","total","onCurrentChange"])):vue.createCommentVNode("",!0)])),_:1},8,["span"])])),_:1})],2)}var FmFormTable$1=_export_sfc(_sfc_main$1C,[["render",_sfc_render$1v]]),config_vue_vue_type_style_index_0_lang="";const _sfc_main$1B={name:"event-config",props:["events","eventscripts"],emits:["on-add","on-remove","on-edit","update:events"],data(){return{eventsModel:this.events,eventArray:Object.keys(this.events).map((e=>({eventName:e,functionKey:this.events[e]}))).filter((e=>e.functionKey)),eventEnum:{onChange:"onChange 值发生变化",onClick:"onClick 单击",onFocus:"onFocus 获取焦点",onBlur:"onBlur 失去焦点",onRowAdd:"onRowAdd 子表单添加行",onRowRemove:"onRowRemove 子表单删除行",onUploadSuccess:"onUploadSuccess 上传成功",onUploadError:"onUploadError 上传失败",onRemove:"onRemove 移除",onUploadProgress:"onUploadProgress 上传中",onSelect:"onSelect 文件选择",onPageChange:"onPageChange 当前页改变",onCancel:"onCancel 点击取消按钮",onConfirm:"onConfirm 点击确定按钮",onCurrentRow:"onCurrentRow 选择当前行",onSelectionChange:"onSelectionChange 选择项变化",onMounted:"onMounted 渲染完成",onOpen:"onOpen 打开",onClose:"onClose 关闭"},readonlyFunctions:["mounted","refresh","onFormChange"]}},methods:{handleCommand(e){this.$emit("on-add",e)},handleRemove(e,t){this.$emit("on-remove",e.eventName)},handleCode(e){this.$emit("on-edit",e)}},watch:{events:{deep:!0,handler(e){this.eventsModel=e,this.eventArray=Object.keys(this.events).map((e=>({eventName:e,functionKey:this.events[e]}))).filter((e=>e.functionKey))}},eventsModel:{deep:!0,handler(e){this.$emit("update:events",e)}},eventArray:{deep:!0,handler(e){for(let t=0;te.eventName))},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.eventArray,((t,n)=>{var d;return vue.openBlock(),vue.createBlock(s,{key:t.eventName,name:t.eventName,title:"zh-cn"==e.$i18n.locale&&null!=(d=i.eventEnum[t.eventName])?d:t.eventName},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_2$X,[vue.createVNode(r,{size:"default",style:{width:"100%","margin-bottom":"5px"},modelValue:t.functionKey,"onUpdate:modelValue":e=>t.functionKey=e},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.eventscripts,(e=>(vue.openBlock(),vue.createBlock(a,{disabled:i.readonlyFunctions.includes(e.value),key:e.value,label:e.label,value:e.value},null,8,["disabled","label","value"])))),128))])),_:2},1032,["modelValue","onUpdate:modelValue"]),vue.createElementVNode("i",{class:"fm-iconfont icon-code",onClick:e=>l.handleCode(t),title:e.$t("fm.eventscript.config.code")},null,8,_hoisted_3$K),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:e=>l.handleRemove(t,n),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_4$F)])])),_:2},1032,["name","title"])})),128))])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),vue.createVNode(p,{style:{width:"100%","margin-top":"5px",display:"block"},trigger:"click",onCommand:l.handleCommand,szie:"small"},{dropdown:vue.withCtx((()=>[vue.createVNode(m,{style:{width:"280px"}},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(Object.keys(o.events),(t=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:t},["zh-cn"==e.$i18n.locale?(vue.openBlock(),vue.createBlock(c,{key:0,disabled:0!=i.eventArray.filter((e=>e.eventName==t)).length,command:t},{default:vue.withCtx((()=>{var e;return[vue.createTextVNode(vue.toDisplayString(null!=(e=i.eventEnum[t])?e:t),1)]})),_:2},1032,["disabled","command"])):(vue.openBlock(),vue.createBlock(c,{key:1,disabled:0!=i.eventArray.filter((e=>e.eventName==t)).length,command:t},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(t),1)])),_:2},1032,["disabled","command"]))],64)))),128))])),_:1})])),default:vue.withCtx((()=>[vue.createVNode(u,{type:"primary",plain:"",style:{width:"100%"},size:"default"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.eventscript.config.create")),1),t[0]||(t[0]=vue.createElementVNode("i",{class:"fm-iconfont icon-plus",style:{"font-size":"12px",margin:"5px"}},null,-1))])),_:1})])),_:1},8,["onCommand"])])}var EventConfig=_export_sfc(_sfc_main$1B,[["render",_sfc_render$1u]]);const _sfc_main$1A={__name:"index",props:{modelValue:{type:String,default:""},toolbar:{type:Array},disabled:{type:Boolean},customStyle:{type:Object}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=vue.ref(o.modelValue);let i=o.modelValue;const l=t,a=vue.ref(null);return vue.watch((()=>o.modelValue),(e=>{i!==e&&(a.value.setHTML(e),vue.nextTick((()=>{let t=a.value.getQuill();t.setSelection(e.length,0,"api"),t.focus()})))})),vue.watch(n,(e=>{l("update:modelValue",e),i=e})),(t,o)=>{const i=vue.resolveComponent("QuillEditor");return vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(e.customStyle)},[vue.createVNode(i,{content:n.value,"onUpdate:content":o[0]||(o[0]=e=>n.value=e),toolbar:e.toolbar,enable:!e.disabled,"read-only":e.disabled,"content-type":"html",ref_key:"quillEditor",ref:a},null,8,["content","toolbar","enable","read-only"])],4)}}};var tinyEmitter={exports:{}};function E$1(){}E$1.prototype={on:function(e,t,o){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:o}),this},once:function(e,t,o){var n=this;function i(){n.off(e,i),t.apply(o,arguments)}return i._=t,this.on(e,i,o)},emit:function(e){for(var t=[].slice.call(arguments,1),o=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=o.length;ninstance.on(...e),$once:(...e)=>instance.once(...e),$off:(...e)=>instance.off(...e),$emit:(...e)=>instance.emit(...e)};function ElMessage(e,t){var o;null==(o=t.$message)||o[null==e?void 0:e.type](e.message)}ElMessage.error=function(e,t){t.$message.error(e)};var codemirror$1={exports:{}};!function(e,t){e.exports=function(){var e=navigator.userAgent,t=navigator.platform,o=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),l=/Edge\/(\d+)/.exec(e),a=n||i||l,r=a&&(n?document.documentMode||6:+(l||i)[1]),s=!l&&/WebKit\//.test(e),d=s&&/Qt\/\d+\.\d+/.test(e),u=!l&&/Chrome\/(\d+)/.exec(e),c=u&&+u[1],m=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),v=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),y=v||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),k=/\bCrOS\b/.test(e),w=/win/i.test(t),C=m&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(m=!1,s=!0);var _=b&&(d||m&&(null==C||C<12.11)),x=o||a&&r>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var V,$=function(e,t){var o=e.className,n=S(t).exec(o);if(n){var i=o.slice(n.index+n[0].length);e.className=o.slice(0,n.index)+(i?n[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return N(e).appendChild(t)}function B(e,t,o,n){var i=document.createElement(e);if(o&&(i.className=o),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var l=0;l=t)return a+(t-l);a+=r-l,a+=o-a%o,l=r+1}}v?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(t){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=W(this.onTimeout,this)};function G(e,t){for(var o=0;o=t)return n+Math.min(a,t-i);if(i+=l-n,n=l+1,(i+=o-i%o)>=t)return n}}var Q=[""];function Z(e){for(;Q.length<=e;)Q.push(ee(Q)+" ");return Q[e]}function ee(e){return e[e.length-1]}function te(e,t){for(var o=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||le.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ae(e))||t.test(e):ae(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var de=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ue(e){return e.charCodeAt(0)>=768&&de.test(e)}function ce(e,t,o){for(;(o<0?t>0:to?-1:1;;){if(t==o)return t;var i=(t+o)/2,l=n<0?Math.ceil(i):Math.floor(i);if(l==t)return e(l)?t:o;e(l)?o=l:t=l+n}}function pe(e,t,o,n){if(!e)return n(t,o,"ltr",0);for(var i=!1,l=0;lt||t==o&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,o),1==a.level?"rtl":"ltr",l),i=!0)}i||n(t,o,"ltr")}var fe=null;function he(e,t,o){var n;fe=null;for(var i=0;it)return i;l.to==t&&(l.from!=l.to&&"before"==o?n=i:fe=i),l.from==t&&(l.from!=l.to&&"before"!=o?n=i:fe=i)}return null!=n?n:fe}var ve=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function o(o){return o<=247?e.charAt(o):1424<=o&&o<=1524?"R":1536<=o&&o<=1785?t.charAt(o-1536):1774<=o&&o<=2220?"r":8192<=o&&o<=8203?"w":8204==o?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,l=/[LRr]/,a=/[Lb1n]/,r=/[1n]/;function s(e,t,o){this.level=e,this.from=t,this.to=o}return function(e,t){var d="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var u=e.length,c=[],m=0;m-1&&(n[t]=i.slice(0,l).concat(i.slice(l+1)))}}}function Ce(e,t){var o=ke(e,t);if(o.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function Ve(e){e.prototype.on=function(e,t){be(this,e,t)},e.prototype.off=function(e,t){we(this,e,t)}}function $e(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Be(e){$e(e),Ne(e)}function De(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Fe,Oe,Ie=function(){if(a&&r<9)return!1;var e=B("div");return"draggable"in e||"dragDrop"in e}();function Me(e){if(null==Fe){var t=B("span","​");E(e,B("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Fe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&r<8))}var o=Fe?B("span","​"):B("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return o.setAttribute("cm-text",""),o}function Pe(e){if(null!=Oe)return Oe;var t=E(e,document.createTextNode("AخA")),o=V(t,0,1).getBoundingClientRect(),n=V(t,1,2).getBoundingClientRect();return N(e),!(!o||o.left==o.right)&&(Oe=n.right-o.right<3)}var Le,Ae=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,o=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var l=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=l.indexOf("\r");-1!=a?(o.push(l.slice(0,a)),t+=a+1):(o.push(l),t=i+1)}return o}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(Le){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(Le){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},We="oncopy"in(Le=B("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),Ue=null;function ze(e){if(null!=Ue)return Ue;var t=E(e,B("span","x")),o=t.getBoundingClientRect(),n=V(t,0,1).getBoundingClientRect();return Ue=Math.abs(o.left-n.left)>1}var je={},Ge={};function He(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Ke(e,t){Ge[e]=t}function qe(e){if("string"==typeof e&&Ge.hasOwnProperty(e))e=Ge[e];else if(e&&"string"==typeof e.name&&Ge.hasOwnProperty(e.name)){var t=Ge[e.name];"string"==typeof t&&(t={name:t}),(e=ie(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=qe(t);var o=je[t.name];if(!o)return Ye(e,"text/plain");var n=o(e,t);if(Xe.hasOwnProperty(t.name)){var i=Xe[t.name];for(var l in i)i.hasOwnProperty(l)&&(n.hasOwnProperty(l)&&(n["_"+l]=n[l]),n[l]=i[l])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Xe={};function Je(e,t){U(t,Xe.hasOwnProperty(e)?Xe[e]:Xe[e]={})}function Qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var o={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),o[n]=i}return o}function Ze(e,t){for(var o;e.innerMode&&(o=e.innerMode(t))&&o.mode!=e;)t=o.state,e=o.mode;return o||{mode:e,state:t}}function et(e,t,o){return!e.startState||e.startState(t,o)}var tt=function(e,t,o){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=o};function ot(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var o=e;!o.lines;)for(var n=0;;++n){var i=o.children[n],l=i.chunkSize();if(t=e.first&&to?ut(o,ot(e,o).text.length):yt(t,ot(e,t.line).text.length)}function yt(e,t){var o=e.ch;return null==o||o>t?ut(e.line,t):o<0?ut(e.line,0):e}function bt(e,t){for(var o=[],n=0;n=this.string.length},tt.prototype.sol=function(){return this.pos==this.lineStart},tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tt.prototype.next=function(){if(this.post},tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},tt.prototype.skipToEnd=function(){this.pos=this.string.length},tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},tt.prototype.backUp=function(e){this.pos-=e},tt.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return o?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},tt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var kt=function(e,t){this.state=e,this.lookAhead=t},wt=function(e,t,o,n){this.state=t,this.doc=e,this.line=o,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Ct(e,t,o,n){var i=[e.state.modeGen],l={};Dt(e,t.text,e.doc.mode,o,(function(e,t){return i.push(e,t)}),l,n);for(var a=o.state,r=function(n){o.baseTokens=i;var r=e.state.overlays[n],s=1,d=0;o.state=!0,Dt(e,t.text,r.mode,o,(function(e,t){for(var o=s;de&&i.splice(s,1,e,i[s+1],n),s+=2,d=Math.min(e,n)}if(t)if(r.opaque)i.splice(o,s-o,e,"overlay "+t),s=o+2;else for(;oe.options.maxHighlightLength&&Qe(e.doc.mode,n.state),l=Ct(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=l.styles,l.classes?t.styleClasses=l.classes:t.styleClasses&&(t.styleClasses=null),o===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function xt(e,t,o){var n=e.doc,i=e.display;if(!n.mode.startState)return new wt(n,!0,t);var l=Tt(e,t,o),a=l>n.first&&ot(n,l-1).stateAfter,r=a?wt.fromSaved(n,a,l):new wt(n,et(n.mode),l);return n.iter(l,t,(function(o){St(e,o.text,r);var n=r.line;o.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return l}throw new Error("Mode "+e.name+" failed to advance stream.")}wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},wt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wt.fromSaved=function(e,t,o){return t instanceof kt?new wt(e,Qe(e.mode,t.state),o,t.lookAhead):new wt(e,Qe(e.mode,t),o)},wt.prototype.save=function(e){var t=!1!==e?Qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new kt(t,this.maxLookAhead):t};var Nt=function(e,t,o){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=o};function Et(e,t,o,n){var i,l,a=e.doc,r=a.mode,s=ot(a,(t=gt(a,t)).line),d=xt(e,t.line,o),u=new tt(s.text,e.options.tabSize,d);for(n&&(l=[]);(n||u.pose.options.maxHighlightLength?(r=!1,a&&St(e,t,n,c.pos),c.pos=t.length,s=null):s=Bt($t(o,c,n.state,m),l),m){var p=m[0].name;p&&(s="m-"+(s?p+" "+s:p))}if(!r||u!=s){for(;da;--r){if(r<=l.first)return l.first;var s=ot(l,r-1),d=s.stateAfter;if(d&&(!o||r+(d instanceof kt?d.lookAhead:0)<=l.modeFrontier))return r;var u=z(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=r-1,n=u)}return i}function Ft(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiero;n--){var i=ot(e,n).stateAfter;if(i&&(!(i instanceof kt)||n+i.lookAhead=t:l.to>t);(n||(n=[])).push(new Lt(a,l.from,r?null:l.to))}}return n}function zt(e,t,o){var n;if(e)for(var i=0;i=t:l.to>t)||l.from==t&&"bookmark"==a.type&&(!o||l.marker.insertLeft)){var r=null==l.from||(a.inclusiveLeft?l.from<=t:l.from0&&r)for(var b=0;b0)){var u=[s,1],c=ct(d.from,r.from),m=ct(d.to,r.to);(c<0||!a.inclusiveLeft&&!c)&&u.push({from:d.from,to:r.from}),(m>0||!a.inclusiveRight&&!m)&&u.push({from:r.to,to:d.to}),i.splice.apply(i,u),s+=u.length-3}}return i}function Kt(e){var t=e.markedSpans;if(t){for(var o=0;ot)&&(!o||Jt(o,l.marker)<0)&&(o=l.marker)}return o}function oo(e,t,o,n,i){var l=ot(e,t),a=It&&l.markedSpans;if(a)for(var r=0;r=0&&c<=0||u<=0&&c>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(d.to,o)>=0:ct(d.to,o)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ct(d.from,n)<=0:ct(d.from,n)<0)))return!0}}}function no(e){for(var t;t=Zt(e);)e=t.find(-1,!0).line;return e}function io(e){for(var t;t=eo(e);)e=t.find(1,!0).line;return e}function lo(e){for(var t,o;t=eo(e);)e=t.find(1,!0).line,(o||(o=[])).push(e);return o}function ao(e,t){var o=ot(e,t),n=no(o);return o==n?t:at(n)}function ro(e,t){if(t>e.lastLine())return t;var o,n=ot(e,t);if(!so(e,n))return t;for(;o=eo(n);)n=o.find(1,!0).line;return at(n)+1}function so(e,t){var o=It&&t.markedSpans;if(o)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=o,t.maxLine=e)}))}var fo=function(e,t,o){this.text=e,qt(this,t),this.height=o?o(this):1};function ho(e,t,o,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Kt(e),qt(e,o);var i=n?n(e):1;i!=e.height&<(e,i)}function vo(e){e.parent=null,Kt(e)}fo.prototype.lineNo=function(){return at(this)},Ve(fo);var go={},yo={};function bo(e,t){if(!e||/^\s*$/.test(e))return null;var o=t.addModeClass?yo:go;return o[e]||(o[e]=e.replace(/\S+/g,"cm-$&"))}function ko(e,t){var o=D("span",null,null,s?"padding-right: .1px":null),n={pre:D("pre",[o],"CodeMirror-line"),content:o,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var l=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Co,Pe(e.display.measure)&&(a=ge(l,e.doc.direction))&&(n.addToken=xo(n.addToken,a)),n.map=[],Vo(l,n,_t(e,l,t!=e.display.externalMeasured&&at(l))),l.styleClasses&&(l.styleClasses.bgClass&&(n.bgClass=I(l.styleClasses.bgClass,n.bgClass||"")),l.styleClasses.textClass&&(n.textClass=I(l.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Me(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var r=n.content.lastChild;(/\bcm-tab\b/.test(r.className)||r.querySelector&&r.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Ce(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=I(n.pre.className,n.textClass||"")),n}function wo(e){var t=B("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Co(e,t,o,n,i,l,s){if(t){var d,u=e.splitSpaces?_o(t,e.trailingSpace):t,c=e.cm.state.specialChars,m=!1;if(c.test(t)){d=document.createDocumentFragment();for(var p=0;;){c.lastIndex=p;var f=c.exec(t),h=f?f.index-p:t.length-p;if(h){var v=document.createTextNode(u.slice(p,p+h));a&&r<9?d.appendChild(B("span",[v])):d.appendChild(v),e.map.push(e.pos,e.pos+h,v),e.col+=h,e.pos+=h}if(!f)break;p+=h+1;var g=void 0;if("\t"==f[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(g=d.appendChild(B("span",Z(b),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=b}else"\r"==f[0]||"\n"==f[0]?((g=d.appendChild(B("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&r<9?d.appendChild(B("span",[g])):d.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,d=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,d),a&&r<9&&(m=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),o||n||i||m||l||s){var k=o||"";n&&(k+=n),i&&(k+=i);var w=B("span",[d],k,l);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&w.setAttribute(C,s[C]);return e.content.appendChild(w)}e.content.appendChild(d)}}function _o(e,t){if(e.length>1&&!/ /.test(e))return e;for(var o=t,n="",i=0;id&&c.from<=d);m++);if(c.to>=u)return e(o,n,i,l,a,r,s);e(o,n.slice(0,c.to-d),i,l,null,r,s),l=null,n=n.slice(c.to-d),d=c.to}}}function So(e,t,o,n){var i=!n&&o.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",o.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Vo(e,t,o){var n=e.markedSpans,i=e.text,l=0;if(n)for(var a,r,s,d,u,c,m,p=i.length,f=0,h=1,v="",g=0;;){if(g==f){s=d=u=r="",m=null,c=null,g=1/0;for(var y=[],b=void 0,k=0;kf||C.collapsed&&w.to==f&&w.from==f)){if(null!=w.to&&w.to!=f&&g>w.to&&(g=w.to,d=""),C.className&&(s+=" "+C.className),C.css&&(r=(r?r+";":"")+C.css),C.startStyle&&w.from==f&&(u+=" "+C.startStyle),C.endStyle&&w.to==g&&(b||(b=[])).push(C.endStyle,w.to),C.title&&((m||(m={})).title=C.title),C.attributes)for(var _ in C.attributes)(m||(m={}))[_]=C.attributes[_];C.collapsed&&(!c||Jt(c.marker,C)<0)&&(c=w)}else w.from>f&&g>w.from&&(g=w.from)}if(b)for(var x=0;x=p)break;for(var V=Math.min(p,g);;){if(v){var $=f+v.length;if(!c){var N=$>V?v.slice(0,V-f):v;t.addToken(t,N,a?a+s:s,u,f+N.length==g?d:"",r,m)}if($>=V){v=v.slice(V-f),f=V;break}f=$,u=""}v=i.slice(l,l=o[h++]),a=bo(o[h++],t.cm.options)}}else for(var E=1;E2&&l.push((s.bottom+d.top)/2-o.top)}}l.push(o.bottom-o.top)}}function nn(e,t,o){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;no)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function ln(e,t){var o=at(t=no(t)),n=e.display.externalMeasured=new $o(e.doc,t,o);n.lineN=o;var i=n.built=ko(e,n);return n.text=i.pre,E(e.display.lineMeasure,i.pre),n}function an(e,t,o,n){return dn(e,sn(e,t),o,n)}function rn(e,t){if(t>=e.display.viewFrom&&t=o.lineN&&tt)&&(i=(l=s-r)-1,t>=s&&(a="right")),null!=i){if(n=e[d+2],r==s&&o==(n.insertLeft?"left":"right")&&(a=o),"left"==o&&0==i)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[2+(d-=3)],a="left";if("right"==o&&i==s-r)for(;d=0&&(o=e[i]).left==o.right;i--);return o}function fn(e,t,o,n){var i,l=mn(t.map,o,n),s=l.node,d=l.start,u=l.end,c=l.collapse;if(3==s.nodeType){for(var m=0;m<4;m++){for(;d&&ue(t.line.text.charAt(l.coverStart+d));)--d;for(;l.coverStart+u0&&(c=n="right"),i=e.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==n?p.length-1:0]:s.getBoundingClientRect()}if(a&&r<9&&!d&&(!i||!i.left&&!i.right)){var f=s.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+Mn(e.display),top:f.top,bottom:f.bottom}:cn}for(var h=i.top-t.rect.top,v=i.bottom-t.rect.top,g=(h+v)/2,y=t.view.measure.heights,b=0;b=n.text.length?(s=n.text.length,d="before"):s<=0&&(s=0,d="after"),!r)return a("before"==d?s-1:s,"before"==d);function u(e,t,o){return a(o?e-1:e,1==r[t].level!=o)}var c=he(r,s,d),m=fe,p=u(s,c,"before"==d);return null!=m&&(p.other=u(s,m,"before"!=d)),p}function Vn(e,t){var o=0;t=gt(e.doc,t),e.options.lineWrapping||(o=Mn(e.display)*t.ch);var n=ot(e.doc,t.line),i=co(n)+Xo(e.display);return{left:o,right:o,top:i,bottom:i+n.height}}function $n(e,t,o,n,i){var l=ut(e,t,o);return l.xRel=i,n&&(l.outside=n),l}function Nn(e,t,o){var n=e.doc;if((o+=e.display.viewOffset)<0)return $n(n.first,0,null,-1,-1);var i=rt(n,o),l=n.first+n.size-1;if(i>l)return $n(n.first+n.size-1,ot(n,l).text.length,null,1,1);t<0&&(t=0);for(var a=ot(n,i);;){var r=Tn(e,a,i,t,o),s=to(a,r.ch+(r.xRel>0||r.outside>0?1:0));if(!s)return r;var d=s.find(1);if(d.line==i)return d;a=ot(n,i=d.line)}}function En(e,t,o,n){n-=wn(t);var i=t.text.length,l=me((function(t){return dn(e,o,t-1).bottom<=n}),i,0);return{begin:l,end:i=me((function(t){return dn(e,o,t).top>n}),l,i)}}function Bn(e,t,o,n){return o||(o=sn(e,t)),En(e,t,o,Cn(e,t,dn(e,o,n),"line").top)}function Dn(e,t,o,n){return!(e.bottom<=o)&&(e.top>o||(n?e.left:e.right)>t)}function Tn(e,t,o,n,i){i-=co(t);var l=sn(e,t),a=wn(t),r=0,s=t.text.length,d=!0,u=ge(t,e.doc.direction);if(u){var c=(e.options.lineWrapping?On:Fn)(e,t,o,l,u,n,i);r=(d=1!=c.level)?c.from:c.to-1,s=d?c.to:c.from-1}var m,p,f=null,h=null,v=me((function(t){var o=dn(e,l,t);return o.top+=a,o.bottom+=a,!!Dn(o,n,i,!1)&&(o.top<=i&&o.left<=n&&(f=t,h=o),!0)}),r,s),g=!1;if(h){var y=n-h.left=k.bottom?1:0}return $n(o,v=ce(t.text,v,1),p,g,n-m)}function Fn(e,t,o,n,i,l,a){var r=me((function(r){var s=i[r],d=1!=s.level;return Dn(Sn(e,ut(o,d?s.to:s.from,d?"before":"after"),"line",t,n),l,a,!0)}),0,i.length-1),s=i[r];if(r>0){var d=1!=s.level,u=Sn(e,ut(o,d?s.from:s.to,d?"after":"before"),"line",t,n);Dn(u,l,a,!0)&&u.top>a&&(s=i[r-1])}return s}function On(e,t,o,n,i,l,a){var r=En(e,t,n,a),s=r.begin,d=r.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var u=null,c=null,m=0;m=d||p.to<=s)){var f=dn(e,n,1!=p.level?Math.min(d,p.to)-1:Math.max(s,p.from)).right,h=fh)&&(u=p,c=h)}}return u||(u=i[i.length-1]),u.fromd&&(u={from:u.from,to:d,level:u.level}),u}function In(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==un){un=B("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)un.appendChild(document.createTextNode("x")),un.appendChild(B("br"));un.appendChild(document.createTextNode("x"))}E(e.measure,un);var o=un.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),N(e.measure),o||1}function Mn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=B("span","xxxxxxxxxx"),o=B("pre",[t],"CodeMirror-line-like");E(e.measure,o);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Pn(e){for(var t=e.display,o={},n={},i=t.gutters.clientLeft,l=t.gutters.firstChild,a=0;l;l=l.nextSibling,++a){var r=e.display.gutterSpecs[a].className;o[r]=l.offsetLeft+l.clientLeft+i,n[r]=l.clientWidth}return{fixedPos:Ln(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:o,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Ln(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function An(e){var t=In(e.display),o=e.options.lineWrapping,n=o&&Math.max(5,e.display.scroller.clientWidth/Mn(e.display)-3);return function(i){if(so(e.doc,i))return 0;var l=0;if(i.widgets)for(var a=0;a0&&(s=ot(e.doc,d.line).text).length==d.ch){var u=z(s,s.length,e.options.tabSize)-s.length;d=ut(d.line,Math.max(0,Math.round((l-Qo(e.display).left)/Mn(e.display))-u))}return d}function Un(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var o=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)It&&ao(e.doc,t)i.viewFrom?Gn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&o>=i.viewTo)Gn(e);else if(t<=i.viewFrom){var l=Hn(e,o,o+n,1);l?(i.view=i.view.slice(l.index),i.viewFrom=l.lineN,i.viewTo+=n):Gn(e)}else if(o>=i.viewTo){var a=Hn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Gn(e)}else{var r=Hn(e,t,t,-1),s=Hn(e,o,o+n,1);r&&s?(i.view=i.view.slice(0,r.index).concat(No(e,r.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Gn(e)}var d=i.externalMeasured;d&&(o=i.lineN&&t=n.viewTo)){var l=n.view[Un(e,t)];if(null!=l.node){var a=l.changes||(l.changes=[]);-1==G(a,o)&&a.push(o)}}}function Gn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Hn(e,t,o,n){var i,l=Un(e,t),a=e.display.view;if(!It||o==e.doc.first+e.doc.size)return{index:l,lineN:o};for(var r=e.display.viewFrom,s=0;s0){if(l==a.length-1)return null;i=r+a[l].size-t,l++}else i=r-t;t+=i,o+=i}for(;ao(e.doc,o)!=o;){if(l==(n<0?0:a.length-1))return null;o+=n*a[l-(n<0?1:0)].size,l+=n}return{index:l,lineN:o}}function Kn(e,t,o){var n=e.display;0==n.view.length||t>=n.viewTo||o<=n.viewFrom?(n.view=No(e,t,o),n.viewFrom=t):(n.viewFrom>t?n.view=No(e,t,n.viewFrom).concat(n.view):n.viewFromo&&(n.view=n.view.slice(0,Un(e,o)))),n.viewTo=o}function qn(e){for(var t=e.display.view,o=0,n=0;n=e.display.viewTo||s.to().line0?a:e.defaultCharWidth())+"px"}if(n.other){var r=o.appendChild(B("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));r.style.display="",r.style.left=n.other.left+"px",r.style.top=n.other.top+"px",r.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Qn(e,t){return e.top-t.top||e.left-t.left}function Zn(e,t,o){var n=e.display,i=e.doc,l=document.createDocumentFragment(),a=Qo(e.display),r=a.left,s=Math.max(n.sizerWidth,en(e)-n.sizer.offsetLeft)-a.right,d="ltr"==i.direction;function u(e,t,o,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),l.appendChild(B("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==o?s-e:o)+"px;\n height: "+(n-t)+"px"))}function c(t,o,n){var l,a,c=ot(i,t),m=c.text.length;function p(o,n){return xn(e,ut(t,o),"div",c,n)}function f(t,o,n){var i=Bn(e,c,null,t),l="ltr"==o==("after"==n)?"left":"right";return p("after"==n?i.begin:i.end-(/\s/.test(c.text.charAt(i.end-1))?2:1),l)[l]}var h=ge(c,i.direction);return pe(h,o||0,null==n?m:n,(function(e,t,i,c){var v="ltr"==i,g=p(e,v?"left":"right"),y=p(t-1,v?"right":"left"),b=null==o&&0==e,k=null==n&&t==m,w=0==c,C=!h||c==h.length-1;if(y.top-g.top<=3){var _=(d?k:b)&&C,x=(d?b:k)&&w?r:(v?g:y).left,S=_?s:(v?y:g).right;u(x,g.top,S-x,g.bottom)}else{var V,$,N,E;v?(V=d&&b&&w?r:g.left,$=d?s:f(e,i,"before"),N=d?r:f(t,i,"after"),E=d&&k&&C?s:y.right):(V=d?f(e,i,"before"):r,$=!d&&b&&w?s:g.right,N=!d&&k&&C?r:y.left,E=d?f(t,i,"after"):s),u(V,g.top,$-V,g.bottom),g.bottom0?t.blinker=setInterval((function(){e.hasFocus()||ii(e),t.cursorDiv.style.visibility=(o=!o)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ti(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ni(e))}function oi(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ii(e))}),100)}function ni(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ce(e,"focus",e,t),e.state.focused=!0,O(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),ei(e))}function ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ce(e,"blur",e,t),e.state.focused=!1,$(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function li(e){for(var t=e.display,o=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,l=0,s=0;s.005||h<-.005)&&(ie.display.sizerWidth){var g=Math.ceil(m/Mn(e.display));g>e.display.maxLineLength&&(e.display.maxLineLength=g,e.display.maxLine=d.line,e.display.maxLineChanged=!0)}}}Math.abs(l)>2&&(t.scroller.scrollTop+=l)}function ai(e){if(e.widgets)for(var t=0;t=a&&(l=rt(t,co(ot(t,s))-e.wrapper.clientHeight),a=s)}return{from:l,to:Math.max(a,l+1)}}function si(e,t){if(!_e(e,"scrollCursorIntoView")){var o=e.display,n=o.sizer.getBoundingClientRect(),i=null,l=o.wrapper.ownerDocument;if(t.top+n.top<0?i=!0:t.bottom+n.top>(l.defaultView.innerHeight||l.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var a=B("div","​",null,"position: absolute;\n top: "+(t.top-o.viewOffset-Xo(e.display))+"px;\n height: "+(t.bottom-t.top+Zo(e)+o.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function di(e,t,o,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=o||(o="before"==t.sticky?ut(t.line,t.ch+1,"before"):t,t=t.ch?ut(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var l=0;l<5;l++){var a=!1,r=Sn(e,t),s=o&&o!=t?Sn(e,o):r,d=ci(e,i={left:Math.min(r.left,s.left),top:Math.min(r.top,s.top)-n,right:Math.max(r.left,s.left),bottom:Math.max(r.bottom,s.bottom)+n}),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=d.scrollTop&&(yi(e,d.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=d.scrollLeft&&(ki(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(a=!0)),!a)break}return i}function ui(e,t){var o=ci(e,t);null!=o.scrollTop&&yi(e,o.scrollTop),null!=o.scrollLeft&&ki(e,o.scrollLeft)}function ci(e,t){var o=e.display,n=In(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=tn(e),a={};t.bottom-t.top>l&&(t.bottom=t.top+l);var r=e.doc.height+Jo(o),s=t.topr-n;if(t.topi+l){var u=Math.min(t.top,(d?r:t.bottom)-l);u!=i&&(a.scrollTop=u)}var c=e.options.fixedGutter?0:o.gutters.offsetWidth,m=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft-c,p=en(e)-o.gutters.offsetWidth,f=t.right-t.left>p;return f&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+m-3&&(a.scrollLeft=t.right+(f?0:10)-p),a}function mi(e,t){null!=t&&(vi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function pi(e){vi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,o){null==t&&null==o||vi(e),null!=t&&(e.curOp.scrollLeft=t),null!=o&&(e.curOp.scrollTop=o)}function hi(e,t){vi(e),e.curOp.scrollToPos=t}function vi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,gi(e,Vn(e,t.from),Vn(e,t.to),t.margin))}function gi(e,t,o,n){var i=ci(e,{left:Math.min(t.left,o.left),top:Math.min(t.top,o.top)-n,right:Math.max(t.right,o.right),bottom:Math.max(t.bottom,o.bottom)+n});fi(e,i.scrollLeft,i.scrollTop)}function yi(e,t){Math.abs(e.doc.scrollTop-t)<2||(o||Yi(e,{top:t}),bi(e,t,!0),o&&Yi(e),Wi(e,100))}function bi(e,t,o){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||o)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function ki(e,t,o,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(o?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Zi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function wi(e){var t=e.display,o=t.gutters.offsetWidth,n=Math.round(e.doc.height+Jo(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?o:0,docHeight:n,scrollHeight:n+Zo(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:o}}var Ci=function(e,t,o){this.cm=o;var n=this.vert=B("div",[B("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=B("div",[B("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),be(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),be(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&r<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ci.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,o=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(o){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=o?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var l=e.viewWidth-e.barLeft-(o?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+l)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:o?n:0,bottom:t?n:0}},Ci.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ci.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ci.prototype.zeroWidthHack=function(){var e=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new j,this.disableVert=new j},Ci.prototype.enableZeroWidthBar=function(e,t,o){function n(){var i=e.getBoundingClientRect();("vert"==o?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,n)}e.style.visibility="",t.set(1e3,n)},Ci.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var _i=function(){};function xi(e,t){t||(t=wi(e));var o=e.display.barWidth,n=e.display.barHeight;Si(e,t);for(var i=0;i<4&&o!=e.display.barWidth||n!=e.display.barHeight;i++)o!=e.display.barWidth&&e.options.lineWrapping&&li(e),Si(e,wi(e)),o=e.display.barWidth,n=e.display.barHeight}function Si(e,t){var o=e.display,n=o.scrollbars.update(t);o.sizer.style.paddingRight=(o.barWidth=n.right)+"px",o.sizer.style.paddingBottom=(o.barHeight=n.bottom)+"px",o.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(o.scrollbarFiller.style.display="block",o.scrollbarFiller.style.height=n.bottom+"px",o.scrollbarFiller.style.width=n.right+"px"):o.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(o.gutterFiller.style.display="block",o.gutterFiller.style.height=n.bottom+"px",o.gutterFiller.style.width=t.gutterWidth+"px"):o.gutterFiller.style.display=""}_i.prototype.update=function(){return{bottom:0,right:0}},_i.prototype.setScrollLeft=function(){},_i.prototype.setScrollTop=function(){},_i.prototype.clear=function(){};var Vi={native:Ci,null:_i};function $i(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&$(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Vi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),be(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,o){"horizontal"==o?ki(e,t):yi(e,t)}),e),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)}var Ni=0;function Ei(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ni,markArrays:null},Bo(e.curOp)}function Bi(e){var t=e.curOp;t&&To(t,(function(e){for(var t=0;t=o.viewTo)||o.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new zi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Fi(e){e.updatedDisplay=e.mustUpdate&&Ki(e.cm,e.update)}function Oi(e){var t=e.cm,o=t.display;e.updatedDisplay&&li(t),e.barMeasure=wi(t),o.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=an(t,o.maxLine,o.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(o.scroller.clientWidth,o.sizer.offsetLeft+e.adjustWidthTo+Zo(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,o.sizer.offsetLeft+e.adjustWidthTo-en(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=o.input.prepareSelection())}function Ii(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var o=+new Date+e.options.workTime,n=xt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(l){if(n.line>=e.display.viewFrom){var a=l.styles,r=l.text.length>e.options.maxHighlightLength?Qe(t.mode,n.state):null,s=Ct(e,l,n,!0);r&&(n.state=r),l.styles=s.styles;var d=l.styleClasses,u=s.classes;u?l.styleClasses=u:d&&(l.styleClasses=null);for(var c=!a||a.length!=l.styles.length||d!=u&&(!d||!u||d.bgClass!=u.bgClass||d.textClass!=u.textClass),m=0;!c&&mo)return Wi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Pi(e,(function(){for(var t=0;t=o.viewFrom&&t.visible.to<=o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>=o.viewTo)&&o.renderedView==o.view&&0==qn(e))return!1;el(e)&&(Gn(e),t.dims=Pn(e));var i=n.first+n.size,l=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);o.viewFroma&&o.viewTo-a<20&&(a=Math.min(i,o.viewTo)),It&&(l=ao(e.doc,l),a=ro(e.doc,a));var r=l!=o.viewFrom||a!=o.viewTo||o.lastWrapHeight!=t.wrapperHeight||o.lastWrapWidth!=t.wrapperWidth;Kn(e,l,a),o.viewOffset=co(ot(e.doc,o.viewFrom)),e.display.mover.style.top=o.viewOffset+"px";var s=qn(e);if(!r&&0==s&&!t.force&&o.renderedView==o.view&&(null==o.updateLineNumbers||o.updateLineNumbers>=o.viewTo))return!1;var d=Gi(e);return s>4&&(o.lineDiv.style.display="none"),Xi(e,o.updateLineNumbers,t.dims),s>4&&(o.lineDiv.style.display=""),o.renderedView=o.view,Hi(d),N(o.cursorDiv),N(o.selectionDiv),o.gutters.style.height=o.sizer.style.minHeight=0,r&&(o.lastWrapHeight=t.wrapperHeight,o.lastWrapWidth=t.wrapperWidth,Wi(e,400)),o.updateLineNumbers=null,!0}function qi(e,t){for(var o=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=en(e))n&&(t.visible=ri(e.display,e.doc,o));else if(o&&null!=o.top&&(o={top:Math.min(e.doc.height+Jo(e.display)-tn(e),o.top)}),t.visible=ri(e.display,e.doc,o),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ki(e,t))break;li(e);var i=wi(e);Yn(e),xi(e,i),Qi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Yi(e,t){var o=new zi(e,t);if(Ki(e,o)){li(e),qi(e,o);var n=wi(e);Yn(e),xi(e,n),Qi(e,n),o.finish()}}function Xi(e,t,o){var n=e.display,i=e.options.lineNumbers,l=n.lineDiv,a=l.firstChild;function r(t){var o=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),o}for(var d=n.view,u=n.viewFrom,c=0;c-1&&(p=!1),Mo(e,m,u,o)),p&&(N(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(dt(e.options,u)))),a=m.node.nextSibling}else{var f=jo(e,m,u,o);l.insertBefore(f,a)}u+=m.size}for(;a;)a=r(a)}function Ji(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Oo(e,"gutterChanged",e)}function Qi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Zo(e)+"px"}function Zi(e){var t=e.display,o=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Ln(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,l=n+"px",a=0;a=105&&(l.wrapper.style.clipPath="inset(0px)"),l.wrapper.setAttribute("translate","no"),a&&r<8&&(l.gutters.style.zIndex=-1,l.scroller.style.paddingRight=0),s||o&&y||(l.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(l.wrapper):e(l.wrapper)),l.viewFrom=l.viewTo=t.first,l.reportedViewFrom=l.reportedViewTo=t.first,l.view=[],l.renderedView=null,l.externalMeasured=null,l.viewOffset=0,l.lastWrapHeight=l.lastWrapWidth=0,l.updateLineNumbers=null,l.nativeBarWidth=l.barHeight=l.barWidth=0,l.scrollbarsClipped=!1,l.lineNumWidth=l.lineNumInnerWidth=l.lineNumChars=null,l.alignWidgets=!1,l.cachedCharWidth=l.cachedTextHeight=l.cachedPaddingH=null,l.maxLine=null,l.maxLineLength=0,l.maxLineChanged=!1,l.wheelDX=l.wheelDY=l.wheelStartX=l.wheelStartY=null,l.shift=!1,l.selForContextMenu=null,l.activeTouch=null,l.gutterSpecs=tl(i.gutters,i.lineNumbers),ol(l),n.init(l)}zi.prototype.signal=function(e,t){Se(e,t)&&this.events.push(arguments)},zi.prototype.finish=function(){for(var e=0;ed.clientWidth,f=d.scrollHeight>d.clientHeight;if(i&&p||l&&f){if(l&&b&&s)e:for(var h=t.target,v=r.view;h!=d;h=h.parentNode)for(var g=0;g=0&&ct(e,n.to())<=0)return o}return-1};var cl=function(e,t){this.anchor=e,this.head=t};function ml(e,t,o){var n=e&&e.options.selectionsMayTouch,i=t[o];t.sort((function(e,t){return ct(e.from(),t.from())})),o=G(t,i);for(var l=1;l0:s>=0){var d=ht(r.from(),a.from()),u=ft(r.to(),a.to()),c=r.empty()?a.from()==a.head:r.from()==r.head;l<=o&&--o,t.splice(--l,2,new cl(c?u:d,c?d:u))}}return new ul(t,o)}function pl(e,t){return new ul([new cl(e,t||e)],0)}function fl(e){return e.text?ut(e.from.line+e.text.length-1,ee(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function hl(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return fl(t);var o=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=fl(t).ch-t.to.ch),ut(o,n)}function vl(e,t){for(var o=[],n=0;n1&&e.remove(r.line+1,f-1),e.insert(r.line+1,g)}Oo(e,"change",e,t)}function _l(e,t,o){function n(e,i,l){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ee(e.done)):void 0}function Dl(e,t,o,n){var i=e.history;i.undone.length=0;var l,a,r=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>r-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(l=Bl(i,i.lastOp==n)))a=ee(l.changes),0==ct(t.from,t.to)&&0==ct(t.from,a.to)?a.to=fl(t):l.changes.push(Nl(e,t));else{var s=ee(i.done);for(s&&s.ranges||Ol(e.sel,i.done),l={changes:[Nl(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(o),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=r,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ce(e,"historyAdded")}function Tl(e,t,o,n){var i=t.charAt(0);return"*"==i||"+"==i&&o.ranges.length==n.ranges.length&&o.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Fl(e,t,o,n){var i=e.history,l=n&&n.origin;o==i.lastSelOp||l&&i.lastSelOrigin==l&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==l||Tl(e,l,ee(i.done),t))?i.done[i.done.length-1]=t:Ol(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=l,i.lastSelOp=o,n&&!1!==n.clearRedo&&El(i.undone)}function Ol(e,t){var o=ee(t);o&&o.ranges&&o.equals(e)||t.push(e)}function Il(e,t,o,n){var i=t["spans_"+e.id],l=0;e.iter(Math.max(e.first,o),Math.min(e.first+e.size,n),(function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[l]=o.markedSpans),++l}))}function Ml(e){if(!e)return null;for(var t,o=0;o-1&&(ee(r)[c]=d[c],delete d[c])}}}return n}function Rl(e,t,o,n){if(n){var i=e.anchor;if(o){var l=ct(t,i)<0;l!=ct(o,i)<0?(i=t,t=o):l!=ct(t,o)<0&&(t=o)}return new cl(i,t)}return new cl(o||t,t)}function Wl(e,t,o,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Kl(e,new ul([Rl(e.sel.primary(),t,o,i)],0),n)}function Ul(e,t,o){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),l=0;l=t.ch:r.to>t.ch))){if(i&&(Ce(s,"beforeCursorEnter"),s.explicitlyCleared)){if(l.markedSpans){--a;continue}break}if(!s.atomic)continue;if(o){var c=s.find(n<0?1:-1),m=void 0;if((n<0?u:d)&&(c=ea(e,c,-n,c&&c.line==t.line?l:null)),c&&c.line==t.line&&(m=ct(c,o))&&(n<0?m<0:m>0))return Ql(e,c,t,n,i)}var p=s.find(n<0?-1:1);return(n<0?d:u)&&(p=ea(e,p,n,p.line==t.line?l:null)),p?Ql(e,p,t,n,i):null}}return t}function Zl(e,t,o,n,i){var l=n||1,a=Ql(e,t,o,l,i)||!i&&Ql(e,t,o,l,!0)||Ql(e,t,o,-l,i)||!i&&Ql(e,t,o,-l,!0);return a||(e.cantEdit=!0,ut(e.first,0))}function ea(e,t,o,n){return o<0&&0==t.ch?t.line>e.first?gt(e,ut(t.line-1)):null:o>0&&t.ch==(n||ot(e,t.line)).text.length?t.line=0;--i)ia(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else ia(e,t)}}function ia(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ct(t.from,t.to)){var o=vl(e,t);Dl(e,t,o,e.cm?e.cm.curOp.id:NaN),ra(e,t,o,jt(e,t));var n=[];_l(e,(function(e,o){o||-1!=G(n,e.history)||(ma(e.history,t),n.push(e.history)),ra(e,t,null,jt(e,t))}))}}function la(e,t,o){var n=e.cm&&e.cm.state.suppressEdits;if(!n||o){for(var i,l=e.history,a=e.sel,r="undo"==t?l.done:l.undone,s="undo"==t?l.undone:l.done,d=0;d=0;--p){var f=m(p);if(f)return f.v}}}}function aa(e,t){if(0!=t&&(e.first+=t,e.sel=new ul(te(e.sel.ranges,(function(e){return new cl(ut(e.anchor.line+t,e.anchor.ch),ut(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){zn(e.cm,e.first,e.first-t,t);for(var o=e.cm.display,n=o.viewFrom;ne.lastLine())){if(t.from.linel&&(t={from:t.from,to:ut(l,ot(e,l).text.length),text:[t.text[0]],origin:t.origin}),t.removed=nt(e,t.from,t.to),o||(o=vl(e,t)),e.cm?sa(e.cm,t,n):Cl(e,t,n),ql(e,o,q),e.cantEdit&&Zl(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}}function sa(e,t,o){var n=e.doc,i=e.display,l=t.from,a=t.to,r=!1,s=l.line;e.options.lineWrapping||(s=at(no(ot(n,l.line))),n.iter(s,a.line+1,(function(e){if(e==i.maxLine)return r=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&xe(e),Cl(n,t,o,An(e)),e.options.lineWrapping||(n.iter(s,l.line+t.text.length,(function(e){var t=mo(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,r=!1)})),r&&(e.curOp.updateMaxLine=!0)),Ft(n,l.line),Wi(e,400);var d=t.text.length-(a.line-l.line)-1;t.full?zn(e):l.line!=a.line||1!=t.text.length||wl(e.doc,t)?zn(e,l.line,a.line+1,d):jn(e,l.line,"text");var u=Se(e,"changes"),c=Se(e,"change");if(c||u){var m={from:l,to:a,text:t.text,removed:t.removed,origin:t.origin};c&&Oo(e,"change",e,m),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(m)}e.display.selForContextMenu=null}function da(e,t,o,n,i){var l;n||(n=o),ct(n,o)<0&&(o=(l=[n,o])[0],n=l[1]),"string"==typeof t&&(t=e.splitLines(t)),na(e,{from:o,to:n,text:t,origin:i})}function ua(e,t,o,n){o1||!(this.children[0]instanceof fa))){var r=[];this.collapse(r),this.children=[new fa(r)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,r=a;r10);e.parent.maybeSpill()}},iterN:function(e,t,o){for(var n=0;n0||0==a&&!1!==l.clearWhenEmpty)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=D("span",[l.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(oo(e,t.line,t,o,l)||t.line!=o.line&&oo(e,o.line,t,o,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt()}l.addToHistory&&Dl(e,{from:t,to:o,origin:"markText"},e.sel,NaN);var r,s=t.line,d=e.cm;if(e.iter(s,o.line+1,(function(n){d&&l.collapsed&&!d.options.lineWrapping&&no(n)==d.display.maxLine&&(r=!0),l.collapsed&&s!=t.line&<(n,0),Wt(n,new Lt(l,s==t.line?t.ch:null,s==o.line?o.ch:null),e.cm&&e.cm.curOp),++s})),l.collapsed&&e.iter(t.line,o.line+1,(function(t){so(e,t)&<(t,0)})),l.clearOnEnter&&be(l,"beforeCursorEnter",(function(){return l.clear()})),l.readOnly&&(Mt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++ba,l.atomic=!0),d){if(r&&(d.curOp.updateMaxLine=!0),l.collapsed)zn(d,t.line,o.line+1);else if(l.className||l.startStyle||l.endStyle||l.css||l.attributes||l.title)for(var u=t.line;u<=o.line;u++)jn(d,u,"text");l.atomic&&Xl(d.doc),Oo(d,"markerAdded",d,l)}return l}ka.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ei(e),Se(this,"clear")){var o=this.find();o&&Oo(this,"clear",o.from,o.to)}for(var n=null,i=null,l=0;le.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&zn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xl(e.doc)),e&&Oo(e,"markerCleared",e,this,n,i),t&&Bi(e),this.parent&&this.parent.clear()}},ka.prototype.find=function(e,t){var o,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)na(this,n[s]);r?Hl(this,r):this.cm&&pi(this.cm)})),undo:Ri((function(){la(this,"undo")})),redo:Ri((function(){la(this,"redo")})),undoSelection:Ri((function(){la(this,"undo",!0)})),redoSelection:Ri((function(){la(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,o=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,o){e=gt(this,e),t=gt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(l){var a=l.markedSpans;if(a)for(var r=0;r=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||o&&!o(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var o=t.markedSpans;if(o)for(var n=0;ne)return t=e,!0;e-=l,++o})),gt(this,ut(o,t))},indexFromPos:function(e){var t=(e=gt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var c=e.dataTransfer.getData("Text");if(c){var m;if(t.state.draggingText&&!t.state.draggingText.copy&&(m=t.listSelections()),ql(t.doc,pl(o,o)),m)for(var p=0;p=0;t--)da(e.doc,"",n[t].from,n[t].to,"+delete");pi(e)}))}function Qa(e,t,o){var n=ce(e.text,t+o,o);return n<0||n>e.text.length?null:n}function Za(e,t,o){var n=Qa(e,t.ch,o);return null==n?null:new ut(t.line,n,o<0?"after":"before")}function er(e,t,o,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var l=ge(o,t.doc.direction);if(l){var a,r=i<0?ee(l):l[0],s=i<0==(1==r.level)?"after":"before";if(r.level>0||"rtl"==t.doc.direction){var d=sn(t,o);a=i<0?o.text.length-1:0;var u=dn(t,d,a).top;a=me((function(e){return dn(t,d,e).top==u}),i<0==(1==r.level)?r.from:r.to-1,a),"before"==s&&(a=Qa(o,a,1))}else a=i<0?r.to:r.from;return new ut(n,a,s)}}return new ut(n,i<0?o.text.length:0,i<0?"before":"after")}function tr(e,t,o,n){var i=ge(t,e.doc.direction);if(!i)return Za(t,o,n);o.ch>=t.text.length?(o.ch=t.text.length,o.sticky="before"):o.ch<=0&&(o.ch=0,o.sticky="after");var l=he(i,o.ch,o.sticky),a=i[l];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>o.ch:a.from=a.from&&m>=u.begin)){var p=c?"before":"after";return new ut(o.line,m,p)}}var f=function(e,t,n){for(var l=function(e,t){return t?new ut(o.line,s(e,1),"before"):new ut(o.line,e,"after")};e>=0&&e0==(1!=a.level),d=r?n.begin:s(n.end,-1);if(a.from<=d&&d0?u.end:s(u.begin,-1);return null==v||n>0&&v==t.text.length||!(h=f(n>0?0:i.length-1,n,d(v)))?null:h}za.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"},za.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},za.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},za.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},za.default=b?za.macDefault:za.pcDefault;var or={selectAll:ta,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(e){return Ja(e,(function(t){if(t.empty()){var o=ot(e.doc,t.head.line).text.length;return t.head.ch==o&&t.head.line0)i=new ut(i.line,i.ch+1),e.replaceRange(l.charAt(i.ch-1)+l.charAt(i.ch-2),ut(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=ot(e.doc,i.line-1).text;a&&(i=new ut(i.line,1),e.replaceRange(l.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ut(i.line-1,a.length-1),i,"+transpose"))}o.push(new cl(i,i))}e.setSelections(o)}))},newlineAndIndent:function(e){return Pi(e,(function(){for(var t=e.listSelections(),o=t.length-1;o>=0;o--)e.replaceRange(e.doc.lineSeparator(),t[o].anchor,t[o].head,"+input");t=e.listSelections();for(var n=0;n-1&&(ct((i=r.ranges[i]).from(),t)<0||t.xRel>0)&&(ct(i.to(),t)>0||t.xRel<0)?$r(e,n,t,l):Er(e,n,t,l)}function $r(e,t,o,n){var i=e.display,l=!1,d=Li(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:oi(e)),we(i.wrapper.ownerDocument,"mouseup",d),we(i.wrapper.ownerDocument,"mousemove",u),we(i.scroller,"dragstart",c),we(i.scroller,"drop",d),l||($e(t),n.addNew||Wl(e.doc,o,null,null,n.extend),s&&!p||a&&9==r?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){l=l||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},c=function(){return l=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=d,d.copy=!n.moveOnDrag,be(i.wrapper.ownerDocument,"mouseup",d),be(i.wrapper.ownerDocument,"mousemove",u),be(i.scroller,"dragstart",c),be(i.scroller,"drop",d),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Nr(e,t,o){if("char"==o)return new cl(t,t);if("word"==o)return e.findWordAt(t);if("line"==o)return new cl(ut(t.line,0),gt(e.doc,ut(t.line+1,0)));var n=o(e,t);return new cl(n.from,n.to)}function Er(e,t,o,n){a&&oi(e);var i=e.display,l=e.doc;$e(t);var r,s,d=l.sel,u=d.ranges;if(n.addNew&&!n.extend?(s=l.sel.contains(o),r=s>-1?u[s]:new cl(o,o)):(r=l.sel.primary(),s=l.sel.primIndex),"rectangle"==n.unit)n.addNew||(r=new cl(o,o)),o=Wn(e,t,!0,!0),s=-1;else{var c=Nr(e,o,n.unit);r=n.extend?Rl(r,c.anchor,c.head,n.extend):c}n.addNew?-1==s?(s=u.length,Kl(l,ml(e,u.concat([r]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?(Kl(l,ml(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),d=l.sel):zl(l,s,r,Y):(s=0,Kl(l,new ul([r],0),Y),d=l.sel);var m=o;function p(t){if(0!=ct(m,t))if(m=t,"rectangle"==n.unit){for(var i=[],a=e.options.tabSize,u=z(ot(l,o.line).text,o.ch,a),c=z(ot(l,t.line).text,t.ch,a),p=Math.min(u,c),f=Math.max(u,c),h=Math.min(o.line,t.line),v=Math.min(e.lastLine(),Math.max(o.line,t.line));h<=v;h++){var g=ot(l,h).text,y=J(g,p,a);p==f?i.push(new cl(ut(h,y),ut(h,y))):g.length>y&&i.push(new cl(ut(h,y),ut(h,J(g,f,a))))}i.length||i.push(new cl(o,o)),Kl(l,ml(e,d.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,k=r,w=Nr(e,t,n.unit),C=k.anchor;ct(w.anchor,C)>0?(b=w.head,C=ht(k.from(),w.anchor)):(b=w.anchor,C=ft(k.to(),w.head));var _=d.ranges.slice(0);_[s]=Br(e,new cl(gt(l,C),b)),Kl(l,ml(e,_,s),Y)}}var f=i.wrapper.getBoundingClientRect(),h=0;function v(t){var o=++h,a=Wn(e,t,!0,"rectangle"==n.unit);if(a)if(0!=ct(a,m)){e.curOp.focus=F(L(e)),p(a);var r=ri(i,l);(a.line>=r.to||a.linef.bottom?20:0;s&&setTimeout(Li(e,(function(){h==o&&(i.scroller.scrollTop+=s,v(t))})),50)}}function g(t){e.state.selectingText=!1,h=1/0,t&&($e(t),i.input.focus()),we(i.wrapper.ownerDocument,"mousemove",y),we(i.wrapper.ownerDocument,"mouseup",b),l.history.lastSelOrigin=null}var y=Li(e,(function(e){0!==e.buttons&&Te(e)?v(e):g(e)})),b=Li(e,g);e.state.selectingText=b,be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b)}function Br(e,t){var o=t.anchor,n=t.head,i=ot(e.doc,o.line);if(0==ct(o,n)&&o.sticky==n.sticky)return t;var l=ge(i);if(!l)return t;var a=he(l,o.ch,o.sticky),r=l[a];if(r.from!=o.ch&&r.to!=o.ch)return t;var s,d=a+(r.from==o.ch==(1!=r.level)?0:1);if(0==d||d==l.length)return t;if(n.line!=o.line)s=(n.line-o.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=he(l,n.ch,n.sticky),c=u-a||(n.ch-o.ch)*(1==r.level?-1:1);s=u==d-1||u==d?c<0:c>0}var m=l[d+(s?-1:0)],p=s==(1==m.level),f=p?m.from:m.to,h=p?"after":"before";return o.ch==f&&o.sticky==h?t:new cl(new ut(o.line,f,h),n)}function Dr(e,t,o,n){var i,l;if(t.touches)i=t.touches[0].clientX,l=t.touches[0].clientY;else try{i=t.clientX,l=t.clientY}catch(u){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&$e(t);var a=e.display,r=a.lineDiv.getBoundingClientRect();if(l>r.bottom||!Se(e,o))return Ee(t);l-=r.top-a.viewOffset;for(var s=0;s=i)return Ce(e,o,e,rt(e.doc,l),e.display.gutterSpecs[s].className,t),Ee(t)}}function Tr(e,t){return Dr(e,t,"gutterClick",!0)}function Fr(e,t){Yo(e.display,t)||Or(e,t)||_e(e,t,"contextmenu")||x||e.display.input.onContextMenu(t)}function Or(e,t){return!!Se(e,"gutterContextMenu")&&Dr(e,t,"gutterContextMenu",!1)}function Ir(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),yn(e)}wr.prototype.compare=function(e,t,o){return this.time+kr>e&&0==ct(t,this.pos)&&o==this.button};var Mr={toString:function(){return"CodeMirror.Init"}},Pr={},Lr={};function Ar(e){var t=e.optionHandlers;function o(o,n,i,l){e.defaults[o]=n,i&&(t[o]=l?function(e,t,o){o!=Mr&&i(e,t,o)}:i)}e.defineOption=o,e.Init=Mr,o("value","",(function(e,t){return e.setValue(t)}),!0),o("mode",null,(function(e,t){e.doc.modeOption=t,bl(e)}),!0),o("indentUnit",2,bl,!0),o("indentWithTabs",!1),o("smartIndent",!0),o("tabSize",4,(function(e){kl(e),yn(e),zn(e)}),!0),o("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var o=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var l=e.text.indexOf(t,i);if(-1==l)break;i=l+t.length,o.push(ut(n,l))}n++}));for(var i=o.length-1;i>=0;i--)da(e.doc,t,o[i],ut(o[i].line,o[i].ch+t.length))}})),o("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,o){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),o!=Mr&&e.refresh()})),o("specialCharPlaceholder",wo,(function(e){return e.refresh()}),!0),o("electricChars",!0),o("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),o("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),o("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),o("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),o("rtlMoveVisually",!w),o("wholeLineUpdateBefore",!0),o("theme","default",(function(e){Ir(e),nl(e)}),!0),o("keyMap","default",(function(e,t,o){var n=Xa(t),i=o!=Mr&&Xa(o);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),o("extraKeys",null),o("configureMouse",null),o("lineWrapping",!1,Wr,!0),o("gutters",[],(function(e,t){e.display.gutterSpecs=tl(t,e.options.lineNumbers),nl(e)}),!0),o("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Ln(e.display)+"px":"0",e.refresh()}),!0),o("coverGutterNextToScrollbar",!1,(function(e){return xi(e)}),!0),o("scrollbarStyle","native",(function(e){$i(e),xi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),o("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=tl(e.options.gutters,t),nl(e)}),!0),o("firstLineNumber",1,nl,!0),o("lineNumberFormatter",(function(e){return e}),nl,!0),o("showCursorWhenSelecting",!1,Yn,!0),o("resetSelectionOnContextMenu",!0),o("lineWiseCopyCut",!0),o("pasteLinesPerSelection",!0),o("selectionsMayTouch",!1),o("readOnly",!1,(function(e,t){"nocursor"==t&&(ii(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),o("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),o("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),o("dragDrop",!0,Rr),o("allowDropFileTypes",null),o("cursorBlinkRate",530),o("cursorScrollMargin",0),o("cursorHeight",1,Yn,!0),o("singleCursorHeightPerLine",!0,Yn,!0),o("workTime",100),o("workDelay",100),o("flattenSpans",!0,kl,!0),o("addModeClass",!1,kl,!0),o("pollInterval",100),o("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),o("historyEventDelay",1250),o("viewportMargin",10,(function(e){return e.refresh()}),!0),o("maxHighlightLength",1e4,kl,!0),o("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),o("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),o("autofocus",null),o("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),o("phrases",null)}function Rr(e,t,o){if(!t!=!(o&&o!=Mr)){var n=e.display.dragFunctions,i=t?be:we;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Wr(e){e.options.lineWrapping?(O(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):($(e.display.wrapper,"CodeMirror-wrap"),po(e)),Rn(e),zn(e),yn(e),setTimeout((function(){return xi(e)}),100)}function Ur(e,t){var o=this;if(!(this instanceof Ur))return new Ur(e,t);this.options=t=t?U(t):{},U(Pr,t,!1);var n=t.value;"string"==typeof n?n=new Na(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ur.inputStyles[t.inputStyle](this),l=this.display=new il(e,n,i,t);for(var d in l.wrapper.CodeMirror=this,Ir(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),$i(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},t.autofocus&&!y&&l.input.focus(),a&&r<11&&setTimeout((function(){return o.display.input.reset(!0)}),20),zr(this),Ma(),Ei(this),this.curOp.forceUpdate=!0,xl(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){o.hasFocus()&&!o.state.focused&&ni(o)}),20):ii(this),Lr)Lr.hasOwnProperty(d)&&Lr[d](this,t[d],Mr);el(this),t.finishInit&&t.finishInit(this);for(var u=0;u400}be(t.scroller,"touchstart",(function(i){if(!_e(e,i)&&!l(i)&&!Tr(e,i)){t.input.ensurePolled(),clearTimeout(o);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),be(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),be(t.scroller,"touchend",(function(o){var n=t.activeTouch;if(n&&!Yo(t,o)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,a=e.coordsChar(t.activeTouch,"page");l=!n.prev||s(n,n.prev)?new cl(a,a):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(a):new cl(ut(a.line,0),gt(e.doc,ut(a.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),$e(o)}i()})),be(t.scroller,"touchcancel",i),be(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(yi(e,t.scroller.scrollTop),ki(e,t.scroller.scrollLeft,!0),Ce(e,"scroll",e))})),be(t.scroller,"mousewheel",(function(t){return dl(e,t)})),be(t.scroller,"DOMMouseScroll",(function(t){return dl(e,t)})),be(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){_e(e,t)||Be(t)},over:function(t){_e(e,t)||(Ta(e,t),Be(t))},start:function(t){return Da(e,t)},drop:Li(e,Ba),leave:function(t){_e(e,t)||Fa(e)}};var d=t.input.getField();be(d,"keyup",(function(t){return vr.call(e,t)})),be(d,"keydown",Li(e,fr)),be(d,"keypress",Li(e,gr)),be(d,"focus",(function(t){return ni(e,t)})),be(d,"blur",(function(t){return ii(e,t)}))}Ur.defaults=Pr,Ur.optionHandlers=Lr;var jr=[];function Gr(e,t,o,n){var i,l=e.doc;null==o&&(o="add"),"smart"==o&&(l.mode.indent?i=xt(e,t).state:o="prev");var a=e.options.tabSize,r=ot(l,t),s=z(r.text,null,a);r.stateAfter&&(r.stateAfter=null);var d,u=r.text.match(/^\s*/)[0];if(n||/\S/.test(r.text)){if("smart"==o&&((d=l.mode.indent(i,r.text.slice(u.length),r.text))==K||d>150)){if(!n)return;o="prev"}}else d=0,o="not";"prev"==o?d=t>l.first?z(ot(l,t-1).text,null,a):0:"add"==o?d=s+e.options.indentUnit:"subtract"==o?d=s-e.options.indentUnit:"number"==typeof o&&(d=s+o),d=Math.max(0,d);var c="",m=0;if(e.options.indentWithTabs)for(var p=Math.floor(d/a);p;--p)m+=a,c+="\t";if(ma,s=Ae(t),d=null;if(r&&n.ranges.length>1)if(Hr&&Hr.text.join("\n")==t){if(n.ranges.length%Hr.text.length==0){d=[];for(var u=0;u=0;m--){var p=n.ranges[m],f=p.from(),h=p.to();p.empty()&&(o&&o>0?f=ut(f.line,f.ch-o):e.state.overwrite&&!r?h=ut(h.line,Math.min(ot(l,h.line).text.length,h.ch+ee(s).length)):r&&Hr&&Hr.lineWise&&Hr.text.join("\n")==s.join("\n")&&(f=h=ut(f.line,0)));var v={from:f,to:h,text:d?d[m%d.length]:s,origin:i||(r?"paste":e.state.cutIncoming>a?"cut":"+input")};na(e.doc,v),Oo(e,"inputRead",e,v)}t&&!r&&Xr(e,t),pi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=c),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Yr(e,t){var o=e.clipboardData&&e.clipboardData.getData("Text");if(o)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Pi(t,(function(){return qr(t,o,0,null,"paste")})),!0}function Xr(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var o=e.doc.sel,n=o.ranges.length-1;n>=0;n--){var i=o.ranges[n];if(!(i.head.ch>100||n&&o.ranges[n-1].head.line==i.head.line)){var l=e.getModeAt(i.head),a=!1;if(l.electricChars){for(var r=0;r-1){a=Gr(e,i.head.line,"smart");break}}else l.electricInput&&l.electricInput.test(ot(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Gr(e,i.head.line,"smart"));a&&Oo(e,"electricInput",e,i.head.line)}}}function Jr(e){for(var t=[],o=[],n=0;no&&(Gr(this,i.head.line,e,!0),o=i.head.line,n==this.doc.sel.primIndex&&pi(this));else{var l=i.from(),a=i.to(),r=Math.max(o,l.line);o=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=r;s0&&zl(this.doc,n,new cl(l,d[n].to()),q)}}})),getTokenAt:function(e,t){return Et(this,e,t)},getLineTokens:function(e,t){return Et(this,ut(e),t,!0)},getTokenTypeAt:function(e){e=gt(this.doc,e);var t,o=_t(this,ot(this.doc,e.line)),n=0,i=(o.length-1)/2,l=e.ch;if(0==l)t=o[2];else for(;;){var a=n+i>>1;if((a?o[2*a-1]:0)>=l)i=a;else{if(!(o[2*a+1]l&&(e=l,i=!0),n=ot(this.doc,e)}else n=e;return Cn(this,n,{top:0,left:0},t||"page",o||i).top+(i?this.doc.height-co(n):0)},defaultTextHeight:function(){return In(this.display)},defaultCharWidth:function(){return Mn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,o,n,i){var l=this.display,a=(e=Sn(this,gt(this.doc,e))).bottom,r=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),r+t.offsetWidth>d&&(r=d-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(r=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?r=0:"middle"==i&&(r=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=r+"px"),o&&ui(this,{left:r,top:a,right:r+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ai(fr),triggerOnKeyPress:Ai(gr),triggerOnKeyUp:vr,triggerOnMouseDown:Ai(_r),execCommand:function(e){if(or.hasOwnProperty(e))return or[e].call(null,this)},triggerElectric:Ai((function(e){Xr(this,e)})),findPosH:function(e,t,o,n){var i=1;t<0&&(i=-1,t=-t);for(var l=gt(this.doc,e),a=0;a0&&a(t.charAt(o-1));)--o;for(;n.5||this.options.lineWrapping)&&Rn(this),Ce(this,"refresh",this)})),swapDoc:Ai((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),xl(this,e),yn(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Oo(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ve(e),e.registerHelper=function(t,n,i){o.hasOwnProperty(t)||(o[t]=e[t]={_global:[]}),o[t][n]=i},e.registerGlobalHelper=function(t,n,i,l){e.registerHelper(t,n,l),o[t]._global.push({pred:i,val:l})}}function ts(e,t,o,n,i){var l=t,a=o,r=ot(e,t.line),s=i&&"rtl"==e.direction?-o:o;function d(){var o=t.line+s;return!(o=e.first+e.size)&&(t=new ut(o,t.ch,t.sticky),r=ot(e,o))}function u(l){var a;if("codepoint"==n){var u=r.text.charCodeAt(t.ch+(o>0?0:-1));if(isNaN(u))a=null;else{var c=o>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new ut(t.line,Math.max(0,Math.min(r.text.length,t.ch+o*(c?2:1))),-o)}}else a=i?tr(e.cm,r,t,o):Za(r,t,o);if(null==a){if(l||!d())return!1;t=er(i,e.cm,r,t.line,s)}else t=a;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var c=null,m="group"==n,p=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(o<0)||u(!f);f=!1){var h=r.text.charAt(t.ch)||"\n",v=re(h,p)?"w":m&&"\n"==h?"n":!m||/\s/.test(h)?null:"p";if(!m||f||v||(v="s"),c&&c!=v){o<0&&(o=1,u(),t.sticky="after");break}if(v&&(c=v),o>0&&!u(!f))break}var g=Zl(e,t,l,a,!0);return mt(l,g)&&(g.hitSide=!0),g}function os(e,t,o,n){var i,l,a=e.doc,r=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,R(e).innerHeight||a(e).documentElement.clientHeight),d=Math.max(s-.5*In(e.display),3);i=(o>0?t.bottom:t.top)+o*d}else"line"==n&&(i=o>0?t.bottom+3:t.top-3);for(;(l=Nn(e,r,i)).outside;){if(o<0?i<=0:i>=a.height){l.hitSide=!0;break}i+=5*o}return l}var ns=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function is(e,t){var o=rn(e,t.line);if(!o||o.hidden)return null;var n=ot(e.doc,t.line),i=nn(o,n,t.line),l=ge(n,e.doc.direction),a="left";l&&(a=he(l,t.ch)%2?"right":"left");var r=mn(i.map,t.ch,a);return r.offset="right"==r.collapse?r.end:r.start,r}function ls(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function as(e,t){return t&&(e.bad=!0),e}function rs(e,t,o,n,i){var l="",a=!1,r=e.doc.lineSeparator(),s=!1;function d(e){return function(t){return t.id==e}}function u(){a&&(l+=r,s&&(l+=r),a=s=!1)}function c(e){e&&(u(),l+=e)}function m(t){if(1==t.nodeType){var o=t.getAttribute("cm-text");if(o)return void c(o);var l,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(ut(n,0),ut(i+1,0),d(+p));return void(f.length&&(l=f[0].find(0))&&c(nt(e.doc,l.from,l.to).join(r)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var v=0;v=t.display.viewTo||l.line=t.display.viewFrom&&is(t,i)||{node:s[0].measure.map[2],offset:0},u=l.linen.firstLine()&&(a=ut(a.line-1,ot(n.doc,a.line-1).length)),r.ch==ot(n.doc,r.line).text.length&&r.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Un(n,a.line))?(t=at(i.view[0].line),o=i.view[0].node):(t=at(i.view[e].line),o=i.view[e-1].node.nextSibling);var s,d,u=Un(n,r.line);if(u==i.view.length-1?(s=i.viewTo-1,d=i.lineDiv.lastChild):(s=at(i.view[u+1].line)-1,d=i.view[u+1].node.previousSibling),!o)return!1;for(var c=n.doc.splitLines(rs(n,o,d,t,s)),m=nt(n.doc,ut(t,0),ut(s,ot(n.doc,s).text.length));c.length>1&&m.length>1;)if(ee(c)==ee(m))c.pop(),m.pop(),s--;else{if(c[0]!=m[0])break;c.shift(),m.shift(),t++}for(var p=0,f=0,h=c[0],v=m[0],g=Math.min(h.length,v.length);pa.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)p--,f++;c[c.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),c[0]=c[0].slice(p).replace(/\u200b+$/,"");var w=ut(t,p),C=ut(s,m.length?ee(m).length-f:0);return c.length>1||c[0]||ct(w,C)?(da(n.doc,c,w,C,"+input"),!0):void 0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},ns.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Pi(this.cm,(function(){return zn(e.cm)}))},ns.prototype.setUneditable=function(e){e.contentEditable="false"},ns.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Li(this.cm,qr)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ns.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0;var us=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null,this.resetting=!1};function cs(e,t){if((t=t?U(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var o=F(A(e));t.autofocus=o==e||null!=e.getAttribute("autofocus")&&o==document.body}function n(){e.value=r.getValue()}var i;if(e.form&&(be(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var l=e.form;i=l.submit;try{var a=l.submit=function(){n(),l.submit=i,l.submit(),l.submit=a}}catch(Le){}}t.finishInit=function(o){o.save=n,o.getTextArea=function(){return e},o.toTextArea=function(){o.toTextArea=isNaN,n(),e.parentNode.removeChild(o.getWrapperElement()),e.style.display="",e.form&&(we(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var r=Ur((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return r}function ms(e){e.off=we,e.on=be,e.wheelEventPixels=sl,e.Doc=Na,e.splitLines=Ae,e.countColumn=z,e.findColumn=J,e.isWordChar=ae,e.Pass=K,e.signal=Ce,e.Line=fo,e.changeEnd=fl,e.scrollbarModel=Vi,e.Pos=ut,e.cmpPos=ct,e.modes=je,e.mimeModes=Ge,e.resolveMode=qe,e.getMode=Ye,e.modeExtensions=Xe,e.extendMode=Je,e.copyState=Qe,e.startState=et,e.innerMode=Ze,e.commands=or,e.keyMap=za,e.keyName=Ya,e.isModifierKey=Ka,e.lookupKey=Ha,e.normalizeKeyMap=Ga,e.StringStream=tt,e.SharedTextMarker=Ca,e.TextMarker=ka,e.LineWidget=va,e.e_preventDefault=$e,e.e_stopPropagation=Ne,e.e_stop=Be,e.addClass=O,e.contains=T,e.rmClass=$,e.keyNames=Aa}us.prototype.init=function(e){var t=this,o=this,n=this.cm;this.createField(e);var i=this.textarea;function l(e){if(!_e(n,e)){if(n.somethingSelected())Kr({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Jr(n);Kr({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,q):(o.prevInput="",i.value=t.text.join("\n"),M(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(i.style.width="0px"),be(i,"input",(function(){a&&r>=9&&t.hasSelection&&(t.hasSelection=null),o.poll()})),be(i,"paste",(function(e){_e(n,e)||Yr(e,n)||(n.state.pasteIncoming=+new Date,o.fastPoll())})),be(i,"cut",l),be(i,"copy",l),be(e.scroller,"paste",(function(t){if(!Yo(e,t)&&!_e(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void o.focus();var l=new Event("paste");l.clipboardData=t.clipboardData,i.dispatchEvent(l)}})),be(e.lineSpace,"selectstart",(function(t){Yo(e,t)||$e(t)})),be(i,"compositionstart",(function(){var e=n.getCursor("from");o.composing&&o.composing.range.clear(),o.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),be(i,"compositionend",(function(){o.composing&&(o.poll(),o.composing.range.clear(),o.composing=null)}))},us.prototype.createField=function(e){this.wrapper=Zr(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Qr(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},us.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},us.prototype.prepareSelection=function(){var e=this.cm,t=e.display,o=e.doc,n=Xn(e);if(e.options.moveInputWithCursor){var i=Sn(e,o.sel.primary().head,"div"),l=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-l.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-l.left))}return n},us.prototype.showSelection=function(e){var t=this.cm.display;E(t.cursorDiv,e.cursors),E(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},us.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var o=t.getSelection();this.textarea.value=o,t.state.focused&&M(this.textarea),a&&r>=9&&(this.hasSelection=o)}else e||(this.prevInput=this.textarea.value="",a&&r>=9&&(this.hasSelection=null));this.resetting=!1}},us.prototype.getField=function(){return this.textarea},us.prototype.supportsTouch=function(){return!1},us.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||F(A(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(Le){}},us.prototype.blur=function(){this.textarea.blur()},us.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},us.prototype.receivedFocus=function(){this.slowPoll()},us.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},us.prototype.fastPoll=function(){var e=!1,t=this;function o(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,o))}t.pollingFast=!0,t.polling.set(20,o)},us.prototype.poll=function(){var e=this,t=this.cm,o=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Re(o)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=o.value;if(i==n&&!t.somethingSelected())return!1;if(a&&r>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var l=i.charCodeAt(0);if(8203!=l||n||(n="​"),8666==l)return this.reset(),this.cm.execCommand("undo")}for(var s=0,d=Math.min(n.length,i.length);s1e3||i.indexOf("\n")>-1?o.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},us.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},us.prototype.onKeyPress=function(){a&&r>=9&&(this.hasSelection=null),this.fastPoll()},us.prototype.onContextMenu=function(e){var t=this,o=t.cm,n=o.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var l=Wn(o,e),d=n.scroller.scrollTop;if(l&&!m){o.options.resetSelectionOnContextMenu&&-1==o.doc.sel.contains(l)&&Li(o,Kl)(o.doc,pl(l),q);var u,c=i.style.cssText,p=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(u=i.ownerDocument.defaultView.scrollY),n.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,u),n.input.reset(),o.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=g,n.selForContextMenu=o.doc.sel,clearTimeout(n.detectingSelectAll),a&&r>=9&&v(),x){Be(e);var h=function(){we(window,"mouseup",h),setTimeout(g,20)};be(window,"mouseup",h)}else setTimeout(g,50)}function v(){if(null!=i.selectionStart){var e=o.somethingSelected(),l="​"+(e?i.value:"");i.value="⇚",i.value=l,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=l.length,n.selForContextMenu=o.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=c,a&&r<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=d),null!=i.selectionStart)){(!a||a&&r<9)&&v();var e=0,l=function(){n.selForContextMenu==o.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Li(o,ta)(o):e++<10?n.detectingSelectAll=setTimeout(l,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(l,200)}}},us.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},us.prototype.setUneditable=function(){},us.prototype.needsContentAttribute=!1,Ar(Ur),es(Ur);var ps="iter insert remove copy getEditor constructor".split(" ");for(var fs in Na.prototype)Na.prototype.hasOwnProperty(fs)&&G(ps,fs)<0&&(Ur.prototype[fs]=function(e){return function(){return e.apply(this.doc,arguments)}}(Na.prototype[fs]));return Ve(Na),Ur.inputStyles={textarea:us,contenteditable:ns},Ur.defineMode=function(e){Ur.defaults.mode||"null"==e||(Ur.defaults.mode=e),He.apply(this,arguments)},Ur.defineMIME=Ke,Ur.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ur.defineMIME("text/plain","null"),Ur.defineExtension=function(e,t){Ur.prototype[e]=t},Ur.defineDocExtension=function(e,t){Na.prototype[e]=t},Ur.fromTextArea=cs,ms(Ur),Ur.version="5.65.18",Ur}()}(codemirror$1);var CodeMirror=codemirror$1.exports,codemirror="",CodeMirror2;(CodeMirror2=codemirror$1.exports).defineMode("javascript",(function(e,t){var o,n,i=e.indentUnit,l=t.statementIndent,a=t.jsonld,r=t.json||a,s=!1!==t.trackScope,d=t.typescript,u=t.wordCharacters||/[\w$\xa1-\uffff]/,c=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),o=e("keyword b"),n=e("keyword c"),i=e("keyword d"),l=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:o,do:o,try:o,finally:o,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:l,typeof:l,instanceof:l,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),m=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function f(e){for(var t,o=!1,n=!1;null!=(t=e.next());){if(!o){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}o=!o&&"\\"==t}}function h(e,t,i){return o=e,n=i,t}function v(e,t){var o=e.next();if('"'==o||"'"==o)return t.tokenize=g(o),t.tokenize(e,t);if("."==o&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return h("number","number");if("."==o&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(o))return h(o);if("="==o&&e.eat(">"))return h("=>","operator");if("0"==o&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return h("number","number");if(/\d/.test(o))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),h("number","number");if("/"==o)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):nt(e,t,1)?(f(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),h("regexp","string-2")):(e.eat("="),h("operator","operator",e.current()));if("`"==o)return t.tokenize=b,b(e,t);if("#"==o&&"!"==e.peek())return e.skipToEnd(),h("meta","meta");if("#"==o&&e.eatWhile(u))return h("variable","property");if("<"==o&&e.match("!--")||"-"==o&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),h("comment","comment");if(m.test(o))return">"==o&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=o&&"="!=o||e.eat("="):/[<>*+\-|&?]/.test(o)&&(e.eat(o),">"==o&&e.eat(o))),"?"==o&&e.eat(".")?h("."):h("operator","operator",e.current());if(u.test(o)){e.eatWhile(u);var n=e.current();if("."!=t.lastType){if(c.propertyIsEnumerable(n)){var i=c[n];return h(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return h("async","keyword",n)}return h("variable","variable",n)}}function g(e){return function(t,o){var n,i=!1;if(a&&"@"==t.peek()&&t.match(p))return o.tokenize=v,h("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(o.tokenize=v),h("string","string")}}function y(e,t){for(var o,n=!1;o=e.next();){if("/"==o&&n){t.tokenize=v;break}n="*"==o}return h("comment","comment")}function b(e,t){for(var o,n=!1;null!=(o=e.next());){if(!n&&("`"==o||"$"==o&&e.eat("{"))){t.tokenize=v;break}n=!n&&"\\"==o}return h("quasi","string-2",e.current())}var k="([{}])";function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var o=e.string.indexOf("=>",e.start);if(!(o<0)){if(d){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,o));n&&(o=n.index)}for(var i=0,l=!1,a=o-1;a>=0;--a){var r=e.string.charAt(a),s=k.indexOf(r);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==r&&(l=!0);break}}else if(s>=3&&s<6)++i;else if(u.test(r))l=!0;else if(/["'\/`]/.test(r))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==r&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(l&&!i){++a;break}}l&&!i&&(t.fatArrowAt=a)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function _(e,t,o,n,i,l){this.indented=e,this.column=t,this.type=o,this.prev=i,this.info=l,null!=n&&(this.align=n)}function x(e,t){if(!s)return!1;for(var o=e.localVars;o;o=o.next)if(o.name==t)return!0;for(var n=e.context;n;n=n.prev)for(o=n.vars;o;o=o.next)if(o.name==t)return!0}function S(e,t,o,n,i){var l=e.cc;for(V.state=e,V.stream=i,V.marked=null,V.cc=l,V.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((l.length?l.pop():r?j:U)(o,n)){for(;l.length&&l[l.length-1].lex;)l.pop()();return V.marked?V.marked:"variable"==o&&x(e,n)?"variable-2":t}}var V={state:null,column:null,marked:null,cc:null};function $(){for(var e=arguments.length-1;e>=0;e--)V.cc.push(arguments[e])}function N(){return $.apply(null,arguments),!0}function E(e,t){for(var o=t;o;o=o.next)if(o.name==e)return!0;return!1}function B(e){var o=V.state;if(V.marked="def",s){if(o.context)if("var"==o.lexical.info&&o.context&&o.context.block){var n=D(e,o.context);if(null!=n)return void(o.context=n)}else if(!E(e,o.localVars))return void(o.localVars=new O(e,o.localVars));t.globalVars&&!E(e,o.globalVars)&&(o.globalVars=new O(e,o.globalVars))}}function D(e,t){if(t){if(t.block){var o=D(e,t.prev);return o?o==t.prev?t:new F(o,t.vars,!0):null}return E(e,t.vars)?t:new F(t.prev,new O(e,t.vars),!1)}return null}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function F(e,t,o){this.prev=e,this.vars=t,this.block=o}function O(e,t){this.name=e,this.next=t}var I=new O("this",new O("arguments",null));function M(){V.state.context=new F(V.state.context,V.state.localVars,!1),V.state.localVars=I}function P(){V.state.context=new F(V.state.context,V.state.localVars,!0),V.state.localVars=null}function L(){V.state.localVars=V.state.context.vars,V.state.context=V.state.context.prev}function A(e,t){var o=function(){var o=V.state,n=o.indented;if("stat"==o.lexical.type)n=o.lexical.indented;else for(var i=o.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;o.lexical=new _(n,V.stream.column(),e,null,o.lexical,t)};return o.lex=!0,o}function R(){var e=V.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function W(e){function t(o){return o==e?N():";"==e||"}"==o||")"==o||"]"==o?$():N(t)}return t}function U(e,t){return"var"==e?N(A("vardef",t),$e,W(";"),R):"keyword a"==e?N(A("form"),H,U,R):"keyword b"==e?N(A("form"),U,R):"keyword d"==e?V.stream.match(/^\s*$/,!1)?N():N(A("stat"),q,W(";"),R):"debugger"==e?N(W(";")):"{"==e?N(A("}"),P,ce,R,L):";"==e?N():"if"==e?("else"==V.state.lexical.info&&V.state.cc[V.state.cc.length-1]==R&&V.state.cc.pop()(),N(A("form"),H,U,R,Fe)):"function"==e?N(Pe):"for"==e?N(A("form"),P,Oe,U,L,R):"class"==e||d&&"interface"==t?(V.marked="keyword",N(A("form","class"==e?e:t),Ue,R)):"variable"==e?d&&"declare"==t?(V.marked="keyword",N(U)):d&&("module"==t||"enum"==t||"type"==t)&&V.stream.match(/^\s*\w/,!1)?(V.marked="keyword","enum"==t?N(et):"type"==t?N(Ae,W("operator"),ve,W(";")):N(A("form"),Ne,W("{"),A("}"),ce,R,R)):d&&"namespace"==t?(V.marked="keyword",N(A("form"),j,U,R)):d&&"abstract"==t?(V.marked="keyword",N(U)):N(A("stat"),ie):"switch"==e?N(A("form"),H,W("{"),A("}","switch"),P,ce,R,R,L):"case"==e?N(j,W(":")):"default"==e?N(W(":")):"catch"==e?N(A("form"),M,z,U,R,L):"export"==e?N(A("stat"),He,R):"import"==e?N(A("stat"),qe,R):"async"==e?N(U):"@"==t?N(j,U):$(A("stat"),j,W(";"),R)}function z(e){if("("==e)return N(Re,W(")"))}function j(e,t){return K(e,t,!1)}function G(e,t){return K(e,t,!0)}function H(e){return"("!=e?$():N(A(")"),q,W(")"),R)}function K(e,t,o){if(V.state.fatArrowAt==V.stream.start){var n=o?ee:Z;if("("==e)return N(M,A(")"),de(Re,")"),R,W("=>"),n,L);if("variable"==e)return $(M,Ne,W("=>"),n,L)}var i=o?X:Y;return C.hasOwnProperty(e)?N(i):"function"==e?N(Pe,i):"class"==e||d&&"interface"==t?(V.marked="keyword",N(A("form"),We,R)):"keyword c"==e||"async"==e?N(o?G:j):"("==e?N(A(")"),q,W(")"),R,i):"operator"==e||"spread"==e?N(o?G:j):"["==e?N(A("]"),Ze,R,i):"{"==e?ue(ae,"}",null,i):"quasi"==e?$(J,i):"new"==e?N(te(o)):N()}function q(e){return e.match(/[;\}\)\],]/)?$():$(j)}function Y(e,t){return","==e?N(q):X(e,t,!1)}function X(e,t,o){var n=0==o?Y:X,i=0==o?j:G;return"=>"==e?N(M,o?ee:Z,L):"operator"==e?/\+\+|--/.test(t)||d&&"!"==t?N(n):d&&"<"==t&&V.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(A(">"),de(ve,">"),R,n):"?"==t?N(j,W(":"),i):N(i):"quasi"==e?$(J,n):";"!=e?"("==e?ue(G,")","call",n):"."==e?N(le,n):"["==e?N(A("]"),q,W("]"),R,n):d&&"as"==t?(V.marked="keyword",N(ve,n)):"regexp"==e?(V.state.lastType=V.marked="operator",V.stream.backUp(V.stream.pos-V.stream.start-1),N(i)):void 0:void 0}function J(e,t){return"quasi"!=e?$():"${"!=t.slice(t.length-2)?N(J):N(q,Q)}function Q(e){if("}"==e)return V.marked="string-2",V.state.tokenize=b,N(J)}function Z(e){return w(V.stream,V.state),$("{"==e?U:j)}function ee(e){return w(V.stream,V.state),$("{"==e?U:G)}function te(e){return function(t){return"."==t?N(e?ne:oe):"variable"==t&&d?N(xe,e?X:Y):$(e?G:j)}}function oe(e,t){if("target"==t)return V.marked="keyword",N(Y)}function ne(e,t){if("target"==t)return V.marked="keyword",N(X)}function ie(e){return":"==e?N(R,U):$(Y,W(";"),R)}function le(e){if("variable"==e)return V.marked="property",N()}function ae(e,t){return"async"==e?(V.marked="property",N(ae)):"variable"==e||"keyword"==V.style?(V.marked="property","get"==t||"set"==t?N(re):(d&&V.state.fatArrowAt==V.stream.start&&(o=V.stream.match(/^\s*:\s*/,!1))&&(V.state.fatArrowAt=V.stream.pos+o[0].length),N(se))):"number"==e||"string"==e?(V.marked=a?"property":V.style+" property",N(se)):"jsonld-keyword"==e?N(se):d&&T(t)?(V.marked="keyword",N(ae)):"["==e?N(j,me,W("]"),se):"spread"==e?N(G,se):"*"==t?(V.marked="keyword",N(ae)):":"==e?$(se):void 0;var o}function re(e){return"variable"!=e?$(se):(V.marked="property",N(Pe))}function se(e){return":"==e?N(G):"("==e?$(Pe):void 0}function de(e,t,o){function n(i,l){if(o?o.indexOf(i)>-1:","==i){var a=V.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),N((function(o,n){return o==t||n==t?$():$(e)}),n)}return i==t||l==t?N():o&&o.indexOf(";")>-1?$(e):N(W(t))}return function(o,i){return o==t||i==t?N():$(e,n)}}function ue(e,t,o){for(var n=3;n"),ve):"quasi"==e?$(ke,_e):void 0}function ge(e){if("=>"==e)return N(ve)}function ye(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(ye):$(be,ye)}function be(e,t){return"variable"==e||"keyword"==V.style?(V.marked="property",N(be)):"?"==t||"number"==e||"string"==e?N(be):":"==e?N(ve):"["==e?N(W("variable"),pe,W("]"),be):"("==e?$(Le,be):e.match(/[;\}\)\],]/)?void 0:N()}function ke(e,t){return"quasi"!=e?$():"${"!=t.slice(t.length-2)?N(ke):N(ve,we)}function we(e){if("}"==e)return V.marked="string-2",V.state.tokenize=b,N(ke)}function Ce(e,t){return"variable"==e&&V.stream.match(/^\s*[?:]/,!1)||"?"==t?N(Ce):":"==e?N(ve):"spread"==e?N(Ce):$(ve)}function _e(e,t){return"<"==t?N(A(">"),de(ve,">"),R,_e):"|"==t||"."==e||"&"==t?N(ve):"["==e?N(ve,W("]"),_e):"extends"==t||"implements"==t?(V.marked="keyword",N(ve)):"?"==t?N(ve,W(":"),ve):void 0}function xe(e,t){if("<"==t)return N(A(">"),de(ve,">"),R,_e)}function Se(){return $(ve,Ve)}function Ve(e,t){if("="==t)return N(ve)}function $e(e,t){return"enum"==t?(V.marked="keyword",N(et)):$(Ne,me,De,Te)}function Ne(e,t){return d&&T(t)?(V.marked="keyword",N(Ne)):"variable"==e?(B(t),N()):"spread"==e?N(Ne):"["==e?ue(Be,"]"):"{"==e?ue(Ee,"}"):void 0}function Ee(e,t){return"variable"!=e||V.stream.match(/^\s*:/,!1)?("variable"==e&&(V.marked="property"),"spread"==e?N(Ne):"}"==e?$():"["==e?N(j,W("]"),W(":"),Ee):N(W(":"),Ne,De)):(B(t),N(De))}function Be(){return $(Ne,De)}function De(e,t){if("="==t)return N(G)}function Te(e){if(","==e)return N($e)}function Fe(e,t){if("keyword b"==e&&"else"==t)return N(A("form","else"),U,R)}function Oe(e,t){return"await"==t?N(Oe):"("==e?N(A(")"),Ie,R):void 0}function Ie(e){return"var"==e?N($e,Me):"variable"==e?N(Me):$(Me)}function Me(e,t){return")"==e?N():";"==e?N(Me):"in"==t||"of"==t?(V.marked="keyword",N(j,Me)):$(j,Me)}function Pe(e,t){return"*"==t?(V.marked="keyword",N(Pe)):"variable"==e?(B(t),N(Pe)):"("==e?N(M,A(")"),de(Re,")"),R,fe,U,L):d&&"<"==t?N(A(">"),de(Se,">"),R,Pe):void 0}function Le(e,t){return"*"==t?(V.marked="keyword",N(Le)):"variable"==e?(B(t),N(Le)):"("==e?N(M,A(")"),de(Re,")"),R,fe,L):d&&"<"==t?N(A(">"),de(Se,">"),R,Le):void 0}function Ae(e,t){return"keyword"==e||"variable"==e?(V.marked="type",N(Ae)):"<"==t?N(A(">"),de(Se,">"),R):void 0}function Re(e,t){return"@"==t&&N(j,Re),"spread"==e?N(Re):d&&T(t)?(V.marked="keyword",N(Re)):d&&"this"==e?N(me,De):$(Ne,me,De)}function We(e,t){return"variable"==e?Ue(e,t):ze(e,t)}function Ue(e,t){if("variable"==e)return B(t),N(ze)}function ze(e,t){return"<"==t?N(A(">"),de(Se,">"),R,ze):"extends"==t||"implements"==t||d&&","==e?("implements"==t&&(V.marked="keyword"),N(d?ve:j,ze)):"{"==e?N(A("}"),je,R):void 0}function je(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||d&&T(t))&&V.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1)?(V.marked="keyword",N(je)):"variable"==e||"keyword"==V.style?(V.marked="property",N(Ge,je)):"number"==e||"string"==e?N(Ge,je):"["==e?N(j,me,W("]"),Ge,je):"*"==t?(V.marked="keyword",N(je)):d&&"("==e?$(Le,je):";"==e||","==e?N(je):"}"==e?N():"@"==t?N(j,je):void 0}function Ge(e,t){if("!"==t)return N(Ge);if("?"==t)return N(Ge);if(":"==e)return N(ve,De);if("="==t)return N(G);var o=V.state.lexical.prev;return $(o&&"interface"==o.info?Le:Pe)}function He(e,t){return"*"==t?(V.marked="keyword",N(Qe,W(";"))):"default"==t?(V.marked="keyword",N(j,W(";"))):"{"==e?N(de(Ke,"}"),Qe,W(";")):$(U)}function Ke(e,t){return"as"==t?(V.marked="keyword",N(W("variable"))):"variable"==e?$(G,Ke):void 0}function qe(e){return"string"==e?N():"("==e?$(j):"."==e?$(Y):$(Ye,Xe,Qe)}function Ye(e,t){return"{"==e?ue(Ye,"}"):("variable"==e&&B(t),"*"==t&&(V.marked="keyword"),N(Je))}function Xe(e){if(","==e)return N(Ye,Xe)}function Je(e,t){if("as"==t)return V.marked="keyword",N(Ye)}function Qe(e,t){if("from"==t)return V.marked="keyword",N(j)}function Ze(e){return"]"==e?N():$(de(G,"]"))}function et(){return $(A("form"),Ne,W("{"),A("}"),de(tt,"}"),R,R)}function tt(){return $(Ne,De)}function ot(e,t){return"operator"==e.lastType||","==e.lastType||m.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function nt(e,t,o){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(o||0)))}return M.lex=P.lex=!0,L.lex=!0,R.lex=!0,{startState:function(e){var o={tokenize:v,lastType:"sof",cc:[],lexical:new _((e||0)-i,0,"block",!1),localVars:t.localVars,context:t.localVars&&new F(null,null,!1),indented:e||0};return t.globalVars&&"object"==typeof t.globalVars&&(o.globalVars=t.globalVars),o},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),w(e,t)),t.tokenize!=y&&e.eatSpace())return null;var i=t.tokenize(e,t);return"comment"==o?i:(t.lastType="operator"!=o||"++"!=n&&"--"!=n?o:"incdec",S(t,i,o,n,e))},indent:function(e,o){if(e.tokenize==y||e.tokenize==b)return CodeMirror2.Pass;if(e.tokenize!=v)return 0;var n,a=o&&o.charAt(0),r=e.lexical;if(!/^\s*else\b/.test(o))for(var s=e.cc.length-1;s>=0;--s){var d=e.cc[s];if(d==R)r=r.prev;else if(d!=Fe&&d!=L)break}for(;("stat"==r.type||"form"==r.type)&&("}"==a||(n=e.cc[e.cc.length-1])&&(n==Y||n==X)&&!/^[,\.=+\-*:?[\(]/.test(o));)r=r.prev;l&&")"==r.type&&"stat"==r.prev.type&&(r=r.prev);var u=r.type,c=a==u;return"vardef"==u?r.indented+("operator"==e.lastType||","==e.lastType?r.info.length+1:0):"form"==u&&"{"==a?r.indented:"form"==u?r.indented+i:"stat"==u?r.indented+(ot(e,o)?l||i:0):"switch"!=r.info||c||0==t.doubleIndentSwitch?r.align?r.column+(c?0:1):r.indented+(c?0:i):r.indented+(/^(?:case|default)\b/.test(o)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:r?null:"/*",blockCommentEnd:r?null:"*/",blockCommentContinue:r?null:" * ",lineComment:r?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:r?"json":"javascript",jsonldMode:a,jsonMode:r,expressionAllowed:nt,skipExpression:function(e){S(e,"atom","atom","true",new CodeMirror2.StringStream("",2,null))}}})),CodeMirror2.registerHelper("wordChars","javascript",/[\w$]/),CodeMirror2.defineMIME("text/javascript","javascript"),CodeMirror2.defineMIME("text/ecmascript","javascript"),CodeMirror2.defineMIME("application/javascript","javascript"),CodeMirror2.defineMIME("application/x-javascript","javascript"),CodeMirror2.defineMIME("application/ecmascript","javascript"),CodeMirror2.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror2.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror2.defineMIME("application/manifest+json",{name:"javascript",json:!0}),CodeMirror2.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),CodeMirror2.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror2.defineMIME("application/typescript",{name:"javascript",typescript:!0});var ayuDark="";!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},o=e.Pos;function n(e,o){return"pairs"==o&&"string"==typeof e?e:"object"==typeof e&&null!=e[o]?e[o]:t[o]}e.defineOption("autoCloseBrackets",!1,(function(t,o,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),o&&(l(n(o,"pairs")),t.state.closeBrackets=o,t.addKeyMap(i))}));var i={Backspace:s,Enter:d};function l(e){for(var t=0;t=0;s--){var u=a[s].head;t.replaceRange("",o(u.line,u.ch-1),o(u.line,u.ch+1),"+delete")}}function d(t){var o=r(t),i=o&&n(o,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var l=t.listSelections(),a=0;a0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};o.push({anchor:r,head:r})}e.setSelections(o,i)}function c(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new o(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new o(t.head.line,t.head.ch+(n?1:-1))}}function m(t,i){var l=r(t);if(!l||t.getOption("disableInput"))return e.Pass;var a=n(l,"pairs"),s=a.indexOf(i);if(-1==s)return e.Pass;for(var d,m=n(l,"closeBefore"),p=n(l,"triples"),h=a.charAt(s+1)==i,v=t.listSelections(),g=s%2==0,y=0;y1&&p.indexOf(i)>=0&&t.getRange(o(w.line,w.ch-2),w)==i+i){if(w.ch>2&&/\bstring/.test(t.getTokenTypeAt(o(w.line,w.ch-2))))return e.Pass;b="addFour"}else if(h){var _=0==w.ch?" ":t.getRange(o(w.line,w.ch-1),w);if(e.isWordChar(C)||_==i||e.isWordChar(_))return e.Pass;b="both"}else{if(!g||!(0===C.length||/\s/.test(C)||m.indexOf(C)>-1))return e.Pass;b="both"}else b=h&&f(t,w)?"both":p.indexOf(i)>=0&&t.getRange(w,o(w.line,w.ch+3))==i+i+i?"skipThree":"skip";if(d){if(d!=b)return e.Pass}else d=b}var x=s%2?a.charAt(s-1):i,S=s%2?i:a.charAt(s+1);t.operation((function(){if("skip"==d)u(t,1);else if("skipThree"==d)u(t,3);else if("surround"==d){for(var e=t.getSelections(),o=0;on.right?1:0:t.clientYn.bottom?1:0,i.moveTo(i.pos+o*i.screen)})),e.on(this.node,"mousewheel",l),e.on(this.node,"DOMMouseScroll",l)}t.prototype.setPos=function(e,t){return e<0&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),!(!t&&e==this.pos||(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",0))},t.prototype.moveTo=function(e){this.setPos(e)&&this.scroll(e,this.orientation)};var o=10;function n(e,o,n){this.addClass=e,this.horiz=new t(e,"horizontal",n),o(this.horiz.node),this.vert=new t(e,"vertical",n),o(this.vert.node),this.width=null}t.prototype.update=function(e,t,n){var i=this.screen!=t||this.total!=e||this.size!=n;i&&(this.screen=t,this.total=e,this.size=n);var l=this.screen*(this.size/this.total);le.clientWidth+1,i=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=i?"block":"none",this.horiz.node.style.display=n?"block":"none",i&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(n?o:0)),this.vert.node.style.bottom=n?o+"px":"0"),n&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(i?o:0)-e.barLeft),this.horiz.node.style.right=i?o+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:i?o:0,bottom:n?o:0}},n.prototype.setScrollTop=function(e){this.vert.setPos(e)},n.prototype.setScrollLeft=function(e){this.horiz.setPos(e)},n.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},e.scrollbarModel.simple=function(e,t){return new n("CodeMirror-simplescroll",e,t)},e.scrollbarModel.overlay=function(e,t){return new n("CodeMirror-overlayscroll",e,t)}}(codemirror$1.exports);var index_vue_vue_type_style_index_0_lang$7="";const _sfc_main$1z={props:["modelValue","showArguments","showRow"],inject:{getFormModels:{default:()=>new Function},getResponseVariables:{default:()=>new Function},getLocalVariables:{default:()=>new Function}},data(){let e=[];return this.showArguments&&(e=[{id:"arguments[0]",name:this.$t("fm.formula.argsData.name"),children:[{id:" arguments[0].value",name:"value",desc:"当前字段值"},{id:" arguments[0].fieldNode",name:"fieldNode",desc:"当前字段标识"},{id:" arguments[0].currentRef",name:"currentRef",desc:"当前组件实例"}]}],this.showRow&&(e[0].children=e[0].children.concat([{id:" arguments[0].rowIndex",name:"rowIndex",desc:"当前操作行下标"},{id:" arguments[0].row",name:"row",desc:"当前行数据"}]))),{value:this.modelValue,editorId:"formula-"+Math.random().toString(36).slice(-8),modelsData:[],argsData:e,responseVariables:[],localVariables:[]}},mounted(){var e,t,o;this.modelsData=null!=(e=this.getFormModels())?e:[];let n=null!=(t=this.getResponseVariables())?t:[],i=null!=(o=this.getLocalVariables())?o:[];(n.length||i.length)&&(this.localVariables=[{id:"",name:this.$t("fm.formula.argsData.variable"),children:[...n,...i].map((e=>({id:" "+e,name:e})))}]),setTimeout((()=>{this.initEditor()}))},methods:{initEditor(){let e="default";document.querySelector("html").className.indexOf("dark")>-1&&(e="ayu-dark"),this.editor=CodeMirror(document.getElementById(this.editorId),{value:this.value,lineNumbers:!1,mode:"javascript",lineWrapping:!1,autofocus:!0,theme:e,autoCloseBrackets:!0,styleActiveLine:!0,scrollbarStyle:"simple"}),this.editor.on("change",(e=>{this.value=e.getValue()})),this.replaceFieldContent(),this.replaceArgsContent(),this.replaceVarContent(),this.editor.execCommand("goDocEnd")},_escapeRegExp:e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),replaceVarContent(){this.localVariables&&this.localVariables.length&&this.localVariables[0].children.forEach((e=>{const t=new RegExp(e.id,"g"),o=[];let n;for(;null!==(n=t.exec(this.value));){const t=n[0],i=n.index-this.calcLastIndex(this.value,n.index)-1,l=this.calcLineCount(this.value,n.index);o.push({value:t,startIndex:i,lineIndex:l,id:e.id,name:e.name})}o.forEach((e=>{let t=document.createElement("span");t.className="cm-eventvar",t.textContent=e.name,t.title=e.id,this.editor.markText({line:e.lineIndex,ch:e.startIndex},{line:e.lineIndex,ch:e.startIndex+e.value.length},{atomic:!0,selectLeft:!0,selectRight:!0,inclusiveLeft:!1,inclusiveRight:!1,replacedWith:t,handleMouseEvents:!0})}))}))},replaceArgsContent(){this.argsData.length&&this.argsData[0].children.forEach((e=>{const t=new RegExp(this._escapeRegExp(e.id),"g"),o=[];let n;for(;null!==(n=t.exec(this.value));){const t=n[0],i=n.index-this.calcLastIndex(this.value,n.index)-1,l=this.calcLineCount(this.value,n.index);o.push({value:t,startIndex:i,lineIndex:l,id:e.id,name:e.name})}o.forEach((e=>{let t=document.createElement("span");t.className="cm-eventargs",t.textContent=e.name,t.title=e.id,this.editor.markText({line:e.lineIndex,ch:e.startIndex},{line:e.lineIndex,ch:e.startIndex+e.value.length},{atomic:!0,selectLeft:!0,selectRight:!0,inclusiveLeft:!1,inclusiveRight:!1,replacedWith:t,handleMouseEvents:!0})}))}))},replaceFieldContent(){const e=/ this\.getValue\("([^"]+)"\)/g,t=[];let o;for(;null!==(o=e.exec(this.value));){const e=o[0],n=o[1],i=o.index-this.calcLastIndex(this.value,o.index)-1,l=this.calcLineCount(this.value,o.index),a=this.$refs.fieldTree.getNode(n);a&&t.push({value:e,startIndex:i,lineIndex:l,id:n,data:a.data})}t.forEach((e=>{let t=document.createElement("span");t.className="cm-value",t.textContent=e.data.name||e.data.id,t.title=e.value,this.editor.markText({line:e.lineIndex,ch:e.startIndex},{line:e.lineIndex,ch:e.startIndex+e.value.length},{title:e.value,atomic:!0,selectLeft:!0,selectRight:!0,inclusiveLeft:!1,inclusiveRight:!1,replacedWith:t,handleMouseEvents:!0})}))},calcLineCount(e,t){let o=0;for(let n=0;n[vue.createVNode(r,{span:24},{default:vue.withCtx((()=>[vue.createVNode(a,{shadow:"never",size:"small",class:"formula-card"},{header:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_2$W,[vue.createElementVNode("span",null,vue.toDisplayString(e.$t("fm.formula.header")),1),vue.createElementVNode("span",null,[vue.createElementVNode("i",{class:"fm-iconfont icon-question-circle is-help",onClick:t[0]||(t[0]=(...e)=>l.handleGoHelp&&l.handleGoHelp(...e))})])])])),default:vue.withCtx((()=>[vue.createElementVNode("div",{id:i.editorId,class:"formula-editor"},null,8,_hoisted_3$J)])),_:1})])),_:1})])),_:1}),vue.createVNode(s,{justify:"space-between",gutter:10},{default:vue.withCtx((()=>[vue.createVNode(r,{span:24},{default:vue.withCtx((()=>[vue.createVNode(p,{class:"formula-tabs"},{default:vue.withCtx((()=>[vue.createVNode(m,{label:e.$t("fm.formula.field")},{default:vue.withCtx((()=>[vue.createVNode(c,{ref:"scrollRef",always:""},{default:vue.withCtx((()=>[vue.createVNode(u,{data:i.modelsData,"node-key":"id","default-expand-all":"","expand-on-click-node":!1,style:{width:"100%"},ref:"fieldTree"},{default:vue.withCtx((({node:o})=>[vue.createElementVNode("div",{style:{display:"flex","justify-content":"space-between",width:"95%","align-items":"center"},onClick:e=>l.handleNode(o.data)},[vue.createElementVNode("span",null,[vue.createTextVNode(vue.toDisplayString(o.data.name)+" {",1),vue.createElementVNode("span",_hoisted_5$C,vue.toDisplayString(o.data.id),1),t[1]||(t[1]=vue.createTextVNode("}"))]),vue.createVNode(d,{type:"info"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.components.fields."+o.data.type)),1)])),_:2},1024)],8,_hoisted_4$E)])),_:1},8,["data"])])),_:1},512)])),_:1},8,["label"]),vue.createVNode(m,{label:e.$t("fm.formula.fieldId")},{default:vue.withCtx((()=>[vue.createVNode(c,{ref:"scrollRef",always:""},{default:vue.withCtx((()=>[vue.createVNode(u,{data:i.modelsData,"node-key":"id","default-expand-all":"","expand-on-click-node":!1,style:{width:"100%"}},{default:vue.withCtx((({node:o})=>[vue.createElementVNode("div",{style:{display:"flex","justify-content":"space-between",width:"95%","align-items":"center"},onClick:e=>l.handleFieldId(o.data)},[vue.createElementVNode("span",null,[vue.createTextVNode(vue.toDisplayString(o.data.name)+" {",1),vue.createElementVNode("span",_hoisted_7$k,vue.toDisplayString(o.data.id),1),t[2]||(t[2]=vue.createTextVNode("}"))]),vue.createVNode(d,{type:"info"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.components.fields."+o.data.type)),1)])),_:2},1024)],8,_hoisted_6$o)])),_:1},8,["data"])])),_:1},512)])),_:1},8,["label"]),vue.createVNode(m,{label:e.$t("fm.formula.event")},{default:vue.withCtx((()=>[vue.createVNode(c,{always:""},{default:vue.withCtx((()=>[i.localVariables.length?(vue.openBlock(),vue.createBlock(u,{key:0,data:i.localVariables,"node-key":"id","default-expand-all":"","expand-on-click-node":!1,style:{width:"100%"}},{default:vue.withCtx((({node:e})=>[vue.createElementVNode("div",{style:{display:"flex","justify-content":"space-between",width:"90%"},onClick:t=>l.handleVariableNode(e.data)},[vue.createElementVNode("span",_hoisted_9$d,vue.toDisplayString(e.data.name),1)],8,_hoisted_8$e)])),_:1},8,["data"])):vue.createCommentVNode("",!0),vue.createVNode(u,{data:i.argsData,"node-key":"id","default-expand-all":"","expand-on-click-node":!1,style:{width:"100%"}},{default:vue.withCtx((({node:o})=>[vue.createElementVNode("div",{style:{display:"flex","justify-content":"space-between",width:"95%","align-items":"center"},onClick:e=>l.handleArgsNode(o.data)},[vue.createElementVNode("span",_hoisted_11$5,[vue.createElementVNode("span",null,vue.toDisplayString(o.data.name),1),t[3]||(t[3]=vue.createTextVNode()),o.data.desc&&"zh-cn"==e.$i18n.locale?(vue.openBlock(),vue.createElementBlock("span",_hoisted_12$4,"("+vue.toDisplayString(o.data.desc)+")",1)):vue.createCommentVNode("",!0)]),vue.createElementVNode("span",_hoisted_13$2,vue.toDisplayString(o.data.id),1)],8,_hoisted_10$b)])),_:1},8,["data"])])),_:1})])),_:1},8,["label"])])),_:1})])),_:1})])),_:1})])}var FormulaPanelIndex=_export_sfc(_sfc_main$1z,[["render",_sfc_render$1t]]),dialog_vue_vue_type_style_index_0_lang$2="";const _sfc_main$1y={components:{CusDialog:CusDialog,FormulaPanelIndex:FormulaPanelIndex},emits:["dialog-close","dialog-confirm"],data:()=>({visible:!1,scriptList:[],formulaValue:"",showArguments:!0,showRow:!0}),methods:{open(e,t={showArguments:!0,showRow:!0}){var o,n;this.formulaValue=null!=e?e:"",this.visible=!0,this.showArguments=null==(o=null==t?void 0:t.showArguments)||o,this.showRow=null==(n=null==t?void 0:t.showRow)||n},handleClose(){this.$emit("dialog-close"),this.visible=!1},handleSubmit(){try{new Function("args",`return ${this.formulaValue}`),this.$emit("dialog-confirm",this.formulaValue),this.visible=!1}catch(e){ElMessage({message:this.$t("fm.message.jsError")+e.message,type:"error"},this)}}}},_hoisted_1$12={class:"fm-formula-panel-dialog-container"};function _sfc_render$1s(e,t,o,n,i,l){const a=vue.resolveComponent("FormulaPanelIndex"),r=vue.resolveComponent("el-button"),s=vue.resolveComponent("el-dialog");return vue.openBlock(),vue.createBlock(s,{modelValue:e.visible,"onUpdate:modelValue":t[1]||(t[1]=t=>e.visible=t),onOnClose:l.handleClose,ref:"formulaDialog",width:"800px","close-on-click-modal":!1,"show-close":!1,draggable:"","destroy-on-close":"","append-to-body":"",class:"fm-formula-dialog"},{footer:vue.withCtx((()=>[vue.createElementVNode("span",null,[vue.createVNode(r,{onClick:l.handleClose},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.cancel")),1)])),_:1},8,["onClick"]),vue.createVNode(r,{type:"primary",onClick:l.handleSubmit},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.confirm")),1)])),_:1},8,["onClick"])])])),default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_1$12,[vue.createVNode(a,{modelValue:e.formulaValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.formulaValue=t),showArguments:e.showArguments,showRow:e.showRow},null,8,["modelValue","showArguments","showRow"])])])),_:1},8,["modelValue","onOnClose"])}var FormulaDialog=_export_sfc(_sfc_main$1y,[["render",_sfc_render$1s]]),input_vue_vue_type_style_index_0_lang="";const _sfc_main$1x={components:{FormulaDialog:FormulaDialog},props:{select:{type:Boolean,default:!0},modelValue:{type:String},only:{type:Boolean,default:!1},size:{type:String,default:"small"},showArguments:{type:Boolean,default:!0},showRow:{type:Boolean,default:!0},isArgs:{type:Boolean,default:!1},keyValue:{type:String,default:""}},emits:["update:select","update:modelValue"],watch:{selectValue(e){"args"===e?(this.value=`args.${this.keyValue}`,this.$emit("update:select",!0)):this.$emit("update:select",e)},value(e){this.$emit("update:modelValue",e)},modelValue(e){this.value=e},keyValue(e){"args"===this.selectValue&&(this.value=`args.${this.keyValue}`)}},data(){var e,t;return{selectValue:(e=>{const t=`^args\\.${this.keyValue}$`;return new RegExp(t).test(e)})(this.modelValue)?"args":null!=(e=this.select)&&e,value:null!=(t=this.modelValue)?t:""}},computed:{placeholder(){return this.selectValue?this.$t("fm.formula.input.fxPlaceholder"):this.$t("fm.formula.input.valuePlaceholder")}},methods:{handleFormulaInput(){this.selectValue&&this.$refs.formulaDialog.open(this.value,{showArguments:this.showArguments,showRow:this.showRow})},handleFormulaConfirm(e){this.value=e}}};function _sfc_render$1r(e,t,o,n,i,l){const a=vue.resolveComponent("el-option"),r=vue.resolveComponent("el-select"),s=vue.resolveComponent("el-input"),d=vue.resolveComponent("FormulaDialog");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(s,{placeholder:l.placeholder,modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=e=>i.value=e),size:o.size,class:vue.normalizeClass({"input-with-select":!0,"formula-input":Boolean(this.selectValue),[e.$attrs.class]:!0}),onClick:l.handleFormulaInput,readonly:Boolean(i.selectValue),style:vue.normalizeStyle(e.$attrs.style),disabled:"args"===i.selectValue},vue.createSlots({_:2},[o.only?void 0:{name:"append",fn:vue.withCtx((()=>[vue.createVNode(r,{modelValue:i.selectValue,"onUpdate:modelValue":t[0]||(t[0]=e=>i.selectValue=e),style:{width:"80px"}},{default:vue.withCtx((()=>[vue.createVNode(a,{label:e.$t("fm.formula.input.value"),value:!1},null,8,["label"]),vue.createVNode(a,{label:e.$t("fm.formula.input.fx"),value:!0},null,8,["label"]),o.isArgs?(vue.openBlock(),vue.createBlock(a,{key:0,label:e.$t("fm.formula.input.variable"),value:"args"},null,8,["label"])):vue.createCommentVNode("",!0)])),_:1},8,["modelValue"])])),key:"0"}]),1032,["placeholder","modelValue","size","class","onClick","readonly","style","disabled"]),vue.createVNode(d,{ref:"formulaDialog",onDialogConfirm:l.handleFormulaConfirm},null,8,["onDialogConfirm"])],64)}var FormulaInput=_export_sfc(_sfc_main$1x,[["render",_sfc_render$1r]]),arrayDynamic_vue_vue_type_style_index_0_lang="";const _sfc_main$1w={components:{FormulaInput:FormulaInput},props:{modelValue:{type:Array,default:()=>[]},operable:{type:Boolean,default:!0},showArguments:{type:Boolean,default:!0},showRow:{type:Boolean,default:!0},isArgs:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{array:this.modelValue}},methods:{handleAdd(){this.array.push({key:"",value:"",fx:!1})},handleRemove(e){this.array.splice(e,1)}},watch:{modelValue(e){this.array=e},array:{deep:!0,handler(e){this.$emit("update:modelValue",e)}}}},_hoisted_1$11={class:"array-dynamic-container"},_hoisted_2$V=["onClick"];function _sfc_render$1q(e,t,o,n,i,l){const a=vue.resolveComponent("el-input"),r=vue.resolveComponent("formula-input"),s=vue.resolveComponent("el-button");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$11,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.array,((e,n)=>(vue.openBlock(),vue.createElementBlock("div",{key:n,class:"array-dynamic-item"},[vue.createVNode(a,{readonly:!o.operable,modelValue:e.key,"onUpdate:modelValue":t=>e.key=t,placeholder:"KEY",size:"small"},null,8,["readonly","modelValue","onUpdate:modelValue"]),vue.createVNode(r,{modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,select:e.fx,"onUpdate:select":t=>e.fx=t,class:vue.normalizeClass({"not-operable":!o.operable}),showArguments:o.showArguments,showRow:o.showRow,isArgs:o.isArgs,keyValue:e.key},null,8,["modelValue","onUpdate:modelValue","select","onUpdate:select","class","showArguments","showRow","isArgs","keyValue"]),o.operable?(vue.openBlock(),vue.createElementBlock("i",{key:0,onClick:e=>l.handleRemove(n),style:{"font-size":"16px",margin:"0 10px",cursor:"pointer",color:"#F56C6C"}},t[0]||(t[0]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_2$V)):vue.createCommentVNode("",!0)])))),128)),o.operable?(vue.openBlock(),vue.createBlock(s,{key:0,link:"",type:"primary",onClick:l.handleAdd},{default:vue.withCtx((()=>[t[1]||(t[1]=vue.createElementVNode("i",{class:"fm-iconfont icon-plus",style:{"font-size":"12px",margin:"5px"}},null,-1)),vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.edit.add")),1)])),_:1},8,["onClick"])):vue.createCommentVNode("",!0)])}var ArrayDynamic=_export_sfc(_sfc_main$1w,[["render",_sfc_render$1q]]);const _sfc_main$1v={components:{ArrayDynamic:ArrayDynamic},props:{modelValue:{type:[String,Object]},operable:{type:Boolean,default:!0},showArguments:{type:Boolean,default:!0},showRow:{type:Boolean,default:!0}},data(){return{array:this.object2Array(this.modelValue)}},methods:{object2Array:e=>e?("string"==typeof e&&(e=new Function('"use strict";return ('+(e||"{}")+")")()),Object.keys(e).map((t=>({key:t,fx:isExpression(e[t]),value:isExpression(e[t])?extractExpression(e[t]):e[t]})))):[],array2Object(e){let t={};return e.forEach((e=>{e.key&&(t[e.key]=e.fx?`{{${e.value}}}`:e.value)})),t}},watch:{array:{deep:!0,handler(e){this.$emit("update:modelValue",this.array2Object(e))}}}};function _sfc_render$1p(e,t,o,n,i,l){const a=vue.resolveComponent("array-dynamic");return vue.openBlock(),vue.createBlock(a,{modelValue:i.array,"onUpdate:modelValue":t[0]||(t[0]=e=>i.array=e),operable:o.operable,showArguments:o.showArguments,showRow:o.showRow},null,8,["modelValue","operable","showArguments","showRow"])}var ObjectDynamic=_export_sfc(_sfc_main$1v,[["render",_sfc_render$1p]]),TemplateInput_vue_vue_type_style_index_0_lang="";const _sfc_main$1u={components:{CodeEditor:CodeEditor},props:{modelValue:{type:String},prefix:{type:String,default:""},suffix:{type:String,default:""}},emits:["update:modelValue"],data:()=>({visible:!1,value:"",key:Math.random().toString(36).slice(-8)}),mounted(){document.addEventListener("click",this.onClickOutside)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside)},methods:{handleEdit(){this.visible?this.visible=!1:(this.value=this.modelValue,this.visible=!0,this.key=Math.random().toString(36).slice(-8))},handleConfirm(){this.visible=!1,this.$emit("update:modelValue",this.value)},onClickOutside(e){var t,o,n,i,l;const a=null==(l=null==(i=null==(n=null==(o=null==(t=this.$refs.tempaleInput)?void 0:t.$refs)?void 0:o.tooltipRef)?void 0:n.$refs)?void 0:i.popperRef)?void 0:l.contentRef,r=this.$refs.buttonRef.$el;!a||a.contains(e.target)||r&&r.contains(e.target)||(this.visible=!1)}}},_hoisted_1$10={class:"code-line"},_hoisted_2$U={class:"code-line"},_hoisted_3$I={style:{"text-align":"right",margin:"0"}};function _sfc_render$1o(e,t,o,n,i,l){const a=vue.resolveComponent("code-editor"),r=vue.resolveComponent("el-button"),s=vue.resolveComponent("el-popover");return vue.openBlock(),vue.createBlock(s,{visible:i.visible,width:"500",teleported:!0,placement:"bottom-end",ref:"tempaleInput","popper-class":"fm-template-popover"},{reference:vue.withCtx((()=>[vue.createVNode(r,{ref:"buttonRef",onClick:l.handleEdit,size:"small",style:vue.normalizeStyle(e.$attrs.style)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString("zh-cn"==e.$i18n.locale?"点击编辑模板":"Setting"),1)])),_:1},8,["onClick","style"])])),default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_1$10,vue.toDisplayString(o.prefix),1),(vue.openBlock(),vue.createBlock(a,{mode:"xml",modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e),height:"150px",key:i.key},null,8,["modelValue"])),vue.createElementVNode("div",_hoisted_2$U,vue.toDisplayString(o.suffix),1),vue.createElementVNode("div",_hoisted_3$I,[vue.createVNode(r,{size:"small",bg:"",text:"",onClick:t[1]||(t[1]=e=>i.visible=!1)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString("zh-cn"==e.$i18n.locale?"取 消":"Cancel"),1)])),_:1}),vue.createVNode(r,{size:"small",type:"primary",onClick:l.handleConfirm},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString("zh-cn"==e.$i18n.locale?"确 定":"Confirm"),1)])),_:1},8,["onClick"])])])),_:1},8,["visible"])}var TemplateInput=_export_sfc(_sfc_main$1u,[["render",_sfc_render$1o]]),ColumnsConfig_vue_vue_type_style_index_0_lang="";const _sfc_main$1t={name:"columns-config",components:{Draggable:draggableComponent,CodeEditor:CodeEditor,TemplateInput:TemplateInput},emits:["update:modelValue"],props:{modelValue:{type:Array,default:()=>[]}},data(){var e;return{key:Math.random().toString(36).slice(-8),columns:null!=(e=this.modelValue)?e:[],currentDetailRef:null,popoverRef:null,buttonRefs:[],showPopover:!1,columnDetail:{},columnItem:{label:"",prop:"",width:"",sortable:!1,fixed:!1,align:"left",headderAlign:"left",fixedOption:"left",defaultSlot:!1,defaultSlotTemplate:"",headerSlot:!1,headerSlotTemplate:""},parentItem:{label:"",width:"",fixed:!1,fixedOption:"left",align:"left",headerSlot:!1,headerSlotTemplate:"",isParent:!0,isExpand:!0,children:[]},currentIndex:-1}},mounted(){this.popoverRef=this.$refs.popoverRef,document.addEventListener("click",this.onClickOutside)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside)},watch:{columns(e){this.$emit("update:modelValue",e)},modelValue(e){this.columns=e},showPopover(e){e||(this.currentIndex=-1)}},methods:{handleAdd(){const e=Math.random().toString(36).slice(-8);this.columns.push({...this.columnItem,key:e})},handleParentAdd(){const e=Math.random().toString(36).slice(-8);this.columns.push({..._.cloneDeep(this.parentItem),key:e})},handleDetail(e){this.showPopover?this.showPopover=!1:(this.columnDetail=this.columns[e],this.currentDetailRef=this.buttonRefs[e],this.currentIndex=e,this.showPopover=!0)},handleRemove(e){this.columns.splice(e,1)},handleClosePopover(){this.showPopover=!1},onClickOutside(e){var t,o,n,i,l,a,r,s,d,u,c,m,p,f,h,v,g,y;const b=null==(i=null==(n=null==(o=null==(t=this.popoverRef.$refs)?void 0:t.tooltipRef)?void 0:o.$refs)?void 0:n.popperRef)?void 0:i.contentRef,k=this.buttonRefs[this.currentIndex],w=null==(c=null==(u=null==(d=null==(s=null==(r=null==(a=null==(l=this.$refs.templateDefaultInput)?void 0:l.$refs)?void 0:a.tempaleInput)?void 0:r.$refs)?void 0:s.tooltipRef)?void 0:d.$refs)?void 0:u.popperRef)?void 0:c.contentRef,C=null==(y=null==(g=null==(v=null==(h=null==(f=null==(p=null==(m=this.$refs.templateHeaderInput)?void 0:m.$refs)?void 0:p.tempaleInput)?void 0:f.$refs)?void 0:h.tooltipRef)?void 0:v.$refs)?void 0:g.popperRef)?void 0:y.contentRef;!b||b.contains(e.target)||k&&k.contains(e.target)||w&&(!w||w.contains(e.target))||C&&(!C||C.contains(e.target))||(this.showPopover=!1)},handleMoveStart(){this.showPopover=!1},handleExpand(e){this.columns[e].isExpand=!this.columns[e].isExpand}}},_hoisted_1$$={class:"fm-columns-config-container"},_hoisted_2$T={key:0,class:"column-config-header"},_hoisted_3$H=["onClick"],_hoisted_4$D=["onClick"],_hoisted_5$B=["onClick"],_hoisted_6$n={key:0,class:"column-config-parent"},_hoisted_7$j={style:{display:"flex","align-items":"center",height:"28px",width:"100%"}};function _sfc_render$1n(e,t,o,n,i,l){const a=vue.resolveComponent("el-input"),r=vue.resolveComponent("columns-config",!0),s=vue.resolveComponent("draggable"),d=vue.resolveComponent("el-button"),u=vue.resolveComponent("el-form-item"),c=vue.resolveComponent("el-switch"),m=vue.resolveComponent("el-radio-button"),p=vue.resolveComponent("el-radio-group"),f=vue.resolveComponent("template-input"),h=vue.resolveComponent("el-form"),v=vue.resolveComponent("el-scrollbar"),g=vue.resolveComponent("el-popover");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$$,[i.columns.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$T,[vue.createElementVNode("label",null,vue.toDisplayString(e.$t("fm.config.widget.columnLabel")),1),vue.createElementVNode("label",null,vue.toDisplayString(e.$t("fm.config.widget.columnProp")),1)])):vue.createCommentVNode("",!0),vue.createVNode(s,vue.mergeProps({modelValue:i.columns,"onUpdate:modelValue":t[0]||(t[0]=e=>i.columns=e)},{group:{name:"options"+i.key},ghostClass:"ghost",handle:".drag-item"},{handle:".drag-item","item-key":"key",onStart:l.handleMoveStart}),{item:vue.withCtx((({element:e,index:o})=>[(vue.openBlock(),vue.createElementBlock("div",{key:e.key},[vue.createElementVNode("div",{class:vue.normalizeClass(["column-config-item",{"is-parent":e.isParent}])},[vue.createElementVNode("i",{class:vue.normalizeClass({"is-active":i.currentIndex==o}),ref:e=>{i.buttonRefs[o]=e},onClick:e=>l.handleDetail(o),style:{"font-size":"16px","margin-right":"5px",cursor:"pointer"}},t[14]||(t[14]=[vue.createElementVNode("i",{class:"fm-iconfont icon-zidingyishuju"},null,-1)]),10,_hoisted_3$H),vue.createVNode(a,{class:vue.normalizeClass({"is-template":e.headerSlot}),disabled:e.headerSlot,clearable:"",modelValue:e.label,"onUpdate:modelValue":t=>e.label=t,style:{margin:"0 3px"}},null,8,["class","disabled","modelValue","onUpdate:modelValue"]),e.isParent?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(a,{key:0,class:vue.normalizeClass({"is-template":e.defaultSlot}),disabled:e.defaultSlot,clearable:"",modelValue:e.prop,"onUpdate:modelValue":t=>e.prop=t,style:{margin:"0 3px"}},null,8,["class","disabled","modelValue","onUpdate:modelValue"])),e.isParent?(vue.openBlock(),vue.createElementBlock("i",{key:1,style:vue.normalizeStyle([{"font-size":"16px",margin:"0 5px",cursor:"pointer"},{transform:e.isExpand?"":"rotate(180deg)"}]),onClick:e=>l.handleExpand(o),class:"expand-action"},t[15]||(t[15]=[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_function_shouqi"},null,-1)]),12,_hoisted_4$D)):vue.createCommentVNode("",!0),vue.createElementVNode("i",{style:{"font-size":"16px",margin:"0 5px",cursor:"pointer"},onClick:e=>l.handleRemove(o)},t[16]||(t[16]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_5$B),t[17]||(t[17]=vue.createElementVNode("i",{class:"drag-item",style:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[vue.createElementVNode("i",{class:"fm-iconfont icon-drag"})],-1))],2),e.isParent?vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",_hoisted_6$n,[vue.createVNode(r,{modelValue:e.children,"onUpdate:modelValue":t=>e.children=t},null,8,["modelValue","onUpdate:modelValue"])],512)),[[vue.vShow,e.isExpand]]):vue.createCommentVNode("",!0)]))])),_:1},16,["modelValue","onStart"]),vue.createVNode(d,{link:"",type:"primary",onClick:l.handleAdd},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.addColumn"))+" ",1),t[18]||(t[18]=vue.createElementVNode("i",{style:{"font-size":"12px","font-weight":"600"},class:"fm-iconfont icon-plus"},null,-1))])),_:1},8,["onClick"]),vue.createVNode(d,{link:"",type:"primary",onClick:l.handleParentAdd},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.addParentHeader"))+" ",1),t[19]||(t[19]=vue.createElementVNode("i",{style:{"font-size":"12px","font-weight":"600"},class:"fm-iconfont icon-plus"},null,-1))])),_:1},8,["onClick"]),vue.createVNode(g,{ref:"popoverRef","virtual-ref":i.currentDetailRef,trigger:"click","virtual-triggering":"",placement:"left",visible:i.showPopover,width:"360",title:e.$t("fm.config.widget.columnSetting")},{default:vue.withCtx((()=>[vue.createElementVNode("div",{class:"fm-columns-config-popover-close",onClick:t[1]||(t[1]=(...e)=>l.handleClosePopover&&l.handleClosePopover(...e))},t[20]||(t[20]=[vue.createElementVNode("i",{class:"fm-iconfont icon-close"},null,-1)])),vue.createVNode(v,{"max-height":"600px"},{default:vue.withCtx((()=>[vue.createVNode(h,{"label-position":"left","label-width":"85px",size:"small",class:"fm-columns-config-form"},{default:vue.withCtx((()=>[vue.createVNode(u,{label:e.$t("fm.config.widget.columnLabel")},{default:vue.withCtx((()=>[vue.createVNode(a,{modelValue:i.columnDetail.label,"onUpdate:modelValue":t[2]||(t[2]=e=>i.columnDetail.label=e)},null,8,["modelValue"])])),_:1},8,["label"]),i.columnDetail.isParent?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(u,{key:0,label:e.$t("fm.config.widget.columnProp")},{default:vue.withCtx((()=>[vue.createVNode(a,{modelValue:i.columnDetail.prop,"onUpdate:modelValue":t[3]||(t[3]=e=>i.columnDetail.prop=e)},null,8,["modelValue"])])),_:1},8,["label"])),vue.createVNode(u,{label:e.$t("fm.config.widget.columnWidth")},{default:vue.withCtx((()=>[vue.createVNode(a,{modelValue:i.columnDetail.width,"onUpdate:modelValue":t[4]||(t[4]=e=>i.columnDetail.width=e),modelModifiers:{number:!0},disabled:i.columnDetail.isParent},{suffix:vue.withCtx((()=>t[21]||(t[21]=[vue.createTextVNode("px")]))),_:1},8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(u,{label:e.$t("fm.config.widget.ellipsis")},{default:vue.withCtx((()=>[vue.createVNode(c,{modelValue:i.columnDetail.ellipsis,"onUpdate:modelValue":t[5]||(t[5]=e=>i.columnDetail.ellipsis=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(u,{label:e.$t("fm.config.widget.columnAlign")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:i.columnDetail.align,"onUpdate:modelValue":t[6]||(t[6]=e=>i.columnDetail.align=e),size:"small"},{default:vue.withCtx((()=>[vue.createVNode(m,{label:"left",value:"left"}),vue.createVNode(m,{label:"center",value:"center"}),vue.createVNode(m,{label:"right",value:"right"})])),_:1},8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(u,{label:e.$t("fm.config.widget.columnFixed")},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_7$j,[vue.createVNode(c,{modelValue:i.columnDetail.fixed,"onUpdate:modelValue":t[7]||(t[7]=e=>i.columnDetail.fixed=e)},null,8,["modelValue"]),i.columnDetail.fixed?(vue.openBlock(),vue.createBlock(p,{key:0,modelValue:i.columnDetail.fixedOption,"onUpdate:modelValue":t[8]||(t[8]=e=>i.columnDetail.fixedOption=e),size:"small",style:{"margin-left":"20px"}},{default:vue.withCtx((()=>[vue.createVNode(m,{label:"left",value:"left"}),vue.createVNode(m,{label:"right",value:"right"})])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0)])])),_:1},8,["label"]),vue.createVNode(u,{label:e.$t("fm.config.widget.rowspan")},{default:vue.withCtx((()=>[vue.createVNode(c,{modelValue:i.columnDetail.isRowspan,"onUpdate:modelValue":t[9]||(t[9]=e=>i.columnDetail.isRowspan=e),disabled:!i.columnDetail.prop},null,8,["modelValue","disabled"])])),_:1},8,["label"]),i.columnDetail.isParent?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(u,{key:1,label:e.$t("fm.config.widget.columnDefaultSlot")},{default:vue.withCtx((()=>[vue.createVNode(c,{modelValue:i.columnDetail.defaultSlot,"onUpdate:modelValue":t[10]||(t[10]=e=>i.columnDetail.defaultSlot=e)},null,8,["modelValue"]),i.columnDetail.defaultSlot?(vue.openBlock(),vue.createBlock(f,{key:0,prefix:'",modelValue:i.columnDetail.defaultSlotTemplate,"onUpdate:modelValue":t[11]||(t[11]=e=>i.columnDetail.defaultSlotTemplate=e),ref:"templateDefaultInput",style:{"margin-left":"20px",width:"169px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0)])),_:1},8,["label"])),vue.createVNode(u,{label:e.$t("fm.config.widget.columnHeaderSlot")},{default:vue.withCtx((()=>[vue.createVNode(c,{modelValue:i.columnDetail.headerSlot,"onUpdate:modelValue":t[12]||(t[12]=e=>i.columnDetail.headerSlot=e)},null,8,["modelValue"]),i.columnDetail.headerSlot?(vue.openBlock(),vue.createBlock(f,{key:0,modelValue:i.columnDetail.headerSlotTemplate,"onUpdate:modelValue":t[13]||(t[13]=e=>i.columnDetail.headerSlotTemplate=e),prefix:"",ref:"templateHeaderInput",style:{"margin-left":"20px",width:"169px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0)])),_:1},8,["label"])])),_:1})])),_:1})])),_:1},8,["virtual-ref","visible","title"])])}var ColumnsConfig=_export_sfc(_sfc_main$1t,[["render",_sfc_render$1n]]),OperationConfig_vue_vue_type_style_index_0_lang="";const _sfc_main$1s={components:{Draggable:draggableComponent},emits:["update:modelValue","on-add-buttonevent","on-edit-buttonevent"],props:{modelValue:{type:Object}},data(){return{data:this.modelValue,buttonItem:{name:"zh-cn"==this.$i18n.locale?"操作":"Operation",type:"primary",event:""}}},watch:{modelValue(e){this.data=this.modelValue},data(e){this.$emit("update:modelValue",e)}},methods:{handleRemove(e){this.data.buttons.splice(e,1)},handleEvent(e){this.data.buttons[e].event?this.$emit("on-edit-buttonevent",e,this.data.buttons[e].event):this.$emit("on-add-buttonevent",e)},handleAdd(){const e=Math.random().toString(36).slice(-8);this.data.buttons.push({...this.buttonItem,key:e})}}},_hoisted_1$_={class:"fm-operation-config-container"},_hoisted_2$S={class:"button-config-item"},_hoisted_3$G=["onClick"];function _sfc_render$1m(e,t,o,n,i,l){const a=vue.resolveComponent("el-input-number"),r=vue.resolveComponent("el-form-item"),s=vue.resolveComponent("el-input"),d=vue.resolveComponent("el-option"),u=vue.resolveComponent("el-select"),c=vue.resolveComponent("el-button"),m=vue.resolveComponent("draggable");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$_,[vue.createVNode(r,{label:e.$t("fm.config.widget.width")},{default:vue.withCtx((()=>[vue.createVNode(a,{modelValue:i.data.width,"onUpdate:modelValue":t[0]||(t[0]=e=>i.data.width=e)},null,8,["modelValue"]),t[2]||(t[2]=vue.createTextVNode(" px "))])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.operationButton")},{default:vue.withCtx((()=>[vue.createVNode(m,vue.mergeProps({modelValue:i.data.buttons,"onUpdate:modelValue":t[1]||(t[1]=e=>i.data.buttons=e)},{group:{name:"buttons"},ghostClass:"ghost",handle:".drag-item"},{handle:".drag-item","item-key":"key"}),{item:vue.withCtx((({element:o,index:n})=>[(vue.openBlock(),vue.createElementBlock("div",{key:o.key},[vue.createElementVNode("div",_hoisted_2$S,[vue.createVNode(s,{modelValue:o.name,"onUpdate:modelValue":e=>o.name=e,style:{margin:"0 3px"}},null,8,["modelValue","onUpdate:modelValue"]),vue.createVNode(u,{modelValue:o.type,"onUpdate:modelValue":e=>o.type=e,class:"type-select"},{default:vue.withCtx((()=>[vue.createVNode(d,{label:e.$t("fm.config.widget.primaryButton"),value:"primary"},null,8,["label"]),vue.createVNode(d,{label:e.$t("fm.config.widget.defaultButton"),value:"default"},null,8,["label"]),vue.createVNode(d,{label:e.$t("fm.config.widget.textButton"),value:"text"},null,8,["label"]),vue.createVNode(d,{label:e.$t("fm.config.widget.linkButton"),value:"link"},null,8,["label"])])),_:2},1032,["modelValue","onUpdate:modelValue"]),vue.createVNode(c,{plain:"",type:o.event?"primary":"default",style:{margin:"0 5px","font-size":"12px"},onClick:e=>l.handleEvent(n)},{default:vue.withCtx((()=>t[3]||(t[3]=[vue.createElementVNode("i",{class:"fm-iconfont icon-zidingyishuju"},null,-1)]))),_:2},1032,["type","onClick"]),vue.createElementVNode("i",{style:{"font-size":"16px",margin:"0 5px",cursor:"pointer"},onClick:e=>l.handleRemove(n)},t[4]||(t[4]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_3$G),t[5]||(t[5]=vue.createElementVNode("i",{class:"drag-item",style:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[vue.createElementVNode("i",{class:"fm-iconfont icon-drag"})],-1))])]))])),_:1},16,["modelValue"]),vue.createVNode(c,{link:"",type:"primary",onClick:l.handleAdd},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.addButton"))+" ",1),t[6]||(t[6]=vue.createElementVNode("i",{style:{"font-size":"12px","font-weight":"600"},class:"fm-iconfont icon-plus"},null,-1))])),_:1},8,["onClick"])])),_:1},8,["label"])])}var OperationConfig=_export_sfc(_sfc_main$1s,[["render",_sfc_render$1m]]),ExtendProp_vue_vue_type_style_index_0_lang="";const _sfc_main$1r={name:"extend-prop-config",components:{FormulaInput:FormulaInput},emits:["update:modelValue"],props:{modelValue:{type:Object,default:()=>({})}},data(){return{extendArray:this.transformExtends(this.modelValue)}},watch:{extendArray:{deep:!0,handler(e){this.$emit("update:modelValue",this.transformExtends(e))}}},methods:{transformExtends(e){if(Array.isArray(e)){let t={};return e&&e.length&&e.forEach((e=>{e.key&&(t[e.key.trim()]=((e,t)=>{switch(e){case"fx":case"function":return`{{${t+""}}}`;case"boolean":return!!t;case"number":return+t;default:return t+""}})(e.valueType,e.value))})),t}return e?Object.keys(e).map((t=>({key:t,valueType:isExpression(e[t])?"fx":typeof e[t],value:isExpression(e[t])?extractExpression(e[t]):e[t]}))):[]},handleAdd(){this.extendArray.push({key:"key"+(this.extendArray.length+1),valueType:"string",value:""})},handleRemove(e){this.extendArray.splice(e,1)}}},_hoisted_1$Z={class:"fm-extend-config"},_hoisted_2$R={class:"fm-extend-content"},_hoisted_3$F=["onClick"];function _sfc_render$1l(e,t,o,n,i,l){const a=vue.resolveComponent("el-input"),r=vue.resolveComponent("formula-input"),s=vue.resolveComponent("el-option"),d=vue.resolveComponent("el-select"),u=vue.resolveComponent("el-button");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$Z,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.extendArray,((o,n)=>(vue.openBlock(),vue.createElementBlock("div",{key:n,class:"fm-extend-item"},[vue.createVNode(a,{modelValue:o.key,"onUpdate:modelValue":e=>o.key=e,placeholder:"Key",type:"textarea",autosize:""},null,8,["modelValue","onUpdate:modelValue"]),vue.createElementVNode("div",_hoisted_2$R,["fx"===o.valueType?(vue.openBlock(),vue.createBlock(r,{key:0,modelValue:o.value,"onUpdate:modelValue":e=>o.value=e,only:""},null,8,["modelValue","onUpdate:modelValue"])):"number"===o.valueType?(vue.openBlock(),vue.createBlock(a,{key:1,modelValue:o.value,"onUpdate:modelValue":e=>o.value=e,modelModifiers:{number:!0},placeholder:"Value",type:"number"},null,8,["modelValue","onUpdate:modelValue"])):"boolean"===o.valueType?(vue.openBlock(),vue.createBlock(d,{key:2,modelValue:o.value,"onUpdate:modelValue":e=>o.value=e},{default:vue.withCtx((()=>[vue.createVNode(s,{label:"true",value:!0}),vue.createVNode(s,{label:"false",value:!1})])),_:2},1032,["modelValue","onUpdate:modelValue"])):(vue.openBlock(),vue.createBlock(a,{key:3,modelValue:o.value,"onUpdate:modelValue":e=>o.value=e,placeholder:"Value",type:"textarea",autosize:""},null,8,["modelValue","onUpdate:modelValue"])),vue.createVNode(d,{modelValue:o.valueType,"onUpdate:modelValue":e=>o.valueType=e,class:"fm-extend-select"},{default:vue.withCtx((()=>[vue.createVNode(s,{label:e.$t("fm.rules.label.string"),value:"string"},null,8,["label"]),vue.createVNode(s,{label:e.$t("fm.rules.label.number"),value:"number"},null,8,["label"]),vue.createVNode(s,{label:e.$t("fm.rules.label.boolean"),value:"boolean"},null,8,["label"]),vue.createVNode(s,{label:e.$t("fm.rules.label.fx"),value:"fx"},null,8,["label"])])),_:2},1032,["modelValue","onUpdate:modelValue"])]),vue.createElementVNode("i",{onClick:e=>l.handleRemove(n),style:{"font-size":"16px",margin:"0 10px",cursor:"pointer",color:"#F56C6C"}},t[0]||(t[0]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_3$F)])))),128)),vue.createVNode(u,{text:"",bg:"",plain:"",type:"primary",style:{width:"100%"},size:"small",onClick:l.handleAdd},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.add")),1),t[1]||(t[1]=vue.createElementVNode("i",{class:"fm-iconfont icon-plus",style:{"font-size":"12px",margin:"5px"}},null,-1))])),_:1},8,["onClick"])])}var ExtendPropConfig=_export_sfc(_sfc_main$1r,[["render",_sfc_render$1l]]),StateConfig_vue_vue_type_style_index_0_lang="";const _sfc_main$1q={name:"state-config",components:{FormulaInput:FormulaInput},emits:["update:modelValue"],props:{label:{type:String},modelValue:{type:[String,Boolean]}},data:()=>({select:!1,fx:!1,fxValue:""}),created(){this.transformData(this.modelValue)},watch:{select(e){this.$emit("update:modelValue",this.transformValue())},fx(e){this.$emit("update:modelValue",this.transformValue())},fxValue(e){this.$emit("update:modelValue",this.transformValue())}},methods:{transformData(e){"boolean"==typeof e&&(this.select=e,this.fx=!1),"string"==typeof e&&(this.select=!0,this.fx=!0,this.fxValue=extractExpression(e))},transformValue(){return!!this.select&&(!this.fx||`{{${this.fxValue}}}`)}}},_hoisted_1$Y={class:"fm-state-config"},_hoisted_2$Q={class:"fm-state-item"},_hoisted_3$E={key:0,class:"fm-state-content"},_hoisted_4$C={key:0};function _sfc_render$1k(e,t,o,n,i,l){const a=vue.resolveComponent("el-switch"),r=vue.resolveComponent("el-radio"),s=vue.resolveComponent("el-radio-group"),d=vue.resolveComponent("formula-input");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$Y,[vue.createElementVNode("div",_hoisted_2$Q,[vue.createElementVNode("div",null,vue.toDisplayString(o.label)+":",1),vue.createElementVNode("div",null,[vue.createVNode(a,{modelValue:i.select,"onUpdate:modelValue":t[0]||(t[0]=e=>i.select=e)},null,8,["modelValue"])])]),i.select?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$E,[vue.createElementVNode("div",null,[vue.createVNode(s,{modelValue:i.fx,"onUpdate:modelValue":t[1]||(t[1]=e=>i.fx=e),size:"small"},{default:vue.withCtx((()=>[vue.createVNode(r,{label:e.$t("fm.formula.input.value2"),value:!1},null,8,["label"]),vue.createVNode(r,{label:e.$t("fm.formula.input.fx"),value:!0},null,8,["label"])])),_:1},8,["modelValue"])]),i.fx?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$C,[vue.createVNode(d,{modelValue:i.fxValue,"onUpdate:modelValue":t[2]||(t[2]=e=>i.fxValue=e),only:"",size:"small"},null,8,["modelValue"])])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0)])}var StateConfig=_export_sfc(_sfc_main$1q,[["render",_sfc_render$1k]]);const _sfc_main$1p={components:{Draggable:draggableComponent,CodeEditor:CodeEditor,CodeDialog:CodeDialog,CusDialog:CusDialog,FmFormTable:FmFormTable$1,EventConfig:EventConfig,Editor:_sfc_main$1A,ObjectDynamic:ObjectDynamic,FormulaInput:FormulaInput,ArrayDynamic:ArrayDynamic,ColumnsConfig:ColumnsConfig,OperationConfig:OperationConfig,ExtendPropConfig:ExtendPropConfig,StateConfig:StateConfig},props:["data","sheets","platform","datasources","eventscripts","formKey","fieldModels"],emits:["on-event-add","on-event-edit","on-event-remove","on-datasource-edit","on-class-edit"],inject:["getModelNode","getVantMobile"],data(){return{validator:{type:null,required:null,pattern:null,range:null,length:null,validator:null},editorVisible:!1,editorValue:"",tableVisible:!1,customClassArray:this.data&&this.data.options&&this.data.options.customClass?this.data.options.customClass.split(" ").filter((e=>e)):[]}},computed:{show(){return!!(this.data&&Object.keys(this.data).length>0&&this.data.key&&this.data.options)}},mounted(){this.validateRequired(!(!this.data||!this.data.options)&&this.data.options.required),this.validateDataType(this.data&&this.data.options?this.data.options.dataType:""),this.valiatePattern(this.data&&this.data.options?this.data.options.pattern:""),this.validateCustom(this.data&&this.data.options?this.data.options.validator:"")},methods:{handleCopyField(){const e=document.createElement("textarea");e.value=this.getModelNode()+this.data.model,document.getElementsByClassName("clipboard-content")[0].appendChild(e),e.select(),document.execCommand("copy"),document.getElementsByClassName("clipboard-content")[0].removeChild(e),ElMessage({message:this.$t("fm.message.copySuccess"),type:"success"},this)},handleOptionsRemove(e){"grid"===this.data.type?this.data.columns.splice(e,1):"tabs"===this.data.type||"collapse"===this.data.type?this.data.tabs.splice(e,1):"imgupload"===this.data.type||"fileupload"===this.data.type?this.data.options.headers.splice(e,1):"steps"===this.data.type?this.data.options.steps.splice(e,1):"transfer"===this.data.type?this.data.options.data.splice(e,1):(!this.data.options.remote&&this.data.options.options[e].value&&(this.data.options.defaultValue="string"==typeof this.data.options.defaultValue?"":[]),this.data.options.options.splice(e,1)),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleClearSelect(){"checkbox"==this.data.type||"select"==this.data.type&&this.data.options.multiple||"transfer"==this.data.type?this.data.options.defaultValue=[]:this.data.options.defaultValue="",this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleAddData(){this.data.options.data.push({key:"",label:""}),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleAddStep(){this.data.options.steps.push({title:"New Step",description:""}),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleAddOption(){this.data.options.showLabel?this.data.options.options.push({value:this.$t("fm.config.widget.newOption"),label:this.$t("fm.config.widget.newOption")}):this.data.options.options.push({value:this.$t("fm.config.widget.newOption")}),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleAddTab(){let e=this.data.tabs.length;this.data.tabs.push({label:this.$t("fm.config.widget.tab")+(e+1),name:"tab_"+Math.random().toString(36).slice(-8),list:[]}),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleAddCollapse(){let e=this.data.tabs.length;this.data.tabs.push({title:this.$t("fm.config.widget.collapse")+(e+1),name:"collapse_"+Math.random().toString(36).slice(-8),list:[]}),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleAddHeader(){"headers"in this.data.options?this.data.options.headers.push({key:"",value:""}):this.data.options.headers=[{key:"",value:""}],this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},generateRule(){this.data&&(this.data.rules=[],Object.keys(this.validator).forEach((e=>{this.validator[e]&&this.data.rules.push(this.validator[e])})))},handleSelectMuliple(e){"select"!=this.data.type&&"treeselect"!=this.data.type||(e?this.data.options.defaultValue?this.data.options.defaultValue=[this.data.options.defaultValue]:this.data.options.defaultValue=[]:this.data.options.defaultValue.length>0?this.data.options.defaultValue=this.data.options.defaultValue[0]:this.data.options.defaultValue="")},handleSetTemplate(){this.$refs.codeDialog.open(this.data.options.template)},handleTemplateConfirm(e){try{this.data.options.template=e,this.$refs.codeDialog.close(),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}catch(t){this.$refs.codeDialog.end(),ElMessage({message:t.message,type:"error"})}},handleSetEditorValue(){this.editorVisible=!0,this.editorValue=this.data.options.defaultValue},handleEditorValueConfirm(e){try{this.data.options.defaultValue=this.editorValue,this.editorVisible=!1,this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}catch(t){this.editorVisible=!1,ElMessage({message:t.message,type:"error"})}},handleSetDefaultValue(){this.$refs.defaultValueDialog.open(this.data.options.defaultValue)},handleDefaultValueConfirm(e){try{this.data.options.defaultValue="string"==typeof e?Function('"use strict";return ('+e+")")():e,this.$refs.defaultValueDialog.close(),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}catch(t){this.$refs.defaultValueDialog.end(),ElMessage({message:t.message,type:"error"})}},handleSetCascader(){this.$refs.cascaderDialog.open(this.data.options.options)},handleCascaderConfirm(e){try{this.data.options.options="string"==typeof e?Function('"use strict";return ('+e+")")():e,this.$refs.cascaderDialog.close(),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}catch(t){this.$refs.cascaderDialog.end(),ElMessage({message:t.message,type:"error"})}},handleSetTree(){this.$refs.treeDialog.open(this.data.options.options)},handleTreeConfirm(e){try{this.data.options.options="string"==typeof e?Function('"use strict";return ('+e+")")():e,this.$refs.treeDialog.close(),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}catch(t){this.$refs.treeDialog.end(),ElMessage({message:t.message,type:"error"})}},handleSetProps(){this.data.options.extendProps||(this.data.options.extendProps={}),this.$refs.extendPropsDialog.open(this.data.options.extendProps)},handlePropsConfirm(e){try{this.data.options.extendProps="string"==typeof e?Function('"use strict";return ('+e+")")():e,this.$refs.extendPropsDialog.close(),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}catch(t){this.$refs.extendPropsDialog.end(),ElMessage({message:t.message,type:"error"})}},validateRequired(e){this.validator.required=e?{required:!0,message:this.data.options.requiredMessage?this.data.options.requiredMessage:""}:null,this.$nextTick((()=>{this.generateRule()}))},validateDataType(e){if(!this.show)return!1;!e||!this.data.options.dataTypeCheck&&Object.keys(this.data.options).includes("dataTypeCheck")?this.validator.type=null:this.validator.type={type:e,message:this.data.options.dataTypeMessage?this.data.options.dataTypeMessage:""},this.generateRule()},valiatePattern(e){if(!this.show)return!1;!e||!this.data.options.patternCheck&&Object.keys(this.data.options).includes("patternCheck")?this.validator.pattern=null:this.validator.pattern={pattern:e,message:this.data.options.patternMessage?this.data.options.patternMessage:""},this.generateRule()},validateCustom(e){if(!this.show)return!1;e&&this.data.options.validatorCheck?this.validator.validator={func:e}:this.validator.validator=null,this.generateRule()},handleSetClass(){this.$emit("on-class-edit")},handleDatasourceManage(e){this.$emit("on-datasource-edit",e)},handleEventAdd(e){this.$emit("on-event-add",e)},handleEventEdit({eventName:e,functionKey:t}){this.$emit("on-event-edit",{eventName:e,functionKey:t})},handleEventRemove(e){this.$emit("on-event-remove",e),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},setEvent(e){if(e.type.includes("operate_")&&"list"==this.data.type){const t=e.type.match(/^operate_(\d+)$/);if(t){const o=Number(t[1]);this.data.options.operations.buttons[o].event=e.key}}else this.data.events[e.type]=e.key;this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleDataSourceChange(e){var t;let o=null==(t=this.datasources.find((t=>t.value==e)))?void 0:t.args;o&&(this.data.options.remoteArgs=o)},handleDynamicDataSourceChange(e){var t;let o=null==(t=this.datasources.find((t=>t.value==e)))?void 0:t.args;o&&(this.data.options.dynamicValueArgs=o)},handleButtonEventAdd(e){this.$emit("on-event-add","operate_"+e)},handleButtonEventEdit(e,t){this.$emit("on-event-edit",{eventName:"operate_"+e,functionKey:t})}},watch:{"data.options.isRange":function(e){void 0!==e&&(e?this.data.options.defaultValue=null:Object.keys(this.data.options).indexOf("defaultValue")>=0&&(this.data.options.defaultValue=""))},"data.options.type":function(e){"date"==this.data.type&&(this.data.options.defaultValue="daterange"==e||"datetimerange"==e||"dates"==e||"monthrange"==e?[]:"")},"data.options.required":function(e){this.validateRequired(e)},"data.options.requiredMessage":function(e){this.validateRequired(!(!this.data||!this.data.options)&&this.data.options.required)},"data.options.dataType":function(e){this.validateDataType(e)},"data.options.dataTypeCheck":function(e){this.validateDataType(this.data&&this.data.options?this.data.options.dataType:"")},"data.options.dataTypeMessage":function(e){this.validateDataType(this.data&&this.data.options?this.data.options.dataType:"")},"data.options.pattern":function(e){this.valiatePattern(e)},"data.options.patternCheck":function(e){this.valiatePattern(this.data&&this.data.options?this.data.options.pattern:"")},"data.options.patternMessage":function(e){this.valiatePattern(this.data&&this.data.options?this.data.options.pattern:"")},"data.options.validator":function(e){this.validateCustom(e)},"data.options.validatorCheck":function(e){this.validateCustom(this.data&&this.data.options?this.data.options.validator:"")},"data.options.options":{deep:!0,handler(e){this.data.options&&"object"==typeof this.data.options.defaultValue&&Array.isArray(this.data.options.defaultValue)&&(this.data.options.defaultValue=this.data.options.defaultValue.filter((t=>e.map((e=>e.value)).includes(t)))),this.data.options&&"string"==typeof this.data.options.defaultValue&&("object"!=typeof e||e.map((e=>e.value)).includes(this.data.options.defaultValue)||(this.data.options.defaultValue=""))}},"data.options.customClass":function(e){this.customClassArray=this.data&&this.data.options&&this.data.options.customClass?this.data.options.customClass.split(" ").filter((e=>e)):[]},"data.options.format":function(e){this.data.options.defaultValue=""},customClassArray(e){this.data.options.customClass=e.join(" ")}}},_hoisted_1$X=["title"],_hoisted_2$P={key:0,style:{"font-size":"13px","word-break":"break-all","line-height":"1.2",color:"#e6a23c",padding:"0 5px 5px 5px"}},_hoisted_3$D={style:{display:"flex"},class:"clipboard-content"},_hoisted_4$B={key:1,style:{display:"flex","align-items":"center","margin-bottom":"5px"}},_hoisted_5$A=["onClick"],_hoisted_6$m={style:{"margin-left":"22px"}},_hoisted_7$i=["onClick"],_hoisted_8$d={style:{"margin-left":"22px"}},_hoisted_9$c={key:0},_hoisted_10$a={key:1,style:{display:"flex","align-items":"center","margin-bottom":"5px"}},_hoisted_11$4={key:0},_hoisted_12$3=["onClick"],_hoisted_13$1=["onClick"],_hoisted_14$1={key:3,style:{"margin-left":"22px"}},_hoisted_15$1={key:1,style:{display:"flex","align-items":"center","margin-bottom":"5px"}},_hoisted_16={style:{display:"inline-block","vertical-align":"middle"}},_hoisted_17=["onClick"],_hoisted_18={style:{"margin-left":"5px"}},_hoisted_19={key:1,style:{display:"flex","align-items":"center","margin-bottom":"5px"}},_hoisted_20={style:{display:"inline-block","vertical-align":"middle"}},_hoisted_21=["onClick"],_hoisted_22={style:{"margin-left":"5px"}},_hoisted_23={key:1,style:{display:"flex","align-items":"center","margin-bottom":"5px"}},_hoisted_24={style:{display:"flex","align-items":"center"}},_hoisted_25={key:0,class:"validate-block"},_hoisted_26={key:1,class:"validate-block"},_hoisted_27={key:2,class:"validate-block"},_hoisted_28={key:3,class:"validate-block"},_hoisted_29={key:0},_hoisted_30={key:1,class:"empty"};function _sfc_render$1j(e,t,o,n,i,l){const a=vue.resolveComponent("el-tag"),r=vue.resolveComponent("el-form-item"),s=vue.resolveComponent("el-option"),d=vue.resolveComponent("el-select"),u=vue.resolveComponent("el-input"),c=vue.resolveComponent("el-checkbox"),m=vue.resolveComponent("el-input-number"),p=vue.resolveComponent("el-switch"),f=vue.resolveComponent("el-radio-button"),h=vue.resolveComponent("el-radio-group"),v=vue.resolveComponent("el-time-picker"),g=vue.resolveComponent("el-date-picker"),y=vue.resolveComponent("el-radio"),b=vue.resolveComponent("formula-input"),k=vue.resolveComponent("el-button"),w=vue.resolveComponent("el-tooltip"),C=vue.resolveComponent("object-dynamic"),_=vue.resolveComponent("array-dynamic"),x=vue.resolveComponent("draggable"),S=vue.resolveComponent("el-color-picker"),V=vue.resolveComponent("el-rate"),$=vue.resolveComponent("code-editor"),N=vue.resolveComponent("el-popover"),E=vue.resolveComponent("el-cascader"),B=vue.resolveComponent("el-tree-select"),D=vue.resolveComponent("el-collapse-item"),T=vue.resolveComponent("el-checkbox-group"),F=vue.resolveComponent("columns-config"),O=vue.resolveComponent("operation-config"),I=vue.resolveComponent("state-config"),M=vue.resolveComponent("extend-prop-config"),P=vue.resolveComponent("event-config"),L=vue.resolveComponent("el-collapse"),A=vue.resolveComponent("el-form"),R=vue.resolveComponent("code-dialog"),W=vue.resolveComponent("Editor"),U=vue.resolveComponent("cus-dialog"),z=vue.resolveComponent("el-scrollbar");return vue.openBlock(),vue.createBlock(z,null,{default:vue.withCtx((()=>{var n,z;return[vue.createElementVNode("div",null,[l.show?(vue.openBlock(),vue.createElementBlock("div",{key:o.data.key},[vue.createVNode(A,{"label-position":"top",size:"default",model:o.data},{default:vue.withCtx((()=>[vue.createVNode(r,{label:e.$t("fm.config.widget.widgetType")},{default:vue.withCtx((()=>[vue.createVNode(a,{effect:"plain"},{default:vue.withCtx((()=>["custom"===o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[t[220]||(t[220]=vue.createElementVNode("i",{class:"icon fm-iconfont icon-extend",style:{"font-size":"14px"}},null,-1)),vue.createTextVNode("  "+vue.toDisplayString(e.$t("fm.components.custom.title")),1)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createElementVNode("i",{class:vue.normalizeClass(`fm-iconfont ${o.data.icon}`),style:{"font-size":"14px"}},null,2),vue.createTextVNode("  "+vue.toDisplayString(e.$t(`fm.components.fields.${o.data.type}`)),1)],64))])),_:1})])),_:1},8,["label"]),vue.createVNode(L,{class:"fm-widget-config-collapse","model-value":["basic","options","expend","columns","operation","paging"]},{default:vue.withCtx((()=>[vue.createVNode(D,{title:e.$t("fm.config.widget.basicSetting"),name:"basic"},{default:vue.withCtx((()=>["td"!=o.data.type&&"th"!=o.data.type&&"col"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:0,required:!0,prop:"model",for:""},{label:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.model"))+" ",1),vue.createElementVNode("i",{class:"fm-iconfont icon-copy",title:e.$t("fm.tooltip.copy"),onClick:t[0]||(t[0]=(...e)=>l.handleCopyField&&l.handleCopyField(...e)),style:{cursor:"pointer","font-size":"18px",padding:"0 5px",color:"var(--fm-color-primary)"}},null,8,_hoisted_1$X)])),default:vue.withCtx((()=>{var e;return[l.getModelNode()?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$P,vue.toDisplayString(l.getModelNode()),1)):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3$D,[(null==(e=o.fieldModels)?void 0:e.length)>0?(vue.openBlock(),vue.createBlock(d,{key:0,modelValue:o.data.model,"onUpdate:modelValue":t[1]||(t[1]=e=>o.data.model=e),filterable:"","allow-create":"","default-first-option":"",style:{width:"100%"}},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.fieldModels,(e=>{var t;return vue.openBlock(),vue.createBlock(s,{key:e.fieldId,label:null!=(t=e.fieldLabel)?t:e.fieldId,value:e.fieldId},null,8,["label","value"])})),128))])),_:1},8,["modelValue"])):(vue.openBlock(),vue.createBlock(u,{key:1,clearable:"",modelValue:o.data.model,"onUpdate:modelValue":t[2]||(t[2]=e=>o.data.model=e)},null,8,["modelValue"]))])]})),_:1})):vue.createCommentVNode("",!0),"grid"!=o.data.type&&"tabs"!=o.data.type&&"collapse"!=o.data.type&&"report"!=o.data.type&&"inline"!=o.data.type&&"td"!=o.data.type&&"th"!=o.data.type&&"col"!=o.data.type&&"alert"!=o.data.type&&"dialog"!=o.data.type&&"card"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:1,label:e.$t("fm.config.widget.name")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.name,"onUpdate:modelValue":t[3]||(t[3]=e=>o.data.name=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("buttonName")>=0?(vue.openBlock(),vue.createBlock(r,{key:2,label:e.$t("fm.config.widget.buttonName")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.buttonName,"onUpdate:modelValue":t[4]||(t[4]=e=>o.data.options.buttonName=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("linkName")>=0?(vue.openBlock(),vue.createBlock(r,{key:3,label:e.$t("fm.config.widget.linkName")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.linkName,"onUpdate:modelValue":t[5]||(t[5]=e=>o.data.options.linkName=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("title")>=0?(vue.openBlock(),vue.createBlock(r,{key:4,label:e.$t("fm.config.widget.otitle")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.title,"onUpdate:modelValue":t[6]||(t[6]=e=>o.data.options.title=e),type:"textarea",autosize:""},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("description")>=0?(vue.openBlock(),vue.createBlock(r,{key:5,label:e.$t("fm.config.widget.description")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.description,"onUpdate:modelValue":t[7]||(t[7]=e=>o.data.options.description=e),type:"textarea",autosize:""},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("width")>=0&&"td"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:6,label:e.$t("fm.config.widget.width")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.width,"onUpdate:modelValue":t[8]||(t[8]=e=>o.data.options.width=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("height")>=0?(vue.openBlock(),vue.createBlock(r,{key:7,label:e.$t("fm.config.widget.height")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.height,"onUpdate:modelValue":t[9]||(t[9]=e=>o.data.options.height=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"imgupload"==o.data.type&&Object.keys(o.data.options).indexOf("size")>=0?(vue.openBlock(),vue.createBlock(r,{key:8,label:e.$t("fm.config.widget.size")},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.width"))+" ",1),vue.createVNode(u,{clearable:"",style:{width:"90px"},type:"number",modelValue:o.data.options.size.width,"onUpdate:modelValue":t[10]||(t[10]=e=>o.data.options.size.width=e),modelModifiers:{number:!0}},null,8,["modelValue"]),vue.createTextVNode(" "+vue.toDisplayString(e.$t("fm.config.widget.height"))+" ",1),vue.createVNode(u,{clearable:"",style:{width:"90px"},type:"number",modelValue:o.data.options.size.height,"onUpdate:modelValue":t[11]||(t[11]=e=>o.data.options.size.height=e),modelModifiers:{number:!0}},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("labelWidth")>=0?(vue.openBlock(),vue.createBlock(r,{key:9,label:e.$t("fm.config.widget.labelWidth")},{default:vue.withCtx((()=>[vue.createVNode(c,{modelValue:o.data.options.isLabelWidth,"onUpdate:modelValue":t[12]||(t[12]=e=>o.data.options.isLabelWidth=e),style:{"margin-right":"5px"}},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.custom")),1)])),_:1},8,["modelValue"]),vue.createVNode(m,{modelValue:o.data.options.labelWidth,"onUpdate:modelValue":t[13]||(t[13]=e=>o.data.options.labelWidth=e),disabled:!o.data.options.isLabelWidth,min:0,max:99999,step:10},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"grid"!=o.data.type&&"tabs"!=o.data.type&&"collapse"!=o.data.type&&"report"!=o.data.type&&"inline"!=o.data.type&&"divider"!=o.data.type&&"td"!=o.data.type&&"th"!=o.data.type&&"col"!=o.data.type&&"alert"!=o.data.type&&"dialog"!=o.data.type&&"card"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:10,label:e.$t("fm.config.widget.labelWrap")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.labelWrap,"onUpdate:modelValue":t[14]||(t[14]=e=>o.data.options.labelWrap=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"grid"!=o.data.type&&"tabs"!=o.data.type&&"collapse"!=o.data.type&&"report"!=o.data.type&&"inline"!=o.data.type&&"divider"!=o.data.type&&"td"!=o.data.type&&"th"!=o.data.type&&"col"!=o.data.type&&"alert"!=o.data.type&&"dialog"!=o.data.type&&"card"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:11,label:e.$t("fm.config.widget.hideLabel")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.hideLabel,"onUpdate:modelValue":t[15]||(t[15]=e=>o.data.options.hideLabel=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("placeholder")>=0&&"time"!=o.data.type&&"date"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:12,label:e.$t("fm.config.widget.placeholder")},{default:vue.withCtx((()=>[vue.createVNode(u,{modelValue:o.data.options.placeholder,"onUpdate:modelValue":t[16]||(t[16]=e=>o.data.options.placeholder=e),clearable:""},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("tip")>=0?(vue.openBlock(),vue.createBlock(r,{key:13,label:e.$t("fm.config.widget.tip")},{default:vue.withCtx((()=>[vue.createVNode(u,{type:"textarea",autosize:"",clearable:"",modelValue:o.data.options.tip,"onUpdate:modelValue":t[17]||(t[17]=e=>o.data.options.tip=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("inline")>=0?(vue.openBlock(),vue.createBlock(r,{key:14,label:e.$t("fm.config.widget.layout")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.inline,"onUpdate:modelValue":t[18]||(t[18]=e=>o.data.options.inline=e)},{default:vue.withCtx((()=>[vue.createVNode(f,{label:!1,value:!1},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.block")),1)])),_:1}),vue.createVNode(f,{label:!0,value:!0},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.inline")),1)])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("effect")>=0?(vue.openBlock(),vue.createBlock(r,{key:15,label:e.$t("fm.config.widget.effect")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.effect,"onUpdate:modelValue":t[19]||(t[19]=e=>o.data.options.effect=e),disabled:l.getVantMobile()},{default:vue.withCtx((()=>[vue.createVNode(f,{label:"light",value:"light"},{default:vue.withCtx((()=>t[221]||(t[221]=[vue.createTextVNode("light")]))),_:1}),vue.createVNode(f,{label:"dark",value:"dark"},{default:vue.withCtx((()=>t[222]||(t[222]=[vue.createTextVNode("dark")]))),_:1})])),_:1},8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("contentPosition")>=0?(vue.openBlock(),vue.createBlock(r,{key:16,label:e.$t("fm.config.widget.contentPosition")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.contentPosition,"onUpdate:modelValue":t[20]||(t[20]=e=>o.data.options.contentPosition=e)},{default:vue.withCtx((()=>[vue.createVNode(f,{label:"left",value:"left"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.left")),1)])),_:1}),vue.createVNode(f,{label:"center",value:"center"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.center")),1)])),_:1}),vue.createVNode(f,{label:"right",value:"right"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.right")),1)])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("showInput")>=0?(vue.openBlock(),vue.createBlock(r,{key:17,label:e.$t("fm.config.widget.showInput")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showInput,"onUpdate:modelValue":t[21]||(t[21]=e=>o.data.options.showInput=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("min")>=0?(vue.openBlock(),vue.createBlock(r,{key:18,label:e.$t("fm.config.widget.min")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.min,"onUpdate:modelValue":t[22]||(t[22]=e=>o.data.options.min=e),step:1},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("max")>=0?(vue.openBlock(),vue.createBlock(r,{key:19,label:e.$t("fm.config.widget.max")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.max,"onUpdate:modelValue":t[23]||(t[23]=e=>o.data.options.max=e),step:1},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("step")>=0?(vue.openBlock(),vue.createBlock(r,{key:20,label:e.$t("fm.config.widget.step")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.step,"onUpdate:modelValue":t[24]||(t[24]=e=>o.data.options.step=e),min:-99999,max:99999,step:1},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("maxlength")>=0?(vue.openBlock(),vue.createBlock(r,{key:21,label:e.$t("fm.config.widget.maxlength")},{default:vue.withCtx((()=>[vue.createVNode(u,{modelValue:o.data.options.maxlength,"onUpdate:modelValue":t[25]||(t[25]=e=>o.data.options.maxlength=e),type:"number"},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("rows")>=0?(vue.openBlock(),vue.createBlock(r,{key:22,label:e.$t("fm.config.widget.rows")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.rows,"onUpdate:modelValue":t[26]||(t[26]=e=>o.data.options.rows=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("autosize")>=0?(vue.openBlock(),vue.createBlock(r,{key:23,label:e.$t("fm.config.widget.autosize")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.autosize,"onUpdate:modelValue":t[27]||(t[27]=e=>o.data.options.autosize=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("precision")>=0?(vue.openBlock(),vue.createBlock(r,{key:24,label:e.$t("fm.config.widget.precision")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.precision,"onUpdate:modelValue":t[28]||(t[28]=e=>o.data.options.precision=e),min:0,max:99999,step:1},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("controls")>=0?(vue.openBlock(),vue.createBlock(r,{key:25,label:e.$t("fm.config.widget.controls")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.controls,"onUpdate:modelValue":t[29]||(t[29]=e=>o.data.options.controls=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("controlsPosition")>=0&&o.data.options.controls?(vue.openBlock(),vue.createBlock(r,{key:26,label:e.$t("fm.config.widget.controlsPosition")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.controlsPosition,"onUpdate:modelValue":t[30]||(t[30]=e=>o.data.options.controlsPosition=e),disabled:l.getVantMobile()},{default:vue.withCtx((()=>[vue.createVNode(f,{label:"",value:""},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.default")),1)])),_:1}),vue.createVNode(f,{label:"right",value:"right"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.right")),1)])),_:1})])),_:1},8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"select"==o.data.type||"imgupload"==o.data.type||"fileupload"==o.data.type||"cascader"==o.data.type||"treeselect"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:27,label:e.$t("fm.config.widget.multiple")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.multiple,"onUpdate:modelValue":t[31]||(t[31]=e=>o.data.options.multiple=e),onChange:l.handleSelectMuliple},null,8,["modelValue","onChange"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"select"==o.data.type||"cascader"==o.data.type||"transfer"==o.data.type||"treeselect"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:28,label:e.$t("fm.config.widget.filterable")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.filterable,"onUpdate:modelValue":t[32]||(t[32]=e=>o.data.options.filterable=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("checkStrictly")>=0?(vue.openBlock(),vue.createBlock(r,{key:29,label:e.$t("fm.config.widget.checkStrictly")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.checkStrictly,"onUpdate:modelValue":t[33]||(t[33]=e=>o.data.options.checkStrictly=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("allowHalf")>=0?(vue.openBlock(),vue.createBlock(r,{key:30,label:e.$t("fm.config.widget.allowHalf")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.allowHalf,"onUpdate:modelValue":t[34]||(t[34]=e=>o.data.options.allowHalf=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("showAlpha")>=0?(vue.openBlock(),vue.createBlock(r,{key:31,label:e.$t("fm.config.widget.showAlpha")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showAlpha,"onUpdate:modelValue":t[35]||(t[35]=e=>o.data.options.showAlpha=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"inline"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:32},[vue.createVNode(r,{label:e.$t("fm.config.widget.flex")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.flex,"onUpdate:modelValue":t[36]||(t[36]=e=>o.data.options.flex=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"]),"inline"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[o.data.options.flex?(vue.openBlock(),vue.createBlock(r,{key:0,label:e.$t("fm.config.widget.justify")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.flexJustify,"onUpdate:modelValue":t[37]||(t[37]=e=>o.data.options.flexJustify=e),size:"small",disabled:l.getVantMobile()},{default:vue.withCtx((()=>[vue.createVNode(f,{value:"flex-start"},{default:vue.withCtx((()=>t[223]||(t[223]=[vue.createElementVNode("i",{class:"fm-iconfont icon-justify-content-flex-start-icon"},null,-1)]))),_:1}),vue.createVNode(f,{value:"flex-end"},{default:vue.withCtx((()=>t[224]||(t[224]=[vue.createElementVNode("i",{class:"fm-iconfont icon-justify-content-flex-end-icon"},null,-1)]))),_:1}),vue.createVNode(f,{value:"center"},{default:vue.withCtx((()=>t[225]||(t[225]=[vue.createElementVNode("i",{class:"fm-iconfont icon-justify-content-center-icon"},null,-1)]))),_:1}),vue.createVNode(f,{value:"space-between"},{default:vue.withCtx((()=>t[226]||(t[226]=[vue.createElementVNode("i",{class:"fm-iconfont icon-justify-content-space-between-icon"},null,-1)]))),_:1}),vue.createVNode(f,{value:"space-around"},{default:vue.withCtx((()=>t[227]||(t[227]=[vue.createElementVNode("i",{class:"fm-iconfont icon-justify-content-space-around-icon"},null,-1)]))),_:1}),vue.createVNode(f,{value:"space-evenly"},{default:vue.withCtx((()=>t[228]||(t[228]=[vue.createElementVNode("i",{class:"fm-iconfont icon-justify-content-space-evenly-icon"},null,-1)]))),_:1})])),_:1},8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.flex?(vue.openBlock(),vue.createBlock(r,{key:1,label:e.$t("fm.config.widget.align")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.flexAlign,"onUpdate:modelValue":t[38]||(t[38]=e=>o.data.options.flexAlign=e),size:"small",disabled:l.getVantMobile()},{default:vue.withCtx((()=>[vue.createVNode(f,{value:"flex-start"},{default:vue.withCtx((()=>t[229]||(t[229]=[vue.createElementVNode("i",{class:"fm-iconfont icon-align-items-flex-start"},null,-1)]))),_:1}),vue.createVNode(f,{value:"flex-end"},{default:vue.withCtx((()=>t[230]||(t[230]=[vue.createElementVNode("i",{class:"fm-iconfont icon-align-items-flex-end"},null,-1)]))),_:1}),vue.createVNode(f,{value:"center"},{default:vue.withCtx((()=>t[231]||(t[231]=[vue.createElementVNode("i",{class:"fm-iconfont icon-align-items-center"},null,-1)]))),_:1}),vue.createVNode(f,{value:"stretch"},{default:vue.withCtx((()=>t[232]||(t[232]=[vue.createElementVNode("i",{class:"fm-iconfont icon-align-items-stretch"},null,-1)]))),_:1})])),_:1},8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),"td"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:33},[vue.createVNode(r,{label:e.$t("fm.config.widget.textAlign")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.textAlign,"onUpdate:modelValue":t[39]||(t[39]=e=>o.data.options.textAlign=e),size:"small"},{default:vue.withCtx((()=>[vue.createVNode(f,{value:"left"},{default:vue.withCtx((()=>t[233]||(t[233]=[vue.createElementVNode("i",{class:"fm-iconfont icon-text-align-left"},null,-1)]))),_:1}),vue.createVNode(f,{value:"center"},{default:vue.withCtx((()=>t[234]||(t[234]=[vue.createElementVNode("i",{class:"fm-iconfont icon-text-align-center"},null,-1)]))),_:1}),vue.createVNode(f,{value:"right"},{default:vue.withCtx((()=>t[235]||(t[235]=[vue.createElementVNode("i",{class:"fm-iconfont icon-text-align-right"},null,-1)]))),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.verticalAlign")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.verticalAlign,"onUpdate:modelValue":t[40]||(t[40]=e=>o.data.options.verticalAlign=e),size:"small"},{default:vue.withCtx((()=>[vue.createVNode(f,{value:"top"},{default:vue.withCtx((()=>t[236]||(t[236]=[vue.createElementVNode("i",{class:"fm-iconfont icon-ic24-vertical-align-top"},null,-1)]))),_:1}),vue.createVNode(f,{value:"middle"},{default:vue.withCtx((()=>t[237]||(t[237]=[vue.createElementVNode("i",{class:"fm-iconfont icon-vertical-align-middle-outlined"},null,-1)]))),_:1}),vue.createVNode(f,{value:"bottom"},{default:vue.withCtx((()=>t[238]||(t[238]=[vue.createElementVNode("i",{class:"fm-iconfont icon-ic24-vertical-align-bottom"},null,-1)]))),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("steps")>=0?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:34},[vue.createVNode(r,{label:e.$t("fm.config.widget.space")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.space,"onUpdate:modelValue":t[41]||(t[41]=e=>o.data.options.space=e),min:0,step:10,disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.direction")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.direction,"onUpdate:modelValue":t[42]||(t[42]=e=>o.data.options.direction=e)},{default:vue.withCtx((()=>[vue.createVNode(f,{label:"horizontal",value:"horizontal"},{default:vue.withCtx((()=>t[239]||(t[239]=[vue.createTextVNode("Horizontal")]))),_:1}),vue.createVNode(f,{label:"vertical",value:"vertical"},{default:vue.withCtx((()=>t[240]||(t[240]=[vue.createTextVNode("Vertical")]))),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.processStatus")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.processStatus,"onUpdate:modelValue":t[43]||(t[43]=e=>o.data.options.processStatus=e),disabled:l.getVantMobile()},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"wait",label:"wait"}),vue.createVNode(s,{value:"process",label:"process"}),vue.createVNode(s,{value:"finish",label:"finish"}),vue.createVNode(s,{value:"error",label:"error"}),vue.createVNode(s,{value:"success",label:"success"})])),_:1},8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.finishStatus")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.finishStatus,"onUpdate:modelValue":t[44]||(t[44]=e=>o.data.options.finishStatus=e),disabled:l.getVantMobile()},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"wait",label:"wait"}),vue.createVNode(s,{value:"process",label:"process"}),vue.createVNode(s,{value:"finish",label:"finish"}),vue.createVNode(s,{value:"error",label:"error"}),vue.createVNode(s,{value:"success",label:"success"})])),_:1},8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.alignCenter")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.alignCenter,"onUpdate:modelValue":t[45]||(t[45]=e=>o.data.options.alignCenter=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.simple")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.simple,"onUpdate:modelValue":t[46]||(t[46]=e=>o.data.options.simple=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),"transfer"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:35,label:e.$t("fm.config.widget.titles")},{default:vue.withCtx((()=>[vue.createVNode(u,{placeholder:"List 1",modelValue:o.data.options.titles[0],"onUpdate:modelValue":t[47]||(t[47]=e=>o.data.options.titles[0]=e),style:{width:"130px"}},null,8,["modelValue"]),t[241]||(t[241]=vue.createTextVNode(" - ")),vue.createVNode(u,{placeholder:"List 2",modelValue:o.data.options.titles[1],"onUpdate:modelValue":t[48]||(t[48]=e=>o.data.options.titles[1]=e),style:{width:"130px"}},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"alert"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:36},[vue.createVNode(r,{label:e.$t("fm.config.widget.type")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.type,"onUpdate:modelValue":t[49]||(t[49]=e=>o.data.options.type=e)},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"success"}),vue.createVNode(s,{value:"warning"}),vue.createVNode(s,{value:"info"}),vue.createVNode(s,{value:"error"})])),_:1},8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.closable")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.closable,"onUpdate:modelValue":t[50]||(t[50]=e=>o.data.options.closable=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.center")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.center,"onUpdate:modelValue":t[51]||(t[51]=e=>o.data.options.center=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.showIcon")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showIcon,"onUpdate:modelValue":t[52]||(t[52]=e=>o.data.options.showIcon=e)},null,8,["modelValue"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),"pagination"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:37},[Object.keys(o.data.options).indexOf("pageSize")>=0?(vue.openBlock(),vue.createBlock(r,{key:0,label:e.$t("fm.config.widget.pageSize")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.pageSize,"onUpdate:modelValue":t[53]||(t[53]=e=>o.data.options.pageSize=e),step:5,min:1,max:100},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("pagerCount")>=0?(vue.openBlock(),vue.createBlock(r,{key:1,label:e.$t("fm.config.widget.pagerCount")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.pagerCount,"onUpdate:modelValue":t[54]||(t[54]=e=>o.data.options.pagerCount=e),step:1,min:5,max:21},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("total")>=0?(vue.openBlock(),vue.createBlock(r,{key:2,label:e.$t("fm.config.widget.total")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.total,"onUpdate:modelValue":t[55]||(t[55]=e=>o.data.options.total=e),step:1,min:0},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("background")>=0?(vue.openBlock(),vue.createBlock(r,{key:3,label:e.$t("fm.config.widget.background")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.background,"onUpdate:modelValue":t[56]||(t[56]=e=>o.data.options.background=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("buttonSize")>=0?(vue.openBlock(),vue.createBlock(r,{key:38,label:e.$t("fm.config.widget.buttonSize")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.buttonSize,"onUpdate:modelValue":t[57]||(t[57]=e=>o.data.options.buttonSize=e)},{default:vue.withCtx((()=>[vue.createVNode(f,{label:"large",value:"large"},{default:vue.withCtx((()=>t[242]||(t[242]=[vue.createTextVNode("Large")]))),_:1}),vue.createVNode(f,{label:"default",value:"default"},{default:vue.withCtx((()=>t[243]||(t[243]=[vue.createTextVNode("Default")]))),_:1}),vue.createVNode(f,{label:"small",value:"small"},{default:vue.withCtx((()=>t[244]||(t[244]=[vue.createTextVNode("Small")]))),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("buttonType")>=0?(vue.openBlock(),vue.createBlock(r,{key:39,label:e.$t("fm.config.widget.buttonType")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.buttonType,"onUpdate:modelValue":t[58]||(t[58]=e=>o.data.options.buttonType=e),style:{width:"100%"}},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"",label:"Default"}),vue.createVNode(s,{value:"primary",label:"Primary"}),vue.createVNode(s,{value:"success",label:"Success"}),vue.createVNode(s,{value:"warning",label:"Warning"}),vue.createVNode(s,{value:"danger",label:"Danger"}),vue.createVNode(s,{value:"info",label:"Info"}),vue.createVNode(s,{value:"text",label:"Text"}),vue.createVNode(s,{value:"link",label:"Link"})])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("linkType")>=0?(vue.openBlock(),vue.createBlock(r,{key:40,label:e.$t("fm.config.widget.linkType")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.linkType,"onUpdate:modelValue":t[59]||(t[59]=e=>o.data.options.linkType=e),style:{width:"100%"}},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"default",label:"Default"}),vue.createVNode(s,{value:"primary",label:"Primary"}),vue.createVNode(s,{value:"success",label:"Success"}),vue.createVNode(s,{value:"warning",label:"Warning"}),vue.createVNode(s,{value:"danger",label:"Danger"}),vue.createVNode(s,{value:"info",label:"Info"})])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("buttonPlain")>=0?(vue.openBlock(),vue.createBlock(r,{key:41,label:e.$t("fm.config.widget.buttonPlain")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.buttonPlain,"onUpdate:modelValue":t[60]||(t[60]=e=>o.data.options.buttonPlain=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("buttonRound")>=0?(vue.openBlock(),vue.createBlock(r,{key:42,label:e.$t("fm.config.widget.buttonRound")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.buttonRound,"onUpdate:modelValue":t[61]||(t[61]=e=>o.data.options.buttonRound=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("href")>=0?(vue.openBlock(),vue.createBlock(r,{key:43,label:"href"},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.href,"onUpdate:modelValue":t[62]||(t[62]=e=>o.data.options.href=e)},null,8,["modelValue"])])),_:1})):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("underline")>=0?(vue.openBlock(),vue.createBlock(r,{key:44,label:e.$t("fm.config.widget.underline")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.underline,"onUpdate:modelValue":t[63]||(t[63]=e=>o.data.options.underline=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("blank")>=0?(vue.openBlock(),vue.createBlock(r,{key:45,label:e.$t("fm.config.widget.isBlank")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.blank,"onUpdate:modelValue":t[64]||(t[64]=e=>o.data.options.blank=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("paging")>=0?(vue.openBlock(),vue.createBlock(r,{key:46,label:e.$t("fm.config.widget.paging")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.paging,"onUpdate:modelValue":t[65]||(t[65]=e=>o.data.options.paging=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.paging&&Object.keys(o.data.options).indexOf("pageSize")>=0?(vue.openBlock(),vue.createBlock(r,{key:47,label:e.$t("fm.config.widget.pageSize")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.pageSize,"onUpdate:modelValue":t[66]||(t[66]=e=>o.data.options.pageSize=e),step:5,min:1},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("showControl")>=0?(vue.openBlock(),vue.createBlock(r,{key:48,label:e.$t("fm.config.widget.showControl")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showControl,"onUpdate:modelValue":t[67]||(t[67]=e=>o.data.options.showControl=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("virtualTable")>=0?(vue.openBlock(),vue.createBlock(r,{key:49,label:e.$t("fm.config.widget.virtualTable")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.virtualTable,"onUpdate:modelValue":t[68]||(t[68]=e=>o.data.options.virtualTable=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"table"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:50,label:e.$t("fm.config.widget.selection")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.selection,"onUpdate:modelValue":t[69]||(t[69]=e=>o.data.options.selection=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.tableColumn?(vue.openBlock(),vue.createBlock(r,{key:51,label:e.$t("fm.config.widget.fixedColumn")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.fixedColumn,"onUpdate:modelValue":t[70]||(t[70]=e=>o.data.options.fixedColumn=e)},null,8,["modelValue"]),o.data.options.fixedColumn?(vue.openBlock(),vue.createBlock(d,{key:0,modelValue:o.data.options.fixedColumnPosition,"onUpdate:modelValue":t[71]||(t[71]=e=>o.data.options.fixedColumnPosition=e),placeholder:e.$t("fm.config.widget.fixedColumnSelect"),style:{"margin-left":"10px",width:"180px"}},{default:vue.withCtx((()=>[vue.createVNode(s,{label:e.$t("fm.config.widget.left"),value:"left"},null,8,["label"]),vue.createVNode(s,{label:e.$t("fm.config.widget.right"),value:"right"},null,8,["label"])])),_:1},8,["modelValue","placeholder"])):vue.createCommentVNode("",!0)])),_:1},8,["label"])):vue.createCommentVNode("",!0),"time"==o.data.type||"date"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:52},["date"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:0,label:e.$t("fm.config.widget.showType")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.type,"onUpdate:modelValue":t[72]||(t[72]=e=>o.data.options.type=e)},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"year"}),vue.createVNode(s,{value:"month"}),vue.createVNode(s,{value:"date"}),vue.createVNode(s,{value:"week"}),vue.createVNode(s,{value:"dates"}),vue.createVNode(s,{value:"datetime"}),vue.createVNode(s,{value:"datetimerange"}),vue.createVNode(s,{value:"daterange"}),vue.createVNode(s,{value:"monthrange"})])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"time"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:1,label:e.$t("fm.config.widget.isRange")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.isRange,"onUpdate:modelValue":t[73]||(t[73]=e=>o.data.options.isRange=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),!o.data.options.isRange&&"time"==o.data.type||"time"!=o.data.type&&"datetimerange"!=o.data.options.type&&"daterange"!=o.data.options.type?(vue.openBlock(),vue.createBlock(r,{key:2,label:e.$t("fm.config.widget.placeholder")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.placeholder,"onUpdate:modelValue":t[74]||(t[74]=e=>o.data.options.placeholder=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.isRange||"datetimerange"==o.data.options.type||"daterange"==o.data.options.type?(vue.openBlock(),vue.createBlock(r,{key:3,label:e.$t("fm.config.widget.startPlaceholder")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.startPlaceholder,"onUpdate:modelValue":t[75]||(t[75]=e=>o.data.options.startPlaceholder=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.isRange||"datetimerange"==o.data.options.type||"daterange"==o.data.options.type?(vue.openBlock(),vue.createBlock(r,{key:4,label:e.$t("fm.config.widget.endPlaceholder")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.endPlaceholder,"onUpdate:modelValue":t[76]||(t[76]=e=>o.data.options.endPlaceholder=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),vue.createVNode(r,{label:e.$t("fm.config.widget.format")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.format,"onUpdate:modelValue":t[77]||(t[77]=e=>o.data.options.format=e),modelModifiers:{lazy:!0}},null,8,["modelValue"])])),_:1},8,["label"]),"date"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:5,label:e.$t("fm.config.widget.isTimestamp")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.timestamp,"onUpdate:modelValue":t[78]||(t[78]=e=>o.data.options.timestamp=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"time"==o.data.type&&Object.keys(o.data.options).indexOf("isRange")>=0?(vue.openBlock(),vue.createBlock(r,{key:6,label:e.$t("fm.config.widget.defaultValue")},{default:vue.withCtx((()=>[o.data.options.isRange?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(v,{key:"1",style:{width:"100%"},modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[79]||(t[79]=e=>o.data.options.defaultValue=e),arrowControl:o.data.options.arrowControl,"value-format":o.data.options.format},null,8,["modelValue","arrowControl","value-format"])),o.data.options.isRange?(vue.openBlock(),vue.createBlock(v,{key:"2",style:{width:"100%"},modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[80]||(t[80]=e=>o.data.options.defaultValue=e),"is-range":"",arrowControl:o.data.options.arrowControl,"value-format":o.data.options.format},null,8,["modelValue","arrowControl","value-format"])):vue.createCommentVNode("",!0)])),_:1},8,["label"])):vue.createCommentVNode("",!0),"date"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:7,label:e.$t("fm.config.widget.defaultValue")},{default:vue.withCtx((()=>[o.data.options.timestamp?(vue.openBlock(),vue.createBlock(g,{key:"1",modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[81]||(t[81]=e=>o.data.options.defaultValue=e),type:o.data.options.type,clearable:!0,"value-format":o.data.options.timestamp?"x":o.data.options.format,format:o.data.options.format,style:{width:"100%"}},null,8,["modelValue","type","value-format","format"])):(vue.openBlock(),vue.createBlock(g,{key:"2",modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[82]||(t[82]=e=>o.data.options.defaultValue=e),type:o.data.options.type,clearable:!0,"value-format":o.data.options.timestamp?"x":o.data.options.format,format:o.data.options.format,style:{width:"100%"}},null,8,["modelValue","type","value-format","format"]))])),_:1},8,["label"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),"imgupload"==o.data.type||"fileupload"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:53},["fileupload"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:0,label:e.$t("fm.config.widget.accept")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.accept,"onUpdate:modelValue":t[83]||(t[83]=e=>o.data.options.accept=e),placeholder:e.$t("fm.config.widget.acceptPlaceholder")},null,8,["modelValue","placeholder"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),vue.createVNode(r,{label:e.$t("fm.config.widget.limit")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",type:"number",modelValue:o.data.options.limit,"onUpdate:modelValue":t[84]||(t[84]=e=>o.data.options.limit=e),modelModifiers:{number:!0}},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.isQiniu")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.isQiniu,"onUpdate:modelValue":t[85]||(t[85]=e=>o.data.options.isQiniu=e)},null,8,["modelValue"])])),_:1},8,["label"]),o.data.options.isQiniu?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(r,{label:"Domain",required:!0,prop:"options.domain"},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.domain,"onUpdate:modelValue":t[86]||(t[86]=e=>o.data.options.domain=e)},null,8,["modelValue"])])),_:1}),vue.createVNode(r,{label:e.$t("fm.config.widget.tokenFunc"),required:!0},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.tokenType,"onUpdate:modelValue":t[87]||(t[87]=e=>o.data.options.tokenType=e)},{default:vue.withCtx((()=>[vue.createVNode(y,{label:"datasource",value:"datasource"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.name")),1)])),_:1}),vue.createVNode(y,{label:"fx",value:"fx"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.formula.input.fx")),1)])),_:1})])),_:1},8,["modelValue"]),"fx"==o.data.options.tokenType?(vue.openBlock(),vue.createBlock(b,{key:0,size:"default",only:"",modelValue:o.data.options.tokenFx,"onUpdate:modelValue":t[88]||(t[88]=e=>o.data.options.tokenFx=e),style:{"margin-bottom":"5px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0),"datasource"==o.data.options.tokenType?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$B,[vue.createVNode(d,{onChange:l.handleDataSourceChange,modelValue:o.data.options.tokenDataSource,"onUpdate:modelValue":t[89]||(t[89]=e=>o.data.options.tokenDataSource=e)},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.datasources,(e=>(vue.openBlock(),vue.createBlock(s,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["onChange","modelValue"]),vue.createVNode(w,{content:e.$t("fm.config.widget.settings")},{default:vue.withCtx((()=>[vue.createVNode(k,{link:"",type:"primary",style:{margin:"5px"},onClick:t[90]||(t[90]=e=>l.handleDatasourceManage(o.data.options.tokenDataSource))},{default:vue.withCtx((()=>t[245]||(t[245]=[vue.createElementVNode("i",{class:"fm-iconfont icon-pm"},null,-1)]))),_:1})])),_:1},8,["content"])])):vue.createCommentVNode("",!0),"datasource"==o.data.options.tokenType&&o.data.options.remoteArgs?(vue.openBlock(),vue.createBlock(C,{key:o.data.options.tokenDataSource,operable:!1,modelValue:o.data.options.remoteArgs,"onUpdate:modelValue":t[91]||(t[91]=e=>o.data.options.remoteArgs=e)},null,8,["modelValue"])):vue.createCommentVNode("",!0)])),_:1},8,["label"])],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:2},[vue.createVNode(r,{label:e.$t("fm.config.widget.action"),required:!0,prop:"options.action",trigger:"change"},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.action,"onUpdate:modelValue":t[92]||(t[92]=e=>o.data.options.action=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.headers")},{default:vue.withCtx((()=>[vue.createVNode(_,{modelValue:o.data.options.headers,"onUpdate:modelValue":t[93]||(t[93]=e=>o.data.options.headers=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.withCredentials")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.withCredentials,"onUpdate:modelValue":t[94]||(t[94]=e=>o.data.options.withCredentials=e)},null,8,["modelValue"])])),_:1},8,["label"])],64))],64)):vue.createCommentVNode("",!0),"blank"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:54,label:e.$t("fm.config.widget.defaultType")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.defaultType,"onUpdate:modelValue":t[95]||(t[95]=e=>o.data.options.defaultType=e)},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"String",label:e.$t("fm.config.widget.string")},null,8,["label"]),vue.createVNode(s,{value:"Object",label:e.$t("fm.config.widget.object")},null,8,["label"]),vue.createVNode(s,{value:"Array",label:e.$t("fm.config.widget.array")},null,8,["label"])])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"component"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:55,label:e.$t("fm.config.widget.customTemplates")},{default:vue.withCtx((()=>[vue.createVNode(k,{style:{width:"100%"},onClick:l.handleSetTemplate},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1},8,["onClick"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"inline"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:56,label:e.$t("fm.config.widget.spaceSize")},{default:vue.withCtx((()=>[vue.createVNode(m,{clearable:"",min:0,modelValue:o.data.options.spaceSize,"onUpdate:modelValue":t[96]||(t[96]=e=>o.data.options.spaceSize=e),disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"grid"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:57},[vue.createVNode(r,{label:e.$t("fm.config.widget.gutter"),key:"gutter"},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",type:"number",modelValue:o.data.options.gutter,"onUpdate:modelValue":t[97]||(t[97]=e=>o.data.options.gutter=e),modelModifiers:{number:!0}},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.flex"),key:"flex"},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.flex,"onUpdate:modelValue":t[98]||(t[98]=e=>o.data.options.flex=e),disabled:""},null,8,["modelValue"])])),_:1},8,["label"]),o.data.options.flex?(vue.openBlock(),vue.createBlock(r,{label:e.$t("fm.config.widget.justify"),key:"justify"},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.justify,"onUpdate:modelValue":t[99]||(t[99]=e=>o.data.options.justify=e)},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"start",label:e.$t("fm.config.widget.justifyStart")},null,8,["label"]),vue.createVNode(s,{value:"end",label:e.$t("fm.config.widget.justifyEnd")},null,8,["label"]),vue.createVNode(s,{value:"center",label:e.$t("fm.config.widget.justifyCenter")},null,8,["label"]),vue.createVNode(s,{value:"space-around",label:e.$t("fm.config.widget.justifySpaceAround")},null,8,["label"]),vue.createVNode(s,{value:"space-between",label:e.$t("fm.config.widget.justifySpaceBetween")},null,8,["label"])])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.flex?(vue.openBlock(),vue.createBlock(r,{label:e.$t("fm.config.widget.align"),key:"align"},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:o.data.options.align,"onUpdate:modelValue":t[100]||(t[100]=e=>o.data.options.align=e)},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"top",label:e.$t("fm.config.widget.alignTop")},null,8,["label"]),vue.createVNode(s,{value:"middle",label:e.$t("fm.config.widget.alignMiddle")},null,8,["label"]),vue.createVNode(s,{value:"bottom",label:e.$t("fm.config.widget.alignBottom")},null,8,["label"])])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),"col"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:58},[vue.createVNode(r,{label:e.$t("fm.config.widget.span")},{default:vue.withCtx((()=>["pc"==o.platform?(vue.openBlock(),vue.createBlock(m,{key:0,modelValue:o.data.options.md,"onUpdate:modelValue":t[101]||(t[101]=e=>o.data.options.md=e),step:1,min:1,max:24},null,8,["modelValue"])):vue.createCommentVNode("",!0),"pad"==o.platform?(vue.openBlock(),vue.createBlock(m,{key:1,modelValue:o.data.options.sm,"onUpdate:modelValue":t[102]||(t[102]=e=>o.data.options.sm=e),step:1,min:1,max:24},null,8,["modelValue"])):vue.createCommentVNode("",!0),"mobile"==o.platform?(vue.openBlock(),vue.createBlock(m,{key:2,modelValue:o.data.options.xs,"onUpdate:modelValue":t[103]||(t[103]=e=>o.data.options.xs=e),step:1,min:1,max:24},null,8,["modelValue"])):vue.createCommentVNode("",!0)])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.offset")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.offset,"onUpdate:modelValue":t[104]||(t[104]=e=>o.data.options.offset=e),step:1,min:0,max:24},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.push")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.push,"onUpdate:modelValue":t[105]||(t[105]=e=>o.data.options.push=e),step:1,min:0,max:24},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.pull")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.pull,"onUpdate:modelValue":t[106]||(t[106]=e=>o.data.options.pull=e),step:1,min:0,max:24},null,8,["modelValue"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),"tabs"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:59},[vue.createVNode(r,{label:e.$t("fm.config.widget.type")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.type,"onUpdate:modelValue":t[107]||(t[107]=e=>o.data.options.type=e)},{default:vue.withCtx((()=>[vue.createVNode(f,{label:"",value:""},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.default")),1)])),_:1}),vue.createVNode(f,{label:"card",value:"card"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.card")),1)])),_:1}),vue.createVNode(f,{label:"border-card",value:"border-card"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.borderCard")),1)])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.tabPosition")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.tabPosition,"onUpdate:modelValue":t[108]||(t[108]=e=>o.data.options.tabPosition=e),disabled:l.getVantMobile()},{default:vue.withCtx((()=>[vue.createVNode(f,{label:"top",value:"top"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.top")),1)])),_:1}),vue.createVNode(f,{label:"left",value:"left"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.left")),1)])),_:1}),vue.createVNode(f,{label:"right",value:"right"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.right")),1)])),_:1}),vue.createVNode(f,{label:"bottom",value:"bottom"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.bottom")),1)])),_:1})])),_:1},8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.tabOption")},{default:vue.withCtx((()=>[vue.createVNode(x,vue.mergeProps({tag:"ul",list:o.data.tabs},{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},{handle:".drag-item","item-key":"index"}),{item:vue.withCtx((({element:o,index:n})=>[(vue.openBlock(),vue.createElementBlock("li",{key:n},[t[247]||(t[247]=vue.createElementVNode("i",{class:"drag-item",style:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_bars"})],-1)),vue.createVNode(u,{clearable:"",placeholder:e.$t("fm.config.widget.tabName"),style:{width:"200px","margin-bottom":"5px"},modelValue:o.label,"onUpdate:modelValue":e=>o.label=e},null,8,["placeholder","modelValue","onUpdate:modelValue"]),vue.createElementVNode("i",{onClick:e=>l.handleOptionsRemove(n),style:{"font-size":"16px",margin:"0 5px",cursor:"pointer"}},t[246]||(t[246]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_5$A)]))])),_:1},16,["list"]),vue.createElementVNode("div",_hoisted_6$m,[vue.createVNode(k,{link:"",type:"primary",onClick:l.handleAddTab},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.addTab")),1)])),_:1},8,["onClick"])])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),"collapse"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:60},[vue.createVNode(r,{label:e.$t("fm.config.widget.collapseOptions")},{default:vue.withCtx((()=>[vue.createVNode(x,vue.mergeProps({tag:"ul",list:o.data.tabs},{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},{handle:".drag-item","item-key":"index"}),{item:vue.withCtx((({element:o,index:n})=>[(vue.openBlock(),vue.createElementBlock("li",{key:n},[t[249]||(t[249]=vue.createElementVNode("i",{class:"drag-item",style:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_bars"})],-1)),vue.createVNode(u,{clearable:"",placeholder:e.$t("fm.config.widget.collapseTitle"),style:{width:"200px","margin-bottom":"5px"},modelValue:o.title,"onUpdate:modelValue":e=>o.title=e},null,8,["placeholder","modelValue","onUpdate:modelValue"]),vue.createElementVNode("i",{onClick:e=>l.handleOptionsRemove(n),style:{"font-size":"16px",margin:"0 5px",cursor:"pointer"}},t[248]||(t[248]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_7$i)]))])),_:1},16,["list"]),vue.createElementVNode("div",_hoisted_8$d,[vue.createVNode(k,{link:"",type:"primary",onClick:l.handleAddCollapse},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.addCollapse")),1)])),_:1},8,["onClick"])])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.accordion")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.accordion,"onUpdate:modelValue":t[109]||(t[109]=e=>o.data.options.accordion=e)},null,8,["modelValue"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),"report"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:61},[vue.createVNode(r,{label:e.$t("fm.config.widget.borderWidth")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.data.options.borderWidth,"onUpdate:modelValue":t[110]||(t[110]=e=>o.data.options.borderWidth=e),min:0,step:1},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.borderColor")},{default:vue.withCtx((()=>[vue.createVNode(S,{modelValue:o.data.options.borderColor,"onUpdate:modelValue":t[111]||(t[111]=e=>o.data.options.borderColor=e)},null,8,["modelValue"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),"dialog"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:62},[vue.createVNode(r,{label:e.$t("fm.config.widget.showDialog")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.visible,"onUpdate:modelValue":t[112]||(t[112]=e=>o.data.options.visible=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.center")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.center,"onUpdate:modelValue":t[113]||(t[113]=e=>o.data.options.center=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.showClose")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showClose,"onUpdate:modelValue":t[114]||(t[114]=e=>o.data.options.showClose=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.showCancel")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showCancel,"onUpdate:modelValue":t[115]||(t[115]=e=>o.data.options.showCancel=e)},null,8,["modelValue"]),o.data.options.showCancel?(vue.openBlock(),vue.createBlock(u,{key:0,modelValue:o.data.options.cancelText,"onUpdate:modelValue":t[116]||(t[116]=e=>o.data.options.cancelText=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.cancelText")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0)])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.showOk")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showOk,"onUpdate:modelValue":t[117]||(t[117]=e=>o.data.options.showOk=e)},null,8,["modelValue"]),o.data.options.showOk?(vue.openBlock(),vue.createBlock(c,{key:0,modelValue:o.data.options.confirmLoading,"onUpdate:modelValue":t[118]||(t[118]=e=>o.data.options.confirmLoading=e),label:e.$t("fm.config.widget.confirmLoading"),style:{"margin-left":"18px","vertical-align":"middle"}},null,8,["modelValue","label"])):vue.createCommentVNode("",!0),o.data.options.showOk?(vue.openBlock(),vue.createBlock(u,{key:1,modelValue:o.data.options.okText,"onUpdate:modelValue":t[119]||(t[119]=e=>o.data.options.okText=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.okText")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0)])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.marginTop")},{default:vue.withCtx((()=>[vue.createVNode(u,{modelValue:o.data.options.top,"onUpdate:modelValue":t[120]||(t[120]=e=>o.data.options.top=e)},null,8,["modelValue"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),"card"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:63},[vue.createVNode(r,{label:e.$t("fm.config.widget.padding")},{default:vue.withCtx((()=>[vue.createVNode(u,{modelValue:o.data.options.padding,"onUpdate:modelValue":t[121]||(t[121]=e=>o.data.options.padding=e),clearable:"",disabled:l.getVantMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.showHeader")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showHeader,"onUpdate:modelValue":t[122]||(t[122]=e=>o.data.options.showHeader=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.bordered")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.bordered,"onUpdate:modelValue":t[123]||(t[123]=e=>o.data.options.bordered=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.shadow")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.shadow,"onUpdate:modelValue":t[124]||(t[124]=e=>o.data.options.shadow=e),disabled:l.getVantMobile()},{default:vue.withCtx((()=>[vue.createVNode(f,{label:"always",value:"always"},{default:vue.withCtx((()=>t[250]||(t[250]=[vue.createTextVNode("always")]))),_:1}),vue.createVNode(f,{label:"hover",value:"hover"},{default:vue.withCtx((()=>t[251]||(t[251]=[vue.createTextVNode("hover")]))),_:1}),vue.createVNode(f,{label:"never",value:"never"},{default:vue.withCtx((()=>t[252]||(t[252]=[vue.createTextVNode("never")]))),_:1})])),_:1},8,["modelValue","disabled"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),"list"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:64},[vue.createVNode(r,{label:e.$t("fm.config.widget.stripe")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.stripe,"onUpdate:modelValue":t[125]||(t[125]=e=>o.data.options.stripe=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.bordered")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.border,"onUpdate:modelValue":t[126]||(t[126]=e=>o.data.options.border=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.highlight")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.highlight,"onUpdate:modelValue":t[127]||(t[127]=e=>o.data.options.highlight=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.selection")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.selection,"onUpdate:modelValue":t[128]||(t[128]=e=>o.data.options.selection=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(r,{label:e.$t("fm.config.widget.maxHeight")},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",modelValue:o.data.options.maxHeight,"onUpdate:modelValue":t[129]||(t[129]=e=>o.data.options.maxHeight=e),modelModifiers:{number:!0}},{suffix:vue.withCtx((()=>t[253]||(t[253]=[vue.createTextVNode("px")]))),_:1},8,["modelValue"])])),_:1},8,["label"])],64)):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("defaultValue")>=0&&"custom"!=o.data.type&&"imgupload"!=o.data.type&&"fileupload"!=o.data.type&&"radio"!=o.data.type&&"checkbox"!=o.data.type&&"select"!=o.data.type&&"date"!=o.data.type&&"time"!=o.data.type&&"steps"!=o.data.type&&"transfer"!=o.data.type&&"dialog"!=o.data.type&&"card"!=o.data.type&&"group"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:65,label:e.$t("fm.config.widget.defaultValue")},{default:vue.withCtx((()=>["textarea"==o.data.type?(vue.openBlock(),vue.createBlock(u,{key:0,clearable:"",type:"textarea",rows:o.data.options.rows,maxlength:o.data.options.maxlength,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[130]||(t[130]=e=>o.data.options.defaultValue=e)},null,8,["rows","maxlength","modelValue"])):vue.createCommentVNode("",!0),"input"==o.data.type||"text"==o.data.type?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},["number"==o.data.options.dataType||"integer"==o.data.options.dataType||"float"==o.data.options.dataType?(vue.openBlock(),vue.createBlock(u,{key:0,clearable:"",type:"number",modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[131]||(t[131]=e=>o.data.options.defaultValue=e),modelModifiers:{number:!0}},null,8,["modelValue"])):(vue.openBlock(),vue.createBlock(u,{key:1,clearable:"",modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[132]||(t[132]=e=>o.data.options.defaultValue=e)},null,8,["modelValue"]))],64)):vue.createCommentVNode("",!0),"rate"==o.data.type?(vue.openBlock(),vue.createBlock(V,{key:2,style:{display:"inline-block","vertical-align":"middle"},max:o.data.options.max,"allow-half":o.data.options.allowHalf,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[133]||(t[133]=e=>o.data.options.defaultValue=e)},null,8,["max","allow-half","modelValue"])):vue.createCommentVNode("",!0),"rate"==o.data.type?(vue.openBlock(),vue.createBlock(k,{key:3,link:"",type:"primary",style:{display:"inline-block","vertical-align":"middle","margin-left":"10px"},onClick:t[134]||(t[134]=e=>o.data.options.defaultValue=0)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.clear")),1)])),_:1})):vue.createCommentVNode("",!0),"color"==o.data.type?(vue.openBlock(),vue.createBlock(S,{key:4,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[135]||(t[135]=e=>o.data.options.defaultValue=e),"show-alpha":o.data.options.showAlpha},null,8,["modelValue","show-alpha"])):vue.createCommentVNode("",!0),"switch"==o.data.type?(vue.openBlock(),vue.createBlock(p,{key:5,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[136]||(t[136]=e=>o.data.options.defaultValue=e)},null,8,["modelValue"])):vue.createCommentVNode("",!0),"number"==o.data.type||"slider"==o.data.type?(vue.openBlock(),vue.createBlock(m,{key:6,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[137]||(t[137]=e=>o.data.options.defaultValue=e),step:o.data.options.step,min:o.data.options.min,max:o.data.options.max},null,8,["modelValue","step","min","max"])):vue.createCommentVNode("",!0),"pagination"==o.data.type?(vue.openBlock(),vue.createBlock(m,{key:7,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[138]||(t[138]=e=>o.data.options.defaultValue=e),step:1,min:1},null,8,["modelValue"])):vue.createCommentVNode("",!0),"html"==o.data.type?(vue.openBlock(),vue.createBlock(N,{key:8,placement:"right",width:500,trigger:"click","hide-after":0},{reference:vue.withCtx((()=>[vue.createVNode(k,{style:{width:"100%"}},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1})])),default:vue.withCtx((()=>[(vue.openBlock(),vue.createBlock($,{key:o.data.key,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[139]||(t[139]=e=>o.data.options.defaultValue=e),height:"300px"},null,8,["modelValue"]))])),_:1})):vue.createCommentVNode("",!0),"cascader"==o.data.type?(vue.openBlock(),vue.createBlock(E,{key:9,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[140]||(t[140]=e=>o.data.options.defaultValue=e),clearable:"",options:o.data.options.remote?[]:o.data.options.options,style:{width:"100%"},props:{multiple:o.data.options.multiple,checkStrictly:o.data.options.checkStrictly},filterable:o.data.options.filterable,"collapse-tags":""},null,8,["modelValue","options","props","filterable"])):vue.createCommentVNode("",!0),"treeselect"==o.data.type?(vue.openBlock(),vue.createBlock(B,{key:10,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[141]||(t[141]=e=>o.data.options.defaultValue=e),clearable:"",data:o.data.options.remote?[]:o.data.options.options,style:{width:"100%"},multiple:o.data.options.multiple,"check-strictly":o.data.options.checkStrictly,filterable:o.data.options.filterable},null,8,["modelValue","data","multiple","check-strictly","filterable"])):vue.createCommentVNode("",!0),"editor"==o.data.type?(vue.openBlock(),vue.createBlock(k,{key:11,style:{width:"100%"},onClick:l.handleSetEditorValue},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1},8,["onClick"])):vue.createCommentVNode("",!0),"table"==o.data.type||"subform"==o.data.type||"list"==o.data.type?(vue.openBlock(),vue.createBlock(k,{key:12,style:{width:"100%"},onClick:l.handleSetDefaultValue},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1},8,["onClick"])):vue.createCommentVNode("",!0)])),_:1},8,["label"])):vue.createCommentVNode("",!0)])),_:1},8,["title"]),Object.keys(o.data.options).indexOf("options")>=0||Object.keys(o.data.options).indexOf("steps")>=0||"transfer"==o.data.type?(vue.openBlock(),vue.createBlock(D,{key:0,title:e.$t("fm.config.widget.optionsSetting"),name:"options"},{default:vue.withCtx((()=>[Object.keys(o.data.options).indexOf("options")>=0?(vue.openBlock(),vue.createBlock(r,{key:0,label:e.$t("fm.config.widget.option")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.remote,"onUpdate:modelValue":t[142]||(t[142]=e=>o.data.options.remote=e),style:{"margin-bottom":"10px"}},{default:vue.withCtx((()=>[vue.createVNode(f,{label:!1,value:!1},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.staticData")),1)])),_:1}),vue.createVNode(f,{label:!0,value:!0},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.remoteData")),1)])),_:1})])),_:1},8,["modelValue"]),o.data.options.remote?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$c,[vue.createVNode(h,{modelValue:o.data.options.remoteType,"onUpdate:modelValue":t[143]||(t[143]=e=>o.data.options.remoteType=e),style:{"margin-bottom":"8px"}},{default:vue.withCtx((()=>[vue.createVNode(y,{label:"datasource",value:"datasource"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.name")),1)])),_:1}),vue.createVNode(y,{label:"fx",value:"fx"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.formula.input.fx")),1)])),_:1})])),_:1},8,["modelValue"]),"fx"==o.data.options.remoteType?(vue.openBlock(),vue.createBlock(b,{key:0,size:"default",only:"",modelValue:o.data.options.remoteFx,"onUpdate:modelValue":t[144]||(t[144]=e=>o.data.options.remoteFx=e),style:{"margin-bottom":"5px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0),"datasource"==o.data.options.remoteType?(vue.openBlock(),vue.createElementBlock("div",_hoisted_10$a,[vue.createVNode(d,{onChange:l.handleDataSourceChange,modelValue:o.data.options.remoteDataSource,"onUpdate:modelValue":t[145]||(t[145]=e=>o.data.options.remoteDataSource=e)},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.datasources,(e=>(vue.openBlock(),vue.createBlock(s,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["onChange","modelValue"]),vue.createVNode(w,{content:e.$t("fm.config.widget.settings")},{default:vue.withCtx((()=>[vue.createVNode(k,{link:"",type:"primary",style:{margin:"5px"},onClick:t[146]||(t[146]=e=>l.handleDatasourceManage(o.data.options.remoteDataSource))},{default:vue.withCtx((()=>t[254]||(t[254]=[vue.createElementVNode("i",{class:"fm-iconfont icon-pm"},null,-1)]))),_:1})])),_:1},8,["content"])])):vue.createCommentVNode("",!0),"datasource"==o.data.options.remoteType&&o.data.options.remoteArgs?(vue.openBlock(),vue.createBlock(C,{key:o.data.options.remoteDataSource,operable:!1,modelValue:o.data.options.remoteArgs,"onUpdate:modelValue":t[147]||(t[147]=e=>o.data.options.remoteArgs=e)},null,8,["modelValue"])):vue.createCommentVNode("",!0),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.props.value,"onUpdate:modelValue":t[148]||(t[148]=e=>o.data.options.props.value=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.value")),1)])),_:1},8,["modelValue"]),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.props.label,"onUpdate:modelValue":t[149]||(t[149]=e=>o.data.options.props.label=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.label")),1)])),_:1},8,["modelValue"]),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.props.children,"onUpdate:modelValue":t[150]||(t[150]=e=>o.data.options.props.children=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.childrenOption")),1)])),_:1},8,["modelValue"])])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[Object.keys(o.data.options).indexOf("showLabel")>=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$4,[vue.createVNode(c,{modelValue:o.data.options.showLabel,"onUpdate:modelValue":t[151]||(t[151]=e=>o.data.options.showLabel=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.showLabel")),1)])),_:1},8,["modelValue"])])):vue.createCommentVNode("",!0),"radio"==o.data.type||"select"==o.data.type&&!o.data.options.multiple?(vue.openBlock(),vue.createBlock(h,{key:1,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[153]||(t[153]=e=>o.data.options.defaultValue=e)},{default:vue.withCtx((()=>[vue.createVNode(x,vue.mergeProps({tag:"ul",modelValue:o.data.options.options,"onUpdate:modelValue":t[152]||(t[152]=e=>o.data.options.options=e)},{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},{handle:".drag-item","item-key":"index"}),{item:vue.withCtx((({element:e,index:n})=>[(vue.openBlock(),vue.createElementBlock("li",{key:n},[vue.createVNode(y,{label:e.value,value:e.value,style:{"margin-right":"5px"}},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",style:vue.normalizeStyle({width:o.data.options.showLabel?"90px":"180px"}),modelValue:e.value,"onUpdate:modelValue":t=>e.value=t},null,8,["style","modelValue","onUpdate:modelValue"]),o.data.options.showLabel?(vue.openBlock(),vue.createBlock(u,{key:0,clearable:"",style:{width:"90px"},modelValue:e.label,"onUpdate:modelValue":t=>e.label=t},null,8,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0)])),_:2},1032,["label","value"]),t[256]||(t[256]=vue.createElementVNode("i",{class:"drag-item",style:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_bars"})],-1)),vue.createElementVNode("i",{onClick:e=>l.handleOptionsRemove(n),style:{"font-size":"16px",margin:"0 5px",cursor:"pointer"}},t[255]||(t[255]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_12$3)]))])),_:1},16,["modelValue"])])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),"checkbox"==o.data.type||"select"==o.data.type&&o.data.options.multiple?(vue.openBlock(),vue.createBlock(T,{key:2,modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[154]||(t[154]=e=>o.data.options.defaultValue=e)},{default:vue.withCtx((()=>[vue.createVNode(x,vue.mergeProps({tag:"ul",list:o.data.options.options},{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},{handle:".drag-item","item-key":"index"}),{item:vue.withCtx((({element:e,index:n})=>[(vue.openBlock(),vue.createElementBlock("li",{key:n},[vue.createVNode(c,{label:e.value,value:e.value,style:{"margin-right":"5px","margin-bottom":"3px"}},{default:vue.withCtx((()=>[vue.createVNode(u,{clearable:"",style:vue.normalizeStyle({width:o.data.options.showLabel?"90px":"180px"}),modelValue:e.value,"onUpdate:modelValue":t=>e.value=t},null,8,["style","modelValue","onUpdate:modelValue"]),o.data.options.showLabel?(vue.openBlock(),vue.createBlock(u,{key:0,clearable:"",style:{width:"90px"},modelValue:e.label,"onUpdate:modelValue":t=>e.label=t},null,8,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0)])),_:2},1032,["label","value"]),t[258]||(t[258]=vue.createElementVNode("i",{class:"drag-item",style:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_bars"})],-1)),vue.createElementVNode("i",{onClick:e=>l.handleOptionsRemove(n),style:{"font-size":"16px",margin:"0 5px",cursor:"pointer"}},t[257]||(t[257]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_13$1)]))])),_:1},16,["list"])])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),"cascader"!=o.data.type&&"treeselect"!=o.data.type?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14$1,[vue.createVNode(k,{link:"",type:"primary",onClick:l.handleAddOption},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.addOption")),1)])),_:1},8,["onClick"]),vue.createVNode(k,{link:"",type:"primary",onClick:l.handleClearSelect},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.clearSelect")),1)])),_:1},8,["onClick"])])):vue.createCommentVNode("",!0),"cascader"==o.data.type?(vue.openBlock(),vue.createBlock(k,{key:4,style:{width:"100%"},onClick:l.handleSetCascader},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1},8,["onClick"])):vue.createCommentVNode("",!0),"treeselect"==o.data.type?(vue.openBlock(),vue.createBlock(k,{key:5,style:{width:"100%"},onClick:l.handleSetTree},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1},8,["onClick"])):vue.createCommentVNode("",!0)],64))])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("steps")>=0?(vue.openBlock(),vue.createBlock(r,{key:1,label:e.$t("fm.config.widget.steps")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.remote,"onUpdate:modelValue":t[155]||(t[155]=e=>o.data.options.remote=e),style:{"margin-bottom":"10px"}},{default:vue.withCtx((()=>[vue.createVNode(f,{label:!1,value:!1},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.staticData")),1)])),_:1}),vue.createVNode(f,{label:!0,value:!0},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.remoteData")),1)])),_:1})])),_:1},8,["modelValue"]),o.data.options.remote?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(h,{modelValue:o.data.options.remoteType,"onUpdate:modelValue":t[156]||(t[156]=e=>o.data.options.remoteType=e),style:{"margin-bottom":"8px"}},{default:vue.withCtx((()=>[vue.createVNode(y,{label:"datasource",value:"datasource"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.name")),1)])),_:1}),vue.createVNode(y,{label:"fx",value:"fx"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.formula.input.fx")),1)])),_:1})])),_:1},8,["modelValue"]),"fx"==o.data.options.remoteType?(vue.openBlock(),vue.createBlock(b,{key:0,size:"default",only:"",modelValue:o.data.options.remoteFx,"onUpdate:modelValue":t[157]||(t[157]=e=>o.data.options.remoteFx=e),style:{"margin-bottom":"5px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0),"datasource"==o.data.options.remoteType?(vue.openBlock(),vue.createElementBlock("div",_hoisted_15$1,[vue.createVNode(d,{onChange:l.handleDataSourceChange,modelValue:o.data.options.remoteDataSource,"onUpdate:modelValue":t[158]||(t[158]=e=>o.data.options.remoteDataSource=e)},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.datasources,(e=>(vue.openBlock(),vue.createBlock(s,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["onChange","modelValue"]),vue.createVNode(w,{content:e.$t("fm.config.widget.settings")},{default:vue.withCtx((()=>[vue.createVNode(k,{link:"",type:"primary",style:{margin:"5px"},onClick:t[159]||(t[159]=e=>l.handleDatasourceManage(o.data.options.remoteDataSource))},{default:vue.withCtx((()=>t[259]||(t[259]=[vue.createElementVNode("i",{class:"fm-iconfont icon-pm"},null,-1)]))),_:1})])),_:1},8,["content"])])):vue.createCommentVNode("",!0),"datasource"==o.data.options.remoteType&&o.data.options.remoteArgs?(vue.openBlock(),vue.createBlock(C,{key:o.data.options.remoteDataSource,operable:!1,modelValue:o.data.options.remoteArgs,"onUpdate:modelValue":t[160]||(t[160]=e=>o.data.options.remoteArgs=e)},null,8,["modelValue"])):vue.createCommentVNode("",!0),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.props.title,"onUpdate:modelValue":t[161]||(t[161]=e=>o.data.options.props.title=e)},{prepend:vue.withCtx((()=>t[260]||(t[260]=[vue.createTextVNode("Title")]))),_:1},8,["modelValue"]),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.props.description,"onUpdate:modelValue":t[162]||(t[162]=e=>o.data.options.props.description=e)},{prepend:vue.withCtx((()=>t[261]||(t[261]=[vue.createTextVNode("Description")]))),_:1},8,["modelValue"])],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(h,{modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[163]||(t[163]=e=>o.data.options.defaultValue=e)},{default:vue.withCtx((()=>[vue.createVNode(x,vue.mergeProps({tag:"ul",list:o.data.options.steps},{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},{handle:".drag-item","item-key":"index"}),{item:vue.withCtx((({element:e,index:o})=>[(vue.openBlock(),vue.createElementBlock("li",{key:o,class:"drag-item-bk",style:{padding:"5px","margin-bottom":"5px",display:"flex","align-items":"center"}},[vue.createVNode(y,{label:o,value:o,style:{"margin-right":"5px",height:"100%"}},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_16,[vue.createVNode(u,{placeholder:"Title",clearable:"",modelValue:e.title,"onUpdate:modelValue":t=>e.title=t},null,8,["modelValue","onUpdate:modelValue"]),t[262]||(t[262]=vue.createTextVNode()),t[263]||(t[263]=vue.createElementVNode("br",null,null,-1)),vue.createVNode(u,{placeholder:"Description",clearable:"",modelValue:e.description,"onUpdate:modelValue":t=>e.description=t},null,8,["modelValue","onUpdate:modelValue"])])])),_:2},1032,["label","value"]),t[265]||(t[265]=vue.createElementVNode("i",{class:"drag-item",style:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_bars"})],-1)),vue.createElementVNode("i",{onClick:e=>l.handleOptionsRemove(o),style:{"font-size":"16px",margin:"0 5px",cursor:"pointer"}},t[264]||(t[264]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_17)]))])),_:1},16,["list"])])),_:1},8,["modelValue"]),vue.createElementVNode("div",_hoisted_18,[vue.createVNode(k,{link:"",type:"primary",onClick:l.handleAddStep},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.addOption")),1)])),_:1},8,["onClick"])])],64))])),_:1},8,["label"])):vue.createCommentVNode("",!0),"transfer"==o.data.type?(vue.openBlock(),vue.createBlock(r,{key:2,label:e.$t("fm.config.widget.option")},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:o.data.options.remote,"onUpdate:modelValue":t[164]||(t[164]=e=>o.data.options.remote=e),style:{"margin-bottom":"10px"}},{default:vue.withCtx((()=>[vue.createVNode(f,{label:!1,value:!1},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.staticData")),1)])),_:1}),vue.createVNode(f,{label:!0,value:!0},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.remoteData")),1)])),_:1})])),_:1},8,["modelValue"]),o.data.options.remote?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(h,{modelValue:o.data.options.remoteType,"onUpdate:modelValue":t[165]||(t[165]=e=>o.data.options.remoteType=e),style:{"margin-bottom":"8px"}},{default:vue.withCtx((()=>[vue.createVNode(y,{label:"datasource",value:"datasource"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.name")),1)])),_:1}),vue.createVNode(y,{label:"fx",value:"fx"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.formula.input.fx")),1)])),_:1})])),_:1},8,["modelValue"]),"fx"==o.data.options.remoteType?(vue.openBlock(),vue.createBlock(b,{key:0,size:"default",only:"",modelValue:o.data.options.remoteFx,"onUpdate:modelValue":t[166]||(t[166]=e=>o.data.options.remoteFx=e),style:{"margin-bottom":"5px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0),"datasource"==o.data.options.remoteType?(vue.openBlock(),vue.createElementBlock("div",_hoisted_19,[vue.createVNode(d,{onChange:l.handleDataSourceChange,modelValue:o.data.options.remoteDataSource,"onUpdate:modelValue":t[167]||(t[167]=e=>o.data.options.remoteDataSource=e)},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.datasources,(e=>(vue.openBlock(),vue.createBlock(s,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["onChange","modelValue"]),vue.createVNode(w,{content:e.$t("fm.config.widget.settings")},{default:vue.withCtx((()=>[vue.createVNode(k,{link:"",type:"primary",style:{margin:"5px"},onClick:t[168]||(t[168]=e=>l.handleDatasourceManage(o.data.options.remoteDataSource))},{default:vue.withCtx((()=>t[266]||(t[266]=[vue.createElementVNode("i",{class:"fm-iconfont icon-pm"},null,-1)]))),_:1})])),_:1},8,["content"])])):vue.createCommentVNode("",!0),"datasource"==o.data.options.remoteType&&o.data.options.remoteArgs?(vue.openBlock(),vue.createBlock(C,{key:o.data.options.remoteDataSource,operable:!1,modelValue:o.data.options.remoteArgs,"onUpdate:modelValue":t[169]||(t[169]=e=>o.data.options.remoteArgs=e)},null,8,["modelValue"])):vue.createCommentVNode("",!0),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.props.key,"onUpdate:modelValue":t[170]||(t[170]=e=>o.data.options.props.key=e)},{prepend:vue.withCtx((()=>t[267]||(t[267]=[vue.createTextVNode("Key")]))),_:1},8,["modelValue"]),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.props.label,"onUpdate:modelValue":t[171]||(t[171]=e=>o.data.options.props.label=e)},{prepend:vue.withCtx((()=>t[268]||(t[268]=[vue.createTextVNode("Label")]))),_:1},8,["modelValue"]),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.props.disabled,"onUpdate:modelValue":t[172]||(t[172]=e=>o.data.options.props.disabled=e)},{prepend:vue.withCtx((()=>t[269]||(t[269]=[vue.createTextVNode("Disabled")]))),_:1},8,["modelValue"])],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createVNode(T,{modelValue:o.data.options.defaultValue,"onUpdate:modelValue":t[173]||(t[173]=e=>o.data.options.defaultValue=e)},{default:vue.withCtx((()=>[vue.createVNode(x,vue.mergeProps({tag:"ul",list:o.data.options.data},{group:{name:"options"},ghostClass:"ghost",handle:".drag-item"},{handle:".drag-item","item-key":"index"}),{item:vue.withCtx((({element:e,index:o})=>[(vue.openBlock(),vue.createElementBlock("li",{key:e.key,class:"drag-item-bk",style:{padding:"5px","margin-bottom":"5px",display:"flex","align-items":"center"}},[vue.createVNode(c,{label:e.label,value:e.key,style:{"margin-right":"5px",height:"100%"}},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_20,[vue.createVNode(u,{placeholder:"Key",clearable:"",modelValue:e.key,"onUpdate:modelValue":t=>e.key=t,style:{"margin-bottom":"3px"}},null,8,["modelValue","onUpdate:modelValue"]),t[270]||(t[270]=vue.createTextVNode()),t[271]||(t[271]=vue.createElementVNode("br",null,null,-1)),vue.createVNode(u,{placeholder:"Label",clearable:"",modelValue:e.label,"onUpdate:modelValue":t=>e.label=t},null,8,["modelValue","onUpdate:modelValue"])])])),_:2},1032,["label","value"]),t[273]||(t[273]=vue.createElementVNode("i",{class:"drag-item",style:{"font-size":"16px",margin:"0 5px",cursor:"move"}},[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_bars"})],-1)),vue.createElementVNode("i",{onClick:e=>l.handleOptionsRemove(o),style:{"font-size":"16px",margin:"0 5px",cursor:"pointer"}},t[272]||(t[272]=[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"},null,-1)]),8,_hoisted_21)]))])),_:1},16,["list"])])),_:1},8,["modelValue"]),vue.createElementVNode("div",_hoisted_22,[vue.createVNode(k,{link:"",type:"primary",onClick:l.handleAddData},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.addOption")),1)])),_:1},8,["onClick"]),vue.createVNode(k,{link:"",type:"primary",onClick:l.handleClearSelect},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.clearSelect")),1)])),_:1},8,["onClick"])])],64))])),_:1},8,["label"])):vue.createCommentVNode("",!0)])),_:1},8,["title"])):vue.createCommentVNode("",!0),"list"==o.data.type?(vue.openBlock(),vue.createBlock(D,{key:1,title:e.$t("fm.config.widget.columnSetting"),name:"columns"},{default:vue.withCtx((()=>[vue.createVNode(r,null,{default:vue.withCtx((()=>[vue.createVNode(F,{modelValue:o.data.options.columns,"onUpdate:modelValue":t[174]||(t[174]=e=>o.data.options.columns=e)},null,8,["modelValue"])])),_:1})])),_:1},8,["title"])):vue.createCommentVNode("",!0),"list"==o.data.type?(vue.openBlock(),vue.createBlock(D,{key:2,title:e.$t("fm.config.widget.operationSetting"),name:"operation"},{default:vue.withCtx((()=>[vue.createVNode(r,{label:e.$t("fm.config.widget.showOperation")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.showOperation,"onUpdate:modelValue":t[175]||(t[175]=e=>o.data.options.showOperation=e)},null,8,["modelValue"])])),_:1},8,["label"]),o.data.options.showOperation?(vue.openBlock(),vue.createBlock(O,{key:0,modelValue:o.data.options.operations,"onUpdate:modelValue":t[176]||(t[176]=e=>o.data.options.operations=e),onOnAddButtonevent:l.handleButtonEventAdd,onOnEditButtonevent:l.handleButtonEventEdit},null,8,["modelValue","onOnAddButtonevent","onOnEditButtonevent"])):vue.createCommentVNode("",!0)])),_:1},8,["title"])):vue.createCommentVNode("",!0),"list"==o.data.type?(vue.openBlock(),vue.createBlock(D,{key:3,title:e.$t("fm.config.widget.pageSetting"),name:"paging"},{default:vue.withCtx((()=>[vue.createVNode(r,{label:e.$t("fm.config.widget.paging")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.pagination.paging,"onUpdate:modelValue":t[177]||(t[177]=e=>o.data.options.pagination.paging=e)},null,8,["modelValue"])])),_:1},8,["label"]),o.data.options.pagination.paging?(vue.openBlock(),vue.createBlock(r,{key:0,label:e.$t("fm.config.widget.pageSizes")},{default:vue.withCtx((()=>[vue.createVNode(u,{modelValue:o.data.options.pagination.pageSizes,"onUpdate:modelValue":t[178]||(t[178]=e=>o.data.options.pagination.pageSizes=e),placeholder:e.$t("fm.config.widget.pageSizesPlaceholder")},null,8,["modelValue","placeholder"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.pagination.paging?(vue.openBlock(),vue.createBlock(r,{key:1,label:e.$t("fm.config.widget.pagerCount")},{default:vue.withCtx((()=>[vue.createVNode(m,{step:2,min:5,max:21,modelValue:o.data.options.pagination.pagerCount,"onUpdate:modelValue":t[179]||(t[179]=e=>o.data.options.pagination.pagerCount=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.pagination.paging?(vue.openBlock(),vue.createBlock(r,{key:2,label:e.$t("fm.config.widget.background")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.pagination.background,"onUpdate:modelValue":t[180]||(t[180]=e=>o.data.options.pagination.background=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.pagination.paging?(vue.openBlock(),vue.createBlock(r,{key:3,label:e.$t("fm.config.widget.smallPage")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.data.options.pagination.small,"onUpdate:modelValue":t[181]||(t[181]=e=>o.data.options.pagination.small=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.pagination.paging?(vue.openBlock(),vue.createBlock(r,{key:4,label:e.$t("fm.config.widget.dataStruct")},{default:vue.withCtx((()=>[vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.pagination.props.list,"onUpdate:modelValue":t[182]||(t[182]=e=>o.data.options.pagination.props.list=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.structList")),1)])),_:1},8,["modelValue"]),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.pagination.props.total,"onUpdate:modelValue":t[183]||(t[183]=e=>o.data.options.pagination.props.total=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.structTotal")),1)])),_:1},8,["modelValue"]),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.pagination.props.size,"onUpdate:modelValue":t[184]||(t[184]=e=>o.data.options.pagination.props.size=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.structSize")),1)])),_:1},8,["modelValue"]),vue.createVNode(u,{class:"fm-options-item",clearable:"",modelValue:o.data.options.pagination.props.current,"onUpdate:modelValue":t[185]||(t[185]=e=>o.data.options.pagination.props.current=e)},{prepend:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.structCurrent")),1)])),_:1},8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0)])),_:1},8,["title"])):vue.createCommentVNode("",!0),vue.createVNode(D,{title:e.$t("fm.config.widget.expandSetting"),name:"expend"},{default:vue.withCtx((()=>[["grid","col","report","th","td","tabs","collapse","inline","card","divider","alert"].includes(o.data.type)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(r,{key:0,label:e.$t("fm.config.widget.dynamicValue")},{default:vue.withCtx((()=>[vue.createElementVNode("div",null,[vue.createVNode(p,{modelValue:o.data.options.isDynamicValue,"onUpdate:modelValue":t[186]||(t[186]=e=>o.data.options.isDynamicValue=e)},null,8,["modelValue"])]),o.data.options.isDynamicValue?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(h,{modelValue:o.data.options.dynamicValueType,"onUpdate:modelValue":t[187]||(t[187]=e=>o.data.options.dynamicValueType=e),style:{"margin-bottom":"10px"}},{default:vue.withCtx((()=>[vue.createVNode(y,{label:"datasource",value:"datasource"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.name")),1)])),_:1}),vue.createVNode(y,{label:"fx",value:"fx"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.formula.input.fx")),1)])),_:1})])),_:1},8,["modelValue"]),"fx"==o.data.options.dynamicValueType?(vue.openBlock(),vue.createBlock(b,{key:0,size:"default",only:"",modelValue:o.data.options.dynamicValueFx,"onUpdate:modelValue":t[188]||(t[188]=e=>o.data.options.dynamicValueFx=e),style:{"margin-bottom":"5px"}},null,8,["modelValue"])):vue.createCommentVNode("",!0),"datasource"==o.data.options.dynamicValueType?(vue.openBlock(),vue.createElementBlock("div",_hoisted_23,[vue.createVNode(d,{onChange:l.handleDynamicDataSourceChange,modelValue:o.data.options.dynamicValueDataSource,"onUpdate:modelValue":t[189]||(t[189]=e=>o.data.options.dynamicValueDataSource=e)},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.datasources,(e=>(vue.openBlock(),vue.createBlock(s,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["onChange","modelValue"]),vue.createVNode(w,{content:e.$t("fm.config.widget.settings")},{default:vue.withCtx((()=>[vue.createVNode(k,{link:"",type:"primary",style:{margin:"5px"},onClick:t[190]||(t[190]=e=>l.handleDatasourceManage(o.data.options.dynamicValueDataSource))},{default:vue.withCtx((()=>t[274]||(t[274]=[vue.createElementVNode("i",{class:"fm-iconfont icon-pm"},null,-1)]))),_:1})])),_:1},8,["content"])])):vue.createCommentVNode("",!0),"datasource"==o.data.options.dynamicValueType&&o.data.options.dynamicValueArgs?(vue.openBlock(),vue.createBlock(C,{key:o.data.options.dynamicValueDataSource,operable:!1,modelValue:o.data.options.dynamicValueArgs,"onUpdate:modelValue":t[191]||(t[191]=e=>o.data.options.dynamicValueArgs=e)},null,8,["modelValue"])):vue.createCommentVNode("",!0),"datasource"==o.data.options.dynamicValueType?(vue.openBlock(),vue.createBlock(u,{key:3,class:"fm-options-item",placeholder:e.$t("fm.config.widget.dynamicStructPlaceholder"),clearable:"",modelValue:o.data.options.dynamicValueStruct,"onUpdate:modelValue":t[192]||(t[192]=e=>o.data.options.dynamicValueStruct=e)},{prepend:vue.withCtx((()=>t[275]||(t[275]=[vue.createTextVNode("data.")]))),_:1},8,["placeholder","modelValue"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)])),_:1},8,["label"])),"td"!=o.data.type&&"th"!=o.data.type&&"col"!=o.data.type&&"dialog"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:1,label:e.$t("fm.config.widget.state")},{default:vue.withCtx((()=>[Object.keys(o.data.options).indexOf("hidden")>=0?(vue.openBlock(),vue.createBlock(I,{key:0,modelValue:o.data.options.hidden,"onUpdate:modelValue":t[193]||(t[193]=e=>o.data.options.hidden=e),label:e.$t("fm.config.widget.hidden")},null,8,["modelValue","label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("disabled")>=0?(vue.openBlock(),vue.createBlock(I,{key:1,modelValue:o.data.options.disabled,"onUpdate:modelValue":t[194]||(t[194]=e=>o.data.options.disabled=e),label:e.$t("fm.config.widget.disabled")},null,8,["modelValue","label"])):vue.createCommentVNode("",!0)])),_:1},8,["label"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).includes("customClass")?(vue.openBlock(),vue.createBlock(r,{key:2,label:e.$t("fm.config.widget.customClass")},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_24,[vue.createVNode(d,{modelValue:i.customClassArray,"onUpdate:modelValue":t[195]||(t[195]=e=>i.customClassArray=e),multiple:"",filterable:"","allow-create":"","default-first-option":""},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.sheets,(e=>(vue.openBlock(),vue.createBlock(s,{key:e,label:e,value:e},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),vue.createVNode(w,{content:e.$t("fm.config.widget.settings")},{default:vue.withCtx((()=>[vue.createVNode(k,{link:"",type:"primary",style:{margin:"5px"},onClick:l.handleSetClass},{default:vue.withCtx((()=>t[276]||(t[276]=[vue.createElementVNode("i",{class:"fm-iconfont icon-pm"},null,-1)]))),_:1},8,["onClick"])])),_:1},8,["content"])])])),_:1},8,["label"])):vue.createCommentVNode("",!0),"td"!=o.data.type&&"th"!=o.data.type&&"col"!=o.data.type&&"button"!=o.data.type&&"link"!=o.data.type&&"alert"!=o.data.type&&"divider"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{label:e.$t("fm.config.widget.attribute"),key:"attribute"},{default:vue.withCtx((()=>[Object.keys(o.data.options).indexOf("dataBind")>=0?(vue.openBlock(),vue.createBlock(c,{key:0,modelValue:o.data.options.dataBind,"onUpdate:modelValue":t[196]||(t[196]=e=>o.data.options.dataBind=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.dataBind")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("readonly")>=0?(vue.openBlock(),vue.createBlock(c,{key:1,modelValue:o.data.options.readonly,"onUpdate:modelValue":t[197]||(t[197]=e=>o.data.options.readonly=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.readonly")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("editable")>=0?(vue.openBlock(),vue.createBlock(c,{key:2,modelValue:o.data.options.editable,"onUpdate:modelValue":t[198]||(t[198]=e=>o.data.options.editable=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.editable")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("clearable")>=0?(vue.openBlock(),vue.createBlock(c,{key:3,modelValue:o.data.options.clearable,"onUpdate:modelValue":t[199]||(t[199]=e=>o.data.options.clearable=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.clearable")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("arrowControl")>=0?(vue.openBlock(),vue.createBlock(c,{key:4,modelValue:o.data.options.arrowControl,"onUpdate:modelValue":t[200]||(t[200]=e=>o.data.options.arrowControl=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.arrowControl")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("isDelete")>=0?(vue.openBlock(),vue.createBlock(c,{key:5,modelValue:o.data.options.isDelete,"onUpdate:modelValue":t[201]||(t[201]=e=>o.data.options.isDelete=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.isDelete")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("isEdit")>=0?(vue.openBlock(),vue.createBlock(c,{key:6,modelValue:o.data.options.isEdit,"onUpdate:modelValue":t[202]||(t[202]=e=>o.data.options.isEdit=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.isEdit")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("isAdd")>=0?(vue.openBlock(),vue.createBlock(c,{key:7,modelValue:o.data.options.isAdd,"onUpdate:modelValue":t[203]||(t[203]=e=>o.data.options.isAdd=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.isAdd")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("showPassword")>=0?(vue.openBlock(),vue.createBlock(c,{key:8,modelValue:o.data.options.showPassword,"onUpdate:modelValue":t[204]||(t[204]=e=>o.data.options.showPassword=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.showPassword")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("showScore")>=0?(vue.openBlock(),vue.createBlock(c,{key:9,modelValue:o.data.options.showScore,"onUpdate:modelValue":t[205]||(t[205]=e=>o.data.options.showScore=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.showScore")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("showWordLimit")>=0?(vue.openBlock(),vue.createBlock(c,{key:10,modelValue:o.data.options.showWordLimit,"onUpdate:modelValue":t[206]||(t[206]=e=>o.data.options.showWordLimit=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.showWordLimit")),1)])),_:1},8,["modelValue"])):vue.createCommentVNode("",!0)])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.options.customProps?vue.renderSlot(e.$slots,"widgetconfig",{key:4,type:o.data.type,data:o.data,customProps:o.data.options.customProps}):vue.createCommentVNode("",!0),Object.keys(o.data.options).includes("extendProps")?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:5},[Object.keys(o.data.options).includes("extendProps")?(vue.openBlock(),vue.createBlock(r,{key:0,label:e.$t("fm.config.widget.extendPropsConfig")},{default:vue.withCtx((()=>[vue.createVNode(M,{modelValue:o.data.options.extendProps,"onUpdate:modelValue":t[207]||(t[207]=e=>o.data.options.extendProps=e)},null,8,["modelValue"])])),_:1},8,["label"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0),"grid"!=o.data.type&&"tabs"!=o.data.type&&"collapse"!=o.data.type&&"report"!=o.data.type&&"inline"!=o.data.type&&"divider"!=o.data.type&&"td"!=o.data.type&&"th"!=o.data.type&&"col"!=o.data.type&&"button"!=o.data.type&&"link"!=o.data.type&&"steps"!=o.data.type&&"alert"!=o.data.type&&"pagination"!=o.data.type&&"dialog"!=o.data.type&&"list"!=o.data.type&&"card"!=o.data.type?(vue.openBlock(),vue.createBlock(r,{key:6,label:e.$t("fm.config.widget.validate")},{default:vue.withCtx((()=>[Object.keys(o.data.options).indexOf("required")>=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_25,[vue.createVNode(c,{modelValue:o.data.options.required,"onUpdate:modelValue":t[208]||(t[208]=e=>o.data.options.required=e)},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.required")),1)])),_:1},8,["modelValue"]),o.data.options.required?(vue.openBlock(),vue.createBlock(u,{key:0,class:"message-input",clearable:"",modelValue:o.data.options.requiredMessage,"onUpdate:modelValue":t[209]||(t[209]=e=>o.data.options.requiredMessage=e),placeholder:e.$t("fm.message.errorTip")},null,8,["modelValue","placeholder"])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("dataType")>=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_26,[vue.createVNode(c,{modelValue:o.data.options.dataTypeCheck,"onUpdate:modelValue":t[210]||(t[210]=e=>o.data.options.dataTypeCheck=e),style:{"margin-right":"10px"}},null,8,["modelValue"]),Object.keys(o.data.options).indexOf("dataType")>=0?(vue.openBlock(),vue.createBlock(d,{key:0,disabled:!o.data.options.dataTypeCheck,modelValue:o.data.options.dataType,"onUpdate:modelValue":t[211]||(t[211]=e=>o.data.options.dataType=e),style:{width:"239px"}},{default:vue.withCtx((()=>[vue.createVNode(s,{value:"string",label:e.$t("fm.config.widget.string")},null,8,["label"]),vue.createVNode(s,{value:"url",label:e.$t("fm.config.widget.url")},null,8,["label"]),vue.createVNode(s,{value:"email",label:e.$t("fm.config.widget.email")},null,8,["label"]),vue.createVNode(s,{value:"hex",label:e.$t("fm.config.widget.hex")},null,8,["label"])])),_:1},8,["disabled","modelValue"])):vue.createCommentVNode("",!0),o.data.options.dataTypeCheck?(vue.openBlock(),vue.createBlock(u,{key:1,class:"message-input",clearable:"",modelValue:o.data.options.dataTypeMessage,"onUpdate:modelValue":t[212]||(t[212]=e=>o.data.options.dataTypeMessage=e),placeholder:e.$t("fm.message.errorTip")},null,8,["modelValue","placeholder"])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("pattern")>=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_27,[vue.createVNode(c,{modelValue:o.data.options.patternCheck,"onUpdate:modelValue":t[213]||(t[213]=e=>o.data.options.patternCheck=e),style:{"margin-right":"10px"}},null,8,["modelValue"]),vue.createVNode(u,{clearable:"",disabled:!o.data.options.patternCheck,modelValue:o.data.options.pattern,"onUpdate:modelValue":t[214]||(t[214]=e=>o.data.options.pattern=e),modelModifiers:{lazy:!0},style:{width:"239px"},placeholder:e.$t("fm.config.widget.patternPlaceholder")},null,8,["disabled","modelValue","placeholder"]),o.data.options.patternCheck?(vue.openBlock(),vue.createBlock(u,{key:0,class:"message-input",clearable:"",modelValue:o.data.options.patternMessage,"onUpdate:modelValue":t[215]||(t[215]=e=>o.data.options.patternMessage=e),placeholder:e.$t("fm.message.errorTip")},null,8,["modelValue","placeholder"])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),Object.keys(o.data.options).indexOf("validator")>=0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_28,[vue.createVNode(c,{modelValue:o.data.options.validatorCheck,"onUpdate:modelValue":t[216]||(t[216]=e=>o.data.options.validatorCheck=e),style:{"margin-right":"10px"}},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.customValidation")),1)])),_:1},8,["modelValue"]),o.data.options.validatorCheck?(vue.openBlock(),vue.createElementBlock("div",_hoisted_29,[vue.createVNode(N,{placement:"right",width:500,trigger:"click","hide-after":0},{reference:vue.withCtx((()=>[vue.createVNode(k,{class:"message-input"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1})])),default:vue.withCtx((()=>[vue.createElementVNode("div",null,[t[277]||(t[277]=vue.createElementVNode("div",{style:{"font-size":"14px","font-weight":"500"},class:"code-line"},"(rule, value, callback) => {",-1)),(vue.openBlock(),vue.createBlock($,{mode:"javascript",key:o.data.key,modelValue:o.data.options.validator,"onUpdate:modelValue":t[217]||(t[217]=e=>o.data.options.validator=e),height:"300px"},null,8,["modelValue"])),t[278]||(t[278]=vue.createElementVNode("div",{style:{"font-size":"14px","font-weight":"500"},class:"code-line"},"}",-1))])])),_:1})])):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0)])),_:1},8,["label"])):vue.createCommentVNode("",!0),o.data.events?(vue.openBlock(),vue.createBlock(r,{key:7,label:e.$t("fm.eventscript.config.title")},{default:vue.withCtx((()=>[vue.createVNode(P,{events:o.data.events,eventscripts:o.eventscripts,onOnAdd:l.handleEventAdd,onOnEdit:l.handleEventEdit,onOnRemove:l.handleEventRemove},null,8,["events","eventscripts","onOnAdd","onOnEdit","onOnRemove"])])),_:1},8,["label"])):vue.createCommentVNode("",!0)])),_:3},8,["title"])])),_:3})])),_:3},8,["model"])])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_30,vue.toDisplayString(e.$t("fm.description.configEmpty")),1)),vue.createVNode(R,{ref:"codeDialog",mode:"html",title:e.$t("fm.config.widget.customTemplates"),help:"https://form.making.link/docs/manual/component.html",onOnConfirm:l.handleTemplateConfirm},null,8,["title","onOnConfirm"]),vue.createVNode(R,{ref:"cascaderDialog",width:"800px","code-height":"400px",mode:"javascript",title:e.$t("fm.config.widget.option"),onOnConfirm:l.handleCascaderConfirm},null,8,["title","onOnConfirm"]),vue.createVNode(R,{ref:"treeDialog",width:"800px","code-height":"400px",mode:"javascript",title:e.$t("fm.config.widget.option"),onOnConfirm:l.handleTreeConfirm},null,8,["title","onOnConfirm"]),vue.createVNode(R,{ref:"extendPropsDialog",width:"800px","code-height":"400px",mode:"javascript",title:e.$t("fm.config.widget.extendPropsConfig"),onOnConfirm:l.handlePropsConfirm},null,8,["title","onOnConfirm"]),vue.createVNode(R,{ref:"defaultValueDialog",width:"800px","code-height":"400px",mode:"javascript",title:e.$t("fm.config.widget.defaultValue"),onOnConfirm:l.handleDefaultValueConfirm},null,8,["title","onOnConfirm"]),vue.createVNode(U,{visible:i.editorVisible,onOnClose:t[219]||(t[219]=e=>i.editorVisible=!1),width:`calc(${(null==(z=null==(n=o.data)?void 0:n.options)?void 0:z.width)||"900px"} + 40px)`,title:e.$t("fm.config.widget.defaultValue"),onOnSubmit:l.handleEditorValueConfirm},{default:vue.withCtx((()=>[vue.createVNode(W,{modelValue:i.editorValue,"onUpdate:modelValue":t[218]||(t[218]=e=>i.editorValue=e),"custom-style":{width:o.data.options.width},toolbar:o.data.options.customToolbar,class:"fm-editor"},null,8,["modelValue","custom-style","toolbar"])])),_:1},8,["visible","width","title","onOnSubmit"])])]})),_:3})}var WidgetConfig=_export_sfc(_sfc_main$1p,[["render",_sfc_render$1j]]),axios$2={exports:{}},bind$2=function(e,t){return function(){for(var o=new Array(arguments.length),n=0;n=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([o]):i[t]?i[t]+", "+o:o}})),i):i},utils$8=utils$e,isURLSameOrigin$1=utils$8.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");function n(e){var n=e;return t&&(o.setAttribute("href",n),n=o.href),o.setAttribute("href",n),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}return e=n(window.location.href),function(t){var o=utils$8.isString(t)?n(t):t;return o.protocol===e.protocol&&o.host===e.host}}():function(){return!0};function Cancel$3(e){this.message=e}Cancel$3.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel$3.prototype.__CANCEL__=!0;var Cancel_1=Cancel$3,utils$7=utils$e,settle=settle$1,cookies=cookies$1,buildURL$1=buildURL$2,buildFullPath=buildFullPath$1,parseHeaders=parseHeaders$1,isURLSameOrigin=isURLSameOrigin$1,createError=createError$2,transitionalDefaults$1=transitional,Cancel$2=Cancel_1,xhr=function(e){return new Promise((function(t,o){var n,i=e.data,l=e.headers,a=e.responseType;function r(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}utils$7.isFormData(i)&&delete l["Content-Type"];var s=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";l.Authorization="Basic "+btoa(d+":"+u)}var c=buildFullPath(e.baseURL,e.url);function m(){if(s){var n="getAllResponseHeaders"in s?parseHeaders(s.getAllResponseHeaders()):null,i={data:a&&"text"!==a&&"json"!==a?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:n,config:e,request:s};settle((function(e){t(e),r()}),(function(e){o(e),r()}),i),s=null}}if(s.open(e.method.toUpperCase(),buildURL$1(c,e.params,e.paramsSerializer),!0),s.timeout=e.timeout,"onloadend"in s?s.onloadend=m:s.onreadystatechange=function(){s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))&&setTimeout(m)},s.onabort=function(){s&&(o(createError("Request aborted",e,"ECONNABORTED",s)),s=null)},s.onerror=function(){o(createError("Network Error",e,null,s)),s=null},s.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||transitionalDefaults$1;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),o(createError(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",s)),s=null},utils$7.isStandardBrowserEnv()){var p=(e.withCredentials||isURLSameOrigin(c))&&e.xsrfCookieName?cookies.read(e.xsrfCookieName):void 0;p&&(l[e.xsrfHeaderName]=p)}"setRequestHeader"in s&&utils$7.forEach(l,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete l[t]:s.setRequestHeader(t,e)})),utils$7.isUndefined(e.withCredentials)||(s.withCredentials=!!e.withCredentials),a&&"json"!==a&&(s.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&s.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){s&&(o(!e||e&&e.type?new Cancel$2("canceled"):e),s.abort(),s=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),i||(i=null),s.send(i)}))},utils$6=utils$e,normalizeHeaderName=normalizeHeaderName$1,enhanceError=enhanceError$2,transitionalDefaults=transitional,DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!utils$6.isUndefined(e)&&utils$6.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function getDefaultAdapter(){var e;return("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=xhr),e}function stringifySafely(e,t,o){if(utils$6.isString(e))try{return(t||JSON.parse)(e),utils$6.trim(e)}catch(n){if("SyntaxError"!==n.name)throw n}return(o||JSON.stringify)(e)}var defaults$3={transitional:transitionalDefaults,adapter:getDefaultAdapter(),transformRequest:[function(e,t){return normalizeHeaderName(t,"Accept"),normalizeHeaderName(t,"Content-Type"),utils$6.isFormData(e)||utils$6.isArrayBuffer(e)||utils$6.isBuffer(e)||utils$6.isStream(e)||utils$6.isFile(e)||utils$6.isBlob(e)?e:utils$6.isArrayBufferView(e)?e.buffer:utils$6.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):utils$6.isObject(e)||t&&"application/json"===t["Content-Type"]?(setContentTypeIfUnset(t,"application/json"),stringifySafely(e)):e}],transformResponse:[function(e){var t=this.transitional||defaults$3.transitional,o=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!o&&"json"===this.responseType;if(i||n&&utils$6.isString(e)&&e.length)try{return JSON.parse(e)}catch(l){if(i){if("SyntaxError"===l.name)throw enhanceError(l,this,"E_JSON_PARSE");throw l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils$6.forEach(["delete","get","head"],(function(e){defaults$3.headers[e]={}})),utils$6.forEach(["post","put","patch"],(function(e){defaults$3.headers[e]=utils$6.merge(DEFAULT_CONTENT_TYPE)}));var defaults_1=defaults$3,utils$5=utils$e,defaults$2=defaults_1,transformData$1=function(e,t,o){var n=this||defaults$2;return utils$5.forEach(o,(function(o){e=o.call(n,e,t)})),e},isCancel$1=function(e){return!(!e||!e.__CANCEL__)},utils$4=utils$e,transformData=transformData$1,isCancel=isCancel$1,defaults$1=defaults_1,Cancel$1=Cancel_1;function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Cancel$1("canceled")}var dispatchRequest$1=function(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=transformData.call(e,e.data,e.headers,e.transformRequest),e.headers=utils$4.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),utils$4.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||defaults$1.adapter)(e).then((function(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},utils$3=utils$e,mergeConfig$2=function(e,t){t=t||{};var o={};function n(e,t){return utils$3.isPlainObject(e)&&utils$3.isPlainObject(t)?utils$3.merge(e,t):utils$3.isPlainObject(t)?utils$3.merge({},t):utils$3.isArray(t)?t.slice():t}function i(o){return utils$3.isUndefined(t[o])?utils$3.isUndefined(e[o])?void 0:n(void 0,e[o]):n(e[o],t[o])}function l(e){if(!utils$3.isUndefined(t[e]))return n(void 0,t[e])}function a(o){return utils$3.isUndefined(t[o])?utils$3.isUndefined(e[o])?void 0:n(void 0,e[o]):n(void 0,t[o])}function r(o){return o in t?n(e[o],t[o]):o in e?n(void 0,e[o]):void 0}var s={url:l,method:l,data:l,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:r};return utils$3.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=s[e]||i,n=t(e);utils$3.isUndefined(n)&&t!==r||(o[e]=n)})),o},data$1={version:"0.26.1"},VERSION=data$1.version,validators$1={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){validators$1[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}}));var deprecatedWarnings={};function assertOptions(e,t,o){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var l=n[i],a=t[l];if(a){var r=e[l],s=void 0===r||a(r,l,e);if(!0!==s)throw new TypeError("option "+l+" must be "+s)}else if(!0!==o)throw Error("Unknown option "+l)}}validators$1.transitional=function(e,t,o){return function(n,i,l){if(!1===e)throw new Error(function(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(o?". "+o:"")}(i," has been removed"+(t?" in "+t:"")));return t&&!deprecatedWarnings[i]&&(deprecatedWarnings[i]=!0),!e||e(n,i,l)}};var validator$1={assertOptions:assertOptions,validators:validators$1},utils$2=utils$e,buildURL=buildURL$2,InterceptorManager=InterceptorManager_1,dispatchRequest=dispatchRequest$1,mergeConfig$1=mergeConfig$2,validator=validator$1,validators=validator.validators;function Axios$1(e){this.defaults=e,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios$1.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=mergeConfig$1(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var o=t.transitional;void 0!==o&&validator.assertOptions(o,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var l,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!i){var r=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(r,n),r=r.concat(a),l=Promise.resolve(t);r.length;)l=l.then(r.shift(),r.shift());return l}for(var s=t;n.length;){var d=n.shift(),u=n.shift();try{s=d(s)}catch(c){u(c);break}}try{l=dispatchRequest(s)}catch(c){return Promise.reject(c)}for(;a.length;)l=l.then(a.shift(),a.shift());return l},Axios$1.prototype.getUri=function(e){return e=mergeConfig$1(this.defaults,e),buildURL(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},utils$2.forEach(["delete","get","head","options"],(function(e){Axios$1.prototype[e]=function(t,o){return this.request(mergeConfig$1(o||{},{method:e,url:t,data:(o||{}).data}))}})),utils$2.forEach(["post","put","patch"],(function(e){Axios$1.prototype[e]=function(t,o,n){return this.request(mergeConfig$1(n||{},{method:e,url:t,data:o}))}}));var Axios_1=Axios$1,Cancel=Cancel_1;function CancelToken(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var o=this;this.promise.then((function(e){if(o._listeners){var t,n=o._listeners.length;for(t=0;t[]}},emits:["update:modelValue"],data(){return{formData:{key:"",name:"",url:"",method:"GET",auto:!0,params:[],headers:[],responseFunc:"return res;",requestFunc:"return config;",errorFunc:""},formRules:{name:[{required:!0,message:" "},{validator:(e,t,o)=>{let n=this.historyList.find((e=>e.name==t));n&&n.key!=this.selectKey?o(new Error(this.$t("fm.datasource.message.repeat"))):o()}}],url:[{required:!0,message:" "}]},list:[...this.modelValue],selectIndex:-1,selectKey:"",historyList:[...this.modelValue],saved:!0,requestError:!1,collapseAppend:[],tempFormData:{key:"",name:"",url:"",method:"GET",auto:!0,params:[],headers:[],responseFunc:"return res;",requestFunc:"return config;",errorFunc:""}}},computed:{isFormChange(){return!_.isEqual(this.formData,this.tempFormData)}},methods:{_getAttributeFunction(e){let t=new RegExp("(?<=args.)\\w*(?=[\\s|,|;]|$)","g"),o=new RegExp("(?<=args\\[\\s*['|\"])\\w*(?=['|\"]\\s*\\])","g"),n=new RegExp("(?<={)[\\s+\\w*\\s+,{0|1}]+(?=}\\s+=\\s+args)","g"),i=new Set;return e.forEach((e=>{var l,a,r;null==(l=null==e?void 0:e.match(t))||l.forEach((e=>e&&i.add(e.trim()))),null==(a=null==e?void 0:e.match(o))||a.forEach((e=>e&&i.add(e.trim()))),null==(r=null==e?void 0:e.match(n))||r.forEach((e=>e&&e.split(",").forEach((e=>e&&i.add(e.trim())))))})),i},_getArgsObject(e){const t={};for(let o of e)t[o]="";return t},handleTest(){this.$refs.dataForm.validate((e=>{if(e){const e=this._getAttributeFunction([this.formData.requestFunc,this.formData.responseFunc,...this.formData.params.filter((e=>e.fx)).map((e=>e.value)),...this.formData.headers.filter((e=>e.fx)).map((e=>e.value))]);if(e.size>0){let t=this._getArgsObject(e);this.$msgbox({title:"Data source arguments",customStyle:"z-index: 3000",customClass:"fm-messagebox",class:"aaa",draggable:!0,key:(new Date).getTime(),message:vue.h("div",null,[vue.h(CodeEditor,{modelValue:t,mode:"object"==typeof data?"javascript":"xml",height:"200px",key:(new Date).getTime(),"onUpdate:modelValue":e=>{t=e}})]),callback:e=>{if("confirm"==e){let e={};e="string"==typeof t?Function('"use strict";return ('+t+")")():t,this.requestTest(e)}}})}else this.requestTest()}else ElMessage({message:this.$t("fm.datasource.message.settingError"),type:"warning"},this)}))},requestTest(e={}){let t={method:this.formData.method,url:this.formData.url,headers:(()=>{let t={};return this.formData.headers.forEach((o=>{o.key&&(t[o.key]=o.fx?executeExpression(o.value,e):o.value)})),t})()};if("POST"===this.formData.method||"PUT"===this.formData.method?t.data=(()=>{let t={};return this.formData.params.forEach((o=>{o.key&&(t[o.key]=o.fx?executeExpression(o.value,e):o.value)})),t})():t.params=(()=>{let t={};return this.formData.params.forEach((o=>{o.key&&(t[o.key]=o.fx?executeExpression(o.value,e):o.value)})),t})(),this.requestError=!1,this.formData.requestFunc){const n=new Function("config","args",this.formData.requestFunc);try{t=n(t,e)}catch(o){this.requestError=!0}}axios(t).then((t=>{try{let o=new Function("res","args",this.formData.responseFunc)(t.data,e);this.$msgbox({title:"Response",customStyle:"z-index: 3000",customClass:"fm-messagebox",class:"aaa",draggable:!0,key:(new Date).getTime(),message:vue.h("div",null,[vue.h("div",{style:this.requestError?"margin: 10px 0; ":"display: none;"},["The request test does not support ",vue.h("b",{style:"color: red;"},"this"),", has been ignored."]),vue.h(CodeEditor,{modelValue:o,mode:"object"==typeof o?"javascript":"xml",height:"300px",key:(new Date).getTime()})])})}catch(o){this.$msgbox({title:"Response",customStyle:"z-index: 3000",customClass:"fm-messagebox",class:"aaa",draggable:!0,key:(new Date).getTime(),message:vue.h("div",null,[vue.h("div",{style:this.requestError?"margin: 10px 0; ":"display: none;"},["The request test does not support ",vue.h("b",{style:"color: red;"},"this"),", has been ignored."]),vue.h(CodeEditor,{modelValue:t.data,mode:"object"==typeof t.data?"javascript":"xml",height:"300px",key:(new Date).getTime()})])})}})).catch((e=>{this.$msgbox.alert(e.message)}))},handleSave(){return new Promise(((e,t)=>{this.$refs.dataForm.validate((o=>{if(o){const t=this._getAttributeFunction([this.formData.requestFunc,this.formData.responseFunc,...this.formData.params.filter((e=>e.fx)).map((e=>e.value)),...this.formData.headers.filter((e=>e.fx)).map((e=>e.value))]);let o={...this.formData,params:(()=>{let e={};return this.formData.params.forEach((t=>{t.key&&(e[t.key]=t.fx?`{{${t.value}}}`:t.value)})),e})(),headers:(()=>{let e={};return this.formData.headers.forEach((t=>{t.key&&(e[t.key]=t.fx?`{{${t.value}}}`:t.value)})),e})(),args:[...t]};this.list[this.list.findIndex((e=>e.key===this.selectKey))]=o,this.historyList=[...this.list],this.saved=!0,this.$emit("update:modelValue",this.historyList),ElMessage({message:this.$t("fm.datasource.message.saveSuccess"),type:"success"},this),this.tempFormData=_.cloneDeep(this.formData),setTimeout((()=>{e()}),300)}else ElMessage({message:this.$t("fm.datasource.message.settingError"),type:"warning"},this),t()}))}))},handleAdd(){if(!this.saved||this.isFormChange)return void ElMessage({message:this.$t("fm.datasource.message.saveError"),type:"warning"},this);let e=Math.random().toString(36).slice(-8);this.list.push({key:e,name:"DataSource_"+e,url:"",method:"GET",auto:!1,params:{},headers:{},responseFunc:"return res;",requestFunc:"return config;",errorFunc:""}),this.selectKey=e,this.saved=!1},loadForm(){let e=this.list[this.selectIndex];this.formData={...e,params:e.params&&Object.keys(e.params).map((t=>({key:t,fx:isExpression(e.params[t]),value:isExpression(e.params[t])?extractExpression(e.params[t]):e.params[t]})))||[],headers:e.headers&&Object.keys(e.headers).map((t=>({key:t,fx:isExpression(e.headers[t]),value:isExpression(e.headers[t])?extractExpression(e.headers[t]):e.headers[t]})))||[],requestFunc:e.requestFunc||"return config;"},this.tempFormData=_.cloneDeep(this.formData);let t=[];"return config;"!=this.formData.requestFunc&&t.push("1"),"return res;"!=this.formData.responseFunc&&t.push("2"),this.formData.errorFunc&&t.push("3"),this.collapseAppend=t},handleSelect(e){e!==this.selectKey&&(!this.selectKey||this.saved&&!this.isFormChange?this.selectKey=e:ElMessage({message:this.$t("fm.datasource.message.saveError"),type:"warning"},this))},handleCancal(){this.beforeClose((()=>{this.selectKey="",this.list=[...this.historyList],this.saved=!0}))},handleClone(e){if(!this.saved)return void ElMessage({message:this.$t("fm.datasource.message.saveError"),type:"warning"},this);let t=this.list[e],o=Math.random().toString(36).slice(-8),n={...t,key:o,name:t.name+"_copy"};this.list.push(n),this.selectKey=o,this.saved=!1},handleRemove(e){let t=this.list[e];this.$msgbox.confirm(`${this.$t("fm.datasource.message.confirmRemove")} [${t.name}] ?`,"",{type:"warning"}).then((()=>{t.key===this.selectKey&&(this.selectKey="",this.saved=!0),this.list.splice(e,1),e{}))},beforeClose(e){_.isEqual(this.formData,this.tempFormData)&&this.saved?e():this.$msgbox.confirm(this.$t("fm.eventscript.message.saveConfirm"),"Confirm",{distinguishCancelAndClose:!0,confirmButtonText:this.$t("fm.eventscript.config.save"),cancelButtonText:this.$t("fm.eventscript.config.notSave"),type:"warning"}).then((()=>{this.handleSave().then((()=>{e()}))})).catch((t=>{"cancel"===t&&e()}))}},watch:{selectKey(e){e?(this.selectIndex=this.list.findIndex((t=>t.key===e)),this.loadForm()):this.selectIndex=-1}}},_hoisted_1$W={class:"data-source-menu-label"},_hoisted_2$O={class:"data-source-menu-action"},_hoisted_3$C=["onClick","title"],_hoisted_4$A=["onClick","title"],_hoisted_5$z={class:"data-source-action"},_hoisted_6$l={key:0,class:"code-desc"},_hoisted_7$h={key:1,class:"code-desc"},_hoisted_8$c={key:2,class:"code-desc"},_hoisted_9$b={key:0,class:"code-desc"};function _sfc_render$1i(e,t,o,n,i,l){const a=vue.resolveComponent("el-button"),r=vue.resolveComponent("el-header"),s=vue.resolveComponent("el-badge"),d=vue.resolveComponent("el-menu-item"),u=vue.resolveComponent("el-menu"),c=vue.resolveComponent("el-scrollbar"),m=vue.resolveComponent("el-main"),p=vue.resolveComponent("el-container"),f=vue.resolveComponent("el-aside"),h=vue.resolveComponent("el-input"),v=vue.resolveComponent("el-form-item"),g=vue.resolveComponent("el-radio-button"),y=vue.resolveComponent("el-radio-group"),b=vue.resolveComponent("array-dynamic"),k=vue.resolveComponent("el-switch"),w=vue.resolveComponent("code-editor"),C=vue.resolveComponent("el-collapse-item"),_=vue.resolveComponent("el-collapse"),x=vue.resolveComponent("el-form");return vue.openBlock(),vue.createBlock(p,{class:"data-source-container"},{default:vue.withCtx((()=>[vue.createVNode(f,{width:"300px",class:"data-source-aside"},{default:vue.withCtx((()=>[vue.createVNode(p,null,{default:vue.withCtx((()=>[vue.createVNode(r,{height:"42px"},{default:vue.withCtx((()=>[vue.createVNode(a,{link:"",type:"primary",size:"default",onClick:l.handleAdd},{default:vue.withCtx((()=>[t[10]||(t[10]=vue.createElementVNode("i",{class:"fm-iconfont icon-plus",style:{"font-size":"12px",margin:"5px"}},null,-1)),vue.createTextVNode(" "+vue.toDisplayString(e.$t("fm.datasource.config.add")),1)])),_:1},8,["onClick"])])),_:1}),vue.createVNode(m,null,{default:vue.withCtx((()=>[vue.createVNode(c,null,{default:vue.withCtx((()=>[vue.createVNode(u,{class:"data-source-aside-menu","default-active":i.selectKey},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.list,((t,o)=>(vue.openBlock(),vue.createBlock(d,{class:vue.normalizeClass({"is-disabled":l.isFormChange||!i.saved,"is-active2":i.selectKey==t.key}),index:t.key,key:t.key,onClick:e=>l.handleSelect(t.key)},{title:vue.withCtx((()=>[vue.createElementVNode("div",null,[!l.isFormChange&&i.saved||i.selectKey!=t.key?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(s,{key:0,"is-dot":"",style:{position:"absolute",top:"2px",left:"2px"}})),vue.createElementVNode("span",{class:vue.normalizeClass(["data-source-menu-i",t.method])},vue.toDisplayString(t.method),3),vue.createElementVNode("div",_hoisted_1$W,vue.toDisplayString(t.name),1),vue.createElementVNode("div",_hoisted_2$O,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:vue.withModifiers((e=>l.handleClone(o)),["stop"]),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_3$C),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:vue.withModifiers((e=>l.handleRemove(o)),["stop"]),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_4$A)])])])),_:2},1032,["class","index","onClick"])))),128))])),_:1},8,["default-active"])])),_:1})])),_:1})])),_:1})])),_:1}),vue.createVNode(m,{class:"data-source-main"},{default:vue.withCtx((()=>[i.selectIndex>=0?(vue.openBlock(),vue.createBlock(p,{key:0},{default:vue.withCtx((()=>[vue.createVNode(r,{height:"42px"},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_5$z,[vue.createVNode(a,{type:"primary",size:"default",onClick:l.handleSave},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.config.save")),1)])),_:1},8,["onClick"]),vue.createVNode(a,{size:"default",onClick:l.handleTest},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.config.test")),1)])),_:1},8,["onClick"]),vue.createVNode(a,{size:"default",onClick:l.handleCancal},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.datasource.config.cancel")),1)])),_:1},8,["onClick"])])])),_:1}),vue.createVNode(m,null,{default:vue.withCtx((()=>[(vue.openBlock(),vue.createBlock(x,{ref:"dataForm",model:i.formData,rules:i.formRules,"label-width":"zh-cn"==e.$i18n.locale?"80px":"119px",size:"default","label-position":"right",key:i.selectKey,onSubmit:t[9]||(t[9]=vue.withModifiers((()=>{}),["prevent"]))},{default:vue.withCtx((()=>[vue.createVNode(v,{label:e.$t("fm.datasource.edit.name"),prop:"name"},{default:vue.withCtx((()=>[vue.createVNode(h,{modelValue:i.formData.name,"onUpdate:modelValue":t[0]||(t[0]=e=>i.formData.name=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(v,{label:e.$t("fm.datasource.edit.url"),prop:"url"},{default:vue.withCtx((()=>[vue.createVNode(h,{type:"textarea",rows:1,modelValue:i.formData.url,"onUpdate:modelValue":t[1]||(t[1]=e=>i.formData.url=e),autosize:""},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(v,{label:e.$t("fm.datasource.edit.method"),prop:"method"},{default:vue.withCtx((()=>[vue.createVNode(y,{modelValue:i.formData.method,"onUpdate:modelValue":t[2]||(t[2]=e=>i.formData.method=e)},{default:vue.withCtx((()=>[vue.createVNode(g,{label:"GET",value:"GET"}),vue.createVNode(g,{label:"POST",value:"POST"}),vue.createVNode(g,{label:"PUT",value:"PUT"}),vue.createVNode(g,{label:"DELETE",value:"DELETE"})])),_:1},8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(v,{label:e.$t("fm.datasource.edit.headers")},{default:vue.withCtx((()=>[vue.createVNode(b,{modelValue:i.formData.headers,"onUpdate:modelValue":t[3]||(t[3]=e=>i.formData.headers=e),"show-arguments":!1,"is-args":""},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(v,{label:e.$t("fm.datasource.edit.params")},{default:vue.withCtx((()=>[vue.createVNode(b,{modelValue:i.formData.params,"onUpdate:modelValue":t[4]||(t[4]=e=>i.formData.params=e),"show-arguments":!1,"is-args":""},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(v,{label:e.$t("fm.datasource.edit.auto"),"label-width":"zh-cn"==e.$i18n.locale?"175px":"340px"},{default:vue.withCtx((()=>[vue.createVNode(k,{modelValue:i.formData.auto,"onUpdate:modelValue":t[5]||(t[5]=e=>i.formData.auto=e)},null,8,["modelValue"])])),_:1},8,["label","label-width"]),vue.createVNode(v,{label:e.$t("fm.datasource.edit.response")},{default:vue.withCtx((()=>[vue.createVNode(_,{modelValue:i.collapseAppend},{default:vue.withCtx((()=>[vue.createVNode(C,{name:"1",title:e.$t("fm.datasource.edit.willRequest")},{default:vue.withCtx((()=>["zh-cn"==e.$i18n.locale?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$l,"// config: 发出请求的可用配置选项;")):vue.createCommentVNode("",!0),"zh-cn"==e.$i18n.locale?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$h,"// 通过 config.url 可以更改请求地址,通过 config.headers 可以更改请求头部")):vue.createCommentVNode("",!0),"zh-cn"==e.$i18n.locale?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$c,"// 通过 config.data 可以更改发送的数据,(GET 请求不适用,需要更改 config.params)")):vue.createCommentVNode("",!0),t[11]||(t[11]=vue.createElementVNode("div",{class:"code-line"},"(config, args) => {",-1)),vue.createVNode(w,{modelValue:i.formData.requestFunc,"onUpdate:modelValue":t[6]||(t[6]=e=>i.formData.requestFunc=e),mode:"javascript",height:"150px"},null,8,["modelValue"]),t[12]||(t[12]=vue.createElementVNode("div",{class:"code-line"},"}",-1))])),_:1},8,["title"]),vue.createVNode(C,{title:e.$t("fm.datasource.edit.responseSuccess"),name:"2"},{default:vue.withCtx((()=>["zh-cn"==e.$i18n.locale?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$b,"// "+vue.toDisplayString(e.$t("fm.datasource.edit.annotation")),1)):vue.createCommentVNode("",!0),t[13]||(t[13]=vue.createElementVNode("div",{class:"code-line"},"(res, args) => {",-1)),vue.createVNode(w,{modelValue:i.formData.responseFunc,"onUpdate:modelValue":t[7]||(t[7]=e=>i.formData.responseFunc=e),mode:"javascript",height:"150px"},null,8,["modelValue"]),t[14]||(t[14]=vue.createElementVNode("div",{class:"code-line"},"}",-1))])),_:1},8,["title"]),vue.createVNode(C,{title:e.$t("fm.datasource.edit.requestError"),name:"3"},{default:vue.withCtx((()=>[t[15]||(t[15]=vue.createElementVNode("div",{class:"code-line"},"(error) => {",-1)),vue.createVNode(w,{modelValue:i.formData.errorFunc,"onUpdate:modelValue":t[8]||(t[8]=e=>i.formData.errorFunc=e),mode:"javascript",height:"150px"},null,8,["modelValue"]),t[16]||(t[16]=vue.createElementVNode("div",{class:"code-line"},"}",-1))])),_:1},8,["title"])])),_:1},8,["modelValue"])])),_:1},8,["label"])])),_:1},8,["model","rules","label-width"]))])),_:1})])),_:1})):vue.createCommentVNode("",!0)])),_:1})])),_:1})}var DatasourceIndex=_export_sfc(_sfc_main$1o,[["render",_sfc_render$1i]]),dialog_vue_vue_type_style_index_0_lang$1="";const _sfc_main$1n={components:{CusDialog:CusDialog,DatasourceIndex:DatasourceIndex},emits:["dialog-close"],data:()=>({visible:!1,dataSourceList:[]}),methods:{open(e,t){this.visible=!0,e&&(this.dataSourceList=e),this.$nextTick((()=>{t&&this.$refs.datasourceIndex.handleSelect(t)}))},handleClose(){this.$emit("dialog-close",this.dataSourceList),this.visible=!1},beforeClose(e){this.$refs.datasourceIndex.beforeClose(e)}}};function _sfc_render$1h(e,t,o,n,i,l){const a=vue.resolveComponent("datasource-index"),r=vue.resolveComponent("el-container"),s=vue.resolveComponent("cus-dialog");return vue.openBlock(),vue.createBlock(s,{visible:e.visible,onOnClose:l.handleClose,ref:"dataSourceDialog",width:"1000px",title:e.$t("fm.datasource.config.title"),action:!1,"before-close":l.beforeClose},{default:vue.withCtx((()=>[vue.createVNode(r,{class:"fm-data-source-dialog-container",style:{height:"600px"}},{default:vue.withCtx((()=>[vue.createVNode(a,{ref:"datasourceIndex",modelValue:e.dataSourceList,"onUpdate:modelValue":t[0]||(t[0]=t=>e.dataSourceList=t)},null,8,["modelValue"])])),_:1})])),_:1},8,["visible","onOnClose","title","before-close"])}var DatasourceDialog=_export_sfc(_sfc_main$1n,[["render",_sfc_render$1h]]),fieldsSelect_vue_vue_type_style_index_0_lang="";const _sfc_main$1m={props:["modelValue","multiple","action","defaultExpand"],emits:["update:modelValue","on-data-change"],data(){return{value:this.modelValue,formFields:[]}},computed:{disabledProp(){switch(this.action){case"openDialog":case"closeDialog":return"dialogDisabled";case"setData":case"validate":return"setdataDisabled";case"refreshFieldDataSource":case"getFieldDataSource":case"refreshFieldOptionData":return"remoteOptionDisabled";case"hide":case"display":return"hideDisabled";case"refreshDynamicValue":return"dynamicValueDisabled";case"getOptionData":return"optionDisabled";default:return"disabled"}}},inject:["getFormFields"],mounted(){this.formFields=this.getFormFields()},methods:{handleChange(e){("refreshFieldDataSource"==this.action&&!e.remoteOptionDisabled||"refreshDynamicValue"==this.action&&!e.dynamicValueDisabled||"refreshFieldOptionData"==this.action&&!e.remoteOptionDisabled)&&this.$emit("on-data-change",_.cloneDeep(e))}},watch:{modelValue(e){this.value=e},value(e){this.$emit("update:modelValue",e)}}},_hoisted_1$V={class:"custom-tree-node-type"},_hoisted_2$N={key:0,class:"custom-tree-node-model"};function _sfc_render$1g(e,t,o,n,i,l){const a=vue.resolveComponent("el-tree-select");return vue.openBlock(),vue.createBlock(a,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e),data:i.formFields,"check-strictly":"","render-after-expand":!1,"default-expand-all":o.defaultExpand,"expand-on-click-node":!1,"node-key":"id",multiple:o.multiple,clearable:o.multiple,style:{width:"100%"},class:"fm-custom-fields-select",props:{disabled:l.disabledProp,label:"label"},onCurrentChange:l.handleChange},{default:vue.withCtx((({node:e})=>{var t;return[vue.createElementVNode("div",{class:vue.normalizeClass(["custom-tree-node",{"is-bind":null==(t=e.data)?void 0:t.dataBind}])},[vue.createElementVNode("span",_hoisted_1$V,vue.toDisplayString(e.data.type?"<"+this.$t("fm.components.fields."+e.data.type)+">":e.data.label),1),e.data.model?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$N,vue.toDisplayString(e.data.model),1)):vue.createCommentVNode("",!0)],2)]})),_:1},8,["modelValue","data","default-expand-all","multiple","clearable","props","onCurrentChange"])}var FieldsSelect=_export_sfc(_sfc_main$1m,[["render",_sfc_render$1g]]);const _sfc_main$1l={props:["modelValue"],emits:["update:modelValue"],data(){return{value:this.modelValue,dataSource:[]}},inject:["getDataSourceArray"],mounted(){this.dataSource=this.getDataSourceArray()},watch:{modelValue(e){this.value=e},value(e){this.$emit("update:modelValue",e)}}};function _sfc_render$1f(e,t,o,n,i,l){const a=vue.resolveComponent("el-option"),r=vue.resolveComponent("el-select");return vue.openBlock(),vue.createBlock(r,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e),style:{width:"100%"}},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.dataSource,(e=>(vue.openBlock(),vue.createBlock(a,{key:e.key,value:e,label:e.label},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])}var DataSourceSelect=_export_sfc(_sfc_main$1l,[["render",_sfc_render$1f]]);const _sfc_main$1k={props:["modelValue"],emits:["update:modelValue"],data(){return{value:this.modelValue,events:[]}},inject:["getEventsArray"],mounted(){this.events=this.getEventsArray()},watch:{modelValue(e){this.value=e},value(e){this.$emit("update:modelValue",e)}}},_hoisted_1$U={style:{display:"flex","justify-content":"space-between","align-items":"center"}};function _sfc_render$1e(e,t,o,n,i,l){const a=vue.resolveComponent("el-tag"),r=vue.resolveComponent("el-option"),s=vue.resolveComponent("el-select");return vue.openBlock(),vue.createBlock(s,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e),style:{width:"100%"}},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.events,(e=>(vue.openBlock(),vue.createBlock(r,{key:e.key,value:e.name,label:e.name},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_1$U,[vue.createElementVNode("span",null,vue.toDisplayString(e.name),1),vue.createVNode(a,{size:"small",type:"rule"==e.type?"warning":"success"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString("rule"==e.type?"VIS":"JS"),1)])),_:2},1032,["type"])])])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue"])}var EventsSelect=_export_sfc(_sfc_main$1k,[["render",_sfc_render$1e]]);const formActions=[{action:"hide",options:{fields:[],condition:"",isCondition:!1}},{action:"display",options:{fields:[],condition:"",isCondition:!1}},{action:"disabled",options:{fields:[],condition:"",isCondition:!1,disabled:!1}},{action:"refresh",options:{condition:"",isCondition:!1}},{action:"reset",options:{condition:"",isCondition:!1}},{action:"setData",options:{condition:"",isCondition:!1,fields:[],values:{},valueTypes:{}}},{action:"validate",options:{condition:"",isCondition:!1,fields:[],failSuspend:!1}}],requestActions=[{action:"sendRequest",options:{condition:"",isCondition:!1,dataSource:"",valueTypes:{},responseVariable:""}},{action:"refreshDynamicValue",options:{condition:"",isCondition:!1,field:"",valueTypes:{}}},{action:"refreshDynamicValueAll",options:{condition:"",isCondition:!1}},{action:"refreshFieldOptionData",options:{condition:"",isCondition:!1,field:"",valueTypes:{}}},{action:"getOptionData",options:{condition:"",isCondition:!1,field:"",localVariable:""}}],dialogActions=[{action:"openDialog",options:{condition:"",isCondition:!1,field:""}},{action:"closeDialog",options:{condition:"",isCondition:!1,field:""}}],otherActions=[{action:"triggerEvent",options:{condition:"",isCondition:!1,functionName:"",functionParams:""}},{action:"js",options:{func:""}}];var rule_vue_vue_type_style_index_0_lang="";const _sfc_main$1j={components:{Draggable:draggableComponent,FieldsSelect:FieldsSelect,DataSourceSelect:DataSourceSelect,EventsSelect:EventsSelect,FormulaDialog:FormulaDialog,CodeEditor:CodeEditor},props:["modelValue"],emits:["update:modelValue"],data(){return{ruleList:this.modelValue||[],select:"",formActions:formActions,requestActions:requestActions,dialogActions:dialogActions,otherActions:otherActions,curIndex:-1,curOption:"",curField:""}},provide(){return{getResponseVariables:this.getResponseVariables,getLocalVariables:this.getLocalVariables}},methods:{handleOpenCondition(e,t){this.$refs.formulaDialog.open(e),this.curIndex=t,this.curOption="condition"},handleOpenFx(e,t,o,n="values"){this.$refs.formulaDialog.open(e),this.curIndex=t,this.curOption=n,this.curField=o},handleFormulaConfirm(e){this.curIndex>=0&&"condition"==this.curOption&&(this.ruleList[this.curIndex].options[this.curOption]=e),this.curIndex>=0&&"values"==this.curOption&&(this.ruleList[this.curIndex].options[this.curOption][this.curField]=e),this.curIndex>=0&&"dataSource"==this.curOption&&(this.ruleList[this.curIndex].options.dataSource.args[this.curField]=e)},handleActionCommand(e){let t=Math.random().toString(36).slice(-8);this.ruleList.push({key:t,..._.cloneDeep(e)})},handleActonRemove(e){this.ruleList.splice(e,1)},handleFieldDataChange(e,t){e?("refreshDynamicValue"==t.action?t.options.dataSource="datasource"==e.options.dynamicValueType?{args:"string"==typeof e.options.dynamicValueArgs?JSON.parse(e.options.dynamicValueArgs):e.options.dynamicValueArgs}:{args:{}}:t.options.dataSource="datasource"==e.options.remoteType?{args:"string"==typeof e.options.remoteArgs?JSON.parse(e.options.remoteArgs):e.options.remoteArgs}:{args:{}},t.options.dataSource.args&&Object.keys(t.options.dataSource.args).forEach((e=>{t.options.dataSource.args[e]=""}))):t.options.dataSource={}},getResponseVariables(){let e=[];return this.ruleList.forEach((t=>{t.options.responseVariable&&!e.includes(t.options.responseVariable)&&e.push(t.options.responseVariable)})),e},getLocalVariables(){let e=[];return this.ruleList.forEach((t=>{t.options.localVariable&&!e.includes(t.options.localVariable)&&e.push(t.options.localVariable)})),e},handleTypeChange(e,t,o){var n,i,l;switch(e){case"string":case"fx":t[o]=String(null!=(n=t[o])?n:"");break;case"boolean":t[o]=Boolean(null!=(i=t[o])&&i);break;case"number":t[o]=Number(null!=(l=t[o])?l:0)}}},watch:{modelValue(e){this.ruleList=e},ruleList:{deep:!0,handler(e){this.$emit("update:modelValue",e)}}}},_hoisted_1$T={class:"fm-rules-config-container"},_hoisted_2$M={class:"card-header"},_hoisted_3$B={class:"values-value"},_hoisted_4$z={class:"values-value"},_hoisted_5$y={class:"fm-add-rules-button"};function _sfc_render$1d(e,t,o,n,i,l){const a=vue.resolveComponent("el-tag"),r=vue.resolveComponent("el-popconfirm"),s=vue.resolveComponent("FieldsSelect"),d=vue.resolveComponent("el-form-item"),u=vue.resolveComponent("events-select"),c=vue.resolveComponent("el-input"),m=vue.resolveComponent("data-source-select"),p=vue.resolveComponent("el-switch"),f=vue.resolveComponent("el-option"),h=vue.resolveComponent("el-select"),v=vue.resolveComponent("el-radio"),g=vue.resolveComponent("el-radio-group"),y=vue.resolveComponent("el-button"),b=vue.resolveComponent("code-editor"),k=vue.resolveComponent("el-form"),w=vue.resolveComponent("el-card"),C=vue.resolveComponent("draggable"),_=vue.resolveComponent("el-dropdown-item"),x=vue.resolveComponent("el-dropdown-menu"),S=vue.resolveComponent("el-dropdown"),V=vue.resolveComponent("FormulaDialog");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$T,[vue.createVNode(C,vue.mergeProps({list:i.ruleList},{group:"peo2",ghostClass:"ghost11",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,"item-key":"key",class:"widget-form-list"}),{item:vue.withCtx((({element:o,index:n})=>[vue.createVNode(w,{class:"rule-card",shadow:"never",size:"small"},{header:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_2$M,[vue.createVNode(a,null,{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.rules.actions."+o.action)),1)])),_:2},1024),vue.createElementVNode("div",null,[vue.createVNode(r,{width:"200",title:e.$t("fm.rules.message.confirmDelete"),onConfirm:e=>l.handleActonRemove(n)},{reference:vue.withCtx((()=>t[0]||(t[0]=[vue.createElementVNode("div",{class:"widget-view-delete widget-view-action"},[vue.createElementVNode("i",{class:"fm-iconfont icon-delete"})],-1)]))),_:2},1032,["title","onConfirm"]),t[1]||(t[1]=vue.createElementVNode("div",{class:"widget-view-drag widget-view-action"},[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_bars drag-widget"})],-1))])])])),default:vue.withCtx((()=>[vue.createVNode(k,{"label-width":"100px",style:{"margin-right":"20px"},modelValue:o.options,"onUpdate:modelValue":e=>o.options=e,class:"rule-card-form"},{default:vue.withCtx((()=>[Object.keys(o.options).includes("fields")?(vue.openBlock(),vue.createBlock(d,{key:0,label:e.$t("fm.rules.label.field")},{default:vue.withCtx((()=>[vue.createVNode(s,{defaultExpand:!0,multiple:!0,modelValue:o.options.fields,"onUpdate:modelValue":e=>o.options.fields=e,action:o.action},null,8,["modelValue","onUpdate:modelValue","action"])])),_:2},1032,["label"])):vue.createCommentVNode("",!0),Object.keys(o.options).includes("field")?(vue.openBlock(),vue.createBlock(d,{key:1,label:e.$t("fm.rules.label.field")},{default:vue.withCtx((()=>[vue.createVNode(s,{defaultExpand:"openDialog"!=o.action&&"closeDialog"!=o.action,multiple:!1,modelValue:o.options.field,"onUpdate:modelValue":e=>o.options.field=e,action:o.action,onOnDataChange:e=>l.handleFieldDataChange(e,o)},null,8,["defaultExpand","modelValue","onUpdate:modelValue","action","onOnDataChange"])])),_:2},1032,["label"])):vue.createCommentVNode("",!0),Object.keys(o.options).includes("functionName")?(vue.openBlock(),vue.createBlock(d,{key:2,label:e.$t("fm.rules.label.functionName")},{default:vue.withCtx((()=>[vue.createVNode(u,{modelValue:o.options.functionName,"onUpdate:modelValue":e=>o.options.functionName=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["label"])):vue.createCommentVNode("",!0),o.options.functionName&&!["mounted","refresh"].includes(o.options.functionName)&&Object.keys(o.options).includes("functionParams")?(vue.openBlock(),vue.createBlock(d,{key:3,label:e.$t("fm.rules.label.functionParams")},{default:vue.withCtx((()=>[vue.createVNode(c,{type:"textarea",modelValue:o.options.functionParams,"onUpdate:modelValue":e=>o.options.functionParams=e,autosize:!0},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["label"])):vue.createCommentVNode("",!0),Object.keys(o.options).includes("dataSource")&&"sendRequest"==o.action?(vue.openBlock(),vue.createBlock(d,{key:4,label:e.$t("fm.rules.label.datasource")},{default:vue.withCtx((()=>[vue.createVNode(m,{modelValue:o.options.dataSource,"onUpdate:modelValue":e=>o.options.dataSource=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["label"])):vue.createCommentVNode("",!0),o.options.dataSource&&o.options.dataSource.args&&Object.keys(o.options.dataSource.args).length?(vue.openBlock(),vue.createBlock(d,{key:5,label:e.$t("fm.rules.label.datasourceArgs")},{default:vue.withCtx((()=>["sendRequest"!==o.action?(vue.openBlock(),vue.createBlock(p,{key:0,modelValue:o.options.isArgs,"onUpdate:modelValue":e=>o.options.isArgs=e},null,8,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0),Object.keys(o.options.dataSource.args).length&&(o.options.isArgs||"sendRequest"==o.action)?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(Object.keys(o.options.dataSource.args),(i=>(vue.openBlock(),vue.createElementBlock("div",{key:i,class:"values-item"},[vue.createVNode(c,{value:i,readonly:"",style:{width:"200px"},title:i},null,8,["value","title"]),t[2]||(t[2]=vue.createElementVNode("div",null," = ",-1)),vue.createVNode(h,{onChange:e=>l.handleTypeChange(e,o.options.dataSource.args,i),modelValue:o.options.valueTypes[i],"onUpdate:modelValue":e=>o.options.valueTypes[i]=e,placeholder:e.$t("fm.rules.label.string"),style:{width:"150px"}},{default:vue.withCtx((()=>[vue.createVNode(f,{label:e.$t("fm.rules.label.string"),value:"string"},null,8,["label"]),vue.createVNode(f,{label:e.$t("fm.rules.label.number"),value:"number"},null,8,["label"]),vue.createVNode(f,{label:e.$t("fm.rules.label.boolean"),value:"boolean"},null,8,["label"]),vue.createVNode(f,{label:e.$t("fm.rules.label.fx"),value:"fx"},null,8,["label"])])),_:2},1032,["onChange","modelValue","onUpdate:modelValue","placeholder"]),vue.createElementVNode("div",_hoisted_3$B,[o.options.valueTypes[i]&&"string"!=o.options.valueTypes[i]?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(c,{key:0,modelValue:o.options.dataSource.args[i],"onUpdate:modelValue":e=>o.options.dataSource.args[i]=e},null,8,["modelValue","onUpdate:modelValue"])),"number"==o.options.valueTypes[i]?(vue.openBlock(),vue.createBlock(c,{key:1,type:"number",modelValue:o.options.dataSource.args[i],"onUpdate:modelValue":e=>o.options.dataSource.args[i]=e,modelModifiers:{number:!0}},null,8,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0),"boolean"==o.options.valueTypes[i]?(vue.openBlock(),vue.createBlock(p,{key:2,"active-value":"true","inactive-value":"false",modelValue:o.options.dataSource.args[i],"onUpdate:modelValue":e=>o.options.dataSource.args[i]=e,style:{"margin-left":"5px"}},null,8,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0),"fx"==o.options.valueTypes[i]?(vue.openBlock(),vue.createBlock(c,{key:3,class:vue.normalizeClass({"is-fx":"fx"==o.options.valueTypes[i]}),readonly:"",modelValue:o.options.dataSource.args[i],"onUpdate:modelValue":e=>o.options.dataSource.args[i]=e,placeholder:e.$t("fm.rules.message.editFx"),onClick:e=>l.handleOpenFx(o.options.dataSource.args[i],n,i,"dataSource")},null,8,["class","modelValue","onUpdate:modelValue","placeholder","onClick"])):vue.createCommentVNode("",!0)])])))),128)):vue.createCommentVNode("",!0)])),_:2},1032,["label"])):vue.createCommentVNode("",!0),o.options.dataSource&&Object.keys(o.options).includes("responseVariable")?(vue.openBlock(),vue.createBlock(d,{key:6,label:e.$t("fm.rules.label.responseVariable")},{default:vue.withCtx((()=>[vue.createVNode(c,{modelValue:o.options.responseVariable,"onUpdate:modelValue":e=>o.options.responseVariable=e,clearable:""},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["label"])):vue.createCommentVNode("",!0),o.options.field&&Object.keys(o.options).includes("localVariable")?(vue.openBlock(),vue.createBlock(d,{key:7,label:e.$t("fm.rules.label.localVariable")},{default:vue.withCtx((()=>[vue.createVNode(c,{modelValue:o.options.localVariable,"onUpdate:modelValue":e=>o.options.localVariable=e,clearable:""},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["label"])):vue.createCommentVNode("",!0),Object.keys(o.options).includes("disabled")?(vue.openBlock(),vue.createBlock(d,{key:8,"label-width":"zh-cn"==e.$i18n.locale?"100px":"120px",label:e.$t("fm.rules.label.enabled")+"/"+e.$t("fm.rules.label.disabled")},{default:vue.withCtx((()=>[vue.createVNode(g,{modelValue:o.options.disabled,"onUpdate:modelValue":e=>o.options.disabled=e},{default:vue.withCtx((()=>[vue.createVNode(v,{label:!1,value:!1},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.rules.label.enabled")),1)])),_:1}),vue.createVNode(v,{label:!0,value:!0},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.rules.label.disabled")),1)])),_:1})])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1032,["label-width","label"])):vue.createCommentVNode("",!0),Object.keys(o.options).includes("values")&&o.options.fields.length?(vue.openBlock(),vue.createBlock(d,{key:9,label:e.$t("fm.rules.label.values")},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.options.fields,(i=>(vue.openBlock(),vue.createElementBlock("div",{key:i,class:"values-item"},[vue.createVNode(c,{value:i,readonly:"",style:{width:"200px",direction:"rtl"},title:i},null,8,["value","title"]),t[3]||(t[3]=vue.createElementVNode("div",null," = ",-1)),vue.createVNode(h,{onChange:e=>l.handleTypeChange(e,o.options.values,i),modelValue:o.options.valueTypes[i],"onUpdate:modelValue":e=>o.options.valueTypes[i]=e,placeholder:e.$t("fm.rules.label.string"),style:{width:"150px"}},{default:vue.withCtx((()=>[vue.createVNode(f,{label:e.$t("fm.rules.label.string"),value:"string"},null,8,["label"]),vue.createVNode(f,{label:e.$t("fm.rules.label.number"),value:"number"},null,8,["label"]),vue.createVNode(f,{label:e.$t("fm.rules.label.boolean"),value:"boolean"},null,8,["label"]),vue.createVNode(f,{label:e.$t("fm.rules.label.fx"),value:"fx"},null,8,["label"])])),_:2},1032,["onChange","modelValue","onUpdate:modelValue","placeholder"]),vue.createElementVNode("div",_hoisted_4$z,[o.options.valueTypes[i]&&"string"!=o.options.valueTypes[i]?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(c,{key:0,modelValue:o.options.values[i],"onUpdate:modelValue":e=>o.options.values[i]=e},null,8,["modelValue","onUpdate:modelValue"])),"number"==o.options.valueTypes[i]?(vue.openBlock(),vue.createBlock(c,{key:1,type:"number",modelValue:o.options.values[i],"onUpdate:modelValue":e=>o.options.values[i]=e,modelModifiers:{number:!0}},null,8,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0),"boolean"==o.options.valueTypes[i]?(vue.openBlock(),vue.createBlock(p,{key:2,modelValue:o.options.values[i],"onUpdate:modelValue":e=>o.options.values[i]=e,style:{"margin-left":"5px"}},null,8,["modelValue","onUpdate:modelValue"])):vue.createCommentVNode("",!0),"fx"==o.options.valueTypes[i]?(vue.openBlock(),vue.createBlock(c,{key:3,class:vue.normalizeClass({"is-fx":"fx"==o.options.valueTypes[i]}),readonly:"",modelValue:o.options.values[i],"onUpdate:modelValue":e=>o.options.values[i]=e,placeholder:e.$t("fm.rules.message.editFx"),onClick:e=>l.handleOpenFx(o.options.values[i],n,i)},null,8,["class","modelValue","onUpdate:modelValue","placeholder","onClick"])):vue.createCommentVNode("",!0)])])))),128))])),_:2},1032,["label"])):vue.createCommentVNode("",!0),Object.keys(o.options).includes("failSuspend")?(vue.openBlock(),vue.createBlock(d,{key:10,label:e.$t("fm.rules.label.validateFail")},{default:vue.withCtx((()=>[vue.createVNode(g,{modelValue:o.options.failSuspend,"onUpdate:modelValue":e=>o.options.failSuspend=e},{default:vue.withCtx((()=>[vue.createVNode(v,{label:!1,value:!1},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.rules.label.validateFailContinue")),1)])),_:1}),vue.createVNode(v,{label:!0,value:!0},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.rules.label.validateFailSuspend")),1)])),_:1})])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1032,["label"])):vue.createCommentVNode("",!0),Object.keys(o.options).includes("condition")?(vue.openBlock(),vue.createBlock(d,{key:11,label:e.$t("fm.rules.label.condition")},{default:vue.withCtx((()=>[vue.createVNode(p,{modelValue:o.options.isCondition,"onUpdate:modelValue":e=>o.options.isCondition=e},null,8,["modelValue","onUpdate:modelValue"]),o.options.isCondition?(vue.openBlock(),vue.createBlock(c,{key:0,modelValue:o.options.condition,"onUpdate:modelValue":e=>o.options.condition=e,placeholder:e.$t("fm.rules.message.condition"),class:"input-with-select",readonly:"",onClick:e=>l.handleOpenCondition(o.options.condition,n)},{append:vue.withCtx((()=>[vue.createVNode(y,{size:"small",onClick:e=>l.handleOpenCondition(o.options.condition,n)},{default:vue.withCtx((()=>t[4]||(t[4]=[vue.createElementVNode("i",{class:"fm-iconfont icon-editor-formula",style:{"font-size":"13px"}},null,-1)]))),_:2},1032,["onClick"])])),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","onClick"])):vue.createCommentVNode("",!0)])),_:2},1032,["label"])):vue.createCommentVNode("",!0),Object.keys(o.options).includes("func")?(vue.openBlock(),vue.createBlock(d,{key:12,"label-width":"0",style:{"margin-bottom":"0px"}},{default:vue.withCtx((()=>[t[5]||(t[5]=vue.createElementVNode("div",{class:"code-line"},"Function () {",-1)),vue.createVNode(b,{modelValue:o.options.func,"onUpdate:modelValue":e=>o.options.func=e,mode:"javascript",height:"200px"},null,8,["modelValue","onUpdate:modelValue"]),t[6]||(t[6]=vue.createElementVNode("div",{class:"code-line"},"}",-1))])),_:2},1024)):vue.createCommentVNode("",!0)])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1024)])),_:1},16,["list"]),vue.createVNode(S,{onCommand:l.handleActionCommand,trigger:"click",class:"fm-add-rules-wrapper","max-height":"400px"},{dropdown:vue.withCtx((()=>[vue.createVNode(x,null,{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.dialogActions,(t=>(vue.openBlock(),vue.createBlock(_,{key:t.action,command:t},{default:vue.withCtx((()=>[vue.createElementVNode("div",null,vue.toDisplayString(e.$t("fm.rules.actions."+t.action)),1)])),_:2},1032,["command"])))),128)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.formActions,((t,o)=>(vue.openBlock(),vue.createBlock(_,{key:t.action,command:t,divided:0==o},{default:vue.withCtx((()=>[vue.createElementVNode("div",null,vue.toDisplayString(e.$t("fm.rules.actions."+t.action)),1)])),_:2},1032,["command","divided"])))),128)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.requestActions,((t,o)=>(vue.openBlock(),vue.createBlock(_,{key:t.action,command:t,divided:0==o},{default:vue.withCtx((()=>[vue.createElementVNode("div",null,vue.toDisplayString(e.$t("fm.rules.actions."+t.action)),1)])),_:2},1032,["command","divided"])))),128)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.otherActions,((t,o)=>(vue.openBlock(),vue.createBlock(_,{key:t.action,command:t,divided:0==o},{default:vue.withCtx((()=>[vue.createElementVNode("div",null,vue.toDisplayString(e.$t("fm.rules.actions."+t.action)),1)])),_:2},1032,["command","divided"])))),128))])),_:1})])),default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_5$y,[vue.createTextVNode(vue.toDisplayString(e.$t("fm.rules.actions.add")),1),t[7]||(t[7]=vue.createElementVNode("i",{class:"fm-iconfont icon-plus",style:{"font-size":"12px",margin:"5px"}},null,-1))])])),_:1},8,["onCommand"])]),vue.createVNode(V,{ref:"formulaDialog",onDialogConfirm:l.handleFormulaConfirm},null,8,["onDialogConfirm"])],64)}var EventRule=_export_sfc(_sfc_main$1j,[["render",_sfc_render$1d]]);const ruleToFuncString=e=>{var t;const o=(null==(t=e.options)?void 0:t.isCondition)?` if (${e.options.condition||"false"}) `:"";if("hide"==e.action)return`${o} this.hide(${JSON.stringify(e.options.fields)});`;if("display"==e.action)return`${o} this.display(${JSON.stringify(e.options.fields)});`;if("disabled"==e.action)return`${o} this.disabled(${JSON.stringify(e.options.fields)}, ${e.options.disabled});`;if("refresh"==e.action)return`${o} await this.refresh();`;if("reset"==e.action)return`${o} this.reset();`;if("setData"==e.action){return`${o} await this.setData({${e.options.fields.map((t=>{var o,n;return"fx"==e.options.valueTypes[t]?`'${t}' : ${e.options.values[t]||JSON.stringify("")}`:"boolean"==e.options.valueTypes[t]?`'${t}' : ${null!=(o=e.options.values[t])&&o}`:"number"==e.options.valueTypes[t]?`'${t}' : ${e.options.values[t]||("number"==typeof e.options.values[t]?0:void 0)}`:`'${t}' : ${JSON.stringify(null!=(n=e.options.values[t])?n:"")}`})).join(",")}});`}if("validate"==e.action)return e.options.failSuspend?`${o} await this.validate(${JSON.stringify(e.options.fields)});`:`${o} this.validate(${JSON.stringify(e.options.fields)});`;if("sendRequest"==e.action){if(!e.options.dataSource)return"";let t=Object.keys(e.options.dataSource.args).map((t=>{var o;return"fx"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]||JSON.stringify("")}`:"boolean"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]}`:"number"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]||("number"==typeof e.options.values[item]?0:void 0)}`:`'${t}' : ${JSON.stringify(null!=(o=e.options.dataSource.args[t])?o:"")}`}));if(e.options.responseVariable){return`${` let ${e.options.responseVariable} = undefined;`} ${o} ${e.options.responseVariable} = await this.sendRequest('${e.options.dataSource.value}', {${t.join(",")}});`}return`${o} await this.sendRequest('${e.options.dataSource.value}', {${t.join(",")}});`}if("refreshFieldDataSource"==e.action){if(!e.options.field)return"";let t=Object.keys(e.options.dataSource.args).map((t=>{var o;return"fx"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]||JSON.stringify("")}`:"boolean"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]}`:"number"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]||("number"==typeof e.options.values[item]?0:void 0)}`:`'${t}' : ${JSON.stringify(null!=(o=e.options.dataSource.args[t])?o:"")}`}));return`${o} await this.refreshFieldDataSource('${e.options.field}', {${t.join(",")}});`}if("getFieldDataSource"==e.action&&e.options.localVariable){return`${` let ${e.options.localVariable} = undefined;`} ${o} ${e.options.localVariable} = this.getFieldDataSource('${e.options.field}');`}if("getOptionData"==e.action&&e.options.localVariable){return`${` let ${e.options.localVariable} = undefined;`} ${o} ${e.options.localVariable} = this.getOptionData('${e.options.field}');`}if("refreshDynamicValueAll"==e.action)return`${o} this.refreshDynamicValueAll()`;if("refreshDynamicValue"==e.action){if(!e.options.field)return"";let t=[];return e.options.isArgs&&(t=Object.keys(e.options.dataSource.args).map((t=>{var o;return"fx"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]||JSON.stringify("")}`:"boolean"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]}`:"number"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]||("number"==typeof e.options.values[item]?0:void 0)}`:`'${t}' : ${JSON.stringify(null!=(o=e.options.dataSource.args[t])?o:"")}`}))),`${o} this.refreshDynamicValue('${e.options.field}', {${t.join(",")}});`}if("refreshFieldOptionData"==e.action){if(!e.options.field)return"";let t=[];return e.options.isArgs&&(t=Object.keys(e.options.dataSource.args).map((t=>{var o;return"fx"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]||JSON.stringify("")}`:"boolean"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]}`:"number"==e.options.valueTypes[t]?`'${t}' : ${e.options.dataSource.args[t]||("number"==typeof e.options.values[item]?0:void 0)}`:`'${t}' : ${JSON.stringify(null!=(o=e.options.dataSource.args[t])?o:"")}`}))),`${o} this.refreshFieldOptionData('${e.options.field}', {${t.join(",")}});`}if("openDialog"==e.action)return e.options.field?`${o} this.openDialog('${e.options.field}');`:"";if("closeDialog"==e.action)return e.options.field?`${o} this.closeDialog('${e.options.field}');`:"";if("triggerEvent"==e.action){if(!e.options.functionName)return"";let t=e.options.functionParams.trim();if(t){try{t=new Function("return "+t)()}catch(n){return`${o} this.triggerEvent('${e.options.functionName}', "${t}");`}return`${o} this.triggerEvent('${e.options.functionName}', ${JSON.stringify(t)});`}return`${o} this.triggerEvent('${e.options.functionName}');`}return"js"==e.action?e.options.func:void 0},ruleToFunction=e=>{if(!e)return"";"string"==typeof e&&(e=JSON.parse(e));let t=[];return e.forEach((e=>{t.push(ruleToFuncString(e))})),t.join("\n")};var index_vue_vue_type_style_index_0_lang$5="";const _sfc_main$1i={components:{Draggable:draggableComponent,CodeEditor:CodeEditor,EventRule:EventRule},props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue","on-confirm-event"],data(){return{formData:{key:"",name:"",func:"",type:"rule"},tmpData:{},formRules:{name:[{required:!0,message:" "},{validator:(e,t,o)=>{let n=this.historyList.find((e=>e.name==t));n&&n.key!=this.selectKey?o(new Error(this.$t("fm.eventscript.message.repeat"))):o()}}]},list:[...this.modelValue],selectIndex:-1,selectKey:"",historyList:[...this.modelValue],saved:!0,eventType:"",readonlyFunctions:["mounted","refresh","onFormChange"]}},provide(){return{getEventsArray:this.getEventsArray}},methods:{handleSave(e){return new Promise(((t,o)=>{this.$refs.dataForm.validate((n=>{if(n)try{if("rule"===this.formData.type){new(0,Object.getPrototypeOf((async function(){})).constructor)(ruleToFunction(this.formData.rules))}else new Function(this.formData.func);this.list[this.list.findIndex((e=>e.key===this.selectKey))]=this.formData,this.historyList=[...this.list],this.saved=!0,this.tmpData=_.cloneDeep(this.formData),this.$emit("update:modelValue",this.historyList),e?this.$emit("on-confirm-event",{...this.formData,type:this.eventType}):ElMessage({message:this.$t("fm.eventscript.message.saveSuccess"),type:"success"},this),setTimeout((()=>{t()}),300)}catch(i){ElMessage({message:this.$t("fm.message.eventSaveError")+i.message,type:"error"},this)}else o()}))}))},handleAdd(){if(!this.saved||this.isFormChange())return void ElMessage({message:this.$t("fm.eventscript.message.saveError"),type:"warning"},this);let e=Math.random().toString(36).slice(-8);this.list.push({key:e,name:"func_"+e,func:"",type:"rule"}),this.selectKey=e,this.saved=!1},loadNewFunction(e){let t=Math.random().toString(36).slice(-8);this.list.push({key:t,name:e+"_"+t,func:"",type:"rule"}),this.selectKey=t,this.saved=!1,this.eventType=e},loadForm(){let e=_.cloneDeep(this.list[this.selectIndex]);this.formData={...e,type:e.type||"js"},this.tmpData=_.cloneDeep(this.formData)},handleSelect(e){e!==this.selectKey&&(this.saved&&!this.isFormChange()?this.selectKey=e:ElMessage({message:this.$t("fm.eventscript.message.saveError"),type:"warning"},this))},isFormChange(){return!(!this.selectKey||!Object.keys(this.tmpData).length)&&!_.isEqual(this.formData,this.tmpData)},loadFunction(e,t){this.selectKey=e,t&&(this.eventType=t)},handleCancal(){this.beforeClose((()=>{this.selectKey="",this.list=[...this.historyList],this.saved=!0}))},handleClone(e){if(!this.saved||this.isFormChange())return void ElMessage({message:this.$t("fm.eventscript.message.saveError"),type:"warning"},this);let t=this.list[e],o=Math.random().toString(36).slice(-8),n={...t,key:o,name:t.name+"_copy"};this.list.push(n),this.selectKey=o,this.saved=!1},handleRemove(e){let t=this.list[e];this.$msgbox.confirm(`${this.$t("fm.eventscript.message.confirmRemove")} [${t.name}] ?`,"",{type:"warning"}).then((()=>{t.key===this.selectKey&&(this.selectKey="",this.saved=!0),this.list.splice(e,1),e{}))},getEventsArray(){return this.list.map((e=>({key:e.key,name:e.name,type:e.type}))).filter((e=>"mounted"!=e.key&&"refresh"!=e.key&&e.key!=this.selectKey))},beforeClose(e){this.isFormChange()||!this.saved?this.$msgbox.confirm(this.$t("fm.eventscript.message.saveConfirm"),"Confirm",{distinguishCancelAndClose:!0,confirmButtonText:this.$t("fm.eventscript.config.save"),cancelButtonText:this.$t("fm.eventscript.config.notSave"),type:"warning"}).then((()=>{this.handleSave().then((()=>{e()}))})).catch((t=>{"cancel"===t&&e()})):e()}},watch:{selectKey(e){e?(this.selectIndex=this.list.findIndex((t=>t.key===e)),this.selectIndex>=0&&this.loadForm()):this.selectIndex=-1}}},_hoisted_1$S={class:"event-script-menu-label"},_hoisted_2$L={class:"event-script-menu-action"},_hoisted_3$A=["onClick","title"],_hoisted_4$y=["onClick","title"],_hoisted_5$x={class:"event-script-action"};function _sfc_render$1c(e,t,o,n,i,l){const a=vue.resolveComponent("el-button"),r=vue.resolveComponent("el-header"),s=vue.resolveComponent("el-badge"),d=vue.resolveComponent("el-menu-item"),u=vue.resolveComponent("draggable"),c=vue.resolveComponent("el-menu"),m=vue.resolveComponent("el-scrollbar"),p=vue.resolveComponent("el-main"),f=vue.resolveComponent("el-container"),h=vue.resolveComponent("el-aside"),v=vue.resolveComponent("el-input"),g=vue.resolveComponent("el-form-item"),y=vue.resolveComponent("el-radio-button"),b=vue.resolveComponent("el-radio-group"),k=vue.resolveComponent("code-editor"),w=vue.resolveComponent("event-rule"),C=vue.resolveComponent("el-form");return vue.openBlock(),vue.createBlock(f,{class:"event-script-container"},{default:vue.withCtx((()=>[vue.createVNode(h,{width:"300px",class:"event-script-aside"},{default:vue.withCtx((()=>[vue.createVNode(f,null,{default:vue.withCtx((()=>[vue.createVNode(r,{height:"42px"},{default:vue.withCtx((()=>[vue.createVNode(a,{link:"",type:"primary",size:"default",onClick:l.handleAdd},{default:vue.withCtx((()=>[t[7]||(t[7]=vue.createElementVNode("i",{class:"fm-iconfont icon-plus",style:{"font-size":"12px",margin:"5px"}},null,-1)),vue.createTextVNode(vue.toDisplayString(e.$t("fm.eventscript.config.add")),1)])),_:1},8,["onClick"])])),_:1}),vue.createVNode(p,null,{default:vue.withCtx((()=>[vue.createVNode(m,null,{default:vue.withCtx((()=>[vue.createVNode(c,{class:"event-script-aside-menu","default-active":i.selectKey},{default:vue.withCtx((()=>[vue.createVNode(u,vue.mergeProps({list:i.list},{group:"peo1",ghostClass:"ghost11",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,"item-key":"key"}),{item:vue.withCtx((({element:o,index:n})=>[(vue.openBlock(),vue.createBlock(d,{class:vue.normalizeClass({"is-disabled":!i.saved||l.isFormChange(),"is-active2":i.selectKey==o.key}),index:o.key,key:o.key,onClick:e=>l.handleSelect(o.key)},{title:vue.withCtx((()=>[vue.createElementVNode("div",null,[!l.isFormChange()&&i.saved||i.selectKey!=o.key?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(s,{key:0,"is-dot":"",style:{position:"absolute",top:"2px",left:"2px"}})),vue.createElementVNode("span",{class:vue.normalizeClass(["event-script-menu-i",{"is-vis":"rule"==o.type}])},vue.toDisplayString("rule"==o.type?"VIS":"JS"),3),vue.createElementVNode("div",_hoisted_1$S,vue.toDisplayString(o.name),1),vue.createElementVNode("div",_hoisted_2$L,[i.readonlyFunctions.includes(o.name)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"fm-iconfont icon-icon_clone",onClick:vue.withModifiers((e=>l.handleClone(n)),["stop"]),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_3$A)),i.readonlyFunctions.includes(o.name)?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("i",{key:1,class:"fm-iconfont icon-trash",onClick:vue.withModifiers((e=>l.handleRemove(n)),["stop"]),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_4$y)),t[8]||(t[8]=vue.createElementVNode("i",{class:"fm-iconfont icon-icon_bars drag-widget"},null,-1))])])])),_:2},1032,["class","index","onClick"]))])),_:1},16,["list"])])),_:1},8,["default-active"])])),_:1})])),_:1})])),_:1})])),_:1}),vue.createVNode(p,{class:"event-script-main"},{default:vue.withCtx((()=>[i.selectIndex>=0?(vue.openBlock(),vue.createBlock(f,{key:0},{default:vue.withCtx((()=>[vue.createVNode(r,{height:"42px"},{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_5$x,[this.eventType?(vue.openBlock(),vue.createBlock(a,{key:0,type:"primary",size:"default",onClick:t[0]||(t[0]=e=>l.handleSave(!0))},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.eventscript.config.confirm")),1)])),_:1})):vue.createCommentVNode("",!0),vue.createVNode(a,{type:"primary",size:"default",onClick:t[1]||(t[1]=e=>l.handleSave(!1))},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.eventscript.config.save")),1)])),_:1}),vue.createVNode(a,{size:"default",onClick:l.handleCancal},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.eventscript.config.cancel")),1)])),_:1},8,["onClick"])])])),_:1}),vue.createVNode(p,null,{default:vue.withCtx((()=>[(vue.openBlock(),vue.createBlock(C,{ref:"dataForm",model:i.formData,rules:i.formRules,"label-width":"125px",size:"default","label-position":"left",key:i.selectKey,onSubmit:t[6]||(t[6]=vue.withModifiers((()=>{}),["prevent"]))},{default:vue.withCtx((()=>[vue.createVNode(g,{label:e.$t("fm.eventscript.config.name"),"label-width":"zh-cn"==e.$i18n.locale?"100px":"125px",prop:"name"},{default:vue.withCtx((()=>[vue.createVNode(v,{modelValue:i.formData.name,"onUpdate:modelValue":t[2]||(t[2]=e=>i.formData.name=e),disabled:i.readonlyFunctions.includes(i.formData.name)},null,8,["modelValue","disabled"])])),_:1},8,["label","label-width"]),i.formData.type?(vue.openBlock(),vue.createBlock(g,{key:0,"label-width":"0"},{default:vue.withCtx((()=>[vue.createVNode(b,{modelValue:i.formData.type,"onUpdate:modelValue":t[3]||(t[3]=e=>i.formData.type=e)},{default:vue.withCtx((()=>[vue.createVNode(y,{label:"rule",value:"rule"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.eventscript.config.rules")),1)])),_:1}),vue.createVNode(y,{label:"js",value:"js"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.eventscript.config.js")),1)])),_:1})])),_:1},8,["modelValue"])])),_:1})):vue.createCommentVNode("",!0),i.formData.type&&"js"!=i.formData.type?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(g,{key:1,"label-width":"0",prop:"func",style:{"margin-bottom":"0px"}},{default:vue.withCtx((()=>[t[9]||(t[9]=vue.createElementVNode("div",{class:"code-line"},"Function () {",-1)),vue.createVNode(k,{modelValue:i.formData.func,"onUpdate:modelValue":t[4]||(t[4]=e=>i.formData.func=e),mode:"javascript",height:i.formData.type?"350px":"400px"},null,8,["modelValue","height"]),t[10]||(t[10]=vue.createElementVNode("div",{class:"code-line"},"}",-1))])),_:1})),"rule"==i.formData.type?(vue.openBlock(),vue.createBlock(w,{key:2,modelValue:i.formData.rules,"onUpdate:modelValue":t[5]||(t[5]=e=>i.formData.rules=e)},null,8,["modelValue"])):vue.createCommentVNode("",!0)])),_:1},8,["model","rules"]))])),_:1})])),_:1})):vue.createCommentVNode("",!0)])),_:1})])),_:1})}var EventScriptIndex=_export_sfc(_sfc_main$1i,[["render",_sfc_render$1c]]),dialog_vue_vue_type_style_index_0_lang="";const _sfc_main$1h={components:{CusDialog:CusDialog,EventScriptIndex:EventScriptIndex},emits:["dialog-close","dialog-confirm"],data:()=>({visible:!1,scriptList:[]}),methods:{open(e,t,o){this.visible=!0,e&&(this.scriptList=e),this.$nextTick((()=>{!o&&t&&this.$refs.eventScriptIndex.loadNewFunction(t),o&&t&&this.$refs.eventScriptIndex.loadFunction(o,t)}))},handleClose(){this.$emit("dialog-close",this.scriptList),this.visible=!1},handleConfirmEvent(e){this.$emit("dialog-close",this.scriptList),this.$emit("dialog-confirm",e),this.visible=!1},beforeClose(e){this.$refs.eventScriptIndex.beforeClose(e)}}};function _sfc_render$1b(e,t,o,n,i,l){const a=vue.resolveComponent("event-script-index"),r=vue.resolveComponent("el-container"),s=vue.resolveComponent("cus-dialog");return vue.openBlock(),vue.createBlock(s,{visible:e.visible,onOnClose:l.handleClose,ref:"scriptDialog",width:"1000px",title:e.$t("fm.eventscript.config.title"),action:!1,"before-close":l.beforeClose},{default:vue.withCtx((()=>[vue.createVNode(r,{style:{height:"600px"},class:"fm-event-panel-dialog-container"},{default:vue.withCtx((()=>[vue.createVNode(a,{modelValue:e.scriptList,"onUpdate:modelValue":t[0]||(t[0]=t=>e.scriptList=t),ref:"eventScriptIndex",onOnConfirmEvent:l.handleConfirmEvent},null,8,["modelValue","onOnConfirmEvent"])])),_:1})])),_:1},8,["visible","onOnClose","title","before-close"])}var EventScriptDialog=_export_sfc(_sfc_main$1h,[["render",_sfc_render$1b]]);const _sfc_main$1g={components:{CodeDialog:CodeDialog,DatasourceDialog:DatasourceDialog,EventScriptDialog:EventScriptDialog},props:["data","sheets","formKey"],emits:["on-style-update","on-datasource-update","on-eventscript-update","on-eventscript-confirm","update:data"],data(){return{customClassArray:this.data&&this.data.customClass?this.data.customClass.split(" ").filter((e=>e)):[],dataModel:this.data}},inject:["isMobile","useAntdForm","useVantForm"],methods:{handleSetStyleSheets(){document.styleSheets[0].insertRule?this.$refs.styleDialog.open(this.data.styleSheets||""):ElMessage({message:this.$t("fm.message.notSupport"),type:"warning"},this)},handlestyleSheetsConfirm(e){this.dataModel.styleSheets=e,this.$refs.styleDialog.close();var t=splitStyleSheets(e);this.$emit("on-style-update",t),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleSetDatasource(){this.dataModel.dataSource=this.data.dataSource||[],this.$refs.dataSourceDialog.open(this.data.dataSource)},handleDataSourceClose(e){this.dataModel.dataSource=e,this.$emit("on-datasource-update",e),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleSetScript(){this.dataModel.eventScript=this.data.eventScript||[],this.$refs.eventScriptDialog.open(this.data.eventScript)},editClass(){this.handleSetStyleSheets()},editDatasource(e){this.dataModel.dataSource=this.data.dataSource||[],this.$refs.dataSourceDialog.open(this.data.dataSource,e)},editScript(e,t){this.dataModel.eventScript=this.data.eventScript||[],this.$refs.eventScriptDialog.open(this.data.eventScript,e,t)},handleEventScriptClose(e){this.dataModel.eventScript=e,this.$emit("on-eventscript-update",e),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleEventConfirm(e){this.$emit("on-eventscript-confirm",e),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}},created(){this.dataModel.ui=this.useAntdForm?"antd":"element",this.dataModel.mobileVant=this.useVantForm},watch:{"data.customClass":function(e){this.customClassArray=this.data&&this.data.customClass?this.data.customClass.split(" ").filter((e=>e)):[]},customClassArray(e){this.dataModel.customClass=e.join(" ")},data(e){this.dataModel=e},dataModel:{deep:!0,handler(e){this.$emit("update:data",e)}},useVantForm(e){this.dataModel.mobileVant=e},useAntdForm(e){e||(this.dataModel.ui="element")}}},_hoisted_1$R={class:"form-config-container"};function _sfc_render$1a(e,t,o,n,i,l){const a=vue.resolveComponent("el-radio-button"),r=vue.resolveComponent("el-radio-group"),s=vue.resolveComponent("el-form-item"),d=vue.resolveComponent("el-switch"),u=vue.resolveComponent("el-input"),c=vue.resolveComponent("el-input-number"),m=vue.resolveComponent("el-button"),p=vue.resolveComponent("el-option"),f=vue.resolveComponent("el-select"),h=vue.resolveComponent("el-form"),v=vue.resolveComponent("code-dialog"),g=vue.resolveComponent("datasource-dialog"),y=vue.resolveComponent("event-script-dialog"),b=vue.resolveComponent("el-scrollbar");return vue.openBlock(),vue.createBlock(b,null,{default:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_1$R,[vue.createVNode(h,{"label-position":"top",size:"default"},{default:vue.withCtx((()=>[vue.createVNode(s,{label:"UI"},{default:vue.withCtx((()=>[vue.createVNode(r,{modelValue:i.dataModel.ui,"onUpdate:modelValue":t[0]||(t[0]=e=>i.dataModel.ui=e)},{default:vue.withCtx((()=>[vue.createVNode(a,{value:"element",label:"element"},{default:vue.withCtx((()=>t[8]||(t[8]=[vue.createTextVNode("Element")]))),_:1}),vue.createVNode(a,{value:"antd",label:"antd",disabled:!l.useAntdForm},{default:vue.withCtx((()=>t[9]||(t[9]=[vue.createTextVNode("Ant Design")]))),_:1},8,["disabled"])])),_:1},8,["modelValue"])])),_:1}),vue.createVNode(s,{label:e.$t("fm.config.form.mobileRender")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:i.dataModel.mobileVant,"onUpdate:modelValue":t[1]||(t[1]=e=>i.dataModel.mobileVant=e),"active-text":"Vant",disabled:!l.useVantForm},null,8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.config.form.width")},{default:vue.withCtx((()=>[vue.createVNode(u,{modelValue:i.dataModel.width,"onUpdate:modelValue":t[2]||(t[2]=e=>i.dataModel.width=e),clearable:"",disabled:l.isMobile()},null,8,["modelValue","disabled"])])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.config.form.labelPosition.title")},{default:vue.withCtx((()=>[(vue.openBlock(),vue.createBlock(r,{modelValue:i.dataModel.labelPosition,"onUpdate:modelValue":t[3]||(t[3]=e=>i.dataModel.labelPosition=e),key:o.data.labelPosition},{default:vue.withCtx((()=>[vue.createVNode(a,{value:"left",label:"left"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.form.labelPosition.left")),1)])),_:1}),vue.createVNode(a,{value:"right",label:"right"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.form.labelPosition.right")),1)])),_:1}),vue.createVNode(a,{value:"top",label:"top"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.form.labelPosition.top")),1)])),_:1})])),_:1},8,["modelValue"]))])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.config.form.labelWidth")},{default:vue.withCtx((()=>[vue.createVNode(c,{modelValue:i.dataModel.labelWidth,"onUpdate:modelValue":t[4]||(t[4]=e=>i.dataModel.labelWidth=e),min:0,max:200,step:10},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.config.form.labelSuffix")},{default:vue.withCtx((()=>[vue.createVNode(d,{modelValue:i.dataModel.labelSuffix,"onUpdate:modelValue":t[5]||(t[5]=e=>i.dataModel.labelSuffix=e)},null,8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.config.form.size")},{default:vue.withCtx((()=>[vue.createVNode(r,{modelValue:i.dataModel.size,"onUpdate:modelValue":t[6]||(t[6]=e=>i.dataModel.size=e)},{default:vue.withCtx((()=>[vue.createVNode(a,{value:"large",label:"large"},{default:vue.withCtx((()=>t[10]||(t[10]=[vue.createTextVNode("Large")]))),_:1}),vue.createVNode(a,{value:"default",label:"default"},{default:vue.withCtx((()=>t[11]||(t[11]=[vue.createTextVNode("Default")]))),_:1}),vue.createVNode(a,{value:"small",label:"small"},{default:vue.withCtx((()=>t[12]||(t[12]=[vue.createTextVNode("Small")]))),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.config.form.styleSheets")},{default:vue.withCtx((()=>[vue.createVNode(m,{style:{width:"100%"},onClick:l.handleSetStyleSheets},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1},8,["onClick"])])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.config.form.customClass")},{default:vue.withCtx((()=>[vue.createVNode(f,{style:{width:"100%"},modelValue:i.customClassArray,"onUpdate:modelValue":t[7]||(t[7]=e=>i.customClassArray=e),multiple:"",filterable:"","allow-create":"","default-first-option":""},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.sheets,(e=>(vue.openBlock(),vue.createBlock(p,{key:e,label:e,value:e},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.datasource.name")},{default:vue.withCtx((()=>[vue.createVNode(m,{style:{width:"100%"},onClick:l.handleSetDatasource},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1},8,["onClick"])])),_:1},8,["label"]),vue.createVNode(s,{label:e.$t("fm.eventscript.name")},{default:vue.withCtx((()=>[vue.createVNode(m,{style:{width:"100%"},onClick:l.handleSetScript},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.config.widget.setting")),1)])),_:1},8,["onClick"])])),_:1},8,["label"])])),_:1}),vue.createVNode(v,{ref:"styleDialog",mode:"css",title:e.$t("fm.config.form.styleSheets"),help:"https://form.making.link/docs/manual/custom-style.html#%E8%A1%A8%E5%8D%95%E6%A0%B7%E5%BC%8F%E8%A1%A8",onOnConfirm:l.handlestyleSheetsConfirm},null,8,["title","onOnConfirm"]),vue.createVNode(g,{ref:"dataSourceDialog",onDialogClose:l.handleDataSourceClose},null,8,["onDialogClose"]),vue.createVNode(y,{ref:"eventScriptDialog",onDialogClose:l.handleEventScriptClose,onDialogConfirm:l.handleEventConfirm},null,8,["onDialogClose","onDialogConfirm"])])])),_:1})}var FormConfig=_export_sfc(_sfc_main$1g,[["render",_sfc_render$1a]]); /*! * Viewer.js v1.11.7 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * * Date: 2024-11-24T04:32:19.116Z */function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o
',IS_BROWSER="undefined"!=typeof window&&void 0!==window.document,WINDOW=IS_BROWSER?window:{},IS_TOUCH_DEVICE=!(!IS_BROWSER||!WINDOW.document.documentElement)&&"ontouchstart"in WINDOW.document.documentElement,HAS_POINTER_EVENT=!!IS_BROWSER&&"PointerEvent"in WINDOW,NAMESPACE="viewer",ACTION_MOVE="move",ACTION_SWITCH="switch",ACTION_ZOOM="zoom",CLASS_ACTIVE="".concat(NAMESPACE,"-active"),CLASS_CLOSE="".concat(NAMESPACE,"-close"),CLASS_FADE="".concat(NAMESPACE,"-fade"),CLASS_FIXED="".concat(NAMESPACE,"-fixed"),CLASS_FULLSCREEN="".concat(NAMESPACE,"-fullscreen"),CLASS_FULLSCREEN_EXIT="".concat(NAMESPACE,"-fullscreen-exit"),CLASS_HIDE="".concat(NAMESPACE,"-hide"),CLASS_HIDE_MD_DOWN="".concat(NAMESPACE,"-hide-md-down"),CLASS_HIDE_SM_DOWN="".concat(NAMESPACE,"-hide-sm-down"),CLASS_HIDE_XS_DOWN="".concat(NAMESPACE,"-hide-xs-down"),CLASS_IN="".concat(NAMESPACE,"-in"),CLASS_INVISIBLE="".concat(NAMESPACE,"-invisible"),CLASS_LOADING="".concat(NAMESPACE,"-loading"),CLASS_MOVE="".concat(NAMESPACE,"-move"),CLASS_OPEN="".concat(NAMESPACE,"-open"),CLASS_SHOW="".concat(NAMESPACE,"-show"),CLASS_TRANSITION="".concat(NAMESPACE,"-transition"),EVENT_CLICK="click",EVENT_DBLCLICK="dblclick",EVENT_DRAG_START="dragstart",EVENT_FOCUSIN="focusin",EVENT_KEY_DOWN="keydown",EVENT_LOAD="load",EVENT_ERROR="error",EVENT_TOUCH_END=IS_TOUCH_DEVICE?"touchend touchcancel":"mouseup",EVENT_TOUCH_MOVE=IS_TOUCH_DEVICE?"touchmove":"mousemove",EVENT_TOUCH_START=IS_TOUCH_DEVICE?"touchstart":"mousedown",EVENT_POINTER_DOWN=HAS_POINTER_EVENT?"pointerdown":EVENT_TOUCH_START,EVENT_POINTER_MOVE=HAS_POINTER_EVENT?"pointermove":EVENT_TOUCH_MOVE,EVENT_POINTER_UP=HAS_POINTER_EVENT?"pointerup pointercancel":EVENT_TOUCH_END,EVENT_RESIZE="resize",EVENT_TRANSITION_END="transitionend",EVENT_WHEEL="wheel",EVENT_READY="ready",EVENT_SHOW="show",EVENT_SHOWN="shown",EVENT_HIDE="hide",EVENT_HIDDEN="hidden",EVENT_VIEW="view",EVENT_VIEWED="viewed",EVENT_MOVE="move",EVENT_MOVED="moved",EVENT_ROTATE="rotate",EVENT_ROTATED="rotated",EVENT_SCALE="scale",EVENT_SCALED="scaled",EVENT_ZOOM="zoom",EVENT_ZOOMED="zoomed",EVENT_PLAY="play",EVENT_STOP="stop",DATA_ACTION="".concat(NAMESPACE,"Action"),REGEXP_SPACES=/\s\s*/,BUTTONS=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function isString(e){return"string"==typeof e}var isNaN$1=Number.isNaN||WINDOW.isNaN;function isNumber(e){return"number"==typeof e&&!isNaN$1(e)}function isUndefined(e){return void 0===e}function isObject(e){return"object"===_typeof(e)&&null!==e}var hasOwnProperty=Object.prototype.hasOwnProperty;function isPlainObject(e){if(!isObject(e))return!1;try{var t=e.constructor,o=t.prototype;return t&&o&&hasOwnProperty.call(o,"isPrototypeOf")}catch(n){return!1}}function isFunction(e){return"function"==typeof e}function forEach(e,t){if(e&&isFunction(t))if(Array.isArray(e)||isNumber(e.length)){var o,n=e.length;for(o=0;o1?t-1:0),n=1;n0&&o.forEach((function(t){isObject(t)&&Object.keys(t).forEach((function(o){e[o]=t[o]}))})),e},REGEXP_SUFFIX=/^(?:width|height|left|top|marginLeft|marginTop)$/;function setStyle(e,t){var o=e.style;forEach(t,(function(e,t){REGEXP_SUFFIX.test(t)&&isNumber(e)&&(e+="px"),o[t]=e}))}function escapeHTMLEntities(e){return isString(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"):e}function hasClass(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)}function addClass(e,t){if(e&&t)if(isNumber(e.length))forEach(e,(function(e){addClass(e,t)}));else if(e.classList)e.classList.add(t);else{var o=e.className.trim();o?o.indexOf(t)<0&&(e.className="".concat(o," ").concat(t)):e.className=t}}function removeClass(e,t){e&&t&&(isNumber(e.length)?forEach(e,(function(e){removeClass(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function toggleClass(e,t,o){t&&(isNumber(e.length)?forEach(e,(function(e){toggleClass(e,t,o)})):o?addClass(e,t):removeClass(e,t))}var REGEXP_HYPHENATE=/([a-z\d])([A-Z])/g;function hyphenate(e){return e.replace(REGEXP_HYPHENATE,"$1-$2").toLowerCase()}function getData(e,t){return isObject(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(hyphenate(t)))}function setData(e,t,o){isObject(o)?e[t]=o:e.dataset?e.dataset[t]=o:e.setAttribute("data-".concat(hyphenate(t)),o)}var onceSupported=function(){var e=!1;if(IS_BROWSER){var t=!1,o=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});WINDOW.addEventListener("test",o,n),WINDOW.removeEventListener("test",o,n)}return e}();function removeListener(e,t,o){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=o;t.trim().split(REGEXP_SPACES).forEach((function(t){if(!onceSupported){var l=e.listeners;l&&l[t]&&l[t][o]&&(i=l[t][o],delete l[t][o],0===Object.keys(l[t]).length&&delete l[t],0===Object.keys(l).length&&delete e.listeners)}e.removeEventListener(t,i,n)}))}function addListener(e,t,o){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=o;t.trim().split(REGEXP_SPACES).forEach((function(t){if(n.once&&!onceSupported){var l=e.listeners,a=void 0===l?{}:l;i=function(){delete a[t][o],e.removeEventListener(t,i,n);for(var l=arguments.length,r=new Array(l),s=0;sr?c=r/l:u=s*l,a=isNumber(a)?a:.9,u=Math.min(u*a,t),c=Math.min(c*a,i);var m=(r-u)/2,p=(s-c)/2,f={left:m,top:p,x:m,y:p,width:u,height:c,oldRatio:1,ratio:u/t,aspectRatio:l,naturalWidth:t,naturalHeight:i},h=assign({},f);n.rotatable&&(f.rotate=d.rotate||0,h.rotate=0),n.scalable&&(f.scaleX=d.scaleX||1,f.scaleY=d.scaleY||1,h.scaleX=1,h.scaleY=1),o.imageData=f,o.initialImageData=h,e&&e()}))},renderImage:function(e){var t=this,o=this.image,n=this.imageData;if(setStyle(o,assign({width:n.width,height:n.height,marginLeft:n.x,marginTop:n.y},getTransforms(n))),e)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&hasClass(o,CLASS_TRANSITION)){var i=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){removeListener(o,EVENT_TRANSITION_END,i)}},addListener(o,EVENT_TRANSITION_END,i,{once:!0})}else e()},resetImage:function(){var e=this.image;e&&(this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null,this.title.innerHTML="")}},events={bind:function(){var e=this.options,t=this.viewer,o=this.canvas,n=this.element.ownerDocument;addListener(t,EVENT_CLICK,this.onClick=this.click.bind(this)),addListener(t,EVENT_DRAG_START,this.onDragStart=this.dragstart.bind(this)),addListener(o,EVENT_POINTER_DOWN,this.onPointerDown=this.pointerdown.bind(this)),addListener(n,EVENT_POINTER_MOVE,this.onPointerMove=this.pointermove.bind(this)),addListener(n,EVENT_POINTER_UP,this.onPointerUp=this.pointerup.bind(this)),addListener(n,EVENT_KEY_DOWN,this.onKeyDown=this.keydown.bind(this)),addListener(window,EVENT_RESIZE,this.onResize=this.resize.bind(this)),e.zoomable&&e.zoomOnWheel&&addListener(t,EVENT_WHEEL,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleOnDblclick&&addListener(o,EVENT_DBLCLICK,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,o=this.canvas,n=this.element.ownerDocument;removeListener(t,EVENT_CLICK,this.onClick),removeListener(t,EVENT_DRAG_START,this.onDragStart),removeListener(o,EVENT_POINTER_DOWN,this.onPointerDown),removeListener(n,EVENT_POINTER_MOVE,this.onPointerMove),removeListener(n,EVENT_POINTER_UP,this.onPointerUp),removeListener(n,EVENT_KEY_DOWN,this.onKeyDown),removeListener(window,EVENT_RESIZE,this.onResize),e.zoomable&&e.zoomOnWheel&&removeListener(t,EVENT_WHEEL,this.onWheel,{passive:!1,capture:!0}),e.toggleOnDblclick&&removeListener(o,EVENT_DBLCLICK,this.onDblclick)}},handlers={click:function(e){var t=this.options,o=this.imageData,n=e.target,i=getData(n,DATA_ACTION);switch(i||"img"!==n.localName||"li"!==n.parentElement.localName||(i=getData(n=n.parentElement,DATA_ACTION)),IS_TOUCH_DEVICE&&e.isTrusted&&n===this.canvas&&clearTimeout(this.clickCanvasTimeout),i){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(getData(n,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-o.scaleX||-1);break;case"flip-vertical":this.scaleY(-o.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(IS_TOUCH_DEVICE&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(e.isTrusted?e:e.detail&&e.detail.originalEvent))},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,o=this.options,n=this.image,i=this.index,l=this.viewerData;removeClass(n,CLASS_INVISIBLE),o.loading&&removeClass(this.canvas,CLASS_LOADING),n.style.cssText="height:0;"+"margin-left:".concat(l.width/2,"px;")+"margin-top:".concat(l.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage((function(){toggleClass(n,CLASS_MOVE,o.movable),toggleClass(n,CLASS_TRANSITION,o.transition),e.renderImage((function(){e.viewed=!0,e.viewing=!1,isFunction(o.viewed)&&addListener(t,EVENT_VIEWED,o.viewed,{once:!0}),dispatchEvent(t,EVENT_VIEWED,{originalImage:e.images[i],index:i,image:n},{cancelable:!1})}))}))},loadImage:function(e){var t=e.target,o=t.parentNode,n=o.offsetWidth||30,i=o.offsetHeight||50,l=!!getData(t,"filled");getImageNaturalSizes(t,this.options,(function(e,o){var a=e/o,r=n,s=i;i*a>n?l?r=i*a:s=n/a:l?s=n/a:r=i*a,setStyle(t,assign({width:r,height:s},getTransforms({translateX:(n-r)/2,translateY:(i-s)/2})))}))},keydown:function(e){var t=this.options;if(t.keyboard){var o=e.keyCode||e.which||e.charCode;if(13===o)this.viewer.contains(e.target)&&this.click(e);if(this.fulled)switch(o){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},pointerdown:function(e){var t=this.options,o=this.pointers,n=e.buttons,i=e.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(isNumber(n)&&1!==n||isNumber(i)&&0!==i||e.ctrlKey))){e.preventDefault(),e.changedTouches?forEach(e.changedTouches,(function(e){o[e.identifier]=getPointer(e)})):o[e.pointerId||0]=getPointer(e);var l=!!t.movable&&ACTION_MOVE;t.zoomOnTouch&&t.zoomable&&Object.keys(o).length>1?l=ACTION_ZOOM:t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(l=ACTION_SWITCH),!t.transition||l!==ACTION_MOVE&&l!==ACTION_ZOOM||removeClass(this.image,CLASS_TRANSITION),this.action=l}},pointermove:function(e){var t=this.pointers,o=this.action;this.viewed&&o&&(e.preventDefault(),e.changedTouches?forEach(e.changedTouches,(function(e){assign(t[e.identifier]||{},getPointer(e,!0))})):assign(t[e.pointerId||0]||{},getPointer(e,!0)),this.change(e))},pointerup:function(e){var t,o=this,n=this.options,i=this.action,l=this.pointers;e.changedTouches?forEach(e.changedTouches,(function(e){t=l[e.identifier],delete l[e.identifier]})):(t=l[e.pointerId||0],delete l[e.pointerId||0]),i&&(e.preventDefault(),!n.transition||i!==ACTION_MOVE&&i!==ACTION_ZOOM||addClass(this.image,CLASS_TRANSITION),this.action=!1,IS_TOUCH_DEVICE&&i!==ACTION_ZOOM&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),n.toggleOnDblclick&&this.viewed&&e.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout((function(){dispatchEvent(o.image,EVENT_DBLCLICK,{originalEvent:e})}),50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout((function(){o.imageClicked=!1}),500)):(this.imageClicked=!1,n.backdrop&&"static"!==n.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout((function(){dispatchEvent(o.canvas,EVENT_CLICK,{originalEvent:e})}),50)))))},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage()})),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();forEach(this.player.getElementsByTagName("img"),(function(t){addListener(t,EVENT_LOAD,e.loadImage.bind(e),{once:!0}),dispatchEvent(t,EVENT_LOAD)}))}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50);var o=Number(this.options.zoomRatio)||.1,n=1;e.deltaY?n=e.deltaY>0?1:-1:e.wheelDelta?n=-e.wheelDelta/120:e.detail&&(n=e.detail>0?1:-1),this.zoom(-n*o,!0,null,e)}}},methods={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,o=this.options;if(o.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(isFunction(o.show)&&addListener(t,EVENT_SHOW,o.show,{once:!0}),!1===dispatchEvent(t,EVENT_SHOW)||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var n=this.viewer;if(removeClass(n,CLASS_HIDE),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("aria-hidden"),o.transition&&!e){var i=this.shown.bind(this);this.transitioning={abort:function(){removeListener(n,EVENT_TRANSITION_END,i),removeClass(n,CLASS_IN)}},addClass(n,CLASS_TRANSITION),n.initialOffsetWidth=n.offsetWidth,addListener(n,EVENT_TRANSITION_END,i,{once:!0}),addClass(n,CLASS_IN)}else addClass(n,CLASS_IN),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=this.element,n=this.options;if(n.inline||this.hiding||!this.isShown&&!this.showing)return this;if(isFunction(n.hide)&&addListener(o,EVENT_HIDE,n.hide,{once:!0}),!1===dispatchEvent(o,EVENT_HIDE))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var i=this.viewer,l=this.image,a=function(){removeClass(i,CLASS_IN),e.hidden()};if(n.transition&&!t){var r=function(t){t&&t.target===i&&(removeListener(i,EVENT_TRANSITION_END,r),e.hidden())},s=function(){hasClass(i,CLASS_TRANSITION)?(addListener(i,EVENT_TRANSITION_END,r),removeClass(i,CLASS_IN)):a()};this.transitioning={abort:function(){e.viewed&&hasClass(l,CLASS_TRANSITION)?removeListener(l,EVENT_TRANSITION_END,s):hasClass(i,CLASS_TRANSITION)&&removeListener(i,EVENT_TRANSITION_END,r)}},this.viewed&&hasClass(l,CLASS_TRANSITION)?(addListener(l,EVENT_TRANSITION_END,s,{once:!0}),this.zoomTo(0,!1,null,null,!0)):s()}else a();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var o=this.element,n=this.options,i=this.title,l=this.canvas,a=this.items[t],r=a.querySelector("img"),s=getData(r,"originalUrl"),d=r.getAttribute("alt"),u=document.createElement("img");if(forEach(n.inheritedAttributes,(function(e){var t=r.getAttribute(e);null!==t&&u.setAttribute(e,t)})),u.src=s,u.alt=d,isFunction(n.view)&&addListener(o,EVENT_VIEW,n.view,{once:!0}),!1===dispatchEvent(o,EVENT_VIEW,{originalImage:this.images[t],index:t,image:u})||!this.isShown||this.hiding||this.played)return this;var c=this.items[this.index];c&&(removeClass(c,CLASS_ACTIVE),c.removeAttribute("aria-selected")),addClass(a,CLASS_ACTIVE),a.setAttribute("aria-selected",!0),n.focus&&a.focus(),this.image=u,this.viewed=!1,this.index=t,this.imageData={},addClass(u,CLASS_INVISIBLE),n.loading&&addClass(l,CLASS_LOADING),l.innerHTML="",l.appendChild(u),this.renderList(),i.innerHTML="";var m,p,f=function(){var t=e.imageData,o=Array.isArray(n.title)?n.title[1]:n.title;i.innerHTML=escapeHTMLEntities(isFunction(o)?o.call(e,u,t):"".concat(d," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")"))};return addListener(o,EVENT_VIEWED,f,{once:!0}),this.viewing={abort:function(){removeListener(o,EVENT_VIEWED,f),u.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(u.src="",removeListener(u,EVENT_LOAD,m),e.timeout&&clearTimeout(e.timeout))}},u.complete?this.load():(addListener(u,EVENT_LOAD,m=function(){removeListener(u,EVENT_ERROR,p),e.load()},{once:!0}),addListener(u,EVENT_ERROR,p=function(){removeListener(u,EVENT_LOAD,m),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),removeClass(u,CLASS_INVISIBLE),n.loading&&removeClass(e.canvas,CLASS_LOADING)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout((function(){removeClass(u,CLASS_INVISIBLE),e.timeout=!1}),1e3)),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,o=this.index+1;return o>t&&(o=e?0:t),this.view(o),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=this.imageData;return this.moveTo(isUndefined(e)?e:o.x+Number(e),isUndefined(t)?t:o.y+Number(t)),this},moveTo:function(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.element,l=this.options,a=this.imageData;if(e=Number(e),o=Number(o),this.viewed&&!this.played&&l.movable){var r=a.x,s=a.y,d=!1;if(isNumber(e)?d=!0:e=r,isNumber(o)?d=!0:o=s,d){if(isFunction(l.move)&&addListener(i,EVENT_MOVE,l.move,{once:!0}),!1===dispatchEvent(i,EVENT_MOVE,{x:e,y:o,oldX:r,oldY:s,originalEvent:n}))return this;a.x=e,a.y=o,a.left=e,a.top=o,this.moving=!0,this.renderImage((function(){t.moving=!1,isFunction(l.moved)&&addListener(i,EVENT_MOVED,l.moved,{once:!0}),dispatchEvent(i,EVENT_MOVED,{x:e,y:o,oldX:r,oldY:s,originalEvent:n},{cancelable:!1})}))}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,o=this.element,n=this.options,i=this.imageData;if(isNumber(e=Number(e))&&this.viewed&&!this.played&&n.rotatable){var l=i.rotate;if(isFunction(n.rotate)&&addListener(o,EVENT_ROTATE,n.rotate,{once:!0}),!1===dispatchEvent(o,EVENT_ROTATE,{degree:e,oldDegree:l}))return this;i.rotate=e,this.rotating=!0,this.renderImage((function(){t.rotating=!1,isFunction(n.rotated)&&addListener(o,EVENT_ROTATED,n.rotated,{once:!0}),dispatchEvent(o,EVENT_ROTATED,{degree:e,oldDegree:l},{cancelable:!1})}))}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.element,i=this.options,l=this.imageData;if(e=Number(e),o=Number(o),this.viewed&&!this.played&&i.scalable){var a=l.scaleX,r=l.scaleY,s=!1;if(isNumber(e)?s=!0:e=a,isNumber(o)?s=!0:o=r,s){if(isFunction(i.scale)&&addListener(n,EVENT_SCALE,i.scale,{once:!0}),!1===dispatchEvent(n,EVENT_SCALE,{scaleX:e,scaleY:o,oldScaleX:a,oldScaleY:r}))return this;l.scaleX=e,l.scaleY=o,this.scaling=!0,this.renderImage((function(){t.scaling=!1,isFunction(i.scaled)&&addListener(n,EVENT_SCALED,i.scaled,{once:!0}),dispatchEvent(n,EVENT_SCALED,{scaleX:e,scaleY:o,oldScaleX:a,oldScaleY:r},{cancelable:!1})}))}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(i.width*e/i.naturalWidth,t,o,n),this},zoomTo:function(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=this.element,r=this.options,s=this.pointers,d=this.imageData,u=d.x,c=d.y,m=d.width,p=d.height,f=d.naturalWidth,h=d.naturalHeight;if(isNumber(e=Math.max(0,e))&&this.viewed&&!this.played&&(l||r.zoomable)){if(!l){var v=Math.max(.01,r.minZoomRatio),g=Math.min(100,r.maxZoomRatio);e=Math.min(Math.max(e,v),g)}if(i)switch(i.type){case"wheel":r.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);break;case"pointermove":case"touchmove":case"mousemove":e>.99&&e<1.01&&(e=1)}var y=f*e,b=h*e,k=y-m,w=b-p,C=d.ratio;if(isFunction(r.zoom)&&addListener(a,EVENT_ZOOM,r.zoom,{once:!0}),!1===dispatchEvent(a,EVENT_ZOOM,{ratio:e,oldRatio:C,originalEvent:i}))return this;if(this.zooming=!0,i){var _=getOffset(this.viewer),x=s&&Object.keys(s).length>0?getPointersCenter(s):{pageX:i.pageX,pageY:i.pageY};d.x-=k*((x.pageX-_.left-u)/m),d.y-=w*((x.pageY-_.top-c)/p)}else isPlainObject(n)&&isNumber(n.x)&&isNumber(n.y)?(d.x-=k*((n.x-u)/m),d.y-=w*((n.y-c)/p)):(d.x-=k/2,d.y-=w/2);d.left=d.x,d.top=d.y,d.width=y,d.height=b,d.oldRatio=C,d.ratio=e,this.renderImage((function(){t.zooming=!1,isFunction(r.zoomed)&&addListener(a,EVENT_ZOOMED,r.zoomed,{once:!0}),dispatchEvent(a,EVENT_ZOOMED,{ratio:e,oldRatio:C,originalEvent:i},{cancelable:!1})})),o&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var o=this.element,n=this.options;if(isFunction(n.play)&&addListener(o,EVENT_PLAY,n.play,{once:!0}),!1===dispatchEvent(o,EVENT_PLAY))return this;var i=this.player,l=this.loadImage.bind(this),a=[],r=0,s=0;if(this.played=!0,this.onLoadWhenPlay=l,t&&this.requestFullscreen(t),addClass(i,CLASS_SHOW),forEach(this.items,(function(e,t){var o=e.querySelector("img"),d=document.createElement("img");d.src=getData(o,"originalUrl"),d.alt=o.getAttribute("alt"),d.referrerPolicy=o.referrerPolicy,r+=1,addClass(d,CLASS_FADE),toggleClass(d,CLASS_TRANSITION,n.transition),hasClass(e,CLASS_ACTIVE)&&(addClass(d,CLASS_IN),s=t),a.push(d),addListener(d,EVENT_LOAD,l,{once:!0}),i.appendChild(d)})),isNumber(n.interval)&&n.interval>0){var d=function(){clearTimeout(e.playing.timeout),removeClass(a[s],CLASS_IN),addClass(a[s=(s-=1)>=0?s:r-1],CLASS_IN),e.playing.timeout=setTimeout(d,n.interval)},u=function(){clearTimeout(e.playing.timeout),removeClass(a[s],CLASS_IN),addClass(a[s=(s+=1)1&&(this.playing={prev:d,next:u,timeout:setTimeout(u,n.interval)})}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,o=this.options;if(isFunction(o.stop)&&addListener(t,EVENT_STOP,o.stop,{once:!0}),!1===dispatchEvent(t,EVENT_STOP))return this;var n=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,forEach(n.getElementsByTagName("img"),(function(t){removeListener(t,EVENT_LOAD,e.onLoadWhenPlay)})),removeClass(n,CLASS_SHOW),n.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,o=this.viewer,n=this.image,i=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),addClass(this.button,CLASS_FULLSCREEN_EXIT),t.transition&&(removeClass(i,CLASS_TRANSITION),this.viewed&&removeClass(n,CLASS_TRANSITION)),addClass(o,CLASS_FIXED),o.setAttribute("role","dialog"),o.setAttribute("aria-labelledby",this.title.id),o.setAttribute("aria-modal",!0),o.removeAttribute("style"),setStyle(o,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=assign({},this.containerData),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage((function(){t.transition&&setTimeout((function(){addClass(n,CLASS_TRANSITION),addClass(i,CLASS_TRANSITION)}),0)}))}))),this},exit:function(){var e=this,t=this.options,o=this.viewer,n=this.image,i=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),removeClass(this.button,CLASS_FULLSCREEN_EXIT),t.transition&&(removeClass(i,CLASS_TRANSITION),this.viewed&&removeClass(n,CLASS_TRANSITION)),t.focus&&this.clearEnforceFocus(),o.removeAttribute("role"),o.removeAttribute("aria-labelledby"),o.removeAttribute("aria-modal"),removeClass(o,CLASS_FIXED),setStyle(o,{zIndex:t.zIndexInline}),this.viewerData=assign({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage((function(){t.transition&&setTimeout((function(){addClass(n,CLASS_TRANSITION),addClass(i,CLASS_TRANSITION)}),0)}))})),this):this},tooltip:function(){var e=this,t=this.options,o=this.tooltipBox,n=this.imageData;return this.viewed&&!this.played&&t.tooltip?(o.textContent="".concat(Math.round(100*n.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&dispatchEvent(o,EVENT_TRANSITION_END),addClass(o,CLASS_SHOW),addClass(o,CLASS_FADE),addClass(o,CLASS_TRANSITION),o.removeAttribute("aria-hidden"),o.initialOffsetWidth=o.offsetWidth,addClass(o,CLASS_IN)):(addClass(o,CLASS_SHOW),o.removeAttribute("aria-hidden")),this.tooltipping=setTimeout((function(){t.transition?(addListener(o,EVENT_TRANSITION_END,(function(){removeClass(o,CLASS_SHOW),removeClass(o,CLASS_FADE),removeClass(o,CLASS_TRANSITION),o.setAttribute("aria-hidden",!0),e.fading=!1}),{once:!0}),removeClass(o,CLASS_IN),e.fading=!0):(removeClass(o,CLASS_SHOW),o.setAttribute("aria-hidden",!0)),e.tooltipping=!1}),1e3),this):this},toggle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,null,e):this.zoomTo(1,!0,null,e),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=assign({},this.initialImageData),this.renderImage()),this},update:function(){var e=this,t=this.element,o=this.options,n=this.isImg;if(n&&!t.parentNode)return this.destroy();var i=[];if(forEach(n?[t]:t.querySelectorAll("img"),(function(t){isFunction(o.filter)?o.filter.call(e,t)&&i.push(t):e.getImageURL(t)&&i.push(t)})),!i.length)return this;if(this.images=i,this.length=i.length,this.ready){var l=[];if(forEach(this.items,(function(e,t){var o=e.querySelector("img"),n=i[t];n&&o&&n.src===o.src&&n.alt===o.alt||l.push(t)})),setStyle(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var a=l.indexOf(this.index);if(a>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-a,this.length-1),0));else{var r=this.items[this.index];addClass(r,CLASS_ACTIVE),r.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e[NAMESPACE]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||removeListener(e,EVENT_CLICK,this.onStart),e[NAMESPACE]=void 0,this):this}},others={getImageURL:function(e){var t=this.options.url;return t=isString(t)?e.getAttribute(t):isFunction(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),addListener(document,EVENT_FOCUSIN,this.onFocusin=function(t){var o=e.viewer,n=t.target;if(n!==document&&n!==o&&!o.contains(n)){for(;n;){if(null!==n.getAttribute("tabindex")||"true"===n.getAttribute("aria-modal"))return;n=n.parentElement}o.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(removeListener(document,EVENT_FOCUSIN,this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;addClass(e,CLASS_OPEN),this.scrollbarWidth>0&&(e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var e=this.body;removeClass(e,CLASS_OPEN),this.scrollbarWidth>0&&(e.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var e=this.element,t=this.options,o=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(o.focus(),this.enforceFocus()),isFunction(t.shown)&&addListener(e,EVENT_SHOWN,t.shown,{once:!0}),!1!==dispatchEvent(e,EVENT_SHOWN)&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options,o=this.viewer;t.fucus&&this.clearEnforceFocus(),this.close(),this.unbind(),addClass(o,CLASS_HIDE),o.removeAttribute("role"),o.removeAttribute("aria-labelledby"),o.removeAttribute("aria-modal"),o.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(isFunction(t.hidden)&&addListener(e,EVENT_HIDDEN,t.hidden,{once:!0}),dispatchEvent(e,EVENT_HIDDEN,null,{cancelable:!1}))},requestFullscreen:function(e){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var o=t.documentElement;o.requestFullscreen?isPlainObject(e)?o.requestFullscreen(e):o.requestFullscreen():o.webkitRequestFullscreen?o.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):o.mozRequestFullScreen?o.mozRequestFullScreen():o.msRequestFullscreen&&o.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,o=this.pointers,n=o[Object.keys(o)[0]];if(n){var i=n.endX-n.startX,l=n.endY-n.startY;switch(this.action){case ACTION_MOVE:0===i&&0===l||(this.pointerMoved=!0,this.move(i,l,e));break;case ACTION_ZOOM:this.zoom(getMaxZoomRatio(o),!1,null,e);break;case ACTION_SWITCH:this.action="switched";var a=Math.abs(i);a>1&&a>Math.abs(l)&&(this.pointers={},i>1?this.prev(t.loop):i<-1&&this.next(t.loop))}forEach(o,(function(e){e.startX=e.endX,e.startY=e.endY}))}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},AnotherViewer=WINDOW.Viewer,getUniqueID=(id=-1,function(){return id+=1}),id,Viewer$1=function(){function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_classCallCheck(this,e),!t||1!==t.nodeType)throw new Error("The first argument is required and must be an element.");this.element=t,this.options=assign({},DEFAULTS,isPlainObject(o)&&o),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=getUniqueID(),this.init()}return _createClass(e,[{key:"init",value:function(){var e=this,t=this.element,o=this.options;if(!t[NAMESPACE]){t[NAMESPACE]=this,o.focus&&!o.keyboard&&(o.focus=!1);var n="img"===t.localName,i=[];if(forEach(n?[t]:t.querySelectorAll("img"),(function(t){isFunction(o.filter)?o.filter.call(e,t)&&i.push(t):e.getImageURL(t)&&i.push(t)})),this.isImg=n,this.length=i.length,this.images=i,this.initBody(),isUndefined(document.createElement(NAMESPACE).style.transition)&&(o.transition=!1),o.inline){var l=0,a=function(){var t;(l+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout((function(){e.delaying=!1,e.build()}),0))};this.initializing={abort:function(){forEach(i,(function(e){e.complete||(removeListener(e,EVENT_LOAD,a),removeListener(e,EVENT_ERROR,a))}))}},forEach(i,(function(e){var t,o;e.complete?a():(addListener(e,EVENT_LOAD,t=function(){removeListener(e,EVENT_ERROR,o),a()},{once:!0}),addListener(e,EVENT_ERROR,o=function(){removeListener(e,EVENT_LOAD,t),a()},{once:!0}))}))}else addListener(t,EVENT_CLICK,this.onStart=function(t){var n=t.target;"img"!==n.localName||isFunction(o.filter)&&!o.filter.call(e,n)||e.view(e.images.indexOf(n))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,o=e.parentNode,n=document.createElement("div");n.innerHTML=TEMPLATE;var i=n.querySelector(".".concat(NAMESPACE,"-container")),l=i.querySelector(".".concat(NAMESPACE,"-title")),a=i.querySelector(".".concat(NAMESPACE,"-toolbar")),r=i.querySelector(".".concat(NAMESPACE,"-navbar")),s=i.querySelector(".".concat(NAMESPACE,"-button")),d=i.querySelector(".".concat(NAMESPACE,"-canvas"));if(this.parent=o,this.viewer=i,this.title=l,this.toolbar=a,this.navbar=r,this.button=s,this.canvas=d,this.footer=i.querySelector(".".concat(NAMESPACE,"-footer")),this.tooltipBox=i.querySelector(".".concat(NAMESPACE,"-tooltip")),this.player=i.querySelector(".".concat(NAMESPACE,"-player")),this.list=i.querySelector(".".concat(NAMESPACE,"-list")),i.id="".concat(NAMESPACE).concat(this.id),l.id="".concat(NAMESPACE,"Title").concat(this.id),addClass(l,t.title?getResponsiveClass(Array.isArray(t.title)?t.title[0]:t.title):CLASS_HIDE),addClass(r,t.navbar?getResponsiveClass(t.navbar):CLASS_HIDE),toggleClass(s,CLASS_HIDE,!t.button),t.keyboard&&s.setAttribute("tabindex",0),t.backdrop&&(addClass(i,"".concat(NAMESPACE,"-backdrop")),t.inline||"static"===t.backdrop||setData(d,DATA_ACTION,"hide")),isString(t.className)&&t.className&&t.className.split(REGEXP_SPACES).forEach((function(e){addClass(i,e)})),t.toolbar){var u=document.createElement("ul"),c=isPlainObject(t.toolbar),m=BUTTONS.slice(0,3),p=BUTTONS.slice(7,9),f=BUTTONS.slice(9);c||addClass(a,getResponsiveClass(t.toolbar)),forEach(c?t.toolbar:BUTTONS,(function(e,o){var n=c&&isPlainObject(e),i=c?hyphenate(o):e,l=n&&!isUndefined(e.show)?e.show:e;if(l&&(t.zoomable||-1===m.indexOf(i))&&(t.rotatable||-1===p.indexOf(i))&&(t.scalable||-1===f.indexOf(i))){var a=n&&!isUndefined(e.size)?e.size:e,r=n&&!isUndefined(e.click)?e.click:e,s=document.createElement("li");t.keyboard&&s.setAttribute("tabindex",0),s.setAttribute("role","button"),addClass(s,"".concat(NAMESPACE,"-").concat(i)),isFunction(r)||setData(s,DATA_ACTION,i),isNumber(l)&&addClass(s,getResponsiveClass(l)),-1!==["small","large"].indexOf(a)?addClass(s,"".concat(NAMESPACE,"-").concat(a)):"play"===i&&addClass(s,"".concat(NAMESPACE,"-large")),isFunction(r)&&addListener(s,EVENT_CLICK,r),u.appendChild(s)}})),a.appendChild(u)}else addClass(a,CLASS_HIDE);if(!t.rotatable){var h=a.querySelectorAll('li[class*="rotate"]');addClass(h,CLASS_INVISIBLE),forEach(h,(function(e){a.appendChild(e)}))}if(t.inline)addClass(s,CLASS_FULLSCREEN),setStyle(i,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(o).position&&setStyle(o,{position:"relative"}),o.insertBefore(i,e.nextSibling);else{addClass(s,CLASS_CLOSE),addClass(i,CLASS_FIXED),addClass(i,CLASS_FADE),addClass(i,CLASS_HIDE),setStyle(i,{zIndex:t.zIndex});var v=t.container;isString(v)&&(v=e.ownerDocument.querySelector(v)),v||(v=this.body),v.appendChild(i)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,isFunction(t.ready)&&addListener(e,EVENT_READY,t.ready,{once:!0}),!1!==dispatchEvent(e,EVENT_READY)?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}],[{key:"noConflict",value:function(){return window.Viewer=AnotherViewer,e}},{key:"setDefaults",value:function(e){assign(DEFAULTS,isPlainObject(e)&&e)}}])}();assign(Viewer$1.prototype,render,events,handlers,methods,others);var __extends$3=globalThis&&globalThis.__extends||(extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),extendStatics,QiniuErrorName,QiniuErrorName2;QiniuErrorName2=QiniuErrorName||(QiniuErrorName={}),QiniuErrorName2.InvalidFile="InvalidFile",QiniuErrorName2.InvalidToken="InvalidToken",QiniuErrorName2.InvalidMetadata="InvalidMetadata",QiniuErrorName2.InvalidChunkSize="InvalidChunkSize",QiniuErrorName2.InvalidCustomVars="InvalidCustomVars",QiniuErrorName2.NotAvailableUploadHost="NotAvailableUploadHost",QiniuErrorName2.ReadCacheFailed="ReadCacheFailed",QiniuErrorName2.InvalidCacheData="InvalidCacheData",QiniuErrorName2.WriteCacheFailed="WriteCacheFailed",QiniuErrorName2.RemoveCacheFailed="RemoveCacheFailed",QiniuErrorName2.GetCanvasContextFailed="GetCanvasContextFailed",QiniuErrorName2.UnsupportedFileType="UnsupportedFileType",QiniuErrorName2.FileReaderReadFailed="FileReaderReadFailed",QiniuErrorName2.NotAvailableXMLHttpRequest="NotAvailableXMLHttpRequest",QiniuErrorName2.InvalidProgressEventTarget="InvalidProgressEventTarget",QiniuErrorName2.RequestError="RequestError";var QiniuError=function(e,t){this.name=e,this.message=t,this.stack=(new Error).stack},QiniuRequestError=function(e){function t(t,o,n,i){var l=e.call(this,QiniuErrorName.RequestError,n)||this;return l.code=t,l.reqId=o,l.isRequestError=!0,l.data=i,l}return __extends$3(t,e),t}(QiniuError),QiniuNetworkError=function(e){function t(t,o){return void 0===o&&(o=""),e.call(this,0,o,t)||this}return __extends$3(t,e),t}(QiniuRequestError),Pool=function(){function e(e,t){this.runTask=e,this.limit=t,this.aborted=!1,this.queue=[],this.processing=[]}return e.prototype.enqueue=function(e){var t=this;return new Promise((function(o,n){t.queue.push({task:e,resolve:o,reject:n}),t.check()}))},e.prototype.run=function(e){var t=this;this.queue=this.queue.filter((function(t){return t!==e})),this.processing.push(e),this.runTask(e.task).then((function(){t.processing=t.processing.filter((function(t){return t!==e})),e.resolve(),t.check()}),(function(t){return e.reject(t)}))},e.prototype.check=function(){var e=this;if(!this.aborted){var t=this.processing.length,o=this.limit-t;this.queue.slice(0,o).forEach((function(t){e.run(t)}))}},e.prototype.abort=function(){this.queue=[],this.aborted=!0},e}(),__extends$2=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),__assign$6=globalThis&&globalThis.__assign||function(){return __assign$6=Object.assign||function(e){for(var t,o=1,n=arguments.length;o127&&r<2048)s=String.fromCharCode(r>>6|192,63&r|128);else if((63488&r^55296)>0)s=String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128);else{if((64512&r^55296)>0)throw new RangeError("Unmatched trail surrogate at "+a);var d=i.charCodeAt(++a);if((64512&d^56320)>0)throw new RangeError("Unmatched lead surrogate at "+(a-1));r=((1023&r)<<10)+(1023&d)+65536,s=String.fromCharCode(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}null!==s&&(o>t&&(l+=i.slice(t,o)),l+=s,t=o=a+1)}return o>t&&(l+=i.slice(t,n)),l}function utf8Decode(e){var t=[],o=0,n=0,i=0;for(e+="";o>10&1023)),t.push(String.fromCharCode(56320|1023&n))):t.push(String.fromCharCode(n)),o+=i}return t.join("")}function base64Encode(e){var t,o,n,i,l,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=0,s=0,d="",u=[];if(!e)return e;e=utf8Encode(e+"");do{t=(l=e.charCodeAt(r++)<<16|e.charCodeAt(r++)<<8|e.charCodeAt(r++))>>18&63,o=l>>12&63,n=l>>6&63,i=63&l,u[s++]=a.charAt(t)+a.charAt(o)+a.charAt(n)+a.charAt(i)}while(r>16&255,o=a>>8&255,n=255&a,u[d++]=64===i?String.fromCharCode(t):64===l?String.fromCharCode(t,o):String.fromCharCode(t,o,n)}while(s>>25)+n|0)&n|~o&i)+t[1]-389564586|0)<<12|l>>>20)+o|0)&o|~l&n)+t[2]+606105819|0)<<17|i>>>15)+l|0)&l|~i&o)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n&i|~n&l)+t[4]-176418897|0)<<7|o>>>25)+n|0)&n|~o&i)+t[5]+1200080426|0)<<12|l>>>20)+o|0)&o|~l&n)+t[6]-1473231341|0)<<17|i>>>15)+l|0)&l|~i&o)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n&i|~n&l)+t[8]+1770035416|0)<<7|o>>>25)+n|0)&n|~o&i)+t[9]-1958414417|0)<<12|l>>>20)+o|0)&o|~l&n)+t[10]-42063|0)<<17|i>>>15)+l|0)&l|~i&o)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n&i|~n&l)+t[12]+1804603682|0)<<7|o>>>25)+n|0)&n|~o&i)+t[13]-40341101|0)<<12|l>>>20)+o|0)&o|~l&n)+t[14]-1502002290|0)<<17|i>>>15)+l|0)&l|~i&o)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n&l|i&~l)+t[1]-165796510|0)<<5|o>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|l>>>23)+o|0)&n|o&~n)+t[11]+643717713|0)<<14|i>>>18)+l|0)&o|l&~o)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n&l|i&~l)+t[5]-701558691|0)<<5|o>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|l>>>23)+o|0)&n|o&~n)+t[15]-660478335|0)<<14|i>>>18)+l|0)&o|l&~o)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n&l|i&~l)+t[9]+568446438|0)<<5|o>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|l>>>23)+o|0)&n|o&~n)+t[3]-187363961|0)<<14|i>>>18)+l|0)&o|l&~o)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n&l|i&~l)+t[13]-1444681467|0)<<5|o>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|l>>>23)+o|0)&n|o&~n)+t[7]+1735328473|0)<<14|i>>>18)+l|0)&o|l&~o)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n^i^l)+t[5]-378558|0)<<4|o>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|l>>>21)+o|0)^o^n)+t[11]+1839030562|0)<<16|i>>>16)+l|0)^l^o)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n^i^l)+t[1]-1530992060|0)<<4|o>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|l>>>21)+o|0)^o^n)+t[7]-155497632|0)<<16|i>>>16)+l|0)^l^o)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n^i^l)+t[13]+681279174|0)<<4|o>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|l>>>21)+o|0)^o^n)+t[3]-722521979|0)<<16|i>>>16)+l|0)^l^o)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((l=((l+=((o=((o+=(n^i^l)+t[9]-640364487|0)<<4|o>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|l>>>21)+o|0)^o^n)+t[15]+530742520|0)<<16|i>>>16)+l|0)^l^o)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((l=((l+=(n^((o=((o+=(i^(n|~l))+t[0]-198630844|0)<<6|o>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|l>>>22)+o|0)^((i=((i+=(o^(l|~n))+t[14]-1416354905|0)<<15|i>>>17)+l|0)|~o))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((l=((l+=(n^((o=((o+=(i^(n|~l))+t[12]+1700485571|0)<<6|o>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|l>>>22)+o|0)^((i=((i+=(o^(l|~n))+t[10]-1051523|0)<<15|i>>>17)+l|0)|~o))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((l=((l+=(n^((o=((o+=(i^(n|~l))+t[8]+1873313359|0)<<6|o>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|l>>>22)+o|0)^((i=((i+=(o^(l|~n))+t[6]-1560198380|0)<<15|i>>>17)+l|0)|~o))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((l=((l+=(n^((o=((o+=(i^(n|~l))+t[4]-145523070|0)<<6|o>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|l>>>22)+o|0)^((i=((i+=(o^(l|~n))+t[2]+718787259|0)<<15|i>>>17)+l|0)|~o))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=o+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=l+e[3]|0}function n(e){var t,o=[];for(t=0;t<64;t+=4)o[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return o}function i(e){var t,o=[];for(t=0;t<64;t+=4)o[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return o}function l(e){var t,i,l,a,r,s,d=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=d;t+=64)o(u,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(l[t>>2]|=128<<(t%4<<3),t>55)for(o(u,l),t=0;t<16;t+=1)l[t]=0;return a=(a=8*d).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(a[2],16),s=parseInt(a[1],16)||0,l[14]=r,l[15]=s,o(u,l),u}function a(e){var t,n,l,a,r,s,d=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=d;t+=64)o(u,i(e.subarray(t-64,t)));for(n=(e=t-64>2]|=e[t]<<(t%4<<3);if(l[t>>2]|=128<<(t%4<<3),t>55)for(o(u,l),t=0;t<16;t+=1)l[t]=0;return a=(a=8*d).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(a[2],16),s=parseInt(a[1],16)||0,l[14]=r,l[15]=s,o(u,l),u}function r(e){var o,n="";for(o=0;o<4;o+=1)n+=t[e>>8*o+4&15]+t[e>>8*o&15];return n}function s(e){var t;for(t=0;tu?new ArrayBuffer(0):(i=u-d,l=new ArrayBuffer(i),a=new Uint8Array(l),r=new Uint8Array(this,d,i),a.set(r),l)}}(),f.prototype.append=function(e){return this.appendBinary(d(e)),this},f.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)o(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},f.prototype.end=function(e){var t,o,n=this._buff,i=n.length,l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(l,i),o=s(this._hash),e&&(o=p(o)),this.reset(),o},f.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},f.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},f.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},f.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},f.prototype._finish=function(e,t){var n,i,l,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(o(this._hash,e),a=0;a<16;a+=1)e[a]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),l=parseInt(n[1],16)||0,e[14]=i,e[15]=l,o(this._hash,e)},f.hash=function(e,t){return f.hashBinary(d(e),t)},f.hashBinary=function(e,t){var o=s(l(e));return t?p(o):o},f.ArrayBuffer=function(){this.reset()},f.ArrayBuffer.prototype.append=function(e){var t,n=m(this._buff.buffer,e,!0),l=n.length;for(this._length+=e.byteLength,t=64;t<=l;t+=64)o(this._hash,i(n.subarray(t-64,t)));return this._buff=t-64>2]|=n[t]<<(t%4<<3);return this._finish(l,i),o=s(this._hash),e&&(o=p(o)),this.reset(),o},f.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},f.ArrayBuffer.prototype.getState=function(){var e=f.prototype.getState.call(this);return e.buff=c(e.buff),e},f.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),f.prototype.setState.call(this,e)},f.ArrayBuffer.prototype.destroy=f.prototype.destroy,f.ArrayBuffer.prototype._finish=f.prototype._finish,f.ArrayBuffer.hash=function(e,t){var o=s(a(new Uint8Array(e)));return t?p(o):o},f}()}(sparkMd5);var SparkMD5=sparkMd5.exports,__assign$5=globalThis&&globalThis.__assign||function(){return __assign$5=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0&&i[i.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]e.size)o=e.size;else for(;e.size>1e4*o;)o*=2;for(var n=[],i=Math.ceil(e.size/o),l=0;l3?t[1]:t[0];if(!o)throw new QiniuError(QiniuErrorName.InvalidToken,"missing assess key field.");var n=null;try{n=JSON.parse(urlSafeBase64Decode(t[t.length-1]))}catch(l){throw new QiniuError(QiniuErrorName.InvalidToken,"token parse failed.")}if(null==n)throw new QiniuError(QiniuErrorName.InvalidToken,"putPolicy is null.");if(null==n.scope)throw new QiniuError(QiniuErrorName.InvalidToken,"scope field is null.");var i=n.scope.split(":")[0];if(!i)throw new QiniuError(QiniuErrorName.InvalidToken,"resolve bucketName failed.");return{assessKey:o,bucketName:i,scope:n.scope}}var region={z0:"z0",z1:"z1",z2:"z2",na0:"na0",as0:"as0",cnEast2:"cn-east-2"},regionUphostMap=(_a={},_a[region.z0]={srcUphost:["up.qiniup.com"],cdnUphost:["upload.qiniup.com"]},_a[region.z1]={srcUphost:["up-z1.qiniup.com"],cdnUphost:["upload-z1.qiniup.com"]},_a[region.z2]={srcUphost:["up-z2.qiniup.com"],cdnUphost:["upload-z2.qiniup.com"]},_a[region.na0]={srcUphost:["up-na0.qiniup.com"],cdnUphost:["upload-na0.qiniup.com"]},_a[region.as0]={srcUphost:["up-as0.qiniup.com"],cdnUphost:["upload-as0.qiniup.com"]},_a[region.cnEast2]={srcUphost:["up-cn-east-2.qiniup.com"],cdnUphost:["upload-cn-east-2.qiniup.com"]},_a),stringifyPrimitive=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},encode=function(e,t,o,n){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(n){var i=encodeURIComponent(stringifyPrimitive(n))+o;return Array.isArray(e[n])?e[n].map((function(e){return i+encodeURIComponent(stringifyPrimitive(e))})).join(t):i+encodeURIComponent(stringifyPrimitive(e[n]))})).filter(Boolean).join(t):n?encodeURIComponent(stringifyPrimitive(n))+o+encodeURIComponent(stringifyPrimitive(e)):""},stringify;stringify=encode;var __assign$4=globalThis&&globalThis.__assign||function(){return __assign$4=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0&&i[i.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]0&&i[i.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]0)&&!(n=l.next()).done;)a.push(n.value)}catch(r){i={error:r}}finally{try{n&&!n.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return a},__spread$3=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t1e4*GB)return this.handleError(new QiniuError(QiniuErrorName.InvalidFile,"file size exceed maximum value 10000G")),[2];if(this.putExtra.customVars&&!isCustomVarsValid(this.putExtra.customVars))return this.handleError(new QiniuError(QiniuErrorName.InvalidCustomVars,"customVars key should start width x:")),[2];if(this.putExtra.metadata&&!isMetaDataValid(this.putExtra.metadata))return this.handleError(new QiniuError(QiniuErrorName.InvalidMetadata,"metadata key should start with x-qn-meta-")),[2];n.label=1;case 1:return n.trys.push([1,4,,5]),this.uploadAt=(new Date).getTime(),[4,this.checkAndUpdateUploadHost()];case 2:return n.sent(),[4,this.run()];case 3:return e=n.sent(),this.onComplete(e.data),this.checkAndUnfreezeHost(),this.sendLog(e.reqId,200),[2];case 4:return t=n.sent(),this.aborted?(this.logger.warn("upload is aborted."),this.sendLog("",-2),[2]):(this.clear(),this.logger.error(t),t instanceof QiniuRequestError&&(this.sendLog(t.reqId,t.code),this.checkAndFreezeHost(t),o=++this.retryCount<=this.config.retryCount,RETRY_CODE_LIST.includes(t.code)&&o)?(this.logger.warn("error auto retry: "+this.retryCount+"/"+this.config.retryCount+"."),this.putFile(),[2]):(this.onError(t),[3,5]));case 5:return[2]}}))}))},e.prototype.clear=function(){this.xhrList.forEach((function(e){e.onreadystatechange=null,e.abort()})),this.xhrList=[],this.logger.info("cleanup uploading xhr.")},e.prototype.stop=function(){this.logger.info("aborted."),this.clear(),this.aborted=!0},e.prototype.addXhr=function(e){this.xhrList.push(e)},e.prototype.sendLog=function(e,t){var o,n;this.logger.report({code:t,reqId:e,remoteIp:"",upType:"jssdk-h5",size:this.file.size,time:Math.floor(this.uploadAt/1e3),port:getPortFromUrl(null===(o=this.uploadHost)||void 0===o?void 0:o.getUrl()),host:getDomainFromUrl(null===(n=this.uploadHost)||void 0===n?void 0:n.getUrl()),bytesSent:this.progress?this.progress.total.loaded:0,duration:Math.floor(((new Date).getTime()-this.uploadAt)/1e3)})},e.prototype.getProgressInfoItem=function(e,t,o){return __assign$3({size:t,loaded:e,percent:e/t*100},null==o?{}:{fromCache:o})},e}(),__extends$1=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),__assign$2=globalThis&&globalThis.__assign||function(){return __assign$2=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0&&i[i.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]1024)throw new QiniuError(QiniuErrorName.InvalidChunkSize,"chunkSize maximum value is 1024");return[4,this.initBeforeUploadChunks()];case 1:a.sent(),e=new Pool((function(t){return __awaiter$3(l,void 0,void 0,(function(){return __generator$3(this,(function(o){switch(o.label){case 0:if(this.aborted)throw e.abort(),new Error("pool is aborted");return[4,this.uploadChunk(t)];case 1:return o.sent(),[2]}}))}))}),this.config.concurrentRequestLimit),t=null,o=this.getLocalKey(),n=this.chunks.map((function(t,o){return e.enqueue({chunk:t,index:o})})),a.label=2;case 2:return a.trys.push([2,5,,6]),[4,Promise.all(n)];case 3:return a.sent(),[4,this.mkFileReq()];case 4:return t=a.sent(),[3,6];case 5:throw(i=a.sent())instanceof QiniuRequestError&&(612===i.code||400===i.code)&&removeLocalFileInfo(o,this.logger),i;case 6:return removeLocalFileInfo(o,this.logger),[2,t]}}))}))},t.prototype.uploadChunk=function(e){return __awaiter$3(this,void 0,void 0,(function(){var t,o,n,i,l,a,r,s,d,u=this;return __generator$3(this,(function(c){switch(c.label){case 0:return t=e.index,o=e.chunk,n=this.cachedUploadedList[t],this.logger.info("upload part "+t+", cache:",n),i=this.config.checkByMD5,l=function(){u.usedCacheList[t]=!0,u.updateChunkProgress(o.size,t),u.uploadedList[t]=n,u.updateLocalCache()},n&&!i?(l(),[2]):[4,computeMd5(o)];case 1:return a=c.sent(),this.logger.info("computed part md5.",a),n&&a===n.md5?(l(),[2]):(this.usedCacheList[t]=!1,r=function(e){u.updateChunkProgress(e.loaded,t)},s={body:o,md5:this.config.checkByServer?a:void 0,onProgress:r,onCreate:function(e){return u.addXhr(e)}},this.logger.info("part "+t+" start uploading."),[4,uploadChunk(this.token,this.key,e.index+1,this.getUploadInfo(),s)]);case 2:return d=c.sent(),this.logger.info("part "+t+" upload completed."),r({loaded:o.size,total:o.size}),this.uploadedList[t]={etag:d.data.etag,md5:d.data.md5,size:o.size},this.updateLocalCache(),[2]}}))}))},t.prototype.mkFileReq=function(){return __awaiter$3(this,void 0,void 0,(function(){var e,t,o=this;return __generator$3(this,(function(n){switch(n.label){case 0:return e=__assign$2(__assign$2(__assign$2({parts:this.uploadedList.map((function(e,t){return{etag:e.etag,partNumber:t+1}})),fname:this.putExtra.fname},this.putExtra.mimeType&&{mimeType:this.putExtra.mimeType}),this.putExtra.customVars&&{customVars:this.putExtra.customVars}),this.putExtra.metadata&&{metadata:this.putExtra.metadata}),this.logger.info("parts upload completed, make file.",e),[4,uploadComplete(this.token,this.key,this.getUploadInfo(),{onCreate:function(e){return o.addXhr(e)},body:JSON.stringify(e)})];case 1:return t=n.sent(),this.logger.info("finish Resume Progress."),this.updateMkFileProgress(1),[2,t]}}))}))},t.prototype.initBeforeUploadChunks=function(){return __awaiter$3(this,void 0,void 0,(function(){var e,t,o;return __generator$3(this,(function(n){switch(n.label){case 0:return this.uploadedList=[],this.usedCacheList=[],(e=getLocalFileInfo(this.getLocalKey(),this.logger))?[3,2]:(this.logger.info("init upload parts from api."),[4,initUploadParts(this.token,this.bucketName,this.key,this.uploadHost.getUrl())]);case 1:return t=n.sent(),this.logger.info("initd upload parts of id: "+t.data.uploadId+"."),this.uploadId=t.data.uploadId,this.cachedUploadedList=[],[3,3];case 2:o=["resume upload parts from local cache,","total "+e.data.length+" part,","id is "+e.id+"."],this.logger.info(o.join(" ")),this.cachedUploadedList=e.data,this.uploadId=e.id,n.label=3;case 3:return this.chunks=getChunks(this.file,this.config.chunkSize),this.loaded={mkFileProgress:0,chunks:this.chunks.map((function(e){return 0}))},this.notifyResumeProgress(),[2]}}))}))},t.prototype.getUploadInfo=function(){return{id:this.uploadId,url:this.uploadHost.getUrl()}},t.prototype.getLocalKey=function(){return createLocalKey(this.file.name,this.key,this.file.size)},t.prototype.updateLocalCache=function(){setLocalFileInfo(this.getLocalKey(),{id:this.uploadId,data:this.uploadedList},this.logger)},t.prototype.updateChunkProgress=function(e,t){this.loaded.chunks[t]=e,this.notifyResumeProgress()},t.prototype.updateMkFileProgress=function(e){this.loaded.mkFileProgress=e,this.notifyResumeProgress()},t.prototype.notifyResumeProgress=function(){var e=this;this.progress={total:this.getProgressInfoItem(sum(this.loaded.chunks)+this.loaded.mkFileProgress,this.file.size+1),chunks:this.chunks.map((function(t,o){var n=e.usedCacheList[o];return e.getProgressInfoItem(e.loaded.chunks[o],t.size,n)})),uploadInfo:{id:this.uploadId,url:this.uploadHost.getUrl()}},this.onData(this.progress)},t}(Base),__awaiter$2=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(i,l){function a(e){try{s(n.next(e))}catch(t){l(t)}}function r(e){try{s(n.throw(e))}catch(t){l(t)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,r)}s((n=n.apply(e,t||[])).next())}))},__generator$2=globalThis&&globalThis.__generator||function(e,t){var o,n,i,l,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return l={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function r(l){return function(r){return function(l){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]>>1^3988292384:o>>>=1;e[t]=o}return e},e.prototype.append=function(e){for(var t=this.crc,o=0;o>>8^this.table[255&(t^e[o])];this.crc=t},e.prototype.compute=function(){return(-1^this.crc)>>>0},e.prototype.readAsUint8Array=function(e){return __awaiter$2(this,void 0,void 0,(function(){var t;return __generator$2(this,(function(o){switch(o.label){case 0:return"function"!=typeof e.arrayBuffer?[3,2]:(t=Uint8Array.bind,[4,e.arrayBuffer()]);case 1:return[2,new(t.apply(Uint8Array,[void 0,o.sent()]))];case 2:return[2,new Promise((function(t,o){var n=new FileReader;n.onload=function(){null!=n.result&&"string"!=typeof n.result?t(new Uint8Array(n.result)):o()},n.readAsArrayBuffer(e)}))]}}))}))},e.prototype.file=function(e){return __awaiter$2(this,void 0,void 0,(function(){var t,o,n,i,l,a;return __generator$2(this,(function(r){switch(r.label){case 0:return e.size<=MB?(t=this.append,[4,this.readAsUint8Array(e)]):[3,2];case 1:return t.apply(this,[r.sent()]),[2,this.compute()];case 2:o=Math.ceil(e.size/MB),n=0,r.label=3;case 3:return n0&&i[i.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]0&&reportV3(e,t,o-1)};var i=[t.code||"",t.reqId||"",t.host||"",t.remoteIp||"",t.port||"",t.duration||"",t.time||"",t.bytesSent||"",t.upType||"",t.size||""].join(",");n.send(i)}var __read$2=globalThis&&globalThis.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,l=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=l.next()).done;)a.push(n.value)}catch(r){i={error:r}}finally{try{n&&!n.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return a},__spread$2=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t0&&i[i.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]0)&&!(n=l.next()).done;)a.push(n.value)}catch(r){i={error:r}}finally{try{n&&!n.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return a},__spread$1=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t=e},e.prototype.freeze=function(e){void 0===e&&(e=20);var t=(new Date).getTime()+1e3*e;unfreezeTimeMap.set(this.host,t)},e.prototype.unfreeze=function(){unfreezeTimeMap.delete(this.host)},e.prototype.getUrl=function(){return this.protocol+"://"+this.host},e.prototype.getUnfreezeTime=function(){return unfreezeTimeMap.get(this.host)},e}(),HostPool=function(){function e(e){void 0===e&&(e=[]),this.initHosts=e,this.cachedHostsMap=new Map}return e.prototype.register=function(e,t,o,n){this.cachedHostsMap.set(e+"@"+t,o.map((function(e){return new Host(e,n)})))},e.prototype.refresh=function(e,t,o){var n,i,l,a;return __awaiter(this,void 0,void 0,(function(){var r,s;return __generator(this,(function(d){switch(d.label){case 0:return(this.cachedHostsMap.get(e+"@"+t)||[]).length>0?[2]:this.initHosts.length>0?(this.register(e,t,this.initHosts,o),[2]):[4,getUpHosts(e,t,o)];case 1:return null!=(null==(r=d.sent())?void 0:r.data)&&(s=__spread$1((null===(i=null===(n=r.data.up)||void 0===n?void 0:n.acc)||void 0===i?void 0:i.main)||[],(null===(a=null===(l=r.data.up)||void 0===l?void 0:l.acc)||void 0===a?void 0:a.backup)||[]),this.register(e,t,s,o)),[2]}}))}))},e.prototype.getUp=function(e,t,o){return __awaiter(this,void 0,void 0,(function(){var n,i;return __generator(this,(function(l){switch(l.label){case 0:return[4,this.refresh(e,t,o)];case 1:return l.sent(),0===(n=this.cachedHostsMap.get(e+"@"+t)||[]).length?[2,null]:(i=n.filter((function(e){return!e.isFrozen()}))).length>0?[2,i[0]]:[2,n.slice().sort((function(e,t){return(e.getUnfreezeTime()||0)-(t.getUnfreezeTime()||0)}))[0]]}}))}))},e}();function createUploadManager(e,t,o,n){return e.config&&e.config.forceDirect?(n.info("ues forceDirect mode."),new Direct(e,t,o,n)):e.file.size>4*MB?(n.info("file size over 4M, use Resume."),new Resume(e,t,o,n)):(n.info("file size less or equal than 4M, use Direct."),new Direct(e,t,o,n))}function upload(e,t,o,n,i){var l=new Logger(o,null==i?void 0:i.disableStatisticsReport,null==i?void 0:i.debugLogLevel,e.name),a={file:e,key:t,token:o,putExtra:n,config:normalizeUploadConfig(i,l)},r=new HostPool(a.config.uphost);return new Observable((function(e){var t=createUploadManager(a,{onData:function(t){return e.next(t)},onError:function(t){return e.error(t)},onComplete:function(t){return e.complete(t)}},r,l);return t.putFile(),t.stop.bind(t)}))}var __assign$1=globalThis&&globalThis.__assign||function(){return __assign$1=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0)&&!(n=l.next()).done;)a.push(n.value)}catch(r){i={error:r}}finally{try{n&&!n.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return a},__spread=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t[]},width:{type:Number,default:100},height:{type:Number,default:100},token:{type:String,default:""},domain:{type:String,default:""},multiple:{type:Boolean,default:!1},limit:{type:Number,default:9},isQiniu:{type:Boolean,default:!1},isDelete:{type:Boolean,default:!1},min:{type:Number,default:0},meitu:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},action:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},headers:{type:Array,default:()=>[]},ui:{type:String,default:"element"},containerKey:{type:String,default:""},withCredentials:{type:Boolean,default:!1},printRead:{type:Boolean,default:!1},onSelect:{type:Function,default:void 0}},emits:["update:modelValue","on-upload-success","on-upload-error","on-upload-progress","on-upload-remove","on-meitu"],inject:{formContext:{default:{}}},data(){return{fileList:this.modelValue.map((e=>({...e,key:e.key?e.key:(new Date).getTime()+"_"+Math.ceil(99999*Math.random())}))),viewer:null,uploadId:"upload_"+(new Date).getTime(),editIndex:-1,meituIndex:-1}},computed:{miniWidth(){return this.width>this.height?this.height:this.width}},methods:{handleChange(){const e=this.$refs.uploadInput.files;if(this.editIndex<0&&this.fileList.length+e.length>this.limit)return this.$refs.uploadInput.value=[],!1;for(let t=0;t{this.editIndex>=0?(this.fileList[this.editIndex]={key:l,url:i.result,percent:0,status:"uploading"},this.editIndex=-1):this.fileList.push({key:l,url:i.result,percent:0,status:"uploading"}),this.$nextTick((()=>{this.isQiniu?this.uploadAction2(i.result,o,l):this.uploadAction(i.result,o,l)}))}}this.$refs.uploadInput.value=[]},getQueryParams(e){const t=new URLSearchParams(window.location.search).get(e);return JSON.parse(t)},uploadAction(e,t,o){this.fileList.findIndex((e=>e.key===o));const n=new XMLHttpRequest;let i=this.getQueryParams("headers");const l=this.action;n.open("POST",l,!0),this.headers.map((e=>{"Authorization"==e.key&&(e.value=i.Authorization),e.key&&n.setRequestHeader(e.key,e.fx?executeExpression(e.value,{},this.formContext):e.value)}));let a=new FormData;a.append("multiPartFile",t),a.append("fname",t.name),a.append("key",o),n.withCredentials=this.withCredentials,n.onreadystatechange=()=>{if(4===n.readyState){let e=JSON.parse(n.response);e&&0==e.code?(this.$set(this.fileList,this.fileList.findIndex((e=>e.key===o)),{...this.fileList[this.fileList.findIndex((e=>e.key===o))],percent:100,...e.data}),setTimeout((()=>{this.$set(this.fileList,this.fileList.findIndex((e=>e.key===o)),{...this.fileList[this.fileList.findIndex((e=>e.key===o))],status:"success",...e.data}),this.$emit("on-upload-success",{...this.fileList[this.fileList.findIndex((e=>e.key===o))],status:"success",...e.data}),this.$emit("update:modelValue",this.fileList)}),200)):e&&e.url?(this.fileList[this.fileList.findIndex((e=>e.key===o))]={...this.fileList[this.fileList.findIndex((e=>e.key===o))],url:e.url,percent:100,...e},setTimeout((()=>{this.fileList[this.fileList.findIndex((e=>e.key===o))]={...this.fileList[this.fileList.findIndex((e=>e.key===o))],status:"success"},this.$emit("on-upload-success",{...this.fileList[this.fileList.findIndex((e=>e.key===o))],status:"success"}),this.$emit("update:modelValue",this.fileList)}),200)):(this.fileList[this.fileList.findIndex((e=>e.key===o))]={...this.fileList[this.fileList.findIndex((e=>e.key===o))],status:"error"},this.$emit("on-upload-error",{...this.fileList[this.fileList.findIndex((e=>e.key===o))],status:"error"}),this.fileList.splice(this.fileList.findIndex((e=>e.key===o)),1))}},n.upload.onprogress=e=>{e.total&&e.loaded&&(this.fileList[this.fileList.findIndex((e=>e.key===o))].percent=e.loaded==e.total?99:parseInt(e.loaded/e.total*100),this.$emit("on-upload-progress",{...this.fileList[this.fileList.findIndex((e=>e.key===o))],status:"uploading",percent:e.loaded==e.total?99:parseInt(e.loaded/e.total*100)}))},n.send(a)},uploadAction2(e,t,o){const n=this;upload(t,o,this.token,{fname:o,mimeType:[]},{useCdnDomain:!0}).subscribe({next(e){n.fileList[n.fileList.findIndex((e=>e.key===o))].percent=parseInt(e.total.percent),n.$emit("on-upload-progress",{...n.fileList[n.fileList.findIndex((e=>e.key===o))],status:"uploading",percent:parseInt(e.total.percent)})},error(e){n.$message.error(e.message),n.fileList[n.fileList.findIndex((e=>e.key===o))]={...n.fileList[n.fileList.findIndex((e=>e.key===o))],status:"error"},n.$emit("on-upload-error",{...n.fileList[n.fileList.findIndex((e=>e.key===o))],status:"error"}),n.fileList.splice(n.fileList.findIndex((e=>e.key===o)),1)},complete(e){n.fileList[n.fileList.findIndex((e=>e.key===o))]={...n.fileList[n.fileList.findIndex((e=>e.key===o))],url:n.domain+e.key,percent:100,...e},setTimeout((()=>{n.fileList[n.fileList.findIndex((e=>e.key===o))]={...n.fileList[n.fileList.findIndex((e=>e.key===o))],status:"success"},n.$emit("on-upload-success",{...n.fileList[n.fileList.findIndex((e=>e.key===o))],status:"success"}),n.$emit("update:modelValue",n.fileList)}),200)}})},handleRemove(e){this.$emit("on-upload-remove",this.fileList[this.fileList.findIndex((t=>t.key===e))]),this.fileList.splice(this.fileList.findIndex((t=>t.key===e)),1),this.$nextTick((()=>{this.$emit("update:modelValue",this.fileList)}))},handleEdit(e){this.editIndex=this.fileList.findIndex((t=>t.key===e)),this.$refs.uploadInput.click()},handleMeitu(e){this.$emit("on-meitu",this.fileList.findIndex((t=>t.key===e)))},handleAdd(){this.disabled||(this.editIndex=-1,this.$refs.uploadInput.click())},handlePreviewFile(e){this.viewer&&this.viewer.destroy(),this.uploadId="upload_"+(new Date).getTime(),this.$nextTick((()=>{this.viewer=new Viewer$1(document.getElementById(this.uploadId)),this.viewer.view(this.fileList.findIndex((t=>t.key===e)))}))}},watch:{modelValue(e){this.fileList=this.modelValue.map((e=>({...e,key:e.key?e.key:(new Date).getTime()+"_"+Math.ceil(99999*Math.random())})))}}},_hoisted_1$Q=["id"],_hoisted_2$K=["id"],_hoisted_3$z=["src"],_hoisted_4$x={key:2,class:"item-status"},_hoisted_5$w=["title","onClick"],_hoisted_6$k=["title","onClick"],_hoisted_7$g=["title","onClick"];function _sfc_render$19(e,t,o,n,i,l){const a=vue.resolveComponent("el-progress"),r=vue.resolveComponent("a-progress"),s=vue.resolveComponent("draggable");return vue.openBlock(),vue.createElementBlock("div",{class:"fm-uplaod-container",id:i.uploadId},[vue.createVNode(s,vue.mergeProps({class:"drag-img-list",modelValue:i.fileList,"onUpdate:modelValue":t[0]||(t[0]=e=>i.fileList=e)},{group:i.uploadId,ghostClass:"ghost",animation:200},{"no-transition-on-drag":!0,"item-key":"key"}),{item:vue.withCtx((({element:n})=>[(vue.openBlock(),vue.createElementBlock("div",{id:n.key,style:vue.normalizeStyle({width:o.width+"px",height:o.height+"px"}),class:vue.normalizeClass([{uploading:"uploading"==n.status,"is-success":"success"==n.status,"is-disabled":o.disabled},"upload-file"]),key:n.key},[vue.createElementVNode("img",{src:n.url},null,8,_hoisted_3$z),"uploading"==n.status&&"element"==o.ui?(vue.openBlock(),vue.createBlock(a,{key:0,width:.9*l.miniWidth,class:"upload-progress",type:"circle",percentage:n.percent},null,8,["width","percentage"])):vue.createCommentVNode("",!0),"uploading"==n.status&&"antd"==o.ui?(vue.openBlock(),vue.createBlock(r,{key:1,size:.9*l.miniWidth,class:"upload-progress",type:"circle",percent:n.percent},null,8,["size","percent"])):vue.createCommentVNode("",!0),"success"==n.status?(vue.openBlock(),vue.createElementBlock("label",_hoisted_4$x,t[5]||(t[5]=[vue.createElementVNode("i",{class:"fm-iconfont icon-check1",style:{color:"#fff",transform:"rotate(-45deg)","line-height":"12px",display:"block"}},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"uplaod-action",style:vue.normalizeStyle({height:l.miniWidth/4+"px"})},[vue.createElementVNode("i",{class:"fm-iconfont icon-tupianyulan",title:e.$t("fm.upload.preview"),onClick:e=>l.handlePreviewFile(n.key),style:vue.normalizeStyle({"font-size":l.miniWidth/8+"px"})},null,12,_hoisted_5$w),!o.isEdit||o.disabled||o.printRead?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"fm-iconfont icon-sync1",title:e.$t("fm.upload.edit"),onClick:e=>l.handleEdit(n.key),style:vue.normalizeStyle({"font-size":l.miniWidth/8+"px"})},null,12,_hoisted_6$k)),o.isDelete&&i.fileList.length>o.min&&!o.disabled&&!o.printRead?(vue.openBlock(),vue.createElementBlock("i",{key:1,class:"fm-iconfont icon-delete",title:e.$t("fm.upload.delete"),onClick:e=>l.handleRemove(n.key),style:vue.normalizeStyle({"font-size":l.miniWidth/8+"px"})},null,12,_hoisted_7$g)):vue.createCommentVNode("",!0)],4)],14,_hoisted_2$K))])),_:1},16,["modelValue"]),o.readonly?vue.createCommentVNode("",!0):vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass({"is-disabled":o.disabled,"el-upload":"element"==o.ui,"el-upload--picture-card":"element"==o.ui,"ant-upload":"antd"==o.ui,"ant-upload-select":"antd"==o.ui,"ant-upload-select-picture-card":"antd"==o.ui}),style:vue.normalizeStyle({width:o.width+"px",height:o.height+"px"}),onClick:t[4]||(t[4]=vue.withModifiers(((...e)=>l.handleAdd&&l.handleAdd(...e)),["self"]))},[vue.createElementVNode("i",{onClick:t[1]||(t[1]=vue.withModifiers(((...e)=>l.handleAdd&&l.handleAdd(...e)),["self"])),class:"fm-iconfont icon-plus",style:vue.normalizeStyle({fontSize:l.miniWidth/4+"px",lineHeight:l.miniWidth/4+"px",marginTop:-l.miniWidth/8+"px",marginLeft:-l.miniWidth/8+"px",position:"absolute",top:o.height/2+"px",left:o.width/2+"px"})},null,4),o.multiple?(vue.openBlock(),vue.createElementBlock("input",{key:0,accept:"image/*",multiple:"",ref:"uploadInput",onChange:t[2]||(t[2]=(...e)=>l.handleChange&&l.handleChange(...e)),type:"file",style:{width:0,height:0},name:"file",class:"upload-input"},null,544)):(vue.openBlock(),vue.createElementBlock("input",{key:1,accept:"image/*",ref:"uploadInput",onChange:t[3]||(t[3]=(...e)=>l.handleChange&&l.handleChange(...e)),type:"file",style:{width:0,height:0},name:"file",class:"upload-input"},null,544))],6)),[[vue.vShow,(!o.isQiniu||o.isQiniu&&o.token)&&i.fileList.lengthPromise.resolve().then((function(){return column$1}))))},props:{columns:{type:Array,default:()=>[]},modelValue:{type:[Array,Object]},showOperation:{type:Boolean,default:!1},operations:{type:Object,default:()=>({})},pagination:{type:Object,default:()=>({})},isDesign:{type:Boolean,default:!1},maxHeight:{type:[String,Number]},stripe:{type:Boolean,default:!1},border:{type:Boolean,default:!1},highlight:{type:Boolean,default:!1},selection:{type:Boolean,default:!1},printRead:{type:Boolean,default:!1}},computed:{theMaxHeight(){return this.maxHeight?this.maxHeight:"100%"},listPageSizes(){return this.pagination.pageSizes&&this.pagination.pageSizes.trim()?this.pagination.pageSizes.split(",").map((e=>e.trim())).filter((e=>""!==e&&!isNaN(Number(e)))).map((e=>parseInt(e))):[10,20,50,100]},rowspanColumnKeys(){return this.columns.filter((e=>e.prop&&e.isRowspan)).map((e=>e.key))}},data(){return{tableData:[],total:0,currentPage:1,pageSize:this.pagination.pageSizes&&this.pagination.pageSizes.trim()?this.pagination.pageSizes.split(",").map((e=>parseInt(e.trim())))[0]:10,multipleSelection:[],tableKey:Math.random().toString(36).slice(-8)}},created(){this.loadData()},emits:["update:modelValue","on-current-row","on-page-change","on-operate","on-selection-change"],watch:{modelValue(e){this.loadData()},"pagination.props":{deep:!0,handler(e){this.loadData()}}},methods:{loadData(){var e,t;"object"==typeof this.modelValue&&(Array.isArray(this.modelValue)?(this.tableData=this._generateDataKey(this.modelValue),this.total=this.isDesign?100:0):(this.tableData=this._generateDataKey(this.modelValue[this.pagination.props.list]),this.total=Number(this.modelValue[this.pagination.props.total]),this.currentPage=null!=(e=Number(this.modelValue[this.pagination.props.current]))?e:this.currentPage,this.pageSize=null!=(t=Number(this.modelValue[this.pagination.props.size]))?t:this.pageSize))},_generateDataKey(e){return Array.isArray(e)?e.map((e=>e.children&&e.children.length?{...e,fm_key:Math.random().toString(36).slice(-8),children:this._generateDataKey(e.children)}:{...e,fm_key:Math.random().toString(36).slice(-8)})):e},handlePageChange(e){this.$emit("on-page-change",{[this.pagination.props.current]:this.currentPage,[this.pagination.props.size]:this.pageSize})},handleCurrentRow(e){this.$emit("on-current-row",{row:e})},handleOperate(e,t){const o=this.operations.buttons[t].event;o&&this.$emit("on-operate",{funcKey:o,$index:e.$index,column:e.column,row:e.row})},handleSelectionChange(e){this.multipleSelection=e,this.$emit("on-selection-change",this.multipleSelection)},_calcRowspan(e,t){if(0===e){let o=this.tableData[e][t],n=1;for(let i=e+1;i((e,t)=>{for(let o in t)if(e[o]!==t[o])return!1;return!0})(e,t))),e.forEach((e=>{e.children&&e.children.length&&o.push(...this._filterMatchRow(e.children,t))})),o},toggleRowSelection(e,t){this._filterMatchRow(this.tableData,e).forEach((e=>{this.$refs[`table${this.tableKey}`].toggleRowSelection(e,t)}))},setCurrentRow(e){const t=this._filterMatchRow(this.tableData,e);t&&t[0]&&this.$refs[`table${this.tableKey}`].setCurrentRow(t[0])}}},_hoisted_1$P={class:"fm-data-table-container"};function _sfc_render$18(e,t,o,n,i,l){const a=vue.resolveComponent("el-table-column"),r=vue.resolveComponent("data-table-column"),s=vue.resolveComponent("el-button"),d=vue.resolveComponent("el-table"),u=vue.resolveComponent("el-pagination"),c=vue.resolveComponent("el-col"),m=vue.resolveComponent("el-row");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$P,[vue.createVNode(d,{data:i.tableData,"max-height":l.theMaxHeight,stripe:o.stripe,border:o.border,"highlight-current-row":o.highlight,onCurrentChange:l.handleCurrentRow,onSelectionChange:l.handleSelectionChange,"row-key":"fm_key","span-method":l.onSpanMethod,"table-layout":"fixed",ref:`table${i.tableKey}`},{default:vue.withCtx((()=>[o.selection&&!o.printRead?(vue.openBlock(),vue.createBlock(a,{key:0,type:"selection",width:"50",fixed:"left"})):vue.createCommentVNode("",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.columns,((e,t)=>(vue.openBlock(),vue.createBlock(r,{key:t,data:e},null,8,["data"])))),128)),o.showOperation&&!o.printRead?(vue.openBlock(),vue.createBlock(a,{key:1,fixed:"right",label:"zh-cn"==e.$i18n.locale?"操作":"Operations",width:o.operations.width},{default:vue.withCtx((e=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.operations.buttons,((t,o)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:o},["primary"==t.type?(vue.openBlock(),vue.createBlock(s,{key:0,class:"is-data-table",type:"primary",size:"small",onClick:vue.withModifiers((t=>l.handleOperate(e,o)),["stop"])},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(t.name),1)])),_:2},1032,["onClick"])):vue.createCommentVNode("",!0),"default"==t.type?(vue.openBlock(),vue.createBlock(s,{key:1,class:"is-data-table",size:"small",onClick:vue.withModifiers((t=>l.handleOperate(e,o)),["stop"])},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(t.name),1)])),_:2},1032,["onClick"])):vue.createCommentVNode("",!0),"text"==t.type?(vue.openBlock(),vue.createBlock(s,{key:2,class:"is-data-table",text:"",size:"small",onClick:vue.withModifiers((t=>l.handleOperate(e,o)),["stop"])},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(t.name),1)])),_:2},1032,["onClick"])):vue.createCommentVNode("",!0),"link"==t.type?(vue.openBlock(),vue.createBlock(s,{key:3,class:"is-data-table",link:"",type:"primary","size.stop":"small",onClick:vue.withModifiers((t=>l.handleOperate(e,o)),["stop"])},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(t.name),1)])),_:2},1032,["onClick"])):vue.createCommentVNode("",!0)],64)))),128))])),_:1},8,["label","width"])):vue.createCommentVNode("",!0)])),_:1},8,["data","max-height","stripe","border","highlight-current-row","onCurrentChange","onSelectionChange","span-method"]),o.pagination.paging&&i.total?(vue.openBlock(),vue.createBlock(m,{key:0,class:"table-pagination"},{default:vue.withCtx((()=>[vue.createVNode(c,{style:{"text-align":"right"}},{default:vue.withCtx((()=>[o.printRead?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(" Page "+vue.toDisplayString(i.currentPage),1)],64)):(vue.openBlock(),vue.createBlock(u,{key:1,currentPage:i.currentPage,"onUpdate:currentPage":t[0]||(t[0]=e=>i.currentPage=e),"page-size":i.pageSize,"onUpdate:pageSize":t[1]||(t[1]=e=>i.pageSize=e),"pager-count":o.pagination.pagerCount,layout:"total, sizes, prev, pager, next","page-sizes":l.listPageSizes,total:i.total,background:o.pagination.background,small:o.pagination.small,onChange:l.handlePageChange},null,8,["currentPage","page-size","pager-count","page-sizes","total","background","small","onChange"]))])),_:1})])),_:1})):vue.createCommentVNode("",!0)])}var FmDataTable$1=_export_sfc(_sfc_main$1e,[["render",_sfc_render$18]]);const ErrorBoundary=vue.defineComponent({template:'\n
\n \n
发生错误: {{ error.message }}
\n
\n ',data:()=>({error:null}),errorCaptured(e){return this.error=e,!1}}),widgetElementItemMixin={props:["element","isTable"],data:()=>({key:Math.random().toString(36).slice(-8),elementKey:Math.random().toString(36).slice(-8)}),computed:{elementDisabled(){return!!isExpression(this.element.options.disabled)||this.element.options.disabled},extendProps(){let e={};return this.element.options.extendProps&&Object.keys(this.element.options.extendProps).forEach((t=>{let o=this.element.options.extendProps[t];isExpression(o)?e[t]=executeExpression(extractExpression(o),{},null):e[t]=o})),e}},created(){"component"==this.element.type&&(this.$options.components[`component-${this.element.key}`]={template:`${this.element.options.template}`.replace(/formState(\.\w+)+/g,(e=>e.replace(/\./g,"?."))),props:["modelValue"],components:{ErrorBoundary:ErrorBoundary},data:()=>({dataModel:this.modelValue,formState:{}}),errorCaptured:e=>!1})},beforeUnmount(){this.$options&&this.$options.components&&this.$options.components[`component-${this.element.key}`]&&(this.$options.components[`component-${this.element.key}`]=null)},watch:{"element.options.template":function(e){this.$options.components[`component-${this.element.key}`]={template:`${e}`.replace(/formState(\.\w+)+/g,(e=>e.replace(/\./g,"?."))),props:["modelValue"],components:{ErrorBoundary:ErrorBoundary},data:()=>({dataModel:this.modelValue,formState:{}}),errorCaptured:e=>!1},this.key=Math.random().toString(36).slice(-8)},"element.options.defaultValue":function(e){this.elementKey=Math.random().toString(36).slice(-8)}}},_sfc_main$1d={name:"WidgetElementItem",components:{FmUpload:FmUpload,Editor:_sfc_main$1A,DataTable:FmDataTable$1},mixins:[widgetElementItemMixin]},_hoisted_1$O={key:16,style:{height:"50px",color:"#999","line-height":"50px","text-align":"center",width:"100%"}},_hoisted_2$J=["innerHTML"];function _sfc_render$17(e,t,o,n,i,l){const a=vue.resolveComponent("el-input"),r=vue.resolveComponent("el-input-number"),s=vue.resolveComponent("el-radio"),d=vue.resolveComponent("el-radio-group"),u=vue.resolveComponent("el-checkbox"),c=vue.resolveComponent("el-checkbox-group"),m=vue.resolveComponent("el-time-picker"),p=vue.resolveComponent("el-date-picker"),f=vue.resolveComponent("el-rate"),h=vue.resolveComponent("el-color-picker"),v=vue.resolveComponent("el-option"),g=vue.resolveComponent("el-select"),y=vue.resolveComponent("el-switch"),b=vue.resolveComponent("el-slider"),k=vue.resolveComponent("fm-upload"),w=vue.resolveComponent("el-cascader"),C=vue.resolveComponent("el-tree-select"),_=vue.resolveComponent("Editor"),x=vue.resolveComponent("el-button"),S=vue.resolveComponent("el-upload"),V=vue.resolveComponent("el-link"),$=vue.resolveComponent("el-step"),N=vue.resolveComponent("el-steps"),E=vue.resolveComponent("el-transfer"),B=vue.resolveComponent("el-pagination"),D=vue.resolveComponent("data-table");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,["input"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:0,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.element.options.defaultValue=t),style:{width:e.isTable?"100%":e.element.options.width},placeholder:e.element.options.placeholder,disabled:e.elementDisabled,"show-password":e.element.options.showPassword,maxlength:e.element.options.maxlength,"show-word-limit":e.element.options.showWordLimit},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","style","placeholder","disabled","show-password","maxlength","show-word-limit"])):vue.createCommentVNode("",!0),"textarea"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:1,type:"textarea",rows:e.element.options.rows,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[1]||(t[1]=t=>e.element.options.defaultValue=t),style:{width:e.isTable?"100%":e.element.options.width},disabled:e.elementDisabled,placeholder:e.element.options.placeholder,maxlength:e.element.options.maxlength,"show-word-limit":e.element.options.showWordLimit,autosize:e.element.options.autosize},{...e.element.options.customProps,...e.extendProps}),null,16,["rows","modelValue","style","disabled","placeholder","maxlength","show-word-limit","autosize"])):vue.createCommentVNode("",!0),"number"==e.element.type?(vue.openBlock(),vue.createBlock(r,vue.mergeProps({key:2,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[2]||(t[2]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,"controls-position":e.element.options.controlsPosition,precision:e.element.options.precision,controls:e.element.options.controls,style:{width:e.isTable?"100%":e.element.options.width}},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","disabled","controls-position","precision","controls","style"])):vue.createCommentVNode("",!0),"radio"==e.element.type?(vue.openBlock(),vue.createBlock(d,vue.mergeProps({key:3,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[3]||(t[3]=t=>e.element.options.defaultValue=t),style:{width:e.isTable?"100%":e.element.options.width,display:"block"},disabled:e.elementDisabled},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.options.options,((t,o)=>(vue.openBlock(),vue.createBlock(s,{style:vue.normalizeStyle({display:e.element.options.inline?"inline-block":"block"}),label:t.value,value:t.value,key:t.value+o},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.showLabel?t.label:t.value),1)])),_:2},1032,["style","label","value"])))),128))])),_:1},16,["modelValue","style","disabled"])):vue.createCommentVNode("",!0),"checkbox"==e.element.type?(vue.openBlock(),vue.createBlock(c,vue.mergeProps({key:4,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[4]||(t[4]=t=>e.element.options.defaultValue=t),style:{width:e.isTable?"100%":e.element.options.width},disabled:e.elementDisabled},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.options.options,((t,o)=>(vue.openBlock(),vue.createBlock(u,{style:vue.normalizeStyle({display:e.element.options.inline?"inline-block":"block"}),label:t.value,value:t.value,key:t.value+o},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.showLabel?t.label:t.value),1)])),_:2},1032,["style","label","value"])))),128))])),_:1},16,["modelValue","style","disabled"])):vue.createCommentVNode("",!0),"time"==e.element.type?(vue.openBlock(),vue.createBlock(m,vue.mergeProps({key:e.elementKey,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[5]||(t[5]=t=>e.element.options.defaultValue=t),"is-range":e.element.options.isRange,placeholder:e.element.options.placeholder,"start-placeholder":e.element.options.startPlaceholder,"end-placeholder":e.element.options.endPlaceholder,readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable,style:{width:e.isTable?"100%":e.element.options.width},"value-format":e.element.options.format},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","is-range","placeholder","start-placeholder","end-placeholder","readonly","disabled","editable","clearable","style","value-format"])):vue.createCommentVNode("",!0),"date"==e.element.type?(vue.openBlock(),vue.createBlock(p,vue.mergeProps({key:e.elementKey,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[6]||(t[6]=t=>e.element.options.defaultValue=t),type:e.element.options.type,"is-range":e.element.options.isRange,placeholder:e.element.options.placeholder,"start-placeholder":e.element.options.startPlaceholder,"end-placeholder":e.element.options.endPlaceholder,readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable,"value-format":e.element.options.timestamp?"x":e.element.options.format,format:e.element.options.format,style:{width:e.isTable?"100%":e.element.options.width}},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","type","is-range","placeholder","start-placeholder","end-placeholder","readonly","disabled","editable","clearable","value-format","format","style"])):vue.createCommentVNode("",!0),"rate"==e.element.type?(vue.openBlock(),vue.createBlock(f,vue.mergeProps({key:7,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[7]||(t[7]=t=>e.element.options.defaultValue=t),max:e.element.options.max,disabled:e.elementDisabled,"allow-half":e.element.options.allowHalf,"show-score":e.element.options.showScore,style:{width:e.isTable?"100%":e.element.options.width,display:"inline-block"}},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","max","disabled","allow-half","show-score","style"])):vue.createCommentVNode("",!0),"color"==e.element.type?(vue.openBlock(),vue.createBlock(h,vue.mergeProps({key:8,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[8]||(t[8]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,"show-alpha":e.element.options.showAlpha},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","disabled","show-alpha"])):vue.createCommentVNode("",!0),"select"==e.element.type?(vue.openBlock(),vue.createBlock(g,vue.mergeProps({key:9,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[9]||(t[9]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,multiple:e.element.options.multiple,clearable:e.element.options.clearable,placeholder:e.element.options.placeholder,style:{width:e.isTable?"100%":e.element.options.width}},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.options.options,(t=>(vue.openBlock(),vue.createBlock(v,{key:t.value,value:t.value,label:e.element.options.showLabel?t.label:t.value},null,8,["value","label"])))),128))])),_:1},16,["modelValue","disabled","multiple","clearable","placeholder","style"])):vue.createCommentVNode("",!0),"switch"==e.element.type?(vue.openBlock(),vue.createBlock(y,vue.mergeProps({key:10,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[10]||(t[10]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,style:{width:e.isTable?"100%":e.element.options.width}},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","disabled","style"])):vue.createCommentVNode("",!0),"slider"==e.element.type?(vue.openBlock(),vue.createBlock(b,vue.mergeProps({key:11,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[11]||(t[11]=t=>e.element.options.defaultValue=t),min:e.element.options.min,max:e.element.options.max,disabled:e.elementDisabled,step:e.element.options.step,"show-input":e.element.options.showInput,range:e.element.options.range,style:{width:e.isTable?"100%":e.element.options.width}},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","min","max","disabled","step","show-input","range","style"])):vue.createCommentVNode("",!0),"imgupload"==e.element.type?(vue.openBlock(),vue.createBlock(k,{key:12,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[12]||(t[12]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,style:vue.normalizeStyle({width:e.isTable?"100%":e.element.options.width}),width:e.element.options.size.width,height:e.element.options.size.height,token:"xxx",domain:"xxx"},null,8,["modelValue","disabled","style","width","height"])):vue.createCommentVNode("",!0),"cascader"==e.element.type?(vue.openBlock(),vue.createBlock(w,vue.mergeProps({key:13,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[13]||(t[13]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,clearable:e.element.options.clearable,placeholder:e.element.options.placeholder,style:{width:e.isTable?"100%":e.element.options.width},options:e.element.options.remote?[]:e.element.options.options,props:{multiple:e.element.options.multiple,checkStrictly:e.element.options.checkStrictly}},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","disabled","clearable","placeholder","style","options","props"])):vue.createCommentVNode("",!0),"treeselect"==e.element.type?(vue.openBlock(),vue.createBlock(C,vue.mergeProps({key:e.element.options.defaultValue,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[14]||(t[14]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,clearable:e.element.options.clearable,placeholder:e.element.options.placeholder,style:{width:e.isTable?"100%":e.element.options.width},data:e.element.options.remote?[]:e.element.options.options,multiple:e.element.options.multiple},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","disabled","clearable","placeholder","style","data","multiple"])):vue.createCommentVNode("",!0),"editor"==e.element.type?(vue.openBlock(),vue.createBlock(_,{modelValue:e.element.options.defaultValue,"custom-style":{width:e.isTable?"100%":e.element.options.width,cursor:e.elementDisabled?"no-drop":"",backgroundColor:e.elementDisabled?"#F5F7FA":""},toolbar:e.element.options.customToolbar,class:"fm-editor",disabled:e.elementDisabled,key:e.elementKey},null,8,["modelValue","custom-style","toolbar","disabled"])):vue.createCommentVNode("",!0),"blank"==e.element.type?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$O,vue.toDisplayString(e.element.model),1)):vue.createCommentVNode("",!0),"component"==e.element.type?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(`component-${e.element.key}`),{style:vue.normalizeStyle({width:e.isTable?"100%":e.element.options.width}),key:e.key,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[15]||(t[15]=t=>e.element.options.defaultValue=t)},null,8,["style","modelValue"])):vue.createCommentVNode("",!0),"custom"==e.element.type?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.element.el),vue.mergeProps({key:18,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[16]||(t[16]=t=>e.element.options.defaultValue=t),width:e.element.options.width,height:e.element.options.height,placeholder:e.element.options.placeholder,readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","width","height","placeholder","readonly","disabled","editable","clearable"])):vue.createCommentVNode("",!0),"text"==e.element.type?(vue.openBlock(),vue.createElementBlock("span",{key:19,style:vue.normalizeStyle({width:e.isTable?"100%":e.element.options.width||"100%",display:"inline-block"})},vue.toDisplayString(e.element.options.defaultValue),5)):vue.createCommentVNode("",!0),"html"==e.element.type?(vue.openBlock(),vue.createElementBlock("span",{key:20,style:vue.normalizeStyle({width:e.isTable?"100%":e.element.options.width||"100%",display:"inline-block"}),innerHTML:e.element.options.defaultValue},null,12,_hoisted_2$J)):vue.createCommentVNode("",!0),"fileupload"==e.element.type?(vue.openBlock(),vue.createBlock(S,{key:21,action:"https://jsonplaceholder.typicode.com/posts/",style:vue.normalizeStyle({width:e.isTable?"100%":e.element.options.width}),disabled:e.elementDisabled,limit:e.element.options.limit},{default:vue.withCtx((()=>[vue.createVNode(x,{size:"default",type:"primary"},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.actions.upload")),1)])),_:1})])),_:1},8,["style","disabled","limit"])):vue.createCommentVNode("",!0),"button"==e.element.type?(vue.openBlock(),vue.createBlock(x,vue.mergeProps({key:22,disabled:e.elementDisabled,size:e.element.options.buttonSize,type:"text"==e.element.options.buttonType||"link"==e.element.options.buttonType?"primary":e.element.options.buttonType,text:"text"==e.element.options.buttonType,link:"link"==e.element.options.buttonType,plain:e.element.options.buttonPlain,round:e.element.options.buttonRound,circle:e.element.options.buttonCircle,style:{width:e.element.options.width}},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.buttonName),1)])),_:1},16,["disabled","size","type","text","link","plain","round","circle","style"])):vue.createCommentVNode("",!0),"link"==e.element.type?(vue.openBlock(),vue.createBlock(V,vue.mergeProps({key:23,disabled:e.elementDisabled,type:e.element.options.linkType,underline:e.element.options.underline},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.linkName),1)])),_:1},16,["disabled","type","underline"])):vue.createCommentVNode("",!0),"steps"==e.element.type?(vue.openBlock(),vue.createBlock(N,vue.mergeProps({key:24,active:e.element.options.defaultValue,space:e.element.options.space,direction:e.element.options.direction,"process-status":e.element.options.processStatus,"finish-status":e.element.options.finishStatus,"align-center":e.element.options.alignCenter,simple:e.element.options.simple,style:{"line-height":"normal"}},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.options.steps,((e,t)=>(vue.openBlock(),vue.createBlock($,{title:e.title,description:e.description,key:t},null,8,["title","description"])))),128))])),_:1},16,["active","space","direction","process-status","finish-status","align-center","simple"])):vue.createCommentVNode("",!0),"transfer"==e.element.type?(vue.openBlock(),vue.createBlock(E,vue.mergeProps({key:25,"model-value":e.element.options.defaultValue,data:e.element.options.data,filterable:e.element.options.filterable,titles:e.element.options.titles,style:{width:e.isTable?"100%":e.element.options.width}},{...e.element.options.customProps,...e.extendProps}),null,16,["model-value","data","filterable","titles","style"])):vue.createCommentVNode("",!0),"pagination"==e.element.type?(vue.openBlock(),vue.createBlock(B,vue.mergeProps({key:26,currentPage:e.element.options.defaultValue,"onUpdate:currentPage":t[17]||(t[17]=t=>e.element.options.defaultValue=t),"page-size":e.element.options.pageSize,"pager-count":e.element.options.pagerCount,disabled:e.elementDisabled,background:e.element.options.background,layout:"total, prev, pager, next",total:e.element.options.total},{...e.element.options.customProps,...e.extendProps}),null,16,["currentPage","page-size","pager-count","disabled","background","total"])):vue.createCommentVNode("",!0),"list"==e.element.type?(vue.openBlock(),vue.createBlock(D,{key:27,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[18]||(t[18]=t=>e.element.options.defaultValue=t),"is-design":"",columns:e.element.options.columns,showOperation:e.element.options.showOperation,operations:e.element.options.operations,pagination:e.element.options.pagination,style:vue.normalizeStyle({width:e.isTable?"100%":e.element.options.width}),"max-height":e.element.options.maxHeight,stripe:e.element.options.stripe,border:e.element.options.border,selection:e.element.options.selection},null,8,["modelValue","columns","showOperation","operations","pagination","style","max-height","stripe","border","selection"])):vue.createCommentVNode("",!0)],64)}var WidgetElementItem$1=_export_sfc(_sfc_main$1d,[["render",_sfc_render$17]]);const widgetFormItemMixin={props:["element","select","index","data","formKey"],emits:["select-change","update:data","update:select"],inject:["getDragging"],data:()=>({}),mounted(){},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetFormItem,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetFormItem,"is-hover")},handleSelectWidget(e){this.$emit("update:select",this.data.list[e])},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((()=>{this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)}))},handleWidgetClone(e){const t=Math.random().toString(36).slice(-8);let o={..._.cloneDeep(this.data.list[e]),key:t,model:this.data.list[e].type+"_"+t};this.data.list.splice(e+1,0,o),this.$nextTick((()=>{this.$emit("update:select",this.data.list[e+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))}},watch:{}},_sfc_main$1c={name:"WidgetFormItem",components:{WidgetElementItem:WidgetElementItem$1},mixins:[widgetFormItemMixin]},_hoisted_1$N=["innerHTML"],_hoisted_2$I={key:0,class:"widget-view-action"},_hoisted_3$y=["title"],_hoisted_4$w=["title"],_hoisted_5$v={key:1,class:"widget-view-drag"},_hoisted_6$j={class:"widget-view-type"},_hoisted_7$f={key:0,class:"widget-view-action"},_hoisted_8$b=["title"],_hoisted_9$a=["title"],_hoisted_10$9={key:1,class:"widget-view-drag"},_hoisted_11$3={class:"widget-view-type"};function _sfc_render$16(e,t,o,n,i,l){const a=vue.resolveComponent("widget-element-item"),r=vue.resolveComponent("el-form-item"),s=vue.resolveComponent("el-divider"),d=vue.resolveComponent("el-alert");return vue.openBlock(),vue.createElementBlock("div",null,[e.element&&e.element.key&&"divider"!=e.element.type&&"alert"!=e.element.type?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["widget-view",{active:e.select.key==e.element.key,is_req:e.element.options.required,is_hidden:e.element.options.hidden}]),onClick:t[2]||(t[2]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[3]||(t[3]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[4]||(t[4]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetFormItem"},[vue.createVNode(r,{class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass,"fm-label-wrap":e.element.options.labelWrap}),label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":""},{default:vue.withCtx((()=>[e.element.options.tip?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"fm-item-tooltip",innerHTML:e.element.options.tip.replace(/\n/g,"
")},null,8,_hoisted_1$N)):vue.createCommentVNode("",!0),(vue.openBlock(),vue.createBlock(a,{element:e.element,"is-table":!1,key:e.element.key},null,8,["element"]))])),_:1},8,["class","label","label-width"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$I,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[0]||(t[0]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_3$y),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[1]||(t[1]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_4$w)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$v,t[10]||(t[10]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_6$j,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)):vue.createCommentVNode("",!0),e.element&&e.element.key&&("divider"==e.element.type||"alert"==e.element.type)?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["widget-view no-put",{active:e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[7]||(t[7]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),style:{"padding-bottom":"0"},onMouseover:t[8]||(t[8]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[9]||(t[9]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetFormItem"},[vue.createVNode(r,{"label-width":"0"},{default:vue.withCtx((()=>["divider"==e.element.type?(vue.openBlock(),vue.createBlock(s,vue.mergeProps({key:0,"content-position":e.element.options.contentPosition},e.element.options.customProps),{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.name),1)])),_:1},16,["content-position"])):vue.createCommentVNode("",!0),"alert"==e.element.type?(vue.openBlock(),vue.createBlock(d,vue.mergeProps({key:1,title:e.element.options.title,type:e.element.options.type,description:e.element.options.description,closable:e.element.options.closable,center:e.element.options.center,"show-icon":e.element.options.showIcon,effect:e.element.options.effect,style:{width:e.element.options.width}},e.element.options.customProps),null,16,["title","type","description","closable","center","show-icon","effect","style"])):vue.createCommentVNode("",!0)])),_:1}),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$f,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[5]||(t[5]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_8$b),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[6]||(t[6]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_9$a)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_10$9,t[11]||(t[11]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_11$3,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)):vue.createCommentVNode("",!0)])}var WidgetFormItem$1=_export_sfc(_sfc_main$1c,[["render",_sfc_render$16]]);const widgetTableItemMixin={props:["element","select","index","data","platform","formKey"],emits:["select-change","update:select"],data(){return{selectWidget:this.select||{}}},methods:{handleMouseover(e){addClass$1(this.$refs.widgetTableItem,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetTableItem,"is-hover")},handleSelectWidget(e){this.$emit("update:select",this.data[e])},handleWidgetDelete(e){1==this.data.length?this.$emit("select-change",-1):this.data.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((()=>{this.data.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)}))},handleWidgetClone(e){const t=Math.random().toString(36).slice(-8);let o={..._.cloneDeep(this.data[e]),key:t,model:this.data[e].type+"_"+t};this.data.splice(e+1,0,o),this.$nextTick((()=>{this.$emit("update:select",this.data[e+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$1b={components:{WidgetElementItem:WidgetElementItem$1},mixins:[widgetTableItemMixin]},_hoisted_1$M={key:2,class:"widget-view-action"},_hoisted_2$H=["title"],_hoisted_3$x=["title"],_hoisted_4$v={key:3,class:"widget-view-drag"},_hoisted_5$u={class:"widget-view-type"};function _sfc_render$15(e,t,o,n,i,l){const a=vue.resolveComponent("widget-element-item"),r=vue.resolveComponent("el-table-column"),s=vue.resolveComponent("el-table"),d=vue.resolveComponent("el-form-item");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-table-view",{active:e.selectWidget.key==e.element.key,is_req:e.element.options.required,is_hidden:e.element.options.hidden,mobile:"mobile"==e.platform}]),onClick:t[2]||(t[2]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[3]||(t[3]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[4]||(t[4]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetTableItem",style:vue.normalizeStyle({width:"mobile"!=e.platform?e.element.options.width?e.element.options.width:"200px":""})},["mobile"!=e.platform?(vue.openBlock(),vue.createBlock(s,{key:0,"row-class-name":"widget-table-row",data:[{}]},{default:vue.withCtx((()=>{var t;return[vue.createVNode(r,{label:e.element.options.hideLabel?"":e.element.name,"class-name":null==(t=e.element.options)?void 0:t.customClass,"label-class-name":e.element.options.required?"required":""},{default:vue.withCtx((()=>[vue.createVNode(a,{element:e.element,"is-table":!0},null,8,["element"])])),_:1},8,["label","class-name","label-class-name"])]})),_:1})):vue.createCommentVNode("",!0),"mobile"==e.platform?(vue.openBlock(),vue.createBlock(d,{key:1,label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":"",class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass,"fm-label-wrap":e.element.options.labelWrap})},{default:vue.withCtx((()=>[vue.createVNode(a,{element:e.element,"is-table":!0},null,8,["element"])])),_:1},8,["label","label-width","class"])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$M,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[0]||(t[0]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$H),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[1]||(t[1]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$x)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$v,t[5]||(t[5]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$u,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],38)}var WidgetTableItem$1=_export_sfc(_sfc_main$1b,[["render",_sfc_render$15]]);const CloneLayout=e=>{if("grid"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,columns:e.columns.map((e=>({...e,list:e.list.map((e=>CloneLayout(e))),key:Math.random().toString(36).slice(-8)})))}}if("col"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,list:e.list.map((e=>CloneLayout(e)))}}if("tabs"===e.type||"collapse"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,tabs:e.tabs.map((e=>({...e,list:e.list.map((e=>CloneLayout(e)))})))}}if("table"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,tableColumns:e.tableColumns.map((e=>CloneLayout(e)))}}if("subform"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,list:e.list.map((e=>CloneLayout(e)))}}if("report"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,rows:e.rows.map((e=>({...e,columns:e.columns.map((e=>({...e,list:e.list.map((e=>CloneLayout(e))),key:Math.random().toString(36).slice(-8)})))})))}}if("inline"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,list:e.list.map((e=>CloneLayout(e)))}}if("dialog"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,list:e.list.map((e=>CloneLayout(e)))}}if("card"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,list:e.list.map((e=>CloneLayout(e)))}}if("group"===e.type){let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t,list:e.list.map((e=>CloneLayout(e)))}}{let t=Math.random().toString(36).slice(-8);return{...e,key:t,model:e.type+"_"+t}}},widgetTableMixin={props:["element","select","index","data","platform","formKey"],emits:["select-change","update:select"],inject:["setDragging","getDragging"],data(){return{selectWidget:this.select||{},columnsWidthStyle:"200px"}},mounted(){this.calcTableColumnsWidth()},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetTable,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetTable,"is-hover")},handleSelectWidget(e){this.$emit("update:select",this.data.list[e])},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleTableClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.$emit("update:select",this.data.list[e+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetTableUpdate(e){this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},calcTableColumnsWidth(){this.columnsWidthStyle="calc(200px)";let e=[];for(let t=0;t!(o.className.split(" ").indexOf("widget-col")>=0||o.className.split(" ").indexOf("widget-table")>=0||o.className.split(" ").indexOf("widget-tab")>=0||o.className.split(" ").indexOf("widget-report")>=0||o.className.split(" ").indexOf("widget-inline")>=0||o.className.split(" ").indexOf("widget-subform")>=0||o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("widget-card")>=0||o.className.split(" ").indexOf("widget-group")>=0||o.className.split(" ").indexOf("no-put")>=0||o.children[0].className.split(" ").indexOf("no-put")>=0),handleWidgetTableAdd(e,t){const o=e.newIndex,n=Math.random().toString(36).slice(-8);t.tableColumns[o]=_.cloneDeep(t.tableColumns[o]),t.tableColumns[o]={...t.tableColumns[o],options:{...t.tableColumns[o].options,remoteFunc:t.tableColumns[o].options.remoteFunc||"func_"+n,remoteOption:t.tableColumns[o].options.remoteOption||"option_"+n,tableColumn:!0,subform:!!this.subform},novalid:{...t.tableColumns[o].novalid},key:t.tableColumns[o].key?t.tableColumns[o].key:n,model:t.tableColumns[o].model?t.tableColumns[o].model:t.tableColumns[o].type+"_"+n,rules:t.tableColumns[o].rules?[...t.tableColumns[o].rules]:[]},this.$nextTick((()=>{this.selectWidget=t.tableColumns[o],EventBus.$emit("on-history-add-"+this.formKey)}))},handleSelectChange(e,t){setTimeout((()=>{e>=0?this.$emit("update:select",this.element.tableColumns[e]):this.$emit("update:select",this.data.list[this.index])}))}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)},element:{deep:!0,handler(e){this.calcTableColumnsWidth()}}}},_sfc_main$1a={components:{Draggable:draggableComponent,WidgetTableItem:WidgetTableItem$1},mixins:[widgetTableMixin]},_hoisted_1$L=["innerHTML"],_hoisted_2$G={key:0,class:"widget-table-left"},_hoisted_3$w={class:"widget-table-left__top"},_hoisted_4$u={class:"widget-table-left__body",style:{padding:"8px"}},_hoisted_5$t={key:1,class:"widget-table-left"},_hoisted_6$i={key:2,class:"widget-table-top"},_hoisted_7$e={key:0,class:"table-empty"},_hoisted_8$a={key:0,class:"widget-view-action widget-col-action"},_hoisted_9$9=["title"],_hoisted_10$8=["title"],_hoisted_11$2={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_12$2={class:"widget-view-type"};function _sfc_render$14(e,t,o,n,i,l){const a=vue.resolveComponent("el-checkbox"),r=vue.resolveComponent("widget-table-item"),s=vue.resolveComponent("draggable"),d=vue.resolveComponent("el-form-item");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-table widget-view",{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden,mobile:"mobile"==e.platform}]),onClick:t[7]||(t[7]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[8]||(t[8]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[9]||(t[9]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetTable"},[vue.createVNode(d,{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":"",class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass,"fm-label-wrap":e.element.options.labelWrap})},{default:vue.withCtx((()=>[e.element.options.tip?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"fm-item-tooltip",innerHTML:e.element.options.tip.replace(/\n/g,"
")},null,8,_hoisted_1$L)):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:vue.normalizeClass(["widget-table-wrapper",{mobile:"mobile"==e.platform}])},["mobile"!=e.platform&&e.element.options.selection?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$G,[vue.createElementVNode("div",_hoisted_3$w,[vue.createVNode(a)]),vue.createElementVNode("div",_hoisted_4$u,[vue.createVNode(a)])])):vue.createCommentVNode("",!0),"mobile"!=e.platform&&e.element.options.showControl?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$t,t[10]||(t[10]=[vue.createElementVNode("div",{class:"widget-table-left__top"},"#",-1),vue.createElementVNode("div",{class:"widget-table-left__body"},"1",-1)]))):vue.createCommentVNode("",!0),"mobile"==e.platform?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$i,[e.element.options.selection?(vue.openBlock(),vue.createBlock(a,{key:0,style:{"margin-right":"10px"}})):vue.createCommentVNode("",!0),t[11]||(t[11]=vue.createTextVNode(" # 1 "))])):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:vue.normalizeClass(["widget-table-content",{mobile:"mobile"==e.platform}])},[0==e.element.tableColumns.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$e,vue.toDisplayString(e.$t("fm.description.tableEmpty")),1)):vue.createCommentVNode("",!0),vue.createElementVNode("div",{style:vue.normalizeStyle({width:"mobile"!=e.platform?e.columnsWidthStyle:"100%"})},[vue.createVNode(s,{modelValue:e.element.tableColumns,"onUpdate:modelValue":t[1]||(t[1]=t=>e.element.tableColumns=t),group:{name:"people",put:e.handlePut},"ghost-class":"ghost",animation:200,handle:".drag-widget","no-transition-on-drag":!0,onAdd:t[2]||(t[2]=t=>e.handleWidgetTableAdd(t,e.element)),onUpdate:e.handleWidgetTableUpdate,onStart:t[3]||(t[3]=t=>e.setDragging(!0)),onEnd:t[4]||(t[4]=t=>e.setDragging(!1)),class:"widget-table-col","item-key":"key"},{item:vue.withCtx((({element:o,index:n})=>[(vue.openBlock(),vue.createBlock(r,{key:o.key,element:o,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:n,data:e.element.tableColumns,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"]))])),_:1},8,["modelValue","group","onUpdate"])],4)],2)],2)])),_:1},8,["label","label-width","class"]),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$a,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[5]||(t[5]=vue.withModifiers((t=>e.handleTableClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_9$9),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[6]||(t[6]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_10$8)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11$2,t[12]||(t[12]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_12$2,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetTable$2=_export_sfc(_sfc_main$1a,[["render",_sfc_render$14]]),WidgetTable$3=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetTable$2},Symbol.toStringTag,{value:"Module"}));const widgetInlineMixin={props:["element","select","index","data","platform","formKey","subform"],emits:["select-change","update:select"],inject:["setDragging","getDragging"],data(){return{selectWidget:this.select||{}}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetInline,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetInline,"is-hover")},handleSelectWidget(e){this.selectWidget=this.data.list[e]},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-col")>=0||o.className.split(" ").indexOf("widget-table")>=0||o.className.split(" ").indexOf("widget-tab")>=0||o.className.split(" ").indexOf("widget-inline")>=0||o.className.split(" ").indexOf("widget-report")>=0||o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("widget-card")>=0||o.className.split(" ").indexOf("no-put")>=0||o.children[0].className.split(" ").indexOf("no-put")>=0),handleWidgetInlineAdd(e,t){const o=e.newIndex,n=Math.random().toString(36).slice(-8);t.list[o]=_.cloneDeep(t.list[o]),t.list[o]={...t.list[o],options:{...t.list[o].options,remoteFunc:t.list[o].options.remoteFunc||"func_"+n,remoteOption:t.list[o].options.remoteOption||"option_"+n,subform:!!this.subform,tableColumn:!1},key:t.list[o].key?t.list[o].key:n,model:t.list[o].model?t.list[o].model:t.list[o].type+"_"+n,rules:t.list[o].rules?[...t.list[o].rules]:[]},this.$nextTick((()=>{this.selectWidget=t.list[o],EventBus.$emit("on-history-add-"+this.formKey)}))},handleInlineClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.selectWidget=this.data.list[e+1],this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleWidgetInlineUpdate(){this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleSelectChange(e,t){setTimeout((()=>{this.selectWidget=e>=0?t.list[e]:this.data.list[this.index]}))}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$19={name:"widget-inline",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem$1},mixins:[widgetInlineMixin]},_hoisted_1$K=["size"],_hoisted_2$F={class:"widget-inline-content"},_hoisted_3$v={key:0,class:"widget-view-action widget-inline-action"},_hoisted_4$t=["title"],_hoisted_5$s=["title"],_hoisted_6$h={key:1,class:"widget-view-drag widget-inline-drag"},_hoisted_7$d={class:"widget-view-type"};function _sfc_render$13(e,t,o,n,i,l){const a=vue.resolveComponent("widget-form-item"),r=vue.resolveComponent("draggable");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-inline widget-view",{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[8]||(t[8]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),size:e.element.options.size,onMouseover:t[9]||(t[9]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[10]||(t[10]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetInline"},[vue.createElementVNode("div",_hoisted_2$F,[vue.createVNode(r,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[2]||(t[2]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[3]||(t[3]=t=>e.handleWidgetInlineAdd(t,e.element)),onUpdate:e.handleWidgetInlineUpdate,onStart:t[4]||(t[4]=t=>e.setDragging(!0)),onEnd:t[5]||(t[5]=t=>e.setDragging(!1)),class:["widget-inline-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key",style:{display:e.element.options.flex?"flex":"block","flex-direction":"row","flex-wrap":"wrap","justify-content":e.element.options.flexJustify||"normal","align-items":e.element.options.flexAlign||"normal"}}),{item:vue.withCtx((({element:o,index:n})=>[o&&o.key?(vue.openBlock(),vue.createBlock(a,{key:o.key,element:o,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t[1]||(t[1]=t=>e.handleSelectChange(t,e.element)),"form-key":e.formKey,style:vue.normalizeStyle({"margin-right":e.element.options.spaceSize+"px"})},null,8,["element","select","index","data","form-key","style"])):vue.createCommentVNode("",!0)])),_:1},16,["modelValue","onUpdate","class","style"])]),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$v,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[6]||(t[6]=vue.withModifiers((t=>e.handleInlineClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_4$t),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[7]||(t[7]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_5$s)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$h,t[11]||(t[11]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_7$d,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],42,_hoisted_1$K)}var WidgetInline$2=_export_sfc(_sfc_main$19,[["render",_sfc_render$13]]);const widgetColItemMixin={props:["element","select","index","data","platform","formKey","subform"],emits:["select-change","update:select"],inject:["getDragging","setDragging"],data(){return{selectWidget:this.select||{},selectIndex:-1}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetCol,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetCol,"is-hover")},handleMouseoverCol(e){!this.getDragging()&&addClass$1(this.$refs.widgetColItem[e].$el,"is-hover")},handleMouseoutCol(e){removeClass$1(this.$refs.widgetColItem[e].$el,"is-hover")},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("dialog-put")>=0||o.children[0].className.split(" ").indexOf("dialog-put")>=0),getColSpan(e){return"pc"==this.platform?e&&e.md:"pad"==this.platform?e&&e.sm:"mobile"==this.platform?e&&e.xs:void 0},handleSelectWidget(e){this.$emit("update:select",this.data.list[e])},handleSelectItemWidget(e){this.$emit("update:select",this.data.list[this.index].columns[e]),this.selectIndex=e},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleColItemDelete(e,t){this.data.list[e].columns.splice(t,1),0==t?this.$emit("update:select",this.data.list[e].columns[0]):this.$emit("update:select",this.data.list[e].columns[t-1]),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleAddCol(e){this.data.list[e].columns.push({type:"col",options:{span:12,offset:0,push:0,pull:0,xs:24,sm:12,md:12,lg:12,xl:12,customClass:""},list:[],key:Math.random().toString(36).slice(-8)}),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleColClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.data.list[e+1],this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleColItemClone(e,t){let o=_.cloneDeep(this.data.list[e].columns[t]);this.data.list[e].columns.splice(t+1,0,CloneLayout(o)),this.$nextTick((()=>{this.$emit("update:select",this.data.list[e].columns[t+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetColUpdate(e){this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetColAdd(e,t,o){const n=e.newIndex;fixDraggbleList(t.columns[o].list,n),t.columns[o].list[n]=_.cloneDeep(t.columns[o].list[n]);const i=Math.random().toString(36).slice(-8);t.columns[o].list[n]={...t.columns[o].list[n],options:{...t.columns[o].list[n].options,remoteFunc:t.columns[o].list[n].options.remoteFunc||"func_"+i,remoteOption:t.columns[o].list[n].options.remoteOption||"option_"+i,tableColumn:!1,subform:!!this.subform},novalid:{...t.columns[o].list[n].novalid},key:t.columns[o].list[n].key?t.columns[o].list[n].key:i,model:t.columns[o].list[n].model?t.columns[o].list[n].model:t.columns[o].list[n].type+"_"+i,rules:t.columns[o].list[n].rules?[...t.columns[o].list[n].rules]:[]},"report"==t.columns[o].list[n].type&&(t.columns[o].list[n].rows=generateKeyToTD(t.columns[o].list[n].rows),t.columns[o].list[n].headerRow=generateKeyToTH(t.columns[o].list[n].headerRow)),"grid"==t.columns[o].list[n].type&&(t.columns[o].list[n].columns=generateKeyToCol(t.columns[o].list[n].columns)),setTimeout((()=>{this.selectWidget=t.columns[o].list[n],EventBus.$emit("on-history-add-"+this.formKey)}),50)},handleSelectChange(e,t){setTimeout((()=>{e>=0?this.$emit("update:select",t.list[e]):this.$emit("update:select",{})}))}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$18={name:"widget-col-item",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem$1,WidgetTable:WidgetTable$2,WidgetInline:WidgetInline$2,WidgetReport:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetReport$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$3})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$3})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$3})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$3})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$3}))))},mixins:[widgetColItemMixin]},_hoisted_1$J={key:0,class:"widget-view-action widget-col-action"},_hoisted_2$E=["onClick","title"],_hoisted_3$u=["onClick","title"],_hoisted_4$s={class:"widget-view-type"},_hoisted_5$r={key:0,class:"widget-view-action widget-col-action"},_hoisted_6$g=["title"],_hoisted_7$c=["title"],_hoisted_8$9=["title"],_hoisted_9$8={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_10$7={class:"widget-view-type"};function _sfc_render$12(e,t,o,n,i,l){const a=vue.resolveComponent("widget-col-item",!0),r=vue.resolveComponent("widget-tab-item"),s=vue.resolveComponent("widget-collapse"),d=vue.resolveComponent("widget-report"),u=vue.resolveComponent("widget-table"),c=vue.resolveComponent("widget-sub-form"),m=vue.resolveComponent("widget-card"),p=vue.resolveComponent("widget-group"),f=vue.resolveComponent("widget-inline"),h=vue.resolveComponent("widget-form-item"),v=vue.resolveComponent("draggable"),g=vue.resolveComponent("el-col"),y=vue.resolveComponent("el-row");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-col widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[16]||(t[16]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[17]||(t[17]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetCol"},[vue.createVNode(y,{type:e.element.options.flex?"flex":"",gutter:e.element.options.gutter||0,justify:e.element.options.justify,align:e.element.options.align,class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!(!e.element.options||!e.element.options.customClass)})},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.columns,((o,n)=>(vue.openBlock(),vue.createBlock(g,{class:vue.normalizeClass(["widget-col-item",{active:e.select.key&&e.select.key==o.key,[o.options&&o.options.customClass]:!(!o.options||!o.options.customClass)}]),key:o.key,onClick:vue.withModifiers((t=>e.handleSelectItemWidget(n)),["stop"]),span:e.getColSpan(o.options),offset:o.options?o.options.offset:0,push:o.options?o.options.push:0,pull:o.options?o.options.pull:0,onMouseover:vue.withModifiers((t=>e.handleMouseoverCol(n)),["stop"]),onMouseout:t=>e.handleMouseoutCol(n),ref_for:!0,ref:"widgetColItem"},{default:vue.withCtx((()=>[vue.createVNode(v,vue.mergeProps({list:e.element.columns[n].list,ref_for:!0},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t=>e.handleWidgetColAdd(t,e.element,n),onUpdate:e.handleWidgetColUpdate,onStart:t[10]||(t[10]=t=>e.setDragging(!0)),onEnd:t[11]||(t[11]=t=>e.setDragging(!1)),class:"widget-col-list","item-key":"key"}),{item:vue.withCtx((({element:n,index:i})=>["grid"===n.type?(vue.openBlock(),vue.createBlock(a,{key:`grid-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"tabs"===n.type?(vue.openBlock(),vue.createBlock(r,{key:`tabs-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"collapse"===n.type?(vue.openBlock(),vue.createBlock(s,{key:`collapse-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"report"===n.type?(vue.openBlock(),vue.createBlock(d,{key:`report-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"table"===n.type?(vue.openBlock(),vue.createBlock(u,{key:`table-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===n.type?(vue.openBlock(),vue.createBlock(c,{key:`subform-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===n.type?(vue.openBlock(),vue.createBlock(m,{key:`card-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===n.type?(vue.openBlock(),vue.createBlock(p,{key:`group-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===n.type?(vue.openBlock(),vue.createBlock(f,{key:`inline-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):(vue.openBlock(),vue.createBlock(h,{key:`form-item-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"]))])),_:2},1040,["list","onAdd","onUpdate"]),e.select.key==o.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$J,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:vue.withModifiers((t=>e.handleColItemClone(e.index,n)),["stop"]),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$E),e.element.columns.length>1?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"fm-iconfont icon-trash",onClick:vue.withModifiers((t=>e.handleColItemDelete(e.index,n)),["stop"]),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$u)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_4$s,[vue.createElementVNode("span",null,vue.toDisplayString(o.type?this.$t("fm.components.fields."+o.type):""),1)])])),_:2},1032,["class","onClick","span","offset","push","pull","onMouseover","onMouseout"])))),128))])),_:1},8,["type","gutter","justify","align","class"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$r,[vue.createElementVNode("i",{class:"fm-iconfont icon-tianjiazengjiajia",onClick:t[12]||(t[12]=vue.withModifiers((t=>e.handleAddCol(e.index)),["stop"])),title:e.$t("fm.actions.addColumn")},null,8,_hoisted_6$g),vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleColClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_7$c),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_8$9)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$8,t[18]||(t[18]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_10$7,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetColItem$2=_export_sfc(_sfc_main$18,[["render",_sfc_render$12]]),WidgetColItem$3=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetColItem$2},Symbol.toStringTag,{value:"Module"}));const widgetTabItemMixin={props:["element","select","index","data","platform","formKey","subform"],emits:["select-change","update:select"],inject:["setDragging","getDragging"],data(){return{tabActive:this.element.tabs[0].name,selectWidget:this.select||{}}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetTab,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetTab,"is-hover")},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("dialog-put")>=0||o.children[0].className.split(" ").indexOf("dialog-put")>=0),handleSelectWidget(e){this.selectWidget=this.data.list[e]},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleTabClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.selectWidget=this.data.list[e+1],this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetTabUpdate(e){this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetTabAdd(e,t,o){const n=e.newIndex,i=Math.random().toString(36).slice(-8);fixDraggbleList(t.tabs[o].list,n),t.tabs[o].list[n]=_.cloneDeep(t.tabs[o].list[n]),t.tabs[o].list[n]={...t.tabs[o].list[n],options:{...t.tabs[o].list[n].options,remoteFunc:t.tabs[o].list[n].options.remoteFunc||"func_"+i,remoteOption:t.tabs[o].list[n].options.remoteOption||"option_"+i,tableColumn:!1,subform:!!this.subform},key:t.tabs[o].list[n].key?t.tabs[o].list[n].key:i,model:t.tabs[o].list[n].model?t.tabs[o].list[n].model:t.tabs[o].list[n].type+"_"+i,rules:t.tabs[o].list[n].rules?[...t.tabs[o].list[n].rules]:[]},"report"==t.tabs[o].list[n].type&&(t.tabs[o].list[n].rows=generateKeyToTD(t.tabs[o].list[n].rows),t.tabs[o].list[n].headerRow=generateKeyToTH(t.tabs[o].list[n].headerRow)),"grid"==t.tabs[o].list[n].type&&(t.tabs[o].list[n].columns=generateKeyToCol(t.tabs[o].list[n].columns)),setTimeout((()=>{this.selectWidget=t.tabs[o].list[n],EventBus.$emit("on-history-add-"+this.formKey)}),50)},handleSelectChange(e,t){setTimeout((()=>{this.selectWidget=e>=0?t.list[e]:{}}))}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$17={name:"widget-tab-item",components:{WidgetFormItem:WidgetFormItem$1,WidgetTable:WidgetTable$2,WidgetInline:WidgetInline$2,Draggable:draggableComponent,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$3})))),WidgetReport:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetReport$1})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$3})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$3})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$3})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$3}))))},mixins:[widgetTabItemMixin]},_hoisted_1$I={key:0,class:"widget-view-action widget-col-action"},_hoisted_2$D=["title"],_hoisted_3$t=["title"],_hoisted_4$r={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_5$q={class:"widget-view-type"};function _sfc_render$11(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item",!0),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-group"),m=vue.resolveComponent("widget-inline"),p=vue.resolveComponent("widget-report"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("widget-col-item"),v=vue.resolveComponent("draggable"),g=vue.resolveComponent("el-tab-pane"),y=vue.resolveComponent("el-tabs");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-tab widget-view",{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[16]||(t[16]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[17]||(t[17]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetTab"},[vue.createVNode(y,{modelValue:e.tabActive,"onUpdate:modelValue":t[12]||(t[12]=t=>e.tabActive=t),type:e.element.options.type,"tab-position":e.element.options.tabPosition,class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass})},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.tabs,((o,n)=>(vue.openBlock(),vue.createBlock(g,{key:o.name,label:o.label,name:o.name},{default:vue.withCtx((()=>[vue.createVNode(v,vue.mergeProps({modelValue:o.list,"onUpdate:modelValue":e=>o.list=e,ref_for:!0},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t=>e.handleWidgetTabAdd(t,e.element,n),onUpdate:e.handleWidgetTabUpdate,onStart:t[10]||(t[10]=t=>e.setDragging(!0)),onEnd:t[11]||(t[11]=t=>e.setDragging(!1)),class:"widget-col-list","item-key":"key"}),{item:vue.withCtx((({element:n,index:i})=>["tabs"===n.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"collapse"===n.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"table"===n.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===n.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===n.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===n.type?(vue.openBlock(),vue.createBlock(c,{key:`group-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===n.type?(vue.openBlock(),vue.createBlock(m,{key:`inline-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"report"===n.type?(vue.openBlock(),vue.createBlock(p,{key:`report-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"grid"!==n.type?(vue.openBlock(),vue.createBlock(f,{key:`form-item-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"])):(vue.openBlock(),vue.createBlock(h,{key:`grid-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"]))])),_:2},1040,["modelValue","onUpdate:modelValue","onAdd","onUpdate"])])),_:2},1032,["label","name"])))),128))])),_:1},8,["modelValue","type","tab-position","class"]),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$I,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleTabClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$D),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$t)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$r,t[18]||(t[18]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$q,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetTabItem$2=_export_sfc(_sfc_main$17,[["render",_sfc_render$11]]),WidgetTabItem$3=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetTabItem$2},Symbol.toStringTag,{value:"Module"}));const widgetReportMixin={props:["element","select","index","data","platform","formKey","subform"],emits:["select-change","update:select"],inject:["getDragging","setDragging"],data(){return{selectWidget:this.select||{},selectR:-1,selectC:-1,selectIndex:-1}},created(){this.element.headerRow||(this.element.headerRow=this.element.rows[0].columns.map((e=>({type:"th",options:{width:e.options.width},key:Math.random().toString(36).slice(-8)}))))},computed:{showRight(){if(this.selectR>=0&&this.selectC>=0){const e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(this.selectC+t=0&&this.selectC>=0){const e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(e+this.selectR1&&this.selectR>=0&&this.selectC>=0){const e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan;if(1==e)return!0;{let t=0;for(;t=0&&this.selectC>=0&&this.element.rows[this.selectR].columns.length>1){const e=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(1==e)return!0;{let t=0;for(;t=0&&this.selectC>=0&&this.element.rows[this.selectR].columns[this.selectC].options.colspan>1},showSplitRow(){return this.selectR>=0&&this.selectC>=0&&this.element.rows[this.selectR].columns[this.selectC].options.rowspan>1}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetReport,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetReport,"is-hover")},handleMouseoverTD(e,t){!this.getDragging()&&addClass$1(this.$refs[`widgetTD_${e}_${t}`][0],"is-hover")},handleMouseoutTD(e,t){removeClass$1(this.$refs[`widgetTD_${e}_${t}`][0],"is-hover")},handleMouseoverTH(e){!this.getDragging()&&addClass$1(this.$refs[`widgetTH_${e}`][0],"is-hover")},handleMouseoutTH(e){removeClass$1(this.$refs[`widgetTH_${e}`][0],"is-hover")},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("dialog-put")>=0||o.children[0].className.split(" ").indexOf("dialog-put")>=0),handleSelectWidget(e){this.$emit("update:select",this.data.list[e])},handleSelectItemWidget(e,t){this.$emit("update:select",this.data.list[this.index].rows[e].columns[t]),this.selectR=e,this.selectC=t},handleSelectHeaderWidget(e){this.$emit("update:select",this.data.list[this.index].headerRow[e])},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleWidgetItemAdd(e,t,o,n){const i=e.newIndex;fixDraggbleList(t.rows[o].columns[n].list,i);const l=Math.random().toString(36).slice(-8);t.rows[o].columns[n].list[i]=_.cloneDeep(t.rows[o].columns[n].list[i]),t.rows[o].columns[n].list[i]={...t.rows[o].columns[n].list[i],options:{...t.rows[o].columns[n].list[i].options,remoteFunc:t.rows[o].columns[n].list[i].options.remoteFunc||"func_"+l,remoteOption:t.rows[o].columns[n].list[i].options.remoteOption||"option_"+l,tableColumn:!1,hideLabel:!0,subform:!!this.subform},key:t.rows[o].columns[n].list[i].key?t.rows[o].columns[n].list[i].key:l,model:t.rows[o].columns[n].list[i].model?t.rows[o].columns[n].list[i].model:t.rows[o].columns[n].list[i].type+"_"+l,rules:t.rows[o].columns[n].list[i].rules?[...t.rows[o].columns[n].list[i].rules]:[]},"report"==t.rows[o].columns[n].list[i].type&&(t.rows[o].columns[n].list[i].rows=generateKeyToTD(t.rows[o].columns[n].list[i].rows),t.rows[o].columns[n].list[i].headerRow=generateKeyToTH(t.rows[o].columns[n].list[i].headerRow)),"grid"==t.rows[o].columns[n].list[i].type&&(t.rows[o].columns[n].list[i].columns=generateKeyToCol(t.rows[o].columns[n].list[i].columns)),setTimeout((()=>{this.selectWidget=t.rows[o].columns[n].list[i],EventBus.$emit("on-history-add-"+this.formKey)}),50)},handleWidgetItemUpdate(){EventBus.$emit("on-history-add-"+this.formKey)},handleReportClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.$emit("update:select",this.data.list[e+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleAddRow(e){const t=this.data.list[e].rows[this.data.list[e].rows.length-1].columns.length;this.data.list[e].rows.push({columns:Array.from({length:t},(e=>({type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)})))}),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleAddColumns(e){this.data.list[e].headerRow.push({type:"th",options:{width:""},key:Math.random().toString(36).slice(-8)}),this.data.list[e].rows.forEach((e=>{e.columns.push({type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)})})),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},insertColumns(e){this.element.headerRow.splice(e,0,{type:"th",options:{width:""},key:Math.random().toString(36).slice(-8)});for(let t=0;t{for(let t=0;t{EventBus.$emit("on-history-add-"+this.formKey)}))},handleInsertRight(){const e=this.element.rows[this.selectR].columns[this.selectC].options.colspan>1?this.findNextColIndex(this.selectR,this.selectC+1):this.selectC+1;this.insertColumns(e),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleInserBefore(){const e=this.selectR;this.insertRow(e),this.selectR=this.selectR++,this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleInserAfter(){const e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan>1?this.findNextRowIndex(this.selectR+1,this.selectC):this.selectR+1;this.insertRow(e),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},markTableItem(e,t){const o=this.element.rows[e].columns[t].options.colspan,n=this.element.rows[e].columns[t].options.rowspan;for(let i=0;i{EventBus.$emit("on-history-add-"+this.formKey)}))},handleBottom(e){if(!this.showBottom)return;const t=e.options.rowspan,o=this.selectR+t,n=this.element.rows[o].columns[this.selectC].options.rowspan;e.options.rowspan=t+n,this.element.rows[o].columns[this.selectC].options.invisible=!0;const i=[...this.element.rows[o].columns[this.selectC].list];this.element.rows[o].columns[this.selectC].list=[],e.list=e.list.concat(i),this.markTableItem(this.selectR,this.selectC),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleSplitColumn(){if(!this.showSplitColumn)return;const e=this.element.rows[this.selectR].columns[this.selectC].options.colspan,t=this.element.rows[this.selectR].columns[this.selectC].options.rowspan;for(let o=0;o{EventBus.$emit("on-history-add-"+this.formKey)}))},handleSplitRow(){if(!this.showSplitRow)return;const e=this.element.rows[this.selectR].columns[this.selectC].options.colspan,t=this.element.rows[this.selectR].columns[this.selectC].options.rowspan;for(let o=0;o{EventBus.$emit("on-history-add-"+this.formKey)}))},findPrevRowIndex(e,t){return e>=this.element.rows.length||!this.element.rows[e].columns[t].options.markRow?e:this.findPrevRowIndex(e-1,t)},findPrevColIndex(e,t){return t>=this.element.rows[e].columns.length||!this.element.rows[e].columns[t].options.markCol?t:this.findPrevColIndex(e,t-1)},findNextColIndex(e,t){return t>=this.element.rows[e].columns.length||!this.element.rows[e].columns[t].options.markCol?t:this.findNextColIndex(e,t+1)},findNextRowIndex(e,t){return e>=this.element.rows.length||!this.element.rows[e].columns[t].options.markRow?e:this.findNextRowIndex(e+1,t)},handleRemoveRow(){if(this.showRemoveRow){for(let e=0;e1&&(this.element.rows[t].columns[e].options.rowspan=this.element.rows[t].columns[e].options.rowspan-1)}else t>1&&(this.element.rows[this.selectR+1].columns[e].list=[...this.element.rows[this.selectR].columns[e].list],this.element.rows[this.selectR+1].columns[e].options.invisible=!1,this.element.rows[this.selectR+1].columns[e].options.rowspan=t-1,this.element.rows[this.selectR+1].columns[e].options.colspan=o,this.markTableItem(this.selectR+1,e))}this.element.rows.splice(this.selectR,1),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}},handleRemoveColumn(){if(this.showRemoveColumn){for(let e=0;e1&&(this.element.rows[e].columns[t].options.colspan=this.element.rows[e].columns[t].options.colspan-1)}else t>1&&(this.element.rows[e].columns[this.selectC+1].list=[...this.element.rows[e].columns[this.selectC].list],this.element.rows[e].columns[this.selectC+1].options.invisible=!1,this.element.rows[e].columns[this.selectC+1].options.colspan=t-1,this.element.rows[e].columns[this.selectC+1].options.rowspan=o,this.markTableItem(e,this.selectC+1));this.element.rows[e].columns.splice(this.selectC,1)}this.element.headerRow.splice(this.selectC,1),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}},handleSetColumnWidth(){this.$emit("update:select",this.data.list[this.index].headerRow[this.selectC])},handleSelectChange(e,t){setTimeout((()=>{e>=0?this.$emit("update:select",t.list[e]):this.$emit("update:select",this.data.list[this.index])}))}},watch:{select(e){this.selectWidget=e,this.element.headerRow&&(this.selectIndex=this.element.headerRow.findIndex((t=>t.key===e.key)))},selectWidget(e){this.$emit("update:select",e),this.element.headerRow&&(this.selectIndex=this.element.headerRow.findIndex((t=>t.key===e.key)))}}},_sfc_main$16={name:"widget-report",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem$1,WidgetTable:WidgetTable$2,WidgetInline:WidgetInline$2,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$3})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$3})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$3})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$3})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$3})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$3}))))},mixins:[widgetReportMixin]},_hoisted_1$H={class:"fm-report-table"},_hoisted_2$C=["onClick","onMouseover","onMouseout"],_hoisted_3$s={style:{"text-align":"center",height:"10px","line-height":"10px","font-size":"12px"}},_hoisted_4$q=["colspan","rowspan","onClick","onMouseover","onMouseout"],_hoisted_5$p={key:0,class:"widget-view-action widget-col-action"},_hoisted_6$f={class:"el-dropdown-link"},_hoisted_7$b=["title"],_hoisted_8$8={class:"widget-view-type"},_hoisted_9$7={key:0,class:"widget-view-action widget-col-action"},_hoisted_10$6=["title"],_hoisted_11$1=["title"],_hoisted_12$1=["title"],_hoisted_13=["title"],_hoisted_14={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_15={class:"widget-view-type"};function _sfc_render$10(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-group"),m=vue.resolveComponent("widget-inline"),p=vue.resolveComponent("widget-report",!0),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("widget-col-item"),v=vue.resolveComponent("draggable"),g=vue.resolveComponent("el-dropdown-item"),y=vue.resolveComponent("el-dropdown-menu"),b=vue.resolveComponent("el-dropdown");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-report widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[16]||(t[16]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[17]||(t[17]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[18]||(t[18]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetReport"},[vue.createElementVNode("div",_hoisted_1$H,[vue.createElementVNode("table",{class:vue.normalizeClass(["fm-report-table__table",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}]),style:vue.normalizeStyle({border:0,width:e.element.options.width||"auto"})},[vue.createElementVNode("tbody",null,[vue.createElementVNode("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.headerRow,((t,o)=>(vue.openBlock(),vue.createElementBlock("th",{key:o,style:vue.normalizeStyle({"border-style":"solid","border-width":e.element.options.borderWidth+"px","border-color":e.element.options.borderColor,width:t.options.width}),class:vue.normalizeClass(["widget-report-item widget-report-header",{active:e.select.key&&e.select.key==t.key}]),valign:"top",onClick:vue.withModifiers((t=>e.handleSelectHeaderWidget(o)),["stop"]),onMouseover:vue.withModifiers((t=>e.handleMouseoverTH(o)),["stop"]),onMouseout:t=>e.handleMouseoutTH(o),ref_for:!0,ref:`widgetTH_${o}`},[vue.createElementVNode("div",_hoisted_3$s,vue.toDisplayString(t.options.width),1)],46,_hoisted_2$C)))),128))]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.rows,((o,n)=>(vue.openBlock(),vue.createElementBlock("tr",{key:n},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.columns,((o,i)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:n+"-"+i},[o.options.invisible?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("td",{key:0,style:vue.normalizeStyle({"border-style":"solid","border-width":e.element.options.borderWidth+"px","border-color":e.element.options.borderColor,width:o.options.width,height:o.options.height,"text-align":o.options.textAlign,"vertical-align":o.options.verticalAlign}),colspan:o.options.colspan,rowspan:o.options.rowspan,class:vue.normalizeClass(["widget-report-item fm-report-table__td",{active:e.select.key&&e.select.key==o.key,[o.options.customClass]:!!o.options.customClass,selected:e.selectIndex==i&&1==o.options.colspan}]),onClick:vue.withModifiers((t=>e.handleSelectItemWidget(n,i)),["stop"]),valign:"top",onMouseover:vue.withModifiers((t=>e.handleMouseoverTD(n,i)),["stop"]),onMouseout:t=>e.handleMouseoutTD(n,i),ref_for:!0,ref:`widgetTD_${n}_${i}`},[vue.createVNode(v,vue.mergeProps({modelValue:o.list,"onUpdate:modelValue":e=>o.list=e,ref_for:!0},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t=>e.handleWidgetItemAdd(t,e.element,n,i),onUpdate:e.handleWidgetItemUpdate,onStart:t[10]||(t[10]=t=>e.setDragging(!0)),onEnd:t[11]||(t[11]=t=>e.setDragging(!1)),class:"widget-col-list","item-key":"key",style:{"text-align":o.options.textAlign,"vertical-align":o.options.verticalAlign}}),{item:vue.withCtx((({element:n,index:i})=>["tabs"===n.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"collapse"===n.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"table"===n.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===n.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===n.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===n.type?(vue.openBlock(),vue.createBlock(c,{key:`group-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===n.type?(vue.openBlock(),vue.createBlock(m,{key:`inline-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"report"===n.type?(vue.openBlock(),vue.createBlock(p,{key:`report-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"grid"!==n.type?(vue.openBlock(),vue.createBlock(f,{key:`form-item-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"])):(vue.openBlock(),vue.createBlock(h,{key:`grid-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"]))])),_:2},1040,["modelValue","onUpdate:modelValue","onAdd","onUpdate","style"]),e.select.key==o.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$p,[vue.createVNode(b,{size:"default",trigger:"click"},{dropdown:vue.withCtx((()=>[vue.createVNode(y,null,{default:vue.withCtx((()=>[vue.createVNode(g,{command:"insertleft",onClick:vue.withModifiers(e.handleInsertLeft,["stop"])},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.insertcolumnleft")),1)])),_:1},8,["onClick"]),vue.createVNode(g,{command:"insertright",onClick:vue.withModifiers(e.handleInsertRight,["stop"])},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.insertcolumnright")),1)])),_:1},8,["onClick"]),vue.createVNode(g,{command:"insertbefore",onClick:vue.withModifiers(e.handleInserBefore,["stop"])},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.insertrowbefore")),1)])),_:1},8,["onClick"]),vue.createVNode(g,{command:"insertafter",onClick:vue.withModifiers(e.handleInserAfter,["stop"])},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.insertrowafter")),1)])),_:1},8,["onClick"]),vue.createVNode(g,{command:"right",onClick:vue.withModifiers((t=>e.handleRight(o)),["stop"]),disabled:!e.showRight,divided:""},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.mergeright")),1)])),_:2},1032,["onClick","disabled"]),vue.createVNode(g,{command:"bottom",onClick:vue.withModifiers((t=>e.handleBottom(o)),["stop"]),disabled:!e.showBottom},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.mergedown")),1)])),_:2},1032,["onClick","disabled"]),vue.createVNode(g,{command:"splitcolumns",onClick:vue.withModifiers(e.handleSplitColumn,["stop"]),divided:"",disabled:!e.showSplitColumn},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.splitcolumns")),1)])),_:1},8,["onClick","disabled"]),vue.createVNode(g,{command:"splitrows",onClick:vue.withModifiers(e.handleSplitRow,["stop"]),disabled:!e.showSplitRow},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.splitrows")),1)])),_:1},8,["onClick","disabled"]),vue.createVNode(g,{command:"removecolumn",onClick:vue.withModifiers(e.handleRemoveColumn,["stop"]),disabled:!e.showRemoveColumn,divided:""},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.deletecolumn")),1)])),_:1},8,["onClick","disabled"]),vue.createVNode(g,{command:"removerow",onClick:vue.withModifiers(e.handleRemoveRow,["stop"]),disabled:!e.showRemoveRow},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.deleterow")),1)])),_:1},8,["onClick","disabled"]),vue.createVNode(g,{command:"setcolwidth",onClick:vue.withModifiers(e.handleSetColumnWidth,["stop"]),disabled:1!==o.options.colspan,divided:""},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.$t("fm.tooltip.setcolwidth")),1)])),_:2},1032,["onClick","disabled"])])),_:2},1024)])),default:vue.withCtx((()=>[vue.createElementVNode("span",_hoisted_6$f,[vue.createElementVNode("i",{class:"fm-iconfont icon-biaogeshezhi",title:e.$t("fm.tooltip.cellsetting")},null,8,_hoisted_7$b)])])),_:2},1024)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_8$8,[vue.createElementVNode("span",null,vue.toDisplayString(o.type?this.$t("fm.components.fields."+o.type):""),1)])],46,_hoisted_4$q))],64)))),128))])))),128))])],6)]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$7,[vue.createElementVNode("i",{class:"fm-iconfont icon--charuhang",onClick:t[12]||(t[12]=vue.withModifiers((t=>e.handleAddRow(e.index)),["stop"])),title:e.$t("fm.tooltip.addrow")},null,8,_hoisted_10$6),vue.createElementVNode("i",{class:"fm-iconfont icon--charulie",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleAddColumns(e.index)),["stop"])),title:e.$t("fm.tooltip.addcolumn")},null,8,_hoisted_11$1),vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleReportClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_12$1),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_13)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_14,t[19]||(t[19]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_15,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetReport=_export_sfc(_sfc_main$16,[["render",_sfc_render$10]]),WidgetReport$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetReport},Symbol.toStringTag,{value:"Module"}));const widgetSubFormMixin={props:["element","select","index","data","platform","formKey"],emits:["select-change","update:select"],inject:["setDragging","getDragging"],data(){return{selectWidget:this.select||{}}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetSubform,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetSubform,"is-hover")},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("dialog-put")>=0||o.children[0].className.split(" ").indexOf("dialog-put")>=0),handleSelectWidget(e){this.$emit("update:select",this.data.list[e])},handleSelectChange(e,t){setTimeout((()=>{e>=0?this.$emit("update:select",this.element.list[e]):this.$emit("update:select",this.data.list[this.index])}))},handleWidgetClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.$emit("update:select",this.data.list[e+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleWidgetSubFormAdd(e,t){const o=e.newIndex,n=Math.random().toString(36).slice(-8);fixDraggbleList(t.list,o),t.list[o]=_.cloneDeep(t.list[o]),t.list[o]={...t.list[o],options:{...t.list[o].options,remoteFunc:t.list[o].options.remoteFunc||"func_"+n,remoteOption:t.list[o].options.remoteOption||"option_"+n,tableColumn:!1,subform:!0},key:t.list[o].key?t.list[o].key:n,model:t.list[o].model?t.list[o].model:t.list[o].type+"_"+n,rules:t.list[o].rules?[...t.list[o].rules]:[]},"report"==t.list[o].type&&(t.list[o].rows=generateKeyToTD(t.list[o].rows),t.list[o].headerRow=generateKeyToTH(t.list[o].headerRow)),"grid"==t.list[o].type&&(t.list[o].columns=generateKeyToCol(t.list[o].columns)),this.$nextTick((()=>{this.selectWidget=t.list[o],EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetSubFormUpdate(){EventBus.$emit("on-history-add-"+this.formKey)}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$15={name:"widget-sub-form",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem$1,WidgetInline:WidgetInline$2,WidgetTable:WidgetTable$2,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$3})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$3})))),WidgetReport:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetReport$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$3})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$3})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$3}))))},mixins:[widgetSubFormMixin]},_hoisted_1$G=["innerHTML"],_hoisted_2$B={class:"widget-subform-wrapper"},_hoisted_3$r={key:0,class:"widget-view-action widget-subform-action"},_hoisted_4$p=["title"],_hoisted_5$o=["title"],_hoisted_6$e={key:1,class:"widget-view-drag widget-subform-drag"},_hoisted_7$a={class:"widget-view-type"};function _sfc_render$$(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-card"),d=vue.resolveComponent("widget-group"),u=vue.resolveComponent("widget-inline"),c=vue.resolveComponent("widget-report"),m=vue.resolveComponent("widget-sub-form",!0),p=vue.resolveComponent("widget-table"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("widget-col-item"),v=vue.resolveComponent("draggable"),g=vue.resolveComponent("el-form-item");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-subform widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[16]||(t[16]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[17]||(t[17]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[18]||(t[18]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetSubform"},[vue.createVNode(g,{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":"",class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass,"fm-label-wrap":e.element.options.labelWrap})},{default:vue.withCtx((()=>[e.element.options.tip?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"fm-item-tooltip",innerHTML:e.element.options.tip.replace(/\n/g,"
")},null,8,_hoisted_1$G)):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_2$B,[vue.createVNode(v,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[10]||(t[10]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[11]||(t[11]=t=>e.handleWidgetSubFormAdd(t,e.element)),onUpdate:e.handleWidgetSubFormUpdate,onStart:t[12]||(t[12]=t=>e.setDragging(!0)),onEnd:t[13]||(t[13]=t=>e.setDragging(!1)),class:["widget-col-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key"}),{item:vue.withCtx((({element:o,index:n})=>["tabs"===o.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"collapse"===o.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===o.type?(vue.openBlock(),vue.createBlock(s,{key:`card-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===o.type?(vue.openBlock(),vue.createBlock(d,{key:`group-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===o.type?(vue.openBlock(),vue.createBlock(u,{key:`inline-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"report"===o.type?(vue.openBlock(),vue.createBlock(c,{key:`report-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===o.type?(vue.openBlock(),vue.createBlock(m,{key:`subform-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"table"===o.type?(vue.openBlock(),vue.createBlock(p,{key:`table-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"grid"!==o.type?(vue.openBlock(),vue.createBlock(f,{key:`form-item-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"])):(vue.openBlock(),vue.createBlock(h,{key:`grid-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:!0},null,8,["element","select","index","data","onSelectChange","platform","form-key"]))])),_:1},16,["modelValue","onUpdate","class"])])])),_:1},8,["label","label-width","class"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$r,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_4$p),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_5$o)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$e,t[19]||(t[19]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_7$a,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetSubForm$2=_export_sfc(_sfc_main$15,[["render",_sfc_render$$]]),WidgetSubForm$3=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetSubForm$2},Symbol.toStringTag,{value:"Module"}));const widgetCollapseMixin={props:["element","select","index","data","platform","formKey","subform"],emits:["select-change","update:select"],inject:["getDragging","setDragging"],data(){return{tabActive:this.element.tabs.map((e=>e.name)),selectWidget:this.select||{}}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetCollapse,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetCollapse,"is-hover")},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("dialog-put")>=0||o.children[0].className.split(" ").indexOf("dialog-put")>=0),handleSelectWidget(e){this.selectWidget=this.data.list[e]},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleTabClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.selectWidget=this.data.list[e+1],this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetTabUpdate(e){this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetTabAdd(e,t,o){const n=e.newIndex,i=Math.random().toString(36).slice(-8);fixDraggbleList(t.tabs[o].list,n),t.tabs[o].list[n]=_.cloneDeep(t.tabs[o].list[n]),t.tabs[o].list[n]={...t.tabs[o].list[n],options:{...t.tabs[o].list[n].options,remoteFunc:t.tabs[o].list[n].options.remoteFunc||"func_"+i,remoteOption:t.tabs[o].list[n].options.remoteOption||"option_"+i,tableColumn:!1,subform:!!this.subform},key:t.tabs[o].list[n].key?t.tabs[o].list[n].key:i,model:t.tabs[o].list[n].model?t.tabs[o].list[n].model:t.tabs[o].list[n].type+"_"+i,rules:t.tabs[o].list[n].rules?[...t.tabs[o].list[n].rules]:[]},"report"==t.tabs[o].list[n].type&&(t.tabs[o].list[n].rows=generateKeyToTD(t.tabs[o].list[n].rows),t.tabs[o].list[n].headerRow=generateKeyToTH(t.tabs[o].list[n].headerRow)),"grid"==t.tabs[o].list[n].type&&(t.tabs[o].list[n].columns=generateKeyToCol(t.tabs[o].list[n].columns)),setTimeout((()=>{this.selectWidget=t.tabs[o].list[n],EventBus.$emit("on-history-add-"+this.formKey)}),50)},handleSelectChange(e,t){setTimeout((()=>{this.selectWidget=e>=0?t.list[e]:{}}))}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$14={name:"widget-collapse",components:{WidgetFormItem:WidgetFormItem$1,WidgetTable:WidgetTable$2,WidgetInline:WidgetInline$2,Draggable:draggableComponent,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$3})))),WidgetReport:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetReport$1})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$3})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$3})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$3})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$3}))))},mixins:[widgetCollapseMixin]},_hoisted_1$F={key:0,class:"widget-view-action widget-col-action"},_hoisted_2$A=["title"],_hoisted_3$q=["title"],_hoisted_4$o={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_5$n={class:"widget-view-type"};function _sfc_render$_(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse",!0),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-group"),m=vue.resolveComponent("widget-inline"),p=vue.resolveComponent("widget-report"),f=vue.resolveComponent("widget-col-item"),h=vue.resolveComponent("widget-form-item"),v=vue.resolveComponent("draggable"),g=vue.resolveComponent("el-collapse-item"),y=vue.resolveComponent("el-collapse");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-collapse widget-view",{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[16]||(t[16]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[17]||(t[17]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetCollapse"},[vue.createVNode(y,{modelValue:e.tabActive,"onUpdate:modelValue":t[12]||(t[12]=t=>e.tabActive=t),accordion:e.element.options.accordion,class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass})},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.tabs,((o,n)=>(vue.openBlock(),vue.createBlock(g,{key:o.name,title:o.title,name:o.name},{default:vue.withCtx((()=>[vue.createVNode(v,vue.mergeProps({modelValue:o.list,"onUpdate:modelValue":e=>o.list=e,ref_for:!0},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t=>e.handleWidgetTabAdd(t,e.element,n),onUpdate:e.handleWidgetTabUpdate,onStart:t[10]||(t[10]=t=>e.setDragging(!0)),onEnd:t[11]||(t[11]=t=>e.setDragging(!1)),class:"widget-col-list","item-key":"key"}),{item:vue.withCtx((({element:n,index:i})=>["tabs"===n.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"collapse"===n.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"table"===n.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===n.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===n.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===n.type?(vue.openBlock(),vue.createBlock(c,{key:`group-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===n.type?(vue.openBlock(),vue.createBlock(m,{key:`inline-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"report"===n.type?(vue.openBlock(),vue.createBlock(p,{key:`report-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):"grid"===n.type?(vue.openBlock(),vue.createBlock(f,{key:`grid-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey,subform:e.subform},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform"])):(vue.openBlock(),vue.createBlock(h,{key:`form-item-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:i,data:o,onSelectChange:t=>e.handleSelectChange(t,o),"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"]))])),_:2},1040,["modelValue","onUpdate:modelValue","onAdd","onUpdate"])])),_:2},1032,["title","name"])))),128))])),_:1},8,["modelValue","accordion","class"]),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$F,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleTabClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$A),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$q)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$o,t[18]||(t[18]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$n,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetCollapse$2=_export_sfc(_sfc_main$14,[["render",_sfc_render$_]]),WidgetCollapse$3=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetCollapse$2},Symbol.toStringTag,{value:"Module"}));const widgetDialogMixin={props:["element","select","index","data","platform","formKey"],emits:["select-change","update:select"],inject:["setDragging","getDragging"],data(){return{selectWidget:this.select||{},visible:!0}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetDialog,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetDialog,"is-hover")},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("dialog-put")>=0||o.children[0].className.split(" ").indexOf("dialog-put")>=0),handleSelectWidget(e){this.$emit("update:select",this.data.list[e])},handleSelectChange(e,t){setTimeout((()=>{e>=0?this.$emit("update:select",this.element.list[e]):this.$emit("update:select",this.data.list[this.index])}))},handleWidgetClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.$emit("update:select",this.data.list[e+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleWidgetDialogAdd(e,t){const o=e.newIndex,n=Math.random().toString(36).slice(-8);fixDraggbleList(t.list,o),t.list[o]=_.cloneDeep(t.list[o]),t.list[o]={...t.list[o],options:{...t.list[o].options,remoteFunc:t.list[o].options.remoteFunc||"func_"+n,remoteOption:t.list[o].options.remoteOption||"option_"+n,tableColumn:!1,subform:!1},key:t.list[o].key?t.list[o].key:n,model:t.list[o].model?t.list[o].model:t.list[o].type+"_"+n,rules:t.list[o].rules?[...t.list[o].rules]:[]},"report"==t.list[o].type&&(t.list[o].rows=generateKeyToTD(t.list[o].rows),t.list[o].headerRow=generateKeyToTH(t.list[o].headerRow)),"grid"==t.list[o].type&&(t.list[o].columns=generateKeyToCol(t.list[o].columns)),this.$nextTick((()=>{this.selectWidget=t.list[o],EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetDialogUpdate(){EventBus.$emit("on-history-add-"+this.formKey)}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$13={name:"widget-dialog",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem$1,WidgetInline:WidgetInline$2,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$3})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$3})))),WidgetReport:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetReport$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$3})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$3})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$3})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$3})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$3}))))},mixins:[widgetDialogMixin]},_hoisted_1$E={class:"el-dialog__header"},_hoisted_2$z={class:"el-dialog__title"},_hoisted_3$p={key:0,"aria-label":"Close this dialog",class:"el-dialog__headerbtn",type:"button"},_hoisted_4$n={class:"el-dialog__body"},_hoisted_5$m={key:0,class:"el-dialog__footer"},_hoisted_6$d={key:0,class:"widget-view-action widget-subform-action"},_hoisted_7$9=["title"],_hoisted_8$7=["title"],_hoisted_9$6={key:1,class:"widget-view-drag widget-subform-drag"},_hoisted_10$5={class:"widget-view-type"};function _sfc_render$Z(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-group"),m=vue.resolveComponent("widget-inline"),p=vue.resolveComponent("widget-report"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("widget-col-item"),v=vue.resolveComponent("draggable"),g=vue.resolveComponent("el-button");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-dialog widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:!e.element.options.visible}]),onClick:t[16]||(t[16]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[17]||(t[17]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[18]||(t[18]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetDialog"},[vue.createElementVNode("div",{class:vue.normalizeClass(["el-dialog",{"el-dialog--center":e.element.options.center}]),style:vue.normalizeStyle({"--el-dialog-width":e.element.options.width?e.element.options.width:"100%","--el-dialog-margin-top":e.element.options.top})},[vue.createElementVNode("div",_hoisted_1$E,[vue.createElementVNode("span",_hoisted_2$z,vue.toDisplayString(e.element.options.title),1),e.element.options.showClose?(vue.openBlock(),vue.createElementBlock("button",_hoisted_3$p,t[19]||(t[19]=[vue.createElementVNode("i",{class:"el-icon el-dialog__close"},[vue.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[vue.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})])],-1)]))):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_4$n,[vue.createVNode(v,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[10]||(t[10]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[11]||(t[11]=t=>e.handleWidgetDialogAdd(t,e.element)),onUpdate:e.handleWidgetDialogUpdate,onStart:t[12]||(t[12]=t=>e.setDragging(!0)),onEnd:t[13]||(t[13]=t=>e.setDragging(!1)),class:["widget-col-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key"}),{item:vue.withCtx((({element:o,index:n})=>["tabs"===o.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"collapse"===o.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"table"===o.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===o.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===o.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===o.type?(vue.openBlock(),vue.createBlock(c,{key:`group-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===o.type?(vue.openBlock(),vue.createBlock(m,{key:`inline-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"report"===o.type?(vue.openBlock(),vue.createBlock(p,{key:`report-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"grid"!==o.type?(vue.openBlock(),vue.createBlock(f,{key:`form-item-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"])):(vue.openBlock(),vue.createBlock(h,{key:`grid-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"]))])),_:1},16,["modelValue","onUpdate","class"])]),e.element.options.showCancel||e.element.options.showOk?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$m,[vue.createElementVNode("div",null,[e.element.options.showCancel?(vue.openBlock(),vue.createBlock(g,{key:0},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.cancelText),1)])),_:1})):vue.createCommentVNode("",!0),e.element.options.showOk?(vue.openBlock(),vue.createBlock(g,{key:1,type:"primary",loading:e.element.options.confirmLoading},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.okText),1)])),_:1},8,["loading"])):vue.createCommentVNode("",!0)])])):vue.createCommentVNode("",!0)],6),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$d,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_7$9),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_8$7)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$6,t[20]||(t[20]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_10$5,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetDialog$1=_export_sfc(_sfc_main$13,[["render",_sfc_render$Z]]);const widgetCardMixin={props:["element","select","index","data","platform","formKey","subform"],emits:["select-change","update:select"],inject:["getDragging","setDragging"],data(){return{selectWidget:this.select||{}}},computed:{padding(){return this.element.options.padding||"20px"}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetCard,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetCard,"is-hover")},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("dialog-put")>=0||o.children[0].className.split(" ").indexOf("dialog-put")>=0),handleSelectWidget(e){this.$emit("update:select",this.data.list[e])},handleSelectChange(e,t){setTimeout((()=>{e>=0?this.$emit("update:select",this.element.list[e]):this.$emit("update:select",this.data.list[this.index])}))},handleWidgetClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.$emit("update:select",this.data.list[e+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleWidgetCardAdd(e,t){const o=e.newIndex,n=Math.random().toString(36).slice(-8);fixDraggbleList(t.list,o),t.list[o]=_.cloneDeep(t.list[o]),t.list[o]={...t.list[o],options:{...t.list[o].options,remoteFunc:t.list[o].options.remoteFunc||"func_"+n,remoteOption:t.list[o].options.remoteOption||"option_"+n,tableColumn:!1,subform:!1},key:t.list[o].key?t.list[o].key:n,model:t.list[o].model?t.list[o].model:t.list[o].type+"_"+n,rules:t.list[o].rules?[...t.list[o].rules]:[]},"report"==t.list[o].type&&(t.list[o].rows=generateKeyToTD(t.list[o].rows),t.list[o].headerRow=generateKeyToTH(t.list[o].headerRow)),"grid"==t.list[o].type&&(t.list[o].columns=generateKeyToCol(t.list[o].columns)),this.$nextTick((()=>{this.selectWidget=t.list[o],EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetCardUpdate(){EventBus.$emit("on-history-add-"+this.formKey)}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}};var WidgetCard_vue_vue_type_style_index_0_lang="";const __default__$3={name:"widget-card",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem$1,WidgetInline:WidgetInline$2,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$3})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$3})))),WidgetReport:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetReport$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$3})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$3})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$3})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$3}))))},mixins:[widgetCardMixin]},__injectCSSVars__$3=()=>{vue.useCssVars((e=>({"00afd115":e.padding})))},__setup__$3=__default__$3.setup;__default__$3.setup=__setup__$3?(e,t)=>(__injectCSSVars__$3(),__setup__$3(e,t)):__injectCSSVars__$3;const _sfc_main$12=__default__$3,_hoisted_1$D={key:0,class:"widget-view-action widget-subform-action"},_hoisted_2$y=["title"],_hoisted_3$o=["title"],_hoisted_4$m={key:1,class:"widget-view-drag widget-subform-drag"},_hoisted_5$l={class:"widget-view-type"};function _sfc_render$Y(e,t,o,n,i,l){var a,r;const s=vue.resolveComponent("widget-tab-item"),d=vue.resolveComponent("widget-collapse"),u=vue.resolveComponent("widget-table"),c=vue.resolveComponent("widget-sub-form"),m=vue.resolveComponent("widget-card",!0),p=vue.resolveComponent("widget-inline"),f=vue.resolveComponent("widget-report"),h=vue.resolveComponent("widget-group"),v=vue.resolveComponent("widget-form-item"),g=vue.resolveComponent("widget-col-item"),y=vue.resolveComponent("draggable"),b=vue.resolveComponent("el-card");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-card widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[16]||(t[16]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),ref:"widgetCard",onMouseover:t[17]||(t[17]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[18]||(t[18]=(...t)=>e.handleMouseout&&e.handleMouseout(...t))},[vue.createVNode(b,{shadow:e.element.options.shadow,"body-style":{padding:e.element.options.padding},style:vue.normalizeStyle({width:e.element.options.width,"border-width":e.element.options.bordered?"1px":"0px"}),class:vue.normalizeClass({[null==(a=e.element.options)?void 0:a.customClass]:!!(null==(r=e.element.options)?void 0:r.customClass)})},vue.createSlots({default:vue.withCtx((()=>[vue.createVNode(y,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[10]||(t[10]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[11]||(t[11]=t=>e.handleWidgetCardAdd(t,e.element)),onUpdate:e.handleWidgetCardUpdate,onStart:t[12]||(t[12]=t=>e.setDragging(!0)),onEnd:t[13]||(t[13]=t=>e.setDragging(!1)),class:["widget-col-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key"}),{item:vue.withCtx((({element:o,index:n})=>["tabs"===o.type?(vue.openBlock(),vue.createBlock(s,{key:`tabs-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"collapse"===o.type?(vue.openBlock(),vue.createBlock(d,{key:`collapse-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"table"===o.type?(vue.openBlock(),vue.createBlock(u,{key:`table-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===o.type?(vue.openBlock(),vue.createBlock(c,{key:`subform-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===o.type?(vue.openBlock(),vue.createBlock(m,{key:`card-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===o.type?(vue.openBlock(),vue.createBlock(p,{key:`inline-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"report"===o.type?(vue.openBlock(),vue.createBlock(f,{key:`report-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===o.type?(vue.openBlock(),vue.createBlock(h,{key:`group-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"grid"!==o.type?(vue.openBlock(),vue.createBlock(v,{key:`form-item-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"])):(vue.openBlock(),vue.createBlock(g,{key:`grid-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"]))])),_:1},16,["modelValue","onUpdate","class"])])),_:2},[e.element.options.showHeader?{name:"header",fn:vue.withCtx((()=>[vue.createElementVNode("div",null,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.options.title),1)])])),key:"0"}:void 0]),1032,["shadow","body-style","style","class"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$D,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$y),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$o)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$m,t[19]||(t[19]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$l,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetCard$2=_export_sfc(_sfc_main$12,[["render",_sfc_render$Y]]),WidgetCard$3=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetCard$2},Symbol.toStringTag,{value:"Module"}));const widgetGroupMixin={props:["element","select","index","data","platform","formKey","subform"],emits:["select-change","update:select"],inject:["getDragging","setDragging"],data(){return{selectWidget:this.select||{}}},methods:{handleMouseover(e){!this.getDragging()&&addClass$1(this.$refs.widgetGroup,"is-hover")},handleMouseout(e){removeClass$1(this.$refs.widgetGroup,"is-hover")},handlePut:(e,t,o)=>!(o.className.split(" ").indexOf("widget-dialog")>=0||o.className.split(" ").indexOf("dialog-put")>=0||o.children[0].className.split(" ").indexOf("dialog-put")>=0),handleSelectWidget(e){this.$emit("update:select",this.data.list[e])},handleSelectChange(e,t){setTimeout((()=>{e>=0?this.$emit("update:select",this.element.list[e]):this.$emit("update:select",this.data.list[this.index])}))},handleWidgetClone(e){let t=_.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,CloneLayout(t)),this.$nextTick((()=>{this.$emit("update:select",this.data.list[e+1]),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleWidgetDelete(e){1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((()=>{EventBus.$emit("on-history-add-"+this.formKey)}),20)},handleWidgetGroupAdd(e,t){const o=e.newIndex,n=Math.random().toString(36).slice(-8);fixDraggbleList(t.list,o),t.list[o]=_.cloneDeep(t.list[o]),t.list[o]={...t.list[o],options:{...t.list[o].options,remoteFunc:t.list[o].options.remoteFunc||"func_"+n,remoteOption:t.list[o].options.remoteOption||"option_"+n,tableColumn:!1,subform:!1},key:t.list[o].key?t.list[o].key:n,model:t.list[o].model?t.list[o].model:t.list[o].type+"_"+n,rules:t.list[o].rules?[...t.list[o].rules]:[]},"report"==t.list[o].type&&(t.list[o].rows=generateKeyToTD(t.list[o].rows),t.list[o].headerRow=generateKeyToTH(t.list[o].headerRow)),"grid"==t.list[o].type&&(t.list[o].columns=generateKeyToCol(t.list[o].columns)),this.$nextTick((()=>{this.selectWidget=t.list[o],EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetGroupUpdate(){EventBus.$emit("on-history-add-"+this.formKey)}},watch:{select(e){this.selectWidget=e},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$11={name:"widget-group",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem$1,WidgetInline:WidgetInline$2,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$3})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$3})))),WidgetReport:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetReport$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$3})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$3})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$3})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$3}))))},mixins:[widgetGroupMixin]},_hoisted_1$C=["innerHTML"],_hoisted_2$x={key:0,class:"widget-view-action widget-subform-action"},_hoisted_3$n=["title"],_hoisted_4$l=["title"],_hoisted_5$k={key:1,class:"widget-view-drag widget-subform-drag"},_hoisted_6$c={class:"widget-view-type"};function _sfc_render$X(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-inline"),m=vue.resolveComponent("widget-report"),p=vue.resolveComponent("widget-group",!0),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("widget-col-item"),v=vue.resolveComponent("draggable"),g=vue.resolveComponent("el-form-item");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-group widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[16]||(t[16]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[17]||(t[17]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[18]||(t[18]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetGroup"},[vue.createVNode(g,{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":"",class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass,"fm-label-wrap":e.element.options.labelWrap})},{default:vue.withCtx((()=>[e.element.options.tip?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"fm-item-tooltip",innerHTML:e.element.options.tip.replace(/\n/g,"
")},null,8,_hoisted_1$C)):vue.createCommentVNode("",!0),vue.createElementVNode("div",{style:vue.normalizeStyle({width:e.element.options.width})},[vue.createVNode(v,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[10]||(t[10]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[11]||(t[11]=t=>e.handleWidgetGroupAdd(t,e.element)),onUpdate:e.handleWidgetGroupUpdate,onStart:t[12]||(t[12]=t=>e.setDragging(!0)),onEnd:t[13]||(t[13]=t=>e.setDragging(!1)),class:["widget-col-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key"}),{item:vue.withCtx((({element:o,index:n})=>["tabs"===o.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"collapse"===o.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"table"===o.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===o.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===o.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===o.type?(vue.openBlock(),vue.createBlock(c,{key:`inline-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"report"===o.type?(vue.openBlock(),vue.createBlock(m,{key:`report-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===o.type?(vue.openBlock(),vue.createBlock(p,{key:`group-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"grid"!==o.type?(vue.openBlock(),vue.createBlock(f,{key:`form-item-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"])):(vue.openBlock(),vue.createBlock(h,{key:`grid-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:n,data:e.element,onSelectChange:t=>e.handleSelectChange(t,o),platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"]))])),_:1},16,["modelValue","onUpdate","class"])],4)])),_:1},8,["label","label-width","class"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$x,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_3$n),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_4$l)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$k,t[19]||(t[19]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_6$c,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetGroup$2=_export_sfc(_sfc_main$11,[["render",_sfc_render$X]]),WidgetGroup$3=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetGroup$2},Symbol.toStringTag,{value:"Module"}));const widgetFormMixin={props:["data","select","platform","formKey"],emits:["update:select"],inject:["changeConfigTab","setDragging"],data(){return{selectWidget:this.select||{}}},mounted(){document.body.ondrop=function(e){navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&(e.preventDefault(),e.stopPropagation())},EventBus.$on("on-field-add-"+this.formKey,(e=>{var t,o,n,i;const l=Math.random().toString(36).slice(-8);let a=_.cloneDeep({...e,options:{...e.options,remoteFunc:"func_"+l,remoteOption:"option_"+l},key:l,model:e.type+"_"+l,rules:[]});"report"==a.type&&(a.rows=generateKeyToTD(a.rows),a.headerRow=generateKeyToTH(a.headerRow)),"grid"==a.type&&(a.columns=generateKeyToCol(a.columns)),a.options.subform=null==(o=null==(t=this.selectWidget)?void 0:t.options)?void 0:o.subform,a.options.tableColumn=null==(i=null==(n=this.selectWidget)?void 0:n.options)?void 0:i.tableColumn,this._addWidget(this.data.list,a)}))},beforeUnmount(){EventBus.$off("on-field-add-"+this.formKey)},methods:{_addWidget(e,t,o=!1){if(o&&("subform"==t.type||"grid"==t.type||"table"==t.type||"tabs"==t.type||"collapse"==t.type||"divider"==t.type||"report"==t.type||"inline"==t.type||"dialog"==t.type||"card"==t.type))return ElMessage({message:this.$t("fm.message.noPut"),type:"warning"},this),"table";if(this.selectWidget&&this.selectWidget.key){const o=e.findIndex((e=>e.key==this.selectWidget.key));if(o>=0)e.splice(o+1,0,t),this.selectWidget=e[o+1],setTimeout((()=>{this.scrollTo()}),200),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}));else for(let n=0;n{this._addWidget(e.list,t)})),"table"===o.type&&"table"==this._addWidget(o.tableColumns,t,!0))return"table";if("subform"===o.type&&"table"==this._addWidget(o.list,t,!0))return"table";if("tabs"===o.type&&o.tabs.forEach((e=>{this._addWidget(e.list,t)})),"collapse"===o.type&&o.tabs.forEach((e=>{this._addWidget(e.list,t)})),"report"===o.type)for(let e=0;e{this.scrollTo()}),200),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleMoveStart(){this.setDragging(!0)},handleMoveEnd(){this.setDragging(!1)},handleWidgetUpdate(e){this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetAdd(e){const t=e.newIndex;e.to,this.data.list[t]=_.cloneDeep(this.data.list[t]);const o=Math.random().toString(36).slice(-8);this.data.list[t]={...this.data.list[t],options:{...this.data.list[t].options,remoteFunc:this.data.list[t].options.remoteFunc||"func_"+o,remoteOption:this.data.list[t].options.remoteOption||"option_"+o,tableColumn:!1,subform:!1},key:this.data.list[t].key?this.data.list[t].key:o,model:this.data.list[t].model?this.data.list[t].model:this.data.list[t].type+"_"+o,rules:this.data.list[t].rules?[...this.data.list[t].rules]:[]},"report"==this.data.list[t].type&&(this.data.list[t].rows=generateKeyToTD(this.data.list[t].rows),this.data.list[t].headerRow=generateKeyToTH(this.data.list[t].headerRow)),"grid"==this.data.list[t].type&&(this.data.list[t].columns=generateKeyToCol(this.data.list[t].columns)),this.$nextTick((()=>{this.selectWidget=this.data.list[t],EventBus.$emit("on-history-add-"+this.formKey)}))},handleWidgetDelete(e){this.data.list.length-1===e?this.selectWidget=0===e?{}:this.data.list[e-1]:this.selectWidget=this.data.list[e+1],this.$nextTick((()=>{this.data.list.splice(e,1),this.$nextTick((()=>{EventBus.$emit("on-history-add-"+this.formKey)}))}))},handleSelectChange(e){setTimeout((()=>{this.selectWidget=e>=0?this.data.list[e]:{}}))},scrollTo(){let e=document.querySelector(".widget-form-container .active");if(!e)return!1;let t=e.getBoundingClientRect().top,o=e.offsetHeight,n=document.querySelector(".widget-form-container").offsetHeight,i=document.querySelector(".widget-form-container").getBoundingClientRect().top,l=document.querySelector(".widget-form-container .el-scrollbar__view").getBoundingClientRect().top,a=t-l,r=l-i;(a+o>-r+n||a<-r)&&this.$refs.formScrollRef.scrollTo({top:a-5,behavior:"smooth"})}},watch:{select(e){this.selectWidget=e,Object.keys(e).length?this.changeConfigTab("widget"):this.changeConfigTab("form")},selectWidget(e){this.$emit("update:select",e)}}},_sfc_main$10={name:"WidgetForm",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem$1,WidgetColItem:WidgetColItem$2,WidgetTable:WidgetTable$2,WidgetTabItem:WidgetTabItem$2,WidgetReport:WidgetReport,WidgetInline:WidgetInline$2,WidgetSubForm:WidgetSubForm$2,WidgetCollapse:WidgetCollapse$2,WidgetDialog:WidgetDialog$1,WidgetCard:WidgetCard$2,WidgetGroup:WidgetGroup$2},mixins:[widgetFormMixin]},_hoisted_1$B={key:0,class:"form-empty"};function _sfc_render$W(e,t,o,n,i,l){var a;const r=vue.resolveComponent("widget-table"),s=vue.resolveComponent("widget-collapse"),d=vue.resolveComponent("widget-tab-item"),u=vue.resolveComponent("widget-report"),c=vue.resolveComponent("widget-inline"),m=vue.resolveComponent("widget-sub-form"),p=vue.resolveComponent("widget-group"),f=vue.resolveComponent("widget-dialog"),h=vue.resolveComponent("widget-card"),v=vue.resolveComponent("widget-form-item"),g=vue.resolveComponent("widget-col-item"),y=vue.resolveComponent("draggable"),b=vue.resolveComponent("el-scrollbar"),k=vue.resolveComponent("el-form");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-form-container",`${e.platform}`])},[vue.createVNode(k,{size:e.data.config.size,"label-position":e.data.config.labelPosition,"label-width":e.data.config.labelWidth+"px",class:vue.normalizeClass({[e.data.config&&e.data.config.customClass]:!(!e.data.config||!e.data.config.customClass)}),style:vue.normalizeStyle({width:e.data.config.width,margin:"auto"}),"label-suffix":(null==(a=e.data.config)?void 0:a.labelSuffix)?" : ":" "},{default:vue.withCtx((()=>[0==e.data.list.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$B,vue.toDisplayString(e.$t("fm.description.containerEmpty")),1)):vue.createCommentVNode("",!0),vue.createVNode(b,{ref:"formScrollRef"},{default:vue.withCtx((()=>[vue.createVNode(y,vue.mergeProps({list:e.data.list},{group:"people",ghostClass:"ghost",animation:200,handle:".drag-widget"},{onAdd:e.handleWidgetAdd,onUpdate:e.handleWidgetUpdate,onStart:e.handleMoveStart,onEnd:e.handleMoveEnd,"no-transition-on-drag":!0,"item-key":"key",class:"widget-form-list"}),{item:vue.withCtx((({element:o,index:n})=>["table"===o.type?(vue.openBlock(),vue.createBlock(r,{key:`table-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"collapse"===o.type?(vue.openBlock(),vue.createBlock(s,{key:`collapse-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"tabs"===o.type?(vue.openBlock(),vue.createBlock(d,{key:`tabs-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"report"===o.type?(vue.openBlock(),vue.createBlock(u,{key:`report-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"inline"===o.type?(vue.openBlock(),vue.createBlock(c,{key:`inline-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"subform"===o.type?(vue.openBlock(),vue.createBlock(m,{key:`subform-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"group"===o.type?(vue.openBlock(),vue.createBlock(p,{key:`group-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"dialog"===o.type?(vue.openBlock(),vue.createBlock(f,{key:`dialog-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"card"===o.type?(vue.openBlock(),vue.createBlock(h,{key:`card-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"])):"grid"!==o.type?(vue.openBlock(),vue.createBlock(v,{key:`form-item-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","form-key"])):(vue.openBlock(),vue.createBlock(g,{key:`grid-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[10]||(t[10]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","onSelectChange","platform","form-key"]))])),_:1},16,["list","onAdd","onUpdate","onStart","onEnd"])])),_:1},512)])),_:1},8,["size","label-position","label-width","class","style","label-suffix"])],2)}var WidgetForm=_export_sfc(_sfc_main$10,[["render",_sfc_render$W]]),Select_vue_vue_type_style_index_0_scoped_true_lang="";const _hoisted_1$A={class:"van-select-multiple-content"},_sfc_main$$={__name:"Select",props:{modelValue:[String,Array],placeholder:String,disabled:Boolean,customProps:Object,extendProps:Object,publicProps:Object,columns:Array,multiple:Boolean,printRead:Boolean},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=t,i=vue.ref(),l=vue.ref(!1),a=vue.ref([]),r=vue.ref(""),s=e=>{if(!o.columns)return e;const t=o.columns.find((t=>t.value===e));return t?t.text:""};vue.watchEffect((()=>{if(i.value=o.modelValue,o.multiple){const e=Array.isArray(o.modelValue)?o.modelValue:[o.modelValue];r.value=e.map((e=>s(e))).join(","),a.value=e}else{const e=Array.isArray(o.modelValue)?o.modelValue[0]:o.modelValue;r.value=s(e),a.value=[e]}}));const d=({selectedOptions:e})=>{o.multiple?(r.value=e.map((e=>e.text)).join(","),i.value=e.map((e=>e.value))):(r.value=e[0].text,i.value=e[0].value),l.value=!1,n("update:modelValue",i.value)},u=()=>{if(o.printRead)return!1;l.value=!0},c=vue.ref([]);vue.onBeforeUpdate((()=>{c.value=[]}));const m=()=>{l.value=!1,r.value=i.value.map((e=>s(e))).join(","),n("update:modelValue",i.value)};return(t,o)=>{const n=vue.resolveComponent("van-field"),s=vue.resolveComponent("van-picker"),p=vue.resolveComponent("van-popup"),f=vue.resolveComponent("van-nav-bar"),h=vue.resolveComponent("van-checkbox"),v=vue.resolveComponent("van-cell"),g=vue.resolveComponent("van-cell-group"),y=vue.resolveComponent("van-checkbox-group");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[(vue.openBlock(),vue.createBlock(n,vue.mergeProps({modelValue:r.value,placeholder:e.placeholder,disabled:e.disabled},{...e.publicProps},{"is-link":!e.printRead,onClick:u,readonly:"",key:e.printRead}),vue.createSlots({_:2},[e.printRead?{name:"input",fn:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(r.value),1)])),key:"0"}:void 0]),1040,["modelValue","placeholder","disabled","is-link"])),e.multiple?(vue.openBlock(),vue.createBlock(p,{key:1,round:"",show:l.value,"onUpdate:show":o[5]||(o[5]=e=>l.value=e),"destroy-on-close":"",position:"bottom",teleport:"body","z-index":"5000"},{default:vue.withCtx((()=>[vue.createVNode(f,{title:e.publicProps.label,"right-text":"确定",onClickLeft:o[2]||(o[2]=e=>l.value=!1),onClickRight:m},{left:vue.withCtx((()=>o[6]||(o[6]=[vue.createElementVNode("span",null,"取消",-1)]))),_:1},8,["title"]),vue.createElementVNode("div",_hoisted_1$A,[vue.createVNode(y,{modelValue:i.value,"onUpdate:modelValue":o[4]||(o[4]=e=>i.value=e)},{default:vue.withCtx((()=>[vue.createVNode(g,{border:!1},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.columns,((e,t)=>(vue.openBlock(),vue.createBlock(v,{clickable:"",key:e.value,title:e.text,onClick:e=>(e=>{c.value[e].toggle()})(t)},{"right-icon":vue.withCtx((()=>[vue.createVNode(h,{name:e.value,ref_for:!0,ref:e=>c.value[t]=e,onClick:o[3]||(o[3]=vue.withModifiers((()=>{}),["stop"]))},null,8,["name"])])),_:2},1032,["title","onClick"])))),128))])),_:1})])),_:1},8,["modelValue"])])])),_:1},8,["show"])):(vue.openBlock(),vue.createBlock(p,{key:0,round:"",show:l.value,"onUpdate:show":o[1]||(o[1]=e=>l.value=e),"destroy-on-close":"",position:"bottom",teleport:"body","z-index":"5000"},{default:vue.withCtx((()=>[vue.createVNode(s,{columns:e.columns,"model-value":a.value,onConfirm:d,onCancel:o[0]||(o[0]=e=>l.value=!1)},null,8,["columns","model-value"])])),_:1},8,["show"]))],64)}}};var FmVantSelect=_export_sfc(_sfc_main$$,[["__scopeId","data-v-fd779b10"]]);const _sfc_main$_={__name:"Cascader",props:{modelValue:[String,Number,Array],placeholder:String,disabled:Boolean,customProps:Object,extendProps:Object,publicProps:Object,options:Array,title:String,isPathValue:Boolean,printRead:Boolean},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=t,i=vue.ref(""),l=vue.ref(""),a=vue.ref(!1);function r(e,t){for(let o=0;o0){let t=r(e,n.children);if(""==t)continue;return t}}return""}function s(e,t,o=[]){if(e.length>=1){let n=null==t?void 0:t.find((t=>t.value==e[0]));return n&&o.push(n.text),e.splice(0,1),s(e,null==n?void 0:n.children,o)}return o}function d({selectedOptions:e}){o.isPathValue?(n("update:modelValue",e.map((e=>e.value))),i.value=e.map((e=>e.text)).join("/")):(n("update:modelValue",l.value),i.value=e[e.length-1].text),a.value=!1}function u(){if(o.printRead)return!1;a.value=!0}return vue.watchEffect((()=>{var e;if(o.isPathValue){const e=Array.isArray(o.modelValue)?o.modelValue:[o.modelValue];i.value=s([...e],o.options).join("/"),l.value=e.length>0?e[e.length-1]:""}else{const t=Array.isArray(o.modelValue)?null==(e=o.modelValue)?void 0:e[0]:o.modelValue;i.value=r(t,o.options),l.value=t}})),(t,o)=>{const n=vue.resolveComponent("van-field"),r=vue.resolveComponent("van-cascader"),s=vue.resolveComponent("van-popup");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[(vue.openBlock(),vue.createBlock(n,vue.mergeProps({modelValue:i.value,"onUpdate:modelValue":o[0]||(o[0]=e=>i.value=e),"is-link":!e.printRead,readonly:"",placeholder:e.placeholder,disabled:e.disabled},{...e.publicProps},{onClick:u,key:e.printRead}),vue.createSlots({_:2},[e.printRead?{name:"input",fn:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(i.value),1)])),key:"0"}:void 0]),1040,["modelValue","is-link","placeholder","disabled"])),vue.createVNode(s,{show:a.value,"onUpdate:show":o[3]||(o[3]=e=>a.value=e),round:"",position:"bottom",teleport:"body","z-index":"5000"},{default:vue.withCtx((()=>[vue.createVNode(r,vue.mergeProps({modelValue:l.value,"onUpdate:modelValue":o[1]||(o[1]=e=>l.value=e),options:e.options,title:e.publicProps.label,onClose:o[2]||(o[2]=e=>a.value=!1),onFinish:d},{...e.customProps,...e.extendProps}),null,16,["modelValue","options","title"])])),_:1},8,["show"])],64)}}};var Uploader_vue_vue_type_style_index_0_scoped_true_lang="";const _hoisted_1$z={key:1,class:"fm-uploader-wrapper"},_hoisted_2$w={key:0,style:{color:"red"}},_sfc_main$Z=Object.assign({inheritAttrs:!1},{__name:"Uploader",props:{modelValue:{type:Array,default:()=>[]},width:{type:Number,default:100},height:{type:Number,default:100},multiple:{type:Boolean,default:!1},token:{type:String,default:""},domain:{type:String,default:""},limit:{type:Number,default:9},isQiniu:{type:Boolean,default:!1},isDelete:{type:Boolean,default:!1},action:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},headers:{type:Array,default:()=>[]},withCredentials:{type:Boolean,default:!1},printRead:{type:Boolean,default:!1},onSelect:{type:Function,default:void 0},isImage:{type:Boolean,default:!0},accept:{type:String,default:""},customProps:Object,extendProps:Object},emits:["update:modelValue","on-upload-success","on-upload-error","on-upload-remove"],setup(e,{emit:t}){const o=e,n=t,i=vue.inject("formContext",{}),l=vue.ref(o.modelValue);function a(){n("update:modelValue",l.value.map((e=>{var t,o;return{name:null!=(o=e.name)?o:null==(t=e.file)?void 0:t.name,url:e.url,key:e.key,...e}})))}function r(e,t){const r=l.value.findIndex((e=>e.key===t));if(r<0)return!1;const s=new XMLHttpRequest;s.open("POST",o.action,!0),o.headers.forEach((e=>{e.key&&s.setRequestHeader(e.key,e.fx?executeExpression(e.value,{},i):e.value)}));let d=new FormData;d.append("file",e.file),d.append("multiPartFile",e.file),d.append("fname",e.file.name),d.append("key",t),s.withCredentials=o.withCredentials,s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){let e=JSON.parse(s.response);l.value[r]={...l.value[r],url:e.url,percent:100,status:"done",...e,...e.data},n("on-upload-success",{...l.value[r],stauts:"success"}),a()}else l.value[r]={...l.value[r],status:"failed",message:"上传失败"},n("on-upload-error",{...l.value[r],status:"error"})},s.upload.onprogress=e=>{e.total&&e.loaded&&(l.value[r]={...l.value[r],percent:e.loaded==e.total?99:Math.ceil(e.loaded/e.total*100),status:"uploading"})},s.send(d)}function s(e,t){const i=l.value.findIndex((e=>e.key===t));if(i<0)return!1;upload(e.file,t,o.token,{fname:e.file.name,mimeType:[]},{useCdnDomain:!0}).subscribe({next(e){l.value[i]={...l.value[i],percent:parseInt(e.total.percent),status:"uploading"}},error(e){l.value[i]={...l.value[i],status:"failed",message:"上传失败"},n("on-upload-error",{...l.value[i],status:"error"})},complete(e){l.value[i]={...l.value[i],url:o.domain+e.key,status:"done"},n("on-upload-success",{...l.value[i],status:"success"}),a()}})}function d(e){Array.isArray(e)||(e=[e]);for(let t=0;tt.key===e.key));return t>=0&&(n("on-upload-remove",l.value[t]),l.value.splice(t,1),a()),!0}return vue.watchEffect((()=>{l.value=o.modelValue.map((e=>o.isImage?{url:null==e?void 0:e.url,key:null==e?void 0:e.key,name:null==e?void 0:e.name,...e,isImage:!0}:{name:null==e?void 0:e.name,key:null==e?void 0:e.key,url:null==e?void 0:e.name,...e}))})),(t,o)=>{const n=vue.resolveComponent("van-uploader"),i=vue.resolveComponent("van-button"),a=vue.resolveComponent("van-icon"),r=vue.resolveComponent("van-progress"),s=vue.resolveComponent("van-cell");return e.isImage?(vue.openBlock(),vue.createBlock(n,vue.mergeProps({key:0,"max-count":e.limit,disabled:e.disabled,multiple:e.multiple,"after-read":d,"before-read":u,"before-delete":c,modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=e=>l.value=e),"preview-size":[e.width,e.height],readonly:e.readonly,"show-upload":(!e.isQiniu||e.isQiniu&&!!e.token)&&!e.readonly},{...e.customProps,...e.extendProps},{deletable:e.isDelete&&!e.readonly,"preview-options":{closeable:!0,overlayStyle:{zIndex:5e3}}}),null,16,["max-count","disabled","multiple","modelValue","preview-size","readonly","show-upload","deletable"])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$z,[e.readonly?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createBlock(n,vue.mergeProps({key:0,"max-count":e.limit,disabled:e.disabled,multiple:e.multiple,"after-read":d,"before-read":u,"before-delete":c,modelValue:l.value,"onUpdate:modelValue":o[1]||(o[1]=e=>l.value=e),readonly:e.readonly,deletable:e.isDelete,"show-upload":!e.isQiniu||e.isQiniu&&!!e.token},{...t.$attrs,...e.customProps,...e.extendProps},{"preview-image":!1,"preview-size":["100%",10],accept:e.accept}),{default:vue.withCtx((()=>[vue.createVNode(i,{icon:"plus",type:"primary"},{default:vue.withCtx((()=>o[2]||(o[2]=[vue.createTextVNode("上传文件")]))),_:1})])),_:1},16,["max-count","disabled","multiple","modelValue","readonly","deletable","show-upload","accept"])),e.isImage?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["fm-uploader-file-list",{"is-readonly":e.readonly}])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(l.value,(t=>(vue.openBlock(),vue.createBlock(s,{key:t.key,class:"fm-uploader-file-item"},vue.createSlots({title:vue.withCtx((()=>[vue.createVNode(a,{name:"file",size:"20"}),"failed"===t.status?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$w,"上传失败! ")):vue.createCommentVNode("",!0),vue.createElementVNode("span",null,vue.toDisplayString(t.name),1)])),_:2},["uploading"===t.status?{name:"label",fn:vue.withCtx((()=>[vue.createVNode(r,{percentage:t.percent},null,8,["percentage"])])),key:"0"}:void 0,"uploading"===t.status||e.readonly?void 0:{name:"right-icon",fn:vue.withCtx((()=>[vue.createVNode(a,{name:"cross",class:"fm-uploader-file-item-delete",onClick:e=>c(t)},null,8,["onClick"])])),key:"1"}]),1024)))),128))],2))]))}}});var FmVantUploader=_export_sfc(_sfc_main$Z,[["__scopeId","data-v-4d36ef61"]]);const _sfc_main$Y={components:{FmVantSelect:FmVantSelect,FmVantCascader:_sfc_main$_,FmVantUploader:FmVantUploader},name:"VantWidgetElementItem",mixins:[widgetElementItemMixin],props:["label","labelWidth","config"],computed:{publicProps(){return{label:this.label,labelWidth:this.labelWidth,labelAlign:this.element.options.labelWrap?"top":this.config.labelPosition,required:this.element.options.required,class:{[this.element.options&&this.element.options.customClass]:!!this.element.options.customClass}}},selectOptions(){return this.element.options.options.map((e=>"cascader"==this.element.type||"treeselect"==this.element.type?this.element.options.props.children&&this.element.options.props.children.length&&Object.keys(e).includes(this.element.options.props.children)?{value:e[this.element.options.props.value],text:e[this.element.options.props.label],children:this.processRemoteProps(e[this.element.options.props.children],this.element.options.props)}:{value:e[this.element.options.props.value],text:e[this.element.options.props.label]}:{text:this.element.options.showLabel?e.label:e.value,value:e.value}))}},methods:{processRemoteProps(e,t){return e&&e.length?e.map((e=>this.processRemoteProps(e[t.children],t).length?{value:e[t.value],text:e[t.label],children:this.processRemoteProps(e[t.children],t)}:{value:e[t.value],text:e[t.label]})):[]}}},_hoisted_1$y=["innerHTML"],_hoisted_2$v={style:{color:"#999","text-align":"center",width:"100%"}};function _sfc_render$V(e,t,o,n,i,l){const a=vue.resolveComponent("van-field"),r=vue.resolveComponent("van-stepper"),s=vue.resolveComponent("van-radio"),d=vue.resolveComponent("van-radio-group"),u=vue.resolveComponent("van-checkbox"),c=vue.resolveComponent("van-checkbox-group"),m=vue.resolveComponent("van-rate"),p=vue.resolveComponent("fm-vant-select"),f=vue.resolveComponent("van-switch"),h=vue.resolveComponent("van-slider"),v=vue.resolveComponent("van-button"),g=vue.resolveComponent("fm-vant-cascader"),y=vue.resolveComponent("van-step"),b=vue.resolveComponent("van-steps"),k=vue.resolveComponent("van-icon"),w=vue.resolveComponent("van-pagination"),C=vue.resolveComponent("fm-vant-uploader");return vue.openBlock(),vue.createElementBlock(vue.Fragment,null,["input"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:0,modelValue:e.element.options.defaultValue,placeholder:e.element.options.placeholder,maxlength:Number(e.element.options.maxlength||1/0),"show-word-limit":e.element.options.showWordLimit,disabled:e.elementDisabled,clearable:e.element.options.clearable},{...l.publicProps,...e.element.options.customProps,...e.extendProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}}),null,16,["modelValue","placeholder","maxlength","show-word-limit","disabled","clearable","class"])):vue.createCommentVNode("",!0),"textarea"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:1,type:"textarea",rows:e.element.options.rows,autosize:e.element.options.autosize,modelValue:e.element.options.defaultValue,placeholder:e.element.options.placeholder,maxlength:Number(e.element.options.maxlength||1/0),"show-word-limit":e.element.options.showWordLimit,disabled:e.elementDisabled,clearable:e.element.options.clearable},{...l.publicProps,...e.element.options.customProps,...e.extendProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}}),null,16,["rows","autosize","modelValue","placeholder","maxlength","show-word-limit","disabled","clearable","class"])):vue.createCommentVNode("",!0),"number"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:2},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(r,vue.mergeProps({modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.element.options.defaultValue=t),modelModifiers:{number:!0},disabled:e.elementDisabled},{...e.element.options.customProps,...e.extendProps},{min:e.element.options.min,max:e.element.options.max,step:e.element.options.step,"decimal-length":e.element.options.precision}),null,16,["modelValue","disabled","min","max","step","decimal-length"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"radio"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:3},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(d,vue.mergeProps({modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[1]||(t[1]=t=>e.element.options.defaultValue=t),direction:e.element.options.inline?"horizontal":"vertical",disabled:e.elementDisabled},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.options.options,((t,o)=>(vue.openBlock(),vue.createBlock(s,{style:{"margin-bottom":"8px"},name:t.value,key:t.value+o},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.showLabel?t.label:t.value),1)])),_:2},1032,["name"])))),128))])),_:1},16,["modelValue","direction","disabled"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"checkbox"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:4},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(c,vue.mergeProps({modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[2]||(t[2]=t=>e.element.options.defaultValue=t),direction:e.element.options.inline?"horizontal":"vertical",disabled:e.elementDisabled,shape:"square"},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.options.options,((t,o)=>(vue.openBlock(),vue.createBlock(u,{style:{"margin-bottom":"8px"},name:t.value,key:t.value+o},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.showLabel?t.label:t.value),1)])),_:2},1032,["name"])))),128))])),_:1},16,["modelValue","direction","disabled"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"time"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:5,modelValue:e.element.options.defaultValue,placeholder:e.element.options.placeholder,disabled:e.elementDisabled},{...l.publicProps,...e.element.options.customProps,...e.extendProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},"is-link":""}),null,16,["modelValue","placeholder","disabled","class"])):vue.createCommentVNode("",!0),"date"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:6,modelValue:e.element.options.defaultValue,placeholder:e.element.options.placeholder,disabled:e.elementDisabled},{...l.publicProps,...e.element.options.customProps,...e.extendProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},"is-link":""}),null,16,["modelValue","placeholder","disabled","class"])):vue.createCommentVNode("",!0),"rate"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:7},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(m,vue.mergeProps({modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[3]||(t[3]=t=>e.element.options.defaultValue=t),count:e.element.options.max,"allow-half":e.element.options.allowHalf,disabled:e.elementDisabled},{...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","count","allow-half","disabled"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"color"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:8},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:!0,"model-value":"Not Found"}),null,16,["class"])):vue.createCommentVNode("",!0),"select"==e.element.type?(vue.openBlock(),vue.createBlock(p,{key:9,modelValue:e.element.options.defaultValue,placeholder:e.element.options.placeholder,disabled:e.elementDisabled,publicProps:l.publicProps,customProps:e.element.options.customProps,extendProps:e.extendProps,multiple:e.element.options.multiple,columns:l.selectOptions},null,8,["modelValue","placeholder","disabled","publicProps","customProps","extendProps","multiple","columns"])):vue.createCommentVNode("",!0),"switch"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:10},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(f,vue.mergeProps({modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[4]||(t[4]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled},{...e.element.options.customProps,...e.extendProps},{size:"20"}),null,16,["modelValue","disabled"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"slider"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:11},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(h,vue.mergeProps({modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[5]||(t[5]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled},{...e.element.options.customProps,...e.extendProps},{min:e.element.options.min,max:e.element.options.max,step:e.element.options.step,range:e.element.options.range}),null,16,["modelValue","disabled","min","max","step","range"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"text"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:12},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createElementVNode("span",null,vue.toDisplayString(e.element.options.defaultValue),1)])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"html"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:13},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createElementVNode("span",{innerHTML:e.element.options.defaultValue},null,8,_hoisted_1$y)])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"button"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:14},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(v,vue.mergeProps({block:"",type:e.element.options.buttonType||"default",size:"large"==e.element.options.buttonSize?"normal":"default"==e.element.options.buttonSize?"small":"small"==e.element.options.buttonSize?"mini":"small",plain:e.element.options.buttonPlain,round:e.element.options.buttonRound,disabled:e.elementDisabled},{...e.element.options.customProps,...e.extendProps}),{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.buttonName),1)])),_:1},16,["type","size","plain","round","disabled"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"link"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:15},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:!0,"model-value":"Not Found"}),null,16,["class"])):vue.createCommentVNode("",!0),"cascader"==e.element.type?(vue.openBlock(),vue.createBlock(g,{key:16,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[6]||(t[6]=t=>e.element.options.defaultValue=t),placeholder:e.element.options.placeholder,disabled:e.elementDisabled,customProps:e.element.options.customProps,extendProps:e.extendProps,publicProps:l.publicProps,options:l.selectOptions,"is-path-value":!0},null,8,["modelValue","placeholder","disabled","customProps","extendProps","publicProps","options"])):vue.createCommentVNode("",!0),"treeselect"==e.element.type?(vue.openBlock(),vue.createBlock(g,{key:17,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[7]||(t[7]=t=>e.element.options.defaultValue=t),placeholder:e.element.options.placeholder,disabled:e.elementDisabled,customProps:e.element.options.customProps,extendProps:e.extendProps,publicProps:l.publicProps,options:l.selectOptions,"is-path-value":!1},null,8,["modelValue","placeholder","disabled","customProps","extendProps","publicProps","options"])):vue.createCommentVNode("",!0),"steps"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:18},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(b,vue.mergeProps({active:e.element.options.defaultValue,direction:e.element.options.direction,"active-color":e.element.options.activeColor,"inactive-color":e.element.options.inactiveColor},{...e.element.options.customProps,...e.extendProps},{style:{width:"100%"}}),{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.options.steps,((e,t)=>(vue.openBlock(),vue.createBlock(y,{key:t},{default:vue.withCtx((()=>[vue.createElementVNode("h3",null,vue.toDisplayString(e.title),1),vue.createElementVNode("p",null,vue.toDisplayString(e.description),1)])),_:2},1024)))),128))])),_:1},16,["active","direction","active-color","inactive-color"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"transfer"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:19},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:!0,"model-value":"Not Found"}),null,16,["class"])):vue.createCommentVNode("",!0),"pagination"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:20},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(w,vue.mergeProps({modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[8]||(t[8]=t=>e.element.options.defaultValue=t),"items-per-page":e.element.options.pageSize,"show-page-size":e.element.options.pagerCount,disabled:e.elementDisabled,"total-items":e.element.options.total},{...e.element.options.customProps,...e.extendProps},{"force-ellipses":""}),{"prev-text":vue.withCtx((()=>[vue.createVNode(k,{name:"arrow-left"})])),"next-text":vue.withCtx((()=>[vue.createVNode(k,{name:"arrow"})])),_:1},16,["modelValue","items-per-page","show-page-size","disabled","total-items"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"blank"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:21},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_2$v,vue.toDisplayString(e.element.model),1)])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"component"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:22},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(`component-${e.element.key}`),{style:{width:"100%"},key:e.key,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[9]||(t[9]=t=>e.element.options.defaultValue=t)},null,8,["modelValue"]))])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"fileupload"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:23},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(C,{modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[10]||(t[10]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,readonly:e.element.options.readonly,token:"xxx",domain:"xxx",multiple:e.element.options.multiple,limit:e.element.options.limit,"is-qiniu":e.element.options.isQiniu,"is-delete":e.element.options.isDelete,"is-edit":e.element.options.isEdit,action:e.element.options.action,headers:e.element.options.headers||[],"is-image":!1},null,8,["modelValue","disabled","readonly","multiple","limit","is-qiniu","is-delete","is-edit","action","headers"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"imgupload"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:24},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:e.elementDisabled}),{input:vue.withCtx((()=>[vue.createVNode(C,{modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[11]||(t[11]=t=>e.element.options.defaultValue=t),disabled:e.elementDisabled,readonly:e.element.options.readonly,width:e.element.options.size.width,height:e.element.options.size.height,token:"xxx",domain:"xxx",multiple:e.element.options.multiple,limit:e.element.options.limit,"is-qiniu":e.element.options.isQiniu,"is-delete":e.element.options.isDelete,"is-edit":e.element.options.isEdit,action:e.element.options.action,headers:e.element.options.headers||[]},null,8,["modelValue","disabled","readonly","width","height","multiple","limit","is-qiniu","is-delete","is-edit","action","headers"])])),_:1},16,["class","disabled"])):vue.createCommentVNode("",!0),"editor"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:25},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:!0,"model-value":"Not Found"}),null,16,["class"])):vue.createCommentVNode("",!0),"list"==e.element.type?(vue.openBlock(),vue.createBlock(a,vue.mergeProps({key:26},{...l.publicProps},{class:{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass},disabled:!0,"model-value":"Not Found"}),null,16,["class"])):vue.createCommentVNode("",!0),"custom"==e.element.type?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.element.el),vue.mergeProps({key:27,modelValue:e.element.options.defaultValue,"onUpdate:modelValue":t[12]||(t[12]=t=>e.element.options.defaultValue=t),width:e.element.options.width,height:e.element.options.height,placeholder:e.element.options.placeholder,readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable},{...l.publicProps,...e.element.options.customProps,...e.extendProps}),null,16,["modelValue","width","height","placeholder","readonly","disabled","editable","clearable"])):vue.createCommentVNode("",!0)],64)}var WidgetElementItem=_export_sfc(_sfc_main$Y,[["render",_sfc_render$V]]);const _sfc_main$X={name:"VantWidgetFormItem",components:{WidgetElementItem:WidgetElementItem},props:["config"],mixins:[widgetFormItemMixin]},_hoisted_1$x={key:0,class:"widget-view-action"},_hoisted_2$u=["title"],_hoisted_3$m=["title"],_hoisted_4$k={key:1,class:"widget-view-drag"},_hoisted_5$j={class:"widget-view-type"},_hoisted_6$b={key:2,class:"widget-view-action"},_hoisted_7$8=["title"],_hoisted_8$6=["title"],_hoisted_9$5={key:3,class:"widget-view-drag"},_hoisted_10$4={class:"widget-view-type"};function _sfc_render$U(e,t,o,n,i,l){const a=vue.resolveComponent("widget-element-item"),r=vue.resolveComponent("van-divider"),s=vue.resolveComponent("van-notice-bar");return vue.openBlock(),vue.createElementBlock("div",null,[e.element&&e.element.key&&"divider"!=e.element.type&&"alert"!=e.element.type?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["widget-view",{active:e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[2]||(t[2]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[3]||(t[3]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[4]||(t[4]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetFormItem"},[(vue.openBlock(),vue.createBlock(a,{element:e.element,"is-table":!1,key:e.element.key,label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":o.config.labelWidth+"px",config:o.config},null,8,["element","label","label-width","config"])),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$x,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[0]||(t[0]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$u),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[1]||(t[1]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$m)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$k,t[10]||(t[10]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$j,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)):vue.createCommentVNode("",!0),e.element&&e.element.key&&("divider"==e.element.type||"alert"==e.element.type)?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(["widget-view no-put",{active:e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[7]||(t[7]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[8]||(t[8]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[9]||(t[9]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetFormItem"},["divider"==e.element.type?(vue.openBlock(),vue.createBlock(r,vue.mergeProps({key:0,"content-position":e.element.options.contentPosition},e.element.options.customProps),{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.name),1)])),_:1},16,["content-position"])):vue.createCommentVNode("",!0),"alert"==e.element.type?(vue.openBlock(),vue.createBlock(s,{key:1,wrapable:!0,color:"success"===e.element.options.type?"#07c160":"warning"===e.element.options.type?"#ed6a0c":"error"===e.element.options.type?"#ee0a24":"info"===e.element.options.type?"#1989fa":"",background:"success"===e.element.options.type?"#e8fff0":"warning"===e.element.options.type?"#fffbe8":"error"===e.element.options.type?"#ffe8e8":"info"===e.element.options.type?"#e8f4ff":"","left-icon":e.element.options.showIcon?"success"===e.element.options.type?"passed":"warning"===e.element.options.type?"warning-o":"error"===e.element.options.type?"close":"info"===e.element.options.type?"info-o":"":"",mode:e.element.options.closable?"closeable":""},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.description||e.element.options.title),1)])),_:1},8,["color","background","left-icon","mode"])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$b,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[5]||(t[5]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_7$8),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[6]||(t[6]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_8$6)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$5,t[11]||(t[11]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_10$4,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)):vue.createCommentVNode("",!0)])}var WidgetFormItem=_export_sfc(_sfc_main$X,[["render",_sfc_render$U]]);const _sfc_main$W={name:"widget-col-item",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem,WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$1})))),WidgetInline:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetInline$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$1})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$1})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$1})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$1})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$1}))))},props:["config"],mixins:[widgetColItemMixin]},_hoisted_1$w={key:0,class:"widget-view-action widget-col-action"},_hoisted_2$t=["onClick","title"],_hoisted_3$l=["onClick","title"],_hoisted_4$j={class:"widget-view-type"},_hoisted_5$i={key:0,class:"widget-view-action widget-col-action"},_hoisted_6$a=["title"],_hoisted_7$7=["title"],_hoisted_8$5=["title"],_hoisted_9$4={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_10$3={class:"widget-view-type"};function _sfc_render$T(e,t,o,n,i,l){const a=vue.resolveComponent("widget-col-item",!0),r=vue.resolveComponent("widget-tab-item"),s=vue.resolveComponent("widget-collapse"),d=vue.resolveComponent("widget-table"),u=vue.resolveComponent("widget-sub-form"),c=vue.resolveComponent("widget-card"),m=vue.resolveComponent("widget-group"),p=vue.resolveComponent("widget-inline"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("draggable"),v=vue.resolveComponent("van-col"),g=vue.resolveComponent("van-row");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-col widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[15]||(t[15]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[16]||(t[16]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetCol"},[vue.createVNode(g,{gutter:e.element.options.gutter||0,justify:e.element.options.justify,align:e.element.options.align,class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!(!e.element.options||!e.element.options.customClass)})},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.columns,((n,i)=>(vue.openBlock(),vue.createBlock(v,{class:vue.normalizeClass(["widget-col-item",{active:e.select.key&&e.select.key==n.key,[n.options&&n.options.customClass]:!(!n.options||!n.options.customClass)}]),key:n.key,onClick:vue.withModifiers((t=>e.handleSelectItemWidget(i)),["stop"]),span:e.getColSpan(n.options),offset:n.options?n.options.offset:0,push:n.options?n.options.push:0,pull:n.options?n.options.pull:0,onMouseover:vue.withModifiers((t=>e.handleMouseoverCol(i)),["stop"]),onMouseout:t=>e.handleMouseoutCol(i),ref_for:!0,ref:"widgetColItem"},{default:vue.withCtx((()=>[vue.createVNode(h,vue.mergeProps({list:e.element.columns[i].list,ref_for:!0},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t=>e.handleWidgetColAdd(t,e.element,i),onUpdate:e.handleWidgetColUpdate,onStart:t[9]||(t[9]=t=>e.setDragging(!0)),onEnd:t[10]||(t[10]=t=>e.setDragging(!1)),class:"widget-col-list","item-key":"key"}),{item:vue.withCtx((({element:i,index:l})=>["grid"===i.type?(vue.openBlock(),vue.createBlock(a,{key:`grid-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):"tabs"===i.type?(vue.openBlock(),vue.createBlock(r,{key:`tabs-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):"collapse"===i.type?(vue.openBlock(),vue.createBlock(s,{key:`collapse-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):"table"===i.type?(vue.openBlock(),vue.createBlock(d,{key:`table-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"subform"===i.type?(vue.openBlock(),vue.createBlock(u,{key:`subform-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"card"===i.type?(vue.openBlock(),vue.createBlock(c,{key:`card-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"group"===i.type?(vue.openBlock(),vue.createBlock(m,{key:`group-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"inline"===i.type?(vue.openBlock(),vue.createBlock(p,{key:`inline-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):(vue.openBlock(),vue.createBlock(f,{key:`form-item-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:l,data:n,config:o.config,onSelectChange:t=>e.handleSelectChange(t,n),"form-key":e.formKey},null,8,["element","select","index","data","config","onSelectChange","form-key"]))])),_:2},1040,["list","onAdd","onUpdate"]),e.select.key==n.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$w,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:vue.withModifiers((t=>e.handleColItemClone(e.index,i)),["stop"]),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$t),e.element.columns.length>1?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"fm-iconfont icon-trash",onClick:vue.withModifiers((t=>e.handleColItemDelete(e.index,i)),["stop"]),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$l)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_4$j,[vue.createElementVNode("span",null,vue.toDisplayString(n.type?this.$t("fm.components.fields."+n.type):""),1)])])),_:2},1032,["class","onClick","span","offset","push","pull","onMouseover","onMouseout"])))),128))])),_:1},8,["gutter","justify","align","class"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$i,[vue.createElementVNode("i",{class:"fm-iconfont icon-tianjiazengjiajia",onClick:t[11]||(t[11]=vue.withModifiers((t=>e.handleAddCol(e.index)),["stop"])),title:e.$t("fm.actions.addColumn")},null,8,_hoisted_6$a),vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[12]||(t[12]=vue.withModifiers((t=>e.handleColClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_7$7),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_8$5)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$4,t[17]||(t[17]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_10$3,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetColItem=_export_sfc(_sfc_main$W,[["render",_sfc_render$T]]),WidgetColItem$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetColItem},Symbol.toStringTag,{value:"Module"}));const _sfc_main$V={name:"VantWidgetTabItem",components:{WidgetFormItem:WidgetFormItem,Draggable:draggableComponent,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$1})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$1})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$1})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$1})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$1})))),WidgetInline:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetInline$1}))))},props:["config"],mixins:[widgetTabItemMixin]},_hoisted_1$v={key:0,class:"widget-view-action widget-col-action"},_hoisted_2$s=["title"],_hoisted_3$k=["title"],_hoisted_4$i={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_5$h={class:"widget-view-type"};function _sfc_render$S(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item",!0),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-group"),m=vue.resolveComponent("widget-inline"),p=vue.resolveComponent("widget-col-item"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("draggable"),v=vue.resolveComponent("van-tab"),g=vue.resolveComponent("van-tabs");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-tab widget-view",{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[15]||(t[15]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[16]||(t[16]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetTab"},[vue.createVNode(g,{active:e.tabActive,"onUpdate:active":t[11]||(t[11]=t=>e.tabActive=t),type:e.element.options.type?"card":"line",class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass})},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.tabs,((n,i)=>(vue.openBlock(),vue.createBlock(v,{title:n.label,name:n.name,key:n.name},{default:vue.withCtx((()=>[vue.createVNode(h,vue.mergeProps({modelValue:n.list,"onUpdate:modelValue":e=>n.list=e,ref_for:!0},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t=>e.handleWidgetTabAdd(t,e.element,i),onUpdate:e.handleWidgetTabUpdate,onStart:t[9]||(t[9]=t=>e.setDragging(!0)),onEnd:t[10]||(t[10]=t=>e.setDragging(!1)),class:"widget-col-list","item-key":"key"}),{item:vue.withCtx((({element:i,index:l})=>["tabs"===i.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):"collapse"===i.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):"table"===i.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"subform"===i.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"card"===i.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"group"===i.type?(vue.openBlock(),vue.createBlock(c,{key:`group-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"inline"===i.type?(vue.openBlock(),vue.createBlock(m,{key:`inline-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"grid"===i.type?(vue.openBlock(),vue.createBlock(p,{key:`grid-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):(vue.openBlock(),vue.createBlock(f,{key:`form-item-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","form-key","config"]))])),_:2},1040,["modelValue","onUpdate:modelValue","onAdd","onUpdate"])])),_:2},1032,["title","name"])))),128))])),_:1},8,["active","type","class"]),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$v,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[12]||(t[12]=vue.withModifiers((t=>e.handleTabClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$s),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$k)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$i,t[17]||(t[17]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$h,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetTabItem=_export_sfc(_sfc_main$V,[["render",_sfc_render$S]]),WidgetTabItem$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetTabItem},Symbol.toStringTag,{value:"Module"}));const _sfc_main$U={name:"widget-collapse",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$1})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$1})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$1})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$1})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$1})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$1})))),WidgetInline:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetInline$1}))))},props:["config"],mixins:[widgetCollapseMixin],created(){this.transformTabActive(this.element.options.accordion)},methods:{transformTabActive(e){this.tabActive=e?this.element.tabs.length?this.element.tabs[0].name:"":"string"==typeof this.tabActive?[this.tabActive]:this.tabActive}},watch:{"element.options.accordion":function(e){this.transformTabActive(e)}}},_hoisted_1$u={key:0,class:"widget-view-action widget-col-action"},_hoisted_2$r=["title"],_hoisted_3$j=["title"],_hoisted_4$h={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_5$g={class:"widget-view-type"};function _sfc_render$R(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse",!0),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-group"),m=vue.resolveComponent("widget-inline"),p=vue.resolveComponent("widget-col-item"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("draggable"),v=vue.resolveComponent("van-collapse-item"),g=vue.resolveComponent("van-collapse");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-collapse widget-view",{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[15]||(t[15]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[16]||(t[16]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetCollapse"},[vue.createVNode(g,{modelValue:e.tabActive,"onUpdate:modelValue":t[11]||(t[11]=t=>e.tabActive=t),accordion:e.element.options.accordion,class:vue.normalizeClass({[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass})},{default:vue.withCtx((()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.element.tabs,((n,i)=>(vue.openBlock(),vue.createBlock(v,{key:n.name,title:n.title,name:n.name},{default:vue.withCtx((()=>[vue.createVNode(h,vue.mergeProps({modelValue:n.list,"onUpdate:modelValue":e=>n.list=e,ref_for:!0},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t=>e.handleWidgetTabAdd(t,e.element,i),onUpdate:e.handleWidgetTabUpdate,onStart:t[9]||(t[9]=t=>e.setDragging(!0)),onEnd:t[10]||(t[10]=t=>e.setDragging(!1)),class:"widget-col-list","item-key":"key"}),{item:vue.withCtx((({element:i,index:l})=>["tabs"===i.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):"collapse"===i.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):"table"===i.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"subform"===i.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"card"===i.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"group"===i.type?(vue.openBlock(),vue.createBlock(c,{key:`group-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"inline"===i.type?(vue.openBlock(),vue.createBlock(m,{key:`inline-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"grid"===i.type?(vue.openBlock(),vue.createBlock(p,{key:`grid-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:e.subform,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","subform","config"])):(vue.openBlock(),vue.createBlock(f,{key:`form-item-${i.key}`,element:i,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:l,data:n,onSelectChange:t=>e.handleSelectChange(t,n),"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","form-key","config"]))])),_:2},1040,["modelValue","onUpdate:modelValue","onAdd","onUpdate"])])),_:2},1032,["title","name"])))),128))])),_:1},8,["modelValue","accordion","class"]),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$u,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[12]||(t[12]=vue.withModifiers((t=>e.handleTabClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$r),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$j)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$h,t[17]||(t[17]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$g,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetCollapse=_export_sfc(_sfc_main$U,[["render",_sfc_render$R]]),WidgetCollapse$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetCollapse},Symbol.toStringTag,{value:"Module"}));const _sfc_main$T={name:"widget-inline",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem},props:["config"],mixins:[widgetInlineMixin]},_hoisted_1$t=["size"],_hoisted_2$q={class:"widget-inline-content"},_hoisted_3$i={key:0,class:"widget-view-action widget-inline-action"},_hoisted_4$g=["title"],_hoisted_5$f=["title"],_hoisted_6$9={key:1,class:"widget-view-drag widget-inline-drag"},_hoisted_7$6={class:"widget-view-type"};function _sfc_render$Q(e,t,o,n,i,l){const a=vue.resolveComponent("widget-form-item"),r=vue.resolveComponent("draggable");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-inline widget-view",{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[8]||(t[8]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),size:e.element.options.size,onMouseover:t[9]||(t[9]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[10]||(t[10]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetInline"},[vue.createElementVNode("div",_hoisted_2$q,[vue.createVNode(r,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[2]||(t[2]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[3]||(t[3]=t=>e.handleWidgetInlineAdd(t,e.element)),onUpdate:e.handleWidgetInlineUpdate,onStart:t[4]||(t[4]=t=>e.setDragging(!0)),onEnd:t[5]||(t[5]=t=>e.setDragging(!1)),class:["widget-inline-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key",style:{display:e.element.options.flex?"flex":"block","flex-direction":"row","flex-wrap":"wrap","justify-content":e.element.options.flexJustify||"normal","align-items":e.element.options.flexAlign||"normal"}}),{item:vue.withCtx((({element:n,index:i})=>[n&&n.key?(vue.openBlock(),vue.createBlock(a,{key:n.key,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t[1]||(t[1]=t=>e.handleSelectChange(t,e.element)),"form-key":e.formKey,style:vue.normalizeStyle({"margin-right":e.element.options.spaceSize+"px"}),config:o.config},null,8,["element","select","index","data","form-key","style","config"])):vue.createCommentVNode("",!0)])),_:1},16,["modelValue","onUpdate","class","style"])]),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$i,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[6]||(t[6]=vue.withModifiers((t=>e.handleInlineClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_4$g),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[7]||(t[7]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_5$f)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$9,t[11]||(t[11]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_7$6,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],42,_hoisted_1$t)}var WidgetInline=_export_sfc(_sfc_main$T,[["render",_sfc_render$Q]]),WidgetInline$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetInline},Symbol.toStringTag,{value:"Module"}));const _sfc_main$S={name:"widget-card",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem,WidgetInline:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetInline$1})))),WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$1})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$1})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$1})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$1})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$1}))))},props:["config"],mixins:[widgetCardMixin]},_hoisted_1$s={key:0,class:"widget-view-action widget-subform-action"},_hoisted_2$p=["title"],_hoisted_3$h=["title"],_hoisted_4$f={key:1,class:"widget-view-drag widget-subform-drag"},_hoisted_5$e={class:"widget-view-type"};function _sfc_render$P(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card",!0),c=vue.resolveComponent("widget-inline"),m=vue.resolveComponent("widget-group"),p=vue.resolveComponent("widget-col-item"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("draggable"),v=vue.resolveComponent("van-cell-group");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-card widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[16]||(t[16]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),ref:"widgetCard",onMouseover:t[17]||(t[17]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[18]||(t[18]=(...t)=>e.handleMouseout&&e.handleMouseout(...t))},[vue.createVNode(v,{title:e.element.options.showHeader?e.element.options.title:"",border:e.element.options.bordered},{default:vue.withCtx((()=>[vue.createVNode(h,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[10]||(t[10]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[11]||(t[11]=t=>e.handleWidgetCardAdd(t,e.element)),onUpdate:e.handleWidgetCardUpdate,onStart:t[12]||(t[12]=t=>e.setDragging(!0)),onEnd:t[13]||(t[13]=t=>e.setDragging(!1)),class:["widget-col-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key"}),{item:vue.withCtx((({element:n,index:i})=>["tabs"===n.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"collapse"===n.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"table"===n.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"subform"===n.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"card"===n.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"inline"===n.type?(vue.openBlock(),vue.createBlock(c,{key:`inline-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"group"===n.type?(vue.openBlock(),vue.createBlock(m,{key:`group-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"grid"===n.type?(vue.openBlock(),vue.createBlock(p,{key:`grid-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):(vue.openBlock(),vue.createBlock(f,{key:n.key,element:n,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t[9]||(t[9]=t=>e.handleSelectChange(t,e.element)),"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","form-key","config"]))])),_:1},16,["modelValue","onUpdate","class"])])),_:1},8,["title","border"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$s,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$p),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$h)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$f,t[19]||(t[19]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$e,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetCard=_export_sfc(_sfc_main$S,[["render",_sfc_render$P]]),WidgetCard$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetCard},Symbol.toStringTag,{value:"Module"}));const _sfc_main$R={components:{WidgetElementItem:WidgetElementItem},props:["config"],mixins:[widgetTableItemMixin]},_hoisted_1$r={key:0,class:"widget-view-action"},_hoisted_2$o=["title"],_hoisted_3$g=["title"],_hoisted_4$e={key:1,class:"widget-view-drag"},_hoisted_5$d={class:"widget-view-type"};function _sfc_render$O(e,t,o,n,i,l){const a=vue.resolveComponent("widget-element-item");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-table-view",{active:e.selectWidget.key==e.element.key,is_req:e.element.options.required,is_hidden:e.element.options.hidden,mobile:"mobile"==e.platform}]),onClick:t[2]||(t[2]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[3]||(t[3]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[4]||(t[4]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetTableItem",style:vue.normalizeStyle({width:"mobile"!=e.platform?e.element.options.width?e.element.options.width:"200px":""})},[(vue.openBlock(),vue.createBlock(a,{element:e.element,"is-table":!0,key:e.element.key,label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":o.config.labelWidth+"px",config:o.config},null,8,["element","label","label-width","config"])),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$r,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[0]||(t[0]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_2$o),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[1]||(t[1]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_3$g)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$e,t[5]||(t[5]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_5$d,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],38)}var WidgetTableItem=_export_sfc(_sfc_main$R,[["render",_sfc_render$O]]);const _sfc_main$Q={components:{Draggable:draggableComponent,WidgetTableItem:WidgetTableItem},props:["config"],mixins:[widgetTableMixin]},_hoisted_1$q={class:"widget-table-wrapper mobile",style:{width:"100%"}},_hoisted_2$n={key:0,class:"widget-table-top",style:{display:"flex","align-items":"center"}},_hoisted_3$f={key:1},_hoisted_4$d={class:"widget-table-content mobile"},_hoisted_5$c={key:0,class:"widget-view-action widget-col-action"},_hoisted_6$8=["title"],_hoisted_7$5=["title"],_hoisted_8$4={key:1,class:"widget-view-drag widget-col-drag"},_hoisted_9$3={class:"widget-view-type"};function _sfc_render$N(e,t,o,n,i,l){const a=vue.resolveComponent("van-checkbox"),r=vue.resolveComponent("widget-table-item"),s=vue.resolveComponent("draggable"),d=vue.resolveComponent("van-field");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-table widget-view",{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden,mobile:"mobile"==e.platform}]),onClick:t[7]||(t[7]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[8]||(t[8]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[9]||(t[9]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetTable"},[vue.createVNode(d,{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":o.config.labelWidth+"px",labelAlign:e.element.options.labelWrap?"top":o.config.labelPosition,style:{"padding-right":"2px"}},{input:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_1$q,["mobile"==e.platform?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$n,[e.element.options.selection?(vue.openBlock(),vue.createBlock(a,{key:0,style:{"margin-right":"10px"},shape:"square"},{default:vue.withCtx((()=>t[10]||(t[10]=[vue.createTextVNode("# 1")]))),_:1})):(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$f,"# 1"))])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_4$d,[vue.createVNode(s,{modelValue:e.element.tableColumns,"onUpdate:modelValue":t[1]||(t[1]=t=>e.element.tableColumns=t),group:{name:"people",put:e.handlePut},"ghost-class":"ghost",animation:200,handle:".drag-widget","no-transition-on-drag":!0,onAdd:t[2]||(t[2]=t=>e.handleWidgetTableAdd(t,e.element)),onUpdate:e.handleWidgetTableUpdate,onStart:t[3]||(t[3]=t=>e.setDragging(!0)),onEnd:t[4]||(t[4]=t=>e.setDragging(!1)),class:"widget-table-col","item-key":"key"},{item:vue.withCtx((({element:n,index:i})=>[(vue.openBlock(),vue.createBlock(r,{key:n.key,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:e.element.tableColumns,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"]))])),_:1},8,["modelValue","group","onUpdate"])])])])),_:1},8,["label","label-width","labelAlign"]),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$c,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[5]||(t[5]=vue.withModifiers((t=>e.handleTableClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_6$8),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[6]||(t[6]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_7$5)])):vue.createCommentVNode("",!0),e.selectWidget.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$4,t[11]||(t[11]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_9$3,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetTable=_export_sfc(_sfc_main$Q,[["render",_sfc_render$N]]),WidgetTable$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetTable},Symbol.toStringTag,{value:"Module"}));const _sfc_main$P={name:"widget-sub-form",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$1})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$1})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$1})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$1})))),WidgetInline:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetInline$1})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$1}))))},props:["config"],mixins:[widgetSubFormMixin]},_hoisted_1$p={class:"widget-subform-wrapper"},_hoisted_2$m={key:0,class:"widget-view-action widget-subform-action"},_hoisted_3$e=["title"],_hoisted_4$c=["title"],_hoisted_5$b={key:1,class:"widget-view-drag widget-subform-drag"},_hoisted_6$7={class:"widget-view-type"};function _sfc_render$M(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-card"),d=vue.resolveComponent("widget-group"),u=vue.resolveComponent("widget-inline"),c=vue.resolveComponent("widget-sub-form",!0),m=vue.resolveComponent("widget-table"),p=vue.resolveComponent("widget-col-item"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("draggable"),v=vue.resolveComponent("van-field");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-subform widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[16]||(t[16]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[17]||(t[17]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetSubform"},[vue.createVNode(v,{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":o.config.labelWidth+"px",labelAlign:e.element.options.labelWrap?"top":o.config.labelPosition,style:{"padding-right":"2px"}},{input:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_1$p,[vue.createVNode(h,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[9]||(t[9]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[10]||(t[10]=t=>e.handleWidgetSubFormAdd(t,e.element)),onUpdate:e.handleWidgetSubFormUpdate,onStart:t[11]||(t[11]=t=>e.setDragging(!0)),onEnd:t[12]||(t[12]=t=>e.setDragging(!1)),class:["widget-col-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key"}),{item:vue.withCtx((({element:n,index:i})=>["tabs"===n.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:!0,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"collapse"===n.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:!0,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"card"===n.type?(vue.openBlock(),vue.createBlock(s,{key:`card-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:!0,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"group"===n.type?(vue.openBlock(),vue.createBlock(d,{key:`group-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:!0,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"inline"===n.type?(vue.openBlock(),vue.createBlock(u,{key:`inline-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:!0,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"subform"===n.type?(vue.openBlock(),vue.createBlock(c,{key:`subform-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:!0,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"table"===n.type?(vue.openBlock(),vue.createBlock(m,{key:`table-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:!0,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"grid"===n.type?(vue.openBlock(),vue.createBlock(p,{key:`grid-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,subform:!0,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):(vue.openBlock(),vue.createBlock(f,{key:`form-item-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","form-key","config"]))])),_:1},16,["modelValue","onUpdate","class"])])])),_:1},8,["label","label-width","labelAlign"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$m,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_3$e),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_4$c)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$b,t[18]||(t[18]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_6$7,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetSubForm=_export_sfc(_sfc_main$P,[["render",_sfc_render$M]]),WidgetSubForm$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetSubForm},Symbol.toStringTag,{value:"Module"}));const _sfc_main$O={name:"widget-group",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$1})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$1})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$1})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$1})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$1})))),WidgetInline:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetInline$1}))))},props:["config"],mixins:[widgetGroupMixin]},_hoisted_1$o={style:{width:"100%"}},_hoisted_2$l={key:0,class:"widget-view-action widget-subform-action"},_hoisted_3$d=["title"],_hoisted_4$b=["title"],_hoisted_5$a={key:1,class:"widget-view-drag widget-subform-drag"},_hoisted_6$6={class:"widget-view-type"};function _sfc_render$L(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-inline"),m=vue.resolveComponent("widget-group",!0),p=vue.resolveComponent("widget-col-item"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("draggable"),v=vue.resolveComponent("van-field");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-group widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden}]),onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[16]||(t[16]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[17]||(t[17]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetGroup"},[vue.createVNode(v,{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":o.config.labelWidth+"px",labelAlign:e.element.options.labelWrap?"top":o.config.labelPosition,style:{"padding-right":"2px"}},{input:vue.withCtx((()=>[vue.createElementVNode("div",_hoisted_1$o,[vue.createVNode(h,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[9]||(t[9]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[10]||(t[10]=t=>e.handleWidgetGroupAdd(t,e.element)),onUpdate:e.handleWidgetGroupUpdate,onStart:t[11]||(t[11]=t=>e.setDragging(!0)),onEnd:t[12]||(t[12]=t=>e.setDragging(!1)),class:["widget-col-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key"}),{item:vue.withCtx((({element:n,index:i})=>["tabs"===n.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"collapse"===n.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"table"===n.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"subform"===n.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"card"===n.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"inline"===n.type?(vue.openBlock(),vue.createBlock(c,{key:`inline-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"group"===n.type?(vue.openBlock(),vue.createBlock(m,{key:`group-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"grid"===n.type?(vue.openBlock(),vue.createBlock(p,{key:`grid-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):(vue.openBlock(),vue.createBlock(f,{key:`form-item-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","form-key","config"]))])),_:1},16,["modelValue","onUpdate","class"])])])),_:1},8,["label","label-width","labelAlign"]),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$l,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_3$d),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_4$b)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$a,t[18]||(t[18]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_6$6,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetGroup=_export_sfc(_sfc_main$O,[["render",_sfc_render$L]]),WidgetGroup$1=Object.freeze(Object.defineProperty({__proto__:null,default:WidgetGroup},Symbol.toStringTag,{value:"Module"}));const _sfc_main$N={name:"widget-dialog",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem,WidgetColItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetColItem$1})))),WidgetTabItem:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTabItem$1})))),WidgetCollapse:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCollapse$1})))),WidgetTable:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetTable$1})))),WidgetSubForm:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetSubForm$1})))),WidgetCard:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetCard$1})))),WidgetGroup:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetGroup$1})))),WidgetInline:vue.defineAsyncComponent((()=>Promise.resolve().then((function(){return WidgetInline$1}))))},props:["config"],mixins:[widgetDialogMixin]},_hoisted_1$n={class:"el-dialog__header"},_hoisted_2$k={class:"el-dialog__title"},_hoisted_3$c={key:0,"aria-label":"Close this dialog",class:"el-dialog__headerbtn",type:"button"},_hoisted_4$a={class:"el-dialog__body"},_hoisted_5$9={key:0,class:"el-dialog__footer"},_hoisted_6$5={key:0,class:"widget-view-action widget-subform-action"},_hoisted_7$4=["title"],_hoisted_8$3=["title"],_hoisted_9$2={key:1,class:"widget-view-drag widget-subform-drag"},_hoisted_10$2={class:"widget-view-type"};function _sfc_render$K(e,t,o,n,i,l){const a=vue.resolveComponent("widget-tab-item"),r=vue.resolveComponent("widget-collapse"),s=vue.resolveComponent("widget-table"),d=vue.resolveComponent("widget-sub-form"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-group"),m=vue.resolveComponent("widget-inline"),p=vue.resolveComponent("widget-col-item"),f=vue.resolveComponent("widget-form-item"),h=vue.resolveComponent("draggable"),v=vue.resolveComponent("el-button");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["widget-dialog widget-view",{active:e.select.key&&e.select.key==e.element.key,is_hidden:!e.element.options.visible}]),onClick:t[15]||(t[15]=vue.withModifiers((t=>e.handleSelectWidget(e.index)),["stop"])),onMouseover:t[16]||(t[16]=vue.withModifiers(((...t)=>e.handleMouseover&&e.handleMouseover(...t)),["stop"])),onMouseout:t[17]||(t[17]=(...t)=>e.handleMouseout&&e.handleMouseout(...t)),ref:"widgetDialog"},[vue.createElementVNode("div",{class:vue.normalizeClass(["el-dialog",{"el-dialog--center":e.element.options.center}]),style:vue.normalizeStyle({"--el-dialog-width":e.element.options.width?e.element.options.width:"100%","--el-dialog-margin-top":e.element.options.top})},[vue.createElementVNode("div",_hoisted_1$n,[vue.createElementVNode("span",_hoisted_2$k,vue.toDisplayString(e.element.options.title),1),e.element.options.showClose?(vue.openBlock(),vue.createElementBlock("button",_hoisted_3$c,t[18]||(t[18]=[vue.createElementVNode("i",{class:"el-icon el-dialog__close"},[vue.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[vue.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})])],-1)]))):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_4$a,[vue.createVNode(h,vue.mergeProps({modelValue:e.element.list,"onUpdate:modelValue":t[9]||(t[9]=t=>e.element.list=t)},{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},{"no-transition-on-drag":!0,onAdd:t[10]||(t[10]=t=>e.handleWidgetDialogAdd(t,e.element)),onUpdate:e.handleWidgetDialogUpdate,onStart:t[11]||(t[11]=t=>e.setDragging(!0)),onEnd:t[12]||(t[12]=t=>e.setDragging(!1)),class:["widget-col-list",{[e.element.options&&e.element.options.customClass]:!!e.element.options.customClass}],"item-key":"key"}),{item:vue.withCtx((({element:n,index:i})=>["tabs"===n.type?(vue.openBlock(),vue.createBlock(a,{key:`tabs-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"collapse"===n.type?(vue.openBlock(),vue.createBlock(r,{key:`collapse-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"table"===n.type?(vue.openBlock(),vue.createBlock(s,{key:`table-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"subform"===n.type?(vue.openBlock(),vue.createBlock(d,{key:`subform-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"card"===n.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"group"===n.type?(vue.openBlock(),vue.createBlock(c,{key:`group-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"inline"===n.type?(vue.openBlock(),vue.createBlock(m,{key:`inline-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"grid"===n.type?(vue.openBlock(),vue.createBlock(p,{key:`grid-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),platform:e.platform,"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):(vue.openBlock(),vue.createBlock(f,{key:`form-item-${n.key}`,element:n,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:i,data:e.element,onSelectChange:t=>e.handleSelectChange(t,n),"form-key":e.formKey,config:o.config},null,8,["element","select","index","data","onSelectChange","form-key","config"]))])),_:1},16,["modelValue","onUpdate","class"])]),e.element.options.showCancel||e.element.options.showOk?(vue.openBlock(),vue.createElementBlock("div",_hoisted_5$9,[vue.createElementVNode("div",null,[e.element.options.showCancel?(vue.openBlock(),vue.createBlock(v,{key:0},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.cancelText),1)])),_:1})):vue.createCommentVNode("",!0),e.element.options.showOk?(vue.openBlock(),vue.createBlock(v,{key:1,type:"primary",loading:e.element.options.confirmLoading},{default:vue.withCtx((()=>[vue.createTextVNode(vue.toDisplayString(e.element.options.okText),1)])),_:1},8,["loading"])):vue.createCommentVNode("",!0)])])):vue.createCommentVNode("",!0)],6),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$5,[vue.createElementVNode("i",{class:"fm-iconfont icon-icon_clone",onClick:t[13]||(t[13]=vue.withModifiers((t=>e.handleWidgetClone(e.index)),["stop"])),title:e.$t("fm.tooltip.clone")},null,8,_hoisted_7$4),vue.createElementVNode("i",{class:"fm-iconfont icon-trash",onClick:t[14]||(t[14]=vue.withModifiers((t=>e.handleWidgetDelete(e.index)),["stop"])),title:e.$t("fm.tooltip.trash")},null,8,_hoisted_8$3)])):vue.createCommentVNode("",!0),e.select.key==e.element.key?(vue.openBlock(),vue.createElementBlock("div",_hoisted_9$2,t[19]||(t[19]=[vue.createElementVNode("i",{class:"fm-iconfont icon-drag drag-widget"},null,-1)]))):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"widget-view-model",style:vue.normalizeStyle({color:e.element.options.dataBind?"":"#666"})},[vue.createElementVNode("span",null,vue.toDisplayString(e.element.model),1)],4),vue.createElementVNode("div",_hoisted_10$2,[vue.createElementVNode("span",null,vue.toDisplayString(e.element.type?this.$t("fm.components.fields."+e.element.type):""),1)])],34)}var WidgetDialog=_export_sfc(_sfc_main$N,[["render",_sfc_render$K]]);const _sfc_main$M={name:"VantWidgetForm",components:{Draggable:draggableComponent,WidgetFormItem:WidgetFormItem,WidgetColItem:WidgetColItem,WidgetTabItem:WidgetTabItem,WidgetCollapse:WidgetCollapse,WidgetInline:WidgetInline,WidgetCard:WidgetCard,WidgetTable:WidgetTable,WidgetSubForm:WidgetSubForm,WidgetGroup:WidgetGroup,WidgetDialog:WidgetDialog},inject:["isDark"],mixins:[widgetFormMixin]},_hoisted_1$m={key:0,class:"form-empty"},_hoisted_2$j={key:1,style:{height:"0"}};function _sfc_render$J(e,t,o,n,i,l){const a=vue.resolveComponent("widget-col-item"),r=vue.resolveComponent("widget-tab-item"),s=vue.resolveComponent("widget-collapse"),d=vue.resolveComponent("widget-inline"),u=vue.resolveComponent("widget-card"),c=vue.resolveComponent("widget-table"),m=vue.resolveComponent("widget-sub-form"),p=vue.resolveComponent("widget-group"),f=vue.resolveComponent("widget-dialog"),h=vue.resolveComponent("widget-form-item"),v=vue.resolveComponent("draggable"),g=vue.resolveComponent("el-scrollbar"),y=vue.resolveComponent("van-form"),b=vue.resolveComponent("van-config-provider");return vue.openBlock(),vue.createBlock(b,{theme:l.isDark?"dark":"light"},{default:vue.withCtx((()=>{var o;return[vue.createElementVNode("div",{class:vue.normalizeClass(["widget-form-container",`${e.platform}`])},[vue.createVNode(y,{"label-align":e.data.config.labelPosition,"label-width":e.data.config.labelWidth+"px",class:vue.normalizeClass({[e.data.config&&e.data.config.customClass]:!(!e.data.config||!e.data.config.customClass)}),colon:!!(null==(o=e.data.config)?void 0:o.labelSuffix)},{default:vue.withCtx((()=>[0==e.data.list.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$m,vue.toDisplayString(e.$t("fm.description.containerEmpty")),1)):vue.createCommentVNode("",!0),vue.createVNode(g,{ref:"formScrollRef"},{default:vue.withCtx((()=>[vue.createVNode(v,vue.mergeProps({list:e.data.list},{group:"people",ghostClass:"ghost",animation:200,handle:".drag-widget"},{onAdd:e.handleWidgetAdd,onUpdate:e.handleWidgetUpdate,onStart:e.handleMoveStart,onEnd:e.handleMoveEnd,"no-transition-on-drag":!0,"item-key":"key",class:"widget-form-list"}),{item:vue.withCtx((({element:o,index:n})=>["grid"===o.type?(vue.openBlock(),vue.createBlock(a,{key:`grid-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[0]||(t[0]=t=>e.selectWidget=t),index:n,data:e.data,config:e.data.config,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","config","onSelectChange","platform","form-key"])):"report"===o.type?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$j)):"tabs"===o.type?(vue.openBlock(),vue.createBlock(r,{key:`tabs-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[1]||(t[1]=t=>e.selectWidget=t),index:n,data:e.data,config:e.data.config,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","config","onSelectChange","platform","form-key"])):"collapse"===o.type?(vue.openBlock(),vue.createBlock(s,{key:`collapse-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[2]||(t[2]=t=>e.selectWidget=t),index:n,data:e.data,config:e.data.config,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","config","onSelectChange","platform","form-key"])):"inline"===o.type?(vue.openBlock(),vue.createBlock(d,{key:`inline-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[3]||(t[3]=t=>e.selectWidget=t),index:n,data:e.data,config:e.data.config,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey},null,8,["element","select","index","data","config","onSelectChange","platform","form-key"])):"card"===o.type?(vue.openBlock(),vue.createBlock(u,{key:`card-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[4]||(t[4]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey,config:e.data.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"table"===o.type?(vue.openBlock(),vue.createBlock(c,{key:`table-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[5]||(t[5]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey,config:e.data.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"subform"===o.type?(vue.openBlock(),vue.createBlock(m,{key:`subform-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[6]||(t[6]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey,config:e.data.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"group"===o.type?(vue.openBlock(),vue.createBlock(p,{key:`group-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[7]||(t[7]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey,config:e.data.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):"dialog"===o.type?(vue.openBlock(),vue.createBlock(f,{key:`dialog-${o.key}`,element:o,select:e.selectWidget,"onUpdate:select":t[8]||(t[8]=t=>e.selectWidget=t),index:n,data:e.data,onSelectChange:e.handleSelectChange,platform:e.platform,"form-key":e.formKey,config:e.data.config},null,8,["element","select","index","data","onSelectChange","platform","form-key","config"])):(vue.openBlock(),vue.createBlock(h,{key:10,element:o,select:e.selectWidget,"onUpdate:select":t[9]||(t[9]=t=>e.selectWidget=t),index:n,data:e.data,config:e.data.config,formKey:e.formKey,onSelectChange:e.handleSelectChange},null,8,["element","select","index","data","config","formKey","onSelectChange"]))])),_:1},16,["list","onAdd","onUpdate","onStart","onEnd"])])),_:1},512)])),_:1},8,["label-align","label-width","class","colon"])],2)]})),_:1},8,["theme"])}var VantWidgetForm=_export_sfc(_sfc_main$M,[["render",_sfc_render$J]]);const _sfc_main$L={components:{},created(){void 0===vue.getCurrentInstance().appContext.components.AConfigProvider&&(this.$options.components["a-config-provider"]=(e,{slots:t})=>{var o;return vue.h("div",null==(o=t.default)?void 0:o.call(t))})},inject:{themeAlgorithm:{default:null}}};function _sfc_render$I(e,t,o,n,i,l){const a=vue.resolveComponent("a-config-provider");return vue.openBlock(),vue.createBlock(a,{theme:{algorithm:l.themeAlgorithm}},{default:vue.withCtx((()=>[vue.renderSlot(e.$slots,"default")])),_:3},8,["theme"])}var AntdvWidgetForm=_export_sfc(_sfc_main$L,[["render",_sfc_render$I]]),clipboard={exports:{}}; /*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */ !function(e,t){var o;o=function(){return function(){var e={686:function(e,t,o){o.d(t,{default:function(){return _}});var n=o(279),i=o.n(n),l=o(370),a=o.n(l),r=o(817),s=o.n(r);function d(e){try{return document.execCommand(e)}catch(t){return!1}}var u=function(e){var t=s()(e);return d("cut"),t},c=function(e,t){var o=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),o=document.createElement("textarea");o.style.fontSize="12pt",o.style.border="0",o.style.padding="0",o.style.margin="0",o.style.position="absolute",o.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;return o.style.top="".concat(n,"px"),o.setAttribute("readonly",""),o.value=e,o}(e);t.container.appendChild(o);var n=s()(o);return d("copy"),o.remove(),n},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},o="";return"string"==typeof e?o=c(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?o=c(e.value,t):(o=s()(e),d("copy")),o};function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,o=void 0===t?"copy":t,n=e.container,i=e.target,l=e.text;if("copy"!==o&&"cut"!==o)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==i){if(!i||"object"!==p(i)||1!==i.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===o&&i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===o&&(i.hasAttribute("readonly")||i.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return l?m(l,{container:n}):i?"cut"===o?u(i):m(i,{container:n}):void 0};function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,o=this.action(t)||"copy",n=f({action:o,container:this.container,target:this.target(t),text:this.text(t)});this.emit(n?"success":"error",{action:o,text:n,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return w("action",e)}},{key:"defaultTarget",value:function(e){var t=w("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return w("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],n=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return m(e,t)}},{key:"cut",value:function(e){return u(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,o=!!document.queryCommandSupported;return t.forEach((function(e){o=o&&!!document.queryCommandSupported(e)})),o}}],o&&v(t.prototype,o),n&&v(t,n),l}(i()),_=C},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,o){var n=o(828);function i(e,t,o,n,i){var a=l.apply(this,arguments);return e.addEventListener(o,a,i),{destroy:function(){e.removeEventListener(o,a,i)}}}function l(e,t,o,i){return function(o){o.delegateTarget=n(o.target,t),o.delegateTarget&&i.call(e,o)}}e.exports=function(e,t,o,n,l){return"function"==typeof e.addEventListener?i.apply(null,arguments):"function"==typeof o?i.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return i(e,t,o,n,l)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var o=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===o||"[object HTMLCollection]"===o)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,o){var n=o(879),i=o(438);e.exports=function(e,t,o){if(!e&&!t&&!o)throw new Error("Missing required arguments");if(!n.string(t))throw new TypeError("Second argument must be a String");if(!n.fn(o))throw new TypeError("Third argument must be a Function");if(n.node(e))return function(e,t,o){return e.addEventListener(t,o),{destroy:function(){e.removeEventListener(t,o)}}}(e,t,o);if(n.nodeList(e))return function(e,t,o){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,o)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,o)}))}}}(e,t,o);if(n.string(e))return function(e,t,o){return i(document.body,e,t,o)}(e,t,o);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var o=e.hasAttribute("readonly");o||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),o||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),i=document.createRange();i.selectNodeContents(e),n.removeAllRanges(),n.addRange(i),t=n.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,o){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:o}),this},once:function(e,t,o){var n=this;function i(){n.off(e,i),t.apply(o,arguments)}return i._=t,this.on(e,i,o)},emit:function(e){for(var t=[].slice.call(arguments,1),o=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=o.length;n\n\tThis is a HTML5\n',labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,required:!1,validatorCheck:!1,validator:"",width:"",tip:""},events:{onMounted:"",onChange:""}},{type:"button",icon:"icon-button",options:{customClass:"",disabled:!1,labelWidth:100,isLabelWidth:!1,hideLabel:!0,hidden:!1,buttonSize:"default",buttonType:"",buttonPlain:!1,buttonRound:!1,buttonCircle:!1,buttonName:"Button",width:"",customProps:{},tip:"",extendProps:{}},events:{onMounted:"",onClick:""}},{type:"link",icon:"icon-lianjie",options:{customClass:"",disabled:!1,labelWidth:100,isLabelWidth:!1,hideLabel:!1,hidden:!1,linkType:"default",linkName:"Link",underline:!0,blank:!0,href:"",customProps:{},tip:"",extendProps:{}},events:{onMounted:"",onClick:""}},{type:"cascader",icon:"icon-jilianxuanze",options:{defaultValue:[],width:"",placeholder:"",disabled:!1,clearable:!1,options:[{value:"Option 1",label:"Option 1",children:[{value:"Option 1 - children",label:"Option 1 - children"}]},{value:"Option 2",label:"Option 2",children:[{value:"Option 2 - children",label:"Option 2 - children"}]},{value:"Option 3",label:"Option 3"}],remote:!1,remoteType:"datasource",remoteOption:"",remoteOptions:[],props:{value:"value",label:"label",children:"children"},remoteFunc:"",customClass:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,required:!1,validatorCheck:!1,validator:"",multiple:!1,filterable:!1,checkStrictly:!1,customProps:{},tip:"",extendProps:{}},events:{onMounted:"",onChange:"",onFocus:"",onBlur:""}},{type:"treeselect",icon:"icon-shuxuanzeqi",options:{defaultValue:[],width:"",placeholder:"",disabled:!1,clearable:!1,options:[{value:"Option 1",label:"Option 1",children:[{value:"Option 1 - children",label:"Option 1 - children"}]},{value:"Option 2",label:"Option 2",children:[{value:"Option 2 - children",label:"Option 2 - children"}]},{value:"Option 3",label:"Option 3"}],remote:!1,remoteType:"datasource",remoteOption:"",remoteOptions:[],props:{value:"value",label:"label",children:"children"},remoteFunc:"",customClass:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,required:!1,validatorCheck:!1,validator:"",multiple:!1,filterable:!1,checkStrictly:!1,customProps:{},tip:"",extendProps:{}},events:{onMounted:"",onChange:"",onFocus:"",onBlur:""}},{type:"steps",icon:"icon-m-buzhou",options:{defaultValue:0,customClass:"",labelWidth:100,isLabelWidth:!1,hideLabel:!0,hidden:!1,dataBind:!0,steps:[{title:"Step 1"},{title:"Step 2"},{title:"Step 3"}],props:{title:"title",description:"description"},remote:!1,width:"",direction:"horizontal",processStatus:"process",finishStatus:"finish",alignCenter:!1,simple:!1,remoteType:"datasource",customProps:{},tip:"",extendProps:{}},events:{onMounted:"",onChange:""}},{type:"transfer",icon:"icon-m-chuansuokuang",options:{defaultValue:[],customClass:"",labelWidth:100,isLabelWidth:!1,hideLabel:!1,hidden:!1,dataBind:!0,data:[{key:"1",label:"Option 1"},{key:"2",label:"Option 2"},{key:"3",label:"Option 3"}],props:{key:"key",label:"label",disabled:"disabled"},filterable:!1,required:!1,validatorCheck:!1,validator:"",width:"",remote:!1,titles:["Source","Target"],disabled:!1,remoteType:"datasource",customProps:{},tip:"",extendProps:{}},events:{onMounted:"",onChange:""}},{type:"pagination",icon:"icon-pagination",options:{defaultValue:1,customClass:"",disabled:!1,labelWidth:100,isLabelWidth:!1,hideLabel:!0,hidden:!1,dataBind:!0,background:!0,pageSize:10,pagerCount:5,total:100,customProps:{},extendProps:{}},events:{onMounted:"",onChange:""}}],advanceComponents=[{type:"blank",icon:"icon-zidingyishuju",options:{defaultType:"String",customClass:"",width:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,required:!1,pattern:"",validator:"",tip:""},events:{onMounted:"",onChange:""}},{type:"component",icon:"icon-component",options:{customClass:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,template:"
自定义内容
",required:!1,pattern:"",validator:"",width:"",tip:""},events:{onMounted:"",onChange:""}},{type:"fileupload",icon:"icon-wenjianshangchuan",options:{defaultValue:[],width:"",tokenFunc:"funcGetToken",token:"",tokenType:"datasource",domain:"",disabled:!1,tip:"",action:"",customClass:"",limit:9,multiple:!1,isQiniu:!1,labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,headers:[],required:!1,validatorCheck:!1,validator:"",withCredentials:!1},events:{onMounted:"",onChange:"",onSelect:"",onUploadSuccess:"",onUploadError:"",onRemove:""}},{type:"imgupload",icon:"icon-tupian",options:{defaultValue:[],size:{width:100,height:100},width:"",tokenFunc:"funcGetToken",token:"",tokenType:"datasource",domain:"",disabled:!1,readonly:!1,limit:8,multiple:!1,isQiniu:!1,isDelete:!0,min:0,isEdit:!0,action:"",customClass:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,headers:[],required:!1,validatorCheck:!1,validator:"",withCredentials:!1,tip:""},events:{onMounted:"",onChange:"",onSelect:"",onUploadSuccess:"",onUploadError:"",onRemove:""}},{type:"editor",icon:"icon-fuwenbenkuang",options:{defaultValue:"",width:"",customClass:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,customToolbar:[["bold","italic","underline","strike",{color:[]},{background:[]},{align:[]},{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"}],[{font:[]},{header:[1,2,3,4,5,6,!1]}],[{script:"sub"},{script:"super"}],["link","image","blockquote","code-block"],[{direction:"rtl"}],["clean"]],disabled:!1,required:!1,validatorCheck:!1,validator:"",tip:""},events:{onMounted:"",onChange:""}},{type:"list",icon:"icon-shujubiaoge",options:{defaultValue:[{date:"2016-05-03",name:"Tom",state:"California",city:"Los Angeles",address:"No. 189, Grove St, Los Angeles",zip:"CA 90036",tag:"Home"},{date:"2016-05-02",name:"Tom",state:"California",city:"Los Angeles",address:"No. 189, Grove St, Los Angeles",zip:"CA 90036",tag:"Office"},{date:"2016-05-04",name:"Tom",state:"California",city:"Los Angeles",address:"No. 189, Grove St, Los Angeles",zip:"CA 90036",tag:"Home"},{date:"2016-05-01",name:"Tom",state:"California",city:"Los Angeles",address:"No. 189, Grove St, Los Angeles",zip:"CA 90036",tag:"Office"}],width:"",maxHeight:"",stripe:!1,border:!1,customClass:"",labelWidth:100,isLabelWidth:!1,hideLabel:!0,hidden:!1,dataBind:!0,columns:[{label:"Date",prop:"date",width:"",sortable:!1,fixed:!1,align:"left",headderAlign:"left",fixedOption:"left",defaultSlot:!1,defaultSlotTemplate:"",headerSlot:!1,headerSlotTemplate:"",key:"69vku4oh"},{label:"Name",prop:"name",width:"",sortable:!1,fixed:!1,align:"left",headderAlign:"left",fixedOption:"left",defaultSlot:!1,defaultSlotTemplate:"",headerSlot:!1,headerSlotTemplate:"",key:"8zm66bqm"},{label:"Address",prop:"address",width:"",sortable:!1,fixed:!1,align:"left",headderAlign:"left",fixedOption:"left",defaultSlot:!1,defaultSlotTemplate:"",headerSlot:!1,headerSlotTemplate:"",key:"ariv7pud"}],highlight:!1,selection:!1,showOperation:!1,operations:{width:200,buttons:[]},pagination:{paging:!1,pageSize:10,currentPage:1,pagerCount:7,pageSizes:"10, 20, 50, 100",background:!1,small:!1,props:{list:"records",total:"total",size:"pageSize",current:"currentPage"}},tip:""},events:{onMounted:"",onChange:"",onPageChange:"",onCurrentRow:"",onSelectionChange:""}}],layoutComponents=[{type:"grid",icon:"icon-RectangleCopy",columns:[{type:"col",options:{span:12,offset:0,push:0,pull:0,xs:24,sm:12,md:12,lg:12,xl:12,customClass:""},list:[]}],options:{gutter:0,justify:"start",align:"top",customClass:"",hidden:!1,flex:!0,responsive:!0}},{type:"report",icon:"icon-table1",options:{customClass:"",hidden:!1,borderWidth:1,borderColor:"#999",width:"100%"},headerRow:[{type:"th",options:{width:""}}],rows:[{columns:[{type:"td",options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},list:[]}]}]},{type:"tabs",icon:"icon-tabs",tabs:[{label:"Tab 1",name:"tab_1",list:[]}],options:{type:"",tabPosition:"top",customClass:"",hidden:!1}},{type:"collapse",icon:"icon-zhediemianban",tabs:[{title:"Collapse 1",name:"collapse_1",list:[]}],options:{type:"",accordion:!1,customClass:"",hidden:!1}},{type:"inline",icon:"icon-inlineview",options:{customClass:"",hidden:!1,spaceSize:10},list:[]},{type:"card",icon:"icon-kapian",list:[],options:{title:"Card name",showHeader:!0,bordered:!0,customClass:"",shadow:"always",width:"",padding:"10px",hidden:!1}},{type:"divider",icon:"icon-fengexian",options:{hidden:!1,contentPosition:"left",customProps:{}}},{type:"alert",icon:"icon-jinggaotishi",options:{hidden:!1,title:"Info alert",type:"info",description:"",closable:!0,center:!1,showIcon:!1,effect:"light",width:"",customProps:{}}}],collectionComponents=[{type:"table",icon:"icon-kebianjibiaoge",options:{defaultValue:[],customClass:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,disabled:!1,required:!1,validatorCheck:!1,validator:"",paging:!1,pageSize:5,isAdd:!0,isDelete:!0,showControl:!0,virtualTable:!0,tip:""},events:{onMounted:"",onChange:"",onRowAdd:"",onRowRemove:"",onPageChange:""},tableColumns:[]},{type:"subform",icon:"icon-a-ziyuan25",options:{defaultValue:[],customClass:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,disabled:!1,required:!1,validatorCheck:!1,validator:"",paging:!1,pageSize:5,showControl:!0,isAdd:!0,isDelete:!0,tip:""},events:{onMounted:"",onChange:"",onRowAdd:"",onRowRemove:"",onPageChange:""},list:[]},{type:"dialog",icon:"icon-Dialog",options:{defaultValue:{},visible:!1,customClass:"",title:"Dialog Title",width:"",top:"15vh",center:!1,cancelText:"Cancel",showClose:!0,okText:"Confirm",showCancel:!0,showOk:!0,confirmLoading:!1,dataBind:!0},list:[],events:{onOpen:"",onClose:"",onCancel:"",onConfirm:""}},{type:"group",icon:"icon-fenzu",options:{defaultValue:{},customClass:"",labelWidth:100,isLabelWidth:!1,hidden:!1,dataBind:!0,width:"",validatorCheck:!1,validator:"",tip:""},list:[],events:{onMounted:""}}];function findRemoteFunc(e,t,o,n,i){for(let l=0;l{findRemoteFunc(e.list,t,o,n,i)})):"table"==e[l].type?findRemoteFunc(e[l].tableColumns,t,o,n,i):"subform"==e[l].type?findRemoteFunc(e[l].list,t,o,n,i):"tabs"==e[l].type||"collapse"==e[l].type?e[l].tabs.forEach((e=>{findRemoteFunc(e.list,t,o,n,i)})):"report"==e[l].type?e[l].rows.forEach((e=>{e.columns.forEach((e=>{findRemoteFunc(e.list,t,o,n,i)}))})):"inline"==e[l].type||"dialog"==e[l].type||"card"==e[l].type||"group"==e[l].type?findRemoteFunc(e[l].list,t,o,n,i):"blank"==e[l].type?e[l].model&&n.findIndex((t=>t.name==e[l].model))<0&&n.push({name:e[l].model,label:e[l].name,dataBind:e[l].options.dataBind}):"imgupload"==e[l].type?"func"==e[l].options.tokenType&&e[l].options.tokenFunc&&o.push({func:e[l].options.tokenFunc,label:e[l].name,model:e[l].model}):(e[l].options.remote&&"func"==e[l].options.remoteType&&e[l].options.remoteFunc&&t.push({func:e[l].options.remoteFunc,label:e[l].name,model:e[l].model}),e[l].options.remote&&"option"==e[l].options.remoteType&&e[l].options.remoteOption&&i.push({option:e[l].options.remoteOption,label:e[l].name,model:e[l].model}))}function generateCode(e,t="html",o="element",n=!1){const i=document.querySelector("html").className.indexOf("dark")>-1,l=[],a=[],r=[],s=[];let d="element"==o?"fm-generate-form":"fm-generate-antd-form",u="element"==o?"https://unpkg.com/element-plus":"https://unpkg.com/ant-design-vue/dist/antd.min.js";let c="";c="element"==o?i?'\n ':'':'';let m=`.use(${"element"==o?"ElementPlus":"antd"}).use(FormMakingV3)${"element"==o?"":'.provide("useInjectFormItemContext", antd.Form.useInjectFormItemContext)'}.mount('#app')`;n&&(d="fm-generate-vant-form",c='',u="https://fastly.jsdelivr.net/npm/vant@4.9.9/lib/vant.min.js",m=".use(vant).use(FormMakingV3).mount('#app')"),findRemoteFunc(JSON.parse(e).list,l,a,r,s);let p="",f="",h="";for(let v=0;v\n \x3c!-- ${r[v].label||r[v].name} --\x3e\n \x3c!-- use v-model="scope.model.${r[v].name}" to bind data --\x3e\n \n `:f+=`\n \n `;return"html"==t?`\n\n\n \n \n ${c}\n \n\n\n
\n <${d} \n :data="jsonData"\n >${f}\n \n
\n