@ecan-bi/pivot-table 1.0.48 → 1.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @ecan-bi/pivot-table@1.0.48 */
1
+ /*! @ecan-bi/pivot-table@1.0.49 */
2
2
  (function(Ye,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("vue"),require("dayjs"),require("lodash-es"),require("axios"),require("ant-design-vue"),require("ant-design-vue/es/input-number/style"),require("ant-design-vue/es/form/style"),require("echarts"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","lodash-es","axios","ant-design-vue","ant-design-vue/es/input-number/style","ant-design-vue/es/form/style","echarts","vuedraggable"],v):(Ye=typeof globalThis<"u"?globalThis:Ye||self,v(Ye["@ecan-bi/pivot-table"]={},Ye.Vue,Ye.Dayjs,Ye.LodashEs,Ye.Axios,Ye.AntDesignVue,null,null,Ye.Echarts,Ye.Draggable))})(this,function(Ye,v,Mo,Xe,aB,Vi,QK,tY,hB,ub){"use strict";function dB(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const uB=dB(hB),cB=i=>(i.install=t=>{t.component(i.name,i)},i);function cb(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(i);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(i,n[o])&&(e[n[o]]=i[n[o]])}return e}const gB=()=>{},fB=Object.assign,pB=Array.isArray,lf=i=>typeof i=="function",mB=i=>typeof i=="symbol";let gb;const af=()=>gb||(gb=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function hf(i){const t=i&&i.__v_raw;return t?hf(t):i}function fb(i){return!(!i||i.__v_isRef!==!0)}function ji(i){return fb(i)?i.value:i}new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(mB));const Ir=[];function df(i,...t){if(process.env.NODE_ENV==="production")return;const e=Ir.length?Ir[Ir.length-1].component:null,n=e&&e.appContext.config.warnHandler,o=function(){let r=Ir[Ir.length-1];if(!r)return[];const s=[];for(;r;){const l=s[0];l&&l.vnode===r?l.recurseCount++:s.push({vnode:r,recurseCount:0});const a=r.component&&r.component.parent;r=a&&a.vnode}return s}();if(n)uf(n,e,11,[i+t.join(""),e&&e.proxy,o.map(({vnode:r})=>`at <${Sb(e,r.type)}>`).join(`
3
3
  `),o]);else{const r=[`[Vue warn]: ${i}`,...t];o.length&&r.push(`
4
4
  `,...function(s){const l=[];return s.forEach((a,h)=>{l.push(...h===0?[]:[`
@@ -364,11 +364,11 @@
364
364
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O7(i,t){if(i){if(typeof i=="string")return HT(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return HT(i,t)}}function HT(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=i[e];return n}function z7(i,t){var e=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(e!=null){var n=[],o=!0,r=!1,s,l;try{for(e=e.call(i);!(o=(s=e.next()).done)&&(n.push(s.value),!(t&&n.length===t));o=!0);}catch(a){r=!0,l=a}finally{try{!o&&e.return!=null&&e.return()}finally{if(r)throw l}}return n}}function W7(i){if(Array.isArray(i))return i}function ET(i){var t=BT(i),e=I7(t,2),n=e[0],o=e[1];return vv.setTwoToneColors({primaryColor:n,secondaryColor:o})}function N7(){var i=vv.getTwoToneColors();return i.calculated?[i.primaryColor,i.secondaryColor]:i.primaryColor}var V7=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function j7(i,t){return K7(i)||U7(i,t)||G7(i,t)||$7()}function $7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
365
365
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G7(i,t){if(i){if(typeof i=="string")return kT(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);if(e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set")return Array.from(i);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return kT(i,t)}}function kT(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=i[e];return n}function U7(i,t){var e=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(e!=null){var n=[],o=!0,r=!1,s,l;try{for(e=e.call(i);!(o=(s=e.next()).done)&&(n.push(s.value),!(t&&n.length===t));o=!0);}catch(a){r=!0,l=a}finally{try{!o&&e.return!=null&&e.return()}finally{if(r)throw l}}return n}}function K7(i){if(Array.isArray(i))return i}function LT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){bv(i,o,e[o])})}return i}function bv(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function Y7(i,t){if(i==null)return{};var e=X7(i,t),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(o=0;o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}function X7(i,t){if(i==null)return{};var e={},n=Object.keys(i),o,r;for(r=0;r<n.length;r++)o=n[r],!(t.indexOf(o)>=0)&&(e[o]=i[o]);return e}ET("#1890ff");var kl=function(t,e){var n,o=LT({},t,e.attrs),r=o.class,s=o.icon,l=o.spin,a=o.rotate,h=o.tabindex,d=o.twoToneColor,u=o.onClick,c=Y7(o,V7),g=(n={anticon:!0},bv(n,"anticon-".concat(s.name),!!s.name),bv(n,r,r),n),f=l===""||l||s.name==="loading"?"anticon-spin":"",p=h;p===void 0&&u&&(p=-1,c.tabindex=p);var m=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=BT(d),C=j7(b,2),w=C[0],S=C[1];return v.createVNode("span",LT({role:"img","aria-label":s.name},c,{onClick:u,class:g}),[v.createVNode(vv,{class:f,icon:s,primaryColor:w,secondaryColor:S,style:m},null)])};kl.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},kl.displayName="AntdIcon",kl.inheritAttrs=!1,kl.getTwoToneColor=N7,kl.setTwoToneColor=ET;const Ei=kl;var q7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"};const Z7=q7;function FT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){J7(i,o,e[o])})}return i}function J7(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Cv=function(t,e){var n=FT({},t,e.attrs);return v.createVNode(Ei,FT({},n,{icon:Z7}),null)};Cv.displayName="ArrowsAltOutlined",Cv.inheritAttrs=!1;const Q7=Cv;var tj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const ej=tj;function IT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){ij(i,o,e[o])})}return i}function ij(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var yv=function(t,e){var n=IT({},t,e.attrs);return v.createVNode(Ei,IT({},n,{icon:ej}),null)};yv.displayName="CaretDownOutlined",yv.inheritAttrs=!1;const nj=yv;var oj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const rj=oj;function DT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){sj(i,o,e[o])})}return i}function sj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var _v=function(t,e){var n=DT({},t,e.attrs);return v.createVNode(Ei,DT({},n,{icon:rj}),null)};_v.displayName="CaretRightOutlined",_v.inheritAttrs=!1;const lj=_v;var aj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};const hj=aj;function OT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){dj(i,o,e[o])})}return i}function dj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var wv=function(t,e){var n=OT({},t,e.attrs);return v.createVNode(Ei,OT({},n,{icon:hj}),null)};wv.displayName="ClearOutlined",wv.inheritAttrs=!1;const uj=wv;var cj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const gj=cj;function zT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){fj(i,o,e[o])})}return i}function fj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Sv=function(t,e){var n=zT({},t,e.attrs);return v.createVNode(Ei,zT({},n,{icon:gj}),null)};Sv.displayName="DatabaseOutlined",Sv.inheritAttrs=!1;const pj=Sv;var mj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const vj=mj;function WT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){bj(i,o,e[o])})}return i}function bj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var xv=function(t,e){var n=WT({},t,e.attrs);return v.createVNode(Ei,WT({},n,{icon:vj}),null)};xv.displayName="DeleteOutlined",xv.inheritAttrs=!1;const NT=xv;var Cj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};const yj=Cj;function VT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){_j(i,o,e[o])})}return i}function _j(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Av=function(t,e){var n=VT({},t,e.attrs);return v.createVNode(Ei,VT({},n,{icon:yj}),null)};Av.displayName="FilterOutlined",Av.inheritAttrs=!1;const jT=Av;var wj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"};const Sj=wj;function $T(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){xj(i,o,e[o])})}return i}function xj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Rv=function(t,e){var n=$T({},t,e.attrs);return v.createVNode(Ei,$T({},n,{icon:Sj}),null)};Rv.displayName="FormOutlined",Rv.inheritAttrs=!1;const GT=Rv;var Aj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M878.7 336H145.3c-18.4 0-33.3 14.3-33.3 32v464c0 17.7 14.9 32 33.3 32h733.3c18.4 0 33.3-14.3 33.3-32V368c.1-17.7-14.8-32-33.2-32zM360 792H184V632h176v160zm0-224H184V408h176v160zm240 224H424V632h176v160zm0-224H424V408h176v160zm240 224H664V632h176v160zm0-224H664V408h176v160zm64-408H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"insert-row-above",theme:"outlined"};const Rj=Aj;function UT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Tj(i,o,e[o])})}return i}function Tj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Tv=function(t,e){var n=UT({},t,e.attrs);return v.createVNode(Ei,UT({},n,{icon:Rj}),null)};Tv.displayName="InsertRowAboveOutlined",Tv.inheritAttrs=!1;const Mj=Tv;var Bj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M248 112h-80c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8V120c0-4.4-3.6-8-8-8zm584 0H368c-17.7 0-32 14.9-32 33.3v733.3c0 18.4 14.3 33.3 32 33.3h464c17.7 0 32-14.9 32-33.3V145.3c0-18.4-14.3-33.3-32-33.3zM568 840H408V664h160v176zm0-240H408V424h160v176zm0-240H408V184h160v176zm224 480H632V664h160v176zm0-240H632V424h160v176zm0-240H632V184h160v176z"}}]},name:"insert-row-left",theme:"outlined"};const Pj=Bj;function KT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Hj(i,o,e[o])})}return i}function Hj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Mv=function(t,e){var n=KT({},t,e.attrs);return v.createVNode(Ei,KT({},n,{icon:Pj}),null)};Mv.displayName="InsertRowLeftOutlined",Mv.inheritAttrs=!1;const Ej=Mv;var kj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const Lj=kj;function YT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Fj(i,o,e[o])})}return i}function Fj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Bv=function(t,e){var n=YT({},t,e.attrs);return v.createVNode(Ei,YT({},n,{icon:Lj}),null)};Bv.displayName="LoadingOutlined",Bv.inheritAttrs=!1;const Ij=Bv;var Dj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const Oj=Dj;function XT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){zj(i,o,e[o])})}return i}function zj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Pv=function(t,e){var n=XT({},t,e.attrs);return v.createVNode(Ei,XT({},n,{icon:Oj}),null)};Pv.displayName="MinusCircleOutlined",Pv.inheritAttrs=!1;const qT=Pv;var Wj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};const Nj=Wj;function ZT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Vj(i,o,e[o])})}return i}function Vj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Hv=function(t,e){var n=ZT({},t,e.attrs);return v.createVNode(Ei,ZT({},n,{icon:Nj}),null)};Hv.displayName="MinusSquareOutlined",Hv.inheritAttrs=!1;const jj=Hv;var $j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const Gj=$j;function JT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Uj(i,o,e[o])})}return i}function Uj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Ev=function(t,e){var n=JT({},t,e.attrs);return v.createVNode(Ei,JT({},n,{icon:Gj}),null)};Ev.displayName="PlusCircleOutlined",Ev.inheritAttrs=!1;const QT=Ev;var Kj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Yj=Kj;function tM(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Xj(i,o,e[o])})}return i}function Xj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var kv=function(t,e){var n=tM({},t,e.attrs);return v.createVNode(Ei,tM({},n,{icon:Yj}),null)};kv.displayName="SettingOutlined",kv.inheritAttrs=!1;const qj=kv;var Zj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z"}}]},name:"shrink",theme:"outlined"};const Jj=Zj;function eM(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){Qj(i,o,e[o])})}return i}function Qj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Lv=function(t,e){var n=eM({},t,e.attrs);return v.createVNode(Ei,eM({},n,{icon:Jj}),null)};Lv.displayName="ShrinkOutlined",Lv.inheritAttrs=!1;const t$=Lv;var e$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M320 224h-66v-56c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v56h-66c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h66v56c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-56h66c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zm-60 508h-80V292h80v440zm644-436h-66v-96c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v96h-66c-4.4 0-8 3.6-8 8v416c0 4.4 3.6 8 8 8h66v96c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-96h66c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8zm-60 364h-80V364h80v296zM612 404h-66V232c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v172h-66c-4.4 0-8 3.6-8 8v200c0 4.4 3.6 8 8 8h66v172c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V620h66c4.4 0 8-3.6 8-8V412c0-4.4-3.6-8-8-8zm-60 145a3 3 0 01-3 3h-74a3 3 0 01-3-3v-74a3 3 0 013-3h74a3 3 0 013 3v74z"}}]},name:"sliders",theme:"outlined"};const i$=e$;function iM(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){n$(i,o,e[o])})}return i}function n$(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var Fv=function(t,e){var n=iM({},t,e.attrs);return v.createVNode(Ei,iM({},n,{icon:i$}),null)};Fv.displayName="SlidersOutlined",Fv.inheritAttrs=!1;const o$=Fv,BY="",r$=v.defineComponent({name:"ConditionalItemConfig",components:{PlusCircleOutlined:QT,FormOutlined:GT,MinusCircleOutlined:qT},props:{config:{type:Array,default(){return[]}}},setup(i,{emit:t}){const e=v.ref("add"),n=v.ref(!1),o=v.ref(-1),r=v.inject("theme","light");v.watch(o,()=>{t("change",v.unref(o))});const s=v.ref("");function l(){e.value="add",s.value="",n.value=!0}function a(){if(v.unref(o)===-1){Vi.message.info("请选择要修改的条件项");return}e.value="edit",s.value=i.config[v.unref(o)].name,n.value=!0}function h(){if(v.unref(o)===-1){Vi.message.info("请选择要删除的条件项");return}i.config.splice(v.unref(o),1),o.value=-1}function d(){v.unref(e)==="add"?i.config.push({name:v.unref(s),conditions:[]}):i.config[v.unref(o)].name=v.unref(s),n.value=!1}const u=v.computed(()=>v.unref(r)==="darkBlue"?"#b2c3dd":"");return v.watch(n,c=>{c&&window.modalShow&&window.modalShow(c)}),{theme:r,modalType:e,visible:n,selectedIndex:o,addItem:l,name:s,handleOk:d,editItem:a,deleteItem:h,fontColor:u}}}),s$={class:"content"},l$={style:{display:"flex","align-items":"center"}},a$={class:"list"},h$=["onClick"];function d$(i,t,e,n,o,r){const s=v.resolveComponent("plus-circle-outlined"),l=v.resolveComponent("a-button"),a=v.resolveComponent("form-outlined"),h=v.resolveComponent("minus-circle-outlined"),d=v.resolveComponent("a-input"),u=v.resolveComponent("a-form-item"),c=v.resolveComponent("a-form"),g=v.resolveComponent("a-modal");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",s$,[v.createElementVNode("div",l$,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},"条件项配置",4),v.createElementVNode("div",null,[v.createVNode(l,{class:"condition-button",onClick:i.addItem},{default:v.withCtx(()=>[v.createVNode(s,{class:"add-icon"})]),_:1},8,["onClick"]),v.createVNode(l,{class:"condition-button",onClick:i.editItem},{default:v.withCtx(()=>[v.createVNode(a,{class:"edit-icon"})]),_:1},8,["onClick"]),v.createVNode(l,{class:"condition-button",onClick:i.deleteItem},{default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon"})]),_:1},8,["onClick"])])]),v.createElementVNode("div",a$,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.config,(f,p)=>(v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["list-item",i.selectedIndex===p?"active":""]),key:p,onClick:m=>i.selectedIndex=p,style:v.normalizeStyle({color:i.fontColor})},v.toDisplayString(f.name),15,h$))),128))])]),v.createVNode(g,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[1]||(t[1]=f=>i.visible=f),title:i.modalType==="add"?"添加条件项":"修改条件项","ok-text":"确认","cancel-text":"取消",destroyOnClose:!1,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(c,{name:"conditionItem"},{default:v.withCtx(()=>[v.createVNode(u,{label:"条件项名称"},{default:v.withCtx(()=>[v.createVNode(d,{value:i.name,"onUpdate:value":t[0]||(t[0]=f=>i.name=f)},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])],64)}const u$=Hi(r$,[["render",d$],["__scopeId","data-v-6b8837f8"]]),PY="",c$=v.defineComponent({name:"ConditionalConfig",components:{PlusCircleOutlined:QT,FormOutlined:GT,MinusCircleOutlined:qT},props:{config:{type:Array,default(){return[]}},isSelected:{type:Boolean}},setup(i){const t=v.ref("add"),e=v.ref(!1),n=v.ref(-1),o=v.ref({}),r=v.ref(!1),s=v.ref(),l=v.inject("theme","light"),a=v.computed(()=>C=>{const w=`当前值 ${C.operation} ${C.value}`;return C.join?`${C.join} ${w}`:w});v.watch(()=>i.config,()=>{n.value=-1});const h=[{label:"与",value:"and"},{label:"或",value:"or"}],d=[{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"小于",value:"<"},{label:"小于等于",value:"<="},{label:"等于",value:"=="},{label:"不等于",value:"!="}],u={operation:[{required:!0,message:"操作符不能为空"}],value:[{required:!0,message:"值不能为空"}]};function c(){t.value="add",r.value=i.config.length>0,v.unref(r)?o.value={join:"and",operation:"",value:""}:o.value={operation:"",value:""},e.value=!0}function g(){if(v.unref(n)===-1){Vi.message.info("请选择要修改的条件配置");return}t.value="edit",r.value=v.unref(n)!==0,o.value=i.config[v.unref(n)],e.value=!0}function f(){if(v.unref(n)===-1){Vi.message.info("请选择要删除的条件配置");return}i.config.splice(v.unref(n),1),n.value=-1}function p(){v.unref(s).validateFields().then(()=>{v.unref(t)==="add"?i.config.push(v.unref(o)):i.config[v.unref(n)]=v.unref(o),e.value=!1}).catch(()=>{})}const m=v.computed(()=>i.theme==="darkBlue"?"#b2c3dd":""),b=()=>document.getElementsByClassName("update-config-modal")[0]||document.body;return v.watch(e,C=>{C&&window.modalShow&&window.modalShow(C)}),{theme:l,modalType:t,visible:e,selectedIndex:n,addItem:c,handleOk:p,editItem:g,deleteItem:f,operateOptions:d,formData:o,joinOptions:h,isShowJoin:r,formRules:u,formRef:s,conditionTitle:a,fontColor:m,getPopupContainer:b}}}),g$={class:"content"},f$={style:{display:"flex","align-items":"center"}},p$={class:"list"},m$=["onClick"];function v$(i,t,e,n,o,r){const s=v.resolveComponent("plus-circle-outlined"),l=v.resolveComponent("a-button"),a=v.resolveComponent("form-outlined"),h=v.resolveComponent("minus-circle-outlined"),d=v.resolveComponent("a-select"),u=v.resolveComponent("a-form-item"),c=v.resolveComponent("a-input"),g=v.resolveComponent("a-form"),f=v.resolveComponent("a-modal");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",g$,[v.createElementVNode("div",f$,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},"条件配置",4),v.createElementVNode("div",null,[v.createVNode(l,{class:"condition-button",onClick:i.addItem,disabled:!i.isSelected},{default:v.withCtx(()=>[v.createVNode(s,{class:"add-icon"})]),_:1},8,["onClick","disabled"]),v.createVNode(l,{class:"condition-button",onClick:i.editItem,disabled:!i.isSelected},{default:v.withCtx(()=>[v.createVNode(a,{class:"edit-icon"})]),_:1},8,["onClick","disabled"]),v.createVNode(l,{class:"condition-button",onClick:i.deleteItem,disabled:!i.isSelected},{default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon"})]),_:1},8,["onClick","disabled"])])]),v.createElementVNode("div",p$,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.config,(p,m)=>(v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["list-item",i.selectedIndex===m?"active":""]),key:m,onClick:b=>i.selectedIndex=m,style:v.normalizeStyle({color:i.fontColor})},v.toDisplayString(i.conditionTitle(p)),15,m$))),128))])]),v.createVNode(f,{wrapClassName:i.theme+" update-config-modal",visible:i.visible,"onUpdate:visible":t[3]||(t[3]=p=>i.visible=p),title:i.modalType==="add"?"添加条件配置":"修改条件配置","ok-text":"确认","cancel-text":"取消",destroyOnClose:!1,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(g,{model:i.formData,rules:i.formRules,ref:"formRef"},{default:v.withCtx(()=>[i.isShowJoin?(v.openBlock(),v.createBlock(u,{key:0,label:"与上一条件关系",name:"join",required:!0},{default:v.withCtx(()=>[v.createVNode(d,{options:i.joinOptions,value:i.formData.join,"onUpdate:value":t[0]||(t[0]=p=>i.formData.join=p),getPopupContainer:i.getPopupContainer},null,8,["options","value","getPopupContainer"])]),_:1})):v.createCommentVNode("",!0),v.createVNode(u,{label:"操作符",name:"operation",required:!0},{default:v.withCtx(()=>[v.createVNode(d,{options:i.operateOptions,value:i.formData.operation,"onUpdate:value":t[1]||(t[1]=p=>i.formData.operation=p),getPopupContainer:i.getPopupContainer},null,8,["options","value","getPopupContainer"])]),_:1}),v.createVNode(u,{label:"值",name:"value",required:!0},{default:v.withCtx(()=>[v.createVNode(c,{type:"number",value:i.formData.value,"onUpdate:value":t[2]||(t[2]=p=>i.formData.value=p),style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["wrapClassName","visible","title","onOk"])],64)}const b$=Hi(c$,[["render",v$],["__scopeId","data-v-ebd32531"]]);var rn="top",Wn="bottom",Nn="right",sn="left",Iv="auto",Eh=[rn,Wn,Nn,sn],Ll="start",kh="end",C$="clippingParents",nM="viewport",Lh="popper",y$="reference",oM=Eh.reduce(function(i,t){return i.concat([t+"-"+Ll,t+"-"+kh])},[]),rM=[].concat(Eh,[Iv]).reduce(function(i,t){return i.concat([t,t+"-"+Ll,t+"-"+kh])},[]),_$="beforeRead",w$="read",S$="afterRead",x$="beforeMain",A$="main",R$="afterMain",T$="beforeWrite",M$="write",B$="afterWrite",P$=[_$,w$,S$,x$,A$,R$,T$,M$,B$];function wo(i){return i?(i.nodeName||"").toLowerCase():null}function wn(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var t=i.ownerDocument;return t&&t.defaultView||window}return i}function _s(i){var t=wn(i).Element;return i instanceof t||i instanceof Element}function Vn(i){var t=wn(i).HTMLElement;return i instanceof t||i instanceof HTMLElement}function Dv(i){if(typeof ShadowRoot>"u")return!1;var t=wn(i).ShadowRoot;return i instanceof t||i instanceof ShadowRoot}function H$(i){var t=i.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];!Vn(r)||!wo(r)||(Object.assign(r.style,n),Object.keys(o).forEach(function(s){var l=o[s];l===!1?r.removeAttribute(s):r.setAttribute(s,l===!0?"":l)}))})}function E$(i){var t=i.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],r=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:e[n]),l=s.reduce(function(a,h){return a[h]="",a},{});!Vn(o)||!wo(o)||(Object.assign(o.style,l),Object.keys(r).forEach(function(a){o.removeAttribute(a)}))})}}const k$={name:"applyStyles",enabled:!0,phase:"write",fn:H$,effect:E$,requires:["computeStyles"]};function So(i){return i.split("-")[0]}var ws=Math.max,Dg=Math.min,Fl=Math.round;function Ov(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sM(){return!/^((?!chrome|android).)*safari/i.test(Ov())}function Il(i,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=i.getBoundingClientRect(),o=1,r=1;t&&Vn(i)&&(o=i.offsetWidth>0&&Fl(n.width)/i.offsetWidth||1,r=i.offsetHeight>0&&Fl(n.height)/i.offsetHeight||1);var s=_s(i)?wn(i):window,l=s.visualViewport,a=!sM()&&e,h=(n.left+(a&&l?l.offsetLeft:0))/o,d=(n.top+(a&&l?l.offsetTop:0))/r,u=n.width/o,c=n.height/r;return{width:u,height:c,top:d,right:h+u,bottom:d+c,left:h,x:h,y:d}}function zv(i){var t=Il(i),e=i.offsetWidth,n=i.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:i.offsetLeft,y:i.offsetTop,width:e,height:n}}function lM(i,t){var e=t.getRootNode&&t.getRootNode();if(i.contains(t))return!0;if(e&&Dv(e)){var n=t;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function or(i){return wn(i).getComputedStyle(i)}function L$(i){return["table","td","th"].indexOf(wo(i))>=0}function Fr(i){return((_s(i)?i.ownerDocument:i.document)||window.document).documentElement}function Og(i){return wo(i)==="html"?i:i.assignedSlot||i.parentNode||(Dv(i)?i.host:null)||Fr(i)}function aM(i){return!Vn(i)||or(i).position==="fixed"?null:i.offsetParent}function F$(i){var t=/firefox/i.test(Ov()),e=/Trident/i.test(Ov());if(e&&Vn(i)){var n=or(i);if(n.position==="fixed")return null}var o=Og(i);for(Dv(o)&&(o=o.host);Vn(o)&&["html","body"].indexOf(wo(o))<0;){var r=or(o);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return o;o=o.parentNode}return null}function Fh(i){for(var t=wn(i),e=aM(i);e&&L$(e)&&or(e).position==="static";)e=aM(e);return e&&(wo(e)==="html"||wo(e)==="body"&&or(e).position==="static")?t:e||F$(i)||t}function Wv(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Ih(i,t,e){return ws(i,Dg(t,e))}function I$(i,t,e){var n=Ih(i,t,e);return n>e?e:n}function hM(){return{top:0,right:0,bottom:0,left:0}}function dM(i){return Object.assign({},hM(),i)}function uM(i,t){return t.reduce(function(e,n){return e[n]=i,e},{})}var D$=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,dM(typeof t!="number"?t:uM(t,Eh))};function O$(i){var t,e=i.state,n=i.name,o=i.options,r=e.elements.arrow,s=e.modifiersData.popperOffsets,l=So(e.placement),a=Wv(l),h=[sn,Nn].indexOf(l)>=0,d=h?"height":"width";if(!(!r||!s)){var u=D$(o.padding,e),c=zv(r),g=a==="y"?rn:sn,f=a==="y"?Wn:Nn,p=e.rects.reference[d]+e.rects.reference[a]-s[a]-e.rects.popper[d],m=s[a]-e.rects.reference[a],b=Fh(r),C=b?a==="y"?b.clientHeight||0:b.clientWidth||0:0,w=p/2-m/2,S=u[g],y=C-c[d]-u[f],_=C/2-c[d]/2+w,R=Ih(S,_,y),A=a;e.modifiersData[n]=(t={},t[A]=R,t.centerOffset=R-_,t)}}function z$(i){var t=i.state,e=i.options,n=e.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||lM(t.elements.popper,o)&&(t.elements.arrow=o))}const W$={name:"arrow",enabled:!0,phase:"main",fn:O$,effect:z$,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Dl(i){return i.split("-")[1]}var N$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function V$(i,t){var e=i.x,n=i.y,o=t.devicePixelRatio||1;return{x:Fl(e*o)/o||0,y:Fl(n*o)/o||0}}function cM(i){var t,e=i.popper,n=i.popperRect,o=i.placement,r=i.variation,s=i.offsets,l=i.position,a=i.gpuAcceleration,h=i.adaptive,d=i.roundOffsets,u=i.isFixed,c=s.x,g=c===void 0?0:c,f=s.y,p=f===void 0?0:f,m=typeof d=="function"?d({x:g,y:p}):{x:g,y:p};g=m.x,p=m.y;var b=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),w=sn,S=rn,y=window;if(h){var _=Fh(e),R="clientHeight",A="clientWidth";if(_===wn(e)&&(_=Fr(e),or(_).position!=="static"&&l==="absolute"&&(R="scrollHeight",A="scrollWidth")),_=_,o===rn||(o===sn||o===Nn)&&r===kh){S=Wn;var x=u&&_===y&&y.visualViewport?y.visualViewport.height:_[R];p-=x-n.height,p*=a?1:-1}if(o===sn||(o===rn||o===Wn)&&r===kh){w=Nn;var T=u&&_===y&&y.visualViewport?y.visualViewport.width:_[A];g-=T-n.width,g*=a?1:-1}}var M=Object.assign({position:l},h&&N$),B=d===!0?V$({x:g,y:p},wn(e)):{x:g,y:p};if(g=B.x,p=B.y,a){var H;return Object.assign({},M,(H={},H[S]=C?"0":"",H[w]=b?"0":"",H.transform=(y.devicePixelRatio||1)<=1?"translate("+g+"px, "+p+"px)":"translate3d("+g+"px, "+p+"px, 0)",H))}return Object.assign({},M,(t={},t[S]=C?p+"px":"",t[w]=b?g+"px":"",t.transform="",t))}function j$(i){var t=i.state,e=i.options,n=e.gpuAcceleration,o=n===void 0?!0:n,r=e.adaptive,s=r===void 0?!0:r,l=e.roundOffsets,a=l===void 0?!0:l,h={placement:So(t.placement),variation:Dl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,cM(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,cM(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const $$={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:j$,data:{}};var zg={passive:!0};function G$(i){var t=i.state,e=i.instance,n=i.options,o=n.scroll,r=o===void 0?!0:o,s=n.resize,l=s===void 0?!0:s,a=wn(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach(function(d){d.addEventListener("scroll",e.update,zg)}),l&&a.addEventListener("resize",e.update,zg),function(){r&&h.forEach(function(d){d.removeEventListener("scroll",e.update,zg)}),l&&a.removeEventListener("resize",e.update,zg)}}const U$={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:G$,data:{}};var K$={left:"right",right:"left",bottom:"top",top:"bottom"};function Wg(i){return i.replace(/left|right|bottom|top/g,function(t){return K$[t]})}var Y$={start:"end",end:"start"};function gM(i){return i.replace(/start|end/g,function(t){return Y$[t]})}function Nv(i){var t=wn(i),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Vv(i){return Il(Fr(i)).left+Nv(i).scrollLeft}function X$(i,t){var e=wn(i),n=Fr(i),o=e.visualViewport,r=n.clientWidth,s=n.clientHeight,l=0,a=0;if(o){r=o.width,s=o.height;var h=sM();(h||!h&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:r,height:s,x:l+Vv(i),y:a}}function q$(i){var t,e=Fr(i),n=Nv(i),o=(t=i.ownerDocument)==null?void 0:t.body,r=ws(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ws(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-n.scrollLeft+Vv(i),a=-n.scrollTop;return or(o||e).direction==="rtl"&&(l+=ws(e.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}function jv(i){var t=or(i),e=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+o+n)}function fM(i){return["html","body","#document"].indexOf(wo(i))>=0?i.ownerDocument.body:Vn(i)&&jv(i)?i:fM(Og(i))}function Dh(i,t){var e;t===void 0&&(t=[]);var n=fM(i),o=n===((e=i.ownerDocument)==null?void 0:e.body),r=wn(n),s=o?[r].concat(r.visualViewport||[],jv(n)?n:[]):n,l=t.concat(s);return o?l:l.concat(Dh(Og(s)))}function $v(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Z$(i,t){var e=Il(i,!1,t==="fixed");return e.top=e.top+i.clientTop,e.left=e.left+i.clientLeft,e.bottom=e.top+i.clientHeight,e.right=e.left+i.clientWidth,e.width=i.clientWidth,e.height=i.clientHeight,e.x=e.left,e.y=e.top,e}function pM(i,t,e){return t===nM?$v(X$(i,e)):_s(t)?Z$(t,e):$v(q$(Fr(i)))}function J$(i){var t=Dh(Og(i)),e=["absolute","fixed"].indexOf(or(i).position)>=0,n=e&&Vn(i)?Fh(i):i;return _s(n)?t.filter(function(o){return _s(o)&&lM(o,n)&&wo(o)!=="body"}):[]}function Q$(i,t,e,n){var o=t==="clippingParents"?J$(i):[].concat(t),r=[].concat(o,[e]),s=r[0],l=r.reduce(function(a,h){var d=pM(i,h,n);return a.top=ws(d.top,a.top),a.right=Dg(d.right,a.right),a.bottom=Dg(d.bottom,a.bottom),a.left=ws(d.left,a.left),a},pM(i,s,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function mM(i){var t=i.reference,e=i.element,n=i.placement,o=n?So(n):null,r=n?Dl(n):null,s=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,a;switch(o){case rn:a={x:s,y:t.y-e.height};break;case Wn:a={x:s,y:t.y+t.height};break;case Nn:a={x:t.x+t.width,y:l};break;case sn:a={x:t.x-e.width,y:l};break;default:a={x:t.x,y:t.y}}var h=o?Wv(o):null;if(h!=null){var d=h==="y"?"height":"width";switch(r){case Ll:a[h]=a[h]-(t[d]/2-e[d]/2);break;case kh:a[h]=a[h]+(t[d]/2-e[d]/2);break}}return a}function Oh(i,t){t===void 0&&(t={});var e=t,n=e.placement,o=n===void 0?i.placement:n,r=e.strategy,s=r===void 0?i.strategy:r,l=e.boundary,a=l===void 0?C$:l,h=e.rootBoundary,d=h===void 0?nM:h,u=e.elementContext,c=u===void 0?Lh:u,g=e.altBoundary,f=g===void 0?!1:g,p=e.padding,m=p===void 0?0:p,b=dM(typeof m!="number"?m:uM(m,Eh)),C=c===Lh?y$:Lh,w=i.rects.popper,S=i.elements[f?C:c],y=Q$(_s(S)?S:S.contextElement||Fr(i.elements.popper),a,d,s),_=Il(i.elements.reference),R=mM({reference:_,element:w,strategy:"absolute",placement:o}),A=$v(Object.assign({},w,R)),x=c===Lh?A:_,T={top:y.top-x.top+b.top,bottom:x.bottom-y.bottom+b.bottom,left:y.left-x.left+b.left,right:x.right-y.right+b.right},M=i.modifiersData.offset;if(c===Lh&&M){var B=M[o];Object.keys(T).forEach(function(H){var F=[Nn,Wn].indexOf(H)>=0?1:-1,P=[rn,Wn].indexOf(H)>=0?"y":"x";T[H]+=B[P]*F})}return T}function tG(i,t){t===void 0&&(t={});var e=t,n=e.placement,o=e.boundary,r=e.rootBoundary,s=e.padding,l=e.flipVariations,a=e.allowedAutoPlacements,h=a===void 0?rM:a,d=Dl(n),u=d?l?oM:oM.filter(function(f){return Dl(f)===d}):Eh,c=u.filter(function(f){return h.indexOf(f)>=0});c.length===0&&(c=u);var g=c.reduce(function(f,p){return f[p]=Oh(i,{placement:p,boundary:o,rootBoundary:r,padding:s})[So(p)],f},{});return Object.keys(g).sort(function(f,p){return g[f]-g[p]})}function eG(i){if(So(i)===Iv)return[];var t=Wg(i);return[gM(i),t,gM(t)]}function iG(i){var t=i.state,e=i.options,n=i.name;if(!t.modifiersData[n]._skip){for(var o=e.mainAxis,r=o===void 0?!0:o,s=e.altAxis,l=s===void 0?!0:s,a=e.fallbackPlacements,h=e.padding,d=e.boundary,u=e.rootBoundary,c=e.altBoundary,g=e.flipVariations,f=g===void 0?!0:g,p=e.allowedAutoPlacements,m=t.options.placement,b=So(m),C=b===m,w=a||(C||!f?[Wg(m)]:eG(m)),S=[m].concat(w).reduce(function(j,G){return j.concat(So(G)===Iv?tG(t,{placement:G,boundary:d,rootBoundary:u,padding:h,flipVariations:f,allowedAutoPlacements:p}):G)},[]),y=t.rects.reference,_=t.rects.popper,R=new Map,A=!0,x=S[0],T=0;T<S.length;T++){var M=S[T],B=So(M),H=Dl(M)===Ll,F=[rn,Wn].indexOf(B)>=0,P=F?"width":"height",E=Oh(t,{placement:M,boundary:d,rootBoundary:u,altBoundary:c,padding:h}),L=F?H?Nn:sn:H?Wn:rn;y[P]>_[P]&&(L=Wg(L));var I=Wg(L),k=[];if(r&&k.push(E[B]<=0),l&&k.push(E[L]<=0,E[I]<=0),k.every(function(j){return j})){x=M,A=!1;break}R.set(M,k)}if(A)for(var D=f?3:1,O=function(G){var Y=S.find(function(U){var $=R.get(U);if($)return $.slice(0,G).every(function(tt){return tt})});if(Y)return x=Y,"break"},N=D;N>0;N--){var W=O(N);if(W==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}const nG={name:"flip",enabled:!0,phase:"main",fn:iG,requiresIfExists:["offset"],data:{_skip:!1}};function vM(i,t,e){return e===void 0&&(e={x:0,y:0}),{top:i.top-t.height-e.y,right:i.right-t.width+e.x,bottom:i.bottom-t.height+e.y,left:i.left-t.width-e.x}}function bM(i){return[rn,Nn,Wn,sn].some(function(t){return i[t]>=0})}function oG(i){var t=i.state,e=i.name,n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,s=Oh(t,{elementContext:"reference"}),l=Oh(t,{altBoundary:!0}),a=vM(s,n),h=vM(l,o,r),d=bM(a),u=bM(h);t.modifiersData[e]={referenceClippingOffsets:a,popperEscapeOffsets:h,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const rG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:oG};function sG(i,t,e){var n=So(i),o=[sn,rn].indexOf(n)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:i})):e,s=r[0],l=r[1];return s=s||0,l=(l||0)*o,[sn,Nn].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function lG(i){var t=i.state,e=i.options,n=i.name,o=e.offset,r=o===void 0?[0,0]:o,s=rM.reduce(function(d,u){return d[u]=sG(u,t.rects,r),d},{}),l=s[t.placement],a=l.x,h=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=h),t.modifiersData[n]=s}const aG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lG};function hG(i){var t=i.state,e=i.name;t.modifiersData[e]=mM({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const dG={name:"popperOffsets",enabled:!0,phase:"read",fn:hG,data:{}};function uG(i){return i==="x"?"y":"x"}function cG(i){var t=i.state,e=i.options,n=i.name,o=e.mainAxis,r=o===void 0?!0:o,s=e.altAxis,l=s===void 0?!1:s,a=e.boundary,h=e.rootBoundary,d=e.altBoundary,u=e.padding,c=e.tether,g=c===void 0?!0:c,f=e.tetherOffset,p=f===void 0?0:f,m=Oh(t,{boundary:a,rootBoundary:h,padding:u,altBoundary:d}),b=So(t.placement),C=Dl(t.placement),w=!C,S=Wv(b),y=uG(S),_=t.modifiersData.popperOffsets,R=t.rects.reference,A=t.rects.popper,x=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,T=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(_){if(r){var H,F=S==="y"?rn:sn,P=S==="y"?Wn:Nn,E=S==="y"?"height":"width",L=_[S],I=L+m[F],k=L-m[P],D=g?-A[E]/2:0,O=C===Ll?R[E]:A[E],N=C===Ll?-A[E]:-R[E],W=t.elements.arrow,j=g&&W?zv(W):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:hM(),Y=G[F],U=G[P],$=Ih(0,R[E],j[E]),tt=w?R[E]/2-D-$-Y-T.mainAxis:O-$-Y-T.mainAxis,gt=w?-R[E]/2+D+$+U+T.mainAxis:N+$+U+T.mainAxis,vt=t.elements.arrow&&Fh(t.elements.arrow),At=vt?S==="y"?vt.clientTop||0:vt.clientLeft||0:0,J=(H=M==null?void 0:M[S])!=null?H:0,ot=L+tt-J-At,Ct=L+gt-J,ct=Ih(g?Dg(I,ot):I,L,g?ws(k,Ct):k);_[S]=ct,B[S]=ct-L}if(l){var at,ft=S==="x"?rn:sn,dt=S==="x"?Wn:Nn,ht=_[y],wt=y==="y"?"height":"width",q=ht+m[ft],xt=ht-m[dt],Vt=[rn,sn].indexOf(b)!==-1,mt=(at=M==null?void 0:M[y])!=null?at:0,Rt=Vt?q:ht-R[wt]-A[wt]-mt+T.altAxis,ie=Vt?ht+R[wt]+A[wt]-mt-T.altAxis:xt,Zt=g&&Vt?I$(Rt,ht,ie):Ih(g?Rt:q,ht,g?ie:xt);_[y]=Zt,B[y]=Zt-ht}t.modifiersData[n]=B}}const gG={name:"preventOverflow",enabled:!0,phase:"main",fn:cG,requiresIfExists:["offset"]};function fG(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function pG(i){return i===wn(i)||!Vn(i)?Nv(i):fG(i)}function mG(i){var t=i.getBoundingClientRect(),e=Fl(t.width)/i.offsetWidth||1,n=Fl(t.height)/i.offsetHeight||1;return e!==1||n!==1}function vG(i,t,e){e===void 0&&(e=!1);var n=Vn(t),o=Vn(t)&&mG(t),r=Fr(t),s=Il(i,o,e),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(n||!n&&!e)&&((wo(t)!=="body"||jv(r))&&(l=pG(t)),Vn(t)?(a=Il(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):r&&(a.x=Vv(r))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function bG(i){var t=new Map,e=new Set,n=[];i.forEach(function(r){t.set(r.name,r)});function o(r){e.add(r.name);var s=[].concat(r.requires||[],r.requiresIfExists||[]);s.forEach(function(l){if(!e.has(l)){var a=t.get(l);a&&o(a)}}),n.push(r)}return i.forEach(function(r){e.has(r.name)||o(r)}),n}function CG(i){var t=bG(i);return P$.reduce(function(e,n){return e.concat(t.filter(function(o){return o.phase===n}))},[])}function yG(i){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(i())})})),t}}function _G(i){var t=i.reduce(function(e,n){var o=e[n.name];return e[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,e},{});return Object.keys(t).map(function(e){return t[e]})}var CM={placement:"bottom",modifiers:[],strategy:"absolute"};function yM(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function wG(i){i===void 0&&(i={});var t=i,e=t.defaultModifiers,n=e===void 0?[]:e,o=t.defaultOptions,r=o===void 0?CM:o;return function(l,a,h){h===void 0&&(h=r);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},CM,r),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},u=[],c=!1,g={state:d,setOptions:function(b){var C=typeof b=="function"?b(d.options):b;p(),d.options=Object.assign({},r,d.options,C),d.scrollParents={reference:_s(l)?Dh(l):l.contextElement?Dh(l.contextElement):[],popper:Dh(a)};var w=CG(_G([].concat(n,d.options.modifiers)));return d.orderedModifiers=w.filter(function(S){return S.enabled}),f(),g.update()},forceUpdate:function(){if(!c){var b=d.elements,C=b.reference,w=b.popper;if(yM(C,w)){d.rects={reference:vG(C,Fh(w),d.options.strategy==="fixed"),popper:zv(w)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(T){return d.modifiersData[T.name]=Object.assign({},T.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var y=d.orderedModifiers[S],_=y.fn,R=y.options,A=R===void 0?{}:R,x=y.name;typeof _=="function"&&(d=_({state:d,options:A,name:x,instance:g})||d)}}}},update:yG(function(){return new Promise(function(m){g.forceUpdate(),m(d)})}),destroy:function(){p(),c=!0}};if(!yM(l,a))return g;g.setOptions(h).then(function(m){!c&&h.onFirstUpdate&&h.onFirstUpdate(m)});function f(){d.orderedModifiers.forEach(function(m){var b=m.name,C=m.options,w=C===void 0?{}:C,S=m.effect;if(typeof S=="function"){var y=S({state:d,name:b,instance:g,options:w}),_=function(){};u.push(y||_)}})}function p(){u.forEach(function(m){return m()}),u=[]}return g}}var SG=[U$,dG,$$,k$,aG,nG,gG,W$,rG],xG=wG({defaultModifiers:SG});function Gv(i,t){(t==null||t>i.length)&&(t=i.length);for(var e=0,n=Array(t);e<t;e++)n[e]=i[e];return n}function _M(i,t){if(i){if(typeof i=="string")return Gv(i,t);var e={}.toString.call(i).slice(8,-1);return e==="Object"&&i.constructor&&(e=i.constructor.name),e==="Map"||e==="Set"?Array.from(i):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Gv(i,t):void 0}}function AG(i){return function(t){if(Array.isArray(t))return Gv(t)}(i)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(i)||_M(i)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
366
366
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ol(i){return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ol(i)}function wM(i,t,e,n,o,r,s){try{var l=i[r](s),a=l.value}catch(h){return void e(h)}l.done?t(a):Promise.resolve(a).then(n,o)}function SM(i){return function(){var t=this,e=arguments;return new Promise(function(n,o){var r=i.apply(t,e);function s(a){wM(r,n,o,s,l,"next",a)}function l(a){wM(r,n,o,s,l,"throw",a)}s(void 0)})}}var xM={exports:{}},AM={exports:{}};(function(i){function t(e){return i.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},i.exports.__esModule=!0,i.exports.default=i.exports,t(e)}i.exports=t,i.exports.__esModule=!0,i.exports.default=i.exports})(AM),function(i){var t=AM.exports.default;function e(){i.exports=e=function(){return o},i.exports.__esModule=!0,i.exports.default=i.exports;var n,o={},r=Object.prototype,s=r.hasOwnProperty,l=Object.defineProperty||function(k,D,O){k[D]=O.value},a=typeof Symbol=="function"?Symbol:{},h=a.iterator||"@@iterator",d=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(k,D,O){return Object.defineProperty(k,D,{value:O,enumerable:!0,configurable:!0,writable:!0}),k[D]}try{c({},"")}catch{c=function(D,O,N){return D[O]=N}}function g(k,D,O,N){var W=D&&D.prototype instanceof S?D:S,j=Object.create(W.prototype),G=new L(N||[]);return l(j,"_invoke",{value:H(k,O,G)}),j}function f(k,D,O){try{return{type:"normal",arg:k.call(D,O)}}catch(N){return{type:"throw",arg:N}}}o.wrap=g;var p="suspendedStart",m="suspendedYield",b="executing",C="completed",w={};function S(){}function y(){}function _(){}var R={};c(R,h,function(){return this});var A=Object.getPrototypeOf,x=A&&A(A(I([])));x&&x!==r&&s.call(x,h)&&(R=x);var T=_.prototype=S.prototype=Object.create(R);function M(k){["next","throw","return"].forEach(function(D){c(k,D,function(O){return this._invoke(D,O)})})}function B(k,D){function O(W,j,G,Y){var U=f(k[W],k,j);if(U.type!=="throw"){var $=U.arg,tt=$.value;return tt&&t(tt)=="object"&&s.call(tt,"__await")?D.resolve(tt.__await).then(function(gt){O("next",gt,G,Y)},function(gt){O("throw",gt,G,Y)}):D.resolve(tt).then(function(gt){$.value=gt,G($)},function(gt){return O("throw",gt,G,Y)})}Y(U.arg)}var N;l(this,"_invoke",{value:function(W,j){function G(){return new D(function(Y,U){O(W,j,Y,U)})}return N=N?N.then(G,G):G()}})}function H(k,D,O){var N=p;return function(W,j){if(N===b)throw Error("Generator is already running");if(N===C){if(W==="throw")throw j;return{value:n,done:!0}}for(O.method=W,O.arg=j;;){var G=O.delegate;if(G){var Y=F(G,O);if(Y){if(Y===w)continue;return Y}}if(O.method==="next")O.sent=O._sent=O.arg;else if(O.method==="throw"){if(N===p)throw N=C,O.arg;O.dispatchException(O.arg)}else O.method==="return"&&O.abrupt("return",O.arg);N=b;var U=f(k,D,O);if(U.type==="normal"){if(N=O.done?C:m,U.arg===w)continue;return{value:U.arg,done:O.done}}U.type==="throw"&&(N=C,O.method="throw",O.arg=U.arg)}}}function F(k,D){var O=D.method,N=k.iterator[O];if(N===n)return D.delegate=null,O==="throw"&&k.iterator.return&&(D.method="return",D.arg=n,F(k,D),D.method==="throw")||O!=="return"&&(D.method="throw",D.arg=new TypeError("The iterator does not provide a '"+O+"' method")),w;var W=f(N,k.iterator,D.arg);if(W.type==="throw")return D.method="throw",D.arg=W.arg,D.delegate=null,w;var j=W.arg;return j?j.done?(D[k.resultName]=j.value,D.next=k.nextLoc,D.method!=="return"&&(D.method="next",D.arg=n),D.delegate=null,w):j:(D.method="throw",D.arg=new TypeError("iterator result is not an object"),D.delegate=null,w)}function P(k){var D={tryLoc:k[0]};1 in k&&(D.catchLoc=k[1]),2 in k&&(D.finallyLoc=k[2],D.afterLoc=k[3]),this.tryEntries.push(D)}function E(k){var D=k.completion||{};D.type="normal",delete D.arg,k.completion=D}function L(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(P,this),this.reset(!0)}function I(k){if(k||k===""){var D=k[h];if(D)return D.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var O=-1,N=function W(){for(;++O<k.length;)if(s.call(k,O))return W.value=k[O],W.done=!1,W;return W.value=n,W.done=!0,W};return N.next=N}}throw new TypeError(t(k)+" is not iterable")}return y.prototype=_,l(T,"constructor",{value:_,configurable:!0}),l(_,"constructor",{value:y,configurable:!0}),y.displayName=c(_,u,"GeneratorFunction"),o.isGeneratorFunction=function(k){var D=typeof k=="function"&&k.constructor;return!!D&&(D===y||(D.displayName||D.name)==="GeneratorFunction")},o.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,_):(k.__proto__=_,c(k,u,"GeneratorFunction")),k.prototype=Object.create(T),k},o.awrap=function(k){return{__await:k}},M(B.prototype),c(B.prototype,d,function(){return this}),o.AsyncIterator=B,o.async=function(k,D,O,N,W){W===void 0&&(W=Promise);var j=new B(g(k,D,O,N),W);return o.isGeneratorFunction(D)?j:j.next().then(function(G){return G.done?G.value:j.next()})},M(T),c(T,u,"Generator"),c(T,h,function(){return this}),c(T,"toString",function(){return"[object Generator]"}),o.keys=function(k){var D=Object(k),O=[];for(var N in D)O.push(N);return O.reverse(),function W(){for(;O.length;){var j=O.pop();if(j in D)return W.value=j,W.done=!1,W}return W.done=!0,W}},o.values=I,L.prototype={constructor:L,reset:function(k){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!k)for(var D in this)D.charAt(0)==="t"&&s.call(this,D)&&!isNaN(+D.slice(1))&&(this[D]=n)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var D=this;function O(U,$){return j.type="throw",j.arg=k,D.next=U,$&&(D.method="next",D.arg=n),!!$}for(var N=this.tryEntries.length-1;N>=0;--N){var W=this.tryEntries[N],j=W.completion;if(W.tryLoc==="root")return O("end");if(W.tryLoc<=this.prev){var G=s.call(W,"catchLoc"),Y=s.call(W,"finallyLoc");if(G&&Y){if(this.prev<W.catchLoc)return O(W.catchLoc,!0);if(this.prev<W.finallyLoc)return O(W.finallyLoc)}else if(G){if(this.prev<W.catchLoc)return O(W.catchLoc,!0)}else{if(!Y)throw Error("try statement without catch or finally");if(this.prev<W.finallyLoc)return O(W.finallyLoc)}}}},abrupt:function(k,D){for(var O=this.tryEntries.length-1;O>=0;--O){var N=this.tryEntries[O];if(N.tryLoc<=this.prev&&s.call(N,"finallyLoc")&&this.prev<N.finallyLoc){var W=N;break}}W&&(k==="break"||k==="continue")&&W.tryLoc<=D&&D<=W.finallyLoc&&(W=null);var j=W?W.completion:{};return j.type=k,j.arg=D,W?(this.method="next",this.next=W.finallyLoc,w):this.complete(j)},complete:function(k,D){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&D&&(this.next=D),w},finish:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var O=this.tryEntries[D];if(O.finallyLoc===k)return this.complete(O.completion,O.afterLoc),E(O),w}},catch:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var O=this.tryEntries[D];if(O.tryLoc===k){var N=O.completion;if(N.type==="throw"){var W=N.arg;E(O)}return W}}throw Error("illegal catch attempt")},delegateYield:function(k,D,O){return this.delegate={iterator:I(k),resultName:D,nextLoc:O},this.method==="next"&&(this.arg=n),w}},o}i.exports=e,i.exports.__esModule=!0,i.exports.default=i.exports}(xM);var Ng=xM.exports(),Vg=Ng;try{regeneratorRuntime=Ng}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Ng:Function("r","regeneratorRuntime = r")(Ng)}function zl(i,t){return function(e){if(Array.isArray(e))return e}(i)||function(e,n){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r,s,l,a,h=[],d=!0,u=!1;try{if(l=(o=o.call(e)).next,n===0){if(Object(o)!==o)return;d=!1}else for(;!(d=(r=l.call(o)).done)&&(h.push(r.value),h.length!==n);d=!0);}catch(c){u=!0,s=c}finally{try{if(!d&&o.return!=null&&(a=o.return(),Object(a)!==a))return}finally{if(u)throw s}}return h}}(i,t)||_M(i,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
367
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function RG(i){var t=function(e,n){if(Ol(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,n||"default");if(Ol(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return Ol(t)=="symbol"?t:t+""}function Uv(i,t,e){return(t=RG(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var jg=v.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(i,t){var e=t.emit,n=v.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),background:"hsl(".concat(i.hue,", 100%, 50%)")}});return{saturationStyle:n,sliderStyle:v.computed(function(){return{top:"".concat((100-i.value)/100*i.size-5,"px"),left:"".concat(i.saturation*i.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(o){var r=o.target.getBoundingClientRect(),s=r.left,l=r.top,a=function(d){var u=d.clientX,c=d.clientY,g=u-s,f=c-l;g<0&&(g=0),f<0&&(f=0),g>i.size&&(g=i.size),f>i.size&&(f=i.size);var p=g/i.size*100,m=100-f/i.size*100;e("change",p,m)},h=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",h)};a(o),document.addEventListener("mousemove",a),document.addEventListener("mouseup",h)}}}});function xo(i,t){t===void 0&&(t={});var e=t.insertAt;if(i&&typeof document<"u"){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i))}}xo(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),jg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"saturation",style:v.normalizeStyle(i.saturationStyle),onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[t[1]||(t[1]=v.createElementVNode("div",{class:"saturation-white"},null,-1)),t[2]||(t[2]=v.createElementVNode("div",{class:"saturation-black"},null,-1)),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],36)},jg.__scopeId="data-v-24517fec",jg.__file="src/picker/Saturation.vue";var $g=v.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(i,t){var e=t.emit,n=v.computed(function(){return{top:"".concat((1-i.hue/360)*i.height-2,"px"),height:"".concat(4,"px")}}),o=v.ref();return v.onMounted(function(){(function(){o.value.width=i.width,o.value.height=i.height;var r=o.value.getContext("2d"),s=r.createLinearGradient(0,0,0,i.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),r.fillStyle=s,r.fillRect(0,0,i.width,i.height)})()}),{canvas:o,sliderStyle:n,onSelect:function(r){var s=r.target.getBoundingClientRect().top,l=function(h){var d=h.clientY-s;d<0&&(d=0),d>i.height&&(d=i.height);var u=-100*d/i.height+100;e("change",360*u/100)},a=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",a)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",a)}}}}),TG={ref:"canvas"};xo(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),$g.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"hue",onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[v.createElementVNode("canvas",TG,null,512),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],32)},$g.__scopeId="data-v-78b9f4f0",$g.__file="src/picker/Hue.vue";var Gg=v.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(i,t){var e=t.emit,n=v.computed(function(){return{top:"".concat(i.alpha*i.height-2,"px"),height:"".concat(4,"px")}}),o=v.ref(),r=function(){var s=o.value.getContext("2d");o.value.width=i.width,o.value.height=i.height;var l=function(h){var d=document.createElement("canvas"),u=d.getContext("2d"),c=2*h;return d.width=c,d.height=c,u.fillStyle="#ffffff",u.fillRect(0,0,c,c),u.fillStyle="#ccd5db",u.fillRect(0,0,h,h),u.fillRect(h,h,h,h),d}(5);s.fillStyle=s.createPattern(l,"repeat"),s.fillRect(0,0,i.width,i.height);var a=s.createLinearGradient(0,0,0,i.height);a.addColorStop(.01,"rgba(255,255,255,0)"),a.addColorStop(.99,i.color),s.fillStyle=a,s.fillRect(0,0,i.width,i.height)};return v.watch(function(){return i.color},function(){r()}),v.onMounted(function(){r()}),{canvas:o,sliderStyle:n,onSelect:function(s){var l=s.target.getBoundingClientRect().top,a=function(d){var u=d.clientY-l;u<0&&(u=0),u>i.height&&(u=i.height);var c=parseFloat((u/i.height).toFixed(2));e("change",c)},h=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",h)};a(s),document.addEventListener("mousemove",a),document.addEventListener("mouseup",h)}}}}),MG={ref:"canvas"};xo(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Gg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"alpha",onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[v.createElementVNode("canvas",MG,null,512),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],32)},Gg.__scopeId="data-v-24dc9656",Gg.__file="src/picker/Alpha.vue";var RM={rgb:"RGBA",hex:"HEX",hsl:"HSLA",hsv:"HSVA"},TM={rgb:"RGB",hex:"HEX",hsl:"HSL",hsv:"HSV"},BG={RGB:"rgb",RGBA:"rgb",HEX:"hex",HSL:"hsl",HSLA:"hsl",HSV:"hsv",HSVA:"hsv"};function MM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function Kv(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?MM(Object(e),!0).forEach(function(n){Uv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):MM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}var Ss=null,BM=function(i,t,e){var n=v.ref({}),o=e||{},r=o.placement,s=o.defaultStyle,l={strategy:o.strategy||"absolute",placement:r||"auto",onFirstUpdate:function(){Ss.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(a){var h=a.state,d=h.styles,u=h.placement,c=d.popper;n.value=Kv(Kv(Kv({},c),s),{},{transformOrigin:u==="top"?"center bottom":"center top"})}}]};return v.watch(function(){return[v.unref(i),v.unref(t)]},function(a,h){var d,u=zl(a,2),c=u[0],g=u[1],f=zl(h,2),p=f[0],m=f[1];if(c&&g&&(p!==c||m!==p)){(d=Ss)===null||d===void 0||d.destroy();var b=c.$el||c,C=g.$el||g;v.nextTick(function(){Ss=xG(b,C,l)})}}),v.onBeforeUnmount(function(){var a;Ss&&((a=Ss)===null||a===void 0||a.destroy(),Ss=null)}),{instance:Ss,style:n}},Ug=v.defineComponent({props:{value:{type:String,default:"RGBA"},showAlpha:{type:Boolean},options:{type:[Boolean,Array]}},emits:["change"],setup:function(i,t){var e=t.emit,n=v.ref(null),o=v.ref(null),r=v.ref(!1),s=BM(n,o,{strategy:"fixed",defaultStyle:{zIndex:2}}).style,l=v.computed(function(){return Array.isArray(i.options)&&i.options.length>1}),a=v.computed(function(){var d=i.options,u=i.showAlpha,c=i.value;return Array.isArray(d)?u?d.map(function(g){return RM[g]}).filter(function(g){return!g.includes(c)}):d.map(function(g){return TM[g]}).filter(function(g){return!g.includes(c)}):[]}),h=function(d){var u,c,g=d.target;!((u=v.unref(n))!==null&&u!==void 0&&u.isEqualNode(g))&&(!((c=v.unref(n))===null||c===void 0)&&c.contains(g))||(r.value=!1)};return v.onMounted(function(){document.addEventListener("mouseup",h,!1)}),v.onUnmounted(function(){document.removeEventListener("mouseup",h,!1)}),{targetRef:n,selectorRef:o,selectorStyle:s,isShowSelector:r,isNeedSelect:l,formatOptions:a,onShow:function(){l.value&&(r.value=!0)},onFormatChange:function(d){e("change",BG[d])}}}}),PG={class:"format"},HG={key:0,class:"arrow"},EG=["onClick"];xo(".format[data-v-5f6e8f5e]{position:relative}.label[data-v-5f6e8f5e]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;position:relative;width:60px}[pick-colors-theme=dark] .label[data-v-5f6e8f5e]{background:#252930;color:#999}.arrow[data-v-5f6e8f5e]{height:6px;margin-bottom:4px;margin-left:5px;transform:rotate(135deg);width:6px}.arrow[data-v-5f6e8f5e],[pick-colors-theme=dark] .arrow[data-v-5f6e8f5e]{border-right:1px solid #999;border-top:1px solid #999}.selector[data-v-5f6e8f5e]{align-items:center;background:#f7f8f9;border-radius:5px;box-shadow:0 0 16px 0 rgba(0,0,0,.16);cursor:pointer;display:flex;flex-direction:column;font-weight:400;justify-content:center;padding:4px}[pick-colors-theme=dark] .selector[data-v-5f6e8f5e]{background:#252930;color:#999}.selector-item[data-v-5f6e8f5e]{align-items:center;display:flex;height:30px;justify-content:center;width:60px}.selector-item[data-v-5f6e8f5e]:hover{background:#e1f2fe}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]{color:#fff}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]:hover{background:#0087fa}.active-selector-item[data-v-5f6e8f5e]{background:#e1f2fe}[pick-colors-theme=dark] .active-selector-item[data-v-5f6e8f5e]{background:#0087fa}.v-enter-active[data-v-5f6e8f5e],.v-leave-active[data-v-5f6e8f5e]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-5f6e8f5e],.v-leave-to[data-v-5f6e8f5e]{opacity:0;transform:scaleY(0)}"),Ug.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",PG,[v.createElementVNode("div",{class:"label",ref:"targetRef",onClick:t[0]||(t[0]=function(){return i.onShow&&i.onShow.apply(i,arguments)})},[v.createElementVNode("span",null,v.toDisplayString(i.value),1),i.isNeedSelect?(v.openBlock(),v.createElementBlock("div",HG)):v.createCommentVNode("v-if",!0)],512),v.createVNode(v.Transition,null,{default:v.withCtx(function(){return[i.isShowSelector?(v.openBlock(),v.createElementBlock("div",{key:0,class:"selector",ref:"selectorRef",style:v.normalizeStyle(i.selectorStyle)},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.formatOptions,function(s){return v.openBlock(),v.createElementBlock("div",{class:"selector-item",key:s,onClick:function(l){return i.onFormatChange(s)}},v.toDisplayString(s),9,EG)}),128))],4)):v.createCommentVNode("v-if",!0)]}),_:1})])},Ug.__scopeId="data-v-5f6e8f5e",Ug.__file="src/picker/input-value/FormatValue.vue";var Kg=v.defineComponent({name:"Input",components:{FormatValue:Ug},props:{format:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number},showAlpha:{type:Boolean},formatOptions:{type:[Boolean,Array]}},emits:["change","focus","blur","enter","formatChange"],setup:function(i,t){var e=t.emit;return{onInput:function(n){var o;e("change",(o=n.target)===null||o===void 0?void 0:o.value)},valueStyle:v.computed(function(){return{minWidth:"".concat(i.width,"px"),maxWidth:"".concat(i.width,"px"),width:"".concat(i.width,"px")}}),onFocus:function(){e("focus")},onBlur:function(){e("blur")},onEnter:function(){e("enter")},onFormatChange:function(n){e("formatChange",n)}}}}),kG={class:"input"},LG=[".value"];function PM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function jn(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?PM(Object(e),!0).forEach(function(n){Uv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):PM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}xo(".input[data-v-2c454c00]{display:flex;font-size:12px}.value[data-v-2c454c00]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-2c454c00]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-2c454c00]:focus{border:1px solid #1890ff;outline:none}"),Kg.render=function(i,t,e,n,o,r){var s=v.resolveComponent("FormatValue");return v.openBlock(),v.createElementBlock("div",kG,[v.createVNode(s,{value:i.format,showAlpha:i.showAlpha,options:i.formatOptions,onChange:i.onFormatChange},null,8,["value","showAlpha","options","onChange"]),v.createElementVNode("input",{class:"value",style:v.normalizeStyle(i.valueStyle),".value":i.value,onFocus:t[0]||(t[0]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onInput:t[1]||(t[1]=function(){return i.onInput&&i.onInput.apply(i,arguments)}),onBlur:t[2]||(t[2]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onKeydown:t[3]||(t[3]=v.withKeys(function(){return i.onEnter&&i.onEnter.apply(i,arguments)},["enter"]))},null,44,LG)])},Kg.__scopeId="data-v-2c454c00",Kg.__file="src/picker/input-value/InputValue.vue";var HM=function(i,t,e){return[i,t*e/((i=(2-t)*e)<1?i:2-i)||0,i/2]},EM={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Yg=function(i){i=Math.min(Math.round(i),255);var t=Math.floor(i/16),e=i%16;return"".concat(EM[t]||t).concat(EM[e]||e)},kM=function(i){var t=i.r,e=i.g,n=i.b;return isNaN(t)||isNaN(e)||isNaN(n)?"":"#".concat(Yg(t)).concat(Yg(e)).concat(Yg(n))},Wl=function(i,t){var e;typeof(e=i)=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1&&(i="100%");var n=function(o){return typeof o=="string"&&o.indexOf("%")!==-1}(i);return i=Math.min(t,Math.max(0,parseFloat("".concat(i)))),n&&(i=parseInt("".concat(i*t),10)/100),Math.abs(i-t)<1e-6?1:i%t/parseFloat(t)},zh=function(i,t,e){i=6*Wl(i,360),t=Wl(t,100),e=Wl(e,100);var n=Math.floor(i),o=i-n,r=e*(1-t),s=e*(1-o*t),l=e*(1-(1-o)*t),a=n%6,h=[e,s,r,r,l,e][a],d=[l,e,e,s,r,r][a],u=[r,r,l,e,e,s][a];return{r:Math.round(255*h),g:Math.round(255*d),b:Math.round(255*u)}},LM=function(i,t,e){var n,o,r=i.h,s=i.s,l=i.v,a=i.a;if(e)switch(a=(o=(n=a).toString().match(/\.(\d{1,2})(\d*)/))&&o[2].length>0?parseFloat(n.toFixed(2)):n,t){case"hsl":var h=HM(r,s/100,l/100);return"hsla(".concat(r.toFixed(0),", ").concat(Math.round(100*h[1]),"%, ").concat(Math.round(100*h[2]),"%, ").concat(a,")");case"hsv":return"hsva(".concat(r.toFixed(0),", ").concat(Math.round(s),"%, ").concat(Math.round(l),"%, ").concat(a,")");case"rgb":var d=zh(r,s,l),u=d.r,c=d.g,g=d.b;return"rgba(".concat(u,", ").concat(c,", ").concat(g,", ").concat(a,")");default:return"".concat(kM(zh(r,s,l))).concat(Yg(255*a))}else switch(t){case"hsl":var f=HM(r,s/100,l/100);return"hsl(".concat(r.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(r.toFixed(0),", ").concat(Math.round(s),"%, ").concat(Math.round(l),"%)");case"rgb":var p=zh(r,s,l),m=p.r,b=p.g,C=p.b;return"rgb(".concat(m,", ").concat(b,", ").concat(C,")");default:return kM(zh(r,s,l))}},Xg=function(i){var t=i.r,e=i.g,n=i.b;t=Wl(t,255),e=Wl(e,255),n=Wl(n,255);var o,r=Math.max(t,e,n),s=Math.min(t,e,n),l=r,a=r-s,h=r===0?0:a/r;if(r===s)o=0;else{switch(r){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4}o/=6}return{h:360*o,s:100*h,v:100*l}},FM=function(i){var t=i.h,e=i.s,n=i.l;n/=100;var o=e/=100,r=Math.max(n,.01);return e*=(n*=2)<=1?n:2-n,o*=r<=1?r:2-r,{h:+t,s:100*(n===0?2*o/(r+o):2*e/(n+e)),v:100*((n+e)/2)}},IM=function(i){var t=[];if(i.match(/^#([0-9a-fA-f]{3,4})$/g))for(var e=1;e<i.length;e++)t.push(parseInt("0x"+i[e].repeat(2)));else if(i.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var n=1;n<i.length;n+=2)t.push(parseInt("0x"+i.slice(n,n+2)));return{r:t[0],g:t[1],b:t[2],a:t[3]}},Yv=function(i,t,e){if(typeof i=="string"&&i!==""){var n=qg(i,Zg(i),e),o=WM(n);return o==null?"":LM(o,t,e)}return""},DM=function(i){var t=zl(i.match(/(\d(\.\d+)?)+/g),4);return{r:t[0],g:t[1],b:t[2],a:t[3]}},OM=function(i){var t=zl(i.match(/(\d(\.\d+)?)+/g),4),e=t[0],n=t[1],o=t[2],r=t[3];return{h:e,s:parseFloat(n),l:parseFloat(o),a:r}},zM=function(i){var t=zl(i.match(/(\d(\.\d+)?)+/g),4),e=t[0],n=t[1],o=t[2],r=t[3];return{h:parseFloat(e),s:parseFloat(n),v:parseFloat(o),a:parseFloat(r)}},qg=function(i,t){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(t){case"rgb":var e=DM(i),n=e.r,o=e.g,r=e.b,s=e.a;return jn(jn({},Xg({r:n,g:o,b:r})),{},{a:+s});case"hsv":var l=zM(i);return{h:l.h,s:l.s,v:l.v,a:l.a};case"hsl":var a=OM(i),h=a.h,d=a.s,u=a.l,c=a.a;return jn(jn({},FM({h,s:d,l:u})),{},{a:+c});default:var g=IM(i),f=g.r,p=g.g,m=g.b,b=g.a;return jn(jn({},Xg({r:f,g:p,b:m})),{},{a:b/255})}else switch(t){case"rgb":return jn(jn({},Xg(DM(i))),{},{a:1});case"hsv":var C=zM(i);return{h:C.h,s:C.s,v:C.v,a:1};case"hsl":return jn(jn({},FM(OM(i))),{},{a:1});default:return jn(jn({},Xg(IM(i))),{},{a:1})}},Zg=function(i){return i.match(/^#/)?"hex":i.match(/^rgb/)?"rgb":i.match(/^hsl/)?"hsl":i.match(/^hsv/)?"hsv":"hex"},WM=function(i){var t=i.h,e=i.s,n=i.v,o=i.a;return isNaN(t)&&isNaN(e)&&isNaN(n)?null:(isNaN(t)&&(t=0),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(o)&&(o=1),{h:t,s:e,v:n,a:o})},Wh=v.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(i){var t=v.ref(),e=v.inject("theme",{theme:"light"}).theme,n=v.computed(function(){return parseFloat((i.width||i.size)+"")}),o=v.computed(function(){return parseFloat((i.height||i.size)+"")}),r=v.computed(function(){return{width:"".concat(v.unref(n),"px"),height:"".concat(v.unref(o),"px"),border:i.border?"1px solid ".concat(v.unref(e)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(i.borderRadius,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(v.unref(e)==="dark"?"#2681ff":"#1890ff"):""}}),s=function(){var l=t.value.getContext("2d");t.value.width=v.unref(n),t.value.height=v.unref(o);var a=function(h){var d=document.createElement("canvas"),u=d.getContext("2d"),c=2*h;return d.width=c,d.height=c,u.fillStyle="#ffffff",u.fillRect(0,0,c,c),u.fillStyle="#ccd5db",u.fillRect(0,0,h,h),u.fillRect(h,h,h,h),d}(5);l.fillStyle=l.createPattern(a,"repeat"),l.fillRect(0,0,v.unref(n),v.unref(o)),l.fillStyle=i.value,l.fillRect(0,0,v.unref(n),v.unref(o))};return v.watch(function(){return i.value},function(){s()}),v.onMounted(function(){s()}),{canvas:t,colorItemStyle:r}}}),FG=["draggable"];xo(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Wh.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("canvas",{class:"color-item",style:v.normalizeStyle(i.colorItemStyle),ref:"canvas",draggable:i.draggable},null,12,FG)},Wh.__scopeId="data-v-02da71fd",Wh.__file="src/color-item/ColorItem.vue";var Jg=v.defineComponent({name:"Colors",components:{ColorItem:Wh},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(i,t){var e=t.emit;return{onSelectColor:function(n,o){e("change",n,o)},useColors:v.computed(function(){return i.colors.map(function(n){return Yv(n,"hex",!0)})})}}}),IG={class:"colors"};function NM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function Ao(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?NM(Object(e),!0).forEach(function(n){Uv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):NM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}xo(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Jg.render=function(i,t,e,n,o,r){var s=v.resolveComponent("color-item");return v.openBlock(),v.createElementBlock("div",IG,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.useColors,function(l,a){return v.openBlock(),v.createBlock(s,{key:a,class:"color-item",size:16,value:l,border:!1,"border-radius":3,selected:i.selectedIndex===a,onClick:v.withModifiers(function(h){return i.onSelectColor(l,+a)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Jg.__scopeId="data-v-0f8b52a8",Jg.__file="src/picker/Colors.vue";var Qg=v.defineComponent({name:"Picker",components:{Colors:Jg,Saturation:jg,Hue:$g,Alpha:Gg,InputValue:Kg},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}},formatOptions:{type:[Boolean,Array]}},emits:["change","formatChange"],setup:function(i,t){var e=t.emit,n=v.computed(function(){return Ao(Ao({},i.style),{},{width:i.showAlpha?"230px":"205px"})}),o=v.ref(),r=v.ref(),s=v.ref(),l=function(){var p,m=(p=i.value)===null||p===void 0?void 0:p.trim();if(m!=null&&m!==""){var b=Zg(m);return WM(qg(m,b,i.showAlpha))}return null};v.watch(function(){return i.value},function(){i.value!==v.unref(s)&&(o.value=l())},{immediate:!0}),v.watch(function(){return[v.unref(o),i.format]},function(p){var m=zl(p,2),b=m[0],C=m[1],w="";b!=null?(w=LM(Ao({},b),i.format,i.showAlpha),r.value=Ao({},b)):r.value=null,s.value=w;var S=l();JSON.stringify(b)!==JSON.stringify(S)&&JSON.stringify(b)!==JSON.stringify(C)&&e("change",w)},{immediate:!0});var a=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.h)||0}),h=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.s)||0}),d=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.v)||0}),u=v.computed(function(){var p,m;return((p=v.unref(o))===null||p===void 0?void 0:p.a)!=null?(m=v.unref(o))===null||m===void 0?void 0:m.a:1}),c=v.computed(function(){return zh(v.unref(a),v.unref(h),v.unref(d))}),g=v.computed(function(){return"rgb(".concat(v.unref(c).r,", ").concat(v.unref(c).g,", ").concat(v.unref(c).b,")")}),f=v.ref(-1);return{h:a,s:h,v:d,a:u,rgbStr:g,onSelectSaturation:function(p,m){f.value=-1,v.unref(o)==null?o.value={h:v.unref(a),s:p,v:m,a:v.unref(u)}:o.value=Ao(Ao({},v.unref(o)),{},{s:p,v:m})},onSelectHue:function(p){f.value=-1,v.unref(o)==null&&(o.value={h:p,s:v.unref(h),v:v.unref(d),a:v.unref(u)}),o.value=Ao(Ao({},v.unref(o)),{},{h:p})},onSelectAlpha:function(p){f.value=-1,v.unref(o)==null?o.value={h:v.unref(a),s:v.unref(h),v:v.unref(d),a:p}:o.value=Ao(Ao({},v.unref(o)),{},{a:p})},handleInputFormat:function(p){return i.showAlpha?RM[p]:TM[p]},colorValue:s,pickerStyle:n,onInputChange:function(p){f.value=-1,s.value=p},handleChange:function(){var p,m=(p=v.unref(s))===null||p===void 0?void 0:p.trim();if(m!==""){var b=i.showAlpha,C=Zg(m),w=qg(m,C,b),S=function(y){var _=y.h,R=y.s,A=y.v,x=y.a;return!(isNaN(_)||isNaN(R)||isNaN(A)||isNaN(x))}(w);S?o.value=w:v.unref(r)!=null?o.value=v.unref(r):s.value=""}else o.value=null},selectColorIndex:f,onSelectColor:function(p,m){if(f.value=m,(p=p.trim())==="")o.value=null;else{var b=Zg(p);b?function(C,w,S){if(C.length!==0){var y=qg(C,w,S),_=y.h,R=y.s,A=y.v;if(!(isNaN(_)||isNaN(R)||isNaN(A))){var x=1,T=y.a;isNaN(T)||(x=T),o.value={h:_,s:R,v:A,a:x}}}}(p,b,!0):o.value=null}},onFormatChange:function(p){e("formatChange",p)}}}}),DG={class:"picker-inner"},OG={class:"picker-header"};xo(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),Qg.render=function(i,t,e,n,o,r){var s=v.resolveComponent("saturation"),l=v.resolveComponent("hue"),a=v.resolveComponent("alpha"),h=v.resolveComponent("input-value"),d=v.resolveComponent("Colors");return v.openBlock(),v.createElementBlock("div",{class:"picker",style:v.normalizeStyle(i.pickerStyle)},[v.createElementVNode("div",DG,[v.createElementVNode("div",OG,[v.createVNode(s,{class:"saturation",hue:i.h,saturation:i.s,value:i.v,onChange:i.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),v.createVNode(l,{class:"hue",hue:i.h,onChange:i.onSelectHue},null,8,["hue","onChange"]),i.showAlpha?(v.openBlock(),v.createBlock(a,{key:0,class:"alpha",alpha:i.a,color:i.rgbStr,onChange:i.onSelectAlpha},null,8,["alpha","color","onChange"])):v.createCommentVNode("v-if",!0)]),v.createVNode(h,{format:i.handleInputFormat(i.format),value:i.colorValue,showAlpha:i.showAlpha,width:i.showAlpha?150:125,formatOptions:i.formatOptions,onChange:i.onInputChange,onBlur:i.handleChange,onEnter:i.handleChange,onFormatChange:i.onFormatChange},null,8,["format","value","showAlpha","width","formatOptions","onChange","onBlur","onEnter","onFormatChange"]),i.colors.length>0?(v.openBlock(),v.createBlock(d,{key:0,class:"colors",colors:i.colors,"selected-index":i.selectColorIndex,onChange:i.onSelectColor},null,8,["colors","selected-index","onChange"])):v.createCommentVNode("v-if",!0)])],4)},Qg.__scopeId="data-v-6ceadec6",Qg.__file="src/picker/Picker.vue";var tf=v.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(i){var t=v.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:v.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),lineHeight:"".concat(i.size,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(v.unref(t)==="dark"?"#2681ff":"#1890ff"):""}})}}});xo(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),tf.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("svg",{class:"add-color-item",style:v.normalizeStyle(i.addColorItemStyle),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},t[0]||(t[0]=[v.createElementVNode("g",{class:"container"},[v.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)]),4)},tf.__scopeId="data-v-ceb1719c",tf.__file="src/add-color-item/AddColorItem.vue";var ef=v.defineComponent({name:"ColorPicker",components:{ColorItem:Wh,Picker:Qg,AddColorItem:tf},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean],default:"body"},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}},position:{type:String},placement:{type:String},formatOptions:{type:[Boolean,Array],default:!1}},emits:["change","update:value","update:showPicker","overflowMax","closePicker","formatChange"],setup:function(i,t){var e=t.emit,n=v.ref([]),o=v.computed(function(){return v.unref(n).map(function(x){return Yv(x,"hex",i.showAlpha)})}),r=v.ref("hex");v.watch(function(){return i.format},function(){r.value=i.format},{immediate:!0}),v.watch(function(){return i.value},function(){var x=i.value||"",T=Array.isArray(x)?x:[x];n.value=T.map(function(M){return Yv(M,v.unref(r),i.showAlpha)})},{immediate:!0});var s=v.ref(void 0),l=v.computed(function(){return v.unref(n)[v.unref(s)]}),a=v.ref(!1);v.watch(function(){return i.showPicker},function(){a.value=i.showPicker},{immediate:!0});var h,d,u=v.ref(null),c=v.ref(null),g=BM(u,c,{defaultStyle:{zIndex:i.zIndex},strategy:i.position,placement:i.placement}).style,f=function(){v.unref(u)==null&&(u.value=v.unref(A)[0]),v.unref(s)==null&&(s.value=0),i.showPicker===void 0?a.value=!0:e("update:showPicker",!0)},p=function(){s.value=void 0,i.showPicker===void 0?a.value=!1:e("update:showPicker",!1),e("closePicker",v.toRaw(Array.isArray(i.value)||i.addColor?v.unref(n):v.unref(n)[0]))},m=v.ref(),b=function(){var x=SM(Vg.mark(function T(M){var B,H,F,P;return Vg.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(H=M.target,(F=(B=H.dataset)===null||B===void 0?void 0:B.index)!=null&&F!==""){E.next=4;break}return E.abrupt("return");case 4:if(P=+F,v.unref(s)!==P){E.next=7;break}return E.abrupt("return");case 7:v.unref(s)!=null&&v.unref(s)!==P?(p(),h&&clearTimeout(h),h=setTimeout(function(){f(),clearTimeout(h)},100)):f(),s.value=P,u.value=H;case 10:case"end":return E.stop()}},T)}));return function(T){return x.apply(this,arguments)}}(),C=function(){var x=SM(Vg.mark(function T(M){var B,H,F,P,E;return Vg.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(P=M.target,!(!((B=v.unref(m))!==null&&B!==void 0&&B.isEqualNode(P))&&(!((H=v.unref(m))===null||H===void 0)&&H.contains(P)))){L.next=4;break}return L.abrupt("return");case 4:if(E=(F=v.unref(c))===null||F===void 0?void 0:F.$el,!(E!=null&&E.contains(P))){L.next=8;break}return L.abrupt("return");case 8:d&&clearTimeout(d),d=setTimeout(function(){v.unref(a)&&p()},0);case 10:case"end":return L.stop()}},T)}));return function(T){return x.apply(this,arguments)}}();v.watch(a,function(){v.unref(a)&&(f(),clearTimeout(d))});var w,S=v.ref(i.max>v.unref(n).length),y=v.computed(function(){return typeof i.popupContainer=="string"||Ol(i.popupContainer)==="object"&&i.popupContainer!=null?i.popupContainer:"body"}),_=v.computed(function(){return typeof i.popupContainer=="boolean"&&i.popupContainer===!1}),R=v.computed(function(){return i.theme});v.watch(function(){return[i.theme,v.unref(c)]},function(){v.nextTick(function(){var x,T;(x=v.unref(m))===null||x===void 0||x.setAttribute("pick-colors-theme",v.unref(R)),(T=v.unref(c))===null||T===void 0||(T=T.$el)===null||T===void 0||T.setAttribute("pick-colors-theme",v.unref(R))})},{immediate:!0}),v.provide("theme",{theme:R});var A=v.ref([]);return v.onMounted(function(){document.addEventListener("mouseup",C,!1),i.showPicker&&f()}),v.onUnmounted(function(){document.removeEventListener("mouseup",C,!1),h&&(clearTimeout(h),h=null),d&&(clearTimeout(d),d=null)}),{valueList:n,colorItemSelected:function(x){return(i.addColor?v.unref(n).length>0:v.unref(n).length>1)&&v.unref(s)===x},selectedColor:l,selectedIndex:s,isShowPicker:a,addColorItemShow:S,onPickerChange:function(x){var T=v.unref(s),M=v.unref(n).slice(),B=v.unref(n).length;if(T!=null){T>=0?M[T]=x:(s.value=B,M.push(x));var H="";H=Array.isArray(i.value)||i.addColor?M:x,n.value=Array.isArray(H)?H:[H],e("update:value",H),e("change",H,x,T),i.addColor&&B>=i.max&&(S.value=!1,e("overflowMax"))}},colorPicker:m,onColorClick:b,pickerRef:c,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var T=x.target;w=+T.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var T=+x.target.dataset.index,M=AG(v.unref(n)),B=M[w];M.splice(w,1);var H=M.slice(0,T),F=M.splice(T),P=H.concat([B]).concat(F);e("update:value",P),e("change",P,P[w],w)},colorItemsRef:A,pickerStyle:g,values:o,teleportDisabled:_,toPopupContainer:y,formatValue:r,onFormatChange:function(x){r.value=x,e("formatChange",x)}}}});xo(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),ef.render=function(i,t,e,n,o,r){var s=v.resolveComponent("color-item"),l=v.resolveComponent("add-color-item"),a=v.resolveComponent("picker");return v.openBlock(),v.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:t[0]||(t[0]=v.withModifiers(function(){return i.onColorItemDragStart&&i.onColorItemDragStart.apply(i,arguments)},["stop"])),onDragover:t[1]||(t[1]=v.withModifiers(function(){return i.onColorItemDragOver&&i.onColorItemDragOver.apply(i,arguments)},["prevent","stop"])),onDrop:t[2]||(t[2]=v.withModifiers(function(){return i.onColorItemDrop&&i.onColorItemDrop.apply(i,arguments)},["prevent","stop"])),onClick:t[3]||(t[3]=v.withModifiers(function(){return i.onColorClick&&i.onColorClick.apply(i,arguments)},["stop"]))},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.values,function(h,d){return v.openBlock(),v.createBlock(s,{class:"color-item",key:d,ref_for:!0,ref:function(u){return i.colorItemsRef[d]=u},size:i.size,width:i.width,height:i.height,value:h,selected:i.colorItemSelected(d),"data-index":d,draggable:i.valueList.length>1,format:i.formatValue},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),i.addColor&&i.addColorItemShow?(v.openBlock(),v.createBlock(l,{key:0,class:"add-color-item",ref:"addColorItem",selected:i.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):v.createCommentVNode("v-if",!0),(v.openBlock(),v.createBlock(v.Teleport,{to:i.toPopupContainer,disabled:i.teleportDisabled},[v.createVNode(v.Transition,null,{default:v.withCtx(function(){return[i.isShowPicker?(v.openBlock(),v.createBlock(a,{key:0,class:"picker",style:v.normalizeStyle(i.pickerStyle),ref:"pickerRef",value:i.selectedColor,format:i.formatValue,"show-alpha":i.showAlpha,colors:i.colors,formatOptions:i.formatOptions,onChange:i.onPickerChange,onFormatChange:i.onFormatChange},null,8,["style","value","format","show-alpha","colors","formatOptions","onChange","onFormatChange"])):v.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},ef.__scopeId="data-v-3c43ade8",ef.__file="src/ColorPicker.vue";const HY="",zG=v.defineComponent({name:"ColorPick",components:{PickColors:ef},props:{value:{type:String,default:""}},setup(i,{emit:t}){const e=v.ref(i.value);v.watch(()=>i.value,o=>{e.value=o},{immediate:!0});function n(){t("changeProp",v.unref(e))}return{myValue:e,onChange:n}}}),WG={class:"color-pick"};function NG(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("pick-colors");return v.openBlock(),v.createElementBlock("div",WG,[v.createVNode(s,{class:"input",size:"small",value:i.myValue,"onUpdate:value":t[0]||(t[0]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"]),v.createVNode(l,{value:i.myValue,"onUpdate:value":t[1]||(t[1]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"])])}const VG=Hi(zG,[["render",NG],["__scopeId","data-v-99378939"]]),jG=v.defineComponent({name:"Radio",props:{value:{type:String,default:""},options:{type:Array,default(){return[]}}},setup(i,{emit:t}){function e(n){t("changeProp",n.target.value)}return{onChange:e}}});function $G(i,t,e,n,o,r){const s=v.resolveComponent("a-radio-group");return v.openBlock(),v.createBlock(s,{value:i.value,size:"small",onChange:i.onChange,options:i.options,optionType:"button"},null,8,["value","onChange","options"])}const GG=Hi(jG,[["render",$G]]),EY="",UG=v.defineComponent({name:"PropertyConfig",components:{ColorPick:VG,Radio:GG},props:{config:{type:Object,default(){return{}}},selectedIndex:{type:Boolean}},setup(i){const t=v.inject("theme","light"),e=[{label:"字体颜色",key:"color",component:"color-pick"},{label:"对齐方式",key:"align",component:"radio",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},{label:"图标",key:"icon",component:"radio",props:{options:[{label:"上涨",value:"increase"},{label:"下跌",value:"decline"}]}},{label:"图标颜色",key:"iconColor",component:"color-pick"}],n=v.ref([]);v.watch(()=>i.selectedIndex,()=>{if(i.selectedIndex>-1){const l=Object.keys(i.config);n.value=l}});function o(l,a){i.config[l]=a}function r(l,a){if(l.target.checked)i.config[a]="",v.unref(n).push(a);else{delete i.config[a];const h=v.unref(n).indexOf(a);v.unref(n).splice(h,1)}}const s=v.computed(()=>v.unref(t)==="darkBlue"?"#b2c3dd":"");return{formConfig:e,handleSelect:r,selectedProperty:n,onChange:o,fontColor:s}}}),KG={class:"content"},YG={class:"list"};function XG(i,t,e,n,o,r){const s=v.resolveComponent("a-checkbox");return v.openBlock(),v.createElementBlock("div",KG,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor,height:"32px",lineHeight:"32px"})},"属性配置",4),v.createElementVNode("div",YG,[i.selectedIndex>-1?(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:0},v.renderList(i.formConfig,({label:l,component:a,props:h,key:d},u)=>(v.openBlock(),v.createElementBlock("div",{class:"list-item",style:{display:"flex"},key:u},[v.createVNode(s,{checked:i.selectedProperty.includes(d),onChange:c=>i.handleSelect(c,d)},null,8,["checked","onChange"]),v.createElementVNode("span",{style:v.normalizeStyle({padding:"0 8px",color:i.fontColor})},v.toDisplayString(l),5),i.selectedProperty.includes(d)?(v.openBlock(),v.createBlock(v.resolveDynamicComponent(a),v.mergeProps({key:0,value:i.config[d],ref_for:!0},h,{onChangeProp:c=>i.onChange(d,c)}),null,16,["value","onChangeProp"])):v.createCommentVNode("",!0)]))),128)):v.createCommentVNode("",!0)])])}const qG=Hi(UG,[["render",XG],["__scopeId","data-v-b2df2e2d"]]),ZG=v.defineComponent({name:"ConditionalProperty",props:{},components:{ConditionalItemConfig:u$,ConditionalConfig:b$,PropertyConfig:qG},setup(i,{emit:t,expose:e}){const n=v.ref(!1),o=v.ref([]),r=v.ref(-1),s=v.inject("theme","light");let l="";const a=v.computed(()=>v.unref(r)>-1?v.unref(o)[v.unref(r)]:{});function h(g,f=[]){l=g,o.value=f,n.value=!0}function d(g){r.value=g}function u(){t("change",l,v.unref(o)),r.value=-1,n.value=!1}function c(){r.value=-1,o.value=[]}return v.watch(n,g=>{window.modalShow&&window.modalShow(g)}),e({showModal:h}),{theme:s,visible:n,config:o,changeSelectedItem:d,selectedConfig:a,selectedIndex:r,handleOk:u,handleClear:c}}}),JG={style:{display:"flex"}};function QG(i,t,e,n,o,r){const s=v.resolveComponent("conditional-item-config"),l=v.resolveComponent("conditional-config"),a=v.resolveComponent("property-config"),h=v.resolveComponent("a-button"),d=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(d,{wrapClassName:i.theme,title:"条件属性",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.visible=u),"ok-text":"确认","cancel-text":"取消",style:{width:"950px",top:"60px",height:"700px"},maskClosable:!1,destroyOnClose:!0,onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(h,{onClick:t[0]||(t[0]=u=>i.visible=!1)},{default:v.withCtx(()=>t[2]||(t[2]=[v.createTextVNode("取消")])),_:1}),v.createVNode(h,{onClick:i.handleClear},{default:v.withCtx(()=>t[3]||(t[3]=[v.createTextVNode("清除筛选")])),_:1},8,["onClick"]),v.createVNode(h,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[4]||(t[4]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[v.createElementVNode("div",JG,[v.createVNode(s,{config:i.config,onChange:i.changeSelectedItem},null,8,["config","onChange"]),v.createVNode(l,{config:i.selectedConfig.conditions,isSelected:i.selectedIndex>-1},null,8,["config","isSelected"]),v.createVNode(a,{config:i.selectedConfig,selectedIndex:i.selectedIndex},null,8,["config","selectedIndex"])])]),_:1},8,["wrapClassName","visible","onOk"])}const tU=Hi(ZG,[["render",QG]]),kY="",eU=v.defineComponent({name:"PivotChart",props:{data:{type:Object,default(){return{dimensionData:{},xLabel:"",yLabel:""}}}},components:{FilterOutlined:jT,MinusSquareOutlined:jj,PivotFilter:pT},setup(i,{expose:t}){const e=v.inject("theme","light"),n=v.ref();let o;const r=v.ref([]),s=v.computed(()=>{var P;return(P=v.unref(r)[v.unref(r).length-1])==null?void 0:P.key}),l=v.ref([]),a=v.ref(!1),h=v.ref(),d=v.ref({});let u={};const c=v.reactive({position:"absolute",top:"0",left:"0"});let g="",f;function p(){l.value=[],r.value=[],u={};const{dimensionData:P,xLabel:E}=i.data,L=P[E].map(I=>I.value);b(E,L),v.unref(r).push({key:E,drillValue:"",xAxisData:L}),C()}let m=[];v.onMounted(()=>{o=uB.init(n.value),S()});function b(P,E){const{yLabel:L,records:I}=i.data;let k=[];E.forEach(()=>{k.push(0)}),I.forEach(D=>{if(D[L]!==void 0){const O=E.indexOf(D[P]);if(O>-1){let N=!0;v.unref(r).forEach(j=>{j.drillValue&&D[j.key]!==j.drillValue&&(N=!1)});const W=Number(D[L]);N&&!isNaN(W)&&(k[O]+=Number(W))}}}),k=k.map(D=>D.toFixed(2)),f={tooltip:{},xAxis:{data:E},yAxis:{},series:[{name:L,type:"bar",label:{show:!0,position:"top"},data:k}]},m=k,o.setOption(f)}function C(){const P=Object.keys(i.data.dimensionData),E=v.unref(r).map(I=>I.key),L=[];P.forEach(I=>{E.includes(I)||L.push(I)}),l.value=L}function w(){g="",a.value=!1}function S(){o.on("contextmenu",function(P){const{event:{event:E},name:L}=P;g=L,E.preventDefault(),c.left=E.offsetX+90+"px",c.top=E.offsetY+80+"px",a.value=!0}),document.addEventListener("click",w)}function y(P){const E=[],{records:L}=i.data;for(const I of L){let k=!0;for(const D of v.unref(r))D.drillValue&&I[D.key]!==D.drillValue&&(k=!1);k&&!E.includes(I[P])&&E.push(I[P])}return E}function _(P){v.unref(r)[v.unref(r).length-1].drillValue=g;const E=y(P);b(P,E),v.unref(r).push({key:P,drillValue:"",xAxisData:E}),C()}function R(P,E){v.unref(r).splice(P+1,v.unref(r).length-P-1),v.unref(r)[P].drillValue="";const L=y(E);b(E,L),B(),C()}function A(P,E){const L=f.series[0].data,I=f.xAxis.data,k=L.map((O,N)=>({value:O,label:I[N]}));let D;E==="asc"?P==="dimension"?D=k.sort((O,N)=>O.label.localeCompare(N.label)):D=k.sort((O,N)=>O.value-N.value):E==="desc"&&(P==="dimension"?D=k.sort((O,N)=>N.label.localeCompare(O.label)):D=k.sort((O,N)=>N.value-O.value)),f.series[0].data=D.map(O=>O.value),f.xAxis.data=D.map(O=>O.label),o.setOption(f)}function x(P){if(P==="dimension"){const E=y(v.unref(s));b(v.unref(s),E),B()}else u={},B()}function T(P){if(P==="dimension"){const E=v.unref(r)[v.unref(r).length-1].xAxisData.map(L=>({value:L}));d.value={fieldName:v.unref(s),key:v.unref(s),type:P,filterData:f.xAxis.data,valueList:E}}else P==="indicators"&&(d.value={fieldName:i.data.yLabel,key:i.data.yLabel,type:"indicators",filterData:u});v.nextTick(()=>{v.unref(h).showModal()})}function M({checkKeys:P,type:E}){E==="dimension"?b(v.unref(s),P):E==="indicators"&&(u=P,B())}function B(){const P=v.unref(r)[v.unref(r).length-1].xAxisData;let E=m.map((L,I)=>({value:L,label:P[I]}));E=E.filter(L=>H(L.value)),f.series[0].data=E.map(L=>L.value),f.xAxis.data=E.map(L=>L.label),o.setOption(f)}function H(P){let E=!1,{rule:L,value:I}=u;switch(I=Number(I),L){case"LESS":E=P<I;break;case"GREATER":E=P>I;break;case"EQUAL":E=P===I;break;case"NOT_EQUAL":E=P!==I;break;default:E=!0;break}return E}v.onBeforeUnmount(()=>{document.removeEventListener("click",w)}),t({init:p});const F=v.computed(()=>v.unref(e)==="darkBlue"?"#b2c3dd":"");return{echartRef:n,dropdownList:l,isShowMenu:a,curXLabel:s,menuStyle:c,drillDimension:_,dimensionMap:r,deleteDimension:R,handleSort:A,handleClear:x,handleFilter:T,pivotFilterRef:h,filterData:d,onFilterChange:M,fontColor:F}}}),iU={style:{display:"flex",height:"400px"}},nU={style:{flex:"0 0 200px"}},oU={style:{flex:"0 0 650px",height:"100%"}},rU={key:0,style:{display:"flex","align-items":"center"}},sU={key:0,class:"dimension-item"},lU={key:1,style:{height:"30px"}},aU={style:{width:"100%",height:"100%"},ref:"echartRef"},hU=["onClick"];function dU(i,t,e,n,o,r){const s=v.resolveComponent("filter-outlined"),l=v.resolveComponent("a-menu-item"),a=v.resolveComponent("a-menu"),h=v.resolveComponent("a-dropdown"),d=v.resolveComponent("minus-square-outlined"),u=v.resolveComponent("pivot-filter");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",iU,[v.createElementVNode("div",nU,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},[v.createTextVNode(" 横轴:"+v.toDisplayString(i.curXLabel)+" ",1),v.createVNode(h,null,{overlay:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{key:"asc",onClick:t[0]||(t[0]=c=>i.handleSort("dimension","asc"))},{default:v.withCtx(()=>t[8]||(t[8]=[v.createTextVNode("升序")])),_:1}),v.createVNode(l,{key:"desc",onClick:t[1]||(t[1]=c=>i.handleSort("dimension","desc"))},{default:v.withCtx(()=>t[9]||(t[9]=[v.createTextVNode("降序")])),_:1}),v.createVNode(l,{key:"filter",onClick:t[2]||(t[2]=c=>i.handleFilter("dimension"))},{default:v.withCtx(()=>t[10]||(t[10]=[v.createTextVNode("筛选")])),_:1}),v.createVNode(l,{key:"clear",onClick:t[3]||(t[3]=c=>i.handleClear("dimension"))},{default:v.withCtx(()=>t[11]||(t[11]=[v.createTextVNode("清除")])),_:1})]),_:1})]),default:v.withCtx(()=>[v.createVNode(s,{class:"filter-icon",style:v.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4),v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},[v.createTextVNode(" 纵轴:"+v.toDisplayString(i.data.yLabel)+" ",1),v.createVNode(h,null,{overlay:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{key:"asc",onClick:t[4]||(t[4]=c=>i.handleSort("indicators","asc"))},{default:v.withCtx(()=>t[12]||(t[12]=[v.createTextVNode("升序")])),_:1}),v.createVNode(l,{key:"desc",onClick:t[5]||(t[5]=c=>i.handleSort("indicators","desc"))},{default:v.withCtx(()=>t[13]||(t[13]=[v.createTextVNode("降序")])),_:1}),v.createVNode(l,{key:"filter",onClick:t[6]||(t[6]=c=>i.handleFilter("indicators"))},{default:v.withCtx(()=>t[14]||(t[14]=[v.createTextVNode("筛选")])),_:1}),v.createVNode(l,{key:"clear",onClick:t[7]||(t[7]=c=>i.handleClear("indicators"))},{default:v.withCtx(()=>t[15]||(t[15]=[v.createTextVNode("清除")])),_:1})]),_:1})]),default:v.withCtx(()=>[v.createVNode(s,{class:"filter-icon",style:v.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4)]),v.createElementVNode("div",oU,[i.dimensionMap.length>1?(v.openBlock(),v.createElementBlock("div",rU,[v.createElementVNode("span",{style:v.normalizeStyle({color:i.fontColor})},"钻取维度:",4),(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dimensionMap,(c,g)=>(v.openBlock(),v.createElementBlock(v.Fragment,{key:g},[c.drillValue?(v.openBlock(),v.createElementBlock("div",sU,[v.createVNode(d,{class:"dimension-icon",onClick:f=>i.deleteDimension(g,c.key)},null,8,["onClick"]),v.createTextVNode(v.toDisplayString(c.key)+"("+v.toDisplayString(c.drillValue)+") ",1)])):v.createCommentVNode("",!0)],64))),128))])):(v.openBlock(),v.createElementBlock("div",lU)),v.createElementVNode("div",aU,null,512)]),v.withDirectives(v.createElementVNode("div",{style:v.normalizeStyle(i.menuStyle),class:"dropdown-menu"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dropdownList,c=>(v.openBlock(),v.createElementBlock("div",{class:"item",key:c,onClick:g=>i.drillDimension(c)},"下钻"+v.toDisplayString(c),9,hU))),128))],4),[[v.vShow,i.isShowMenu]])]),v.createVNode(u,{ref:"pivotFilterRef",data:i.filterData,onChange:i.onFilterChange},null,8,["data","onChange"])],64)}const uU=Hi(eU,[["render",dU],["__scopeId","data-v-f29855b0"]]),cU=v.defineComponent({components:{PivotChart:uU},name:"ChartModal",props:{},setup(i,{expose:t}){const e=v.inject("theme","light"),n=v.ref(!1),o=v.ref({}),r=v.ref();function s(l){o.value=l,n.value=!0,v.nextTick(()=>{r.value.init()})}return v.watch(n,l=>{window.modalShow&&window.modalShow(l)}),t({showModal:s}),{theme:e,visible:n,chartOptions:o,chartRef:r}}});function gU(i,t,e,n,o,r){const s=v.resolveComponent("pivot-chart"),l=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(l,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=a=>i.visible=a),title:"图形",style:{width:"900px"},destroyOnClose:!0,footer:null},{default:v.withCtx(()=>[v.createVNode(s,{data:i.chartOptions,ref:"chartRef"},null,8,["data"])]),_:1},8,["wrapClassName","visible"])}const fU=Hi(cU,[["render",gU]]),pU=v.defineComponent({name:"PivotAggregate",props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("dimensionFieldList",[]),r=v.ref(!1),s=v.ref([]),l=v.ref(""),a=v.ref(""),h=[{label:"合计",value:"SUM"},{label:"平均值",value:"AVG"},{label:"计数",value:"COUNT"},{label:"最大值",value:"MAX"},{label:"最小值",value:"MIN"},{label:"方差",value:"VAR"},{label:"标准差",value:"STDEV"}];function d(){t("confirm",v.unref(s),l.value),r.value=!1}function u(g,f){s.value=Xe.cloneDeep(g),l.value=f,r.value=!0;const p=v.unref(o).find(m=>m.label===f);a.value=(p==null?void 0:p.title)||f}const c=()=>document.getElementsByClassName("aggregate-modal")[0]||document.body;return v.watch(r,g=>{window.modalShow&&window.modalShow(g)}),e({showModal:u}),{theme:n,visible:r,aggregationType:s,options:h,dimensionKey:l,titleText:a,handleOk:d,getPopupContainer:c}}});function mU(i,t,e,n,o,r){const s=v.resolveComponent("a-select"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-form"),h=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(h,{wrapClassName:i.theme+" aggregate-modal",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=d=>i.visible=d),"ok-text":"确认","cancel-text":"取消",title:i.titleText+"-聚合",destroyOnClose:!1,maskClosable:!1,onOk:i.handleOk,onCancel:t[2]||(t[2]=d=>i.visible=!1)},{default:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"聚合方式"},{default:v.withCtx(()=>[v.createVNode(s,{value:i.aggregationType,"onUpdate:value":t[0]||(t[0]=d=>i.aggregationType=d),allowClear:"",options:i.options,mode:"multiple",getPopupContainer:i.getPopupContainer},null,8,["value","options","getPopupContainer"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])}const vU=Hi(pU,[["render",mU]]),bU=v.defineComponent({name:"PivotTop",props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.ref(!1),r=v.ref(""),s=v.ref("");function l(){t("confirm",{value:v.unref(r),key:v.unref(s)}),o.value=!1}function a(h){const{value:d,key:u}=h;r.value=d,o.value=!0,s.value=u}return v.watch(o,h=>{window.modalShow&&window.modalShow(h)}),e({showModal:a}),{theme:n,visible:o,topNum:r,handleOk:l}}});function CU(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-form"),h=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(h,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[1]||(t[1]=d=>i.visible=d),"ok-text":"确认","cancel-text":"取消",title:"维度取Top",destroyOnClose:!0,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"维度取Top"},{default:v.withCtx(()=>[v.createVNode(s,{value:i.topNum,"onUpdate:value":t[0]||(t[0]=d=>i.topNum=d),type:"number",style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","onOk"])}const yU=Hi(bU,[["render",CU]]);let Nh=(i=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(i));for(;i--;){let n=e[i]&63;n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n<63?t+="_":t+="-"}return t};const LY="";Mo.locale("zh-cn");const _U=v.defineComponent({name:"PivotDetail",components:{ATable:Vi.Table},props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("pageId",""),r=v.inject("context",""),s=v.inject("indicatorUrl",""),l=v.inject("indicatorToken",""),a=v.inject("theDateInfo",{}),h=v.ref(!1),d=v.ref(!1),u=v.ref([]),c=v.ref([]),g=v.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showTotal:m=>`共 ${m} 条数据`});async function f(m){var A;d.value=!0,h.value=!0;const{args:b={},dimension:C,indicator:w,splitSymbol:S}=m,{originData:y=[],cellHeaderPaths:{colHeaderPaths:_=[],rowHeaderPaths:R=[]}}=b;if(y!=null&&y.length){const x=y[0],T=_!=null&&_.length?_[_.length-1]:"",M=_.filter(D=>D.dimensionKey).concat(R.filter(D=>D.dimensionKey)).map(D=>D.dimensionKey);if(!(T!=null&&T.indicatorKey)||!M.length)return;const B=w.find(D=>D.label===T.indicatorKey),H={};for(const D of C)if(M.includes(D.label)){const N=(x[D.label]||"").split(S)||[];H[D.typeGuid]=N!=null&&N.length?N[N.length-1]:""}const{startTime:F,endTime:P,rangeFormat:E}=v.unref(a);F&&P&&(H.startTime=Mo(F).format(E),H.endTime=Mo(P).format(E));const L=await kr.post(`${v.unref(s)}/diagram/obtainDataSetData`,{pageId:v.unref(o),indexCode:(B==null?void 0:B.indexCode)||"",param:H},{headers:{Authentication:v.unref(l),operateContext:v.unref(r)}}),{columns:I=[],data:k=[]}=((A=L==null?void 0:L.data)==null?void 0:A.data)||{};u.value=I.filter(D=>D).map(D=>({title:D,dataIndex:D})),c.value=k.map(D=>({...D,uid:Nh(6)}))}d.value=!1}v.watch(h,m=>{window.modalShow&&window.modalShow(m)});const p=m=>{v.unref(g).current=m.current};return e({showModal:f}),{theme:n,visible:h,loading:d,pagination:g,columns:u,dataSource:c,handleTableChange:p}}}),wU={key:0,class:"spin-container"};function SU(i,t,e,n,o,r){const s=v.resolveComponent("a-spin"),l=v.resolveComponent("a-table"),a=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(a,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=h=>i.visible=h),width:"40%",title:"指标明细",destroyOnClose:!0,footer:null,bodyStyle:{maxHeight:"50vh",overflow:"auto"}},{default:v.withCtx(()=>[i.loading?(v.openBlock(),v.createElementBlock("div",wU,[v.createVNode(s,{size:"large"})])):v.createCommentVNode("",!0),i.loading?v.createCommentVNode("",!0):(v.openBlock(),v.createBlock(l,{key:1,"row-key":h=>h.uid,columns:i.columns,"data-source":i.dataSource,pagination:i.pagination,onChange:i.handleTableChange},null,8,["row-key","columns","data-source","pagination","onChange"]))]),_:1},8,["wrapClassName","visible"])}const xU=Hi(_U,[["render",SU],["__scopeId","data-v-ea105cde"]]),AU=(i,t)=>{i.register.icon("sortDown",{name:"sortDown",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"取消排序",placement:"top"}}),i.register.icon("sortUp",{name:"sortUp",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击降序",placement:"top"}}),i.register.icon("sortNormal",{name:"sortNormal",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击升序",placement:"top"}})},RU=v.defineComponent({props:{node:{type:[Object,String],required:!0}},render(){return this.node}}),TU={mounted(i){i.focus()}},MU=v.defineComponent({name:"PivotConfig",directives:{focus:TU},props:{fullMode:{type:Boolean,default:!1}},components:{VNodeRender:RU,draggable:ub,DeleteOutlined:NT},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.ref(!1),r=v.ref(),s=v.ref([]),l=v.ref([{title:"行维度",icon:v.createVNode(Ej),fields:[]},{title:"列维度",icon:v.createVNode(Mj),fields:[]},{title:"指标",icon:v.createVNode(o$),fields:[]}]),a=(_=[],R=[])=>{for(const A of v.unref(l))A.fields=[];for(const A of _)A.positionType==="rows"?v.unref(l)[0].fields.push(Xe.cloneDeep(A)):A.positionType==="columns"&&v.unref(l)[1].fields.push(Xe.cloneDeep(A));v.unref(l)[2].fields=Xe.cloneDeep(R),o.value=!0},h=v.computed(()=>[...v.unref(l)[0].fields.map(_=>({..._,label:_.showTitle,positionType:"rows"})),...v.unref(l)[1].fields.map(_=>({..._,label:_.showTitle,positionType:"columns"}))]),d=v.computed(()=>v.unref(l)[2].fields),u=()=>{s.value=[],t("confirm",v.unref(h),v.unref(d)),o.value=!1},c=(_,R)=>{const A=R[_.oldIndex],{scope:x}=A;["IDX","BUILT_IN_IDX"].includes(x)?s.value=[0,1]:["DIM","BUILT_IN_DIM"].includes(x)&&(s.value=[2])},g=()=>{s.value=[]},f=()=>{l.value=Xe.cloneDeep(v.unref(l))},p=(_,R)=>{v.unref(l)[_].fields.splice(R,1)},m=v.ref(),b=v.ref(),C=v.ref(""),w=(_,R)=>{i.fullMode&&(m.value=`${_}_${R}`,b.value=Xe.cloneDeep(v.unref(l)[_].fields[R]))},S=()=>{if(v.unref(C)){const _=v.unref(m).split("_");Vi.message.error(v.unref(C)),v.unref(l)[_[0]].fields[_[1]].showTitle=v.unref(b).showTitle,C.value=""}m.value=""},y=_=>{const R=_.target.value,A=v.unref(h).concat(v.unref(d));R?A.find(T=>T.name!==v.unref(b).name&&T.showTitle===R)&&(C.value="名称不能重复"):C.value="不能为空"};return v.watch(o,_=>{window.modalShow&&window.modalShow(_)}),e({showModal:a}),{theme:n,visible:o,fieldAreas:l,indSourceRef:r,maskList:s,currentEditItem:m,handleOk:u,onDragAreaStart:c,onDragEnd:g,handleDeleteField:p,handleEdit:w,onConfirmLabel:S,onDragAdd:f,onChangeLabel:y}}}),FY="",BU={class:"config-wrap"},PU={class:"area-content"},HU={class:"area-title"},EU={class:"field-item"},kU=["onClick"];function LU(i,t,e,n,o,r){const s=v.resolveComponent("v-node-render"),l=v.resolveComponent("a-input"),a=v.resolveComponent("delete-outlined"),h=v.resolveComponent("draggable"),d=v.resolveComponent("a-button"),u=v.resolveComponent("a-modal"),c=v.resolveDirective("focus");return v.openBlock(),v.createBlock(u,{wrapClassName:`${i.theme}`,title:"设置",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=g=>i.visible=g),"ok-text":"确认","cancel-text":"取消",maskClosable:!1,destroyOnClose:!1,style:{width:"500px"},bodyStyle:{padding:0},onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(d,{onClick:t[0]||(t[0]=g=>i.visible=!1)},{default:v.withCtx(()=>t[2]||(t[2]=[v.createTextVNode("取消")])),_:1}),v.createVNode(d,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[3]||(t[3]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[v.createElementVNode("div",BU,[v.createElementVNode("div",PU,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.fieldAreas,(g,f)=>(v.openBlock(),v.createElementBlock("div",{class:"area-item",key:f},[v.createElementVNode("div",HU,[v.createVNode(s,{class:"area-icon",node:g.icon},null,8,["node"]),v.createTextVNode(" "+v.toDisplayString(g.title),1)]),v.createVNode(h,{class:"area-list",list:g.fields,"item-key":"index",group:{name:"diGroup"},disabled:i.maskList.includes(f),onStart:p=>i.onDragAreaStart(p,g.fields),onEnd:i.onDragEnd,onAdd:i.onDragAdd},{item:v.withCtx(({index:p,element:m})=>[v.createElementVNode("div",EU,[i.currentEditItem===`${f}_${p}`?v.withDirectives((v.openBlock(),v.createBlock(l,{key:0,size:"small",value:m.showTitle,"onUpdate:value":b=>m.showTitle=b,onPressEnter:i.onConfirmLabel,onBlur:i.onConfirmLabel,onChange:i.onChangeLabel},null,8,["value","onUpdate:value","onPressEnter","onBlur","onChange"])),[[c]]):(v.openBlock(),v.createElementBlock("div",{key:1,style:{width:"100%"},onClick:b=>i.handleEdit(f,p)},v.toDisplayString(m.showTitle),9,kU)),i.fullMode?(v.openBlock(),v.createBlock(a,{key:2,style:{color:"red","padding-left":"8px"},onClick:b=>i.handleDeleteField(f,p)},null,8,["onClick"])):v.createCommentVNode("",!0)])]),_:2},1032,["list","disabled","onStart","onEnd","onAdd"])]))),128))])])]),_:1},8,["wrapClassName","visible","onOk"])}const FU=Hi(MU,[["render",LU],["__scopeId","data-v-7a3ea9b6"]]),IU=v.defineComponent({name:"IndSourceList",components:{CaretRightOutlined:lj,CaretDownOutlined:nj,LoadingOutlined:Ij,Draggable:ub},props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},isSub:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1}},setup(i,{emit:t,expose:e}){const n=v.inject("indicatorUrl",""),o=v.inject("indicatorToken",""),r=v.inject("pageId",""),s=v.inject("setItemDisabled",_=>!1),l=v.ref([]),a=v.ref(),h=v.reactive({pageSize:20,currentPage:1,totalResult:0}),d=v.ref(!1),u=v.ref(""),c=v.ref(!1);v.watch(()=>i.data,_=>{i.isSub&&(_==null||_.forEach(R=>{var A;R!=null&&R.isLeaf||(A=R.dataViewColumns)==null||A.forEach(x=>{x.show=!0,x.edit=!1,x.title&&(x.label=x.title)})}),l.value=_)},{deep:!0,immediate:!0});const g=()=>{var _;i.isSub||(_=v.unref(a))==null||_.removeEventListener("scroll",w)},f=async _=>{var A;if(v.unref(d))return;d.value=!0;const R={source:i.config.source||"INDICATOR_LIB",pageId:v.unref(r),dataSourceId:i.config.dataSourceId||"",indexName:u.value};_?(_.loading=!0,R.indexTypeGuid=_.indexTypeGuid,R.isLeaf=_.isLeaf):h&&(R.queryRequest={pageSize:h.pageSize,pageNum:h.currentPage});try{const x=await kr.post(`${v.unref(n)}/diagram/sourceList`,R,{headers:{Authentication:o,operateContext:"ygt"}}),{success:T,data:M={}}=x.data;if(T){const{rows:B=[],total:H=0}=M;B==null||B.forEach(F=>{var P;(_==null?void 0:_.isLeaf)==="1"?(P=F.dataViewColumns)==null||P.forEach(E=>{E.show=!0,E.edit=!1,E.title&&(E.label=E.title)}):F.show=!1}),_?(_.children=B,_.show=!0,B!=null&&B.length||(_.noData=!0)):(l.value=v.unref(l).concat(B),h.totalResult=+H,((A=v.unref(l))==null?void 0:A.length)>=H&&g())}_&&(_.loading=!1),d.value=!1}catch{_&&(_.loading=!1),d.value=!1}},p=async _=>{const R=l.value[_],{children:A=[]}=R;A!=null&&A.length?R.show=!R.show:!R.noData&&R.isLeaf?f(R):R.noData&&(R.show=!R.show)},m=(_,R)=>{t("onDragStart",_,R)},b=()=>{t("onDragEnd")},C=_=>{_.show=!_.show},w=_=>{_.target.scrollTop+_.target.clientHeight+20>=_.target.scrollHeight&&(h.currentPage++,f())},S=async()=>{await f(),v.nextTick(async()=>{v.unref(a).scrollHeight===v.unref(a).clientHeight&&h.totalResult>v.unref(l).length&&(h.currentPage++,S())})},y=async _=>{var R;g(),c.value=!0,h.currentPage=1,h.totalResult=0,l.value=[],u.value=_,await S(),c.value=!1,(R=v.unref(a))==null||R.addEventListener("scroll",w)};return v.onMounted(async()=>{var _;i.isSub||(S(),(_=v.unref(a))==null||_.addEventListener("scroll",w))}),v.onUnmounted(()=>{g()}),e({handleSearch:y}),{columnRef:a,sourceList:l,searchLoading:c,onToggleGroup:p,onToggleSource:C,setItemDisabled:s,onDragStart:m,onDragEnd:b,mapDataSetScope:yP,mapScope:CP,getLoadType:_P,getUseType:wP,getSourceType:SP}}}),IY="",DU={key:0,class:"no-data"},OU={class:"column-item"},zU=["onClick"],WU={key:3,class:"item-name"},NU={class:"column-item"},VU={key:0},jU={key:1},$U={key:2},GU={key:3},UU=["onClick"],KU={class:"item-name"},YU={class:"column-child-item"},XU={class:"field"},qU={class:"column-child-item-name"};function ZU(i,t,e,n,o,r){const s=v.resolveComponent("loading-outlined"),l=v.resolveComponent("caret-down-outlined"),a=v.resolveComponent("caret-right-outlined"),h=v.resolveComponent("ind-source-list",!0),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("draggable"),c=v.resolveComponent("a-spin");return v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["columns",i.isSub?"sub-columns":""]),ref:"columnRef"},[v.createVNode(c,{spinning:i.searchLoading,tip:"数据源加载中..."},{default:v.withCtx(()=>{var g;return[!((g=i.sourceList)!=null&&g.length)&&!i.searchLoading?(v.openBlock(),v.createElementBlock("div",DU,"暂无数据")):i.hasChildren?(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:1},v.renderList(i.sourceList,(f,p)=>(v.openBlock(),v.createElementBlock(v.Fragment,{key:f.indexTypeGuid||f.id},[v.createElementVNode("div",OU,[v.createElementVNode("span",{class:"item-group",onClick:m=>i.onToggleGroup(p)},[f.loading?(v.openBlock(),v.createBlock(s,{key:0})):f.show?(v.openBlock(),v.createBlock(l,{key:1})):(v.openBlock(),v.createBlock(a,{key:2})),f.isLeaf?(v.openBlock(),v.createElementBlock("span",WU,v.toDisplayString(f.indexTypeCode+"."+f.indexTypeName),1)):v.createCommentVNode("",!0)],8,zU)]),f.show?(v.openBlock(),v.createBlock(h,{key:0,data:f.children,isSub:!0,hasChildren:f.isLeaf==="0",config:i.config,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd},null,8,["data","hasChildren","config","onOnDragStart","onOnDragEnd"])):v.createCommentVNode("",!0)],64))),128)):(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:2},v.renderList(i.sourceList,f=>(v.openBlock(),v.createElementBlock("div",{key:f.id,class:v.normalizeClass(i.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[v.createElementVNode("div",NU,[v.createVNode(d,null,{title:v.withCtx(()=>[v.createElementVNode("div",null,"加载类型:"+v.toDisplayString(i.getLoadType(f.loadType)),1),f.useType?(v.openBlock(),v.createElementBlock("div",VU,"数据使用系统:"+v.toDisplayString(i.getUseType(f.useType)),1)):v.createCommentVNode("",!0),f.systemSource?(v.openBlock(),v.createElementBlock("div",jU,"制度出处:"+v.toDisplayString(f.systemSource),1)):v.createCommentVNode("",!0),f.dataTo?(v.openBlock(),v.createElementBlock("div",$U,"数据来源:"+v.toDisplayString(i.getSourceType(f.dataTo)),1)):v.createCommentVNode("",!0),f.meaning?(v.openBlock(),v.createElementBlock("div",GU,"指标含义:"+v.toDisplayString(f.meaning),1)):v.createCommentVNode("",!0)]),default:v.withCtx(()=>[v.createElementVNode("span",{class:"item-group",onClick:p=>i.onToggleSource(f)},[f.show?(v.openBlock(),v.createBlock(l,{key:0})):(v.openBlock(),v.createBlock(a,{key:1})),v.createElementVNode("span",KU,v.toDisplayString((f.indexCode?f.indexCode:"")+" "+f.name),1)],8,UU)]),_:2},1024)]),f.show?(v.openBlock(),v.createBlock(u,{key:0,modelValue:f.dataViewColumns,"onUpdate:modelValue":p=>f.dataViewColumns=p,group:{name:"diGroup",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:i.setItemDisabled(f.dataViewColumns),filter:".not-allow",onStart:p=>i.onDragStart(p,f),onEnd:i.onDragEnd},{item:v.withCtx(({element:p})=>[v.createElementVNode("div",YU,[v.createElementVNode("span",XU,"【"+v.toDisplayString(p.scope==="FIELD"?i.mapDataSetScope(p.genericType):i.mapScope(p.scope))+"】",1),v.createElementVNode("span",qU,v.toDisplayString(p.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart","onEnd"])):v.createCommentVNode("",!0)],2))),128))]}),_:1},8,["spinning"])],2)}const JU=Hi(IU,[["render",ZU],["__scopeId","data-v-aabcdc1c"]]),QU=v.defineComponent({name:"DragArea",props:{style:{type:Object,default:()=>({})},maskList:{type:Array,default:()=>[]}},setup(i,{emit:t}){return{onDragOver:s=>{s.preventDefault(),s.target.classList.add("highlight")},onDragLeave:s=>{s.preventDefault(),s.target.classList.remove("highlight")},onDragEnd:s=>{s.preventDefault(),s.target.classList.remove("highlight")},onDrop:s=>{s.preventDefault(),s.target.classList.remove("highlight");const l=Array.from(s.target.classList);l.includes("rows")?t("add","rows"):l.includes("columns")?t("add","columns"):l.includes("indicators")?t("add","indicators"):l.includes("filters")&&t("add","filters")}}}}),DY="";function tK(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"drag-area",style:v.normalizeStyle(i.style.main)},[i.maskList.includes(2)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"area-wrap filters",onDragover:t[0]||(t[0]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[1]||(t[1]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[2]||(t[2]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[3]||(t[3]=(...s)=>i.onDrop&&i.onDrop(...s)),style:v.normalizeStyle(i.style.filters)},null,36)):v.createCommentVNode("",!0),i.maskList.includes(0)?v.createCommentVNode("",!0):(v.openBlock(),v.createElementBlock("div",{key:1,class:"area-wrap rows",onDragover:t[4]||(t[4]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[5]||(t[5]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[6]||(t[6]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[7]||(t[7]=(...s)=>i.onDrop&&i.onDrop(...s)),style:v.normalizeStyle(i.style.rows)},null,36)),i.maskList.includes(1)?v.createCommentVNode("",!0):(v.openBlock(),v.createElementBlock("div",{key:2,class:"area-wrap columns",onDragover:t[8]||(t[8]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[9]||(t[9]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[10]||(t[10]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[11]||(t[11]=(...s)=>i.onDrop&&i.onDrop(...s)),style:v.normalizeStyle(i.style.columns)},null,36)),i.maskList.includes(2)?v.createCommentVNode("",!0):(v.openBlock(),v.createElementBlock("div",{key:3,class:"area-wrap indicators",onDragover:t[12]||(t[12]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[13]||(t[13]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[14]||(t[14]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[15]||(t[15]=(...s)=>i.onDrop&&i.onDrop(...s)),style:v.normalizeStyle(i.style.indicators)},null,36))],4)}const eK=Hi(QU,[["render",tK],["__scopeId","data-v-01e4c58d"]]),iK=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r}=i;return async(l={},a,h)=>{var f;const d=uC(i,l),{url:u,...c}=d||{};let g=t;if(!g){const{pathname:p}=window==null?void 0:window.location;if(p){const m=p.split("/");m!=null&&m.length&&(g=m[m.length-1])}}if(u&&c){a&&a("tableChange",{type:"11",data:c}),h&&h(c);try{return await kr({url:`${e}${u}`,method:"post",headers:{Authentication:n,operateContext:o},data:{...c,dataSourceId:(r==null?void 0:r.dataSourceId)||"",pageId:g},signal:((f=window.controller)==null?void 0:f.signal)||""})}catch(p){console.error(p)}}}},nK=(i={})=>{const{indicatorUrl:t=""}=i;return async(n,o)=>{var d;const r={},{search:s}=window==null?void 0:window.location;if(s){const u=s.slice(1,s.length).split("&");for(const c of u){const g=c.split("=");r[g[0]]=g[1]}}const{keyName:l,...a}=o,h={keyName:l};n==="save"&&(h.searchMap=a);try{return await kr({url:`${t}/userSearch/${n}`,method:"post",headers:{Authentication:r.token||null},data:h,signal:((d=window.controller)==null?void 0:d.signal)||""})}catch(u){console.error(u)}}},oK=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r={}}=i;return async(l={})=>{var h;const a=uC(i,l);try{return(await kr({url:`${e}/diagram/obtainDrillAbleDimensionOptions`,method:"post",headers:{Authentication:n,operateContext:o},data:{source:(r==null?void 0:r.source)||"INDICATOR_LIB",pageId:t,indicatorList:(a==null?void 0:a.indicatorList)||[],classifications:(a==null?void 0:a.queryColumns)||[],dataSourceId:(r==null?void 0:r.dataSourceId)||""},signal:((h=window.controller)==null?void 0:h.signal)||""})).data.data}catch(d){console.error(d)}}},rK={id:{type:String,default:""},name:{type:String,default:""},keyName:{type:String,default:""},type:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},position:{type:String,default:""},top:{type:String,default:""},left:{type:String,default:""},zIndex:{type:Number,default:1},events:{type:Array,default:()=>[]},dataType:{type:String,default:"indicator"},graphicConfig:{type:Object,default:()=>({})},data:{type:Array,default:()=>[]},scale:{type:Number,default:1},dimensionList:{type:Array,default:()=>[]},indicatorList:{type:Array,default:()=>[]},pageMode:{type:String,default:""},styleConfig:{type:Object,default:()=>({})},theme:{type:String,default:"light"},fullMode:{type:Boolean,default:!1},pageId:{type:String,default:""},indicatorUrl:{type:String,default:""},indicatorToken:{type:String,default:""},context:{type:String,default:""},enlargeContainer:{type:String,default:"body"},globalModel:{type:Object,default:()=>new Map},isIframeMode:{type:Boolean,default:!1},showLeftTree:{type:Boolean,default:!0},allowDrill:{type:Boolean,default:!1},showFullScreen:{type:Boolean,default:!0},relateKeyName:{type:String,default:""}},Xv={LAST_DATA:"上期值",SAME_DATA:"同期值",DIFF_DATA:"增减额",MOM_DATA:"环比(%)",YOY_DATA:"同比(%)"},VM=[{text:"排序",children:[{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"默认",menuKey:"default-sort"}],menuKey:"sort"},{text:"度量属性",menuKey:"property"},{text:"条件属性",menuKey:"conditionalProperty"},{text:"图形",menuKey:"graph"},{text:"筛选",menuKey:"filter"}],xs=["合计","平均值","计数","最大值","最小值","方差","标准差"],sK=v.defineComponent({name:"PivotTable",components:{PivotFilter:pT,PivotProperty:r7,ConditionalProperty:tU,ChartModal:fU,PivotAggregate:vU,PivotTop:yU,PivotConfig:FU,IndSourceList:JU,DragArea:eK,PivotDetail:xU,SettingOutlined:qj,DatabaseOutlined:pj,ArrowsAltOutlined:Q7,ShrinkOutlined:t$,FilterOutlined:jT,DeleteOutlined:NT,ClearOutlined:uj},props:{...rK},setup(i,{expose:t,emit:e}){let n=null;const o=v.ref(!1),r=v.ref(""),s=v.ref({}),l=v.ref(),a=v.ref({}),h=v.ref({}),d=v.ref({}),u=v.ref(),c=v.ref({}),g=v.ref(),f=v.ref(),p=v.ref(),m=v.ref(),b=v.ref(),C=v.ref(),w=v.ref(),S=v.ref(),y=v.ref(!1),_=v.ref({}),R=v.ref({}),A=v.ref({}),x=v.ref(),T=v.ref({}),M=v.ref("200px"),B=v.ref("200px"),H=v.ref(300),F=v.ref({}),P=v.ref(),E=v.ref(i.showLeftTree),L=v.ref(!1),I=v.ref({}),k=v.ref(0),D=v.ref(0),O=v.ref(),N=v.ref(!1),W=v.ref(),j=25,G=v.ref(!0),Y=v.ref({dateFormat:"YYYY-MM-DD"}),U=v.ref([]);let $=`|${Nh(6)}|`;v.provide("splitSymbol",$),v.provide("indicatorUrl",i.indicatorUrl),v.provide("indicatorToken",i.indicatorToken),v.provide("theme",i.theme),v.provide("pageId",i.pageId),v.provide("context",i.context),v.provide("graphicConfig",i.graphicConfig),v.provide("theDateInfo",Y);const tt=v.ref({}),gt=()=>{const V={borderColor:v.unref(ct).borderColor};tt.value=V},vt=v.computed(()=>{let V="#ECF1F5";switch(i.theme){case"default":V="#EAF0F9";break;case"dark":V="#FFFFFF";break}return{borderColor:"#E3E3E3",headerBgColor:V,headerColor:"#252525",bodyBgColor:"#FFFFFF",bodyColor:"#252525",indicatorsHeaderBgColor:V,indicatorsHeaderColor:"#252525",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#252525",aggregateBgColor:V,aggregateColor:"#252525",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"}}),At=v.ref(1),J=v.ref();new ResizeObserver(V=>{for(const K of V){const{width:X}=K.contentRect;J.value=X,At.value++,v.nextTick(()=>{ZM()})}}).observe(document.body);const Ct=v.computed(()=>{const{width:V}=i;return V.includes("%")&&At.value?i.isIframeMode?J.value:document.querySelector(`#pivotWrap_${i.id}`).clientWidth:parseFloat(V)}),ct=v.computed(()=>{var Q;const V={},{styleConfig:K}=i;let X={};(Q=Object.keys(K))!=null&&Q.length?X=K:X=v.unref(vt);for(const et in X)V[et]=X[et]||"transparent";return V}),at=v.ref({}),ft=()=>{const V=Nl();V&&(v.unref(at).width=V.width+2+"px"),v.unref(at).backgroundColor=cC(v.unref(ct).headerBgColor,2)};v.watch(()=>i.theme,()=>{n&&(n==null||n.updateOption(lt))});const dt=v.computed(()=>{var V,K,X;return i.fullMode&&!((V=lt.rows)!=null&&V.length)&&!((K=lt.columns)!=null&&K.length)&&!((X=lt.indicators)!=null&&X.length)}),ht=v.computed(()=>{var V;return{width:(V=i.width)!=null&&V.includes("%")?"calc(100%)":parseFloat(i.width)-v.unref(H)+"px",height:"100%",backgroundColor:i.theme==="darkBlue"?"#081653":"#F1F1F1",color:i.theme==="darkBlue"?"#b2c3dd":""}}),wt=v.computed(()=>{const V={fontSize:"14px"};return v.unref(E)&&(i.theme==="darkBlue"?V.color="#00CCFF":V.color="#416EFF"),V}),q=v.ref([]),xt=v.ref([]);v.provide("dimensionFieldList",q),v.provide("indicatorFieldList",xt);const Vt="-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",mt=v.computed(()=>v.unref(q).filter(V=>V.isInnerFilter).concat(v.unref(xt).filter(V=>V.isInnerFilter)).sort((V,K)=>V.timeStamp-K.timeStamp));v.watchEffect(()=>{var Q,et,it,Z,pt,St,Jt,Ut,Wt,Et;const{dropDownMenuBgColor:V,dropDownMenuColor:K,dropDownMenuHightLightColor:X}=ct.value;V&&((et=(Q=v.unref(w))==null?void 0:Q.style)==null||et.setProperty("--menu-bg-color",V)),K&&((Z=(it=v.unref(w))==null?void 0:it.style)==null||Z.setProperty("--menu-color",K)),X&&((St=(pt=v.unref(w))==null?void 0:pt.style)==null||St.setProperty("--menu-hight-light-color",X)),M.value&&((Ut=(Jt=v.unref(w))==null?void 0:Jt.style)==null||Ut.setProperty("--sub-menu-left",M.value)),B.value&&((Et=(Wt=v.unref(w))==null?void 0:Wt.style)==null||Et.setProperty("--sub-menu-top",B.value))}),AU($9,{sortNotActiveColor:v.unref(ct).sortNotActiveColor,sortActiveColor:v.unref(ct).sortActiveColor});const Rt=v.ref([]),ie=v.ref({}),Zt=v.ref({}),lt=v.reactive({records:[],columnHeaderTitle:!0,excelOptions:{fillHandle:!0},rows:[],columns:[],indicators:[],corner:{titleOnDimension:"row"},dataConfig:{sortRules:[],filterRules:[]},widthMode:"standard",menu:{renderMode:"html",dropDownMenuHighlight:[]},theme:{cellInnerBorder:!1,underlayBackgroundColor:"transparent",headerStyle:{bgColor(V){return v.unref(Rt).includes(V.dataValue)?v.unref(ct).indicatorsHeaderBgColor:v.unref(ct).headerBgColor},color(V){return v.unref(Rt).includes(V.dataValue)?v.unref(ct).indicatorsHeaderColor:v.unref(ct).headerColor},borderColor:v.unref(ct).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Vt},fontSize(){if(i.isIframeMode)return 14}},cornerHeaderStyle:{bgColor(){return v.unref(ct).headerBgColor},color:v.unref(ct).headerColor,borderColor:v.unref(ct).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Vt},fontSize(){if(i.isIframeMode)return 14}},bodyStyle:{borderColor:v.unref(ct).borderColor,color(V){var Q,et;const K=V.cellHeaderPaths.rowHeaderPaths,X=V.cellHeaderPaths.colHeaderPaths;return xs.includes((Q=K==null?void 0:K[K.length-1])==null?void 0:Q.value)?v.unref(ct).aggregateColor:v.unref(Rt).includes((et=X==null?void 0:X[X.length-1])==null?void 0:et.value)?v.unref(ct).indicatorsBodyColor:v.unref(ct).bodyColor},bgColor(V){var Q,et;const K=V.cellHeaderPaths.rowHeaderPaths,X=V.cellHeaderPaths.colHeaderPaths;return xs.includes((Q=K==null?void 0:K[K.length-1])==null?void 0:Q.value)?v.unref(ct).aggregateBgColor:v.unref(Rt).includes((et=X==null?void 0:X[X.length-1])==null?void 0:et.value)?v.unref(ct).indicatorsBodyBgColor:v.unref(ct).bodyBgColor},fontFamily(){if(i.isIframeMode)return Vt},fontSize(){if(i.isIframeMode)return 14}},rowHeaderStyle:{borderColor:v.unref(ct).borderColor,bgColor(V){return xs.includes(V.dataValue)?v.unref(ct).aggregateBgColor:v.unref(ct).bodyBgColor},color(V){return xs.includes(V.dataValue)?v.unref(ct).aggregateColor:v.unref(ct).bodyColor},fontFamily(){if(i.isIframeMode)return Vt},fontSize(){if(i.isIframeMode)return 14}},frameStyle:{borderLineWidth:1,borderColor:v.unref(ct).borderColor}}}),pe=v.computed(()=>{let V=0;return v.unref(E)&&i.fullMode&&(V=v.unref(H)),V}),Ae=v.computed(()=>{let V=0;return v.unref(L)&&(V=20),V}),ne=5,we=v.ref({});v.watch(y,V=>{if(V){const K={};v.nextTick(()=>{var et,it;const X=Nl();let Q=0;(et=v.unref(mt))!=null&&et.length&&(Q=(it=v.unref(O))==null?void 0:it.clientHeight),X&&(K.width=X.width+"px",K.height=X.height+"px",K.top=X.top+Q+v.unref(Ae)+"px",K.left=X.left+v.unref(pe)+v.unref(Ae)+j+"px"),we.value=K})}});const Yt=v.ref([]),yt=v.ref([]),Bt=v.ref({}),It=v.ref({}),te=v.ref([]),me=v.ref([]),Gt=v.ref([]),Ft=v.ref([]),Re=v.computed(()=>{const V=[];for(const it of v.unref(Yt)){const{data:Z,indicatorKey:pt="",calculateType:St=""}=it||{};V.push({label:Z.indicatorKey,columnName:Z.indicatorKey,location:"LEFT",show:!0,calcType:"BUILT_IN",builtInFormula:St,builtInValueSource:pt})}const K=[],X={};v.unref(yt).forEach(it=>{X[it.key]||(X[it.key]=[]),X[it.key].push(it)});for(const it in X){const Z=X[it]||[];Z.forEach((pt,St)=>{var Ke;const Jt=v.unref(q).find(ln=>ln.label===pt.key),Ut=v.unref(xt).find(ln=>ln.label===pt.key),Wt=Jt||Ut,Et={};St<Z.length-1&&(Et.join="&&"),(Wt==null?void 0:Wt.genericType)==="DATE"&&(Et.dateFormat=((Ke=v.unref(Y))==null?void 0:Ke.dateFormat)||"YYYY-MM-DD",St===0?Et.prop="startTime":St===1&&(Et.prop="endTime")),Wt&&K.push({fieldName:Wt.name,fieldType:Wt.genericType,fieldValue:Array.isArray(pt.value)?pt.value.join(","):pt.value,hrpIndexCode:Wt.indexCode,hrpIndexCodeNum:Wt.indexCodeNum,id:Wt.id,label:Wt.label,rule:pt.rule,targetSource:"",typeGuid:pt.typeGuid||"",type:pt.type,...Et})})}const Q=[];if(Object.keys(v.unref(Bt)))for(const it in v.unref(Bt))v.unref(Bt)[it]&&Q.push({key:it,num:v.unref(Bt)[it],rule:"TOP"});const et=[];if(Object.keys(v.unref(It)))for(const it in v.unref(It)){const{order:Z,type:pt,columnData:St,columnHeader:Jt}=v.unref(It)[it];if(Z.toLowerCase()==="default-sort")continue;const Ut={label:it,order:Z.toUpperCase(),type:"COMBINATION",fieldType:pt};pt==="indicators"&&(Ut.columnHeader=Jt,Ut.columnData=St,Ut.type="NORMAL"),et.push(Ut)}return{calc:V,filter:K,truncations:Q,sorts:et,aggregateMethod:v.unref(T)||{}}}),kt=oK(i),Xt=iK(i),Pe=nK(i),Ni=v.ref({}),rr=async()=>{var St,Jt,Ut,Wt;const{dimensionList:V,graphicConfig:K={}}=i,{queryColumnList:X=[]}=K,{rows:Q=[],columns:et=[]}=lt,it=(St=v.unref(Gt))!=null&&St.length?v.unref(Gt):[],Z=(Jt=v.unref(Ft))!=null&&Jt.length?v.unref(Ft):[];if(!(it!=null&&it.length))for(const Et of Q)it.push(Et.dimensionKey);if(!(Z!=null&&Z.length))for(const Et of et)Z.push(Et.dimensionKey);it!=null&&it.length||it.push(...V.filter(Et=>Et.position==="rows").map(Et=>Et.key)),Z!=null&&Z.length||Z.push(...V.filter(Et=>Et.position==="columns").map(Et=>Et.key));const pt=[];for(const Et in v.unref(a))pt.push({type:"dimension",key:Et,rule:v.unref(a)[Et]});for(const Et in v.unref(h))pt.push({type:"indicators",key:Et,rule:v.unref(h)[Et]});if(pt!=null&&pt.length&&nf(pt,{isHandle:!1}),X!=null&&X.length)for(const Et of X)!it.includes(Et.name)&&!Z.includes(Et.name)&&it.push(Et.name);Ni.value={...v.unref(Re),rowDimensionKeys:it,colDimensionKeys:Z,dimensions:(Ut=v.unref(te))!=null&&Ut.length?v.unref(te):v.unref(q),indicators:(Wt=v.unref(me))!=null&&Wt.length?v.unref(me):v.unref(xt)};try{const Et=await Xt({pivotTableCal:v.unref(Ni)},e,Ke=>{var ln;if(v.unref(G)){const{sqlConditions:Rs=[],queryColumns:Ts=[]}=Ke,Ro=GM(Rs),ui=Ts.find(ze=>ze.typeGuid==="the_date");if(ui&&(Y.value={dateFormat:ui.dateFormat||"YYYY-MM-DD"}),Ro!=null&&Ro.length)for(const ze of Ro)["startTime","endTime"].includes(ze.prop)&&(v.unref(Y)[ze.prop]=ze.fieldValue||"",(ln=v.unref(Y))!=null&&ln.rangeFormat||(v.unref(Y).rangeFormat=ze.dateFormat||"YYYY-MM-DD"));G.value=!1}});qM(Et)}catch(Et){console.error(Et)}};function GM(V){const K=[];for(const X of V)X.sqlConditions?K.push(...GM(X.sqlConditions)):X.fieldName==="the_date"&&K.push(X);return K}const fK=V=>{v.unref(Yt).find(K=>K.data.indicatorKey===V.data.indicatorKey)||Yt.value.push(V),rr()},pK=V=>{const K=v.unref(Yt).findIndex(X=>X.data.indicatorKey===V);K!==-1&&Yt.value.splice(K,1),rr()},nf=(V,{isHandle:K=!0}={})=>{let X=[];Array.isArray(V)?X=V:X=[V];for(const Q of X){const{key:et="",rule:it,type:Z=""}=Q||{};let pt=Xe.cloneDeep(it);Array.isArray(it)||(pt=[it]);const St=v.unref(q).find(Wt=>Wt.label===et),Jt=v.unref(xt).find(Wt=>Wt.label===et),Ut=St||Jt;if(Ut){if((Ut==null?void 0:Ut.genericType)==="DATE"&&(pt==null?void 0:pt.length)===1){const Wt=pt[0].value;pt[0].rule="GREATER_EQUAL",pt[1]={rule:"LESS_EQUAL",value:Wt}}for(let Wt=v.unref(yt).length-1;Wt>=0;Wt--){const Et=v.unref(yt)[Wt];Et.key===et&&Et.type===Z&&v.unref(yt).splice(Wt,1)}for(const Wt of pt){const{rule:Et,value:Ke}=Wt;et&&Et&&Ke&&yt.value.push({key:et,rule:Et,value:Ke,type:Z,typeGuid:Ut.typeGuid})}}}K&&rr()},mK=()=>{Bt.value=v.unref(_)||{},rr()},UM=V=>{const{key:K,order:X,type:Q,columnData:et=[]}=V;if(Q==="indicators"){let it="";for(const Z in v.unref(It))v.unref(It)[Z].type==="indicators"&&(it=Z);it&&delete v.unref(It)[it]}v.unref(It)[K]={order:X,type:Q,columnData:et},rr()},Vh=()=>{const V=v.unref(q),K=v.unref(xt),X=V.filter(et=>et.positionType==="rows").map(et=>et.name),Q=V.filter(et=>et.positionType==="columns").map(et=>et.name);te.value=Xe.cloneDeep(V),me.value=Xe.cloneDeep(K),Gt.value=Xe.cloneDeep(X),Ft.value=Xe.cloneDeep(Q),rr()};function vK(V,K=!0,X=-1){if(X>-1)lt.indicators.splice(X,0,...V);else for(const Q of V)lt.indicators.push(Q);K&&n.updateOption(lt)}function bK({label:V,calcType:K}){const X=[],Q=v.unref(Zt)[V]||[];for(const et in Xv)Q.indexOf(et)===-1&&X.push({text:Xv[et],menuKey:et});return K==="FORMULA"||!(X!=null&&X.length)?VM:[{text:"计算",menuKey:"calculate",children:X},...VM]}function KM(){var K;const V=[{text:"钻取",menuKey:"drill"},{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"筛选",menuKey:"filter"},{text:"聚合",menuKey:"aggregate"},{text:"取top",menuKey:"top"},{text:"删除",menuKey:"delete"}];return i.fullMode||i.allowDrill?v.unref(U)&&Array.isArray(v.unref(U))&&(K=v.unref(U))!=null&&K.length?V[0].children=v.unref(U).map(X=>({text:X.title||X.label,menuKey:X.label})):V.splice(0,1):(V.splice(0,1),V.splice(-1,1)),V}function CK(V,K){y.value=!0,v.unref(T)[K]=V||[],rr(),e("tableChange",{type:"9",data:{key:K,types:V}})}function yK(V,K=!0){var X;for(const Q of V){const{key:et,name:it,type:Z,dimensionKey:pt,width:St}=Q;let Jt;if(pt)Jt=Q;else{const Ut={dimensionKey:et,title:it,width:St?`${St}%`:"auto",type:Z};Z==="columns"?Ut.headerStyle={textStick:!0}:Z==="rows"&&(Ut.cornerHeaderIcon="sortNormal"),Ut.headerFormat=Wt=>{if(Z==="rows"){const Et=Wt==null?void 0:Wt.split($);return Et!=null&&Et.length?Et[Et.length-1]:Wt}else return Wt},Jt=Ut}if(Jt&&(Jt.headerStyle={textStick:!0},lt[Z].push(Jt)),(X=lt[Z])!=null&&X.length)for(const Ut of lt[Z])Ut.cornerDropDownMenu=KM();lt.dataConfig.sortRules.push({sortField:et,sortType:v.unref(r)})}K&&n.updateOption(lt),v.nextTick(()=>{XM()})}function YM(V){const K={},{records:X}=lt;for(const Q of X)for(const et of V)Sn(K,et)?K[et].find(it=>it.value===Q[et])||K[et].push(qv({value:Q[et]})):K[et]=qv([{value:Q[et]}]);return K}function qv(V){const K=Xe.cloneDeep(V);if(typeof V=="object")if(Array.isArray(K))for(const Q of K)X(Q);else X(K);function X(Q){for(const et in Q)if(typeof Q[et]=="string"){const it=Q[et].split($);it!=null&&it.length&&(Q[et]=it[it.length-1])}}return K}function XM(){const{dataset:{columns:V,rows:K}}=n,X=K.concat(V);s.value=YM(X)}async function qM(V){var Et,Ke,ln,Rs,Ts,Ro,ui,ze;U.value=await kt({pivotTableCal:v.unref(Ni)});let K=V;V?W.value=Xe.cloneDeep(V):K=Xe.cloneDeep(v.unref(W)),y.value=!0;const{data:X={}}=(K==null?void 0:K.data)||{},{rows:Q=[]}=X,et=[],it=[];for(const jt of v.unref(q)){if(!jt.show)continue;const be=lt[jt.positionType].find(hi=>hi.dimensionKey===jt.label);be?it.push({...be,title:jt.showTitle}):it.push({key:jt.label,name:jt.showTitle,type:jt.positionType,width:jt.width})}for(let jt=0;jt<v.unref(xt).length;jt++){const be=v.unref(xt)[jt];if(!be.show)continue;const hi=bK(be),Ci=lt.indicators.find(yi=>yi.indicatorKey===be.label);let je={};Ci?je={...Ci,dropDownMenu:hi,title:be.showTitle}:je={indicatorKey:be.label,title:be.showTitle,width:be!=null&&be.width?`${be.width}%`:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},dropDownMenu:hi,format:(yi,ki,Ms,jh)=>{const Bs=jh.getRecordByCell(ki,Ms)||[];return Bs[0]&&isNaN(+Bs[0][be.label])?Bs[0][be.label]:yi||"-"}},je&&(je.style={padding:[16,28,16,28]},et.push(je))}const Z=it.filter(jt=>jt.type==="rows");if(((Et=lt==null?void 0:lt.rows)==null?void 0:Et.length)!==Z.length&&typeof((Ke=v.unref(x))==null?void 0:Ke.col)=="number"&&(v.unref(x).col+=Z.length-(((ln=lt==null?void 0:lt.rows)==null?void 0:ln.length)||0)),lt.indicators=[],lt.rows=[],lt.columns=[],(Rs=v.unref(Yt))!=null&&Rs.length)for(const jt of v.unref(Yt))isNaN(+jt.position)||et.splice(+jt.position,0,{...jt.data,calculateType:jt.calculateType});const{sortType:pt,col:St,row:Jt}=v.unref(x)||{};for(const jt of et)jt&&(jt.headerIcon=be=>{const{col:hi,row:Ci}=be;if(St===hi&&Jt===Ci){let je="sortNormal";return pt==="ASC"?je="sortUp":pt==="DESC"&&(je="sortDown"),je}else return"sortNormal"});vK(et,!1),yK(it,!1);const Ut=[],Wt=it.filter(jt=>jt.type==="rows").map(jt=>jt.key||jt.dimensionKey);for(const jt of Q)for(const be in jt)if(!xs.includes(jt[be])){const hi=Wt.indexOf(be);if(hi!==-1){const Ci=[];for(let je=0;je<=hi;je++){const yi=String(jt[Wt[je]]);if(yi.includes($)){const ki=yi.split($);ki!=null&&ki.length&&Ci.push(ki[ki.length-1])}else Ci.push(yi)}Ci!=null&&Ci.length&&(jt[be]=Ci.join($))}}for(const jt of it){const be=(jt==null?void 0:jt.key)||(jt==null?void 0:jt.dimensionKey);if(jt.type==="columns"&&!v.unref(A)[be])v.unref(A)[be]=Zv("",be,Q);else if(jt.type==="rows")if(v.unref(R)[be]){const{type:hi}=v.unref(R)[be]||{};Ut.push(Zv(hi,be,Q))}else if(!v.unref(x)||v.unref(x).sortField===be||!n)Ut.push(Zv("",be,Q));else{const hi=lt.dataConfig.sortRules.find(Ci=>Ci.sortField===be);hi&&Ut.push(hi)}}if(v.unref(x)&&Ut.push(v.unref(x)),(Ts=Object.keys(v.unref(A)))!=null&&Ts.length)for(const jt in v.unref(A))Ut.push(v.unref(A)[jt]);if(lt.records=Q,lt.dataConfig.sortRules=Ut,Q!=null&&Q.length&&(v.unref(I).records=[]),(Ro=lt.columns)!=null&&Ro.length?lt.columnHeaderTitle=!0:(ui=lt.indicators)!=null&&ui.length?lt.columnHeaderTitle=!1:(ze=lt.rows)!=null&&ze.length&&(lt.columnHeaderTitle=!0),n)n.updateOption(lt),v.nextTick(()=>{JM()}),y.value=!1;else{const jt=document.getElementById(`pivotTableContainer_${i.id}`);n=new uT(jt,lt),v.nextTick(()=>{JM(),o.value=!0,y.value=!1,i.isIframeMode&&(v.unref(k)&&n.setScrollTop(v.unref(k)),v.unref(D)&&n.setScrollLeft(v.unref(D)))}),HK()}}const As=v.ref({});function ZM(){Nl()&&(v.unref(L)?(v.unref(As).top=v.unref(Ae)+"px",v.unref(As).left="0"):(v.unref(As).top="0",v.unref(As).left="0"))}function JM(){var V;if(n&&!((V=lt.records)!=null&&V.length)){const{dataset:{rows:K}}=n,X={};for(const Q of K)X[Q]="";v.unref(I).dataConfig={...lt.dataConfig,filterRules:[]},v.unref(I).records=[X],n.updateOption({...lt,...v.unref(I)})}}function _K(V,K){y.value=!0,nf({type:"indicators",key:V,rule:K}),e("tableChange",{type:"3",data:{type:"indicators",key:V,rule:K}})}function wK(V,K){y.value=!0,nf({type:"dimension",key:V,rule:K}),e("tableChange",{type:"3",data:{type:"dimension",key:V,rule:K}})}function SK(V,K){var it;let X=!1;const Q=lt[K].findIndex(Z=>Z.dimensionKey===V),et=lt.dataConfig.sortRules.findIndex(Z=>Z.sortField===V);if(Q!==-1){if(lt[K].splice(Q,1),i.fullMode||i.allowDrill){const Z=v.unref(q).findIndex(pt=>pt.label===V);Z!==-1&&(v.unref(q)[Z].isInnerFilter?(v.unref(q)[Z].show=!1,X=!0):v.unref(q).splice(Z,1))}else for(const Z of lt[K])Z.cornerDropDownMenu=KM();(it=v.unref(x))!=null&&it.col&&(v.unref(x).col-=1),y.value=!0,Vh(),e("tableChange",{type:"7"})}et!==-1&&(lt.dataConfig.sortRules[et].sortType=r),n.updateOption(lt),v.nextTick(()=>{if(XM(),!X){delete a.value[V];const Z=v.unref(yt).findIndex(pt=>pt.key===V);Z!==-1&&v.unref(yt).splice(Z,1)}})}function xK(V){const{indicators:K}=lt,X=K.findIndex(Q=>Q.indicatorKey===V);if(X!==-1){const Q=K[X];if(K.splice(X,1),Q.calculateType){const et=Q.indicatorKey.split("@"+Q.calculateType)[0],it=v.unref(Zt)[et].indexOf(Q.calculateType);it!==-1&&v.unref(Zt)[et].splice(it,1);const Z=v.unref(Rt).indexOf(Q.title);Z!==-1&&v.unref(Rt).splice(Z,1),delete v.unref(ie)[Q.title]}pK(Q.indicatorKey),e("tableChange",{type:"2",data:Q.indicatorKey})}}function Zv(V,K,X){let Q=[];const et=new Set;for(const it of X){const Z=it[K];Z&&!xs.includes(Z)&&et.add(Z)}return Q=Array.from(et),V==="asc"?Q=Q.sort((it,Z)=>it.localeCompare(Z)):V==="desc"&&(Q=Q.sort((it,Z)=>Z.localeCompare(it))),{sortField:K,sortBy:[...Q,...xs]}}function QM(V,K,X,Q){y.value=!0;let{menu:{dropDownMenuHighlight:et},rows:it}=lt;Q=Q+1,et=et.filter(pt=>!(pt.type==="dimension"&&pt.field===K)||pt.type==="indicator"),et.push({col:X,row:Q-1,field:K,type:"dimension",menuKey:V}),lt.menu.dropDownMenuHighlight=et;const Z=it.find(pt=>pt.dimensionKey===K);if(Z){let pt="sortNormal";V==="asc"?pt="sortUp":V==="desc"&&(pt="sortDown"),Z.cornerHeaderIcon=pt}n.updateOption(lt),V==="default-sort"?delete v.unref(R)[K]:v.unref(R)[K]={type:V},UM({key:K,order:V,type:"dimension"}),e("tableChange",{type:"4",data:{key:K,order:V,type:"dimension"}})}function tB(V,K,X,Q,et){var Et;y.value=!0;const{menu:it}=lt;let Z=it.dropDownMenuHighlight,pt="";(Et=lt.rows)!=null&&Et.length&&(pt=lt.rows[lt.rows.length-1].dimensionKey);const St=X.filter((Ke,ln)=>ln<X.length-1),Jt=St.map(Ke=>({columnName:Ke.dimensionKey})),Ut=St.map(Ke=>Ke.value),Wt=Z.findIndex(Ke=>Ke.field===pt&&Ke.type==="dimension");Wt!==-1&&Z.splice(Wt,1),Z=Z.filter(Ke=>Ke.type==="dimension"),Z.push({col:Q,row:et,field:K,type:"indicator",menuKey:V}),lt.menu.dropDownMenuHighlight=Z,n.updateOption(lt),V==="default-sort"?x.value=null:x.value={sortField:pt,sortByIndicator:K,sortType:V.toUpperCase(),query:Ut,col:Q,row:et},UM({key:K,order:V,type:"indicators",columnData:Ut,columnHeader:Jt}),e("tableChange",{type:"4",data:{key:K,order:V,type:"indicators"}})}function eB({dimensionKey:V,value:K=""}){const X={};v.unref(a)[V]&&(X.filterData=v.unref(a)[V]);const Q=v.unref(q).find(et=>et.label===V);d.value={tableInstance:n,fieldName:K||(Q==null?void 0:Q.title)||V,key:V,type:"dimension",...X},v.nextTick(()=>{v.unref(u).showModal(),e("tableChange",{type:"5",data:V})})}function AK(V,K){d.value={tableInstance:n,fieldName:K,key:V,type:"indicators",filterData:v.unref(h)[V]},v.nextTick(()=>{v.unref(u).showModal()})}function RK({indicatorKey:V,menuKey:K}){y.value=!0;let X=lt.indicators.length-1;const Q=`${V}@${K}`,et=`${V}(${Xv[K]}) fx`;v.unref(Rt).push(et),v.unref(ie)[et]=Q,lt.indicators.forEach((it,Z)=>{it.indicatorKey===V&&(X=Z+1)}),v.unref(Zt)[V]||(v.unref(Zt)[V]=[]),v.unref(Zt)[V].push(K),fK({data:{indicatorKey:Q,title:et,width:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},headerIcon:"sortNormal",dropDownMenu:[{text:"排序",children:[{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"默认",menuKey:"default-sort"}],menuKey:"sort"},{text:"度量属性",menuKey:"property"},{text:"条件属性",menuKey:"conditionalProperty"},{text:"删除",menuKey:"delete"}],style:{padding:[16,28,16,28]},format:(it,Z,pt,St)=>{const Jt=St.getRecordByCell(Z,pt)||[];return Jt[0]&&isNaN(+Jt[0][Q])?Jt[0][Q]:it}},position:X,indicatorKey:V,calculateType:K}),e("tableChange",{type:"1",data:{indicatorKey:V,calculateType:K}})}function TK(){const V=lt.rows[0]?lt.rows[0].cornerDropDownMenu:[],K=lt.columns[0]?lt.columns[0].cornerDropDownMenu:[],X=lt.rows.map(Z=>({...Z,cornerDropDownMenu:K})),Q=lt.columns.map(Z=>({...Z,cornerDropDownMenu:V}));lt.columns=X,lt.rows=Q;const{type:et,len:it}=lt.aggregate||{};et&&(lt.records.splice(-it),lt.aggregate={type:et,len:0}),lt.menu.dropDownMenuHighlight=[],a.value={},h.value={},c.value={},lt.dataConfig.filterRules=[],n.updateOption(lt)}function MK({indicatorKey:V,fieldName:K}){const X=of(V);if(X>-1){const Q=lt.indicators[X].formatConfig||{};v.unref(g).showModal({...Q,indicatorKey:V,fieldName:K})}}function BK(V){const K=of(V);if(K>-1){const X=lt.indicators[K].conditionalConfig||[];v.unref(f).showModal(V,X)}}function of(V){return lt.indicators.findIndex(K=>K.indicatorKey===V)}function PK(V){const K=v.unref(q)[0],X=v.unref(q).map(it=>it.label),Q=YM(X),et={xLabel:K.label,yLabel:V,dimensionData:Q,records:qv(lt.records)};v.unref(C).showModal(et)}function HK(){n.on("scroll",V=>{const{scrollDirection:K}=V;K==="vertical"?k.value=n.getScrollTop():K==="horizontal"&&(D.value=n.getScrollLeft())}),n.on("dblclick_cell",V=>{const{cellLocation:K="",field:X=""}=V;K==="body"&&!X.includes("LAST_DATA")&&!X.includes("SAME_DATA")&&!X.includes("DIFF_DATA")&&!X.includes("MOM_DATA")&&!X.includes("YOY_DATA")&&v.unref(S).showModal({args:V,splitSymbol:$,dimension:v.unref(q),indicator:v.unref(xt)})}),n.on("after_render",()=>{gt(),ZM(),ft(),v.nextTick(()=>{o.value=!0})}),n.on("icon_click",V=>{const{name:K,col:X,row:Q}=V;if(["sortNormal","sortUp","sortDown"].includes(K)){const{rows:et,indicators:it}=lt,Z=n.getCellValue(X,Q);let pt=v.unref(q).find(Et=>Et.showTitle===Z);pt||(pt=v.unref(xt).find(Et=>Et.showTitle===Z));let St=pt==null?void 0:pt.label;if(v.unref(Rt).includes(Z)&&(St=v.unref(ie)[Z]),!St)return;const Jt=et.find(Et=>Et.dimensionKey===St),Ut=it.find(Et=>Et.indicatorKey===St);let Wt="default-sort";if(K==="sortUp"?Wt="desc":K==="sortDown"?Wt="default-sort":(!K||K==="sortNormal")&&(Wt="asc"),Ut){const Et=n.getCellHeaderPaths(X,Q);tB(Wt,St,(Et==null?void 0:Et.colHeaderPaths)||[],X,Q)}else Jt&&QM(Wt,St,X,Q)}}),n.on("show_menu",()=>{const V=document.querySelector(`#pivotTableContainer_${i.id} .vtable__menu-element`);V&&(V.classList.add("first"),M.value=parseFloat(V.style.left)+V.clientWidth+3+"px",B.value=parseFloat(V.style.top)+"px")}),n.on("dropdown_menu_click",V=>{const{menuKey:K,field:X,col:Q,row:et}=V,{dimensionKey:it,indicatorKey:Z,value:pt}=X[X.length-1];l.value=V;const St=v.unref(U).find(Jt=>Jt.label===K);if(St){const Jt=v.unref(q).findIndex(Ut=>Ut.label===it);if(Jt!==-1){const Ut={...St,show:!0,positionType:"rows",showTitle:St.title||St.label};q.value.splice(Jt+1,0,Ut),y.value=!0,Vh(),e("tableChange",{type:"8"})}}switch(K){case"drill":alert("无维度可钻取");break;case"delete":it?SK(it,"rows"):Z&&xK(Z);break;case"asc":case"desc":case"default-sort":it?QM(K,it,Q,et):Z&&tB(K,Z,X,Q,et);break;case"filter":it?eB({dimensionKey:it}):Z&&AK(Z,pt);break;case"LAST_DATA":case"SAME_DATA":case"DIFF_DATA":case"MOM_DATA":case"YOY_DATA":case"zb":RK({indicatorKey:Z,menuKey:K});break;case"trans":TK();break;case"property":MK({indicatorKey:Z,fieldName:pt});break;case"conditionalProperty":BK(Z);break;case"aggregate":v.unref(p).showModal(v.unref(T)[it]||[],it);break;case"top":EK(it);break;case"graph":PK(Z);break}})}function EK(V){v.unref(m).showModal({value:v.unref(_)[V]||"",key:V})}function kK(){v.unref(b).showModal(v.unref(q),v.unref(xt))}async function LK(){y.value=!0,await Pe("save",{keyName:i.relateKeyName||i.keyName,data:[]}),a.value={},h.value={},c.value={},lt.dataConfig.filterRules=[],yt.value=[],rr()}function FK(V=[],K=[]){var it;const X=V.concat(K).map(Z=>Z.name),Q=v.unref(q).filter(Z=>Z.isInnerFilter&&!X.includes(Z.name)).map(Z=>({...Z,show:!1})),et=v.unref(xt).filter(Z=>Z.isInnerFilter&&!X.includes(Z.name)).map(Z=>({...Z,show:!1}));q.value=[...V,...Q],xt.value=[...K,...et];for(const Z in v.unref(It))if(((it=v.unref(It)[Z])==null?void 0:it.type)==="indicators"){delete v.unref(It)[Z];break}i.fullMode||i.allowDrill?(R.value={},x.value={},A.value={},y.value=!0,Vh(),e("tableChange",{type:"10",data:{dimensions:v.unref(q),indicators:v.unref(xt)}})):qM()}function IK(V){if(!v.unref(P))return;const{name:K,scope:X}=v.unref(P),Q=v.unref(q).find(St=>St.name===K),et=v.unref(q).findIndex(St=>St.name===K),it=v.unref(xt).find(St=>St.name===K),Z=v.unref(xt).findIndex(St=>St.name===K),pt={timeStamp:new Date().getTime()};if(["rows","columns"].includes(V))if(Q)if(Q.show){Vi.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else Q.positionType=V,Q.show=!0,v.unref(q).push(Q),v.unref(q).splice(et,1);else v.unref(q).push({...Xe.cloneDeep(v.unref(P)),...pt,positionType:V,showTitle:v.unref(P).label});else if(V==="indicators")if(it)if(it.show){Vi.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else it.show=!0,v.unref(xt).push(it),v.unref(xt).splice(Z,1);else v.unref(xt).push({...Xe.cloneDeep(v.unref(P)),...pt,showTitle:v.unref(P).label});else if(V==="filters"){if(["IDX","BUILT_IN_IDX"].includes(X))if(v.unref(mt).find(St=>St.name===K)){Vi.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else it?(it.isInnerFilter=!0,it.timeStamp=new Date().getTime()):v.unref(xt).push({...Xe.cloneDeep(v.unref(P)),showTitle:v.unref(P).label,show:!1,isInnerFilter:!0,...pt});else if(["DIM","BUILT_IN_DIM"].includes(X))if(v.unref(mt).find(St=>St.name===K)){Vi.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else Q?(Q.isInnerFilter=!0,Q.timeStamp=new Date().getTime()):v.unref(q).push({...Xe.cloneDeep(v.unref(P)),positionType:"filters",showTitle:v.unref(P).label,show:!1,isInnerFilter:!0,...pt})}y.value=!0,P.value=null,Vh(),e("tableChange",{type:"10",data:{dimensions:v.unref(q),indicators:v.unref(xt)}})}const DK=(V=[])=>{let K=!1;for(const X of v.unref(q))if(!V.find(et=>et.typeGuid===X.typeGuid)){K=!0;break}return K};v.provide("setItemDisabled",DK);const iB=()=>{},OK=({checkKeys:V,key:K,type:X})=>{X==="dimension"?(a.value[K]=V,c.value={},wK(K,V)):X==="indicators"&&(h.value[K]=V,_K(K,V));const Q=[];for(const et in v.unref(a))Q.push({key:et,data:v.unref(a)[et],type:"dimension"});for(const et in v.unref(h))Q.push({key:et,data:v.unref(h)[et],type:"indicators"});Pe("save",{keyName:i.relateKeyName||i.keyName,data:Q})};function zK(V){const{indicatorKey:K,unit:X="",format:Q,floatLength:et,position:it}=V,Z=of(K);if(Z>-1){const pt=lt.indicators[Z];pt.formatConfig=V,pt.format=(St,Jt,Ut,Wt)=>{const Et=Wt.getRecordByCell(Jt,Ut)||[];return Et[0]&&isNaN(+Et[0][pt.indicatorKey])?Et[0][pt.indicatorKey]:(Q==="integer"?St=Math.round(Number(St)):Q==="float"&&!isNaN(et)?St=Number(St).toFixed(et):Q==="percent"&&(St=Number(St)*100+"%"),it==="right"?St+X:X+St)},n.updateOption(lt)}}function WK(V,K=[]){const X=of(V);if(X>-1){const Q=lt.indicators[X];Q.conditionalConfig=K;const et=[];K.forEach(it=>{let Z="";it.conditions.forEach((pt,St)=>{St>0&&(Z+=pt.join==="and"?" && ":" || "),Z+=`value${pt.operation}${pt.value}`}),et.push(Z)}),Q.style.color=({dataValue:it})=>{let Z="#333";return K.forEach((pt,St)=>{pt.color&&(Z=Jv(et[St],it)?pt.color:Z)}),Z},Q.style.textAlign=({dataValue:it})=>{let Z="left";return K.forEach((pt,St)=>{pt.align&&(Z=Jv(et[St],it)?pt.align:Z)}),Z},Q.customRender=({rect:it,dataValue:Z})=>{let pt=[];return K.forEach((St,Jt)=>{if(St.icon&&Jv(et[Jt],Z)){const Wt=bP(St.icon,St.iconColor);pt=[{type:"icon",x:St.align!=="right"?15:it.width-25,y:it.height/2-7,svg:Wt,height:14,width:14}]}}),{elements:pt,renderDefault:!0}},n.updateOption(lt)}}function Jv(V,K){V=V||"true";const X=`function (value){
367
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function RG(i){var t=function(e,n){if(Ol(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,n||"default");if(Ol(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}(i,"string");return Ol(t)=="symbol"?t:t+""}function Uv(i,t,e){return(t=RG(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}var jg=v.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(i,t){var e=t.emit,n=v.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),background:"hsl(".concat(i.hue,", 100%, 50%)")}});return{saturationStyle:n,sliderStyle:v.computed(function(){return{top:"".concat((100-i.value)/100*i.size-5,"px"),left:"".concat(i.saturation*i.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(o){var r=o.target.getBoundingClientRect(),s=r.left,l=r.top,a=function(d){var u=d.clientX,c=d.clientY,g=u-s,f=c-l;g<0&&(g=0),f<0&&(f=0),g>i.size&&(g=i.size),f>i.size&&(f=i.size);var p=g/i.size*100,m=100-f/i.size*100;e("change",p,m)},h=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",h)};a(o),document.addEventListener("mousemove",a),document.addEventListener("mouseup",h)}}}});function xo(i,t){t===void 0&&(t={});var e=t.insertAt;if(i&&typeof document<"u"){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i))}}xo(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),jg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"saturation",style:v.normalizeStyle(i.saturationStyle),onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[t[1]||(t[1]=v.createElementVNode("div",{class:"saturation-white"},null,-1)),t[2]||(t[2]=v.createElementVNode("div",{class:"saturation-black"},null,-1)),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],36)},jg.__scopeId="data-v-24517fec",jg.__file="src/picker/Saturation.vue";var $g=v.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(i,t){var e=t.emit,n=v.computed(function(){return{top:"".concat((1-i.hue/360)*i.height-2,"px"),height:"".concat(4,"px")}}),o=v.ref();return v.onMounted(function(){(function(){o.value.width=i.width,o.value.height=i.height;var r=o.value.getContext("2d"),s=r.createLinearGradient(0,0,0,i.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),r.fillStyle=s,r.fillRect(0,0,i.width,i.height)})()}),{canvas:o,sliderStyle:n,onSelect:function(r){var s=r.target.getBoundingClientRect().top,l=function(h){var d=h.clientY-s;d<0&&(d=0),d>i.height&&(d=i.height);var u=-100*d/i.height+100;e("change",360*u/100)},a=function(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",a)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",a)}}}}),TG={ref:"canvas"};xo(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),$g.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"hue",onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[v.createElementVNode("canvas",TG,null,512),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],32)},$g.__scopeId="data-v-78b9f4f0",$g.__file="src/picker/Hue.vue";var Gg=v.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(i,t){var e=t.emit,n=v.computed(function(){return{top:"".concat(i.alpha*i.height-2,"px"),height:"".concat(4,"px")}}),o=v.ref(),r=function(){var s=o.value.getContext("2d");o.value.width=i.width,o.value.height=i.height;var l=function(h){var d=document.createElement("canvas"),u=d.getContext("2d"),c=2*h;return d.width=c,d.height=c,u.fillStyle="#ffffff",u.fillRect(0,0,c,c),u.fillStyle="#ccd5db",u.fillRect(0,0,h,h),u.fillRect(h,h,h,h),d}(5);s.fillStyle=s.createPattern(l,"repeat"),s.fillRect(0,0,i.width,i.height);var a=s.createLinearGradient(0,0,0,i.height);a.addColorStop(.01,"rgba(255,255,255,0)"),a.addColorStop(.99,i.color),s.fillStyle=a,s.fillRect(0,0,i.width,i.height)};return v.watch(function(){return i.color},function(){r()}),v.onMounted(function(){r()}),{canvas:o,sliderStyle:n,onSelect:function(s){var l=s.target.getBoundingClientRect().top,a=function(d){var u=d.clientY-l;u<0&&(u=0),u>i.height&&(u=i.height);var c=parseFloat((u/i.height).toFixed(2));e("change",c)},h=function(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",h)};a(s),document.addEventListener("mousemove",a),document.addEventListener("mouseup",h)}}}}),MG={ref:"canvas"};xo(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Gg.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"alpha",onMousedown:t[0]||(t[0]=v.withModifiers(function(){return i.onSelect&&i.onSelect.apply(i,arguments)},["prevent","stop"]))},[v.createElementVNode("canvas",MG,null,512),v.createElementVNode("div",{class:"slider",style:v.normalizeStyle(i.sliderStyle)},null,4)],32)},Gg.__scopeId="data-v-24dc9656",Gg.__file="src/picker/Alpha.vue";var RM={rgb:"RGBA",hex:"HEX",hsl:"HSLA",hsv:"HSVA"},TM={rgb:"RGB",hex:"HEX",hsl:"HSL",hsv:"HSV"},BG={RGB:"rgb",RGBA:"rgb",HEX:"hex",HSL:"hsl",HSLA:"hsl",HSV:"hsv",HSVA:"hsv"};function MM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function Kv(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?MM(Object(e),!0).forEach(function(n){Uv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):MM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}var Ss=null,BM=function(i,t,e){var n=v.ref({}),o=e||{},r=o.placement,s=o.defaultStyle,l={strategy:o.strategy||"absolute",placement:r||"auto",onFirstUpdate:function(){Ss.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(a){var h=a.state,d=h.styles,u=h.placement,c=d.popper;n.value=Kv(Kv(Kv({},c),s),{},{transformOrigin:u==="top"?"center bottom":"center top"})}}]};return v.watch(function(){return[v.unref(i),v.unref(t)]},function(a,h){var d,u=zl(a,2),c=u[0],g=u[1],f=zl(h,2),p=f[0],m=f[1];if(c&&g&&(p!==c||m!==p)){(d=Ss)===null||d===void 0||d.destroy();var b=c.$el||c,C=g.$el||g;v.nextTick(function(){Ss=xG(b,C,l)})}}),v.onBeforeUnmount(function(){var a;Ss&&((a=Ss)===null||a===void 0||a.destroy(),Ss=null)}),{instance:Ss,style:n}},Ug=v.defineComponent({props:{value:{type:String,default:"RGBA"},showAlpha:{type:Boolean},options:{type:[Boolean,Array]}},emits:["change"],setup:function(i,t){var e=t.emit,n=v.ref(null),o=v.ref(null),r=v.ref(!1),s=BM(n,o,{strategy:"fixed",defaultStyle:{zIndex:2}}).style,l=v.computed(function(){return Array.isArray(i.options)&&i.options.length>1}),a=v.computed(function(){var d=i.options,u=i.showAlpha,c=i.value;return Array.isArray(d)?u?d.map(function(g){return RM[g]}).filter(function(g){return!g.includes(c)}):d.map(function(g){return TM[g]}).filter(function(g){return!g.includes(c)}):[]}),h=function(d){var u,c,g=d.target;!((u=v.unref(n))!==null&&u!==void 0&&u.isEqualNode(g))&&(!((c=v.unref(n))===null||c===void 0)&&c.contains(g))||(r.value=!1)};return v.onMounted(function(){document.addEventListener("mouseup",h,!1)}),v.onUnmounted(function(){document.removeEventListener("mouseup",h,!1)}),{targetRef:n,selectorRef:o,selectorStyle:s,isShowSelector:r,isNeedSelect:l,formatOptions:a,onShow:function(){l.value&&(r.value=!0)},onFormatChange:function(d){e("change",BG[d])}}}}),PG={class:"format"},HG={key:0,class:"arrow"},EG=["onClick"];xo(".format[data-v-5f6e8f5e]{position:relative}.label[data-v-5f6e8f5e]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;position:relative;width:60px}[pick-colors-theme=dark] .label[data-v-5f6e8f5e]{background:#252930;color:#999}.arrow[data-v-5f6e8f5e]{height:6px;margin-bottom:4px;margin-left:5px;transform:rotate(135deg);width:6px}.arrow[data-v-5f6e8f5e],[pick-colors-theme=dark] .arrow[data-v-5f6e8f5e]{border-right:1px solid #999;border-top:1px solid #999}.selector[data-v-5f6e8f5e]{align-items:center;background:#f7f8f9;border-radius:5px;box-shadow:0 0 16px 0 rgba(0,0,0,.16);cursor:pointer;display:flex;flex-direction:column;font-weight:400;justify-content:center;padding:4px}[pick-colors-theme=dark] .selector[data-v-5f6e8f5e]{background:#252930;color:#999}.selector-item[data-v-5f6e8f5e]{align-items:center;display:flex;height:30px;justify-content:center;width:60px}.selector-item[data-v-5f6e8f5e]:hover{background:#e1f2fe}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]{color:#fff}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]:hover{background:#0087fa}.active-selector-item[data-v-5f6e8f5e]{background:#e1f2fe}[pick-colors-theme=dark] .active-selector-item[data-v-5f6e8f5e]{background:#0087fa}.v-enter-active[data-v-5f6e8f5e],.v-leave-active[data-v-5f6e8f5e]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-5f6e8f5e],.v-leave-to[data-v-5f6e8f5e]{opacity:0;transform:scaleY(0)}"),Ug.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",PG,[v.createElementVNode("div",{class:"label",ref:"targetRef",onClick:t[0]||(t[0]=function(){return i.onShow&&i.onShow.apply(i,arguments)})},[v.createElementVNode("span",null,v.toDisplayString(i.value),1),i.isNeedSelect?(v.openBlock(),v.createElementBlock("div",HG)):v.createCommentVNode("v-if",!0)],512),v.createVNode(v.Transition,null,{default:v.withCtx(function(){return[i.isShowSelector?(v.openBlock(),v.createElementBlock("div",{key:0,class:"selector",ref:"selectorRef",style:v.normalizeStyle(i.selectorStyle)},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.formatOptions,function(s){return v.openBlock(),v.createElementBlock("div",{class:"selector-item",key:s,onClick:function(l){return i.onFormatChange(s)}},v.toDisplayString(s),9,EG)}),128))],4)):v.createCommentVNode("v-if",!0)]}),_:1})])},Ug.__scopeId="data-v-5f6e8f5e",Ug.__file="src/picker/input-value/FormatValue.vue";var Kg=v.defineComponent({name:"Input",components:{FormatValue:Ug},props:{format:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number},showAlpha:{type:Boolean},formatOptions:{type:[Boolean,Array]}},emits:["change","focus","blur","enter","formatChange"],setup:function(i,t){var e=t.emit;return{onInput:function(n){var o;e("change",(o=n.target)===null||o===void 0?void 0:o.value)},valueStyle:v.computed(function(){return{minWidth:"".concat(i.width,"px"),maxWidth:"".concat(i.width,"px"),width:"".concat(i.width,"px")}}),onFocus:function(){e("focus")},onBlur:function(){e("blur")},onEnter:function(){e("enter")},onFormatChange:function(n){e("formatChange",n)}}}}),kG={class:"input"},LG=[".value"];function PM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function jn(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?PM(Object(e),!0).forEach(function(n){Uv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):PM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}xo(".input[data-v-2c454c00]{display:flex;font-size:12px}.value[data-v-2c454c00]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-2c454c00]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-2c454c00]:focus{border:1px solid #1890ff;outline:none}"),Kg.render=function(i,t,e,n,o,r){var s=v.resolveComponent("FormatValue");return v.openBlock(),v.createElementBlock("div",kG,[v.createVNode(s,{value:i.format,showAlpha:i.showAlpha,options:i.formatOptions,onChange:i.onFormatChange},null,8,["value","showAlpha","options","onChange"]),v.createElementVNode("input",{class:"value",style:v.normalizeStyle(i.valueStyle),".value":i.value,onFocus:t[0]||(t[0]=function(){return i.onFocus&&i.onFocus.apply(i,arguments)}),onInput:t[1]||(t[1]=function(){return i.onInput&&i.onInput.apply(i,arguments)}),onBlur:t[2]||(t[2]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onKeydown:t[3]||(t[3]=v.withKeys(function(){return i.onEnter&&i.onEnter.apply(i,arguments)},["enter"]))},null,44,LG)])},Kg.__scopeId="data-v-2c454c00",Kg.__file="src/picker/input-value/InputValue.vue";var HM=function(i,t,e){return[i,t*e/((i=(2-t)*e)<1?i:2-i)||0,i/2]},EM={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Yg=function(i){i=Math.min(Math.round(i),255);var t=Math.floor(i/16),e=i%16;return"".concat(EM[t]||t).concat(EM[e]||e)},kM=function(i){var t=i.r,e=i.g,n=i.b;return isNaN(t)||isNaN(e)||isNaN(n)?"":"#".concat(Yg(t)).concat(Yg(e)).concat(Yg(n))},Wl=function(i,t){var e;typeof(e=i)=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1&&(i="100%");var n=function(o){return typeof o=="string"&&o.indexOf("%")!==-1}(i);return i=Math.min(t,Math.max(0,parseFloat("".concat(i)))),n&&(i=parseInt("".concat(i*t),10)/100),Math.abs(i-t)<1e-6?1:i%t/parseFloat(t)},zh=function(i,t,e){i=6*Wl(i,360),t=Wl(t,100),e=Wl(e,100);var n=Math.floor(i),o=i-n,r=e*(1-t),s=e*(1-o*t),l=e*(1-(1-o)*t),a=n%6,h=[e,s,r,r,l,e][a],d=[l,e,e,s,r,r][a],u=[r,r,l,e,e,s][a];return{r:Math.round(255*h),g:Math.round(255*d),b:Math.round(255*u)}},LM=function(i,t,e){var n,o,r=i.h,s=i.s,l=i.v,a=i.a;if(e)switch(a=(o=(n=a).toString().match(/\.(\d{1,2})(\d*)/))&&o[2].length>0?parseFloat(n.toFixed(2)):n,t){case"hsl":var h=HM(r,s/100,l/100);return"hsla(".concat(r.toFixed(0),", ").concat(Math.round(100*h[1]),"%, ").concat(Math.round(100*h[2]),"%, ").concat(a,")");case"hsv":return"hsva(".concat(r.toFixed(0),", ").concat(Math.round(s),"%, ").concat(Math.round(l),"%, ").concat(a,")");case"rgb":var d=zh(r,s,l),u=d.r,c=d.g,g=d.b;return"rgba(".concat(u,", ").concat(c,", ").concat(g,", ").concat(a,")");default:return"".concat(kM(zh(r,s,l))).concat(Yg(255*a))}else switch(t){case"hsl":var f=HM(r,s/100,l/100);return"hsl(".concat(r.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(r.toFixed(0),", ").concat(Math.round(s),"%, ").concat(Math.round(l),"%)");case"rgb":var p=zh(r,s,l),m=p.r,b=p.g,C=p.b;return"rgb(".concat(m,", ").concat(b,", ").concat(C,")");default:return kM(zh(r,s,l))}},Xg=function(i){var t=i.r,e=i.g,n=i.b;t=Wl(t,255),e=Wl(e,255),n=Wl(n,255);var o,r=Math.max(t,e,n),s=Math.min(t,e,n),l=r,a=r-s,h=r===0?0:a/r;if(r===s)o=0;else{switch(r){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4}o/=6}return{h:360*o,s:100*h,v:100*l}},FM=function(i){var t=i.h,e=i.s,n=i.l;n/=100;var o=e/=100,r=Math.max(n,.01);return e*=(n*=2)<=1?n:2-n,o*=r<=1?r:2-r,{h:+t,s:100*(n===0?2*o/(r+o):2*e/(n+e)),v:100*((n+e)/2)}},IM=function(i){var t=[];if(i.match(/^#([0-9a-fA-f]{3,4})$/g))for(var e=1;e<i.length;e++)t.push(parseInt("0x"+i[e].repeat(2)));else if(i.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var n=1;n<i.length;n+=2)t.push(parseInt("0x"+i.slice(n,n+2)));return{r:t[0],g:t[1],b:t[2],a:t[3]}},Yv=function(i,t,e){if(typeof i=="string"&&i!==""){var n=qg(i,Zg(i),e),o=WM(n);return o==null?"":LM(o,t,e)}return""},DM=function(i){var t=zl(i.match(/(\d(\.\d+)?)+/g),4);return{r:t[0],g:t[1],b:t[2],a:t[3]}},OM=function(i){var t=zl(i.match(/(\d(\.\d+)?)+/g),4),e=t[0],n=t[1],o=t[2],r=t[3];return{h:e,s:parseFloat(n),l:parseFloat(o),a:r}},zM=function(i){var t=zl(i.match(/(\d(\.\d+)?)+/g),4),e=t[0],n=t[1],o=t[2],r=t[3];return{h:parseFloat(e),s:parseFloat(n),v:parseFloat(o),a:parseFloat(r)}},qg=function(i,t){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(t){case"rgb":var e=DM(i),n=e.r,o=e.g,r=e.b,s=e.a;return jn(jn({},Xg({r:n,g:o,b:r})),{},{a:+s});case"hsv":var l=zM(i);return{h:l.h,s:l.s,v:l.v,a:l.a};case"hsl":var a=OM(i),h=a.h,d=a.s,u=a.l,c=a.a;return jn(jn({},FM({h,s:d,l:u})),{},{a:+c});default:var g=IM(i),f=g.r,p=g.g,m=g.b,b=g.a;return jn(jn({},Xg({r:f,g:p,b:m})),{},{a:b/255})}else switch(t){case"rgb":return jn(jn({},Xg(DM(i))),{},{a:1});case"hsv":var C=zM(i);return{h:C.h,s:C.s,v:C.v,a:1};case"hsl":return jn(jn({},FM(OM(i))),{},{a:1});default:return jn(jn({},Xg(IM(i))),{},{a:1})}},Zg=function(i){return i.match(/^#/)?"hex":i.match(/^rgb/)?"rgb":i.match(/^hsl/)?"hsl":i.match(/^hsv/)?"hsv":"hex"},WM=function(i){var t=i.h,e=i.s,n=i.v,o=i.a;return isNaN(t)&&isNaN(e)&&isNaN(n)?null:(isNaN(t)&&(t=0),isNaN(e)&&(e=0),isNaN(n)&&(n=0),isNaN(o)&&(o=1),{h:t,s:e,v:n,a:o})},Wh=v.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(i){var t=v.ref(),e=v.inject("theme",{theme:"light"}).theme,n=v.computed(function(){return parseFloat((i.width||i.size)+"")}),o=v.computed(function(){return parseFloat((i.height||i.size)+"")}),r=v.computed(function(){return{width:"".concat(v.unref(n),"px"),height:"".concat(v.unref(o),"px"),border:i.border?"1px solid ".concat(v.unref(e)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(i.borderRadius,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(v.unref(e)==="dark"?"#2681ff":"#1890ff"):""}}),s=function(){var l=t.value.getContext("2d");t.value.width=v.unref(n),t.value.height=v.unref(o);var a=function(h){var d=document.createElement("canvas"),u=d.getContext("2d"),c=2*h;return d.width=c,d.height=c,u.fillStyle="#ffffff",u.fillRect(0,0,c,c),u.fillStyle="#ccd5db",u.fillRect(0,0,h,h),u.fillRect(h,h,h,h),d}(5);l.fillStyle=l.createPattern(a,"repeat"),l.fillRect(0,0,v.unref(n),v.unref(o)),l.fillStyle=i.value,l.fillRect(0,0,v.unref(n),v.unref(o))};return v.watch(function(){return i.value},function(){s()}),v.onMounted(function(){s()}),{canvas:t,colorItemStyle:r}}}),FG=["draggable"];xo(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Wh.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("canvas",{class:"color-item",style:v.normalizeStyle(i.colorItemStyle),ref:"canvas",draggable:i.draggable},null,12,FG)},Wh.__scopeId="data-v-02da71fd",Wh.__file="src/color-item/ColorItem.vue";var Jg=v.defineComponent({name:"Colors",components:{ColorItem:Wh},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(i,t){var e=t.emit;return{onSelectColor:function(n,o){e("change",n,o)},useColors:v.computed(function(){return i.colors.map(function(n){return Yv(n,"hex",!0)})})}}}),IG={class:"colors"};function NM(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),e.push.apply(e,n)}return e}function Ao(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?NM(Object(e),!0).forEach(function(n){Uv(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):NM(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}xo(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),Jg.render=function(i,t,e,n,o,r){var s=v.resolveComponent("color-item");return v.openBlock(),v.createElementBlock("div",IG,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.useColors,function(l,a){return v.openBlock(),v.createBlock(s,{key:a,class:"color-item",size:16,value:l,border:!1,"border-radius":3,selected:i.selectedIndex===a,onClick:v.withModifiers(function(h){return i.onSelectColor(l,+a)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},Jg.__scopeId="data-v-0f8b52a8",Jg.__file="src/picker/Colors.vue";var Qg=v.defineComponent({name:"Picker",components:{Colors:Jg,Saturation:jg,Hue:$g,Alpha:Gg,InputValue:Kg},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}},formatOptions:{type:[Boolean,Array]}},emits:["change","formatChange"],setup:function(i,t){var e=t.emit,n=v.computed(function(){return Ao(Ao({},i.style),{},{width:i.showAlpha?"230px":"205px"})}),o=v.ref(),r=v.ref(),s=v.ref(),l=function(){var p,m=(p=i.value)===null||p===void 0?void 0:p.trim();if(m!=null&&m!==""){var b=Zg(m);return WM(qg(m,b,i.showAlpha))}return null};v.watch(function(){return i.value},function(){i.value!==v.unref(s)&&(o.value=l())},{immediate:!0}),v.watch(function(){return[v.unref(o),i.format]},function(p){var m=zl(p,2),b=m[0],C=m[1],w="";b!=null?(w=LM(Ao({},b),i.format,i.showAlpha),r.value=Ao({},b)):r.value=null,s.value=w;var S=l();JSON.stringify(b)!==JSON.stringify(S)&&JSON.stringify(b)!==JSON.stringify(C)&&e("change",w)},{immediate:!0});var a=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.h)||0}),h=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.s)||0}),d=v.computed(function(){var p;return((p=v.unref(o))===null||p===void 0?void 0:p.v)||0}),u=v.computed(function(){var p,m;return((p=v.unref(o))===null||p===void 0?void 0:p.a)!=null?(m=v.unref(o))===null||m===void 0?void 0:m.a:1}),c=v.computed(function(){return zh(v.unref(a),v.unref(h),v.unref(d))}),g=v.computed(function(){return"rgb(".concat(v.unref(c).r,", ").concat(v.unref(c).g,", ").concat(v.unref(c).b,")")}),f=v.ref(-1);return{h:a,s:h,v:d,a:u,rgbStr:g,onSelectSaturation:function(p,m){f.value=-1,v.unref(o)==null?o.value={h:v.unref(a),s:p,v:m,a:v.unref(u)}:o.value=Ao(Ao({},v.unref(o)),{},{s:p,v:m})},onSelectHue:function(p){f.value=-1,v.unref(o)==null&&(o.value={h:p,s:v.unref(h),v:v.unref(d),a:v.unref(u)}),o.value=Ao(Ao({},v.unref(o)),{},{h:p})},onSelectAlpha:function(p){f.value=-1,v.unref(o)==null?o.value={h:v.unref(a),s:v.unref(h),v:v.unref(d),a:p}:o.value=Ao(Ao({},v.unref(o)),{},{a:p})},handleInputFormat:function(p){return i.showAlpha?RM[p]:TM[p]},colorValue:s,pickerStyle:n,onInputChange:function(p){f.value=-1,s.value=p},handleChange:function(){var p,m=(p=v.unref(s))===null||p===void 0?void 0:p.trim();if(m!==""){var b=i.showAlpha,C=Zg(m),w=qg(m,C,b),S=function(y){var _=y.h,R=y.s,A=y.v,x=y.a;return!(isNaN(_)||isNaN(R)||isNaN(A)||isNaN(x))}(w);S?o.value=w:v.unref(r)!=null?o.value=v.unref(r):s.value=""}else o.value=null},selectColorIndex:f,onSelectColor:function(p,m){if(f.value=m,(p=p.trim())==="")o.value=null;else{var b=Zg(p);b?function(C,w,S){if(C.length!==0){var y=qg(C,w,S),_=y.h,R=y.s,A=y.v;if(!(isNaN(_)||isNaN(R)||isNaN(A))){var x=1,T=y.a;isNaN(T)||(x=T),o.value={h:_,s:R,v:A,a:x}}}}(p,b,!0):o.value=null}},onFormatChange:function(p){e("formatChange",p)}}}}),DG={class:"picker-inner"},OG={class:"picker-header"};xo(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),Qg.render=function(i,t,e,n,o,r){var s=v.resolveComponent("saturation"),l=v.resolveComponent("hue"),a=v.resolveComponent("alpha"),h=v.resolveComponent("input-value"),d=v.resolveComponent("Colors");return v.openBlock(),v.createElementBlock("div",{class:"picker",style:v.normalizeStyle(i.pickerStyle)},[v.createElementVNode("div",DG,[v.createElementVNode("div",OG,[v.createVNode(s,{class:"saturation",hue:i.h,saturation:i.s,value:i.v,onChange:i.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),v.createVNode(l,{class:"hue",hue:i.h,onChange:i.onSelectHue},null,8,["hue","onChange"]),i.showAlpha?(v.openBlock(),v.createBlock(a,{key:0,class:"alpha",alpha:i.a,color:i.rgbStr,onChange:i.onSelectAlpha},null,8,["alpha","color","onChange"])):v.createCommentVNode("v-if",!0)]),v.createVNode(h,{format:i.handleInputFormat(i.format),value:i.colorValue,showAlpha:i.showAlpha,width:i.showAlpha?150:125,formatOptions:i.formatOptions,onChange:i.onInputChange,onBlur:i.handleChange,onEnter:i.handleChange,onFormatChange:i.onFormatChange},null,8,["format","value","showAlpha","width","formatOptions","onChange","onBlur","onEnter","onFormatChange"]),i.colors.length>0?(v.openBlock(),v.createBlock(d,{key:0,class:"colors",colors:i.colors,"selected-index":i.selectColorIndex,onChange:i.onSelectColor},null,8,["colors","selected-index","onChange"])):v.createCommentVNode("v-if",!0)])],4)},Qg.__scopeId="data-v-6ceadec6",Qg.__file="src/picker/Picker.vue";var tf=v.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(i){var t=v.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:v.computed(function(){return{width:"".concat(i.size,"px"),height:"".concat(i.size,"px"),lineHeight:"".concat(i.size,"px"),boxShadow:i.selected?"0 0 3px 2px ".concat(v.unref(t)==="dark"?"#2681ff":"#1890ff"):""}})}}});xo(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),tf.render=function(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("svg",{class:"add-color-item",style:v.normalizeStyle(i.addColorItemStyle),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},t[0]||(t[0]=[v.createElementVNode("g",{class:"container"},[v.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)]),4)},tf.__scopeId="data-v-ceb1719c",tf.__file="src/add-color-item/AddColorItem.vue";var ef=v.defineComponent({name:"ColorPicker",components:{ColorItem:Wh,Picker:Qg,AddColorItem:tf},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean],default:"body"},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}},position:{type:String},placement:{type:String},formatOptions:{type:[Boolean,Array],default:!1}},emits:["change","update:value","update:showPicker","overflowMax","closePicker","formatChange"],setup:function(i,t){var e=t.emit,n=v.ref([]),o=v.computed(function(){return v.unref(n).map(function(x){return Yv(x,"hex",i.showAlpha)})}),r=v.ref("hex");v.watch(function(){return i.format},function(){r.value=i.format},{immediate:!0}),v.watch(function(){return i.value},function(){var x=i.value||"",T=Array.isArray(x)?x:[x];n.value=T.map(function(M){return Yv(M,v.unref(r),i.showAlpha)})},{immediate:!0});var s=v.ref(void 0),l=v.computed(function(){return v.unref(n)[v.unref(s)]}),a=v.ref(!1);v.watch(function(){return i.showPicker},function(){a.value=i.showPicker},{immediate:!0});var h,d,u=v.ref(null),c=v.ref(null),g=BM(u,c,{defaultStyle:{zIndex:i.zIndex},strategy:i.position,placement:i.placement}).style,f=function(){v.unref(u)==null&&(u.value=v.unref(A)[0]),v.unref(s)==null&&(s.value=0),i.showPicker===void 0?a.value=!0:e("update:showPicker",!0)},p=function(){s.value=void 0,i.showPicker===void 0?a.value=!1:e("update:showPicker",!1),e("closePicker",v.toRaw(Array.isArray(i.value)||i.addColor?v.unref(n):v.unref(n)[0]))},m=v.ref(),b=function(){var x=SM(Vg.mark(function T(M){var B,H,F,P;return Vg.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(H=M.target,(F=(B=H.dataset)===null||B===void 0?void 0:B.index)!=null&&F!==""){E.next=4;break}return E.abrupt("return");case 4:if(P=+F,v.unref(s)!==P){E.next=7;break}return E.abrupt("return");case 7:v.unref(s)!=null&&v.unref(s)!==P?(p(),h&&clearTimeout(h),h=setTimeout(function(){f(),clearTimeout(h)},100)):f(),s.value=P,u.value=H;case 10:case"end":return E.stop()}},T)}));return function(T){return x.apply(this,arguments)}}(),C=function(){var x=SM(Vg.mark(function T(M){var B,H,F,P,E;return Vg.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(P=M.target,!(!((B=v.unref(m))!==null&&B!==void 0&&B.isEqualNode(P))&&(!((H=v.unref(m))===null||H===void 0)&&H.contains(P)))){L.next=4;break}return L.abrupt("return");case 4:if(E=(F=v.unref(c))===null||F===void 0?void 0:F.$el,!(E!=null&&E.contains(P))){L.next=8;break}return L.abrupt("return");case 8:d&&clearTimeout(d),d=setTimeout(function(){v.unref(a)&&p()},0);case 10:case"end":return L.stop()}},T)}));return function(T){return x.apply(this,arguments)}}();v.watch(a,function(){v.unref(a)&&(f(),clearTimeout(d))});var w,S=v.ref(i.max>v.unref(n).length),y=v.computed(function(){return typeof i.popupContainer=="string"||Ol(i.popupContainer)==="object"&&i.popupContainer!=null?i.popupContainer:"body"}),_=v.computed(function(){return typeof i.popupContainer=="boolean"&&i.popupContainer===!1}),R=v.computed(function(){return i.theme});v.watch(function(){return[i.theme,v.unref(c)]},function(){v.nextTick(function(){var x,T;(x=v.unref(m))===null||x===void 0||x.setAttribute("pick-colors-theme",v.unref(R)),(T=v.unref(c))===null||T===void 0||(T=T.$el)===null||T===void 0||T.setAttribute("pick-colors-theme",v.unref(R))})},{immediate:!0}),v.provide("theme",{theme:R});var A=v.ref([]);return v.onMounted(function(){document.addEventListener("mouseup",C,!1),i.showPicker&&f()}),v.onUnmounted(function(){document.removeEventListener("mouseup",C,!1),h&&(clearTimeout(h),h=null),d&&(clearTimeout(d),d=null)}),{valueList:n,colorItemSelected:function(x){return(i.addColor?v.unref(n).length>0:v.unref(n).length>1)&&v.unref(s)===x},selectedColor:l,selectedIndex:s,isShowPicker:a,addColorItemShow:S,onPickerChange:function(x){var T=v.unref(s),M=v.unref(n).slice(),B=v.unref(n).length;if(T!=null){T>=0?M[T]=x:(s.value=B,M.push(x));var H="";H=Array.isArray(i.value)||i.addColor?M:x,n.value=Array.isArray(H)?H:[H],e("update:value",H),e("change",H,x,T),i.addColor&&B>=i.max&&(S.value=!1,e("overflowMax"))}},colorPicker:m,onColorClick:b,pickerRef:c,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var T=x.target;w=+T.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var T=+x.target.dataset.index,M=AG(v.unref(n)),B=M[w];M.splice(w,1);var H=M.slice(0,T),F=M.splice(T),P=H.concat([B]).concat(F);e("update:value",P),e("change",P,P[w],w)},colorItemsRef:A,pickerStyle:g,values:o,teleportDisabled:_,toPopupContainer:y,formatValue:r,onFormatChange:function(x){r.value=x,e("formatChange",x)}}}});xo(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),ef.render=function(i,t,e,n,o,r){var s=v.resolveComponent("color-item"),l=v.resolveComponent("add-color-item"),a=v.resolveComponent("picker");return v.openBlock(),v.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:t[0]||(t[0]=v.withModifiers(function(){return i.onColorItemDragStart&&i.onColorItemDragStart.apply(i,arguments)},["stop"])),onDragover:t[1]||(t[1]=v.withModifiers(function(){return i.onColorItemDragOver&&i.onColorItemDragOver.apply(i,arguments)},["prevent","stop"])),onDrop:t[2]||(t[2]=v.withModifiers(function(){return i.onColorItemDrop&&i.onColorItemDrop.apply(i,arguments)},["prevent","stop"])),onClick:t[3]||(t[3]=v.withModifiers(function(){return i.onColorClick&&i.onColorClick.apply(i,arguments)},["stop"]))},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.values,function(h,d){return v.openBlock(),v.createBlock(s,{class:"color-item",key:d,ref_for:!0,ref:function(u){return i.colorItemsRef[d]=u},size:i.size,width:i.width,height:i.height,value:h,selected:i.colorItemSelected(d),"data-index":d,draggable:i.valueList.length>1,format:i.formatValue},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),i.addColor&&i.addColorItemShow?(v.openBlock(),v.createBlock(l,{key:0,class:"add-color-item",ref:"addColorItem",selected:i.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):v.createCommentVNode("v-if",!0),(v.openBlock(),v.createBlock(v.Teleport,{to:i.toPopupContainer,disabled:i.teleportDisabled},[v.createVNode(v.Transition,null,{default:v.withCtx(function(){return[i.isShowPicker?(v.openBlock(),v.createBlock(a,{key:0,class:"picker",style:v.normalizeStyle(i.pickerStyle),ref:"pickerRef",value:i.selectedColor,format:i.formatValue,"show-alpha":i.showAlpha,colors:i.colors,formatOptions:i.formatOptions,onChange:i.onPickerChange,onFormatChange:i.onFormatChange},null,8,["style","value","format","show-alpha","colors","formatOptions","onChange","onFormatChange"])):v.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},ef.__scopeId="data-v-3c43ade8",ef.__file="src/ColorPicker.vue";const HY="",zG=v.defineComponent({name:"ColorPick",components:{PickColors:ef},props:{value:{type:String,default:""}},setup(i,{emit:t}){const e=v.ref(i.value);v.watch(()=>i.value,o=>{e.value=o},{immediate:!0});function n(){t("changeProp",v.unref(e))}return{myValue:e,onChange:n}}}),WG={class:"color-pick"};function NG(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("pick-colors");return v.openBlock(),v.createElementBlock("div",WG,[v.createVNode(s,{class:"input",size:"small",value:i.myValue,"onUpdate:value":t[0]||(t[0]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"]),v.createVNode(l,{value:i.myValue,"onUpdate:value":t[1]||(t[1]=a=>i.myValue=a),onChange:i.onChange},null,8,["value","onChange"])])}const VG=Hi(zG,[["render",NG],["__scopeId","data-v-99378939"]]),jG=v.defineComponent({name:"Radio",props:{value:{type:String,default:""},options:{type:Array,default(){return[]}}},setup(i,{emit:t}){function e(n){t("changeProp",n.target.value)}return{onChange:e}}});function $G(i,t,e,n,o,r){const s=v.resolveComponent("a-radio-group");return v.openBlock(),v.createBlock(s,{value:i.value,size:"small",onChange:i.onChange,options:i.options,optionType:"button"},null,8,["value","onChange","options"])}const GG=Hi(jG,[["render",$G]]),EY="",UG=v.defineComponent({name:"PropertyConfig",components:{ColorPick:VG,Radio:GG},props:{config:{type:Object,default(){return{}}},selectedIndex:{type:Boolean}},setup(i){const t=v.inject("theme","light"),e=[{label:"字体颜色",key:"color",component:"color-pick"},{label:"对齐方式",key:"align",component:"radio",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},{label:"图标",key:"icon",component:"radio",props:{options:[{label:"上涨",value:"increase"},{label:"下跌",value:"decline"}]}},{label:"图标颜色",key:"iconColor",component:"color-pick"}],n=v.ref([]);v.watch(()=>i.selectedIndex,()=>{if(i.selectedIndex>-1){const l=Object.keys(i.config);n.value=l}});function o(l,a){i.config[l]=a}function r(l,a){if(l.target.checked)i.config[a]="",v.unref(n).push(a);else{delete i.config[a];const h=v.unref(n).indexOf(a);v.unref(n).splice(h,1)}}const s=v.computed(()=>v.unref(t)==="darkBlue"?"#b2c3dd":"");return{formConfig:e,handleSelect:r,selectedProperty:n,onChange:o,fontColor:s}}}),KG={class:"content"},YG={class:"list"};function XG(i,t,e,n,o,r){const s=v.resolveComponent("a-checkbox");return v.openBlock(),v.createElementBlock("div",KG,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor,height:"32px",lineHeight:"32px"})},"属性配置",4),v.createElementVNode("div",YG,[i.selectedIndex>-1?(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:0},v.renderList(i.formConfig,({label:l,component:a,props:h,key:d},u)=>(v.openBlock(),v.createElementBlock("div",{class:"list-item",style:{display:"flex"},key:u},[v.createVNode(s,{checked:i.selectedProperty.includes(d),onChange:c=>i.handleSelect(c,d)},null,8,["checked","onChange"]),v.createElementVNode("span",{style:v.normalizeStyle({padding:"0 8px",color:i.fontColor})},v.toDisplayString(l),5),i.selectedProperty.includes(d)?(v.openBlock(),v.createBlock(v.resolveDynamicComponent(a),v.mergeProps({key:0,value:i.config[d],ref_for:!0},h,{onChangeProp:c=>i.onChange(d,c)}),null,16,["value","onChangeProp"])):v.createCommentVNode("",!0)]))),128)):v.createCommentVNode("",!0)])])}const qG=Hi(UG,[["render",XG],["__scopeId","data-v-b2df2e2d"]]),ZG=v.defineComponent({name:"ConditionalProperty",props:{},components:{ConditionalItemConfig:u$,ConditionalConfig:b$,PropertyConfig:qG},setup(i,{emit:t,expose:e}){const n=v.ref(!1),o=v.ref([]),r=v.ref(-1),s=v.inject("theme","light");let l="";const a=v.computed(()=>v.unref(r)>-1?v.unref(o)[v.unref(r)]:{});function h(g,f=[]){l=g,o.value=f,n.value=!0}function d(g){r.value=g}function u(){t("change",l,v.unref(o)),r.value=-1,n.value=!1}function c(){r.value=-1,o.value=[]}return v.watch(n,g=>{window.modalShow&&window.modalShow(g)}),e({showModal:h}),{theme:s,visible:n,config:o,changeSelectedItem:d,selectedConfig:a,selectedIndex:r,handleOk:u,handleClear:c}}}),JG={style:{display:"flex"}};function QG(i,t,e,n,o,r){const s=v.resolveComponent("conditional-item-config"),l=v.resolveComponent("conditional-config"),a=v.resolveComponent("property-config"),h=v.resolveComponent("a-button"),d=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(d,{wrapClassName:i.theme,title:"条件属性",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.visible=u),"ok-text":"确认","cancel-text":"取消",style:{width:"950px",top:"60px",height:"700px"},maskClosable:!1,destroyOnClose:!0,onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(h,{onClick:t[0]||(t[0]=u=>i.visible=!1)},{default:v.withCtx(()=>t[2]||(t[2]=[v.createTextVNode("取消")])),_:1}),v.createVNode(h,{onClick:i.handleClear},{default:v.withCtx(()=>t[3]||(t[3]=[v.createTextVNode("清除筛选")])),_:1},8,["onClick"]),v.createVNode(h,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[4]||(t[4]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[v.createElementVNode("div",JG,[v.createVNode(s,{config:i.config,onChange:i.changeSelectedItem},null,8,["config","onChange"]),v.createVNode(l,{config:i.selectedConfig.conditions,isSelected:i.selectedIndex>-1},null,8,["config","isSelected"]),v.createVNode(a,{config:i.selectedConfig,selectedIndex:i.selectedIndex},null,8,["config","selectedIndex"])])]),_:1},8,["wrapClassName","visible","onOk"])}const tU=Hi(ZG,[["render",QG]]),kY="",eU=v.defineComponent({name:"PivotChart",props:{data:{type:Object,default(){return{dimensionData:{},xLabel:"",yLabel:""}}}},components:{FilterOutlined:jT,MinusSquareOutlined:jj,PivotFilter:pT},setup(i,{expose:t}){const e=v.inject("theme","light"),n=v.ref();let o;const r=v.ref([]),s=v.computed(()=>{var P;return(P=v.unref(r)[v.unref(r).length-1])==null?void 0:P.key}),l=v.ref([]),a=v.ref(!1),h=v.ref(),d=v.ref({});let u={};const c=v.reactive({position:"absolute",top:"0",left:"0"});let g="",f;function p(){l.value=[],r.value=[],u={};const{dimensionData:P,xLabel:E}=i.data,L=P[E].map(I=>I.value);b(E,L),v.unref(r).push({key:E,drillValue:"",xAxisData:L}),C()}let m=[];v.onMounted(()=>{o=uB.init(n.value),S()});function b(P,E){const{yLabel:L,records:I}=i.data;let k=[];E.forEach(()=>{k.push(0)}),I.forEach(D=>{if(D[L]!==void 0){const O=E.indexOf(D[P]);if(O>-1){let N=!0;v.unref(r).forEach(j=>{j.drillValue&&D[j.key]!==j.drillValue&&(N=!1)});const W=Number(D[L]);N&&!isNaN(W)&&(k[O]+=Number(W))}}}),k=k.map(D=>D.toFixed(2)),f={tooltip:{},xAxis:{data:E},yAxis:{},series:[{name:L,type:"bar",label:{show:!0,position:"top"},data:k}]},m=k,o.setOption(f)}function C(){const P=Object.keys(i.data.dimensionData),E=v.unref(r).map(I=>I.key),L=[];P.forEach(I=>{E.includes(I)||L.push(I)}),l.value=L}function w(){g="",a.value=!1}function S(){o.on("contextmenu",function(P){const{event:{event:E},name:L}=P;g=L,E.preventDefault(),c.left=E.offsetX+90+"px",c.top=E.offsetY+80+"px",a.value=!0}),document.addEventListener("click",w)}function y(P){const E=[],{records:L}=i.data;for(const I of L){let k=!0;for(const D of v.unref(r))D.drillValue&&I[D.key]!==D.drillValue&&(k=!1);k&&!E.includes(I[P])&&E.push(I[P])}return E}function _(P){v.unref(r)[v.unref(r).length-1].drillValue=g;const E=y(P);b(P,E),v.unref(r).push({key:P,drillValue:"",xAxisData:E}),C()}function R(P,E){v.unref(r).splice(P+1,v.unref(r).length-P-1),v.unref(r)[P].drillValue="";const L=y(E);b(E,L),B(),C()}function A(P,E){const L=f.series[0].data,I=f.xAxis.data,k=L.map((O,N)=>({value:O,label:I[N]}));let D;E==="asc"?P==="dimension"?D=k.sort((O,N)=>O.label.localeCompare(N.label)):D=k.sort((O,N)=>O.value-N.value):E==="desc"&&(P==="dimension"?D=k.sort((O,N)=>N.label.localeCompare(O.label)):D=k.sort((O,N)=>N.value-O.value)),f.series[0].data=D.map(O=>O.value),f.xAxis.data=D.map(O=>O.label),o.setOption(f)}function x(P){if(P==="dimension"){const E=y(v.unref(s));b(v.unref(s),E),B()}else u={},B()}function T(P){if(P==="dimension"){const E=v.unref(r)[v.unref(r).length-1].xAxisData.map(L=>({value:L}));d.value={fieldName:v.unref(s),key:v.unref(s),type:P,filterData:f.xAxis.data,valueList:E}}else P==="indicators"&&(d.value={fieldName:i.data.yLabel,key:i.data.yLabel,type:"indicators",filterData:u});v.nextTick(()=>{v.unref(h).showModal()})}function M({checkKeys:P,type:E}){E==="dimension"?b(v.unref(s),P):E==="indicators"&&(u=P,B())}function B(){const P=v.unref(r)[v.unref(r).length-1].xAxisData;let E=m.map((L,I)=>({value:L,label:P[I]}));E=E.filter(L=>H(L.value)),f.series[0].data=E.map(L=>L.value),f.xAxis.data=E.map(L=>L.label),o.setOption(f)}function H(P){let E=!1,{rule:L,value:I}=u;switch(I=Number(I),L){case"LESS":E=P<I;break;case"GREATER":E=P>I;break;case"EQUAL":E=P===I;break;case"NOT_EQUAL":E=P!==I;break;default:E=!0;break}return E}v.onBeforeUnmount(()=>{document.removeEventListener("click",w)}),t({init:p});const F=v.computed(()=>v.unref(e)==="darkBlue"?"#b2c3dd":"");return{echartRef:n,dropdownList:l,isShowMenu:a,curXLabel:s,menuStyle:c,drillDimension:_,dimensionMap:r,deleteDimension:R,handleSort:A,handleClear:x,handleFilter:T,pivotFilterRef:h,filterData:d,onFilterChange:M,fontColor:F}}}),iU={style:{display:"flex",height:"400px"}},nU={style:{flex:"0 0 200px"}},oU={style:{flex:"0 0 650px",height:"100%"}},rU={key:0,style:{display:"flex","align-items":"center"}},sU={key:0,class:"dimension-item"},lU={key:1,style:{height:"30px"}},aU={style:{width:"100%",height:"100%"},ref:"echartRef"},hU=["onClick"];function dU(i,t,e,n,o,r){const s=v.resolveComponent("filter-outlined"),l=v.resolveComponent("a-menu-item"),a=v.resolveComponent("a-menu"),h=v.resolveComponent("a-dropdown"),d=v.resolveComponent("minus-square-outlined"),u=v.resolveComponent("pivot-filter");return v.openBlock(),v.createElementBlock(v.Fragment,null,[v.createElementVNode("div",iU,[v.createElementVNode("div",nU,[v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},[v.createTextVNode(" 横轴:"+v.toDisplayString(i.curXLabel)+" ",1),v.createVNode(h,null,{overlay:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{key:"asc",onClick:t[0]||(t[0]=c=>i.handleSort("dimension","asc"))},{default:v.withCtx(()=>t[8]||(t[8]=[v.createTextVNode("升序")])),_:1}),v.createVNode(l,{key:"desc",onClick:t[1]||(t[1]=c=>i.handleSort("dimension","desc"))},{default:v.withCtx(()=>t[9]||(t[9]=[v.createTextVNode("降序")])),_:1}),v.createVNode(l,{key:"filter",onClick:t[2]||(t[2]=c=>i.handleFilter("dimension"))},{default:v.withCtx(()=>t[10]||(t[10]=[v.createTextVNode("筛选")])),_:1}),v.createVNode(l,{key:"clear",onClick:t[3]||(t[3]=c=>i.handleClear("dimension"))},{default:v.withCtx(()=>t[11]||(t[11]=[v.createTextVNode("清除")])),_:1})]),_:1})]),default:v.withCtx(()=>[v.createVNode(s,{class:"filter-icon",style:v.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4),v.createElementVNode("div",{style:v.normalizeStyle({color:i.fontColor})},[v.createTextVNode(" 纵轴:"+v.toDisplayString(i.data.yLabel)+" ",1),v.createVNode(h,null,{overlay:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{key:"asc",onClick:t[4]||(t[4]=c=>i.handleSort("indicators","asc"))},{default:v.withCtx(()=>t[12]||(t[12]=[v.createTextVNode("升序")])),_:1}),v.createVNode(l,{key:"desc",onClick:t[5]||(t[5]=c=>i.handleSort("indicators","desc"))},{default:v.withCtx(()=>t[13]||(t[13]=[v.createTextVNode("降序")])),_:1}),v.createVNode(l,{key:"filter",onClick:t[6]||(t[6]=c=>i.handleFilter("indicators"))},{default:v.withCtx(()=>t[14]||(t[14]=[v.createTextVNode("筛选")])),_:1}),v.createVNode(l,{key:"clear",onClick:t[7]||(t[7]=c=>i.handleClear("indicators"))},{default:v.withCtx(()=>t[15]||(t[15]=[v.createTextVNode("清除")])),_:1})]),_:1})]),default:v.withCtx(()=>[v.createVNode(s,{class:"filter-icon",style:v.normalizeStyle({color:i.fontColor})},null,8,["style"])]),_:1})],4)]),v.createElementVNode("div",oU,[i.dimensionMap.length>1?(v.openBlock(),v.createElementBlock("div",rU,[v.createElementVNode("span",{style:v.normalizeStyle({color:i.fontColor})},"钻取维度:",4),(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dimensionMap,(c,g)=>(v.openBlock(),v.createElementBlock(v.Fragment,{key:g},[c.drillValue?(v.openBlock(),v.createElementBlock("div",sU,[v.createVNode(d,{class:"dimension-icon",onClick:f=>i.deleteDimension(g,c.key)},null,8,["onClick"]),v.createTextVNode(v.toDisplayString(c.key)+"("+v.toDisplayString(c.drillValue)+") ",1)])):v.createCommentVNode("",!0)],64))),128))])):(v.openBlock(),v.createElementBlock("div",lU)),v.createElementVNode("div",aU,null,512)]),v.withDirectives(v.createElementVNode("div",{style:v.normalizeStyle(i.menuStyle),class:"dropdown-menu"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dropdownList,c=>(v.openBlock(),v.createElementBlock("div",{class:"item",key:c,onClick:g=>i.drillDimension(c)},"下钻"+v.toDisplayString(c),9,hU))),128))],4),[[v.vShow,i.isShowMenu]])]),v.createVNode(u,{ref:"pivotFilterRef",data:i.filterData,onChange:i.onFilterChange},null,8,["data","onChange"])],64)}const uU=Hi(eU,[["render",dU],["__scopeId","data-v-f29855b0"]]),cU=v.defineComponent({components:{PivotChart:uU},name:"ChartModal",props:{},setup(i,{expose:t}){const e=v.inject("theme","light"),n=v.ref(!1),o=v.ref({}),r=v.ref();function s(l){o.value=l,n.value=!0,v.nextTick(()=>{r.value.init()})}return v.watch(n,l=>{window.modalShow&&window.modalShow(l)}),t({showModal:s}),{theme:e,visible:n,chartOptions:o,chartRef:r}}});function gU(i,t,e,n,o,r){const s=v.resolveComponent("pivot-chart"),l=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(l,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=a=>i.visible=a),title:"图形",style:{width:"900px"},destroyOnClose:!0,footer:null},{default:v.withCtx(()=>[v.createVNode(s,{data:i.chartOptions,ref:"chartRef"},null,8,["data"])]),_:1},8,["wrapClassName","visible"])}const fU=Hi(cU,[["render",gU]]),pU=v.defineComponent({name:"PivotAggregate",props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("dimensionFieldList",[]),r=v.ref(!1),s=v.ref([]),l=v.ref(""),a=v.ref(""),h=[{label:"合计",value:"SUM"},{label:"平均值",value:"AVG"},{label:"计数",value:"COUNT"},{label:"最大值",value:"MAX"},{label:"最小值",value:"MIN"},{label:"方差",value:"VAR"},{label:"标准差",value:"STDEV"}];function d(){t("confirm",v.unref(s),l.value),r.value=!1}function u(g,f){s.value=Xe.cloneDeep(g),l.value=f,r.value=!0;const p=v.unref(o).find(m=>m.label===f);a.value=(p==null?void 0:p.title)||f}const c=()=>document.getElementsByClassName("aggregate-modal")[0]||document.body;return v.watch(r,g=>{window.modalShow&&window.modalShow(g)}),e({showModal:u}),{theme:n,visible:r,aggregationType:s,options:h,dimensionKey:l,titleText:a,handleOk:d,getPopupContainer:c}}});function mU(i,t,e,n,o,r){const s=v.resolveComponent("a-select"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-form"),h=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(h,{wrapClassName:i.theme+" aggregate-modal",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=d=>i.visible=d),"ok-text":"确认","cancel-text":"取消",title:i.titleText+"-聚合",destroyOnClose:!1,maskClosable:!1,onOk:i.handleOk,onCancel:t[2]||(t[2]=d=>i.visible=!1)},{default:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"聚合方式"},{default:v.withCtx(()=>[v.createVNode(s,{value:i.aggregationType,"onUpdate:value":t[0]||(t[0]=d=>i.aggregationType=d),allowClear:"",options:i.options,mode:"multiple",getPopupContainer:i.getPopupContainer},null,8,["value","options","getPopupContainer"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","title","onOk"])}const vU=Hi(pU,[["render",mU]]),bU=v.defineComponent({name:"PivotTop",props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.ref(!1),r=v.ref(""),s=v.ref("");function l(){t("confirm",{value:v.unref(r),key:v.unref(s)}),o.value=!1}function a(h){const{value:d,key:u}=h;r.value=d,o.value=!0,s.value=u}return v.watch(o,h=>{window.modalShow&&window.modalShow(h)}),e({showModal:a}),{theme:n,visible:o,topNum:r,handleOk:l}}});function CU(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-form"),h=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(h,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[1]||(t[1]=d=>i.visible=d),"ok-text":"确认","cancel-text":"取消",title:"维度取Top",destroyOnClose:!0,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(a,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"维度取Top"},{default:v.withCtx(()=>[v.createVNode(s,{value:i.topNum,"onUpdate:value":t[0]||(t[0]=d=>i.topNum=d),type:"number",style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["wrapClassName","visible","onOk"])}const yU=Hi(bU,[["render",CU]]);let Nh=(i=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(i));for(;i--;){let n=e[i]&63;n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n<63?t+="_":t+="-"}return t};const LY="";Mo.locale("zh-cn");const _U=v.defineComponent({name:"PivotDetail",components:{ATable:Vi.Table},props:{},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.inject("pageId",""),r=v.inject("context",""),s=v.inject("indicatorUrl",""),l=v.inject("indicatorToken",""),a=v.inject("theDateInfo",{}),h=v.ref(!1),d=v.ref(!1),u=v.ref([]),c=v.ref([]),g=v.ref({current:1,pageSize:10,total:0,showSizeChanger:!1,showQuickJumper:!1,showTotal:m=>`共 ${m} 条数据`});async function f(m){var A;d.value=!0,h.value=!0;const{args:b={},dimension:C,indicator:w,splitSymbol:S}=m,{originData:y=[],cellHeaderPaths:{colHeaderPaths:_=[],rowHeaderPaths:R=[]}}=b;if(y!=null&&y.length){const x=y[0],T=_!=null&&_.length?_[_.length-1]:"",M=_.filter(D=>D.dimensionKey).concat(R.filter(D=>D.dimensionKey)).map(D=>D.dimensionKey);if(!(T!=null&&T.indicatorKey)||!M.length)return;const B=w.find(D=>D.label===T.indicatorKey),H={};for(const D of C)if(M.includes(D.label)){const N=(x[D.label]||"").split(S)||[];H[D.typeGuid]=N!=null&&N.length?N[N.length-1]:""}const{startTime:F,endTime:P,rangeFormat:E}=v.unref(a);F&&P&&(H.startTime=Mo(F).format(E),H.endTime=Mo(P).format(E));const L=await kr.post(`${v.unref(s)}/diagram/obtainDataSetData`,{pageId:v.unref(o),indexCode:(B==null?void 0:B.indexCode)||"",param:H},{headers:{Authentication:v.unref(l),operateContext:v.unref(r)}}),{columns:I=[],data:k=[]}=((A=L==null?void 0:L.data)==null?void 0:A.data)||{};u.value=I.filter(D=>D).map(D=>({title:D,dataIndex:D})),c.value=k.map(D=>({...D,uid:Nh(6)}))}d.value=!1}v.watch(h,m=>{window.modalShow&&window.modalShow(m)});const p=m=>{v.unref(g).current=m.current};return e({showModal:f}),{theme:n,visible:h,loading:d,pagination:g,columns:u,dataSource:c,handleTableChange:p}}}),wU={key:0,class:"spin-container"};function SU(i,t,e,n,o,r){const s=v.resolveComponent("a-spin"),l=v.resolveComponent("a-table"),a=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(a,{wrapClassName:i.theme,visible:i.visible,"onUpdate:visible":t[0]||(t[0]=h=>i.visible=h),width:"40%",title:"指标明细",destroyOnClose:!0,footer:null,bodyStyle:{maxHeight:"50vh",overflow:"auto"}},{default:v.withCtx(()=>[i.loading?(v.openBlock(),v.createElementBlock("div",wU,[v.createVNode(s,{size:"large"})])):v.createCommentVNode("",!0),i.loading?v.createCommentVNode("",!0):(v.openBlock(),v.createBlock(l,{key:1,"row-key":h=>h.uid,columns:i.columns,"data-source":i.dataSource,pagination:i.pagination,onChange:i.handleTableChange},null,8,["row-key","columns","data-source","pagination","onChange"]))]),_:1},8,["wrapClassName","visible"])}const xU=Hi(_U,[["render",SU],["__scopeId","data-v-ea105cde"]]),AU=(i,t)=>{i.register.icon("sortDown",{name:"sortDown",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"取消排序",placement:"top"}}),i.register.icon("sortUp",{name:"sortUp",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击降序",placement:"top"}}),i.register.icon("sortNormal",{name:"sortNormal",type:"svg",positionType:i.TYPES.IconPosition.contentRight,width:15,visibleTime:"always",height:15,svg:`<svg t="1736221132194" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1418" width="60" height="60"><path d="M512 85.333333l256 341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1419"></path><path d="M512 938.666667l256-341.333334H256z" fill="${t.sortNotActiveColor}" p-id="1420"></path></svg>`,marginLeft:5,hover:{width:20,height:20,bgColor:"#DEE4ED80"},cursor:"pointer",tooltip:{title:"点击升序",placement:"top"}})},RU=v.defineComponent({props:{node:{type:[Object,String],required:!0}},render(){return this.node}}),TU={mounted(i){i.focus()}},MU=v.defineComponent({name:"PivotConfig",directives:{focus:TU},props:{fullMode:{type:Boolean,default:!1}},components:{VNodeRender:RU,draggable:ub,DeleteOutlined:NT},setup(i,{emit:t,expose:e}){const n=v.inject("theme","light"),o=v.ref(!1),r=v.ref(),s=v.ref([]),l=v.ref([{title:"行维度",icon:v.createVNode(Ej),fields:[]},{title:"列维度",icon:v.createVNode(Mj),fields:[]},{title:"指标",icon:v.createVNode(o$),fields:[]}]),a=(_=[],R=[])=>{for(const A of v.unref(l))A.fields=[];for(const A of _)A.positionType==="rows"?v.unref(l)[0].fields.push(Xe.cloneDeep(A)):A.positionType==="columns"&&v.unref(l)[1].fields.push(Xe.cloneDeep(A));v.unref(l)[2].fields=Xe.cloneDeep(R),o.value=!0},h=v.computed(()=>[...v.unref(l)[0].fields.map(_=>({..._,label:_.showTitle,positionType:"rows"})),...v.unref(l)[1].fields.map(_=>({..._,label:_.showTitle,positionType:"columns"}))]),d=v.computed(()=>v.unref(l)[2].fields),u=()=>{s.value=[],t("confirm",v.unref(h),v.unref(d)),o.value=!1},c=(_,R)=>{const A=R[_.oldIndex],{scope:x}=A;["IDX","BUILT_IN_IDX"].includes(x)?s.value=[0,1]:["DIM","BUILT_IN_DIM"].includes(x)&&(s.value=[2])},g=()=>{s.value=[]},f=()=>{l.value=Xe.cloneDeep(v.unref(l))},p=(_,R)=>{v.unref(l)[_].fields.splice(R,1)},m=v.ref(),b=v.ref(),C=v.ref(""),w=(_,R)=>{i.fullMode&&(m.value=`${_}_${R}`,b.value=Xe.cloneDeep(v.unref(l)[_].fields[R]))},S=()=>{if(v.unref(C)){const _=v.unref(m).split("_");Vi.message.error(v.unref(C)),v.unref(l)[_[0]].fields[_[1]].showTitle=v.unref(b).showTitle,C.value=""}m.value=""},y=_=>{const R=_.target.value,A=v.unref(h).concat(v.unref(d));R?A.find(T=>T.name!==v.unref(b).name&&T.showTitle===R)&&(C.value="名称不能重复"):C.value="不能为空"};return v.watch(o,_=>{window.modalShow&&window.modalShow(_)}),e({showModal:a}),{theme:n,visible:o,fieldAreas:l,indSourceRef:r,maskList:s,currentEditItem:m,handleOk:u,onDragAreaStart:c,onDragEnd:g,handleDeleteField:p,handleEdit:w,onConfirmLabel:S,onDragAdd:f,onChangeLabel:y}}}),FY="",BU={class:"config-wrap"},PU={class:"area-content"},HU={class:"area-title"},EU={class:"field-item"},kU=["onClick"];function LU(i,t,e,n,o,r){const s=v.resolveComponent("v-node-render"),l=v.resolveComponent("a-input"),a=v.resolveComponent("delete-outlined"),h=v.resolveComponent("draggable"),d=v.resolveComponent("a-button"),u=v.resolveComponent("a-modal"),c=v.resolveDirective("focus");return v.openBlock(),v.createBlock(u,{wrapClassName:`${i.theme}`,title:"设置",visible:i.visible,"onUpdate:visible":t[1]||(t[1]=g=>i.visible=g),"ok-text":"确认","cancel-text":"取消",maskClosable:!1,destroyOnClose:!1,style:{width:"500px"},bodyStyle:{padding:0},onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(d,{onClick:t[0]||(t[0]=g=>i.visible=!1)},{default:v.withCtx(()=>t[2]||(t[2]=[v.createTextVNode("取消")])),_:1}),v.createVNode(d,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[3]||(t[3]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[v.createElementVNode("div",BU,[v.createElementVNode("div",PU,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.fieldAreas,(g,f)=>(v.openBlock(),v.createElementBlock("div",{class:"area-item",key:f},[v.createElementVNode("div",HU,[v.createVNode(s,{class:"area-icon",node:g.icon},null,8,["node"]),v.createTextVNode(" "+v.toDisplayString(g.title),1)]),v.createVNode(h,{class:"area-list",list:g.fields,"item-key":"index",group:{name:"diGroup"},disabled:i.maskList.includes(f),onStart:p=>i.onDragAreaStart(p,g.fields),onEnd:i.onDragEnd,onAdd:i.onDragAdd},{item:v.withCtx(({index:p,element:m})=>[v.createElementVNode("div",EU,[i.currentEditItem===`${f}_${p}`?v.withDirectives((v.openBlock(),v.createBlock(l,{key:0,size:"small",value:m.showTitle,"onUpdate:value":b=>m.showTitle=b,onPressEnter:i.onConfirmLabel,onBlur:i.onConfirmLabel,onChange:i.onChangeLabel},null,8,["value","onUpdate:value","onPressEnter","onBlur","onChange"])),[[c]]):(v.openBlock(),v.createElementBlock("div",{key:1,style:{width:"100%"},onClick:b=>i.handleEdit(f,p)},v.toDisplayString(m.showTitle),9,kU)),i.fullMode?(v.openBlock(),v.createBlock(a,{key:2,style:{color:"red","padding-left":"8px"},onClick:b=>i.handleDeleteField(f,p)},null,8,["onClick"])):v.createCommentVNode("",!0)])]),_:2},1032,["list","disabled","onStart","onEnd","onAdd"])]))),128))])])]),_:1},8,["wrapClassName","visible","onOk"])}const FU=Hi(MU,[["render",LU],["__scopeId","data-v-7a3ea9b6"]]),IU=v.defineComponent({name:"IndSourceList",components:{CaretRightOutlined:lj,CaretDownOutlined:nj,LoadingOutlined:Ij,Draggable:ub},props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},isSub:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1}},setup(i,{emit:t,expose:e}){const n=v.inject("indicatorUrl",""),o=v.inject("indicatorToken",""),r=v.inject("pageId",""),s=v.inject("setItemDisabled",_=>!1),l=v.ref([]),a=v.ref(),h=v.reactive({pageSize:20,currentPage:1,totalResult:0}),d=v.ref(!1),u=v.ref(""),c=v.ref(!1);v.watch(()=>i.data,_=>{i.isSub&&(_==null||_.forEach(R=>{var A;R!=null&&R.isLeaf||(A=R.dataViewColumns)==null||A.forEach(x=>{x.show=!0,x.edit=!1,x.title&&(x.label=x.title)})}),l.value=_)},{deep:!0,immediate:!0});const g=()=>{var _;i.isSub||(_=v.unref(a))==null||_.removeEventListener("scroll",w)},f=async _=>{var A;if(v.unref(d))return;d.value=!0;const R={source:i.config.source||"INDICATOR_LIB",pageId:v.unref(r),dataSourceId:i.config.dataSourceId||"",indexName:u.value};_?(_.loading=!0,R.indexTypeGuid=_.indexTypeGuid,R.isLeaf=_.isLeaf):h&&(R.queryRequest={pageSize:h.pageSize,pageNum:h.currentPage});try{const x=await kr.post(`${v.unref(n)}/diagram/sourceList`,R,{headers:{Authentication:o,operateContext:"ygt"}}),{success:T,data:M={}}=x.data;if(T){const{rows:B=[],total:H=0}=M;B==null||B.forEach(F=>{var P;(_==null?void 0:_.isLeaf)==="1"?(P=F.dataViewColumns)==null||P.forEach(E=>{E.show=!0,E.edit=!1,E.title&&(E.label=E.title)}):F.show=!1}),_?(_.children=B,_.show=!0,B!=null&&B.length||(_.noData=!0)):(l.value=v.unref(l).concat(B),h.totalResult=+H,((A=v.unref(l))==null?void 0:A.length)>=H&&g())}_&&(_.loading=!1),d.value=!1}catch{_&&(_.loading=!1),d.value=!1}},p=async _=>{const R=l.value[_],{children:A=[]}=R;A!=null&&A.length?R.show=!R.show:!R.noData&&R.isLeaf?f(R):R.noData&&(R.show=!R.show)},m=(_,R)=>{t("onDragStart",_,R)},b=()=>{t("onDragEnd")},C=_=>{_.show=!_.show},w=_=>{_.target.scrollTop+_.target.clientHeight+20>=_.target.scrollHeight&&(h.currentPage++,f())},S=async()=>{await f(),v.nextTick(async()=>{v.unref(a).scrollHeight===v.unref(a).clientHeight&&h.totalResult>v.unref(l).length&&(h.currentPage++,S())})},y=async _=>{var R;g(),c.value=!0,h.currentPage=1,h.totalResult=0,l.value=[],u.value=_,await S(),c.value=!1,(R=v.unref(a))==null||R.addEventListener("scroll",w)};return v.onMounted(async()=>{var _;i.isSub||(S(),(_=v.unref(a))==null||_.addEventListener("scroll",w))}),v.onUnmounted(()=>{g()}),e({handleSearch:y}),{columnRef:a,sourceList:l,searchLoading:c,onToggleGroup:p,onToggleSource:C,setItemDisabled:s,onDragStart:m,onDragEnd:b,mapDataSetScope:yP,mapScope:CP,getLoadType:_P,getUseType:wP,getSourceType:SP}}}),IY="",DU={key:0,class:"no-data"},OU={class:"column-item"},zU=["onClick"],WU={key:3,class:"item-name"},NU={class:"column-item"},VU={key:0},jU={key:1},$U={key:2},GU={key:3},UU=["onClick"],KU={class:"item-name"},YU={class:"column-child-item"},XU={class:"field"},qU={class:"column-child-item-name"};function ZU(i,t,e,n,o,r){const s=v.resolveComponent("loading-outlined"),l=v.resolveComponent("caret-down-outlined"),a=v.resolveComponent("caret-right-outlined"),h=v.resolveComponent("ind-source-list",!0),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("draggable"),c=v.resolveComponent("a-spin");return v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["columns",i.isSub?"sub-columns":""]),ref:"columnRef"},[v.createVNode(c,{spinning:i.searchLoading,tip:"数据源加载中..."},{default:v.withCtx(()=>{var g;return[!((g=i.sourceList)!=null&&g.length)&&!i.searchLoading?(v.openBlock(),v.createElementBlock("div",DU,"暂无数据")):i.hasChildren?(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:1},v.renderList(i.sourceList,(f,p)=>(v.openBlock(),v.createElementBlock(v.Fragment,{key:f.indexTypeGuid||f.id},[v.createElementVNode("div",OU,[v.createElementVNode("span",{class:"item-group",onClick:m=>i.onToggleGroup(p)},[f.loading?(v.openBlock(),v.createBlock(s,{key:0})):f.show?(v.openBlock(),v.createBlock(l,{key:1})):(v.openBlock(),v.createBlock(a,{key:2})),f.isLeaf?(v.openBlock(),v.createElementBlock("span",WU,v.toDisplayString(f.indexTypeCode+"."+f.indexTypeName),1)):v.createCommentVNode("",!0)],8,zU)]),f.show?(v.openBlock(),v.createBlock(h,{key:0,data:f.children,isSub:!0,hasChildren:f.isLeaf==="0",config:i.config,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd},null,8,["data","hasChildren","config","onOnDragStart","onOnDragEnd"])):v.createCommentVNode("",!0)],64))),128)):(v.openBlock(!0),v.createElementBlock(v.Fragment,{key:2},v.renderList(i.sourceList,f=>(v.openBlock(),v.createElementBlock("div",{key:f.id,class:v.normalizeClass(i.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[v.createElementVNode("div",NU,[v.createVNode(d,null,{title:v.withCtx(()=>[v.createElementVNode("div",null,"加载类型:"+v.toDisplayString(i.getLoadType(f.loadType)),1),f.useType?(v.openBlock(),v.createElementBlock("div",VU,"数据使用系统:"+v.toDisplayString(i.getUseType(f.useType)),1)):v.createCommentVNode("",!0),f.systemSource?(v.openBlock(),v.createElementBlock("div",jU,"制度出处:"+v.toDisplayString(f.systemSource),1)):v.createCommentVNode("",!0),f.dataTo?(v.openBlock(),v.createElementBlock("div",$U,"数据来源:"+v.toDisplayString(i.getSourceType(f.dataTo)),1)):v.createCommentVNode("",!0),f.meaning?(v.openBlock(),v.createElementBlock("div",GU,"指标含义:"+v.toDisplayString(f.meaning),1)):v.createCommentVNode("",!0)]),default:v.withCtx(()=>[v.createElementVNode("span",{class:"item-group",onClick:p=>i.onToggleSource(f)},[f.show?(v.openBlock(),v.createBlock(l,{key:0})):(v.openBlock(),v.createBlock(a,{key:1})),v.createElementVNode("span",KU,v.toDisplayString((f.indexCode?f.indexCode:"")+" "+f.name),1)],8,UU)]),_:2},1024)]),f.show?(v.openBlock(),v.createBlock(u,{key:0,modelValue:f.dataViewColumns,"onUpdate:modelValue":p=>f.dataViewColumns=p,group:{name:"diGroup",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:i.setItemDisabled(f.dataViewColumns),filter:".not-allow",onStart:p=>i.onDragStart(p,f),onEnd:i.onDragEnd},{item:v.withCtx(({element:p})=>[v.createElementVNode("div",YU,[v.createElementVNode("span",XU,"【"+v.toDisplayString(p.scope==="FIELD"?i.mapDataSetScope(p.genericType):i.mapScope(p.scope))+"】",1),v.createElementVNode("span",qU,v.toDisplayString(p.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart","onEnd"])):v.createCommentVNode("",!0)],2))),128))]}),_:1},8,["spinning"])],2)}const JU=Hi(IU,[["render",ZU],["__scopeId","data-v-aabcdc1c"]]),QU=v.defineComponent({name:"DragArea",props:{style:{type:Object,default:()=>({})},maskList:{type:Array,default:()=>[]}},setup(i,{emit:t}){return{onDragOver:s=>{s.preventDefault(),s.target.classList.add("highlight")},onDragLeave:s=>{s.preventDefault(),s.target.classList.remove("highlight")},onDragEnd:s=>{s.preventDefault(),s.target.classList.remove("highlight")},onDrop:s=>{s.preventDefault(),s.target.classList.remove("highlight");const l=Array.from(s.target.classList);l.includes("rows")?t("add","rows"):l.includes("columns")?t("add","columns"):l.includes("indicators")?t("add","indicators"):l.includes("filters")&&t("add","filters")}}}}),DY="";function tK(i,t,e,n,o,r){return v.openBlock(),v.createElementBlock("div",{class:"drag-area",style:v.normalizeStyle(i.style.main)},[i.maskList.includes(2)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"area-wrap filters",onDragover:t[0]||(t[0]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[1]||(t[1]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[2]||(t[2]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[3]||(t[3]=(...s)=>i.onDrop&&i.onDrop(...s)),style:v.normalizeStyle(i.style.filters)},null,36)):v.createCommentVNode("",!0),i.maskList.includes(0)?v.createCommentVNode("",!0):(v.openBlock(),v.createElementBlock("div",{key:1,class:"area-wrap rows",onDragover:t[4]||(t[4]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[5]||(t[5]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[6]||(t[6]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[7]||(t[7]=(...s)=>i.onDrop&&i.onDrop(...s)),style:v.normalizeStyle(i.style.rows)},null,36)),i.maskList.includes(1)?v.createCommentVNode("",!0):(v.openBlock(),v.createElementBlock("div",{key:2,class:"area-wrap columns",onDragover:t[8]||(t[8]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[9]||(t[9]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[10]||(t[10]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[11]||(t[11]=(...s)=>i.onDrop&&i.onDrop(...s)),style:v.normalizeStyle(i.style.columns)},null,36)),i.maskList.includes(2)?v.createCommentVNode("",!0):(v.openBlock(),v.createElementBlock("div",{key:3,class:"area-wrap indicators",onDragover:t[12]||(t[12]=(...s)=>i.onDragOver&&i.onDragOver(...s)),onDragleave:t[13]||(t[13]=(...s)=>i.onDragLeave&&i.onDragLeave(...s)),onDragend:t[14]||(t[14]=(...s)=>i.onDragEnd&&i.onDragEnd(...s)),onDrop:t[15]||(t[15]=(...s)=>i.onDrop&&i.onDrop(...s)),style:v.normalizeStyle(i.style.indicators)},null,36))],4)}const eK=Hi(QU,[["render",tK],["__scopeId","data-v-01e4c58d"]]),iK=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r}=i;return async(l={},a,h)=>{var f;const d=uC(i,l),{url:u,...c}=d||{};let g=t;if(!g){const{pathname:p}=window==null?void 0:window.location;if(p){const m=p.split("/");m!=null&&m.length&&(g=m[m.length-1])}}if(u&&c){a&&a("tableChange",{type:"11",data:c}),h&&h(c);try{return await kr({url:`${e}${u}`,method:"post",headers:{Authentication:n,operateContext:o},data:{...c,dataSourceId:(r==null?void 0:r.dataSourceId)||"",pageId:g},signal:((f=window.controller)==null?void 0:f.signal)||""})}catch(p){console.error(p)}}}},nK=(i={})=>{const{indicatorUrl:t=""}=i;return async(n,o)=>{var d;const r={},{search:s}=window==null?void 0:window.location;if(s){const u=s.slice(1,s.length).split("&");for(const c of u){const g=c.split("=");r[g[0]]=g[1]}}const{keyName:l,...a}=o,h={keyName:l};n==="save"&&(h.searchMap=a);try{return r!=null&&r.token?await kr({url:`${t}/userSearch/${n}`,method:"post",headers:{Authentication:r.token},data:h,signal:((d=window.controller)==null?void 0:d.signal)||""}):{}}catch(u){console.error(u)}}},oK=(i={})=>{const{pageId:t="",indicatorUrl:e="",indicatorToken:n="",context:o="",graphicConfig:r={}}=i;return async(l={})=>{var h;const a=uC(i,l);try{return(await kr({url:`${e}/diagram/obtainDrillAbleDimensionOptions`,method:"post",headers:{Authentication:n,operateContext:o},data:{source:(r==null?void 0:r.source)||"INDICATOR_LIB",pageId:t,indicatorList:(a==null?void 0:a.indicatorList)||[],classifications:(a==null?void 0:a.queryColumns)||[],dataSourceId:(r==null?void 0:r.dataSourceId)||""},signal:((h=window.controller)==null?void 0:h.signal)||""})).data.data}catch(d){console.error(d)}}},rK={id:{type:String,default:""},name:{type:String,default:""},keyName:{type:String,default:""},type:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},position:{type:String,default:""},top:{type:String,default:""},left:{type:String,default:""},zIndex:{type:Number,default:1},events:{type:Array,default:()=>[]},dataType:{type:String,default:"indicator"},graphicConfig:{type:Object,default:()=>({})},data:{type:Array,default:()=>[]},scale:{type:Number,default:1},dimensionList:{type:Array,default:()=>[]},indicatorList:{type:Array,default:()=>[]},pageMode:{type:String,default:""},styleConfig:{type:Object,default:()=>({})},theme:{type:String,default:"light"},fullMode:{type:Boolean,default:!1},pageId:{type:String,default:""},indicatorUrl:{type:String,default:""},indicatorToken:{type:String,default:""},context:{type:String,default:""},enlargeContainer:{type:String,default:"body"},globalModel:{type:Object,default:()=>new Map},isIframeMode:{type:Boolean,default:!1},showLeftTree:{type:Boolean,default:!0},allowDrill:{type:Boolean,default:!1},showFullScreen:{type:Boolean,default:!0},relateKeyName:{type:String,default:""}},Xv={LAST_DATA:"上期值",SAME_DATA:"同期值",DIFF_DATA:"增减额",MOM_DATA:"环比(%)",YOY_DATA:"同比(%)"},VM=[{text:"排序",children:[{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"默认",menuKey:"default-sort"}],menuKey:"sort"},{text:"度量属性",menuKey:"property"},{text:"条件属性",menuKey:"conditionalProperty"},{text:"图形",menuKey:"graph"},{text:"筛选",menuKey:"filter"}],xs=["合计","平均值","计数","最大值","最小值","方差","标准差"],sK=v.defineComponent({name:"PivotTable",components:{PivotFilter:pT,PivotProperty:r7,ConditionalProperty:tU,ChartModal:fU,PivotAggregate:vU,PivotTop:yU,PivotConfig:FU,IndSourceList:JU,DragArea:eK,PivotDetail:xU,SettingOutlined:qj,DatabaseOutlined:pj,ArrowsAltOutlined:Q7,ShrinkOutlined:t$,FilterOutlined:jT,DeleteOutlined:NT,ClearOutlined:uj},props:{...rK},setup(i,{expose:t,emit:e}){let n=null;const o=v.ref(!1),r=v.ref(""),s=v.ref({}),l=v.ref(),a=v.ref({}),h=v.ref({}),d=v.ref({}),u=v.ref(),c=v.ref({}),g=v.ref(),f=v.ref(),p=v.ref(),m=v.ref(),b=v.ref(),C=v.ref(),w=v.ref(),S=v.ref(),y=v.ref(!1),_=v.ref({}),R=v.ref({}),A=v.ref({}),x=v.ref(),T=v.ref({}),M=v.ref("200px"),B=v.ref("200px"),H=v.ref(300),F=v.ref({}),P=v.ref(),E=v.ref(i.showLeftTree),L=v.ref(!1),I=v.ref({}),k=v.ref(0),D=v.ref(0),O=v.ref(),N=v.ref(!1),W=v.ref(),j=25,G=v.ref(!0),Y=v.ref({dateFormat:"YYYY-MM-DD"}),U=v.ref([]);let $=`|${Nh(6)}|`;v.provide("splitSymbol",$),v.provide("indicatorUrl",i.indicatorUrl),v.provide("indicatorToken",i.indicatorToken),v.provide("theme",i.theme),v.provide("pageId",i.pageId),v.provide("context",i.context),v.provide("graphicConfig",i.graphicConfig),v.provide("theDateInfo",Y);const tt=v.ref({}),gt=()=>{const V={borderColor:v.unref(ct).borderColor};tt.value=V},vt=v.computed(()=>{let V="#ECF1F5";switch(i.theme){case"default":V="#EAF0F9";break;case"dark":V="#FFFFFF";break}return{borderColor:"#E3E3E3",headerBgColor:V,headerColor:"#252525",bodyBgColor:"#FFFFFF",bodyColor:"#252525",indicatorsHeaderBgColor:V,indicatorsHeaderColor:"#252525",indicatorsBodyBgColor:"#FFFFFF",indicatorsBodyColor:"#252525",aggregateBgColor:V,aggregateColor:"#252525",sortNotActiveColor:"#CCCCCC",sortActiveColor:"#416EFF",dropDownMenuBgColor:"#FFFFFF",dropDownMenuColor:"#141414",dropDownMenuHightLightColor:"#2E68CF"}}),At=v.ref(1),J=v.ref();new ResizeObserver(V=>{for(const K of V){const{width:X}=K.contentRect;J.value=X,At.value++,v.nextTick(()=>{ZM()})}}).observe(document.body);const Ct=v.computed(()=>{const{width:V}=i;return V.includes("%")&&At.value?i.isIframeMode?J.value:document.querySelector(`#pivotWrap_${i.id}`).clientWidth:parseFloat(V)}),ct=v.computed(()=>{var Q;const V={},{styleConfig:K}=i;let X={};(Q=Object.keys(K))!=null&&Q.length?X=K:X=v.unref(vt);for(const et in X)V[et]=X[et]||"transparent";return V}),at=v.ref({}),ft=()=>{const V=Nl();V&&(v.unref(at).width=V.width+2+"px"),v.unref(at).backgroundColor=cC(v.unref(ct).headerBgColor,2)};v.watch(()=>i.theme,()=>{n&&(n==null||n.updateOption(lt))});const dt=v.computed(()=>{var V,K,X;return i.fullMode&&!((V=lt.rows)!=null&&V.length)&&!((K=lt.columns)!=null&&K.length)&&!((X=lt.indicators)!=null&&X.length)}),ht=v.computed(()=>{var V;return{width:(V=i.width)!=null&&V.includes("%")?"calc(100%)":parseFloat(i.width)-v.unref(H)+"px",height:"100%",backgroundColor:i.theme==="darkBlue"?"#081653":"#F1F1F1",color:i.theme==="darkBlue"?"#b2c3dd":""}}),wt=v.computed(()=>{const V={fontSize:"14px"};return v.unref(E)&&(i.theme==="darkBlue"?V.color="#00CCFF":V.color="#416EFF"),V}),q=v.ref([]),xt=v.ref([]);v.provide("dimensionFieldList",q),v.provide("indicatorFieldList",xt);const Vt="-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol",mt=v.computed(()=>v.unref(q).filter(V=>V.isInnerFilter).concat(v.unref(xt).filter(V=>V.isInnerFilter)).sort((V,K)=>V.timeStamp-K.timeStamp));v.watchEffect(()=>{var Q,et,it,Z,pt,St,Jt,Ut,Wt,Et;const{dropDownMenuBgColor:V,dropDownMenuColor:K,dropDownMenuHightLightColor:X}=ct.value;V&&((et=(Q=v.unref(w))==null?void 0:Q.style)==null||et.setProperty("--menu-bg-color",V)),K&&((Z=(it=v.unref(w))==null?void 0:it.style)==null||Z.setProperty("--menu-color",K)),X&&((St=(pt=v.unref(w))==null?void 0:pt.style)==null||St.setProperty("--menu-hight-light-color",X)),M.value&&((Ut=(Jt=v.unref(w))==null?void 0:Jt.style)==null||Ut.setProperty("--sub-menu-left",M.value)),B.value&&((Et=(Wt=v.unref(w))==null?void 0:Wt.style)==null||Et.setProperty("--sub-menu-top",B.value))}),AU($9,{sortNotActiveColor:v.unref(ct).sortNotActiveColor,sortActiveColor:v.unref(ct).sortActiveColor});const Rt=v.ref([]),ie=v.ref({}),Zt=v.ref({}),lt=v.reactive({records:[],columnHeaderTitle:!0,excelOptions:{fillHandle:!0},rows:[],columns:[],indicators:[],corner:{titleOnDimension:"row"},dataConfig:{sortRules:[],filterRules:[]},widthMode:"standard",menu:{renderMode:"html",dropDownMenuHighlight:[]},theme:{cellInnerBorder:!1,underlayBackgroundColor:"transparent",headerStyle:{bgColor(V){return v.unref(Rt).includes(V.dataValue)?v.unref(ct).indicatorsHeaderBgColor:v.unref(ct).headerBgColor},color(V){return v.unref(Rt).includes(V.dataValue)?v.unref(ct).indicatorsHeaderColor:v.unref(ct).headerColor},borderColor:v.unref(ct).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Vt},fontSize(){if(i.isIframeMode)return 14}},cornerHeaderStyle:{bgColor(){return v.unref(ct).headerBgColor},color:v.unref(ct).headerColor,borderColor:v.unref(ct).borderColor,fontWeight:"600",fontFamily(){if(i.isIframeMode)return Vt},fontSize(){if(i.isIframeMode)return 14}},bodyStyle:{borderColor:v.unref(ct).borderColor,color(V){var Q,et;const K=V.cellHeaderPaths.rowHeaderPaths,X=V.cellHeaderPaths.colHeaderPaths;return xs.includes((Q=K==null?void 0:K[K.length-1])==null?void 0:Q.value)?v.unref(ct).aggregateColor:v.unref(Rt).includes((et=X==null?void 0:X[X.length-1])==null?void 0:et.value)?v.unref(ct).indicatorsBodyColor:v.unref(ct).bodyColor},bgColor(V){var Q,et;const K=V.cellHeaderPaths.rowHeaderPaths,X=V.cellHeaderPaths.colHeaderPaths;return xs.includes((Q=K==null?void 0:K[K.length-1])==null?void 0:Q.value)?v.unref(ct).aggregateBgColor:v.unref(Rt).includes((et=X==null?void 0:X[X.length-1])==null?void 0:et.value)?v.unref(ct).indicatorsBodyBgColor:v.unref(ct).bodyBgColor},fontFamily(){if(i.isIframeMode)return Vt},fontSize(){if(i.isIframeMode)return 14}},rowHeaderStyle:{borderColor:v.unref(ct).borderColor,bgColor(V){return xs.includes(V.dataValue)?v.unref(ct).aggregateBgColor:v.unref(ct).bodyBgColor},color(V){return xs.includes(V.dataValue)?v.unref(ct).aggregateColor:v.unref(ct).bodyColor},fontFamily(){if(i.isIframeMode)return Vt},fontSize(){if(i.isIframeMode)return 14}},frameStyle:{borderLineWidth:1,borderColor:v.unref(ct).borderColor}}}),pe=v.computed(()=>{let V=0;return v.unref(E)&&i.fullMode&&(V=v.unref(H)),V}),Ae=v.computed(()=>{let V=0;return v.unref(L)&&(V=20),V}),ne=5,we=v.ref({});v.watch(y,V=>{if(V){const K={};v.nextTick(()=>{var et,it;const X=Nl();let Q=0;(et=v.unref(mt))!=null&&et.length&&(Q=(it=v.unref(O))==null?void 0:it.clientHeight),X&&(K.width=X.width+"px",K.height=X.height+"px",K.top=X.top+Q+v.unref(Ae)+"px",K.left=X.left+v.unref(pe)+v.unref(Ae)+j+"px"),we.value=K})}});const Yt=v.ref([]),yt=v.ref([]),Bt=v.ref({}),It=v.ref({}),te=v.ref([]),me=v.ref([]),Gt=v.ref([]),Ft=v.ref([]),Re=v.computed(()=>{const V=[];for(const it of v.unref(Yt)){const{data:Z,indicatorKey:pt="",calculateType:St=""}=it||{};V.push({label:Z.indicatorKey,columnName:Z.indicatorKey,location:"LEFT",show:!0,calcType:"BUILT_IN",builtInFormula:St,builtInValueSource:pt})}const K=[],X={};v.unref(yt).forEach(it=>{X[it.key]||(X[it.key]=[]),X[it.key].push(it)});for(const it in X){const Z=X[it]||[];Z.forEach((pt,St)=>{var Ke;const Jt=v.unref(q).find(ln=>ln.label===pt.key),Ut=v.unref(xt).find(ln=>ln.label===pt.key),Wt=Jt||Ut,Et={};St<Z.length-1&&(Et.join="&&"),(Wt==null?void 0:Wt.genericType)==="DATE"&&(Et.dateFormat=((Ke=v.unref(Y))==null?void 0:Ke.dateFormat)||"YYYY-MM-DD",St===0?Et.prop="startTime":St===1&&(Et.prop="endTime")),Wt&&K.push({fieldName:Wt.name,fieldType:Wt.genericType,fieldValue:Array.isArray(pt.value)?pt.value.join(","):pt.value,hrpIndexCode:Wt.indexCode,hrpIndexCodeNum:Wt.indexCodeNum,id:Wt.id,label:Wt.label,rule:pt.rule,targetSource:"",typeGuid:pt.typeGuid||"",type:pt.type,...Et})})}const Q=[];if(Object.keys(v.unref(Bt)))for(const it in v.unref(Bt))v.unref(Bt)[it]&&Q.push({key:it,num:v.unref(Bt)[it],rule:"TOP"});const et=[];if(Object.keys(v.unref(It)))for(const it in v.unref(It)){const{order:Z,type:pt,columnData:St,columnHeader:Jt}=v.unref(It)[it];if(Z.toLowerCase()==="default-sort")continue;const Ut={label:it,order:Z.toUpperCase(),type:"COMBINATION",fieldType:pt};pt==="indicators"&&(Ut.columnHeader=Jt,Ut.columnData=St,Ut.type="NORMAL"),et.push(Ut)}return{calc:V,filter:K,truncations:Q,sorts:et,aggregateMethod:v.unref(T)||{}}}),kt=oK(i),Xt=iK(i),Pe=nK(i),Ni=v.ref({}),rr=async()=>{var St,Jt,Ut,Wt;const{dimensionList:V,graphicConfig:K={}}=i,{queryColumnList:X=[]}=K,{rows:Q=[],columns:et=[]}=lt,it=(St=v.unref(Gt))!=null&&St.length?v.unref(Gt):[],Z=(Jt=v.unref(Ft))!=null&&Jt.length?v.unref(Ft):[];if(!(it!=null&&it.length))for(const Et of Q)it.push(Et.dimensionKey);if(!(Z!=null&&Z.length))for(const Et of et)Z.push(Et.dimensionKey);it!=null&&it.length||it.push(...V.filter(Et=>Et.position==="rows").map(Et=>Et.key)),Z!=null&&Z.length||Z.push(...V.filter(Et=>Et.position==="columns").map(Et=>Et.key));const pt=[];for(const Et in v.unref(a))pt.push({type:"dimension",key:Et,rule:v.unref(a)[Et]});for(const Et in v.unref(h))pt.push({type:"indicators",key:Et,rule:v.unref(h)[Et]});if(pt!=null&&pt.length&&nf(pt,{isHandle:!1}),X!=null&&X.length)for(const Et of X)!it.includes(Et.name)&&!Z.includes(Et.name)&&it.push(Et.name);Ni.value={...v.unref(Re),rowDimensionKeys:it,colDimensionKeys:Z,dimensions:(Ut=v.unref(te))!=null&&Ut.length?v.unref(te):v.unref(q),indicators:(Wt=v.unref(me))!=null&&Wt.length?v.unref(me):v.unref(xt)};try{const Et=await Xt({pivotTableCal:v.unref(Ni)},e,Ke=>{var ln;if(v.unref(G)){const{sqlConditions:Rs=[],queryColumns:Ts=[]}=Ke,Ro=GM(Rs),ui=Ts.find(ze=>ze.typeGuid==="the_date");if(ui&&(Y.value={dateFormat:ui.dateFormat||"YYYY-MM-DD"}),Ro!=null&&Ro.length)for(const ze of Ro)["startTime","endTime"].includes(ze.prop)&&(v.unref(Y)[ze.prop]=ze.fieldValue||"",(ln=v.unref(Y))!=null&&ln.rangeFormat||(v.unref(Y).rangeFormat=ze.dateFormat||"YYYY-MM-DD"));G.value=!1}});qM(Et)}catch(Et){console.error(Et)}};function GM(V){const K=[];for(const X of V)X.sqlConditions?K.push(...GM(X.sqlConditions)):X.fieldName==="the_date"&&K.push(X);return K}const fK=V=>{v.unref(Yt).find(K=>K.data.indicatorKey===V.data.indicatorKey)||Yt.value.push(V),rr()},pK=V=>{const K=v.unref(Yt).findIndex(X=>X.data.indicatorKey===V);K!==-1&&Yt.value.splice(K,1),rr()},nf=(V,{isHandle:K=!0}={})=>{let X=[];Array.isArray(V)?X=V:X=[V];for(const Q of X){const{key:et="",rule:it,type:Z=""}=Q||{};let pt=Xe.cloneDeep(it);Array.isArray(it)||(pt=[it]);const St=v.unref(q).find(Wt=>Wt.label===et),Jt=v.unref(xt).find(Wt=>Wt.label===et),Ut=St||Jt;if(Ut){if((Ut==null?void 0:Ut.genericType)==="DATE"&&(pt==null?void 0:pt.length)===1){const Wt=pt[0].value;pt[0].rule="GREATER_EQUAL",pt[1]={rule:"LESS_EQUAL",value:Wt}}for(let Wt=v.unref(yt).length-1;Wt>=0;Wt--){const Et=v.unref(yt)[Wt];Et.key===et&&Et.type===Z&&v.unref(yt).splice(Wt,1)}for(const Wt of pt){const{rule:Et,value:Ke}=Wt;et&&Et&&Ke&&yt.value.push({key:et,rule:Et,value:Ke,type:Z,typeGuid:Ut.typeGuid})}}}K&&rr()},mK=()=>{Bt.value=v.unref(_)||{},rr()},UM=V=>{const{key:K,order:X,type:Q,columnData:et=[]}=V;if(Q==="indicators"){let it="";for(const Z in v.unref(It))v.unref(It)[Z].type==="indicators"&&(it=Z);it&&delete v.unref(It)[it]}v.unref(It)[K]={order:X,type:Q,columnData:et},rr()},Vh=()=>{const V=v.unref(q),K=v.unref(xt),X=V.filter(et=>et.positionType==="rows").map(et=>et.name),Q=V.filter(et=>et.positionType==="columns").map(et=>et.name);te.value=Xe.cloneDeep(V),me.value=Xe.cloneDeep(K),Gt.value=Xe.cloneDeep(X),Ft.value=Xe.cloneDeep(Q),rr()};function vK(V,K=!0,X=-1){if(X>-1)lt.indicators.splice(X,0,...V);else for(const Q of V)lt.indicators.push(Q);K&&n.updateOption(lt)}function bK({label:V,calcType:K}){const X=[],Q=v.unref(Zt)[V]||[];for(const et in Xv)Q.indexOf(et)===-1&&X.push({text:Xv[et],menuKey:et});return K==="FORMULA"||!(X!=null&&X.length)?VM:[{text:"计算",menuKey:"calculate",children:X},...VM]}function KM(){var K;const V=[{text:"钻取",menuKey:"drill"},{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"筛选",menuKey:"filter"},{text:"聚合",menuKey:"aggregate"},{text:"取top",menuKey:"top"},{text:"删除",menuKey:"delete"}];return i.fullMode||i.allowDrill?v.unref(U)&&Array.isArray(v.unref(U))&&(K=v.unref(U))!=null&&K.length?V[0].children=v.unref(U).map(X=>({text:X.title||X.label,menuKey:X.label})):V.splice(0,1):(V.splice(0,1),V.splice(-1,1)),V}function CK(V,K){y.value=!0,v.unref(T)[K]=V||[],rr(),e("tableChange",{type:"9",data:{key:K,types:V}})}function yK(V,K=!0){var X;for(const Q of V){const{key:et,name:it,type:Z,dimensionKey:pt,width:St}=Q;let Jt;if(pt)Jt=Q;else{const Ut={dimensionKey:et,title:it,width:St?`${St}%`:"auto",type:Z};Z==="columns"?Ut.headerStyle={textStick:!0}:Z==="rows"&&(Ut.cornerHeaderIcon="sortNormal"),Ut.headerFormat=Wt=>{if(Z==="rows"){const Et=Wt==null?void 0:Wt.split($);return Et!=null&&Et.length?Et[Et.length-1]:Wt}else return Wt},Jt=Ut}if(Jt&&(Jt.headerStyle={textStick:!0},lt[Z].push(Jt)),(X=lt[Z])!=null&&X.length)for(const Ut of lt[Z])Ut.cornerDropDownMenu=KM();lt.dataConfig.sortRules.push({sortField:et,sortType:v.unref(r)})}K&&n.updateOption(lt),v.nextTick(()=>{XM()})}function YM(V){const K={},{records:X}=lt;for(const Q of X)for(const et of V)Sn(K,et)?K[et].find(it=>it.value===Q[et])||K[et].push(qv({value:Q[et]})):K[et]=qv([{value:Q[et]}]);return K}function qv(V){const K=Xe.cloneDeep(V);if(typeof V=="object")if(Array.isArray(K))for(const Q of K)X(Q);else X(K);function X(Q){for(const et in Q)if(typeof Q[et]=="string"){const it=Q[et].split($);it!=null&&it.length&&(Q[et]=it[it.length-1])}}return K}function XM(){const{dataset:{columns:V,rows:K}}=n,X=K.concat(V);s.value=YM(X)}async function qM(V){var Et,Ke,ln,Rs,Ts,Ro,ui,ze;U.value=await kt({pivotTableCal:v.unref(Ni)});let K=V;V?W.value=Xe.cloneDeep(V):K=Xe.cloneDeep(v.unref(W)),y.value=!0;const{data:X={}}=(K==null?void 0:K.data)||{},{rows:Q=[]}=X,et=[],it=[];for(const jt of v.unref(q)){if(!jt.show)continue;const be=lt[jt.positionType].find(hi=>hi.dimensionKey===jt.label);be?it.push({...be,title:jt.showTitle}):it.push({key:jt.label,name:jt.showTitle,type:jt.positionType,width:jt.width})}for(let jt=0;jt<v.unref(xt).length;jt++){const be=v.unref(xt)[jt];if(!be.show)continue;const hi=bK(be),Ci=lt.indicators.find(yi=>yi.indicatorKey===be.label);let je={};Ci?je={...Ci,dropDownMenu:hi,title:be.showTitle}:je={indicatorKey:be.label,title:be.showTitle,width:be!=null&&be.width?`${be.width}%`:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},dropDownMenu:hi,format:(yi,ki,Ms,jh)=>{const Bs=jh.getRecordByCell(ki,Ms)||[];return Bs[0]&&isNaN(+Bs[0][be.label])?Bs[0][be.label]:yi||"-"}},je&&(je.style={padding:[16,28,16,28]},et.push(je))}const Z=it.filter(jt=>jt.type==="rows");if(((Et=lt==null?void 0:lt.rows)==null?void 0:Et.length)!==Z.length&&typeof((Ke=v.unref(x))==null?void 0:Ke.col)=="number"&&(v.unref(x).col+=Z.length-(((ln=lt==null?void 0:lt.rows)==null?void 0:ln.length)||0)),lt.indicators=[],lt.rows=[],lt.columns=[],(Rs=v.unref(Yt))!=null&&Rs.length)for(const jt of v.unref(Yt))isNaN(+jt.position)||et.splice(+jt.position,0,{...jt.data,calculateType:jt.calculateType});const{sortType:pt,col:St,row:Jt}=v.unref(x)||{};for(const jt of et)jt&&(jt.headerIcon=be=>{const{col:hi,row:Ci}=be;if(St===hi&&Jt===Ci){let je="sortNormal";return pt==="ASC"?je="sortUp":pt==="DESC"&&(je="sortDown"),je}else return"sortNormal"});vK(et,!1),yK(it,!1);const Ut=[],Wt=it.filter(jt=>jt.type==="rows").map(jt=>jt.key||jt.dimensionKey);for(const jt of Q)for(const be in jt)if(!xs.includes(jt[be])){const hi=Wt.indexOf(be);if(hi!==-1){const Ci=[];for(let je=0;je<=hi;je++){const yi=String(jt[Wt[je]]);if(yi.includes($)){const ki=yi.split($);ki!=null&&ki.length&&Ci.push(ki[ki.length-1])}else Ci.push(yi)}Ci!=null&&Ci.length&&(jt[be]=Ci.join($))}}for(const jt of it){const be=(jt==null?void 0:jt.key)||(jt==null?void 0:jt.dimensionKey);if(jt.type==="columns"&&!v.unref(A)[be])v.unref(A)[be]=Zv("",be,Q);else if(jt.type==="rows")if(v.unref(R)[be]){const{type:hi}=v.unref(R)[be]||{};Ut.push(Zv(hi,be,Q))}else if(!v.unref(x)||v.unref(x).sortField===be||!n)Ut.push(Zv("",be,Q));else{const hi=lt.dataConfig.sortRules.find(Ci=>Ci.sortField===be);hi&&Ut.push(hi)}}if(v.unref(x)&&Ut.push(v.unref(x)),(Ts=Object.keys(v.unref(A)))!=null&&Ts.length)for(const jt in v.unref(A))Ut.push(v.unref(A)[jt]);if(lt.records=Q,lt.dataConfig.sortRules=Ut,Q!=null&&Q.length&&(v.unref(I).records=[]),(Ro=lt.columns)!=null&&Ro.length?lt.columnHeaderTitle=!0:(ui=lt.indicators)!=null&&ui.length?lt.columnHeaderTitle=!1:(ze=lt.rows)!=null&&ze.length&&(lt.columnHeaderTitle=!0),n)n.updateOption(lt),v.nextTick(()=>{JM()}),y.value=!1;else{const jt=document.getElementById(`pivotTableContainer_${i.id}`);n=new uT(jt,lt),v.nextTick(()=>{JM(),o.value=!0,y.value=!1,i.isIframeMode&&(v.unref(k)&&n.setScrollTop(v.unref(k)),v.unref(D)&&n.setScrollLeft(v.unref(D)))}),HK()}}const As=v.ref({});function ZM(){Nl()&&(v.unref(L)?(v.unref(As).top=v.unref(Ae)+"px",v.unref(As).left="0"):(v.unref(As).top="0",v.unref(As).left="0"))}function JM(){var V;if(n&&!((V=lt.records)!=null&&V.length)){const{dataset:{rows:K}}=n,X={};for(const Q of K)X[Q]="";v.unref(I).dataConfig={...lt.dataConfig,filterRules:[]},v.unref(I).records=[X],n.updateOption({...lt,...v.unref(I)})}}function _K(V,K){y.value=!0,nf({type:"indicators",key:V,rule:K}),e("tableChange",{type:"3",data:{type:"indicators",key:V,rule:K}})}function wK(V,K){y.value=!0,nf({type:"dimension",key:V,rule:K}),e("tableChange",{type:"3",data:{type:"dimension",key:V,rule:K}})}function SK(V,K){var it;let X=!1;const Q=lt[K].findIndex(Z=>Z.dimensionKey===V),et=lt.dataConfig.sortRules.findIndex(Z=>Z.sortField===V);if(Q!==-1){if(lt[K].splice(Q,1),i.fullMode||i.allowDrill){const Z=v.unref(q).findIndex(pt=>pt.label===V);Z!==-1&&(v.unref(q)[Z].isInnerFilter?(v.unref(q)[Z].show=!1,X=!0):v.unref(q).splice(Z,1))}else for(const Z of lt[K])Z.cornerDropDownMenu=KM();(it=v.unref(x))!=null&&it.col&&(v.unref(x).col-=1),y.value=!0,Vh(),e("tableChange",{type:"7"})}et!==-1&&(lt.dataConfig.sortRules[et].sortType=r),n.updateOption(lt),v.nextTick(()=>{if(XM(),!X){delete a.value[V];const Z=v.unref(yt).findIndex(pt=>pt.key===V);Z!==-1&&v.unref(yt).splice(Z,1)}})}function xK(V){const{indicators:K}=lt,X=K.findIndex(Q=>Q.indicatorKey===V);if(X!==-1){const Q=K[X];if(K.splice(X,1),Q.calculateType){const et=Q.indicatorKey.split("@"+Q.calculateType)[0],it=v.unref(Zt)[et].indexOf(Q.calculateType);it!==-1&&v.unref(Zt)[et].splice(it,1);const Z=v.unref(Rt).indexOf(Q.title);Z!==-1&&v.unref(Rt).splice(Z,1),delete v.unref(ie)[Q.title]}pK(Q.indicatorKey),e("tableChange",{type:"2",data:Q.indicatorKey})}}function Zv(V,K,X){let Q=[];const et=new Set;for(const it of X){const Z=it[K];Z&&!xs.includes(Z)&&et.add(Z)}return Q=Array.from(et),V==="asc"?Q=Q.sort((it,Z)=>it.localeCompare(Z)):V==="desc"&&(Q=Q.sort((it,Z)=>Z.localeCompare(it))),{sortField:K,sortBy:[...Q,...xs]}}function QM(V,K,X,Q){y.value=!0;let{menu:{dropDownMenuHighlight:et},rows:it}=lt;Q=Q+1,et=et.filter(pt=>!(pt.type==="dimension"&&pt.field===K)||pt.type==="indicator"),et.push({col:X,row:Q-1,field:K,type:"dimension",menuKey:V}),lt.menu.dropDownMenuHighlight=et;const Z=it.find(pt=>pt.dimensionKey===K);if(Z){let pt="sortNormal";V==="asc"?pt="sortUp":V==="desc"&&(pt="sortDown"),Z.cornerHeaderIcon=pt}n.updateOption(lt),V==="default-sort"?delete v.unref(R)[K]:v.unref(R)[K]={type:V},UM({key:K,order:V,type:"dimension"}),e("tableChange",{type:"4",data:{key:K,order:V,type:"dimension"}})}function tB(V,K,X,Q,et){var Et;y.value=!0;const{menu:it}=lt;let Z=it.dropDownMenuHighlight,pt="";(Et=lt.rows)!=null&&Et.length&&(pt=lt.rows[lt.rows.length-1].dimensionKey);const St=X.filter((Ke,ln)=>ln<X.length-1),Jt=St.map(Ke=>({columnName:Ke.dimensionKey})),Ut=St.map(Ke=>Ke.value),Wt=Z.findIndex(Ke=>Ke.field===pt&&Ke.type==="dimension");Wt!==-1&&Z.splice(Wt,1),Z=Z.filter(Ke=>Ke.type==="dimension"),Z.push({col:Q,row:et,field:K,type:"indicator",menuKey:V}),lt.menu.dropDownMenuHighlight=Z,n.updateOption(lt),V==="default-sort"?x.value=null:x.value={sortField:pt,sortByIndicator:K,sortType:V.toUpperCase(),query:Ut,col:Q,row:et},UM({key:K,order:V,type:"indicators",columnData:Ut,columnHeader:Jt}),e("tableChange",{type:"4",data:{key:K,order:V,type:"indicators"}})}function eB({dimensionKey:V,value:K=""}){const X={};v.unref(a)[V]&&(X.filterData=v.unref(a)[V]);const Q=v.unref(q).find(et=>et.label===V);d.value={tableInstance:n,fieldName:K||(Q==null?void 0:Q.title)||V,key:V,type:"dimension",...X},v.nextTick(()=>{v.unref(u).showModal(),e("tableChange",{type:"5",data:V})})}function AK(V,K){d.value={tableInstance:n,fieldName:K,key:V,type:"indicators",filterData:v.unref(h)[V]},v.nextTick(()=>{v.unref(u).showModal()})}function RK({indicatorKey:V,menuKey:K}){y.value=!0;let X=lt.indicators.length-1;const Q=`${V}@${K}`,et=`${V}(${Xv[K]}) fx`;v.unref(Rt).push(et),v.unref(ie)[et]=Q,lt.indicators.forEach((it,Z)=>{it.indicatorKey===V&&(X=Z+1)}),v.unref(Zt)[V]||(v.unref(Zt)[V]=[]),v.unref(Zt)[V].push(K),fK({data:{indicatorKey:Q,title:et,width:"auto",showSort:!1,headerStyle:{fontWeight:"normal"},headerIcon:"sortNormal",dropDownMenu:[{text:"排序",children:[{text:"升序",menuKey:"asc"},{text:"降序",menuKey:"desc"},{text:"默认",menuKey:"default-sort"}],menuKey:"sort"},{text:"度量属性",menuKey:"property"},{text:"条件属性",menuKey:"conditionalProperty"},{text:"删除",menuKey:"delete"}],style:{padding:[16,28,16,28]},format:(it,Z,pt,St)=>{const Jt=St.getRecordByCell(Z,pt)||[];return Jt[0]&&isNaN(+Jt[0][Q])?Jt[0][Q]:it}},position:X,indicatorKey:V,calculateType:K}),e("tableChange",{type:"1",data:{indicatorKey:V,calculateType:K}})}function TK(){const V=lt.rows[0]?lt.rows[0].cornerDropDownMenu:[],K=lt.columns[0]?lt.columns[0].cornerDropDownMenu:[],X=lt.rows.map(Z=>({...Z,cornerDropDownMenu:K})),Q=lt.columns.map(Z=>({...Z,cornerDropDownMenu:V}));lt.columns=X,lt.rows=Q;const{type:et,len:it}=lt.aggregate||{};et&&(lt.records.splice(-it),lt.aggregate={type:et,len:0}),lt.menu.dropDownMenuHighlight=[],a.value={},h.value={},c.value={},lt.dataConfig.filterRules=[],n.updateOption(lt)}function MK({indicatorKey:V,fieldName:K}){const X=of(V);if(X>-1){const Q=lt.indicators[X].formatConfig||{};v.unref(g).showModal({...Q,indicatorKey:V,fieldName:K})}}function BK(V){const K=of(V);if(K>-1){const X=lt.indicators[K].conditionalConfig||[];v.unref(f).showModal(V,X)}}function of(V){return lt.indicators.findIndex(K=>K.indicatorKey===V)}function PK(V){const K=v.unref(q)[0],X=v.unref(q).map(it=>it.label),Q=YM(X),et={xLabel:K.label,yLabel:V,dimensionData:Q,records:qv(lt.records)};v.unref(C).showModal(et)}function HK(){n.on("scroll",V=>{const{scrollDirection:K}=V;K==="vertical"?k.value=n.getScrollTop():K==="horizontal"&&(D.value=n.getScrollLeft())}),n.on("dblclick_cell",V=>{const{cellLocation:K="",field:X=""}=V;K==="body"&&!X.includes("LAST_DATA")&&!X.includes("SAME_DATA")&&!X.includes("DIFF_DATA")&&!X.includes("MOM_DATA")&&!X.includes("YOY_DATA")&&v.unref(S).showModal({args:V,splitSymbol:$,dimension:v.unref(q),indicator:v.unref(xt)})}),n.on("after_render",()=>{gt(),ZM(),ft(),v.nextTick(()=>{o.value=!0})}),n.on("icon_click",V=>{const{name:K,col:X,row:Q}=V;if(["sortNormal","sortUp","sortDown"].includes(K)){const{rows:et,indicators:it}=lt,Z=n.getCellValue(X,Q);let pt=v.unref(q).find(Et=>Et.showTitle===Z);pt||(pt=v.unref(xt).find(Et=>Et.showTitle===Z));let St=pt==null?void 0:pt.label;if(v.unref(Rt).includes(Z)&&(St=v.unref(ie)[Z]),!St)return;const Jt=et.find(Et=>Et.dimensionKey===St),Ut=it.find(Et=>Et.indicatorKey===St);let Wt="default-sort";if(K==="sortUp"?Wt="desc":K==="sortDown"?Wt="default-sort":(!K||K==="sortNormal")&&(Wt="asc"),Ut){const Et=n.getCellHeaderPaths(X,Q);tB(Wt,St,(Et==null?void 0:Et.colHeaderPaths)||[],X,Q)}else Jt&&QM(Wt,St,X,Q)}}),n.on("show_menu",()=>{const V=document.querySelector(`#pivotTableContainer_${i.id} .vtable__menu-element`);V&&(V.classList.add("first"),M.value=parseFloat(V.style.left)+V.clientWidth+3+"px",B.value=parseFloat(V.style.top)+"px")}),n.on("dropdown_menu_click",V=>{const{menuKey:K,field:X,col:Q,row:et}=V,{dimensionKey:it,indicatorKey:Z,value:pt}=X[X.length-1];l.value=V;const St=v.unref(U).find(Jt=>Jt.label===K);if(St){const Jt=v.unref(q).findIndex(Ut=>Ut.label===it);if(Jt!==-1){const Ut={...St,show:!0,positionType:"rows",showTitle:St.title||St.label};q.value.splice(Jt+1,0,Ut),y.value=!0,Vh(),e("tableChange",{type:"8"})}}switch(K){case"drill":alert("无维度可钻取");break;case"delete":it?SK(it,"rows"):Z&&xK(Z);break;case"asc":case"desc":case"default-sort":it?QM(K,it,Q,et):Z&&tB(K,Z,X,Q,et);break;case"filter":it?eB({dimensionKey:it}):Z&&AK(Z,pt);break;case"LAST_DATA":case"SAME_DATA":case"DIFF_DATA":case"MOM_DATA":case"YOY_DATA":case"zb":RK({indicatorKey:Z,menuKey:K});break;case"trans":TK();break;case"property":MK({indicatorKey:Z,fieldName:pt});break;case"conditionalProperty":BK(Z);break;case"aggregate":v.unref(p).showModal(v.unref(T)[it]||[],it);break;case"top":EK(it);break;case"graph":PK(Z);break}})}function EK(V){v.unref(m).showModal({value:v.unref(_)[V]||"",key:V})}function kK(){v.unref(b).showModal(v.unref(q),v.unref(xt))}async function LK(){y.value=!0,await Pe("save",{keyName:i.relateKeyName||i.keyName,data:[]}),a.value={},h.value={},c.value={},lt.dataConfig.filterRules=[],yt.value=[],rr()}function FK(V=[],K=[]){var it;const X=V.concat(K).map(Z=>Z.name),Q=v.unref(q).filter(Z=>Z.isInnerFilter&&!X.includes(Z.name)).map(Z=>({...Z,show:!1})),et=v.unref(xt).filter(Z=>Z.isInnerFilter&&!X.includes(Z.name)).map(Z=>({...Z,show:!1}));q.value=[...V,...Q],xt.value=[...K,...et];for(const Z in v.unref(It))if(((it=v.unref(It)[Z])==null?void 0:it.type)==="indicators"){delete v.unref(It)[Z];break}i.fullMode||i.allowDrill?(R.value={},x.value={},A.value={},y.value=!0,Vh(),e("tableChange",{type:"10",data:{dimensions:v.unref(q),indicators:v.unref(xt)}})):qM()}function IK(V){if(!v.unref(P))return;const{name:K,scope:X}=v.unref(P),Q=v.unref(q).find(St=>St.name===K),et=v.unref(q).findIndex(St=>St.name===K),it=v.unref(xt).find(St=>St.name===K),Z=v.unref(xt).findIndex(St=>St.name===K),pt={timeStamp:new Date().getTime()};if(["rows","columns"].includes(V))if(Q)if(Q.show){Vi.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else Q.positionType=V,Q.show=!0,v.unref(q).push(Q),v.unref(q).splice(et,1);else v.unref(q).push({...Xe.cloneDeep(v.unref(P)),...pt,positionType:V,showTitle:v.unref(P).label});else if(V==="indicators")if(it)if(it.show){Vi.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else it.show=!0,v.unref(xt).push(it),v.unref(xt).splice(Z,1);else v.unref(xt).push({...Xe.cloneDeep(v.unref(P)),...pt,showTitle:v.unref(P).label});else if(V==="filters"){if(["IDX","BUILT_IN_IDX"].includes(X))if(v.unref(mt).find(St=>St.name===K)){Vi.message.error({content:"该指标已存在,请勿重复添加",key:"repeatFlag"});return}else it?(it.isInnerFilter=!0,it.timeStamp=new Date().getTime()):v.unref(xt).push({...Xe.cloneDeep(v.unref(P)),showTitle:v.unref(P).label,show:!1,isInnerFilter:!0,...pt});else if(["DIM","BUILT_IN_DIM"].includes(X))if(v.unref(mt).find(St=>St.name===K)){Vi.message.error({content:"该维度已存在,请勿重复添加",key:"repeatFlag"});return}else Q?(Q.isInnerFilter=!0,Q.timeStamp=new Date().getTime()):v.unref(q).push({...Xe.cloneDeep(v.unref(P)),positionType:"filters",showTitle:v.unref(P).label,show:!1,isInnerFilter:!0,...pt})}y.value=!0,P.value=null,Vh(),e("tableChange",{type:"10",data:{dimensions:v.unref(q),indicators:v.unref(xt)}})}const DK=(V=[])=>{let K=!1;for(const X of v.unref(q))if(!V.find(et=>et.typeGuid===X.typeGuid)){K=!0;break}return K};v.provide("setItemDisabled",DK);const iB=()=>{},OK=({checkKeys:V,key:K,type:X})=>{X==="dimension"?(a.value[K]=V,c.value={},wK(K,V)):X==="indicators"&&(h.value[K]=V,_K(K,V));const Q=[];for(const et in v.unref(a))Q.push({key:et,data:v.unref(a)[et],type:"dimension"});for(const et in v.unref(h))Q.push({key:et,data:v.unref(h)[et],type:"indicators"});Pe("save",{keyName:i.relateKeyName||i.keyName,data:Q})};function zK(V){const{indicatorKey:K,unit:X="",format:Q,floatLength:et,position:it}=V,Z=of(K);if(Z>-1){const pt=lt.indicators[Z];pt.formatConfig=V,pt.format=(St,Jt,Ut,Wt)=>{const Et=Wt.getRecordByCell(Jt,Ut)||[];return Et[0]&&isNaN(+Et[0][pt.indicatorKey])?Et[0][pt.indicatorKey]:(Q==="integer"?St=Math.round(Number(St)):Q==="float"&&!isNaN(et)?St=Number(St).toFixed(et):Q==="percent"&&(St=Number(St)*100+"%"),it==="right"?St+X:X+St)},n.updateOption(lt)}}function WK(V,K=[]){const X=of(V);if(X>-1){const Q=lt.indicators[X];Q.conditionalConfig=K;const et=[];K.forEach(it=>{let Z="";it.conditions.forEach((pt,St)=>{St>0&&(Z+=pt.join==="and"?" && ":" || "),Z+=`value${pt.operation}${pt.value}`}),et.push(Z)}),Q.style.color=({dataValue:it})=>{let Z="#333";return K.forEach((pt,St)=>{pt.color&&(Z=Jv(et[St],it)?pt.color:Z)}),Z},Q.style.textAlign=({dataValue:it})=>{let Z="left";return K.forEach((pt,St)=>{pt.align&&(Z=Jv(et[St],it)?pt.align:Z)}),Z},Q.customRender=({rect:it,dataValue:Z})=>{let pt=[];return K.forEach((St,Jt)=>{if(St.icon&&Jv(et[Jt],Z)){const Wt=bP(St.icon,St.iconColor);pt=[{type:"icon",x:St.align!=="right"?15:it.width-25,y:it.height/2-7,svg:Wt,height:14,width:14}]}}),{elements:pt,renderDefault:!0}},n.updateOption(lt)}}function Jv(V,K){V=V||"true";const X=`function (value){
368
368
  if(${V}){
369
369
  return true
370
370
  }else{
371
371
  return false
372
372
  }
373
- }`;return Function(`"use strict";return (${X})`)().call(this,K)}function NK(V){y.value=!0;const{value:K,key:X}=V;v.unref(_)[X]=K,mK(),e("tableChange",{type:"6",data:{key:X,value:K}})}function Nl(){return n==null?void 0:n.getDrawRange()}const rf=v.ref([]),nB=v.ref(""),oB=v.ref(),VK=(V,K)=>{var Ke,ln,Rs,Ts,Ro;const X=K.dataViewColumns[V.oldIndex]||{},{scope:Q}=X;let et=!1,it=!1;["IDX","BUILT_IN_IDX"].includes(Q)?et=!0:["DIM","BUILT_IN_DIM"].includes(Q)&&(it=!0);const Z=Nl(),{rows:pt,columns:St,indicators:Jt,records:Ut}=lt,{top:Wt,left:Et}=Z;if(v.unref(dt)){let ui=i.height;i.isIframeMode&&(ui=document.body.clientHeight+"px");let ze=v.unref(ht).width;ze.includes("calc")&&(ze=v.unref(Ct)-v.unref(H)+"px"),F.value.main={width:ze,height:ui,top:Wt+v.unref(Ae)+"px",left:Et+v.unref(pe)+v.unref(Ae)+j+"px"},F.value.rows={width:parseFloat(ze)/2-ne*2+"px",height:parseFloat(ui)-ne*2+"px",top:0,left:0},F.value.columns={width:parseFloat(ze)/2-ne*2+"px",height:parseFloat(ui)/3-ne*2+"px",top:0,left:parseFloat(ze)/2+"px"},F.value.indicators={width:parseFloat(ze)/2-ne*2+"px",height:parseFloat(ui)*2/3-ne*2+"px",top:parseFloat(ui)/3+"px",left:parseFloat(ze)/2+"px"}}else{let ui=50;(Ke=v.unref(mt))!=null&&Ke.length?ui=v.unref(O).clientHeight:it&&(N.value=!0,v.unref(at).height=ui+"px");let ze=0,jt=1;const be=n.getRowHeight(0),hi={columnHeaderTitle:!0};if(St!=null&&St.length?jt+=St.length:hi.columns=[{dimensionKey:Nh(6),title:"",width:"100px",type:"columns"}],pt!=null&&pt.length?pt.forEach((Ci,je)=>{ze+=n.getColWidth(je)}):(ze=100,hi.rows=[{dimensionKey:Nh(6),title:"",width:"100px",type:"rows"}]),Jt!=null&&Jt.length||(hi.indicators=[{indicatorKey:Nh(6),title:"",width:"20%",format:()=>""}]),(ln=Object.keys(hi))!=null&&ln.length){const{rows:Ci=[],columns:je=[]}=hi;let yi=[];Ut!=null&&Ut.length?yi=Xe.cloneDeep(Ut):(Ts=(Rs=v.unref(I))==null?void 0:Rs.records)!=null&&Ts.length&&(yi=Xe.cloneDeep((Ro=v.unref(I))==null?void 0:Ro.records));let ki=St.map(Ms=>Ms.dimensionKey);if(!(ki!=null&&ki.length)&&(je!=null&&je.length)&&(ki=[je[0].dimensionKey]),yi!=null&&yi.length)for(const Ms of yi){for(const Bs of Ci)Ms[Bs.dimensionKey]="";let jh=!1;for(const Bs in Ms)if(ki.includes(Bs)){jh=!0;break}it?jh||(jt=2,Ms[ki[0]]=""):et&&(jh||(jt=1))}n.updateOption({...lt,...hi,records:yi})}v.nextTick(()=>{var ki;const Ci=Nl(),je=Ci.width,yi=Ci.height;F.value.main={width:je+"px",height:yi+ui+"px",top:Wt+v.unref(Ae)+"px",left:Et+v.unref(pe)+v.unref(Ae)+j+"px"},F.value.rows={width:ze-ne*2+"px",height:yi-ne*2+"px",top:ui+"px",left:0},F.value.columns={width:je-ze-ne*2+"px",height:jt*be-ne*2+"px",top:ui+"px",left:ze+"px"},F.value.indicators={width:je-ze-ne*2+"px",height:yi-jt*be-ne*2+"px",top:jt*be+((ki=v.unref(mt))!=null&&ki.length?ui:0)+"px",left:ze+"px"},F.value.filters={width:je-ne*2+"px",height:ui-ne*2+"px",top:0,left:0}})}P.value=X,et?rf.value=[0,1]:it&&(rf.value=[2])},jK=()=>{var V;(V=v.unref(I).records)!=null&&V.length?n.updateOption({...lt,records:v.unref(I).records}):n.updateOption(lt),N.value=!1,v.unref(at).height="",rf.value=[]},$K=()=>{var V;(V=v.unref(oB))==null||V.handleSearch(v.unref(nB))},GK=v.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:_.value,sortData:R.value,colSortData:A.value,indSortData:x.value,aggregateMap:T.value,subMenuLeft:M.value,subMenuTop:B.value,dragAreaStyle:F.value,showTreeData:E.value,largeVisible:L.value,temporaryData:I.value,splitSymbol:$,sourceListStyle:tt.value,dimensionFieldList:q.value,indicatorFieldList:xt.value,computedIndKeys:Rt.value,computedIndMap:ie.value,computedIndFieldMap:Zt.value,option:lt,loadingRect:we.value,calculateList:Yt.value,filterList:yt.value,topNumMap:Bt.value,sortMap:It.value,customDimensions:te.value,customIndicators:me.value,customRowKeys:Gt.value,customColKeys:Ft.value,cacheResData:W.value,toolBoxStyle:As.value,scrollTop:k.value,scrollLeft:D.value}));v.watch(GK,V=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(V)},{deep:!0});const rB=V=>{r.value=V.defaultSortRule,s.value=V.dimensionData,l.value=V.currentClickCell,a.value=V.dimFilterData,h.value=V.indFilterData,d.value=V.filterData,c.value=V.indFilterConfig,_.value=V.topNumData,R.value=V.sortData,A.value=V.colSortData,x.value=V.indSortData,T.value=V.aggregateMap,M.value=V.subMenuLeft,B.value=V.subMenuTop,F.value=V.dragAreaStyle,E.value=V.showTreeData,L.value=V.largeVisible,I.value=V.temporaryData,$=V.splitSymbol,tt.value=V.sourceListStyle,q.value=V.dimensionFieldList,xt.value=V.indicatorFieldList,Rt.value=V.computedIndKeys,ie.value=V.computedIndMap,Zt.value=V.computedIndFieldMap,we.value=V.loadingRect,Yt.value=V.calculateList,yt.value=V.filterList,Bt.value=V.topNumMap,It.value=V.sortMap,te.value=V.customDimensions,me.value=V.customIndicators,Gt.value=V.customRowKeys,Ft.value=V.customColKeys,W.value=V.cacheResData,As.value=V.toolBoxStyle,k.value=V.scrollTop,D.value=V.scrollLeft,Object.assign(lt,V.option)};async function UK(V){var Q,et;y.value=!0,V&&rB(V);const K=await Pe("get",{keyName:i.relateKeyName||i.keyName}),X=((et=(Q=K==null?void 0:K.data)==null?void 0:Q.data)==null?void 0:et.searchMap)||{};if(X!=null&&X.data){v.unref(a)||(a.value={}),v.unref(h)||(h.value={});const it=[];for(const Z of X.data)Z.type==="dimension"?a.value[Z.key]=Z.data:Z.type==="indicators"&&(h.value[Z.key]=Z.data),it.push({type:Z.type,key:Z.key,rule:Z.data});it!=null&&it.length&&nf(it,{isHandle:!1})}rr()}function KK(){return{dimensions:v.unref(q),indicators:v.unref(xt)}}const YK=V=>{const{scope:K,name:X,label:Q}=V;let et=[];["IDX","BUILT_IN_IDX"].includes(K)?et=v.unref(xt):["DIM","BUILT_IN_DIM"].includes(K)&&(et=v.unref(q));const it=et.findIndex(Z=>Z.name===X);if(it!==-1){delete v.unref(a)[et[it].label];const Z=v.unref(yt).findIndex(pt=>pt.key===Q);Z!==-1&&v.unref(yt).splice(Z,1),et[it].show?et[it].isInnerFilter=!1:et.splice(it,1)}y.value=!0,Vh(),e("tableChange",{type:"10",data:{dimensions:v.unref(q),indicators:v.unref(xt)}})},XK=V=>{const{scope:K,label:X,showTitle:Q}=V,et=RP(K);et==="indicator"||et==="dimension"&&eB({dimensionKey:X,value:Q})};t({option:lt,refreshData:UK,reRenderTable:rB,click:iB,getDrawRange:Nl,getSaveData:KK}),v.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],([V,K,X])=>{const{queryColumnList:Q=[],indicators:et=[]}=V,it=Xe.cloneDeep(Q),Z=Xe.cloneDeep(et);for(const pt of it){const St=K.find(Jt=>Jt.key===pt.name);pt.positionType=(St==null?void 0:St.position)||"rows",pt.width=St==null?void 0:St.width,pt.showTitle=pt.label}for(const pt of Z){const St=X.find(Jt=>Jt.key===pt.name);pt.width=St==null?void 0:St.width,pt.showTitle=pt.label}q.value=it,xt.value=Z},{immediate:!0,deep:!0});const qK=()=>{o.value=!1,E.value=!E.value},ZK=()=>{o.value=!1,L.value=!L.value,window.enScale&&window.enScale(v.unref(L))},JK=V=>{const K=v.unref(q).find(it=>it.label===V),X=v.unref(xt).find(it=>it.label===V),Q=K||X,et=v.unref(a)[V];return et?Q.genericType==="DATE"?Array.isArray(et)?`${et[0].value}~${et[1].value}`:et.value:et.value&&Array.isArray(et.value)?et.value.join("、"):"":""};return v.onMounted(()=>{}),{showDefaultTableArea:dt,maskList:rf,styleData:ct,subMenuLeft:M,subMenuTop:B,pivotTableRef:w,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:b,pivotAggregateRef:p,filterData:d,loadingRect:we,loading:y,isTableInit:o,toolBoxStyle:As,indSourceRef:oB,searchText:nB,dragAreaStyle:F,offsetWidth:pe,showTreeData:E,dataIconStyle:wt,largeVisible:L,sourceListStyle:tt,defaultTableStyle:ht,innerFilterStyle:at,innerFilterFieldList:mt,innerFilterRef:O,showFilterWrap:N,customDimensions:te,indicatorFieldList:xt,dimensionFieldList:q,click:iB,onFilterChange:OK,pivotDetailRef:S,handleFormat:zK,handleCondition:WK,handleAggregate:CK,handleGetTop:NK,handleConfig:kK,handleClearFilter:LK,handleGetConfig:FK,onDragStart:VK,onDragEnd:jK,onSearch:$K,handleAddField:IK,toggleShowData:qK,handleEnScale:ZK,adjustHSL:cC,handleDelFilterTag:YK,handleInnerFilter:XK,getFilterValue:JK}}}),OY="",zY="",lK={key:0,class:"design-template"},aK=["id"],hK=["onClick"],dK=["title"],uK=["id"];function cK(i,t,e,n,o,r){var T,M;const s=v.resolveComponent("a-input-search"),l=v.resolveComponent("ind-source-list"),a=v.resolveComponent("filter-outlined"),h=v.resolveComponent("delete-outlined"),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("a-spin"),c=v.resolveComponent("database-outlined"),g=v.resolveComponent("shrink-outlined"),f=v.resolveComponent("arrows-alt-outlined"),p=v.resolveComponent("setting-outlined"),m=v.resolveComponent("clear-outlined"),b=v.resolveComponent("drag-area"),C=v.resolveComponent("pivot-filter"),w=v.resolveComponent("pivot-property"),S=v.resolveComponent("conditional-property"),y=v.resolveComponent("chart-modal"),_=v.resolveComponent("pivot-aggregate"),R=v.resolveComponent("pivot-top"),A=v.resolveComponent("pivot-detail"),x=v.resolveComponent("pivot-config");return i.pageMode==="design"?(v.openBlock(),v.createElementBlock("div",lK," 透视表格 ")):(v.openBlock(),v.createBlock(v.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[v.createElementVNode("div",{class:v.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),id:`pivotWrap_${i.id}`},[i.fullMode?v.withDirectives((v.openBlock(),v.createElementBlock("div",{key:0,class:"data-source-list",style:v.normalizeStyle(i.sourceListStyle)},[v.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=B=>i.searchText=B),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),v.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["onOnDragStart","onOnDragEnd","config"])],4)),[[v.vShow,i.showTreeData]]):v.createCommentVNode("",!0),v.createElementVNode("div",{style:v.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((T=i.innerFilterFieldList)!=null&&T.length)||i.showFilterWrap)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:v.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.innerFilterFieldList,B=>(v.openBlock(),v.createElementBlock("div",{key:B.name,class:"filter-tag",style:v.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:H=>i.handleInnerFilter(B)},[v.createElementVNode("div",{class:"tag-text",style:v.normalizeStyle({color:i.styleData.headerColor})},v.toDisplayString(B.showTitle),5),i.getFilterValue(B.label)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"filter-value",style:v.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(B.label)},v.toDisplayString(i.getFilterValue(B.label)),13,dK)):v.createCommentVNode("",!0),v.createElementVNode("span",{class:v.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[v.createVNode(a,{class:"filter-icon",style:v.normalizeStyle({fontSize:"14px",color:i.styleData.headerColor})},null,8,["style"]),v.createVNode(d,{placement:"bottom"},{title:v.withCtx(()=>t[5]||(t[5]=[v.createElementVNode("span",null,"删除",-1)])),default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon",style:v.normalizeStyle({fontSize:"14px",color:i.styleData.headerColor}),onClick:v.withModifiers(H=>i.handleDelFilterTag(B),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,hK))),128))],4)):v.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:1,class:"empty-table",style:v.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):v.createCommentVNode("",!0),v.withDirectives(v.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,uK),[[v.vShow,!i.showDefaultTableArea]])],4),i.loading?(v.openBlock(),v.createElementBlock("div",{key:1,class:"pivot-loading",style:v.normalizeStyle(i.loadingRect)},[v.createVNode(u,{size:"large"})],4)):v.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:2,class:"tool-box",style:v.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(v.openBlock(),v.createBlock(d,{key:0},{title:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...B)=>i.toggleShowData&&i.toggleShowData(...B))},[v.createVNode(c,{style:v.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1})):v.createCommentVNode("",!0),v.createVNode(d,null,{title:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:v.withCtx(()=>[i.showFullScreen?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...B)=>i.handleEnScale&&i.handleEnScale(...B))},[i.largeVisible?(v.openBlock(),v.createBlock(g,{key:0,style:{"font-size":"14px",color:"#416EFF"}})):(v.openBlock(),v.createBlock(f,{key:1,style:{"font-size":"14px"}}))],2)):v.createCommentVNode("",!0)]),_:1}),v.createVNode(d,null,{title:v.withCtx(()=>t[6]||(t[6]=[v.createTextVNode("设置")])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...B)=>i.handleConfig&&i.handleConfig(...B))},[v.createVNode(p,{style:{"font-size":"14px"}})],2)]),_:1}),v.createVNode(d,null,{title:v.withCtx(()=>t[7]||(t[7]=[v.createTextVNode("清空筛选条件")])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[4]||(t[4]=(...B)=>i.handleClearFilter&&i.handleClearFilter(...B))},[v.createVNode(m,{style:{"font-size":"14px"}})],2)]),_:1})],4)):v.createCommentVNode("",!0),(M=i.maskList)!=null&&M.length?(v.openBlock(),v.createBlock(b,{key:3,style:v.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):v.createCommentVNode("",!0)],10,aK),v.createVNode(C,{ref:"pivotFilterRef",data:i.filterData,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","customDimensions","dimensions","indicators","onChange"]),v.createVNode(w,{ref:"pivotPropertyRef",onChange:i.handleFormat},null,8,["onChange"]),v.createVNode(S,{ref:"conditionalPropertyRef",onChange:i.handleCondition},null,8,["onChange"]),v.createVNode(y,{ref:"chartModalRef"},null,512),v.createVNode(_,{ref:"pivotAggregateRef",onConfirm:i.handleAggregate},null,8,["onConfirm"]),v.createVNode(R,{ref:"pivotTopRef",onConfirm:i.handleGetTop},null,8,["onConfirm"]),v.createVNode(A,{ref:"pivotDetailRef"},null,512),v.createVNode(x,{ref:"pivotConfigRef",fullMode:i.fullMode,onConfirm:i.handleGetConfig},null,8,["fullMode","onConfirm"])],8,["to","disabled"]))}const jM=cB(Hi(sK,[["render",cK],["__scopeId","data-v-a54be82b"]])),$M=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:jM},Symbol.toStringTag,{value:"Module"})),gK={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys($M).forEach(n=>{const o=$M[n];o.install&&i.use(o)})}};Ye.EcanPivotTable=jM,Ye.default=gK,Object.defineProperties(Ye,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
373
+ }`;return Function(`"use strict";return (${X})`)().call(this,K)}function NK(V){y.value=!0;const{value:K,key:X}=V;v.unref(_)[X]=K,mK(),e("tableChange",{type:"6",data:{key:X,value:K}})}function Nl(){return n==null?void 0:n.getDrawRange()}const rf=v.ref([]),nB=v.ref(""),oB=v.ref(),VK=(V,K)=>{var Ke,ln,Rs,Ts,Ro;const X=K.dataViewColumns[V.oldIndex]||{},{scope:Q}=X;let et=!1,it=!1;["IDX","BUILT_IN_IDX"].includes(Q)?et=!0:["DIM","BUILT_IN_DIM"].includes(Q)&&(it=!0);const Z=Nl(),{rows:pt,columns:St,indicators:Jt,records:Ut}=lt,{top:Wt,left:Et}=Z;if(v.unref(dt)){let ui=i.height;i.isIframeMode&&(ui=document.body.clientHeight+"px");let ze=v.unref(ht).width;ze.includes("calc")&&(ze=v.unref(Ct)-v.unref(H)+"px"),F.value.main={width:ze,height:ui,top:Wt+v.unref(Ae)+"px",left:Et+v.unref(pe)+v.unref(Ae)+j+"px"},F.value.rows={width:parseFloat(ze)/2-ne*2+"px",height:parseFloat(ui)-ne*2+"px",top:0,left:0},F.value.columns={width:parseFloat(ze)/2-ne*2+"px",height:parseFloat(ui)/3-ne*2+"px",top:0,left:parseFloat(ze)/2+"px"},F.value.indicators={width:parseFloat(ze)/2-ne*2+"px",height:parseFloat(ui)*2/3-ne*2+"px",top:parseFloat(ui)/3+"px",left:parseFloat(ze)/2+"px"}}else{let ui=50;(Ke=v.unref(mt))!=null&&Ke.length?ui=v.unref(O).clientHeight:it&&(N.value=!0,v.unref(at).height=ui+"px");let ze=0,jt=1;const be=n.getRowHeight(0),hi={columnHeaderTitle:!0};if(St!=null&&St.length?jt+=St.length:hi.columns=[{dimensionKey:Nh(6),title:"",width:"100px",type:"columns"}],pt!=null&&pt.length?pt.forEach((Ci,je)=>{ze+=n.getColWidth(je)}):(ze=100,hi.rows=[{dimensionKey:Nh(6),title:"",width:"100px",type:"rows"}]),Jt!=null&&Jt.length||(hi.indicators=[{indicatorKey:Nh(6),title:"",width:"20%",format:()=>""}]),(ln=Object.keys(hi))!=null&&ln.length){const{rows:Ci=[],columns:je=[]}=hi;let yi=[];Ut!=null&&Ut.length?yi=Xe.cloneDeep(Ut):(Ts=(Rs=v.unref(I))==null?void 0:Rs.records)!=null&&Ts.length&&(yi=Xe.cloneDeep((Ro=v.unref(I))==null?void 0:Ro.records));let ki=St.map(Ms=>Ms.dimensionKey);if(!(ki!=null&&ki.length)&&(je!=null&&je.length)&&(ki=[je[0].dimensionKey]),yi!=null&&yi.length)for(const Ms of yi){for(const Bs of Ci)Ms[Bs.dimensionKey]="";let jh=!1;for(const Bs in Ms)if(ki.includes(Bs)){jh=!0;break}it?jh||(jt=2,Ms[ki[0]]=""):et&&(jh||(jt=1))}n.updateOption({...lt,...hi,records:yi})}v.nextTick(()=>{var ki;const Ci=Nl(),je=Ci.width,yi=Ci.height;F.value.main={width:je+"px",height:yi+ui+"px",top:Wt+v.unref(Ae)+"px",left:Et+v.unref(pe)+v.unref(Ae)+j+"px"},F.value.rows={width:ze-ne*2+"px",height:yi-ne*2+"px",top:ui+"px",left:0},F.value.columns={width:je-ze-ne*2+"px",height:jt*be-ne*2+"px",top:ui+"px",left:ze+"px"},F.value.indicators={width:je-ze-ne*2+"px",height:yi-jt*be-ne*2+"px",top:jt*be+((ki=v.unref(mt))!=null&&ki.length?ui:0)+"px",left:ze+"px"},F.value.filters={width:je-ne*2+"px",height:ui-ne*2+"px",top:0,left:0}})}P.value=X,et?rf.value=[0,1]:it&&(rf.value=[2])},jK=()=>{var V;(V=v.unref(I).records)!=null&&V.length?n.updateOption({...lt,records:v.unref(I).records}):n.updateOption(lt),N.value=!1,v.unref(at).height="",rf.value=[]},$K=()=>{var V;(V=v.unref(oB))==null||V.handleSearch(v.unref(nB))},GK=v.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:_.value,sortData:R.value,colSortData:A.value,indSortData:x.value,aggregateMap:T.value,subMenuLeft:M.value,subMenuTop:B.value,dragAreaStyle:F.value,showTreeData:E.value,largeVisible:L.value,temporaryData:I.value,splitSymbol:$,sourceListStyle:tt.value,dimensionFieldList:q.value,indicatorFieldList:xt.value,computedIndKeys:Rt.value,computedIndMap:ie.value,computedIndFieldMap:Zt.value,option:lt,loadingRect:we.value,calculateList:Yt.value,filterList:yt.value,topNumMap:Bt.value,sortMap:It.value,customDimensions:te.value,customIndicators:me.value,customRowKeys:Gt.value,customColKeys:Ft.value,cacheResData:W.value,toolBoxStyle:As.value,scrollTop:k.value,scrollLeft:D.value}));v.watch(GK,V=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(V)},{deep:!0});const rB=V=>{r.value=V.defaultSortRule,s.value=V.dimensionData,l.value=V.currentClickCell,a.value=V.dimFilterData,h.value=V.indFilterData,d.value=V.filterData,c.value=V.indFilterConfig,_.value=V.topNumData,R.value=V.sortData,A.value=V.colSortData,x.value=V.indSortData,T.value=V.aggregateMap,M.value=V.subMenuLeft,B.value=V.subMenuTop,F.value=V.dragAreaStyle,E.value=V.showTreeData,L.value=V.largeVisible,I.value=V.temporaryData,$=V.splitSymbol,tt.value=V.sourceListStyle,q.value=V.dimensionFieldList,xt.value=V.indicatorFieldList,Rt.value=V.computedIndKeys,ie.value=V.computedIndMap,Zt.value=V.computedIndFieldMap,we.value=V.loadingRect,Yt.value=V.calculateList,yt.value=V.filterList,Bt.value=V.topNumMap,It.value=V.sortMap,te.value=V.customDimensions,me.value=V.customIndicators,Gt.value=V.customRowKeys,Ft.value=V.customColKeys,W.value=V.cacheResData,As.value=V.toolBoxStyle,k.value=V.scrollTop,D.value=V.scrollLeft,Object.assign(lt,V.option)};async function UK(V){var Q,et;y.value=!0,V&&rB(V);const K=await Pe("get",{keyName:i.relateKeyName||i.keyName}),X=((et=(Q=K==null?void 0:K.data)==null?void 0:Q.data)==null?void 0:et.searchMap)||{};if(X!=null&&X.data){v.unref(a)||(a.value={}),v.unref(h)||(h.value={});const it=[];for(const Z of X.data)Z.type==="dimension"?a.value[Z.key]=Z.data:Z.type==="indicators"&&(h.value[Z.key]=Z.data),it.push({type:Z.type,key:Z.key,rule:Z.data});it!=null&&it.length&&nf(it,{isHandle:!1})}rr()}function KK(){return{dimensions:v.unref(q),indicators:v.unref(xt)}}const YK=V=>{const{scope:K,name:X,label:Q}=V;let et=[];["IDX","BUILT_IN_IDX"].includes(K)?et=v.unref(xt):["DIM","BUILT_IN_DIM"].includes(K)&&(et=v.unref(q));const it=et.findIndex(Z=>Z.name===X);if(it!==-1){delete v.unref(a)[et[it].label];const Z=v.unref(yt).findIndex(pt=>pt.key===Q);Z!==-1&&v.unref(yt).splice(Z,1),et[it].show?et[it].isInnerFilter=!1:et.splice(it,1)}y.value=!0,Vh(),e("tableChange",{type:"10",data:{dimensions:v.unref(q),indicators:v.unref(xt)}})},XK=V=>{const{scope:K,label:X,showTitle:Q}=V,et=RP(K);et==="indicator"||et==="dimension"&&eB({dimensionKey:X,value:Q})};t({option:lt,refreshData:UK,reRenderTable:rB,click:iB,getDrawRange:Nl,getSaveData:KK}),v.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],([V,K,X])=>{const{queryColumnList:Q=[],indicators:et=[]}=V,it=Xe.cloneDeep(Q),Z=Xe.cloneDeep(et);for(const pt of it){const St=K.find(Jt=>Jt.key===pt.name);pt.positionType=(St==null?void 0:St.position)||"rows",pt.width=St==null?void 0:St.width,pt.showTitle=pt.label}for(const pt of Z){const St=X.find(Jt=>Jt.key===pt.name);pt.width=St==null?void 0:St.width,pt.showTitle=pt.label}q.value=it,xt.value=Z},{immediate:!0,deep:!0});const qK=()=>{o.value=!1,E.value=!E.value},ZK=()=>{o.value=!1,L.value=!L.value,window.enScale&&window.enScale(v.unref(L))},JK=V=>{const K=v.unref(q).find(it=>it.label===V),X=v.unref(xt).find(it=>it.label===V),Q=K||X,et=v.unref(a)[V];return et?Q.genericType==="DATE"?Array.isArray(et)?`${et[0].value}~${et[1].value}`:et.value:et.value&&Array.isArray(et.value)?et.value.join("、"):"":""};return v.onMounted(()=>{}),{showDefaultTableArea:dt,maskList:rf,styleData:ct,subMenuLeft:M,subMenuTop:B,pivotTableRef:w,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:b,pivotAggregateRef:p,filterData:d,loadingRect:we,loading:y,isTableInit:o,toolBoxStyle:As,indSourceRef:oB,searchText:nB,dragAreaStyle:F,offsetWidth:pe,showTreeData:E,dataIconStyle:wt,largeVisible:L,sourceListStyle:tt,defaultTableStyle:ht,innerFilterStyle:at,innerFilterFieldList:mt,innerFilterRef:O,showFilterWrap:N,customDimensions:te,indicatorFieldList:xt,dimensionFieldList:q,click:iB,onFilterChange:OK,pivotDetailRef:S,handleFormat:zK,handleCondition:WK,handleAggregate:CK,handleGetTop:NK,handleConfig:kK,handleClearFilter:LK,handleGetConfig:FK,onDragStart:VK,onDragEnd:jK,onSearch:$K,handleAddField:IK,toggleShowData:qK,handleEnScale:ZK,adjustHSL:cC,handleDelFilterTag:YK,handleInnerFilter:XK,getFilterValue:JK}}}),OY="",zY="",lK={key:0,class:"design-template"},aK=["id"],hK=["onClick"],dK=["title"],uK=["id"];function cK(i,t,e,n,o,r){var T,M;const s=v.resolveComponent("a-input-search"),l=v.resolveComponent("ind-source-list"),a=v.resolveComponent("filter-outlined"),h=v.resolveComponent("delete-outlined"),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("a-spin"),c=v.resolveComponent("database-outlined"),g=v.resolveComponent("shrink-outlined"),f=v.resolveComponent("arrows-alt-outlined"),p=v.resolveComponent("setting-outlined"),m=v.resolveComponent("clear-outlined"),b=v.resolveComponent("drag-area"),C=v.resolveComponent("pivot-filter"),w=v.resolveComponent("pivot-property"),S=v.resolveComponent("conditional-property"),y=v.resolveComponent("chart-modal"),_=v.resolveComponent("pivot-aggregate"),R=v.resolveComponent("pivot-top"),A=v.resolveComponent("pivot-detail"),x=v.resolveComponent("pivot-config");return i.pageMode==="design"?(v.openBlock(),v.createElementBlock("div",lK," 透视表格 ")):(v.openBlock(),v.createBlock(v.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[v.createElementVNode("div",{class:v.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),id:`pivotWrap_${i.id}`},[i.fullMode?v.withDirectives((v.openBlock(),v.createElementBlock("div",{key:0,class:"data-source-list",style:v.normalizeStyle(i.sourceListStyle)},[v.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=B=>i.searchText=B),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),v.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["onOnDragStart","onOnDragEnd","config"])],4)),[[v.vShow,i.showTreeData]]):v.createCommentVNode("",!0),v.createElementVNode("div",{style:v.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((T=i.innerFilterFieldList)!=null&&T.length)||i.showFilterWrap)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:v.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.innerFilterFieldList,B=>(v.openBlock(),v.createElementBlock("div",{key:B.name,class:"filter-tag",style:v.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:H=>i.handleInnerFilter(B)},[v.createElementVNode("div",{class:"tag-text",style:v.normalizeStyle({color:i.styleData.headerColor})},v.toDisplayString(B.showTitle),5),i.getFilterValue(B.label)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"filter-value",style:v.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(B.label)},v.toDisplayString(i.getFilterValue(B.label)),13,dK)):v.createCommentVNode("",!0),v.createElementVNode("span",{class:v.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[v.createVNode(a,{class:"filter-icon",style:v.normalizeStyle({fontSize:"14px",color:i.styleData.headerColor})},null,8,["style"]),v.createVNode(d,{placement:"bottom"},{title:v.withCtx(()=>t[5]||(t[5]=[v.createElementVNode("span",null,"删除",-1)])),default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon",style:v.normalizeStyle({fontSize:"14px",color:i.styleData.headerColor}),onClick:v.withModifiers(H=>i.handleDelFilterTag(B),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,hK))),128))],4)):v.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:1,class:"empty-table",style:v.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):v.createCommentVNode("",!0),v.withDirectives(v.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,uK),[[v.vShow,!i.showDefaultTableArea]])],4),i.loading?(v.openBlock(),v.createElementBlock("div",{key:1,class:"pivot-loading",style:v.normalizeStyle(i.loadingRect)},[v.createVNode(u,{size:"large"})],4)):v.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:2,class:"tool-box",style:v.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(v.openBlock(),v.createBlock(d,{key:0},{title:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...B)=>i.toggleShowData&&i.toggleShowData(...B))},[v.createVNode(c,{style:v.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1})):v.createCommentVNode("",!0),v.createVNode(d,null,{title:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:v.withCtx(()=>[i.showFullScreen?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...B)=>i.handleEnScale&&i.handleEnScale(...B))},[i.largeVisible?(v.openBlock(),v.createBlock(g,{key:0,style:{"font-size":"14px",color:"#416EFF"}})):(v.openBlock(),v.createBlock(f,{key:1,style:{"font-size":"14px"}}))],2)):v.createCommentVNode("",!0)]),_:1}),v.createVNode(d,null,{title:v.withCtx(()=>t[6]||(t[6]=[v.createTextVNode("设置")])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...B)=>i.handleConfig&&i.handleConfig(...B))},[v.createVNode(p,{style:{"font-size":"14px"}})],2)]),_:1}),v.createVNode(d,null,{title:v.withCtx(()=>t[7]||(t[7]=[v.createTextVNode("清空筛选条件")])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[4]||(t[4]=(...B)=>i.handleClearFilter&&i.handleClearFilter(...B))},[v.createVNode(m,{style:{"font-size":"14px"}})],2)]),_:1})],4)):v.createCommentVNode("",!0),(M=i.maskList)!=null&&M.length?(v.openBlock(),v.createBlock(b,{key:3,style:v.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):v.createCommentVNode("",!0)],10,aK),v.createVNode(C,{ref:"pivotFilterRef",data:i.filterData,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","customDimensions","dimensions","indicators","onChange"]),v.createVNode(w,{ref:"pivotPropertyRef",onChange:i.handleFormat},null,8,["onChange"]),v.createVNode(S,{ref:"conditionalPropertyRef",onChange:i.handleCondition},null,8,["onChange"]),v.createVNode(y,{ref:"chartModalRef"},null,512),v.createVNode(_,{ref:"pivotAggregateRef",onConfirm:i.handleAggregate},null,8,["onConfirm"]),v.createVNode(R,{ref:"pivotTopRef",onConfirm:i.handleGetTop},null,8,["onConfirm"]),v.createVNode(A,{ref:"pivotDetailRef"},null,512),v.createVNode(x,{ref:"pivotConfigRef",fullMode:i.fullMode,onConfirm:i.handleGetConfig},null,8,["fullMode","onConfirm"])],8,["to","disabled"]))}const jM=cB(Hi(sK,[["render",cK],["__scopeId","data-v-29abcaa3"]])),$M=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:jM},Symbol.toStringTag,{value:"Module"})),gK={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys($M).forEach(n=>{const o=$M[n];o.install&&i.use(o)})}};Ye.EcanPivotTable=jM,Ye.default=gK,Object.defineProperties(Ye,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
374
374
  //# sourceMappingURL=index.umd.js.map