You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1821 lines
1.1 MiB
1821 lines
1.1 MiB
import{d as ce,l as le,z as Ct,r as Y,w as me,c as Fn,_ as J,g as D,e as Ie,u as Dt,ad as jc,P as Oe,j as kn,m as Jt,aA as to,at as Yt,i as oe,y as Uc,ab as nr,t as Gc,T as or,h as at,v as dt,aB as un,aC as qt,aD as Yc,q as Qt,p as Lt,H as ve,s as Qe,a7 as _n,n as bt,aE as Zc,ag as ko,ai as ft,b as ot,aF as Kc,aG as Xc,J as B,ah as Qc,Q as Fe,as as Os,au as Gt,aq as pt,ay as Ke,f as De,ap as Nt,aH as Bs,aI as Jc,aJ as qc,af as Fs,aK as eu,aL as tu,C as Hs,an as dn,o as Go,a as Cn,aw as zs,aM as Ws,aN as Vs,k as js,aO as nu,x as Yo,aP as ou,ax as iu,aQ as ru,az as Us,aR as au,aS as Ri,aT as su,aj as Gs,a6 as Jo,N as ye,B as xe,E as Q,I as ie,K as z,F as be,G as U,S as xt,L as Pe,a5 as qe,O as kt,W as ht,Z as Wt,X as no,Y as ct,D as et,aU as Zn,aV as wa,aW as Kn,aX as lu,aY as cu,a0 as $e,aZ as Ys,a_ as uu,U as $n,a$ as du,ar as hu,b0 as Zs,a8 as Ks,b1 as gi,b2 as fu,b3 as pu,V as gu}from"./index-3c234266.js";import{u as St,c as Pi,a as Ni,b as Ot,i as mu,e as vu,f as yu,h as wu,j as bu,k as Xs,l as Cu,m as ir,n as xu,s as $u}from"./utils-ccf2ec76.js";import{a as Qs,b as Zo,e as rr,f as ar,u as qo,F as sr,h as yo,j as lr,k as Su,l as ku,D as _u,g as Js,m as Mu,n as Au,E as Lu,q as qs,r as Eu,t as Iu,v as Tu,N as ba,c as nt,C as _o,s as Re,I as hn,M as Bt,d as Ut,o as Ca}from"./http-02c81b8c.js";import{k as Du,l as Ru,m as qn,n as Oi,p as cr,q as Pu,K as ze,w as At,h as Nu,T as Ou,j as Bu,u as xa,r as el,t as Fu,i as ei,v as Hu,d as zu,B as Mn,x as Wu,W as Vu,y as ur,o as tl,e as Vt,z as ju,C as Uu,N as $a,s as nl,D as dr,E as Gu,b as en,A as Mo,_ as it,F as Yu,G as Zu}from"./_plugin-vue_export-helper-a1ffee7e.js";import{i as Ku}from"./isNumeric-4ba116a0.js";import{d as mt,C as Xu,b as Qu,a as ol,S as Ju,_ as il}from"./clipboard-1ec87c07.js";import{R as rl,L as qu,_ as ed,P as td,E as On,S as hr,D as nd,a as od}from"./ExclamationCircleOutlined-e5350100.js";import{u as zt,g as id,i as Sa,h as rd,f as ad,c as fn,_ as pn,F as gn,P as fr,R as xo,b as oo,S as pr,a as al,d as sd,U as ld}from"./PlusOutlined-920ae6ab.js";import{a as Hn,_ as zn}from"./index-86127553.js";import{_ as gr}from"./index-9a52c10f.js";import{s as cd,_ as ud,M as dd}from"./index-6a3b275e.js";import{s as hd,b as fd,c as pd,d as gd,i as ka,g as md,e as vd}from"./collapseMotion-ccbb3149.js";import{_ as sl,L as _a,R as Ma}from"./index.vue_vue_type_script_setup_true_lang-8ff7194a.js";import{c as ll}from"./componentGroup-1abd3da5.js";import cl from"./info-9a8ec598.js";import{c as yd}from"./componentList-d97405f6.js";import{L as mr,C as wd,t as Wo}from"./index-08b117c0.js";import{d as bd}from"./defaultAmisConfig-97f3da4b.js";import{C as ul}from"./index-6bb7022a.js";var Cd="[object Number]";function xd(e){return typeof e=="number"||Du(e)&&Ru(e)==Cd}function Aa(e){let{prefixCls:t,value:n,current:a,offset:v=0}=e,p;return v&&(p={position:"absolute",top:`${v}00%`,left:0}),D("p",{style:p,class:Ie(`${t}-only-unit`,{current:a})},[n])}function $d(e,t,n){let a=e,v=0;for(;(a+10)%10!==t;)a+=n,v+=n;return v}const Sd=ce({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(e){const t=le(()=>Number(e.value)),n=le(()=>Math.abs(e.count)),a=Ct({prevValue:t.value,prevCount:n.value}),v=()=>{a.prevValue=t.value,a.prevCount=n.value},p=Y();return me(t,()=>{clearTimeout(p.value),p.value=setTimeout(()=>{v()},1e3)},{flush:"post"}),Fn(()=>{clearTimeout(p.value)}),()=>{let f,m={};const c=t.value;if(a.prevValue===c||Number.isNaN(c)||Number.isNaN(a.prevValue))f=[Aa(J(J({},e),{current:!0}))],m={transition:"none"};else{f=[];const h=c+10,i=[];for(let s=c;s<=h;s+=1)i.push(s);const o=i.findIndex(s=>s%10===a.prevValue);f=i.map((s,r)=>{const u=s%10;return Aa(J(J({},e),{value:u,offset:r-o,current:r===o}))});const l=a.prevCount<n.value?1:-1;m={transform:`translateY(${-$d(a.prevValue,c,l)}00%)`}}return D("span",{class:`${e.prefixCls}-only`,style:m,onTransitionend:()=>v()},[f])}}});var kd=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};const _d={prefixCls:String,count:Oe.any,component:String,title:Oe.any,show:Boolean},Md=ce({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:_d,setup(e,t){let{attrs:n,slots:a}=t;const{prefixCls:v}=Dt("scroll-number",e);return()=>{var p;const f=J(J({},e),n),{prefixCls:m,count:c,title:h,show:i,component:o="sup",class:l,style:s}=f,r=kd(f,["prefixCls","count","title","show","component","class","style"]),u=J(J({},r),{style:s,"data-show":e.show,class:Ie(v.value,l),title:h});let d=c;if(c&&Number(c)%1===0){const y=String(c).split("");d=y.map((x,C)=>D(Sd,{prefixCls:v.value,count:Number(c),value:x,key:y.length-C},null))}s&&s.borderColor&&(u.style=J(J({},s),{boxShadow:`0 0 0 1px ${s.borderColor} inset`}));const g=jc((p=a.default)===null||p===void 0?void 0:p.call(a));return g&&g.length?qn(g,{class:Ie(`${v.value}-custom-component`)},!1):D(o,u,{default:()=>[d]})}}}),Ad=new to("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Ld=new to("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Ed=new to("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Id=new to("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Td=new to("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Dd=new to("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),Rd=e=>{const{componentCls:t,iconCls:n,antCls:a,badgeFontHeight:v,badgeShadowSize:p,badgeHeightSm:f,motionDurationSlow:m,badgeStatusSize:c,marginXS:h,badgeRibbonOffset:i}=e,o=`${a}-scroll-number`,l=`${a}-ribbon`,s=`${a}-ribbon-wrapper`,r=Oi(e,(d,g)=>{let{darkColor:y}=g;return{[`&${t} ${t}-color-${d}`]:{background:y,[`&:not(${t}-count)`]:{color:y}}}}),u=Oi(e,(d,g)=>{let{darkColor:y}=g;return{[`&${l}-color-${d}`]:{background:y,color:y}}});return{[t]:J(J(J(J({},Yt(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{zIndex:e.badgeZIndex,minWidth:e.badgeHeight,height:e.badgeHeight,color:e.badgeTextColor,fontWeight:e.badgeFontWeight,fontSize:e.badgeFontSize,lineHeight:`${e.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:e.badgeHeight/2,boxShadow:`0 0 0 ${p}px ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:f,height:f,fontSize:e.badgeFontSizeSm,lineHeight:`${f}px`,borderRadius:f/2},[`${t}-multiple-words`]:{padding:`0 ${e.paddingXS}px`},[`${t}-dot`]:{zIndex:e.badgeZIndex,width:e.badgeDotSize,minWidth:e.badgeDotSize,height:e.badgeDotSize,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${p}px ${e.badgeShadowColor}`},[`${t}-dot${o}`]:{transition:`background ${m}`},[`${t}-count, ${t}-dot, ${o}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:Dd,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:p,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:Ad,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:h,color:e.colorText,fontSize:e.fontSize}}}),r),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Ld,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:Ed,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Id,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:Td,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${o}-custom-component, ${t}-count`]:{transform:"none"},[`${o}-custom-component, ${o}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${o}`]:{overflow:"hidden",[`${o}-only`]:{position:"relative",display:"inline-block",height:e.badgeHeight,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${o}-only-unit`]:{height:e.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${o}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${o}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${s}`]:{position:"relative"},[`${l}`]:J(J(J(J({},Yt(e)),{position:"absolute",top:h,padding:`0 ${e.paddingXS}px`,color:e.colorPrimary,lineHeight:`${v}px`,whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${l}-text`]:{color:e.colorTextLightSolid},[`${l}-corner`]:{position:"absolute",top:"100%",width:i,height:i,color:"currentcolor",border:`${i/2}px solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),u),{[`&${l}-placement-end`]:{insetInlineEnd:-i,borderEndEndRadius:0,[`${l}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${l}-placement-start`]:{insetInlineStart:-i,borderEndStartRadius:0,[`${l}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},dl=kn("Badge",e=>{const{fontSize:t,lineHeight:n,fontSizeSM:a,lineWidth:v,marginXS:p,colorBorderBg:f}=e,m=Math.round(t*n),c=v,h="auto",i=m-2*c,o=e.colorBgContainer,l="normal",s=a,r=e.colorError,u=e.colorErrorHover,d=t,g=a/2,y=a,x=a/2,C=Jt(e,{badgeFontHeight:m,badgeShadowSize:c,badgeZIndex:h,badgeHeight:i,badgeTextColor:o,badgeFontWeight:l,badgeFontSize:s,badgeColor:r,badgeColorHover:u,badgeShadowColor:f,badgeHeightSm:d,badgeDotSize:g,badgeFontSizeSm:y,badgeStatusSize:x,badgeProcessingDuration:"1.2s",badgeRibbonOffset:p,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[Rd(C)]});var Pd=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};const Nd=()=>({prefix:String,color:{type:String},text:Oe.any,placement:{type:String,default:"end"}}),Bi=ce({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:Nd(),slots:Object,setup(e,t){let{attrs:n,slots:a}=t;const{prefixCls:v,direction:p}=Dt("ribbon",e),[f,m]=dl(v),c=le(()=>cr(e.color,!1)),h=le(()=>[v.value,`${v.value}-placement-${e.placement}`,{[`${v.value}-rtl`]:p.value==="rtl",[`${v.value}-color-${e.color}`]:c.value}]);return()=>{var i,o;const{class:l,style:s}=n,r=Pd(n,["class","style"]),u={},d={};return e.color&&!c.value&&(u.background=e.color,d.color=e.color),f(D("div",oe({class:`${v.value}-wrapper ${m.value}`},r),[(i=a.default)===null||i===void 0?void 0:i.call(a),D("div",{class:[h.value,l,m.value],style:J(J({},u),s)},[D("span",{class:`${v.value}-text`},[e.text||((o=a.text)===null||o===void 0?void 0:o.call(a))]),D("div",{class:`${v.value}-corner`,style:d},null)])]))}}}),Od=()=>({count:Oe.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:Oe.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),Vo=ce({compatConfig:{MODE:3},name:"ABadge",Ribbon:Bi,inheritAttrs:!1,props:Od(),slots:Object,setup(e,t){let{slots:n,attrs:a}=t;const{prefixCls:v,direction:p}=Dt("badge",e),[f,m]=dl(v),c=le(()=>e.count>e.overflowCount?`${e.overflowCount}+`:e.count),h=le(()=>c.value==="0"||c.value===0),i=le(()=>e.count===null||h.value&&!e.showZero),o=le(()=>(e.status!==null&&e.status!==void 0||e.color!==null&&e.color!==void 0)&&i.value),l=le(()=>e.dot&&!h.value),s=le(()=>l.value?"":c.value),r=le(()=>(s.value===null||s.value===void 0||s.value===""||h.value&&!e.showZero)&&!l.value),u=Y(e.count),d=Y(s.value),g=Y(l.value);me([()=>e.count,s,l],()=>{r.value||(u.value=e.count,d.value=s.value,g.value=l.value)},{immediate:!0});const y=le(()=>cr(e.color,!1)),x=le(()=>({[`${v.value}-status-dot`]:o.value,[`${v.value}-status-${e.status}`]:!!e.status,[`${v.value}-color-${e.color}`]:y.value})),C=le(()=>e.color&&!y.value?{background:e.color,color:e.color}:{}),b=le(()=>({[`${v.value}-dot`]:g.value,[`${v.value}-count`]:!g.value,[`${v.value}-count-sm`]:e.size==="small",[`${v.value}-multiple-words`]:!g.value&&d.value&&d.value.toString().length>1,[`${v.value}-status-${e.status}`]:!!e.status,[`${v.value}-color-${e.color}`]:y.value}));return()=>{var w,_;const{offset:I,title:E,color:k}=e,A=a.style,S=Uc(n,e,"text"),M=v.value,$=u.value;let L=nr((w=n.default)===null||w===void 0?void 0:w.call(n));L=L.length?L:null;const T=!!(!r.value||n.count),R=(()=>{if(!I)return J({},A);const W={marginTop:Ku(I[1])?`${I[1]}px`:I[1]};return p.value==="rtl"?W.left=`${parseInt(I[0],10)}px`:W.right=`${-parseInt(I[0],10)}px`,J(J({},W),A)})(),P=E??(typeof $=="string"||typeof $=="number"?$:void 0),F=T||!S?null:D("span",{class:`${M}-status-text`},[S]),O=typeof $=="object"||$===void 0&&n.count?qn($??((_=n.count)===null||_===void 0?void 0:_.call(n)),{style:R},!1):null,N=Ie(M,{[`${M}-status`]:o.value,[`${M}-not-a-wrapper`]:!L,[`${M}-rtl`]:p.value==="rtl"},a.class,m.value);if(!L&&o.value){const W=R.color;return f(D("span",oe(oe({},a),{},{class:N,style:R}),[D("span",{class:x.value,style:C.value},null),D("span",{style:{color:W},class:`${M}-status-text`},[S])]))}const V=Gc(L?`${M}-zoom`:"",{appear:!1});let H=J(J({},R),e.numberStyle);return k&&!y.value&&(H=H||{},H.background=k),f(D("span",oe(oe({},a),{},{class:N}),[L,D(or,V,{default:()=>[at(D(Md,{prefixCls:e.scrollNumberPrefixCls,show:T,class:b.value,count:d.value,title:P,style:H,key:"scrollNumber"},{default:()=>[O]}),[[dt,T]])]}),F]))}}});Vo.install=function(e){return e.component(Vo.name,Vo),e.component(Bi.name,Bi),e};var hl={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(un,function(){return function(n,a){a.prototype.weekday=function(v){var p=this.$locale().weekStart||0,f=this.$W,m=(f<p?f+7:f)-p;return this.$utils().u(v)?m:this.subtract(m,"day").add(v,"day")}}})})(hl);var Bd=hl.exports;const Fd=qt(Bd);var fl={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(un,function(){return function(n,a,v){var p=a.prototype,f=function(o){return o&&(o.indexOf?o:o.s)},m=function(o,l,s,r,u){var d=o.name?o:o.$locale(),g=f(d[l]),y=f(d[s]),x=g||y.map(function(b){return b.slice(0,r)});if(!u)return x;var C=d.weekStart;return x.map(function(b,w){return x[(w+(C||0))%7]})},c=function(){return v.Ls[v.locale()]},h=function(o,l){return o.formats[l]||function(s){return s.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(r,u,d){return u||d.slice(1)})}(o.formats[l.toUpperCase()])},i=function(){var o=this;return{months:function(l){return l?l.format("MMMM"):m(o,"months")},monthsShort:function(l){return l?l.format("MMM"):m(o,"monthsShort","months",3)},firstDayOfWeek:function(){return o.$locale().weekStart||0},weekdays:function(l){return l?l.format("dddd"):m(o,"weekdays")},weekdaysMin:function(l){return l?l.format("dd"):m(o,"weekdaysMin","weekdays",2)},weekdaysShort:function(l){return l?l.format("ddd"):m(o,"weekdaysShort","weekdays",3)},longDateFormat:function(l){return h(o.$locale(),l)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};p.localeData=function(){return i.bind(this)()},v.localeData=function(){var o=c();return{firstDayOfWeek:function(){return o.weekStart||0},weekdays:function(){return v.weekdays()},weekdaysShort:function(){return v.weekdaysShort()},weekdaysMin:function(){return v.weekdaysMin()},months:function(){return v.months()},monthsShort:function(){return v.monthsShort()},longDateFormat:function(l){return h(o,l)},meridiem:o.meridiem,ordinal:o.ordinal}},v.months=function(){return m(c(),"months")},v.monthsShort=function(){return m(c(),"monthsShort","months",3)},v.weekdays=function(o){return m(c(),"weekdays",null,null,o)},v.weekdaysShort=function(o){return m(c(),"weekdaysShort","weekdays",3,o)},v.weekdaysMin=function(o){return m(c(),"weekdaysMin","weekdays",2,o)}}})})(fl);var Hd=fl.exports;const zd=qt(Hd);var pl={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(un,function(){var n="week",a="year";return function(v,p,f){var m=p.prototype;m.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var h=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var i=f(this).startOf(a).add(1,a).date(h),o=f(this).endOf(n);if(i.isBefore(o))return 1}var l=f(this).startOf(a).date(h).startOf(n).subtract(1,"millisecond"),s=this.diff(l,n,!0);return s<0?f(this).startOf("week").week():Math.ceil(s)},m.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(pl);var Wd=pl.exports;const Vd=qt(Wd);var gl={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(un,function(){return function(n,a){a.prototype.weekYear=function(){var v=this.month(),p=this.week(),f=this.year();return p===1&&v===11?f+1:v===0&&p>=52?f-1:f}}})})(gl);var jd=gl.exports;const Ud=qt(jd);var ml={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(un,function(){var n="month",a="quarter";return function(v,p){var f=p.prototype;f.quarter=function(h){return this.$utils().u(h)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(h-1))};var m=f.add;f.add=function(h,i){return h=Number(h),this.$utils().p(i)===a?this.add(3*h,n):m.bind(this)(h,i)};var c=f.startOf;f.startOf=function(h,i){var o=this.$utils(),l=!!o.u(i)||i;if(o.p(h)===a){var s=this.quarter()-1;return l?this.month(3*s).startOf(n).startOf("day"):this.month(3*s+2).endOf(n).endOf("day")}return c.bind(this)(h,i)}}})})(ml);var Gd=ml.exports;const Yd=qt(Gd);var vl={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(un,function(){return function(n,a){var v=a.prototype,p=v.format;v.format=function(f){var m=this,c=this.$locale();if(!this.isValid())return p.bind(this)(f);var h=this.$utils(),i=(f||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(o){switch(o){case"Q":return Math.ceil((m.$M+1)/3);case"Do":return c.ordinal(m.$D);case"gggg":return m.weekYear();case"GGGG":return m.isoWeekYear();case"wo":return c.ordinal(m.week(),"W");case"w":case"ww":return h.s(m.week(),o==="w"?1:2,"0");case"W":case"WW":return h.s(m.isoWeek(),o==="W"?1:2,"0");case"k":case"kk":return h.s(String(m.$H===0?24:m.$H),o==="k"?1:2,"0");case"X":return Math.floor(m.$d.getTime()/1e3);case"x":return m.$d.getTime();case"z":return"["+m.offsetName()+"]";case"zzz":return"["+m.offsetName("long")+"]";default:return o}});return p.bind(this)(i)}}})})(vl);var Zd=vl.exports;const Kd=qt(Zd);var yl={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(un,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,v=/\d/,p=/\d\d/,f=/\d\d?/,m=/\d*[^-_:/,()\s\d]+/,c={},h=function(d){return(d=+d)+(d>68?1900:2e3)},i=function(d){return function(g){this[d]=+g}},o=[/[+-]\d\d:?(\d\d)?|Z/,function(d){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var y=g.match(/([+-]|\d\d)/g),x=60*y[1]+(+y[2]||0);return x===0?0:y[0]==="+"?-x:x}(d)}],l=function(d){var g=c[d];return g&&(g.indexOf?g:g.s.concat(g.f))},s=function(d,g){var y,x=c.meridiem;if(x){for(var C=1;C<=24;C+=1)if(d.indexOf(x(C,0,g))>-1){y=C>12;break}}else y=d===(g?"pm":"PM");return y},r={A:[m,function(d){this.afternoon=s(d,!1)}],a:[m,function(d){this.afternoon=s(d,!0)}],Q:[v,function(d){this.month=3*(d-1)+1}],S:[v,function(d){this.milliseconds=100*+d}],SS:[p,function(d){this.milliseconds=10*+d}],SSS:[/\d{3}/,function(d){this.milliseconds=+d}],s:[f,i("seconds")],ss:[f,i("seconds")],m:[f,i("minutes")],mm:[f,i("minutes")],H:[f,i("hours")],h:[f,i("hours")],HH:[f,i("hours")],hh:[f,i("hours")],D:[f,i("day")],DD:[p,i("day")],Do:[m,function(d){var g=c.ordinal,y=d.match(/\d+/);if(this.day=y[0],g)for(var x=1;x<=31;x+=1)g(x).replace(/\[|\]/g,"")===d&&(this.day=x)}],w:[f,i("week")],ww:[p,i("week")],M:[f,i("month")],MM:[p,i("month")],MMM:[m,function(d){var g=l("months"),y=(l("monthsShort")||g.map(function(x){return x.slice(0,3)})).indexOf(d)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[m,function(d){var g=l("months").indexOf(d)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,i("year")],YY:[p,function(d){this.year=h(d)}],YYYY:[/\d{4}/,i("year")],Z:o,ZZ:o};function u(d){var g,y;g=d,y=c&&c.formats;for(var x=(d=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(k,A,S){var M=S&&S.toUpperCase();return A||y[S]||n[S]||y[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function($,L,T){return L||T.slice(1)})})).match(a),C=x.length,b=0;b<C;b+=1){var w=x[b],_=r[w],I=_&&_[0],E=_&&_[1];x[b]=E?{regex:I,parser:E}:w.replace(/^\[|\]$/g,"")}return function(k){for(var A={},S=0,M=0;S<C;S+=1){var $=x[S];if(typeof $=="string")M+=$.length;else{var L=$.regex,T=$.parser,R=k.slice(M),P=L.exec(R)[0];T.call(A,P),k=k.replace(P,"")}}return function(F){var O=F.afternoon;if(O!==void 0){var N=F.hours;O?N<12&&(F.hours+=12):N===12&&(F.hours=0),delete F.afternoon}}(A),A}}return function(d,g,y){y.p.customParseFormat=!0,d&&d.parseTwoDigitYear&&(h=d.parseTwoDigitYear);var x=g.prototype,C=x.parse;x.parse=function(b){var w=b.date,_=b.utc,I=b.args;this.$u=_;var E=I[1];if(typeof E=="string"){var k=I[2]===!0,A=I[3]===!0,S=k||A,M=I[2];A&&(M=I[2]),c=this.$locale(),!k&&M&&(c=y.Ls[M]),this.$d=function(R,P,F,O){try{if(["x","X"].indexOf(P)>-1)return new Date((P==="X"?1e3:1)*R);var N=u(P)(R),V=N.year,H=N.month,W=N.day,j=N.hours,Z=N.minutes,q=N.seconds,G=N.milliseconds,K=N.zone,ee=N.week,te=new Date,ae=W||(V||H?1:te.getDate()),de=V||te.getFullYear(),he=0;V&&!H||(he=H>0?H-1:te.getMonth());var re,ue=j||0,ne=Z||0,pe=q||0,Se=G||0;return K?new Date(Date.UTC(de,he,ae,ue,ne,pe,Se+60*K.offset*1e3)):F?new Date(Date.UTC(de,he,ae,ue,ne,pe,Se)):(re=new Date(de,he,ae,ue,ne,pe,Se),ee&&(re=O(re).week(ee).toDate()),re)}catch{return new Date("")}}(w,E,_,y),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),S&&w!=this.format(E)&&(this.$d=new Date("")),c={}}else if(E instanceof Array)for(var $=E.length,L=1;L<=$;L+=1){I[1]=E[L-1];var T=y.apply(this,I);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}L===$&&(this.$d=new Date(""))}else C.call(this,b)}}})})(yl);var Xd=yl.exports;const Qd=qt(Xd);mt.extend(Qd);mt.extend(Kd);mt.extend(Fd);mt.extend(zd);mt.extend(Vd);mt.extend(Ud);mt.extend(Yd);mt.extend((e,t)=>{const n=t.prototype,a=n.format;n.format=function(p){const f=(p||"").replace("Wo","wo");return a.bind(this)(f)}});const Jd={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},En=e=>Jd[e]||e.split("_")[0],La=()=>{Pu(!1,"Not match any format. Please help to fire a issue about this.")},qd=/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;function Ea(e,t,n){const a=[...new Set(e.split(n))];let v=0;for(let p=0;p<a.length;p++){const f=a[p];if(v+=f.length,v>t)return f;v+=n.length}}const Ia=(e,t)=>{if(!e)return null;if(mt.isDayjs(e))return e;const n=t.matchAll(qd);let a=mt(e,t);if(n===null)return a;for(const v of n){const p=v[0],f=v.index;if(p==="Q"){const m=e.slice(f-1,f),c=Ea(e,f,m).match(/\d+/)[0];a=a.quarter(parseInt(c))}if(p.toLowerCase()==="wo"){const m=e.slice(f-1,f),c=Ea(e,f,m).match(/\d+/)[0];a=a.week(parseInt(c))}p.toLowerCase()==="ww"&&(a=a.week(parseInt(e.slice(f,f+p.length)))),p.toLowerCase()==="w"&&(a=a.week(parseInt(e.slice(f,f+p.length+1))))}return a},eh={getNow:()=>mt(),getFixedDate:e=>mt(e,["YYYY-M-DD","YYYY-MM-DD"]),getEndDate:e=>e.endOf("month"),getWeekDay:e=>{const t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:e=>e.year(),getMonth:e=>e.month(),getDate:e=>e.date(),getHour:e=>e.hour(),getMinute:e=>e.minute(),getSecond:e=>e.second(),addYear:(e,t)=>e.add(t,"year"),addMonth:(e,t)=>e.add(t,"month"),addDate:(e,t)=>e.add(t,"day"),setYear:(e,t)=>e.year(t),setMonth:(e,t)=>e.month(t),setDate:(e,t)=>e.date(t),setHour:(e,t)=>e.hour(t),setMinute:(e,t)=>e.minute(t),setSecond:(e,t)=>e.second(t),isAfter:(e,t)=>e.isAfter(t),isValidate:e=>e.isValid(),locale:{getWeekFirstDay:e=>mt().locale(En(e)).localeData().firstDayOfWeek(),getWeekFirstDate:(e,t)=>t.locale(En(e)).weekday(0),getWeek:(e,t)=>t.locale(En(e)).week(),getShortWeekDays:e=>mt().locale(En(e)).localeData().weekdaysMin(),getShortMonths:e=>mt().locale(En(e)).localeData().monthsShort(),format:(e,t,n)=>t.locale(En(e)).format(n),parse:(e,t,n)=>{const a=En(e);for(let v=0;v<n.length;v+=1){const p=n[v],f=t;if(p.includes("wo")||p.includes("Wo")){const c=f.split("-")[0],h=f.split("-")[1],i=mt(c,"YYYY").startOf("year").locale(a);for(let o=0;o<=52;o+=1){const l=i.add(o,"week");if(l.format("Wo")===h)return l}return La(),null}const m=mt(f,p,!0).locale(a);if(m.isValid())return m}return t||La(),null}},toDate:(e,t)=>Array.isArray(e)?e.map(n=>Ia(n,t)):Ia(e,t),toString:(e,t)=>Array.isArray(e)?e.map(n=>mt.isDayjs(n)?n.format(t):n):mt.isDayjs(e)?e.format(t):e},th=eh;function gt(e){const t=Yc();return J(J({},e),t)}const wl=Symbol("PanelContextProps"),vr=e=>{Qt(wl,e)},tn=()=>Lt(wl,{}),Do={visibility:"hidden"};function An(e,t){let{slots:n}=t;var a;const v=gt(e),{prefixCls:p,prevIcon:f="‹",nextIcon:m="›",superPrevIcon:c="«",superNextIcon:h="»",onSuperPrev:i,onSuperNext:o,onPrev:l,onNext:s}=v,{hideNextBtn:r,hidePrevBtn:u}=tn();return D("div",{class:p},[i&&D("button",{type:"button",onClick:i,tabindex:-1,class:`${p}-super-prev-btn`,style:u.value?Do:{}},[c]),l&&D("button",{type:"button",onClick:l,tabindex:-1,class:`${p}-prev-btn`,style:u.value?Do:{}},[f]),D("div",{class:`${p}-view`},[(a=n.default)===null||a===void 0?void 0:a.call(n)]),s&&D("button",{type:"button",onClick:s,tabindex:-1,class:`${p}-next-btn`,style:r.value?Do:{}},[m]),o&&D("button",{type:"button",onClick:o,tabindex:-1,class:`${p}-super-next-btn`,style:r.value?Do:{}},[h])])}An.displayName="Header";An.inheritAttrs=!1;function yr(e){const t=gt(e),{prefixCls:n,generateConfig:a,viewDate:v,onPrevDecades:p,onNextDecades:f}=t,{hideHeader:m}=tn();if(m)return null;const c=`${n}-header`,h=a.getYear(v),i=Math.floor(h/an)*an,o=i+an-1;return D(An,oe(oe({},t),{},{prefixCls:c,onSuperPrev:p,onSuperNext:f}),{default:()=>[i,ve("-"),o]})}yr.displayName="DecadeHeader";yr.inheritAttrs=!1;function bl(e,t,n,a,v){let p=e.setHour(t,n);return p=e.setMinute(p,a),p=e.setSecond(p,v),p}function jo(e,t,n){if(!n)return t;let a=t;return a=e.setHour(a,e.getHour(n)),a=e.setMinute(a,e.getMinute(n)),a=e.setSecond(a,e.getSecond(n)),a}function nh(e,t,n,a,v,p){const f=Math.floor(e/a)*a;if(f<e)return[f,60-v,60-p];const m=Math.floor(t/v)*v;if(m<t)return[f,m,60-p];const c=Math.floor(n/p)*p;return[f,m,c]}function oh(e,t){const n=e.getYear(t),a=e.getMonth(t)+1,v=e.getEndDate(e.getFixedDate(`${n}-${a}-01`)),p=e.getDate(v),f=a<10?`0${a}`:`${a}`;return`${n}-${f}-${p}`}function Wn(e){const{prefixCls:t,disabledDate:n,onSelect:a,picker:v,rowNum:p,colNum:f,prefixColumn:m,rowClassName:c,baseDate:h,getCellClassName:i,getCellText:o,getCellNode:l,getCellDate:s,generateConfig:r,titleCell:u,headerCells:d}=gt(e),{onDateMouseenter:g,onDateMouseleave:y,mode:x}=tn(),C=`${t}-cell`,b=[];for(let w=0;w<p;w+=1){const _=[];let I;for(let E=0;E<f;E+=1){const k=w*f+E,A=s(h,k),S=Wi({cellDate:A,mode:x.value,disabledDate:n,generateConfig:r});E===0&&(I=A,m&&_.push(m(I)));const M=u&&u(A);_.push(D("td",{key:E,title:M,class:Ie(C,J({[`${C}-disabled`]:S,[`${C}-start`]:o(A)===1||v==="year"&&Number(M)%10===0,[`${C}-end`]:M===oh(r,A)||v==="year"&&Number(M)%10===9},i(A))),onClick:$=>{$.stopPropagation(),S||a(A)},onMouseenter:()=>{!S&&g&&g(A)},onMouseleave:()=>{!S&&y&&y(A)}},[l?l(A):D("div",{class:`${C}-inner`},[o(A)])]))}b.push(D("tr",{key:w,class:c&&c(I)},[_]))}return D("div",{class:`${t}-body`},[D("table",{class:`${t}-content`},[d&&D("thead",null,[D("tr",null,[d])]),D("tbody",null,[b])])])}Wn.displayName="PanelBody";Wn.inheritAttrs=!1;const Fi=3,Ta=4;function wr(e){const t=gt(e),n=jt-1,{prefixCls:a,viewDate:v,generateConfig:p}=t,f=`${a}-cell`,m=p.getYear(v),c=Math.floor(m/jt)*jt,h=Math.floor(m/an)*an,i=h+an-1,o=p.setYear(v,h-Math.ceil((Fi*Ta*jt-an)/2)),l=s=>{const r=p.getYear(s),u=r+n;return{[`${f}-in-view`]:h<=r&&u<=i,[`${f}-selected`]:r===c}};return D(Wn,oe(oe({},t),{},{rowNum:Ta,colNum:Fi,baseDate:o,getCellText:s=>{const r=p.getYear(s);return`${r}-${r+n}`},getCellClassName:l,getCellDate:(s,r)=>p.addYear(s,r*jt)}),null)}wr.displayName="DecadeBody";wr.inheritAttrs=!1;const Ro=new Map;function ih(e,t){let n;function a(){Nu(e)?t():n=At(()=>{a()})}return a(),()=>{At.cancel(n)}}function Hi(e,t,n){if(Ro.get(e)&&At.cancel(Ro.get(e)),n<=0){Ro.set(e,At(()=>{e.scrollTop=t}));return}const v=(t-e.scrollTop)/n*10;Ro.set(e,At(()=>{e.scrollTop+=v,e.scrollTop!==t&&Hi(e,t,n-10)}))}function io(e,t){let{onLeftRight:n,onCtrlLeftRight:a,onUpDown:v,onPageUpDown:p,onEnter:f}=t;const{which:m,ctrlKey:c,metaKey:h}=e;switch(m){case ze.LEFT:if(c||h){if(a)return a(-1),!0}else if(n)return n(-1),!0;break;case ze.RIGHT:if(c||h){if(a)return a(1),!0}else if(n)return n(1),!0;break;case ze.UP:if(v)return v(-1),!0;break;case ze.DOWN:if(v)return v(1),!0;break;case ze.PAGE_UP:if(p)return p(-1),!0;break;case ze.PAGE_DOWN:if(p)return p(1),!0;break;case ze.ENTER:if(f)return f(),!0;break}return!1}function Cl(e,t,n,a){let v=e;if(!v)switch(t){case"time":v=a?"hh:mm:ss a":"HH:mm:ss";break;case"week":v="gggg-wo";break;case"month":v="YYYY-MM";break;case"quarter":v="YYYY-[Q]Q";break;case"year":v="YYYY";break;default:v=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return v}function xl(e,t,n){const a=e==="time"?8:10,v=typeof t=="function"?t(n.getNow()).length:t.length;return Math.max(a,v)+2}let fo=null;const Po=new Set;function rh(e){return!fo&&typeof window<"u"&&window.addEventListener&&(fo=t=>{[...Po].forEach(n=>{n(t)})},window.addEventListener("mousedown",fo)),Po.add(e),()=>{Po.delete(e),Po.size===0&&(window.removeEventListener("mousedown",fo),fo=null)}}function ah(e){var t;const n=e.target;return e.composed&&n.shadowRoot&&((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||n}const sh=e=>e==="month"||e==="date"?"year":e,lh=e=>e==="date"?"month":e,ch=e=>e==="month"||e==="date"?"quarter":e,uh=e=>e==="date"?"week":e,dh={year:sh,month:lh,quarter:ch,week:uh,time:null,date:null};function $l(e,t){return e.some(n=>n&&n.contains(t))}const jt=10,an=jt*10;function br(e){const t=gt(e),{prefixCls:n,onViewDateChange:a,generateConfig:v,viewDate:p,operationRef:f,onSelect:m,onPanelChange:c}=t,h=`${n}-decade-panel`;f.value={onKeydown:l=>io(l,{onLeftRight:s=>{m(v.addYear(p,s*jt),"key")},onCtrlLeftRight:s=>{m(v.addYear(p,s*an),"key")},onUpDown:s=>{m(v.addYear(p,s*jt*Fi),"key")},onEnter:()=>{c("year",p)}})};const i=l=>{const s=v.addYear(p,l*an);a(s),c(null,s)},o=l=>{m(l,"mouse"),c("year",l)};return D("div",{class:h},[D(yr,oe(oe({},t),{},{prefixCls:n,onPrevDecades:()=>{i(-1)},onNextDecades:()=>{i(1)}}),null),D(wr,oe(oe({},t),{},{prefixCls:n,onSelect:o}),null)])}br.displayName="DecadePanel";br.inheritAttrs=!1;const Uo=7;function Vn(e,t){if(!e&&!t)return!0;if(!e||!t)return!1}function hh(e,t,n){const a=Vn(t,n);if(typeof a=="boolean")return a;const v=Math.floor(e.getYear(t)/10),p=Math.floor(e.getYear(n)/10);return v===p}function ti(e,t,n){const a=Vn(t,n);return typeof a=="boolean"?a:e.getYear(t)===e.getYear(n)}function zi(e,t){return Math.floor(e.getMonth(t)/3)+1}function Sl(e,t,n){const a=Vn(t,n);return typeof a=="boolean"?a:ti(e,t,n)&&zi(e,t)===zi(e,n)}function Cr(e,t,n){const a=Vn(t,n);return typeof a=="boolean"?a:ti(e,t,n)&&e.getMonth(t)===e.getMonth(n)}function sn(e,t,n){const a=Vn(t,n);return typeof a=="boolean"?a:e.getYear(t)===e.getYear(n)&&e.getMonth(t)===e.getMonth(n)&&e.getDate(t)===e.getDate(n)}function fh(e,t,n){const a=Vn(t,n);return typeof a=="boolean"?a:e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)}function kl(e,t,n,a){const v=Vn(n,a);return typeof v=="boolean"?v:e.locale.getWeek(t,n)===e.locale.getWeek(t,a)}function Qn(e,t,n){return sn(e,t,n)&&fh(e,t,n)}function No(e,t,n,a){return!t||!n||!a?!1:!sn(e,t,a)&&!sn(e,n,a)&&e.isAfter(a,t)&&e.isAfter(n,a)}function ph(e,t,n){const a=t.locale.getWeekFirstDay(e),v=t.setDate(n,1),p=t.getWeekDay(v);let f=t.addDate(v,a-p);return t.getMonth(f)===t.getMonth(n)&&t.getDate(f)>1&&(f=t.addDate(f,-7)),f}function wo(e,t,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(t){case"year":return n.addYear(e,a*10);case"quarter":case"month":return n.addYear(e,a);default:return n.addMonth(e,a)}}function _t(e,t){let{generateConfig:n,locale:a,format:v}=t;return typeof v=="function"?v(e):n.locale.format(a.locale,e,v)}function _l(e,t){let{generateConfig:n,locale:a,formatList:v}=t;return!e||typeof v[0]=="function"?null:n.locale.parse(a.locale,e,v)}function Wi(e){let{cellDate:t,mode:n,disabledDate:a,generateConfig:v}=e;if(!a)return!1;const p=(f,m,c)=>{let h=m;for(;h<=c;){let i;switch(f){case"date":{if(i=v.setDate(t,h),!a(i))return!1;break}case"month":{if(i=v.setMonth(t,h),!Wi({cellDate:i,mode:"month",generateConfig:v,disabledDate:a}))return!1;break}case"year":{if(i=v.setYear(t,h),!Wi({cellDate:i,mode:"year",generateConfig:v,disabledDate:a}))return!1;break}}h+=1}return!0};switch(n){case"date":case"week":return a(t);case"month":{const m=v.getDate(v.getEndDate(t));return p("date",1,m)}case"quarter":{const f=Math.floor(v.getMonth(t)/3)*3,m=f+2;return p("month",f,m)}case"year":return p("month",0,11);case"decade":{const f=v.getYear(t),m=Math.floor(f/jt)*jt,c=m+jt-1;return p("year",m,c)}}}function xr(e){const t=gt(e),{hideHeader:n}=tn();if(n.value)return null;const{prefixCls:a,generateConfig:v,locale:p,value:f,format:m}=t,c=`${a}-header`;return D(An,{prefixCls:c},{default:()=>[f?_t(f,{locale:p,format:m,generateConfig:v}):" "]})}xr.displayName="TimeHeader";xr.inheritAttrs=!1;const Oo=ce({name:"TimeUnitColumn",props:["prefixCls","units","onSelect","value","active","hideDisabledOptions"],setup(e){const{open:t}=tn(),n=Qe(null),a=Y(new Map),v=Y();return me(()=>e.value,()=>{const p=a.value.get(e.value);p&&t.value!==!1&&Hi(n.value,p.offsetTop,120)}),_n(()=>{var p;(p=v.value)===null||p===void 0||p.call(v)}),me(t,()=>{var p;(p=v.value)===null||p===void 0||p.call(v),bt(()=>{if(t.value){const f=a.value.get(e.value);f&&(v.value=ih(f,()=>{Hi(n.value,f.offsetTop,0)}))}})},{immediate:!0,flush:"post"}),()=>{const{prefixCls:p,units:f,onSelect:m,value:c,active:h,hideDisabledOptions:i}=e,o=`${p}-cell`;return D("ul",{class:Ie(`${p}-column`,{[`${p}-column-active`]:h}),ref:n,style:{position:"relative"}},[f.map(l=>i&&l.disabled?null:D("li",{key:l.value,ref:s=>{a.value.set(l.value,s)},class:Ie(o,{[`${o}-disabled`]:l.disabled,[`${o}-selected`]:c===l.value}),onClick:()=>{l.disabled||m(l.value)}},[D("div",{class:`${o}-inner`},[l.label])]))])}}});function Ml(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",a=String(e);for(;a.length<t;)a=`${n}${e}`;return a}const gh=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t};function Al(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ll(e){const t={};return Object.keys(e).forEach(n=>{(n.startsWith("data-")||n.startsWith("aria-")||n==="role"||n==="name")&&!n.startsWith("data-__")&&(t[n]=e[n])}),t}function Ge(e,t){return e?e[t]:null}function Ht(e,t,n){const a=[Ge(e,0),Ge(e,1)];return a[n]=typeof t=="function"?t(a[n]):t,!a[0]&&!a[1]?null:a}function mi(e,t,n,a){const v=[];for(let p=e;p<=t;p+=n)v.push({label:Ml(p,2),value:p,disabled:(a||[]).includes(p)});return v}const mh=ce({compatConfig:{MODE:3},name:"TimeBody",inheritAttrs:!1,props:["generateConfig","prefixCls","operationRef","activeColumnIndex","value","showHour","showMinute","showSecond","use12Hours","hourStep","minuteStep","secondStep","disabledHours","disabledMinutes","disabledSeconds","disabledTime","hideDisabledOptions","onSelect"],setup(e){const t=le(()=>e.value?e.generateConfig.getHour(e.value):-1),n=le(()=>e.use12Hours?t.value>=12:!1),a=le(()=>e.use12Hours?t.value%12:t.value),v=le(()=>e.value?e.generateConfig.getMinute(e.value):-1),p=le(()=>e.value?e.generateConfig.getSecond(e.value):-1),f=Y(e.generateConfig.getNow()),m=Y(),c=Y(),h=Y();Zc(()=>{f.value=e.generateConfig.getNow()}),ko(()=>{if(e.disabledTime){const d=e.disabledTime(f);[m.value,c.value,h.value]=[d.disabledHours,d.disabledMinutes,d.disabledSeconds]}else[m.value,c.value,h.value]=[e.disabledHours,e.disabledMinutes,e.disabledSeconds]});const i=(d,g,y,x)=>{let C=e.value||e.generateConfig.getNow();const b=Math.max(0,g),w=Math.max(0,y),_=Math.max(0,x);return C=bl(e.generateConfig,C,!e.use12Hours||!d?b:b+12,w,_),C},o=le(()=>{var d;return mi(0,23,(d=e.hourStep)!==null&&d!==void 0?d:1,m.value&&m.value())}),l=le(()=>{if(!e.use12Hours)return[!1,!1];const d=[!0,!0];return o.value.forEach(g=>{let{disabled:y,value:x}=g;y||(x>=12?d[1]=!1:d[0]=!1)}),d}),s=le(()=>e.use12Hours?o.value.filter(n.value?d=>d.value>=12:d=>d.value<12).map(d=>{const g=d.value%12,y=g===0?"12":Ml(g,2);return J(J({},d),{label:y,value:g})}):o.value),r=le(()=>{var d;return mi(0,59,(d=e.minuteStep)!==null&&d!==void 0?d:1,c.value&&c.value(t.value))}),u=le(()=>{var d;return mi(0,59,(d=e.secondStep)!==null&&d!==void 0?d:1,h.value&&h.value(t.value,v.value))});return()=>{const{prefixCls:d,operationRef:g,activeColumnIndex:y,showHour:x,showMinute:C,showSecond:b,use12Hours:w,hideDisabledOptions:_,onSelect:I}=e,E=[],k=`${d}-content`,A=`${d}-time-panel`;g.value={onUpDown:$=>{const L=E[y];if(L){const T=L.units.findIndex(P=>P.value===L.value),R=L.units.length;for(let P=1;P<R;P+=1){const F=L.units[(T+$*P+R)%R];if(F.disabled!==!0){L.onSelect(F.value);break}}}}};function S($,L,T,R,P){$!==!1&&E.push({node:qn(L,{prefixCls:A,value:T,active:y===E.length,onSelect:P,units:R,hideDisabledOptions:_}),onSelect:P,value:T,units:R})}S(x,D(Oo,{key:"hour"},null),a.value,s.value,$=>{I(i(n.value,$,v.value,p.value),"mouse")}),S(C,D(Oo,{key:"minute"},null),v.value,r.value,$=>{I(i(n.value,a.value,$,p.value),"mouse")}),S(b,D(Oo,{key:"second"},null),p.value,u.value,$=>{I(i(n.value,a.value,v.value,$),"mouse")});let M=-1;return typeof n.value=="boolean"&&(M=n.value?1:0),S(w===!0,D(Oo,{key:"12hours"},null),M,[{label:"AM",value:0,disabled:l.value[0]},{label:"PM",value:1,disabled:l.value[1]}],$=>{I(i(!!$,a.value,v.value,p.value),"mouse")}),D("div",{class:k},[E.map($=>{let{node:L}=$;return L})])}}}),vh=mh,yh=e=>e.filter(t=>t!==!1).length;function ni(e){const t=gt(e),{generateConfig:n,format:a="HH:mm:ss",prefixCls:v,active:p,operationRef:f,showHour:m,showMinute:c,showSecond:h,use12Hours:i=!1,onSelect:o,value:l}=t,s=`${v}-time-panel`,r=Y(),u=Y(-1),d=yh([m,c,h,i]);return f.value={onKeydown:g=>io(g,{onLeftRight:y=>{u.value=(u.value+y+d)%d},onUpDown:y=>{u.value===-1?u.value=0:r.value&&r.value.onUpDown(y)},onEnter:()=>{o(l||n.getNow(),"key"),u.value=-1}}),onBlur:()=>{u.value=-1}},D("div",{class:Ie(s,{[`${s}-active`]:p})},[D(xr,oe(oe({},t),{},{format:a,prefixCls:v}),null),D(vh,oe(oe({},t),{},{prefixCls:v,activeColumnIndex:u.value,operationRef:r}),null)])}ni.displayName="TimePanel";ni.inheritAttrs=!1;function oi(e){let{cellPrefixCls:t,generateConfig:n,rangedValue:a,hoverRangedValue:v,isInView:p,isSameCell:f,offsetCell:m,today:c,value:h}=e;function i(o){const l=m(o,-1),s=m(o,1),r=Ge(a,0),u=Ge(a,1),d=Ge(v,0),g=Ge(v,1),y=No(n,d,g,o);function x(E){return f(r,E)}function C(E){return f(u,E)}const b=f(d,o),w=f(g,o),_=(y||w)&&(!p(l)||C(l)),I=(y||b)&&(!p(s)||x(s));return{[`${t}-in-view`]:p(o),[`${t}-in-range`]:No(n,r,u,o),[`${t}-range-start`]:x(o),[`${t}-range-end`]:C(o),[`${t}-range-start-single`]:x(o)&&!u,[`${t}-range-end-single`]:C(o)&&!r,[`${t}-range-start-near-hover`]:x(o)&&(f(l,d)||No(n,d,g,l)),[`${t}-range-end-near-hover`]:C(o)&&(f(s,g)||No(n,d,g,s)),[`${t}-range-hover`]:y,[`${t}-range-hover-start`]:b,[`${t}-range-hover-end`]:w,[`${t}-range-hover-edge-start`]:_,[`${t}-range-hover-edge-end`]:I,[`${t}-range-hover-edge-start-near-range`]:_&&f(l,u),[`${t}-range-hover-edge-end-near-range`]:I&&f(s,r),[`${t}-today`]:f(c,o),[`${t}-selected`]:f(h,o)}}return i}const El=Symbol("RangeContextProps"),wh=e=>{Qt(El,e)},Ao=()=>Lt(El,{rangedValue:Y(),hoverRangedValue:Y(),inRange:Y(),panelPosition:Y()}),bh=ce({compatConfig:{MODE:3},name:"PanelContextProvider",inheritAttrs:!1,props:{value:{type:Object,default:()=>({})}},setup(e,t){let{slots:n}=t;const a={rangedValue:Y(e.value.rangedValue),hoverRangedValue:Y(e.value.hoverRangedValue),inRange:Y(e.value.inRange),panelPosition:Y(e.value.panelPosition)};return wh(a),me(()=>e.value,()=>{Object.keys(e.value).forEach(v=>{a[v]&&(a[v].value=e.value[v])})}),()=>{var v;return(v=n.default)===null||v===void 0?void 0:v.call(n)}}});function ii(e){const t=gt(e),{prefixCls:n,generateConfig:a,prefixColumn:v,locale:p,rowCount:f,viewDate:m,value:c,dateRender:h}=t,{rangedValue:i,hoverRangedValue:o}=Ao(),l=ph(p.locale,a,m),s=`${n}-cell`,r=a.locale.getWeekFirstDay(p.locale),u=a.getNow(),d=[],g=p.shortWeekDays||(a.locale.getShortWeekDays?a.locale.getShortWeekDays(p.locale):[]);v&&d.push(D("th",{key:"empty","aria-label":"empty cell"},null));for(let C=0;C<Uo;C+=1)d.push(D("th",{key:C},[g[(C+r)%Uo]]));const y=oi({cellPrefixCls:s,today:u,value:c,generateConfig:a,rangedValue:v?null:i.value,hoverRangedValue:v?null:o.value,isSameCell:(C,b)=>sn(a,C,b),isInView:C=>Cr(a,C,m),offsetCell:(C,b)=>a.addDate(C,b)}),x=h?C=>h({current:C,today:u}):void 0;return D(Wn,oe(oe({},t),{},{rowNum:f,colNum:Uo,baseDate:l,getCellNode:x,getCellText:a.getDate,getCellClassName:y,getCellDate:a.addDate,titleCell:C=>_t(C,{locale:p,format:"YYYY-MM-DD",generateConfig:a}),headerCells:d}),null)}ii.displayName="DateBody";ii.inheritAttrs=!1;ii.props=["prefixCls","generateConfig","value?","viewDate","locale","rowCount","onSelect","dateRender?","disabledDate?","prefixColumn?","rowClassName?"];function $r(e){const t=gt(e),{prefixCls:n,generateConfig:a,locale:v,viewDate:p,onNextMonth:f,onPrevMonth:m,onNextYear:c,onPrevYear:h,onYearClick:i,onMonthClick:o}=t,{hideHeader:l}=tn();if(l.value)return null;const s=`${n}-header`,r=v.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(v.locale):[]),u=a.getMonth(p),d=D("button",{type:"button",key:"year",onClick:i,tabindex:-1,class:`${n}-year-btn`},[_t(p,{locale:v,format:v.yearFormat,generateConfig:a})]),g=D("button",{type:"button",key:"month",onClick:o,tabindex:-1,class:`${n}-month-btn`},[v.monthFormat?_t(p,{locale:v,format:v.monthFormat,generateConfig:a}):r[u]]),y=v.monthBeforeYear?[g,d]:[d,g];return D(An,oe(oe({},t),{},{prefixCls:s,onSuperPrev:h,onPrev:m,onNext:f,onSuperNext:c}),{default:()=>[y]})}$r.displayName="DateHeader";$r.inheritAttrs=!1;const Ch=6;function Lo(e){const t=gt(e),{prefixCls:n,panelName:a="date",keyboardConfig:v,active:p,operationRef:f,generateConfig:m,value:c,viewDate:h,onViewDateChange:i,onPanelChange:o,onSelect:l}=t,s=`${n}-${a}-panel`;f.value={onKeydown:d=>io(d,J({onLeftRight:g=>{l(m.addDate(c||h,g),"key")},onCtrlLeftRight:g=>{l(m.addYear(c||h,g),"key")},onUpDown:g=>{l(m.addDate(c||h,g*Uo),"key")},onPageUpDown:g=>{l(m.addMonth(c||h,g),"key")}},v))};const r=d=>{const g=m.addYear(h,d);i(g),o(null,g)},u=d=>{const g=m.addMonth(h,d);i(g),o(null,g)};return D("div",{class:Ie(s,{[`${s}-active`]:p})},[D($r,oe(oe({},t),{},{prefixCls:n,value:c,viewDate:h,onPrevYear:()=>{r(-1)},onNextYear:()=>{r(1)},onPrevMonth:()=>{u(-1)},onNextMonth:()=>{u(1)},onMonthClick:()=>{o("month",h)},onYearClick:()=>{o("year",h)}}),null),D(ii,oe(oe({},t),{},{onSelect:d=>l(d,"mouse"),prefixCls:n,value:c,viewDate:h,rowCount:Ch}),null)])}Lo.displayName="DatePanel";Lo.inheritAttrs=!1;const Da=gh("date","time");function Sr(e){const t=gt(e),{prefixCls:n,operationRef:a,generateConfig:v,value:p,defaultValue:f,disabledTime:m,showTime:c,onSelect:h}=t,i=`${n}-datetime-panel`,o=Y(null),l=Y({}),s=Y({}),r=typeof c=="object"?J({},c):{};function u(x){const C=Da.indexOf(o.value)+x;return Da[C]||null}const d=x=>{s.value.onBlur&&s.value.onBlur(x),o.value=null};a.value={onKeydown:x=>{if(x.which===ze.TAB){const C=u(x.shiftKey?-1:1);return o.value=C,C&&x.preventDefault(),!0}if(o.value){const C=o.value==="date"?l:s;return C.value&&C.value.onKeydown&&C.value.onKeydown(x),!0}return[ze.LEFT,ze.RIGHT,ze.UP,ze.DOWN].includes(x.which)?(o.value="date",!0):!1},onBlur:d,onClose:d};const g=(x,C)=>{let b=x;C==="date"&&!p&&r.defaultValue?(b=v.setHour(b,v.getHour(r.defaultValue)),b=v.setMinute(b,v.getMinute(r.defaultValue)),b=v.setSecond(b,v.getSecond(r.defaultValue))):C==="time"&&!p&&f&&(b=v.setYear(b,v.getYear(f)),b=v.setMonth(b,v.getMonth(f)),b=v.setDate(b,v.getDate(f))),h&&h(b,"mouse")},y=m?m(p||null):{};return D("div",{class:Ie(i,{[`${i}-active`]:o.value})},[D(Lo,oe(oe({},t),{},{operationRef:l,active:o.value==="date",onSelect:x=>{g(jo(v,x,!p&&typeof c=="object"?c.defaultValue:null),"date")}}),null),D(ni,oe(oe(oe(oe({},t),{},{format:void 0},r),y),{},{disabledTime:null,defaultValue:void 0,operationRef:s,active:o.value==="time",onSelect:x=>{g(x,"time")}}),null)])}Sr.displayName="DatetimePanel";Sr.inheritAttrs=!1;function kr(e){const t=gt(e),{prefixCls:n,generateConfig:a,locale:v,value:p}=t,f=`${n}-cell`,m=i=>D("td",{key:"week",class:Ie(f,`${f}-week`)},[a.locale.getWeek(v.locale,i)]),c=`${n}-week-panel-row`,h=i=>Ie(c,{[`${c}-selected`]:kl(a,v.locale,p,i)});return D(Lo,oe(oe({},t),{},{panelName:"week",prefixColumn:m,rowClassName:h,keyboardConfig:{onLeftRight:null}}),null)}kr.displayName="WeekPanel";kr.inheritAttrs=!1;function _r(e){const t=gt(e),{prefixCls:n,generateConfig:a,locale:v,viewDate:p,onNextYear:f,onPrevYear:m,onYearClick:c}=t,{hideHeader:h}=tn();if(h.value)return null;const i=`${n}-header`;return D(An,oe(oe({},t),{},{prefixCls:i,onSuperPrev:m,onSuperNext:f}),{default:()=>[D("button",{type:"button",onClick:c,class:`${n}-year-btn`},[_t(p,{locale:v,format:v.yearFormat,generateConfig:a})])]})}_r.displayName="MonthHeader";_r.inheritAttrs=!1;const Il=3,xh=4;function Mr(e){const t=gt(e),{prefixCls:n,locale:a,value:v,viewDate:p,generateConfig:f,monthCellRender:m}=t,{rangedValue:c,hoverRangedValue:h}=Ao(),i=`${n}-cell`,o=oi({cellPrefixCls:i,value:v,generateConfig:f,rangedValue:c.value,hoverRangedValue:h.value,isSameCell:(u,d)=>Cr(f,u,d),isInView:()=>!0,offsetCell:(u,d)=>f.addMonth(u,d)}),l=a.shortMonths||(f.locale.getShortMonths?f.locale.getShortMonths(a.locale):[]),s=f.setMonth(p,0),r=m?u=>m({current:u,locale:a}):void 0;return D(Wn,oe(oe({},t),{},{rowNum:xh,colNum:Il,baseDate:s,getCellNode:r,getCellText:u=>a.monthFormat?_t(u,{locale:a,format:a.monthFormat,generateConfig:f}):l[f.getMonth(u)],getCellClassName:o,getCellDate:f.addMonth,titleCell:u=>_t(u,{locale:a,format:"YYYY-MM",generateConfig:f})}),null)}Mr.displayName="MonthBody";Mr.inheritAttrs=!1;function Ar(e){const t=gt(e),{prefixCls:n,operationRef:a,onViewDateChange:v,generateConfig:p,value:f,viewDate:m,onPanelChange:c,onSelect:h}=t,i=`${n}-month-panel`;a.value={onKeydown:l=>io(l,{onLeftRight:s=>{h(p.addMonth(f||m,s),"key")},onCtrlLeftRight:s=>{h(p.addYear(f||m,s),"key")},onUpDown:s=>{h(p.addMonth(f||m,s*Il),"key")},onEnter:()=>{c("date",f||m)}})};const o=l=>{const s=p.addYear(m,l);v(s),c(null,s)};return D("div",{class:i},[D(_r,oe(oe({},t),{},{prefixCls:n,onPrevYear:()=>{o(-1)},onNextYear:()=>{o(1)},onYearClick:()=>{c("year",m)}}),null),D(Mr,oe(oe({},t),{},{prefixCls:n,onSelect:l=>{h(l,"mouse"),c("date",l)}}),null)])}Ar.displayName="MonthPanel";Ar.inheritAttrs=!1;function Lr(e){const t=gt(e),{prefixCls:n,generateConfig:a,locale:v,viewDate:p,onNextYear:f,onPrevYear:m,onYearClick:c}=t,{hideHeader:h}=tn();if(h.value)return null;const i=`${n}-header`;return D(An,oe(oe({},t),{},{prefixCls:i,onSuperPrev:m,onSuperNext:f}),{default:()=>[D("button",{type:"button",onClick:c,class:`${n}-year-btn`},[_t(p,{locale:v,format:v.yearFormat,generateConfig:a})])]})}Lr.displayName="QuarterHeader";Lr.inheritAttrs=!1;const $h=4,Sh=1;function Er(e){const t=gt(e),{prefixCls:n,locale:a,value:v,viewDate:p,generateConfig:f}=t,{rangedValue:m,hoverRangedValue:c}=Ao(),h=`${n}-cell`,i=oi({cellPrefixCls:h,value:v,generateConfig:f,rangedValue:m.value,hoverRangedValue:c.value,isSameCell:(l,s)=>Sl(f,l,s),isInView:()=>!0,offsetCell:(l,s)=>f.addMonth(l,s*3)}),o=f.setDate(f.setMonth(p,0),1);return D(Wn,oe(oe({},t),{},{rowNum:Sh,colNum:$h,baseDate:o,getCellText:l=>_t(l,{locale:a,format:a.quarterFormat||"[Q]Q",generateConfig:f}),getCellClassName:i,getCellDate:(l,s)=>f.addMonth(l,s*3),titleCell:l=>_t(l,{locale:a,format:"YYYY-[Q]Q",generateConfig:f})}),null)}Er.displayName="QuarterBody";Er.inheritAttrs=!1;function Ir(e){const t=gt(e),{prefixCls:n,operationRef:a,onViewDateChange:v,generateConfig:p,value:f,viewDate:m,onPanelChange:c,onSelect:h}=t,i=`${n}-quarter-panel`;a.value={onKeydown:l=>io(l,{onLeftRight:s=>{h(p.addMonth(f||m,s*3),"key")},onCtrlLeftRight:s=>{h(p.addYear(f||m,s),"key")},onUpDown:s=>{h(p.addYear(f||m,s),"key")}})};const o=l=>{const s=p.addYear(m,l);v(s),c(null,s)};return D("div",{class:i},[D(Lr,oe(oe({},t),{},{prefixCls:n,onPrevYear:()=>{o(-1)},onNextYear:()=>{o(1)},onYearClick:()=>{c("year",m)}}),null),D(Er,oe(oe({},t),{},{prefixCls:n,onSelect:l=>{h(l,"mouse")}}),null)])}Ir.displayName="QuarterPanel";Ir.inheritAttrs=!1;function Tr(e){const t=gt(e),{prefixCls:n,generateConfig:a,viewDate:v,onPrevDecade:p,onNextDecade:f,onDecadeClick:m}=t,{hideHeader:c}=tn();if(c.value)return null;const h=`${n}-header`,i=a.getYear(v),o=Math.floor(i/xn)*xn,l=o+xn-1;return D(An,oe(oe({},t),{},{prefixCls:h,onSuperPrev:p,onSuperNext:f}),{default:()=>[D("button",{type:"button",onClick:m,class:`${n}-decade-btn`},[o,ve("-"),l])]})}Tr.displayName="YearHeader";Tr.inheritAttrs=!1;const Vi=3,Ra=4;function Dr(e){const t=gt(e),{prefixCls:n,value:a,viewDate:v,locale:p,generateConfig:f}=t,{rangedValue:m,hoverRangedValue:c}=Ao(),h=`${n}-cell`,i=f.getYear(v),o=Math.floor(i/xn)*xn,l=o+xn-1,s=f.setYear(v,o-Math.ceil((Vi*Ra-xn)/2)),r=d=>{const g=f.getYear(d);return o<=g&&g<=l},u=oi({cellPrefixCls:h,value:a,generateConfig:f,rangedValue:m.value,hoverRangedValue:c.value,isSameCell:(d,g)=>ti(f,d,g),isInView:r,offsetCell:(d,g)=>f.addYear(d,g)});return D(Wn,oe(oe({},t),{},{rowNum:Ra,colNum:Vi,baseDate:s,getCellText:f.getYear,getCellClassName:u,getCellDate:f.addYear,titleCell:d=>_t(d,{locale:p,format:"YYYY",generateConfig:f})}),null)}Dr.displayName="YearBody";Dr.inheritAttrs=!1;const xn=10;function Rr(e){const t=gt(e),{prefixCls:n,operationRef:a,onViewDateChange:v,generateConfig:p,value:f,viewDate:m,sourceMode:c,onSelect:h,onPanelChange:i}=t,o=`${n}-year-panel`;a.value={onKeydown:s=>io(s,{onLeftRight:r=>{h(p.addYear(f||m,r),"key")},onCtrlLeftRight:r=>{h(p.addYear(f||m,r*xn),"key")},onUpDown:r=>{h(p.addYear(f||m,r*Vi),"key")},onEnter:()=>{i(c==="date"?"date":"month",f||m)}})};const l=s=>{const r=p.addYear(m,s*10);v(r),i(null,r)};return D("div",{class:o},[D(Tr,oe(oe({},t),{},{prefixCls:n,onPrevDecade:()=>{l(-1)},onNextDecade:()=>{l(1)},onDecadeClick:()=>{i("decade",m)}}),null),D(Dr,oe(oe({},t),{},{prefixCls:n,onSelect:s=>{i(c==="date"?"date":"month",s),h(s,"mouse")}}),null)])}Rr.displayName="YearPanel";Rr.inheritAttrs=!1;function Tl(e,t,n){return n?D("div",{class:`${e}-footer-extra`},[n(t)]):null}function Dl(e){let{prefixCls:t,components:n={},needConfirmButton:a,onNow:v,onOk:p,okDisabled:f,showNow:m,locale:c}=e,h,i;if(a){const o=n.button||"button";v&&m!==!1&&(h=D("li",{class:`${t}-now`},[D("a",{class:`${t}-now-btn`,onClick:v},[c.now])])),i=a&&D("li",{class:`${t}-ok`},[D(o,{disabled:f,onClick:l=>{l.stopPropagation(),p&&p()}},{default:()=>[c.ok]})])}return!h&&!i?null:D("ul",{class:`${t}-ranges`},[h,i])}function kh(){return ce({name:"PickerPanel",inheritAttrs:!1,props:{prefixCls:String,locale:Object,generateConfig:Object,value:Object,defaultValue:Object,pickerValue:Object,defaultPickerValue:Object,disabledDate:Function,mode:String,picker:{type:String,default:"date"},tabindex:{type:[Number,String],default:0},showNow:{type:Boolean,default:void 0},showTime:[Boolean,Object],showToday:Boolean,renderExtraFooter:Function,dateRender:Function,hideHeader:{type:Boolean,default:void 0},onSelect:Function,onChange:Function,onPanelChange:Function,onMousedown:Function,onPickerValueChange:Function,onOk:Function,components:Object,direction:String,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1}},setup(e,t){let{attrs:n}=t;const a=le(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),v=le(()=>24%e.hourStep===0),p=le(()=>60%e.minuteStep===0),f=le(()=>60%e.secondStep===0),m=tn(),{operationRef:c,onSelect:h,hideRanges:i,defaultOpenValue:o}=m,{inRange:l,panelPosition:s,rangedValue:r,hoverRangedValue:u}=Ao(),d=Y({}),[g,y]=zt(null,{value:ft(e,"value"),defaultValue:e.defaultValue,postState:R=>!R&&(o!=null&&o.value)&&e.picker==="time"?o.value:R}),[x,C]=zt(null,{value:ft(e,"pickerValue"),defaultValue:e.defaultPickerValue||g.value,postState:R=>{const{generateConfig:P,showTime:F,defaultValue:O}=e,N=P.getNow();return R?!g.value&&e.showTime?typeof F=="object"?jo(P,Array.isArray(R)?R[0]:R,F.defaultValue||N):O?jo(P,Array.isArray(R)?R[0]:R,O):jo(P,Array.isArray(R)?R[0]:R,N):R:N}}),b=R=>{C(R),e.onPickerValueChange&&e.onPickerValueChange(R)},w=R=>{const P=dh[e.picker];return P?P(R):R},[_,I]=zt(()=>e.picker==="time"?"time":w("date"),{value:ft(e,"mode")});me(()=>e.picker,()=>{I(e.picker)});const E=Y(_.value),k=R=>{E.value=R},A=(R,P)=>{const{onPanelChange:F,generateConfig:O}=e,N=w(R||_.value);k(_.value),I(N),F&&(_.value!==N||Qn(O,x.value,x.value))&&F(P,N)},S=function(R,P){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{picker:O,generateConfig:N,onSelect:V,onChange:H,disabledDate:W}=e;(_.value===O||F)&&(y(R),V&&V(R),h&&h(R,P),H&&!Qn(N,R,g.value)&&!(W!=null&&W(R))&&H(R))},M=R=>d.value&&d.value.onKeydown?([ze.LEFT,ze.RIGHT,ze.UP,ze.DOWN,ze.PAGE_UP,ze.PAGE_DOWN,ze.ENTER].includes(R.which)&&R.preventDefault(),d.value.onKeydown(R)):!1,$=R=>{d.value&&d.value.onBlur&&d.value.onBlur(R)},L=()=>{const{generateConfig:R,hourStep:P,minuteStep:F,secondStep:O}=e,N=R.getNow(),V=nh(R.getHour(N),R.getMinute(N),R.getSecond(N),v.value?P:1,p.value?F:1,f.value?O:1),H=bl(R,N,V[0],V[1],V[2]);S(H,"submit")},T=le(()=>{const{prefixCls:R,direction:P}=e;return Ie(`${R}-panel`,{[`${R}-panel-has-range`]:r&&r.value&&r.value[0]&&r.value[1],[`${R}-panel-has-range-hover`]:u&&u.value&&u.value[0]&&u.value[1],[`${R}-panel-rtl`]:P==="rtl"})});return vr(J(J({},m),{mode:_,hideHeader:le(()=>{var R;return e.hideHeader!==void 0?e.hideHeader:(R=m.hideHeader)===null||R===void 0?void 0:R.value}),hidePrevBtn:le(()=>l.value&&s.value==="right"),hideNextBtn:le(()=>l.value&&s.value==="left")})),me(()=>e.value,()=>{e.value&&C(e.value)}),()=>{const{prefixCls:R="ant-picker",locale:P,generateConfig:F,disabledDate:O,picker:N="date",tabindex:V=0,showNow:H,showTime:W,showToday:j,renderExtraFooter:Z,onMousedown:q,onOk:G,components:K}=e;c&&s.value!=="right"&&(c.value={onKeydown:M,onClose:()=>{d.value&&d.value.onClose&&d.value.onClose()}});let ee;const te=J(J(J({},n),e),{operationRef:d,prefixCls:R,viewDate:x.value,value:g.value,onViewDateChange:b,sourceMode:E.value,onPanelChange:A,disabledDate:O});switch(delete te.onChange,delete te.onSelect,_.value){case"decade":ee=D(br,oe(oe({},te),{},{onSelect:(re,ue)=>{b(re),S(re,ue)}}),null);break;case"year":ee=D(Rr,oe(oe({},te),{},{onSelect:(re,ue)=>{b(re),S(re,ue)}}),null);break;case"month":ee=D(Ar,oe(oe({},te),{},{onSelect:(re,ue)=>{b(re),S(re,ue)}}),null);break;case"quarter":ee=D(Ir,oe(oe({},te),{},{onSelect:(re,ue)=>{b(re),S(re,ue)}}),null);break;case"week":ee=D(kr,oe(oe({},te),{},{onSelect:(re,ue)=>{b(re),S(re,ue)}}),null);break;case"time":delete te.showTime,ee=D(ni,oe(oe(oe({},te),typeof W=="object"?W:null),{},{onSelect:(re,ue)=>{b(re),S(re,ue)}}),null);break;default:W?ee=D(Sr,oe(oe({},te),{},{onSelect:(re,ue)=>{b(re),S(re,ue)}}),null):ee=D(Lo,oe(oe({},te),{},{onSelect:(re,ue)=>{b(re),S(re,ue)}}),null)}let ae,de;i!=null&&i.value||(ae=Tl(R,_.value,Z),de=Dl({prefixCls:R,components:K,needConfirmButton:a.value,okDisabled:!g.value||O&&O(g.value),locale:P,showNow:H,onNow:a.value&&L,onOk:()=>{g.value&&(S(g.value,"submit",!0),G&&G(g.value))}}));let he;if(j&&_.value==="date"&&N==="date"&&!W){const re=F.getNow(),ue=`${R}-today-btn`,ne=O&&O(re);he=D("a",{class:Ie(ue,ne&&`${ue}-disabled`),"aria-disabled":ne,onClick:()=>{ne||S(re,"mouse",!0)}},[P.today])}return D("div",{tabindex:V,class:Ie(T.value,n.class),style:n.style,onKeydown:M,onBlur:$,onMousedown:q},[ee,ae||de||he?D("div",{class:`${R}-footer`},[ae,de,he]):null])}}})}const _h=kh(),Rl=e=>D(_h,e),Mh={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function Pl(e,t){let{slots:n}=t;const{prefixCls:a,popupStyle:v,visible:p,dropdownClassName:f,dropdownAlign:m,transitionName:c,getPopupContainer:h,range:i,popupPlacement:o,direction:l}=gt(e),s=`${a}-dropdown`;return D(Ou,{showAction:[],hideAction:[],popupPlacement:(()=>o!==void 0?o:l==="rtl"?"bottomRight":"bottomLeft")(),builtinPlacements:Mh,prefixCls:s,popupTransitionName:c,popupAlign:m,popupVisible:p,popupClassName:Ie(f,{[`${s}-range`]:i,[`${s}-rtl`]:l==="rtl"}),popupStyle:v,getPopupContainer:h},{default:n.default,popup:n.popupElement})}const Nl=ce({name:"PresetPanel",props:{prefixCls:String,presets:{type:Array,default:()=>[]},onClick:Function,onHover:Function},setup(e){return()=>e.presets.length?D("div",{class:`${e.prefixCls}-presets`},[D("ul",null,[e.presets.map((t,n)=>{let{label:a,value:v}=t;return D("li",{key:n,onClick:p=>{p.stopPropagation(),e.onClick(v)},onMouseenter:()=>{var p;(p=e.onHover)===null||p===void 0||p.call(e,v)},onMouseleave:()=>{var p;(p=e.onHover)===null||p===void 0||p.call(e,null)}},[a])})])]):null}});function ji(e){let{open:t,value:n,isClickOutside:a,triggerOpen:v,forwardKeydown:p,onKeydown:f,blurToCancel:m,onSubmit:c,onCancel:h,onFocus:i,onBlur:o}=e;const l=Qe(!1),s=Qe(!1),r=Qe(!1),u=Qe(!1),d=Qe(!1),g=le(()=>({onMousedown:()=>{l.value=!0,v(!0)},onKeydown:x=>{if(f(x,()=>{d.value=!0}),!d.value){switch(x.which){case ze.ENTER:{t.value?c()!==!1&&(l.value=!0):v(!0),x.preventDefault();return}case ze.TAB:{l.value&&t.value&&!x.shiftKey?(l.value=!1,x.preventDefault()):!l.value&&t.value&&!p(x)&&x.shiftKey&&(l.value=!0,x.preventDefault());return}case ze.ESC:{l.value=!0,h();return}}!t.value&&![ze.SHIFT].includes(x.which)?v(!0):l.value||p(x)}},onFocus:x=>{l.value=!0,s.value=!0,i&&i(x)},onBlur:x=>{if(r.value||!a(document.activeElement)){r.value=!1;return}m.value?setTimeout(()=>{let{activeElement:C}=document;for(;C&&C.shadowRoot;)C=C.shadowRoot.activeElement;a(C)&&h()},0):t.value&&(v(!1),u.value&&c()),s.value=!1,o&&o(x)}}));me(t,()=>{u.value=!1}),me(n,()=>{u.value=!0});const y=Qe();return ot(()=>{y.value=rh(x=>{const C=ah(x);if(t.value){const b=a(C);b?(!s.value||b)&&v(!1):(r.value=!0,At(()=>{r.value=!1}))}})}),_n(()=>{y.value&&y.value()}),[g,{focused:s,typing:l}]}function Ui(e){let{valueTexts:t,onTextChange:n}=e;const a=Y("");function v(f){a.value=f,n(f)}function p(){a.value=t.value[0]}return me(()=>[...t.value],function(f){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];f.join("||")!==m.join("||")&&t.value.every(c=>c!==a.value)&&p()},{immediate:!0}),[a,v,p]}function Ko(e,t){let{formatList:n,generateConfig:a,locale:v}=t;const p=id(()=>{if(!e.value)return[[""],""];let c="";const h=[];for(let i=0;i<n.value.length;i+=1){const o=n.value[i],l=_t(e.value,{generateConfig:a.value,locale:v.value,format:o});h.push(l),i===0&&(c=l)}return[h,c]},[e,n],(c,h)=>h[0]!==c[0]||!cd(h[1],c[1])),f=le(()=>p.value[0]),m=le(()=>p.value[1]);return[f,m]}function Gi(e,t){let{formatList:n,generateConfig:a,locale:v}=t;const p=Y(null);let f;function m(o){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(At.cancel(f),l){p.value=o;return}f=At(()=>{p.value=o})}const[,c]=Ko(p,{formatList:n,generateConfig:a,locale:v});function h(o){m(o)}function i(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;m(null,o)}return me(e,()=>{i(!0)}),_n(()=>{At.cancel(f)}),[c,h,i]}function Ol(e,t){return le(()=>e!=null&&e.value?e.value:t!=null&&t.value?(Bu(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.keys(t.value).map(a=>{const v=t.value[a],p=typeof v=="function"?v():v;return{label:a,value:p}})):[])}function Ah(){return ce({name:"Picker",inheritAttrs:!1,props:["prefixCls","id","tabindex","dropdownClassName","dropdownAlign","popupStyle","transitionName","generateConfig","locale","inputReadOnly","allowClear","autofocus","showTime","showNow","showHour","showMinute","showSecond","picker","format","use12Hours","value","defaultValue","open","defaultOpen","defaultOpenValue","suffixIcon","presets","clearIcon","disabled","disabledDate","placeholder","getPopupContainer","panelRender","inputRender","onChange","onOpenChange","onPanelChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu","onClick","onKeydown","onSelect","direction","autocomplete","showToday","renderExtraFooter","dateRender","minuteStep","hourStep","secondStep","hideDisabledOptions"],setup(e,t){let{attrs:n,expose:a}=t;const v=Y(null),p=le(()=>e.presets),f=Ol(p),m=le(()=>{var O;return(O=e.picker)!==null&&O!==void 0?O:"date"}),c=le(()=>m.value==="date"&&!!e.showTime||m.value==="time"),h=le(()=>Al(Cl(e.format,m.value,e.showTime,e.use12Hours))),i=Y(null),o=Y(null),l=Y(null),[s,r]=zt(null,{value:ft(e,"value"),defaultValue:e.defaultValue}),u=Y(s.value),d=O=>{u.value=O},g=Y(null),[y,x]=zt(!1,{value:ft(e,"open"),defaultValue:e.defaultOpen,postState:O=>e.disabled?!1:O,onChange:O=>{e.onOpenChange&&e.onOpenChange(O),!O&&g.value&&g.value.onClose&&g.value.onClose()}}),[C,b]=Ko(u,{formatList:h,generateConfig:ft(e,"generateConfig"),locale:ft(e,"locale")}),[w,_,I]=Ui({valueTexts:C,onTextChange:O=>{const N=_l(O,{locale:e.locale,formatList:h.value,generateConfig:e.generateConfig});N&&(!e.disabledDate||!e.disabledDate(N))&&d(N)}}),E=O=>{const{onChange:N,generateConfig:V,locale:H}=e;d(O),r(O),N&&!Qn(V,s.value,O)&&N(O,O?_t(O,{generateConfig:V,locale:H,format:h.value[0]}):"")},k=O=>{e.disabled&&O||x(O)},A=O=>y.value&&g.value&&g.value.onKeydown?g.value.onKeydown(O):!1,S=function(){e.onMouseup&&e.onMouseup(...arguments),v.value&&(v.value.focus(),k(!0))},[M,{focused:$,typing:L}]=ji({blurToCancel:c,open:y,value:w,triggerOpen:k,forwardKeydown:A,isClickOutside:O=>!$l([i.value,o.value,l.value],O),onSubmit:()=>!u.value||e.disabledDate&&e.disabledDate(u.value)?!1:(E(u.value),k(!1),I(),!0),onCancel:()=>{k(!1),d(s.value),I()},onKeydown:(O,N)=>{var V;(V=e.onKeydown)===null||V===void 0||V.call(e,O,N)},onFocus:O=>{var N;(N=e.onFocus)===null||N===void 0||N.call(e,O)},onBlur:O=>{var N;(N=e.onBlur)===null||N===void 0||N.call(e,O)}});me([y,C],()=>{y.value||(d(s.value),!C.value.length||C.value[0]===""?_(""):b.value!==w.value&&I())}),me(m,()=>{y.value||I()}),me(s,()=>{d(s.value)});const[T,R,P]=Gi(w,{formatList:h,generateConfig:ft(e,"generateConfig"),locale:ft(e,"locale")}),F=(O,N)=>{(N==="submit"||N!=="key"&&!c.value)&&(E(O),k(!1))};return vr({operationRef:g,hideHeader:le(()=>m.value==="time"),onSelect:F,open:y,defaultOpenValue:ft(e,"defaultOpenValue"),onDateMouseenter:R,onDateMouseleave:P}),a({focus:()=>{v.value&&v.value.focus()},blur:()=>{v.value&&v.value.blur()}}),()=>{const{prefixCls:O="rc-picker",id:N,tabindex:V,dropdownClassName:H,dropdownAlign:W,popupStyle:j,transitionName:Z,generateConfig:q,locale:G,inputReadOnly:K,allowClear:ee,autofocus:te,picker:ae="date",defaultOpenValue:de,suffixIcon:he,clearIcon:re,disabled:ue,placeholder:ne,getPopupContainer:pe,panelRender:Se,onMousedown:Me,onMouseenter:Le,onMouseleave:Ae,onContextmenu:We,onClick:Ve,onSelect:Ze,direction:se,autocomplete:we="off"}=e,Ce=J(J(J({},e),n),{class:Ie({[`${O}-panel-focused`]:!L.value}),style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null});let Ee=D("div",{class:`${O}-panel-layout`},[D(Nl,{prefixCls:O,presets:f.value,onClick:fe=>{E(fe),k(!1)}},null),D(Rl,oe(oe({},Ce),{},{generateConfig:q,value:u.value,locale:G,tabindex:-1,onSelect:fe=>{Ze==null||Ze(fe),d(fe)},direction:se,onPanelChange:(fe,ke)=>{const{onPanelChange:Ne}=e;P(!0),Ne==null||Ne(fe,ke)}}),null)]);Se&&(Ee=Se(Ee));const Be=D("div",{class:`${O}-panel-container`,ref:i,onMousedown:fe=>{fe.preventDefault()}},[Ee]);let je;he&&(je=D("span",{class:`${O}-suffix`},[he]));let Ue;ee&&s.value&&!ue&&(Ue=D("span",{onMousedown:fe=>{fe.preventDefault(),fe.stopPropagation()},onMouseup:fe=>{fe.preventDefault(),fe.stopPropagation(),E(null),k(!1)},class:`${O}-clear`,role:"button"},[re||D("span",{class:`${O}-clear-btn`},null)]));const Xe=J(J(J(J({id:N,tabindex:V,disabled:ue,readonly:K||typeof h.value[0]=="function"||!L.value,value:T.value||w.value,onInput:fe=>{_(fe.target.value)},autofocus:te,placeholder:ne,ref:v,title:w.value},M.value),{size:xl(ae,h.value[0],q)}),Ll(e)),{autocomplete:we}),Je=e.inputRender?e.inputRender(Xe):D("input",Xe,null),X=se==="rtl"?"bottomRight":"bottomLeft";return D("div",{ref:l,class:Ie(O,n.class,{[`${O}-disabled`]:ue,[`${O}-focused`]:$.value,[`${O}-rtl`]:se==="rtl"}),style:n.style,onMousedown:Me,onMouseup:S,onMouseenter:Le,onMouseleave:Ae,onContextmenu:We,onClick:Ve},[D("div",{class:Ie(`${O}-input`,{[`${O}-input-placeholder`]:!!T.value}),ref:o},[Je,je,Ue]),D(Pl,{visible:y.value,popupStyle:j,prefixCls:O,dropdownClassName:H,dropdownAlign:W,getPopupContainer:pe,transitionName:Z,popupPlacement:X,direction:se},{default:()=>[D("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>Be})])}}})}const Lh=Ah();function Eh(e,t){let{picker:n,locale:a,selectedValue:v,disabledDate:p,disabled:f,generateConfig:m}=e;const c=le(()=>Ge(v.value,0)),h=le(()=>Ge(v.value,1));function i(u){return m.value.locale.getWeekFirstDate(a.value.locale,u)}function o(u){const d=m.value.getYear(u),g=m.value.getMonth(u);return d*100+g}function l(u){const d=m.value.getYear(u),g=zi(m.value,u);return d*10+g}return[u=>{var d;if(p&&(!((d=p==null?void 0:p.value)===null||d===void 0)&&d.call(p,u)))return!0;if(f[1]&&h)return!sn(m.value,u,h.value)&&m.value.isAfter(u,h.value);if(t.value[1]&&h.value)switch(n.value){case"quarter":return l(u)>l(h.value);case"month":return o(u)>o(h.value);case"week":return i(u)>i(h.value);default:return!sn(m.value,u,h.value)&&m.value.isAfter(u,h.value)}return!1},u=>{var d;if(!((d=p.value)===null||d===void 0)&&d.call(p,u))return!0;if(f[0]&&c)return!sn(m.value,u,h.value)&&m.value.isAfter(c.value,u);if(t.value[0]&&c.value)switch(n.value){case"quarter":return l(u)<l(c.value);case"month":return o(u)<o(c.value);case"week":return i(u)<i(c.value);default:return!sn(m.value,u,c.value)&&m.value.isAfter(c.value,u)}return!1}]}function Ih(e,t,n,a){const v=wo(e,n,a,1);function p(f){return f(e,t)?"same":f(v,t)?"closing":"far"}switch(n){case"year":return p((f,m)=>hh(a,f,m));case"quarter":case"month":return p((f,m)=>ti(a,f,m));default:return p((f,m)=>Cr(a,f,m))}}function Th(e,t,n,a){const v=Ge(e,0),p=Ge(e,1);if(t===0)return v;if(v&&p)switch(Ih(v,p,n,a)){case"same":return v;case"closing":return v;default:return wo(p,n,a,-1)}return v}function Dh(e){let{values:t,picker:n,defaultDates:a,generateConfig:v}=e;const p=Y([Ge(a,0),Ge(a,1)]),f=Y(null),m=le(()=>Ge(t.value,0)),c=le(()=>Ge(t.value,1)),h=s=>p.value[s]?p.value[s]:Ge(f.value,s)||Th(t.value,s,n.value,v.value)||m.value||c.value||v.value.getNow(),i=Y(null),o=Y(null);ko(()=>{i.value=h(0),o.value=h(1)});function l(s,r){if(s){let u=Ht(f.value,s,r);p.value=Ht(p.value,null,r)||[null,null];const d=(r+1)%2;Ge(t.value,d)||(u=Ht(u,s,d)),f.value=u}else(m.value||c.value)&&(f.value=null)}return[i,o,l]}function Rh(e){return Kc()?(Xc(e),!0):!1}function Ph(e){return typeof e=="function"?e():B(e)}function Bl(e){var t;const n=Ph(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Nh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Qc()?ot(e):t?e():bt(e)}function Oh(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=Qe(),a=()=>n.value=!!e();return a(),Nh(a,t),n}var vi;const Fl=typeof window<"u";Fl&&(!((vi=window==null?void 0:window.navigator)===null||vi===void 0)&&vi.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const Bh=Fl?window:void 0;var Fh=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};function Hh(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{window:a=Bh}=n,v=Fh(n,["window"]);let p;const f=Oh(()=>a&&"ResizeObserver"in a),m=()=>{p&&(p.disconnect(),p=void 0)},c=me(()=>Bl(e),i=>{m(),f.value&&a&&i&&(p=new ResizeObserver(t),p.observe(i,v))},{immediate:!0,flush:"post"}),h=()=>{m(),c()};return Rh(h),{isSupported:f,stop:h}}function po(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{width:0,height:0},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{box:a="content-box"}=n,v=Qe(t.width),p=Qe(t.height);return Hh(e,f=>{let[m]=f;const c=a==="border-box"?m.borderBoxSize:a==="content-box"?m.contentBoxSize:m.devicePixelContentBoxSize;c?(v.value=c.reduce((h,i)=>{let{inlineSize:o}=i;return h+o},0),p.value=c.reduce((h,i)=>{let{blockSize:o}=i;return h+o},0)):(v.value=m.contentRect.width,p.value=m.contentRect.height)},n),me(()=>Bl(e),f=>{v.value=f?t.width:0,p.value=f?t.height:0}),{width:v,height:p}}function Pa(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function Na(e,t,n,a){return!!(e||a&&a[t]||n[(t+1)%2])}function zh(){return ce({name:"RangerPicker",inheritAttrs:!1,props:["prefixCls","id","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","generateConfig","locale","placeholder","autofocus","disabled","format","picker","showTime","showNow","showHour","showMinute","showSecond","use12Hours","separator","value","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","disabledTime","dateRender","panelRender","ranges","allowEmpty","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onClick","onOk","onKeydown","components","order","direction","activePickerIndex","autocomplete","minuteStep","hourStep","secondStep","hideDisabledOptions","disabledMinutes","presets","prevIcon","nextIcon","superPrevIcon","superNextIcon"],setup(e,t){let{attrs:n,expose:a}=t;const v=le(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),p=le(()=>e.presets),f=le(()=>e.ranges),m=Ol(p,f),c=Y({}),h=Y(null),i=Y(null),o=Y(null),l=Y(null),s=Y(null),r=Y(null),u=Y(null),d=Y(null),g=le(()=>Al(Cl(e.format,e.picker,e.showTime,e.use12Hours))),[y,x]=zt(0,{value:ft(e,"activePickerIndex")}),C=Y(null),b=le(()=>{const{disabled:ge}=e;return Array.isArray(ge)?ge:[ge||!1,ge||!1]}),[w,_]=zt(null,{value:ft(e,"value"),defaultValue:e.defaultValue,postState:ge=>e.picker==="time"&&!e.order?ge:Pa(ge,e.generateConfig)}),[I,E,k]=Dh({values:w,picker:ft(e,"picker"),defaultDates:e.defaultPickerValue,generateConfig:ft(e,"generateConfig")}),[A,S]=zt(w.value,{postState:ge=>{let Te=ge;if(b.value[0]&&b.value[1])return Te;for(let _e=0;_e<2;_e+=1)b.value[_e]&&!Ge(Te,_e)&&!Ge(e.allowEmpty,_e)&&(Te=Ht(Te,e.generateConfig.getNow(),_e));return Te}}),[M,$]=zt([e.picker,e.picker],{value:ft(e,"mode")});me(()=>e.picker,()=>{$([e.picker,e.picker])});const L=(ge,Te)=>{var _e;$(ge),(_e=e.onPanelChange)===null||_e===void 0||_e.call(e,Te,ge)},[T,R]=Eh({picker:ft(e,"picker"),selectedValue:A,locale:ft(e,"locale"),disabled:b,disabledDate:ft(e,"disabledDate"),generateConfig:ft(e,"generateConfig")},c),[P,F]=zt(!1,{value:ft(e,"open"),defaultValue:e.defaultOpen,postState:ge=>b.value[y.value]?!1:ge,onChange:ge=>{var Te;(Te=e.onOpenChange)===null||Te===void 0||Te.call(e,ge),!ge&&C.value&&C.value.onClose&&C.value.onClose()}}),O=le(()=>P.value&&y.value===0),N=le(()=>P.value&&y.value===1),V=Y(0),H=Y(0),W=Y(0),{width:j}=po(h);me([P,j],()=>{!P.value&&h.value&&(W.value=j.value)});const{width:Z}=po(i),{width:q}=po(d),{width:G}=po(o),{width:K}=po(s);me([y,P,Z,q,G,K,()=>e.direction],()=>{H.value=0,y.value?o.value&&s.value&&(H.value=G.value+K.value,Z.value&&q.value&&H.value>Z.value-q.value-(e.direction==="rtl"||d.value.offsetLeft>H.value?0:d.value.offsetLeft)&&(V.value=H.value)):y.value===0&&(V.value=0)},{immediate:!0});const ee=Y();function te(ge,Te){if(ge)clearTimeout(ee.value),c.value[Te]=!0,x(Te),F(ge),P.value||k(null,Te);else if(y.value===Te){F(ge);const _e=c.value;ee.value=setTimeout(()=>{_e===c.value&&(c.value={})})}}function ae(ge){te(!0,ge),setTimeout(()=>{const Te=[r,u][ge];Te.value&&Te.value.focus()},0)}function de(ge,Te){let _e=ge,tt=Ge(_e,0),Mt=Ge(_e,1);const{generateConfig:Et,locale:vn,picker:Ft,order:co,onCalendarChange:yn,allowEmpty:Ln,onChange:yt,showTime:on}=e;tt&&Mt&&Et.isAfter(tt,Mt)&&(Ft==="week"&&!kl(Et,vn.locale,tt,Mt)||Ft==="quarter"&&!Sl(Et,tt,Mt)||Ft!=="week"&&Ft!=="quarter"&&Ft!=="time"&&!(on?Qn(Et,tt,Mt):sn(Et,tt,Mt))?(Te===0?(_e=[tt,null],Mt=null):(tt=null,_e=[null,Mt]),c.value={[Te]:!0}):(Ft!=="time"||co!==!1)&&(_e=Pa(_e,Et))),S(_e);const Kt=_e&&_e[0]?_t(_e[0],{generateConfig:Et,locale:vn,format:g.value[0]}):"",uo=_e&&_e[1]?_t(_e[1],{generateConfig:Et,locale:vn,format:g.value[0]}):"";yn&&yn(_e,[Kt,uo],{range:Te===0?"start":"end"});const To=Na(tt,0,b.value,Ln),si=Na(Mt,1,b.value,Ln);(_e===null||To&&si)&&(_(_e),yt&&(!Qn(Et,Ge(w.value,0),tt)||!Qn(Et,Ge(w.value,1),Mt))&&yt(_e,[Kt,uo]));let rn=null;Te===0&&!b.value[1]?rn=1:Te===1&&!b.value[0]&&(rn=0),rn!==null&&rn!==y.value&&(!c.value[rn]||!Ge(_e,rn))&&Ge(_e,Te)?ae(rn):te(!1,Te)}const he=ge=>P&&C.value&&C.value.onKeydown?C.value.onKeydown(ge):!1,re={formatList:g,generateConfig:ft(e,"generateConfig"),locale:ft(e,"locale")},[ue,ne]=Ko(le(()=>Ge(A.value,0)),re),[pe,Se]=Ko(le(()=>Ge(A.value,1)),re),Me=(ge,Te)=>{const _e=_l(ge,{locale:e.locale,formatList:g.value,generateConfig:e.generateConfig});_e&&!(Te===0?T:R)(_e)&&(S(Ht(A.value,_e,Te)),k(_e,Te))},[Le,Ae,We]=Ui({valueTexts:ue,onTextChange:ge=>Me(ge,0)}),[Ve,Ze,se]=Ui({valueTexts:pe,onTextChange:ge=>Me(ge,1)}),[we,Ce]=xa(null),[Ee,Be]=xa(null),[je,Ue,Xe]=Gi(Le,re),[Je,X,fe]=Gi(Ve,re),ke=ge=>{Be(Ht(A.value,ge,y.value)),y.value===0?Ue(ge):X(ge)},Ne=()=>{Be(Ht(A.value,null,y.value)),y.value===0?Xe():fe()},Ye=(ge,Te)=>({forwardKeydown:he,onBlur:_e=>{var tt;(tt=e.onBlur)===null||tt===void 0||tt.call(e,_e)},isClickOutside:_e=>!$l([i.value,o.value,l.value,h.value],_e),onFocus:_e=>{var tt;x(ge),(tt=e.onFocus)===null||tt===void 0||tt.call(e,_e)},triggerOpen:_e=>{te(_e,ge)},onSubmit:()=>{if(!A.value||e.disabledDate&&e.disabledDate(A.value[ge]))return!1;de(A.value,ge),Te()},onCancel:()=>{te(!1,ge),S(w.value),Te()}}),[He,{focused:st,typing:rt}]=ji(J(J({},Ye(0,We)),{blurToCancel:v,open:O,value:Le,onKeydown:(ge,Te)=>{var _e;(_e=e.onKeydown)===null||_e===void 0||_e.call(e,ge,Te)}})),[lt,{focused:ut,typing:$t}]=ji(J(J({},Ye(1,se)),{blurToCancel:v,open:N,value:Ve,onKeydown:(ge,Te)=>{var _e;(_e=e.onKeydown)===null||_e===void 0||_e.call(e,ge,Te)}})),Zt=ge=>{var Te;(Te=e.onClick)===null||Te===void 0||Te.call(e,ge),!P.value&&!r.value.contains(ge.target)&&!u.value.contains(ge.target)&&(b.value[0]?b.value[1]||ae(1):ae(0))},mn=ge=>{var Te;(Te=e.onMousedown)===null||Te===void 0||Te.call(e,ge),P.value&&(st.value||ut.value)&&!r.value.contains(ge.target)&&!u.value.contains(ge.target)&&ge.preventDefault()},nn=le(()=>{var ge;return!((ge=w.value)===null||ge===void 0)&&ge[0]?_t(w.value[0],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""}),Gn=le(()=>{var ge;return!((ge=w.value)===null||ge===void 0)&&ge[1]?_t(w.value[1],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""});me([P,ue,pe],()=>{P.value||(S(w.value),!ue.value.length||ue.value[0]===""?Ae(""):ne.value!==Le.value&&We(),!pe.value.length||pe.value[0]===""?Ze(""):Se.value!==Ve.value&&se())}),me([nn,Gn],()=>{S(w.value)}),a({focus:()=>{r.value&&r.value.focus()},blur:()=>{r.value&&r.value.blur(),u.value&&u.value.blur()}});const ai=le(()=>P.value&&Ee.value&&Ee.value[0]&&Ee.value[1]&&e.generateConfig.isAfter(Ee.value[1],Ee.value[0])?Ee.value:null);function Yn(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{generateConfig:_e,showTime:tt,dateRender:Mt,direction:Et,disabledTime:vn,prefixCls:Ft,locale:co}=e;let yn=tt;if(tt&&typeof tt=="object"&&tt.defaultValue){const yt=tt.defaultValue;yn=J(J({},tt),{defaultValue:Ge(yt,y.value)||void 0})}let Ln=null;return Mt&&(Ln=yt=>{let{current:on,today:Kt}=yt;return Mt({current:on,today:Kt,info:{range:y.value?"end":"start"}})}),D(bh,{value:{inRange:!0,panelPosition:ge,rangedValue:we.value||A.value,hoverRangedValue:ai.value}},{default:()=>[D(Rl,oe(oe(oe({},e),Te),{},{dateRender:Ln,showTime:yn,mode:M.value[y.value],generateConfig:_e,style:void 0,direction:Et,disabledDate:y.value===0?T:R,disabledTime:yt=>vn?vn(yt,y.value===0?"start":"end"):!1,class:Ie({[`${Ft}-panel-focused`]:y.value===0?!rt.value:!$t.value}),value:Ge(A.value,y.value),locale:co,tabIndex:-1,onPanelChange:(yt,on)=>{y.value===0&&Xe(!0),y.value===1&&fe(!0),L(Ht(M.value,on,y.value),Ht(A.value,yt,y.value));let Kt=yt;ge==="right"&&M.value[y.value]===on&&(Kt=wo(Kt,on,_e,-1)),k(Kt,y.value)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:y.value===0?Ge(A.value,1):Ge(A.value,0)}),null)]})}const Io=(ge,Te)=>{const _e=Ht(A.value,ge,y.value);Te==="submit"||Te!=="key"&&!v.value?(de(_e,y.value),y.value===0?Xe():fe()):S(_e)};return vr({operationRef:C,hideHeader:le(()=>e.picker==="time"),onDateMouseenter:ke,onDateMouseleave:Ne,hideRanges:le(()=>!0),onSelect:Io,open:P}),()=>{const{prefixCls:ge="rc-picker",id:Te,popupStyle:_e,dropdownClassName:tt,transitionName:Mt,dropdownAlign:Et,getPopupContainer:vn,generateConfig:Ft,locale:co,placeholder:yn,autofocus:Ln,picker:yt="date",showTime:on,separator:Kt="~",disabledDate:uo,panelRender:To,allowClear:si,suffixIcon:li,clearIcon:rn,inputReadOnly:ci,renderExtraFooter:Rc,onMouseenter:Pc,onMouseleave:Nc,onMouseup:Oc,onOk:da,components:Bc,direction:ho,autocomplete:ha="off"}=e,Fc=ho==="rtl"?{right:`${H.value}px`}:{left:`${H.value}px`};function Hc(){let It;const wn=Tl(ge,M.value[y.value],Rc),ma=Dl({prefixCls:ge,components:Bc,needConfirmButton:v.value,okDisabled:!Ge(A.value,y.value)||uo&&uo(A.value[y.value]),locale:co,onOk:()=>{Ge(A.value,y.value)&&(de(A.value,y.value),da&&da(A.value))}});if(yt!=="time"&&!on){const bn=y.value===0?I.value:E.value,Vc=wo(bn,yt,Ft),fi=M.value[y.value]===yt,va=Yn(fi?"left":!1,{pickerValue:bn,onPickerValueChange:pi=>{k(pi,y.value)}}),ya=Yn("right",{pickerValue:Vc,onPickerValueChange:pi=>{k(wo(pi,yt,Ft,-1),y.value)}});ho==="rtl"?It=D(Fe,null,[ya,fi&&va]):It=D(Fe,null,[va,fi&&ya])}else It=Yn();let hi=D("div",{class:`${ge}-panel-layout`},[D(Nl,{prefixCls:ge,presets:m.value,onClick:bn=>{de(bn,null),te(!1,y.value)},onHover:bn=>{Ce(bn)}},null),D("div",null,[D("div",{class:`${ge}-panels`},[It]),(wn||ma)&&D("div",{class:`${ge}-footer`},[wn,ma])])]);return To&&(hi=To(hi)),D("div",{class:`${ge}-panel-container`,style:{marginLeft:`${V.value}px`},ref:i,onMousedown:bn=>{bn.preventDefault()}},[hi])}const zc=D("div",{class:Ie(`${ge}-range-wrapper`,`${ge}-${yt}-range-wrapper`),style:{minWidth:`${W.value}px`}},[D("div",{ref:d,class:`${ge}-range-arrow`,style:Fc},null),Hc()]);let fa;li&&(fa=D("span",{class:`${ge}-suffix`},[li]));let pa;si&&(Ge(w.value,0)&&!b.value[0]||Ge(w.value,1)&&!b.value[1])&&(pa=D("span",{onMousedown:It=>{It.preventDefault(),It.stopPropagation()},onMouseup:It=>{It.preventDefault(),It.stopPropagation();let wn=w.value;b.value[0]||(wn=Ht(wn,null,0)),b.value[1]||(wn=Ht(wn,null,1)),de(wn,null),te(!1,y.value)},class:`${ge}-clear`},[rn||D("span",{class:`${ge}-clear-btn`},null)]));const ga={size:xl(yt,g.value[0],Ft)};let ui=0,di=0;o.value&&l.value&&s.value&&(y.value===0?di=o.value.offsetWidth:(ui=H.value,di=l.value.offsetWidth));const Wc=ho==="rtl"?{right:`${ui}px`}:{left:`${ui}px`};return D("div",oe({ref:h,class:Ie(ge,`${ge}-range`,n.class,{[`${ge}-disabled`]:b.value[0]&&b.value[1],[`${ge}-focused`]:y.value===0?st.value:ut.value,[`${ge}-rtl`]:ho==="rtl"}),style:n.style,onClick:Zt,onMouseenter:Pc,onMouseleave:Nc,onMousedown:mn,onMouseup:Oc},Ll(e)),[D("div",{class:Ie(`${ge}-input`,{[`${ge}-input-active`]:y.value===0,[`${ge}-input-placeholder`]:!!je.value}),ref:o},[D("input",oe(oe(oe({id:Te,disabled:b.value[0],readonly:ci||typeof g.value[0]=="function"||!rt.value,value:je.value||Le.value,onInput:It=>{Ae(It.target.value)},autofocus:Ln,placeholder:Ge(yn,0)||"",ref:r},He.value),ga),{},{autocomplete:ha}),null)]),D("div",{class:`${ge}-range-separator`,ref:s},[Kt]),D("div",{class:Ie(`${ge}-input`,{[`${ge}-input-active`]:y.value===1,[`${ge}-input-placeholder`]:!!Je.value}),ref:l},[D("input",oe(oe(oe({disabled:b.value[1],readonly:ci||typeof g.value[0]=="function"||!$t.value,value:Je.value||Ve.value,onInput:It=>{Ze(It.target.value)},placeholder:Ge(yn,1)||"",ref:u},lt.value),ga),{},{autocomplete:ha}),null)]),D("div",{class:`${ge}-active-bar`,style:J(J({},Wc),{width:`${di}px`,position:"absolute"})},null),fa,pa,D(Pl,{visible:P.value,popupStyle:_e,prefixCls:ge,dropdownClassName:tt,dropdownAlign:Et,getPopupContainer:vn,transitionName:Mt,range:!0,direction:ho},{default:()=>[D("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>zc})])}}})}const Wh=zh(),Vh=Wh,yi=(e,t,n,a)=>{const{lineHeight:v}=e,p=Math.floor(n*v)+2,f=Math.max((t-p)/2,0),m=Math.max(t-p-f,0);return{padding:`${f}px ${a}px ${m}px`}},jh=e=>{const{componentCls:t,pickerCellCls:n,pickerCellInnerCls:a,pickerPanelCellHeight:v,motionDurationSlow:p,borderRadiusSM:f,motionDurationMid:m,controlItemBgHover:c,lineWidth:h,lineType:i,colorPrimary:o,controlItemBgActive:l,colorTextLightSolid:s,controlHeightSM:r,pickerDateHoverRangeBorderColor:u,pickerCellBorderGap:d,pickerBasicCellHoverWithRangeColor:g,pickerPanelCellWidth:y,colorTextDisabled:x,colorBgContainerDisabled:C}=e;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:v,transform:"translateY(-50%)",transition:`all ${p}`,content:'""'},[a]:{position:"relative",zIndex:2,display:"inline-block",minWidth:v,height:v,lineHeight:`${v}px`,borderRadius:f,transition:`background ${m}, border ${m}`},[`&:hover:not(${n}-in-view),
|
|
&:hover:not(${n}-selected):not(${n}-range-start):not(${n}-range-end):not(${n}-range-hover-start):not(${n}-range-hover-end)`]:{[a]:{background:c}},[`&-in-view${n}-today ${a}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${h}px ${i} ${o}`,borderRadius:f,content:'""'}},[`&-in-view${n}-in-range`]:{position:"relative","&::before":{background:l}},[`&-in-view${n}-selected ${a},
|
|
&-in-view${n}-range-start ${a},
|
|
&-in-view${n}-range-end ${a}`]:{color:s,background:o},[`&-in-view${n}-range-start:not(${n}-range-start-single),
|
|
&-in-view${n}-range-end:not(${n}-range-end-single)`]:{"&::before":{background:l}},[`&-in-view${n}-range-start::before`]:{insetInlineStart:"50%"},[`&-in-view${n}-range-end::before`]:{insetInlineEnd:"50%"},[`&-in-view${n}-range-hover-start:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
|
|
&-in-view${n}-range-hover-end:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end),
|
|
&-in-view${n}-range-hover-start${n}-range-start-single,
|
|
&-in-view${n}-range-hover-start${n}-range-start${n}-range-end${n}-range-end-near-hover,
|
|
&-in-view${n}-range-hover-end${n}-range-start${n}-range-end${n}-range-start-near-hover,
|
|
&-in-view${n}-range-hover-end${n}-range-end-single,
|
|
&-in-view${n}-range-hover:not(${n}-in-range)`]:{"&::after":{position:"absolute",top:"50%",zIndex:0,height:r,borderTop:`${h}px dashed ${u}`,borderBottom:`${h}px dashed ${u}`,transform:"translateY(-50%)",transition:`all ${p}`,content:'""'}},"&-range-hover-start::after,\n &-range-hover-end::after,\n &-range-hover::after":{insetInlineEnd:0,insetInlineStart:d},[`&-in-view${n}-in-range${n}-range-hover::before,
|
|
&-in-view${n}-range-start${n}-range-hover::before,
|
|
&-in-view${n}-range-end${n}-range-hover::before,
|
|
&-in-view${n}-range-start:not(${n}-range-start-single)${n}-range-hover-start::before,
|
|
&-in-view${n}-range-end:not(${n}-range-end-single)${n}-range-hover-end::before,
|
|
${t}-panel
|
|
> :not(${t}-date-panel)
|
|
&-in-view${n}-in-range${n}-range-hover-start::before,
|
|
${t}-panel
|
|
> :not(${t}-date-panel)
|
|
&-in-view${n}-in-range${n}-range-hover-end::before`]:{background:g},[`&-in-view${n}-range-start:not(${n}-range-start-single):not(${n}-range-end) ${a}`]:{borderStartStartRadius:f,borderEndStartRadius:f,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${n}-range-end:not(${n}-range-end-single):not(${n}-range-start) ${a}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:f,borderEndEndRadius:f},[`&-range-hover${n}-range-end::after`]:{insetInlineStart:"50%"},[`tr > &-in-view${n}-range-hover:first-child::after,
|
|
tr > &-in-view${n}-range-hover-end:first-child::after,
|
|
&-in-view${n}-start${n}-range-hover-edge-start${n}-range-hover-edge-start-near-range::after,
|
|
&-in-view${n}-range-hover-edge-start:not(${n}-range-hover-edge-start-near-range)::after,
|
|
&-in-view${n}-range-hover-start::after`]:{insetInlineStart:(y-v)/2,borderInlineStart:`${h}px dashed ${u}`,borderStartStartRadius:h,borderEndStartRadius:h},[`tr > &-in-view${n}-range-hover:last-child::after,
|
|
tr > &-in-view${n}-range-hover-start:last-child::after,
|
|
&-in-view${n}-end${n}-range-hover-edge-end${n}-range-hover-edge-end-near-range::after,
|
|
&-in-view${n}-range-hover-edge-end:not(${n}-range-hover-edge-end-near-range)::after,
|
|
&-in-view${n}-range-hover-end::after`]:{insetInlineEnd:(y-v)/2,borderInlineEnd:`${h}px dashed ${u}`,borderStartEndRadius:h,borderEndEndRadius:h},"&-disabled":{color:x,pointerEvents:"none",[a]:{background:"transparent"},"&::before":{background:C}},[`&-disabled${n}-today ${a}::before`]:{borderColor:x}}},Uh=e=>{const{componentCls:t,pickerCellInnerCls:n,pickerYearMonthCellWidth:a,pickerControlIconSize:v,pickerPanelCellWidth:p,paddingSM:f,paddingXS:m,paddingXXS:c,colorBgContainer:h,lineWidth:i,lineType:o,borderRadiusLG:l,colorPrimary:s,colorTextHeading:r,colorSplit:u,pickerControlIconBorderWidth:d,colorIcon:g,pickerTextHeight:y,motionDurationMid:x,colorIconHover:C,fontWeightStrong:b,pickerPanelCellHeight:w,pickerCellPaddingVertical:_,colorTextDisabled:I,colorText:E,fontSize:k,pickerBasicCellHoverWithRangeColor:A,motionDurationSlow:S,pickerPanelWithoutTimeCellHeight:M,pickerQuarterPanelContentHeight:$,colorLink:L,colorLinkActive:T,colorLinkHover:R,pickerDateHoverRangeBorderColor:P,borderRadiusSM:F,colorTextLightSolid:O,borderRadius:N,controlItemBgHover:V,pickerTimePanelColumnHeight:H,pickerTimePanelColumnWidth:W,pickerTimePanelCellHeight:j,controlItemBgActive:Z,marginXXS:q}=e,G=p*7+f*2+4,K=(G-m*2)/3-a-f;return{[t]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:h,border:`${i}px ${o} ${u}`,borderRadius:l,outline:"none","&-focused":{borderColor:s},"&-rtl":{direction:"rtl",[`${t}-prev-icon,
|
|
${t}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${t}-next-icon,
|
|
${t}-super-next-icon`]:{transform:"rotate(-135deg)"}}},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel":{display:"flex",flexDirection:"column",width:G},"&-header":{display:"flex",padding:`0 ${m}px`,color:r,borderBottom:`${i}px ${o} ${u}`,"> *":{flex:"none"},button:{padding:0,color:g,lineHeight:`${y}px`,background:"transparent",border:0,cursor:"pointer",transition:`color ${x}`},"> button":{minWidth:"1.6em",fontSize:k,"&:hover":{color:C}},"&-view":{flex:"auto",fontWeight:b,lineHeight:`${y}px`,button:{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:m},"&:hover":{color:s}}}},"&-prev-icon,\n &-next-icon,\n &-super-prev-icon,\n &-super-next-icon":{position:"relative",display:"inline-block",width:v,height:v,"&::before":{position:"absolute",top:0,insetInlineStart:0,display:"inline-block",width:v,height:v,border:"0 solid currentcolor",borderBlockStartWidth:d,borderBlockEndWidth:0,borderInlineStartWidth:d,borderInlineEndWidth:0,content:'""'}},"&-super-prev-icon,\n &-super-next-icon":{"&::after":{position:"absolute",top:Math.ceil(v/2),insetInlineStart:Math.ceil(v/2),display:"inline-block",width:v,height:v,border:"0 solid currentcolor",borderBlockStartWidth:d,borderBlockEndWidth:0,borderInlineStartWidth:d,borderInlineEndWidth:0,content:'""'}},"&-prev-icon,\n &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon,\n &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:w,fontWeight:"normal"},th:{height:w+_*2,color:E,verticalAlign:"middle"}},"&-cell":J({padding:`${_}px 0`,color:I,cursor:"pointer","&-in-view":{color:E}},jh(e)),[`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start ${n},
|
|
&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}`]:{"&::after":{position:"absolute",top:0,bottom:0,zIndex:-1,background:A,transition:`all ${S}`,content:'""'}},[`&-date-panel
|
|
${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start
|
|
${n}::after`]:{insetInlineEnd:-(p-w)/2,insetInlineStart:0},[`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]:{insetInlineEnd:0,insetInlineStart:-(p-w)/2},[`&-range-hover${t}-range-start::after`]:{insetInlineEnd:"50%"},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-content`]:{height:M*4},[n]:{padding:`0 ${m}px`}},"&-quarter-panel":{[`${t}-content`]:{height:$}},[`&-panel ${t}-footer`]:{borderTop:`${i}px ${o} ${u}`},"&-footer":{width:"min-content",minWidth:"100%",lineHeight:`${y-2*i}px`,textAlign:"center","&-extra":{padding:`0 ${f}`,lineHeight:`${y-2*i}px`,textAlign:"start","&:not(:last-child)":{borderBottom:`${i}px ${o} ${u}`}}},"&-now":{textAlign:"start"},"&-today-btn":{color:L,"&:hover":{color:R},"&:active":{color:T},[`&${t}-today-btn-disabled`]:{color:I,cursor:"not-allowed"}},"&-decade-panel":{[n]:{padding:`0 ${m/2}px`},[`${t}-cell::before`]:{display:"none"}},"&-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-body`]:{padding:`0 ${m}px`},[n]:{width:a},[`${t}-cell-range-hover-start::after`]:{insetInlineStart:K,borderInlineStart:`${i}px dashed ${P}`,borderStartStartRadius:F,borderBottomStartRadius:F,borderStartEndRadius:0,borderBottomEndRadius:0,[`${t}-panel-rtl &`]:{insetInlineEnd:K,borderInlineEnd:`${i}px dashed ${P}`,borderStartStartRadius:0,borderBottomStartRadius:0,borderStartEndRadius:F,borderBottomEndRadius:F}},[`${t}-cell-range-hover-end::after`]:{insetInlineEnd:K,borderInlineEnd:`${i}px dashed ${P}`,borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:N,borderEndEndRadius:N,[`${t}-panel-rtl &`]:{insetInlineStart:K,borderInlineStart:`${i}px dashed ${P}`,borderStartStartRadius:N,borderEndStartRadius:N,borderStartEndRadius:0,borderEndEndRadius:0}}},"&-week-panel":{[`${t}-body`]:{padding:`${m}px ${f}px`},[`${t}-cell`]:{[`&:hover ${n},
|
|
&-selected ${n},
|
|
${n}`]:{background:"transparent !important"}},"&-row":{td:{transition:`background ${x}`,"&:first-child":{borderStartStartRadius:F,borderEndStartRadius:F},"&:last-child":{borderStartEndRadius:F,borderEndEndRadius:F}},"&:hover td":{background:V},"&-selected td,\n &-selected:hover td":{background:s,[`&${t}-cell-week`]:{color:new Gt(O).setAlpha(.5).toHexString()},[`&${t}-cell-today ${n}::before`]:{borderColor:O},[n]:{color:O}}}},"&-date-panel":{[`${t}-body`]:{padding:`${m}px ${f}px`},[`${t}-content`]:{width:p*7,th:{width:p}}},"&-datetime-panel":{display:"flex",[`${t}-time-panel`]:{borderInlineStart:`${i}px ${o} ${u}`},[`${t}-date-panel,
|
|
${t}-time-panel`]:{transition:`opacity ${S}`},"&-active":{[`${t}-date-panel,
|
|
${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",[`${t}-content`]:{display:"flex",flex:"auto",height:H},"&-column":{flex:"1 0 auto",width:W,margin:`${c}px 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${x}`,overflowX:"hidden","&::after":{display:"block",height:H-j,content:'""'},"&:not(:first-child)":{borderInlineStart:`${i}px ${o} ${u}`},"&-active":{background:new Gt(Z).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:q,[`${t}-time-panel-cell-inner`]:{display:"block",width:W-2*q,height:j,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:(W-j)/2,color:E,lineHeight:`${j}px`,borderRadius:F,cursor:"pointer",transition:`background ${x}`,"&:hover":{background:V}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:Z}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:I,background:"transparent",cursor:"not-allowed"}}}}}},[`&-datetime-panel ${t}-time-panel-column:after`]:{height:H-j+c*2}}}},Gh=e=>{const{componentCls:t,colorBgContainer:n,colorError:a,colorErrorOutline:v,colorWarning:p,colorWarningOutline:f}=e;return{[t]:{[`&-status-error${t}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:a},"&-focused, &:focus":J({},Zo(Jt(e,{inputBorderActiveColor:a,inputBorderHoverColor:a,controlOutline:v}))),[`${t}-active-bar`]:{background:a}},[`&-status-warning${t}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:p},"&-focused, &:focus":J({},Zo(Jt(e,{inputBorderActiveColor:p,inputBorderHoverColor:p,controlOutline:f}))),[`${t}-active-bar`]:{background:p}}}}},Yh=e=>{const{componentCls:t,antCls:n,boxShadowPopoverArrow:a,controlHeight:v,fontSize:p,inputPaddingHorizontal:f,colorBgContainer:m,lineWidth:c,lineType:h,colorBorder:i,borderRadius:o,motionDurationMid:l,colorBgContainerDisabled:s,colorTextDisabled:r,colorTextPlaceholder:u,controlHeightLG:d,fontSizeLG:g,controlHeightSM:y,inputPaddingHorizontalSM:x,paddingXS:C,marginXS:b,colorTextDescription:w,lineWidthBold:_,lineHeight:I,colorPrimary:E,motionDurationSlow:k,zIndexPopup:A,paddingXXS:S,paddingSM:M,pickerTextHeight:$,controlItemBgActive:L,colorPrimaryBorder:T,sizePopupArrow:R,borderRadiusXS:P,borderRadiusOuter:F,colorBgElevated:O,borderRadiusLG:N,boxShadowSecondary:V,borderRadiusSM:H,colorSplit:W,controlItemBgHover:j,presetsWidth:Z,presetsMaxWidth:q}=e;return[{[t]:J(J(J({},Yt(e)),yi(e,v,p,f)),{position:"relative",display:"inline-flex",alignItems:"center",background:m,lineHeight:1,border:`${c}px ${h} ${i}`,borderRadius:o,transition:`border ${l}, box-shadow ${l}`,"&:hover, &-focused":J({},rr(e)),"&-focused":J({},Zo(e)),[`&${t}-disabled`]:{background:s,borderColor:i,cursor:"not-allowed",[`${t}-suffix`]:{color:r}},[`&${t}-borderless`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`${t}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":J(J({},ar(e)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,"&:focus":{boxShadow:"none"},"&[disabled]":{background:"transparent"}}),"&:hover":{[`${t}-clear`]:{opacity:1}},"&-placeholder":{"> input":{color:u}}},"&-large":J(J({},yi(e,d,g,f)),{[`${t}-input > input`]:{fontSize:g}}),"&-small":J({},yi(e,y,p,x)),[`${t}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:C/2,color:r,lineHeight:1,pointerEvents:"none","> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:b}}},[`${t}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:r,lineHeight:1,background:m,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${l}, color ${l}`,"> *":{verticalAlign:"top"},"&:hover":{color:w}},[`${t}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:g,color:r,fontSize:g,verticalAlign:"top",cursor:"default",[`${t}-focused &`]:{color:w},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${t}-clear`]:{insetInlineEnd:f},"&:hover":{[`${t}-clear`]:{opacity:1}},[`${t}-active-bar`]:{bottom:-c,height:_,marginInlineStart:f,background:E,opacity:0,transition:`all ${k} ease-out`,pointerEvents:"none"},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:"center",padding:`0 ${C}px`,lineHeight:1},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:x},[`${t}-active-bar`]:{marginInlineStart:x}}},"&-dropdown":J(J(J({},Yt(e)),Uh(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:A,[`&${t}-dropdown-hidden`]:{display:"none"},[`&${t}-dropdown-placement-bottomLeft`]:{[`${t}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${t}-dropdown-placement-topLeft`]:{[`${t}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft,
|
|
&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight,
|
|
&${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft,
|
|
&${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:hd},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft,
|
|
&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight,
|
|
&${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft,
|
|
&${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:fd},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft,
|
|
&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:pd},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft,
|
|
&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:gd},[`${t}-panel > ${t}-time-panel`]:{paddingTop:S},[`${t}-ranges`]:{marginBottom:0,padding:`${S}px ${M}px`,overflow:"hidden",lineHeight:`${$-2*c-C/2}px`,textAlign:"start",listStyle:"none",display:"flex",justifyContent:"space-between","> li":{display:"inline-block"},[`${t}-preset > ${n}-tag-blue`]:{color:E,background:L,borderColor:T,cursor:"pointer"},[`${t}-ok`]:{marginInlineStart:"auto"}},[`${t}-range-wrapper`]:{display:"flex",position:"relative"},[`${t}-range-arrow`]:J({position:"absolute",zIndex:1,display:"none",marginInlineStart:f*1.5,transition:`left ${k} ease-out`},Fu(R,P,F,O,a)),[`${t}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:O,borderRadius:N,boxShadow:V,transition:`margin ${k}`,[`${t}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${t}-presets`]:{display:"flex",flexDirection:"column",minWidth:Z,maxWidth:q,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:C,borderInlineEnd:`${c}px ${h} ${W}`,li:J(J({},Os),{borderRadius:H,paddingInline:C,paddingBlock:(y-Math.round(p*I))/2,cursor:"pointer",transition:`all ${k}`,"+ li":{marginTop:b},"&:hover":{background:j}})}},[`${t}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr",[`${t}-panel`]:{borderWidth:`0 0 ${c}px`},"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${t}-content,
|
|
table`]:{textAlign:"center"},"&-focused":{borderColor:i}}}}),"&-dropdown-range":{padding:`${R*2/3}px 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${t}-separator`]:{transform:"rotate(180deg)"},[`${t}-footer`]:{"&-extra":{direction:"rtl"}}}})},ka(e,"slide-up"),ka(e,"slide-down"),Sa(e,"move-up"),Sa(e,"move-down")]},Zh=e=>{const{componentCls:n,controlHeightLG:a,controlHeightSM:v,colorPrimary:p,paddingXXS:f}=e;return{pickerCellCls:`${n}-cell`,pickerCellInnerCls:`${n}-cell-inner`,pickerTextHeight:a,pickerPanelCellWidth:v*1.5,pickerPanelCellHeight:v,pickerDateHoverRangeBorderColor:new Gt(p).lighten(20).toHexString(),pickerBasicCellHoverWithRangeColor:new Gt(p).lighten(35).toHexString(),pickerPanelWithoutTimeCellHeight:a*1.65,pickerYearMonthCellWidth:a*1.5,pickerTimePanelColumnHeight:28*8,pickerTimePanelColumnWidth:a*1.4,pickerTimePanelCellHeight:28,pickerQuarterPanelContentHeight:a*1.4,pickerCellPaddingVertical:f,pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconBorderWidth:1.5}},Hl=kn("DatePicker",e=>{const t=Jt(Qs(e),Zh(e));return[Yh(t),Gh(t),el(e,{focusElCls:`${e.componentCls}-focused`})]},e=>({presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50})),Kh=()=>({prefixCls:String,activeKey:pt([Array,Number,String]),defaultActiveKey:pt([Array,Number,String]),accordion:Ke(),destroyInactivePanel:Ke(),bordered:Ke(),expandIcon:De(),openAnimation:Oe.object,expandIconPosition:Nt(),collapsible:Nt(),ghost:Ke(),onChange:De(),"onUpdate:activeKey":De()}),zl=()=>({openAnimation:Oe.object,prefixCls:String,header:Oe.any,headerClass:String,showArrow:Ke(),isActive:Ke(),destroyInactivePanel:Ke(),disabled:Ke(),accordion:Ke(),forceRender:Ke(),expandIcon:De(),extra:Oe.any,panelKey:pt(),collapsible:Nt(),role:String,onItemClick:De()}),Xh=e=>{const{componentCls:t,collapseContentBg:n,padding:a,collapseContentPaddingHorizontal:v,collapseHeaderBg:p,collapseHeaderPadding:f,collapsePanelBorderRadius:m,lineWidth:c,lineType:h,colorBorder:i,colorText:o,colorTextHeading:l,colorTextDisabled:s,fontSize:r,lineHeight:u,marginSM:d,paddingSM:g,motionDurationSlow:y,fontSizeIcon:x}=e,C=`${c}px ${h} ${i}`;return{[t]:J(J({},Yt(e)),{backgroundColor:p,border:C,borderBottom:0,borderRadius:`${m}px`,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:C,"&:last-child":{[`
|
|
&,
|
|
& > ${t}-header`]:{borderRadius:`0 0 ${m}px ${m}px`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:f,color:l,lineHeight:u,cursor:"pointer",transition:`all ${y}, visibility 0s`,[`> ${t}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${t}-expand-icon`]:{height:r*u,display:"flex",alignItems:"center",paddingInlineEnd:d},[`${t}-arrow`]:J(J({},Bs()),{fontSize:x,svg:{transition:`transform ${y}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}},[`${t}-header-collapsible-only`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-icon-collapsible-only`]:{cursor:"default",[`${t}-expand-icon`]:{cursor:"pointer"}},[`&${t}-no-arrow`]:{[`> ${t}-header`]:{paddingInlineStart:g}}},[`${t}-content`]:{color:o,backgroundColor:n,borderTop:C,[`& > ${t}-content-box`]:{padding:`${a}px ${v}px`},"&-hidden":{display:"none"}},[`${t}-item:last-child`]:{[`> ${t}-content`]:{borderRadius:`0 0 ${m}px ${m}px`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:s,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:d}}}}})}},Qh=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow svg`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},Jh=e=>{const{componentCls:t,collapseHeaderBg:n,paddingXXS:a,colorBorder:v}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${v}`},[`
|
|
> ${t}-item:last-child,
|
|
> ${t}-item:last-child ${t}-header
|
|
`]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:a}}}},qh=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},ef=kn("Collapse",e=>{const t=Jt(e,{collapseContentBg:e.colorBgContainer,collapseHeaderBg:e.colorFillAlter,collapseHeaderPadding:`${e.paddingSM}px ${e.padding}px`,collapsePanelBorderRadius:e.borderRadiusLG,collapseContentPaddingHorizontal:16});return[Xh(t),Jh(t),qh(t),Qh(t),md(t)]});function Oa(e){let t=e;if(!Array.isArray(t)){const n=typeof t;t=n==="number"||n==="string"?[t]:[]}return t.map(n=>String(n))}const Sn=ce({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:ei(Kh(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(e,t){let{attrs:n,slots:a,emit:v}=t;const p=Y(Oa(Hu([e.activeKey,e.defaultActiveKey])));me(()=>e.activeKey,()=>{p.value=Oa(e.activeKey)},{deep:!0});const{prefixCls:f,direction:m,rootPrefixCls:c}=Dt("collapse",e),[h,i]=ef(f),o=le(()=>{const{expandIconPosition:g}=e;return g!==void 0?g:m.value==="rtl"?"end":"start"}),l=g=>{const{expandIcon:y=a.expandIcon}=e,x=y?y(g):D(rl,{rotate:g.isActive?90:void 0},null);return D("div",{class:[`${f.value}-expand-icon`,i.value],onClick:()=>["header","icon"].includes(e.collapsible)&&r(g.panelKey)},[Fs(Array.isArray(y)?x[0]:x)?qn(x,{class:`${f.value}-arrow`},!1):x])},s=g=>{e.activeKey===void 0&&(p.value=g);const y=e.accordion?g[0]:g;v("update:activeKey",y),v("change",y)},r=g=>{let y=p.value;if(e.accordion)y=y[0]===g?[]:[g];else{y=[...y];const x=y.indexOf(g);x>-1?y.splice(x,1):y.push(g)}s(y)},u=(g,y)=>{var x,C,b;if(qc(g))return;const w=p.value,{accordion:_,destroyInactivePanel:I,collapsible:E,openAnimation:k}=e,A=k||vd(`${c.value}-motion-collapse`),S=String((x=g.key)!==null&&x!==void 0?x:y),{header:M=(b=(C=g.children)===null||C===void 0?void 0:C.header)===null||b===void 0?void 0:b.call(C),headerClass:$,collapsible:L,disabled:T}=g.props||{};let R=!1;_?R=w[0]===S:R=w.indexOf(S)>-1;let P=L??E;(T||T==="")&&(P="disabled");const F={key:S,panelKey:S,header:M,headerClass:$,isActive:R,prefixCls:f.value,destroyInactivePanel:I,openAnimation:A,accordion:_,onItemClick:P==="disabled"?null:r,expandIcon:l,collapsible:P};return qn(g,F)},d=()=>{var g;return nr((g=a.default)===null||g===void 0?void 0:g.call(a)).map(u)};return()=>{const{accordion:g,bordered:y,ghost:x}=e,C=Ie(f.value,{[`${f.value}-borderless`]:!y,[`${f.value}-icon-position-${o.value}`]:!0,[`${f.value}-rtl`]:m.value==="rtl",[`${f.value}-ghost`]:!!x,[n.class]:!!n.class},i.value);return h(D("div",oe(oe({class:C},Jc(n)),{},{style:n.style,role:g?"tablist":null}),[d()]))}}}),tf=ce({compatConfig:{MODE:3},name:"PanelContent",props:zl(),setup(e,t){let{slots:n}=t;const a=Qe(!1);return ko(()=>{(e.isActive||e.forceRender)&&(a.value=!0)}),()=>{var v;if(!a.value)return null;const{prefixCls:p,isActive:f,role:m}=e;return D("div",{class:Ie(`${p}-content`,{[`${p}-content-active`]:f,[`${p}-content-inactive`]:!f}),role:m},[D("div",{class:`${p}-content-box`},[(v=n.default)===null||v===void 0?void 0:v.call(n)])])}}}),Bn=ce({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:ei(zl(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(e,t){let{slots:n,emit:a,attrs:v}=t;zu(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:p}=Dt("collapse",e),f=()=>{a("itemClick",e.panelKey)},m=c=>{(c.key==="Enter"||c.keyCode===13||c.which===13)&&f()};return()=>{var c,h;const{header:i=(c=n.header)===null||c===void 0?void 0:c.call(n),headerClass:o,isActive:l,showArrow:s,destroyInactivePanel:r,accordion:u,forceRender:d,openAnimation:g,expandIcon:y=n.expandIcon,extra:x=(h=n.extra)===null||h===void 0?void 0:h.call(n),collapsible:C}=e,b=C==="disabled",w=p.value,_=Ie(`${w}-header`,{[o]:o,[`${w}-header-collapsible-only`]:C==="header",[`${w}-icon-collapsible-only`]:C==="icon"}),I=Ie({[`${w}-item`]:!0,[`${w}-item-active`]:l,[`${w}-item-disabled`]:b,[`${w}-no-arrow`]:!s,[`${v.class}`]:!!v.class});let E=D("i",{class:"arrow"},null);s&&typeof y=="function"&&(E=y(e));const k=at(D(tf,{prefixCls:w,isActive:l,forceRender:d,role:u?"tabpanel":null},{default:n.default}),[[dt,l]]),A=J({appear:!1,css:!1},g);return D("div",oe(oe({},v),{},{class:I}),[D("div",{class:_,onClick:()=>!["header","icon"].includes(C)&&f(),role:u?"tab":"button",tabindex:b?-1:0,"aria-expanded":l,onKeypress:m},[s&&E,D("span",{onClick:()=>C==="header"&&f(),class:`${w}-header-text`},[i]),x&&D("div",{class:`${w}-extra`},[x])]),D(or,A,{default:()=>[!r||l?k:null]})])}}});Sn.Panel=Bn;Sn.install=function(e){return e.component(Sn.name,Sn),e.component(Bn.name,Bn),e};const nf=(e,t)=>{let{attrs:n,slots:a}=t;return D(Mn,oe(oe({size:"small",type:"primary"},e),n),a)},of=nf,Bo=(e,t,n)=>{const a=eu(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${a}Bg`],borderColor:e[`color${a}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},rf=e=>Oi(e,(t,n)=>{let{textColor:a,lightBorderColor:v,lightColor:p,darkColor:f}=n;return{[`${e.componentCls}-${t}`]:{color:a,background:p,borderColor:v,"&-inverse":{color:e.colorTextLightSolid,background:f,borderColor:f},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),af=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:a,componentCls:v}=e,p=a-n,f=t-n;return{[v]:J(J({},Yt(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:p,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${v}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${v}-close-icon`]:{marginInlineStart:f,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${v}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${v}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:p}}),[`${v}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},Wl=kn("Tag",e=>{const{fontSize:t,lineHeight:n,lineWidth:a,fontSizeIcon:v}=e,p=Math.round(t*n),f=e.fontSizeSM,m=p-a*2,c=e.colorFillAlter,h=e.colorText,i=Jt(e,{tagFontSize:f,tagLineHeight:m,tagDefaultBg:c,tagDefaultColor:h,tagIconSize:v-2*a,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[af(i),rf(i),Bo(i,"success","Success"),Bo(i,"processing","Info"),Bo(i,"error","Error"),Bo(i,"warning","Warning")]}),sf=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),lf=ce({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:sf(),setup(e,t){let{slots:n,emit:a,attrs:v}=t;const{prefixCls:p}=Dt("tag",e),[f,m]=Wl(p),c=i=>{const{checked:o}=e;a("update:checked",!o),a("change",!o),a("click",i)},h=le(()=>Ie(p.value,m.value,{[`${p.value}-checkable`]:!0,[`${p.value}-checkable-checked`]:e.checked}));return()=>{var i;return f(D("span",oe(oe({},v),{},{class:[h.value,v.class],onClick:c}),[(i=n.default)===null||i===void 0?void 0:i.call(n)]))}}}),Yi=lf,cf=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:Oe.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:tu(),"onUpdate:visible":Function,icon:Oe.any,bordered:{type:Boolean,default:!0}}),bo=ce({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:cf(),slots:Object,setup(e,t){let{slots:n,emit:a,attrs:v}=t;const{prefixCls:p,direction:f}=Dt("tag",e),[m,c]=Wl(p),h=Qe(!0);ko(()=>{e.visible!==void 0&&(h.value=e.visible)});const i=r=>{r.stopPropagation(),a("update:visible",!1),a("close",r),!r.defaultPrevented&&e.visible===void 0&&(h.value=!1)},o=le(()=>cr(e.color)||Wu(e.color)),l=le(()=>Ie(p.value,c.value,{[`${p.value}-${e.color}`]:o.value,[`${p.value}-has-color`]:e.color&&!o.value,[`${p.value}-hidden`]:!h.value,[`${p.value}-rtl`]:f.value==="rtl",[`${p.value}-borderless`]:!e.bordered})),s=r=>{a("click",r)};return()=>{var r,u,d;const{icon:g=(r=n.icon)===null||r===void 0?void 0:r.call(n),color:y,closeIcon:x=(u=n.closeIcon)===null||u===void 0?void 0:u.call(n),closable:C=!1}=e,b=()=>C?x?D("span",{class:`${p.value}-close-icon`,onClick:i},[x]):D(Hs,{class:`${p.value}-close-icon`,onClick:i},null):null,w={backgroundColor:y&&!o.value?y:void 0},_=g||null,I=(d=n.default)===null||d===void 0?void 0:d.call(n),E=_?D(Fe,null,[_,D("span",null,[I])]):I,k=e.onClick!==void 0,A=D("span",oe(oe({},v),{},{onClick:s,class:[l.value,v.class],style:[w,v.style]}),[E,b()]);return m(k?D(Vu,null,{default:()=>[A]}):A)}}});bo.CheckableTag=Yi;bo.install=function(e){return e.component(bo.name,bo),e.component(Yi.name,Yi),e};const Vl=bo;function uf(e,t){let{slots:n,attrs:a}=t;return D(Vl,oe(oe({color:"blue"},e),a),n)}var df={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};const hf=df;function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){ff(e,v,n[v])})}return e}function ff(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pr=function(t,n){var a=Ba({},t,n.attrs);return D(dn,Ba({},a,{icon:hf}),null)};Pr.displayName="CalendarOutlined";Pr.inheritAttrs=!1;const jl=Pr;var pf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};const gf=pf;function Fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){mf(e,v,n[v])})}return e}function mf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nr=function(t,n){var a=Fa({},t,n.attrs);return D(dn,Fa({},a,{icon:gf}),null)};Nr.displayName="ClockCircleOutlined";Nr.inheritAttrs=!1;const Ul=Nr;function vf(e,t,n){return n!==void 0?n:t==="year"&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t==="quarter"&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t==="month"&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t==="week"&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t==="time"&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder}function yf(e,t,n){return n!==void 0?n:t==="year"&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t==="month"&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t==="week"&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t==="time"&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder}function Gl(e,t){const n={adjustX:1,adjustY:1};switch(t){case"bottomLeft":return{points:["tl","bl"],offset:[0,4],overflow:n};case"bottomRight":return{points:["tr","br"],offset:[0,4],overflow:n};case"topLeft":return{points:["bl","tl"],offset:[0,-4],overflow:n};case"topRight":return{points:["br","tr"],offset:[0,-4],overflow:n};default:return{points:e==="rtl"?["tr","br"]:["tl","bl"],offset:[0,4],overflow:n}}}function Yl(){return{id:String,dropdownClassName:String,popupClassName:String,popupStyle:Go(),transitionName:String,placeholder:String,allowClear:Ke(),autofocus:Ke(),disabled:Ke(),tabindex:Number,open:Ke(),defaultOpen:Ke(),inputReadOnly:Ke(),format:pt([String,Function,Array]),getPopupContainer:De(),panelRender:De(),onChange:De(),"onUpdate:value":De(),onOk:De(),onOpenChange:De(),"onUpdate:open":De(),onFocus:De(),onBlur:De(),onMousedown:De(),onMouseup:De(),onMouseenter:De(),onMouseleave:De(),onClick:De(),onContextmenu:De(),onKeydown:De(),role:String,name:String,autocomplete:String,direction:Nt(),showToday:Ke(),showTime:pt([Boolean,Object]),locale:Go(),size:Nt(),bordered:Ke(),dateRender:De(),disabledDate:De(),mode:Nt(),picker:Nt(),valueFormat:String,placement:Nt(),status:Nt(),disabledHours:De(),disabledMinutes:De(),disabledSeconds:De()}}function wf(){return{defaultPickerValue:pt([Object,String]),defaultValue:pt([Object,String]),value:pt([Object,String]),presets:Cn(),disabledTime:De(),renderExtraFooter:De(),showNow:Ke(),monthCellRender:De(),monthCellContentRender:De()}}function bf(){return{allowEmpty:Cn(),dateRender:De(),defaultPickerValue:Cn(),defaultValue:Cn(),value:Cn(),presets:Cn(),disabledTime:De(),disabled:pt([Boolean,Array]),renderExtraFooter:De(),separator:{type:String},showTime:pt([Boolean,Object]),ranges:Go(),placeholder:Cn(),mode:Cn(),onChange:De(),"onUpdate:value":De(),onCalendarChange:De(),onPanelChange:De(),onOk:De()}}var Cf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};function xf(e,t){function n(h,i){const o=J(J(J({},Yl()),wf()),t);return ce({compatConfig:{MODE:3},name:i,inheritAttrs:!1,props:o,slots:Object,setup(l,s){let{slots:r,expose:u,attrs:d,emit:g}=s;const y=l,x=qo(),C=sr.useInject(),{prefixCls:b,direction:w,getPopupContainer:_,size:I,rootPrefixCls:E,disabled:k}=Dt("picker",y),{compactSize:A,compactItemClassnames:S}=ur(b,w),M=le(()=>A.value||I.value),[$,L]=Hl(b),T=Y();u({focus:()=>{var G;(G=T.value)===null||G===void 0||G.focus()},blur:()=>{var G;(G=T.value)===null||G===void 0||G.blur()}});const R=G=>y.valueFormat?e.toString(G,y.valueFormat):G,P=(G,K)=>{const ee=R(G);g("update:value",ee),g("change",ee,K),x.onFieldChange()},F=G=>{g("update:open",G),g("openChange",G)},O=G=>{g("focus",G)},N=G=>{g("blur",G),x.onFieldBlur()},V=(G,K)=>{const ee=R(G);g("panelChange",ee,K)},H=G=>{const K=R(G);g("ok",K)},[W]=zs("DatePicker",Ws),j=le(()=>y.value?y.valueFormat?e.toDate(y.value,y.valueFormat):y.value:y.value===""?void 0:y.value),Z=le(()=>y.defaultValue?y.valueFormat?e.toDate(y.defaultValue,y.valueFormat):y.defaultValue:y.defaultValue===""?void 0:y.defaultValue),q=le(()=>y.defaultPickerValue?y.valueFormat?e.toDate(y.defaultPickerValue,y.valueFormat):y.defaultPickerValue:y.defaultPickerValue===""?void 0:y.defaultPickerValue);return()=>{var G,K,ee,te,ae,de;const he=J(J({},W.value),y.locale),re=J(J({},y),d),{bordered:ue=!0,placeholder:ne,suffixIcon:pe=(G=r.suffixIcon)===null||G===void 0?void 0:G.call(r),showToday:Se=!0,transitionName:Me,allowClear:Le=!0,dateRender:Ae=r.dateRender,renderExtraFooter:We=r.renderExtraFooter,monthCellRender:Ve=r.monthCellRender||y.monthCellContentRender||r.monthCellContentRender,clearIcon:Ze=(K=r.clearIcon)===null||K===void 0?void 0:K.call(r),id:se=x.id.value}=re,we=Cf(re,["bordered","placeholder","suffixIcon","showToday","transitionName","allowClear","dateRender","renderExtraFooter","monthCellRender","clearIcon","id"]),Ce=re.showTime===""?!0:re.showTime,{format:Ee}=re;let Be={};h&&(Be.picker=h);const je=h||re.picker||"date";Be=J(J(J({},Be),Ce?Xo(J({format:Ee,picker:je},typeof Ce=="object"?Ce:{})):{}),je==="time"?Xo(J(J({format:Ee},we),{picker:je})):{});const Ue=b.value,Xe=D(Fe,null,[pe||(h==="time"?D(Ul,null,null):D(jl,null,null)),C.hasFeedback&&C.feedbackIcon]);return $(D(Lh,oe(oe(oe({monthCellRender:Ve,dateRender:Ae,renderExtraFooter:We,ref:T,placeholder:vf(he,je,ne),suffixIcon:Xe,dropdownAlign:Gl(w.value,y.placement),clearIcon:Ze||D(Vs,null,null),allowClear:Le,transitionName:Me||`${E.value}-slide-up`},we),Be),{},{id:se,picker:je,value:j.value,defaultValue:Z.value,defaultPickerValue:q.value,showToday:Se,locale:he.lang,class:Ie({[`${Ue}-${M.value}`]:M.value,[`${Ue}-borderless`]:!ue},yo(Ue,lr(C.status,y.status),C.hasFeedback),d.class,L.value,S.value),disabled:k.value,prefixCls:Ue,getPopupContainer:d.getCalendarContainer||_.value,generateConfig:e,prevIcon:((ee=r.prevIcon)===null||ee===void 0?void 0:ee.call(r))||D("span",{class:`${Ue}-prev-icon`},null),nextIcon:((te=r.nextIcon)===null||te===void 0?void 0:te.call(r))||D("span",{class:`${Ue}-next-icon`},null),superPrevIcon:((ae=r.superPrevIcon)===null||ae===void 0?void 0:ae.call(r))||D("span",{class:`${Ue}-super-prev-icon`},null),superNextIcon:((de=r.superNextIcon)===null||de===void 0?void 0:de.call(r))||D("span",{class:`${Ue}-super-next-icon`},null),components:Zl,direction:w.value,dropdownClassName:Ie(L.value,y.popupClassName,y.dropdownClassName),onChange:P,onOpenChange:F,onFocus:O,onBlur:N,onPanelChange:V,onOk:H}),null))}}})}const a=n(void 0,"ADatePicker"),v=n("week","AWeekPicker"),p=n("month","AMonthPicker"),f=n("year","AYearPicker"),m=n("time","TimePicker"),c=n("quarter","AQuarterPicker");return{DatePicker:a,WeekPicker:v,MonthPicker:p,YearPicker:f,TimePicker:m,QuarterPicker:c}}var $f={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};const Sf=$f;function Ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){kf(e,v,n[v])})}return e}function kf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Or=function(t,n){var a=Ha({},t,n.attrs);return D(dn,Ha({},a,{icon:Sf}),null)};Or.displayName="SwapRightOutlined";Or.inheritAttrs=!1;const _f=Or;var Mf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};function Af(e,t){return ce({compatConfig:{MODE:3},name:"ARangePicker",inheritAttrs:!1,props:J(J(J({},Yl()),bf()),t),slots:Object,setup(a,v){let{expose:p,slots:f,attrs:m,emit:c}=v;const h=a,i=qo(),o=sr.useInject(),{prefixCls:l,direction:s,getPopupContainer:r,size:u,rootPrefixCls:d,disabled:g}=Dt("picker",h),{compactSize:y,compactItemClassnames:x}=ur(l,s),C=le(()=>y.value||u.value),[b,w]=Hl(l),_=Y();p({focus:()=>{var O;(O=_.value)===null||O===void 0||O.focus()},blur:()=>{var O;(O=_.value)===null||O===void 0||O.blur()}});const I=O=>h.valueFormat?e.toString(O,h.valueFormat):O,E=(O,N)=>{const V=I(O);c("update:value",V),c("change",V,N),i.onFieldChange()},k=O=>{c("update:open",O),c("openChange",O)},A=O=>{c("focus",O)},S=O=>{c("blur",O),i.onFieldBlur()},M=(O,N)=>{const V=I(O);c("panelChange",V,N)},$=O=>{const N=I(O);c("ok",N)},L=(O,N,V)=>{const H=I(O);c("calendarChange",H,N,V)},[T]=zs("DatePicker",Ws),R=le(()=>h.value&&h.valueFormat?e.toDate(h.value,h.valueFormat):h.value),P=le(()=>h.defaultValue&&h.valueFormat?e.toDate(h.defaultValue,h.valueFormat):h.defaultValue),F=le(()=>h.defaultPickerValue&&h.valueFormat?e.toDate(h.defaultPickerValue,h.valueFormat):h.defaultPickerValue);return()=>{var O,N,V,H,W,j,Z;const q=J(J({},T.value),h.locale),G=J(J({},h),m),{prefixCls:K,bordered:ee=!0,placeholder:te,suffixIcon:ae=(O=f.suffixIcon)===null||O===void 0?void 0:O.call(f),picker:de="date",transitionName:he,allowClear:re=!0,dateRender:ue=f.dateRender,renderExtraFooter:ne=f.renderExtraFooter,separator:pe=(N=f.separator)===null||N===void 0?void 0:N.call(f),clearIcon:Se=(V=f.clearIcon)===null||V===void 0?void 0:V.call(f),id:Me=i.id.value}=G,Le=Mf(G,["prefixCls","bordered","placeholder","suffixIcon","picker","transitionName","allowClear","dateRender","renderExtraFooter","separator","clearIcon","id"]);delete Le["onUpdate:value"],delete Le["onUpdate:open"];const{format:Ae,showTime:We}=G;let Ve={};Ve=J(J(J({},Ve),We?Xo(J({format:Ae,picker:de},We)):{}),de==="time"?Xo(J(J({format:Ae},tl(Le,["disabledTime"])),{picker:de})):{});const Ze=l.value,se=D(Fe,null,[ae||(de==="time"?D(Ul,null,null):D(jl,null,null)),o.hasFeedback&&o.feedbackIcon]);return b(D(Vh,oe(oe(oe({dateRender:ue,renderExtraFooter:ne,separator:pe||D("span",{"aria-label":"to",class:`${Ze}-separator`},[D(_f,null,null)]),ref:_,dropdownAlign:Gl(s.value,h.placement),placeholder:yf(q,de,te),suffixIcon:se,clearIcon:Se||D(Vs,null,null),allowClear:re,transitionName:he||`${d.value}-slide-up`},Le),Ve),{},{disabled:g.value,id:Me,value:R.value,defaultValue:P.value,defaultPickerValue:F.value,picker:de,class:Ie({[`${Ze}-${C.value}`]:C.value,[`${Ze}-borderless`]:!ee},yo(Ze,lr(o.status,h.status),o.hasFeedback),m.class,w.value,x.value),locale:q.lang,prefixCls:Ze,getPopupContainer:m.getCalendarContainer||r.value,generateConfig:e,prevIcon:((H=f.prevIcon)===null||H===void 0?void 0:H.call(f))||D("span",{class:`${Ze}-prev-icon`},null),nextIcon:((W=f.nextIcon)===null||W===void 0?void 0:W.call(f))||D("span",{class:`${Ze}-next-icon`},null),superPrevIcon:((j=f.superPrevIcon)===null||j===void 0?void 0:j.call(f))||D("span",{class:`${Ze}-super-prev-icon`},null),superNextIcon:((Z=f.superNextIcon)===null||Z===void 0?void 0:Z.call(f))||D("span",{class:`${Ze}-super-next-icon`},null),components:Zl,direction:s.value,dropdownClassName:Ie(w.value,h.popupClassName,h.dropdownClassName),onChange:E,onOpenChange:k,onFocus:A,onBlur:S,onPanelChange:M,onOk:$,onCalendarChange:L}),null))}}})}const Zl={button:of,rangeItem:uf};function Lf(e){return e?Array.isArray(e)?e:[e]:[]}function Xo(e){const{format:t,picker:n,showHour:a,showMinute:v,showSecond:p,use12Hours:f}=e,m=Lf(t)[0],c=J({},e);return m&&typeof m=="string"&&(!m.includes("s")&&p===void 0&&(c.showSecond=!1),!m.includes("m")&&v===void 0&&(c.showMinute=!1),!m.includes("H")&&!m.includes("h")&&a===void 0&&(c.showHour=!1),(m.includes("a")||m.includes("A"))&&f===void 0&&(c.use12Hours=!0)),n==="time"?c:(typeof m=="function"&&delete c.format,{showTime:c})}function Ef(e,t){const{DatePicker:n,WeekPicker:a,MonthPicker:v,YearPicker:p,TimePicker:f,QuarterPicker:m}=xf(e,t),c=Af(e,t);return{DatePicker:n,WeekPicker:a,MonthPicker:v,YearPicker:p,TimePicker:f,QuarterPicker:m,RangePicker:c}}const{DatePicker:wi,WeekPicker:bi,MonthPicker:Ci,YearPicker:If,TimePicker:Tf,QuarterPicker:xi,RangePicker:$i}=Ef(th),Df=J(wi,{WeekPicker:bi,MonthPicker:Ci,YearPicker:If,RangePicker:$i,TimePicker:Tf,QuarterPicker:xi,install:e=>(e.component(wi.name,wi),e.component($i.name,$i),e.component(Ci.name,Ci),e.component(bi.name,bi),e.component(xi.name,xi),e)}),Rf=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:a,lineWidth:v}=e;return{[t]:J(J({},Yt(e)),{borderBlockStart:`${v}px solid ${a}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${e.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${v}px solid ${a}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${a}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${v}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${t}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:a,borderStyle:"dashed",borderWidth:`${v}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:v,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},Pf=kn("Divider",e=>{const t=Jt(e,{dividerVerticalGutterMargin:e.marginXS,dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG});return[Rf(t)]},{sizePaddingEdgeHorizontal:0}),Nf=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),Of=ce({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:Nf(),setup(e,t){let{slots:n,attrs:a}=t;const{prefixCls:v,direction:p}=Dt("divider",e),[f,m]=Pf(v),c=le(()=>e.orientation==="left"&&e.orientationMargin!=null),h=le(()=>e.orientation==="right"&&e.orientationMargin!=null),i=le(()=>{const{type:s,dashed:r,plain:u}=e,d=v.value;return{[d]:!0,[m.value]:!!m.value,[`${d}-${s}`]:!0,[`${d}-dashed`]:!!r,[`${d}-plain`]:!!u,[`${d}-rtl`]:p.value==="rtl",[`${d}-no-default-orientation-margin-left`]:c.value,[`${d}-no-default-orientation-margin-right`]:h.value}}),o=le(()=>{const s=typeof e.orientationMargin=="number"?`${e.orientationMargin}px`:e.orientationMargin;return J(J({},c.value&&{marginLeft:s}),h.value&&{marginRight:s})}),l=le(()=>e.orientation.length>0?"-"+e.orientation:e.orientation);return()=>{var s;const r=nr((s=n.default)===null||s===void 0?void 0:s.call(n));return f(D("div",oe(oe({},a),{},{class:[i.value,r.length?`${v.value}-with-text ${v.value}-with-text${l.value}`:"",a.class],role:"separator"}),[r.length?D("span",{class:`${v.value}-inner-text`,style:o.value},[r]):null]))}}}),Eo=js(Of);function Bf(e){const t=Y(null),n=Ct(J({},e)),a=Y([]),v=p=>{t.value===null&&(a.value=[],t.value=At(()=>{let f;a.value.forEach(m=>{f=J(J({},f),m)}),J(n,f),t.value=null})),a.value.push(p)};return ot(()=>{t.value&&At.cancel(t.value)}),[n,v]}function za(e,t,n,a){const v=t+n,p=(n-a)/2;if(n>a){if(t>0)return{[e]:p};if(t<0&&v<a)return{[e]:-p}}else if(t<0||v>a)return{[e]:t<0?p:-p};return{}}function Ff(e,t,n,a){const{width:v,height:p}=Su();let f=null;return e<=v&&t<=p?f={x:0,y:0}:(e>v||t>p)&&(f=J(J({},za("x",n,e,v)),za("y",a,t,p))),f}var Hf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};const Wa=Symbol("previewGroupContext"),Br={provide:e=>{Qt(Wa,e)},inject:()=>Lt(Wa,{isPreviewGroup:Qe(!1),previewUrls:le(()=>new Map),setPreviewUrls:()=>{},current:Y(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},zf=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),Wf=ce({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:zf(),setup(e,t){let{slots:n}=t;const a=le(()=>{const b={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof e.preview=="object"?Jl(e.preview,b):b}),v=Ct(new Map),p=Y(),f=le(()=>a.value.visible),m=le(()=>a.value.getContainer),c=(b,w)=>{var _,I;(I=(_=a.value).onVisibleChange)===null||I===void 0||I.call(_,b,w)},[h,i]=zt(!!f.value,{value:f,onChange:c}),o=Y(null),l=le(()=>f.value!==void 0),s=le(()=>Array.from(v.keys())),r=le(()=>s.value[a.value.current]),u=le(()=>new Map(Array.from(v).filter(b=>{let[,{canPreview:w}]=b;return!!w}).map(b=>{let[w,{url:_}]=b;return[w,_]}))),d=function(b,w){let _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;v.set(b,{url:w,canPreview:_})},g=b=>{p.value=b},y=b=>{o.value=b},x=function(b,w){let _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const I=()=>{v.delete(b)};return v.set(b,{url:w,canPreview:_}),I},C=b=>{b==null||b.stopPropagation(),i(!1),y(null)};return me(r,b=>{g(b)},{immediate:!0,flush:"post"}),ko(()=>{h.value&&l.value&&g(r.value)},{flush:"post"}),Br.provide({isPreviewGroup:Qe(!0),previewUrls:u,setPreviewUrls:d,current:p,setCurrent:g,setShowPreview:i,setMousePosition:y,registerImage:x}),()=>{const b=Hf(a.value,[]);return D(Fe,null,[n.default&&n.default(),D(Xl,oe(oe({},b),{},{"ria-hidden":!h.value,visible:h.value,prefixCls:e.previewPrefixCls,onClose:C,mousePosition:o.value,src:u.value.get(p.value),icons:e.icons,getContainer:m.value}),null)])}}}),Kl=Wf,In={x:0,y:0},Vf=J(J({},ku()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),jf=ce({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:Vf,emits:["close","afterClose"],setup(e,t){let{emit:n,attrs:a}=t;const{rotateLeft:v,rotateRight:p,zoomIn:f,zoomOut:m,close:c,left:h,right:i,flipX:o,flipY:l}=Ct(e.icons),s=Qe(1),r=Qe(0),u=Ct({x:1,y:1}),[d,g]=Bf(In),y=()=>n("close"),x=Qe(),C=Ct({originX:0,originY:0,deltaX:0,deltaY:0}),b=Qe(!1),w=Br.inject(),{previewUrls:_,current:I,isPreviewGroup:E,setCurrent:k}=w,A=le(()=>_.value.size),S=le(()=>Array.from(_.value.keys())),M=le(()=>S.value.indexOf(I.value)),$=le(()=>E.value?_.value.get(I.value):e.src),L=le(()=>E.value&&A.value>1),T=Qe({wheelDirection:0}),R=()=>{s.value=1,r.value=0,u.x=1,u.y=1,g(In),n("afterClose")},P=ne=>{ne?s.value+=.5:s.value++,g(In)},F=ne=>{s.value>1&&(ne?s.value-=.5:s.value--),g(In)},O=()=>{r.value+=90},N=()=>{r.value-=90},V=()=>{u.x=-u.x},H=()=>{u.y=-u.y},W=ne=>{ne.preventDefault(),ne.stopPropagation(),M.value>0&&k(S.value[M.value-1])},j=ne=>{ne.preventDefault(),ne.stopPropagation(),M.value<A.value-1&&k(S.value[M.value+1])},Z=Ie({[`${e.prefixCls}-moving`]:b.value}),q=`${e.prefixCls}-operations-operation`,G=`${e.prefixCls}-operations-icon`,K=[{icon:c,onClick:y,type:"close"},{icon:f,onClick:()=>P(),type:"zoomIn"},{icon:m,onClick:()=>F(),type:"zoomOut",disabled:le(()=>s.value===1)},{icon:p,onClick:O,type:"rotateRight"},{icon:v,onClick:N,type:"rotateLeft"},{icon:o,onClick:V,type:"flipX"},{icon:l,onClick:H,type:"flipY"}],ee=()=>{if(e.visible&&b.value){const ne=x.value.offsetWidth*s.value,pe=x.value.offsetHeight*s.value,{left:Se,top:Me}=Js(x.value),Le=r.value%180!==0;b.value=!1;const Ae=Ff(Le?pe:ne,Le?ne:pe,Se,Me);Ae&&g(J({},Ae))}},te=ne=>{ne.button===0&&(ne.preventDefault(),ne.stopPropagation(),C.deltaX=ne.pageX-d.x,C.deltaY=ne.pageY-d.y,C.originX=d.x,C.originY=d.y,b.value=!0)},ae=ne=>{e.visible&&b.value&&g({x:ne.pageX-C.deltaX,y:ne.pageY-C.deltaY})},de=ne=>{if(!e.visible)return;ne.preventDefault();const pe=ne.deltaY;T.value={wheelDirection:pe}},he=ne=>{!e.visible||!L.value||(ne.preventDefault(),ne.keyCode===ze.LEFT?M.value>0&&k(S.value[M.value-1]):ne.keyCode===ze.RIGHT&&M.value<A.value-1&&k(S.value[M.value+1]))},re=()=>{e.visible&&(s.value!==1&&(s.value=1),(d.x!==In.x||d.y!==In.y)&&g(In))};let ue=()=>{};return ot(()=>{me([()=>e.visible,b],()=>{ue();let ne,pe;const Se=Vt(window,"mouseup",ee,!1),Me=Vt(window,"mousemove",ae,!1),Le=Vt(window,"wheel",de,{passive:!1}),Ae=Vt(window,"keydown",he,!1);try{window.top!==window.self&&(ne=Vt(window.top,"mouseup",ee,!1),pe=Vt(window.top,"mousemove",ae,!1))}catch{}ue=()=>{Se.remove(),Me.remove(),Le.remove(),Ae.remove(),ne&&ne.remove(),pe&&pe.remove()}},{flush:"post",immediate:!0}),me([T],()=>{const{wheelDirection:ne}=T.value;ne>0?F(!0):ne<0&&P(!0)})}),Fn(()=>{ue()}),()=>{const{visible:ne,prefixCls:pe,rootClassName:Se}=e;return D(_u,oe(oe({},a),{},{transitionName:e.transitionName,maskTransitionName:e.maskTransitionName,closable:!1,keyboard:!0,prefixCls:pe,onClose:y,afterClose:R,visible:ne,wrapClassName:Z,rootClassName:Se,getContainer:e.getContainer}),{default:()=>[D("div",{class:[`${e.prefixCls}-operations-wrapper`,Se]},[D("ul",{class:`${e.prefixCls}-operations`},[K.map(Me=>{let{icon:Le,onClick:Ae,type:We,disabled:Ve}=Me;return D("li",{class:Ie(q,{[`${e.prefixCls}-operations-operation-disabled`]:Ve&&(Ve==null?void 0:Ve.value)}),onClick:Ae,key:We},[nu(Le,{class:G})])})])]),D("div",{class:`${e.prefixCls}-img-wrapper`,style:{transform:`translate3d(${d.x}px, ${d.y}px, 0)`}},[D("img",{onMousedown:te,onDblclick:re,ref:x,class:`${e.prefixCls}-img`,src:$.value,alt:e.alt,style:{transform:`scale3d(${u.x*s.value}, ${u.y*s.value}, 1) rotate(${r.value}deg)`}},null)]),L.value&&D("div",{class:Ie(`${e.prefixCls}-switch-left`,{[`${e.prefixCls}-switch-left-disabled`]:M.value<=0}),onClick:W},[h]),L.value&&D("div",{class:Ie(`${e.prefixCls}-switch-right`,{[`${e.prefixCls}-switch-right-disabled`]:M.value>=A.value-1}),onClick:j},[i])]})}}}),Xl=jf;var Uf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};const Ql=()=>({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,width:[Number,String],height:[Number,String],previewMask:{type:[Boolean,Function],default:void 0},placeholder:Oe.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),Jl=(e,t)=>{const n=J({},e);return Object.keys(t).forEach(a=>{e[a]===void 0&&(n[a]=t[a])}),n};let Gf=0;const ql=ce({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:Ql(),emits:["click","error"],setup(e,t){let{attrs:n,slots:a,emit:v}=t;const p=le(()=>e.prefixCls),f=le(()=>`${p.value}-preview`),m=le(()=>{const P={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof e.preview=="object"?Jl(e.preview,P):P}),c=le(()=>{var P;return(P=m.value.src)!==null&&P!==void 0?P:e.src}),h=le(()=>e.placeholder&&e.placeholder!==!0||a.placeholder),i=le(()=>m.value.visible),o=le(()=>m.value.getContainer),l=le(()=>i.value!==void 0),s=(P,F)=>{var O,N;(N=(O=m.value).onVisibleChange)===null||N===void 0||N.call(O,P,F)},[r,u]=zt(!!i.value,{value:i,onChange:s}),d=Y(h.value?"loading":"normal");me(()=>e.src,()=>{d.value=h.value?"loading":"normal"});const g=Y(null),y=le(()=>d.value==="error"),x=Br.inject(),{isPreviewGroup:C,setCurrent:b,setShowPreview:w,setMousePosition:_,registerImage:I}=x,E=Y(Gf++),k=le(()=>e.preview&&!y.value),A=()=>{d.value="normal"},S=P=>{d.value="error",v("error",P)},M=P=>{if(!l.value){const{left:F,top:O}=Js(P.target);C.value?(b(E.value),_({x:F,y:O})):g.value={x:F,y:O}}C.value?w(!0):u(!0),v("click",P)},$=()=>{u(!1),l.value||(g.value=null)},L=Y(null);me(()=>L,()=>{d.value==="loading"&&L.value.complete&&(L.value.naturalWidth||L.value.naturalHeight)&&A()});let T=()=>{};ot(()=>{me([c,k],()=>{if(T(),!C.value)return()=>{};T=I(E.value,c.value,k.value),k.value||T()},{flush:"post",immediate:!0})}),Fn(()=>{T()});const R=P=>xd(P)?P+"px":P;return()=>{const{prefixCls:P,wrapperClassName:F,fallback:O,src:N,placeholder:V,wrapperStyle:H,rootClassName:W}=e,{width:j,height:Z,crossorigin:q,decoding:G,alt:K,sizes:ee,srcset:te,usemap:ae,class:de,style:he}=n,re=m.value,{icons:ue,maskClassName:ne}=re,pe=Uf(re,["icons","maskClassName"]),Se=Ie(P,F,W,{[`${P}-error`]:y.value}),Me=y.value&&O?O:c.value,Le={crossorigin:q,decoding:G,alt:K,sizes:ee,srcset:te,usemap:ae,width:j,height:Z,class:Ie(`${P}-img`,{[`${P}-img-placeholder`]:V===!0},de),style:J({height:R(Z)},he)};return D(Fe,null,[D("div",{class:Se,onClick:k.value?M:Ae=>{v("click",Ae)},style:J({width:R(j),height:R(Z)},H)},[D("img",oe(oe(oe({},Le),y.value&&O?{src:O}:{onLoad:A,onError:S,src:N}),{},{ref:L}),null),d.value==="loading"&&D("div",{"aria-hidden":"true",class:`${P}-placeholder`},[V||a.placeholder&&a.placeholder()]),a.previewMask&&k.value&&D("div",{class:[`${P}-mask`,ne]},[a.previewMask()])]),!C.value&&k.value&&D(Xl,oe(oe({},pe),{},{"aria-hidden":!r.value,visible:r.value,prefixCls:f.value,onClose:$,mousePosition:g.value,src:Me,alt:K,getContainer:o.value,icons:ue,rootClassName:W}),null)])}}});ql.PreviewGroup=Kl;const Yf=ql;var Zf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const Kf=Zf;function Va(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){Xf(e,v,n[v])})}return e}function Xf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fr=function(t,n){var a=Va({},t,n.attrs);return D(dn,Va({},a,{icon:Kf}),null)};Fr.displayName="RotateLeftOutlined";Fr.inheritAttrs=!1;const Qf=Fr;var Jf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};const qf=Jf;function ja(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){ep(e,v,n[v])})}return e}function ep(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hr=function(t,n){var a=ja({},t,n.attrs);return D(dn,ja({},a,{icon:qf}),null)};Hr.displayName="RotateRightOutlined";Hr.inheritAttrs=!1;const tp=Hr;var np={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};const op=np;function Ua(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){ip(e,v,n[v])})}return e}function ip(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zr=function(t,n){var a=Ua({},t,n.attrs);return D(dn,Ua({},a,{icon:op}),null)};zr.displayName="ZoomInOutlined";zr.inheritAttrs=!1;const rp=zr;var ap={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};const sp=ap;function Ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){lp(e,v,n[v])})}return e}function lp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wr=function(t,n){var a=Ga({},t,n.attrs);return D(dn,Ga({},a,{icon:sp}),null)};Wr.displayName="ZoomOutOutlined";Wr.inheritAttrs=!1;const cp=Wr;var up={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};const dp=up;function Ya(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){hp(e,v,n[v])})}return e}function hp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vr=function(t,n){var a=Ya({},t,n.attrs);return D(dn,Ya({},a,{icon:dp}),null)};Vr.displayName="SwapOutlined";Vr.inheritAttrs=!1;const Za=Vr,Zi=e=>({position:e||"absolute",inset:0}),fp=e=>{const{iconCls:t,motionDurationSlow:n,paddingXXS:a,marginXXS:v,prefixCls:p}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new Gt("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${p}-mask-info`]:J(J({},Os),{padding:`0 ${a}px`,[t]:{marginInlineEnd:v,svg:{verticalAlign:"baseline"}}})}},pp=e=>{const{previewCls:t,modalMaskBg:n,paddingSM:a,previewOperationColorDisabled:v,motionDurationSlow:p}=e,f=new Gt(n).setAlpha(.1),m=f.clone().setAlpha(.2);return{[`${t}-operations`]:J(J({},Yt(e)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:e.previewOperationColor,listStyle:"none",background:f.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:a,padding:a,cursor:"pointer",transition:`all ${p}`,userSelect:"none","&:hover":{background:m.toRgbString()},"&-disabled":{color:v,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:e.previewOperationSize}})}},gp=e=>{const{modalMaskBg:t,iconCls:n,previewOperationColorDisabled:a,previewCls:v,zIndexPopup:p,motionDurationSlow:f}=e,m=new Gt(t).setAlpha(.1),c=m.clone().setAlpha(.2);return{[`${v}-switch-left, ${v}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:p+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:m.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${f}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:c.toRgbString()},"&-disabled":{"&, &:hover":{color:a,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:e.previewOperationSize}},[`${v}-switch-left`]:{insetInlineStart:e.marginSM},[`${v}-switch-right`]:{insetInlineEnd:e.marginSM}}},mp=e=>{const{motionEaseOut:t,previewCls:n,motionDurationSlow:a,componentCls:v}=e;return[{[`${v}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:J(J({},Zi()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${a} ${t} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":J(J({},Zi()),{transition:`transform ${a} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${v}-preview-root`]:{[`${n}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${v}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:e.zIndexPopup+1,width:"100%"},"&":[pp(e),gp(e)]}]},vp=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:J({},fp(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:J({},Zi())}}},yp=e=>{const{previewCls:t}=e;return{[`${t}-root`]:ju(e,"zoom"),"&":Au(e,!0)}},ec=kn("Image",e=>{const t=`${e.componentCls}-preview`,n=Jt(e,{previewCls:t,modalMaskBg:new Gt("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[vp(n),mp(n),Mu(Jt(n,{componentCls:t})),yp(n)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Gt(e.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new Gt(e.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),tc={rotateLeft:D(Qf,null,null),rotateRight:D(tp,null,null),zoomIn:D(rp,null,null),zoomOut:D(cp,null,null),close:D(Hs,null,null),left:D(qu,null,null),right:D(rl,null,null),flipX:D(Za,null,null),flipY:D(Za,{rotate:90},null)},wp=()=>({previewPrefixCls:String,preview:ou()}),bp=ce({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:wp(),setup(e,t){let{attrs:n,slots:a}=t;const{prefixCls:v,rootPrefixCls:p}=Dt("image",e),f=le(()=>`${v.value}-preview`),[m,c]=ec(v),h=le(()=>{const{preview:i}=e;if(i===!1)return i;const o=typeof i=="object"?i:{};return J(J({},o),{rootClassName:c.value,transitionName:Yo(p.value,"zoom",o.transitionName),maskTransitionName:Yo(p.value,"fade",o.maskTransitionName)})});return()=>m(D(Kl,oe(oe({},J(J({},n),e)),{},{preview:h.value,icons:tc,previewPrefixCls:f.value}),a))}}),Cp=bp,Pn=ce({name:"AImage",inheritAttrs:!1,props:Ql(),setup(e,t){let{slots:n,attrs:a}=t;const{prefixCls:v,rootPrefixCls:p,configProvider:f}=Dt("image",e),[m,c]=ec(v),h=le(()=>{const{preview:i}=e;if(i===!1)return i;const o=typeof i=="object"?i:{};return J(J({icons:tc},o),{transitionName:Yo(p.value,"zoom",o.transitionName),maskTransitionName:Yo(p.value,"fade",o.maskTransitionName)})});return()=>{var i,o;const l=((o=(i=f.locale)===null||i===void 0?void 0:i.value)===null||o===void 0?void 0:o.Image)||iu.Image,s=()=>D("div",{class:`${v.value}-mask-info`},[D(Lu,null,null),l==null?void 0:l.preview]),{previewMask:r=n.previewMask||s}=e;return m(D(Yf,oe(oe({},J(J(J({},a),e),{prefixCls:v.value})),{},{preview:h.value,rootClassName:Ie(e.rootClassName,c.value)}),J(J({},n),{previewMask:typeof r=="function"?r:null})))}}});Pn.PreviewGroup=Cp;Pn.install=function(e){return e.component(Pn.name,Pn),e.component(Pn.PreviewGroup.name,Pn.PreviewGroup),e};const jr=Pn;var xp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};const $p=xp;function Ka(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){Sp(e,v,n[v])})}return e}function Sp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ur=function(t,n){var a=Ka({},t,n.attrs);return D(dn,Ka({},a,{icon:$p}),null)};Ur.displayName="UpOutlined";Ur.inheritAttrs=!1;const kp=Ur;function Ki(){return typeof BigInt=="function"}function Co(e){let t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t=`0${t}`);const a=t||"0",v=a.split("."),p=v[0]||"0",f=v[1]||"0";p==="0"&&f==="0"&&(n=!1);const m=n?"-":"";return{negative:n,negativeStr:m,trimStr:a,integerStr:p,decimalStr:f,fullStr:`${m}${a}`}}function Gr(e){const t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function $o(e){const t=String(e);if(Gr(e)){let n=Number(t.slice(t.indexOf("e-")+2));const a=t.match(/\.(\d+)/);return a!=null&&a[1]&&(n+=a[1].length),n}return t.includes(".")&&Zr(t)?t.length-t.indexOf(".")-1:0}function Yr(e){let t=String(e);if(Gr(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Ki()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(Ki()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed($o(t))}return Co(t).fullStr}function Zr(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}function nc(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}class Nn{constructor(t){if(this.origin="",nc(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}negate(){return new Nn(-this.toNumber())}add(t){if(this.isInvalidate())return new Nn(t);const n=Number(t);if(Number.isNaN(n))return this;const a=this.number+n;if(a>Number.MAX_SAFE_INTEGER)return new Nn(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new Nn(Number.MIN_SAFE_INTEGER);const v=Math.max($o(this.number),$o(n));return new Nn(a.toFixed(v))}isEmpty(){return this.empty}isNaN(){return Number.isNaN(this.number)}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toNumber()===(t==null?void 0:t.toNumber())}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.number}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":Yr(this.number):this.origin}}class Xn{constructor(t){if(this.origin="",nc(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}let n=t;if(Gr(n)&&(n=Number(n)),n=typeof n=="string"?n:Yr(n),Zr(n)){const a=Co(n);this.negative=a.negative;const v=a.trimStr.split(".");this.integer=BigInt(v[0]);const p=v[1]||"0";this.decimal=BigInt(p),this.decimalLen=p.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(t){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t,"0")}`;return BigInt(n)}negate(){const t=new Xn(this.toString());return t.negative=!t.negative,t}add(t){if(this.isInvalidate())return new Xn(t);const n=new Xn(t);if(n.isInvalidate())return this;const a=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),v=this.alignDecimal(a),p=n.alignDecimal(a),f=(v+p).toString(),{negativeStr:m,trimStr:c}=Co(f),h=`${m}${c.padStart(a+1,"0")}`;return new Xn(`${h.slice(0,-a)}.${h.slice(-a)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toString()===(t==null?void 0:t.toString())}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":Co(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function Xt(e){return Ki()?new Xn(e):new Nn(e)}function Xi(e,t,n){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";const{negativeStr:v,integerStr:p,decimalStr:f}=Co(e),m=`${t}${f}`,c=`${v}${p}`;if(n>=0){const h=Number(f[n]);if(h>=5&&!a){const i=Xt(e).add(`${v}0.${"0".repeat(n)}${10-h}`);return Xi(i.toString(),t,n,a)}return n===0?c:`${c}${t}${f.padEnd(n,"0").slice(0,n)}`}return m===".0"?c:`${c}${m}`}const _p=200,Mp=600,Ap=ce({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:De()},slots:Object,setup(e,t){let{slots:n,emit:a}=t;const v=Y(),p=(m,c)=>{m.preventDefault(),a("step",c);function h(){a("step",c),v.value=setTimeout(h,_p)}v.value=setTimeout(h,Mp)},f=()=>{clearTimeout(v.value)};return _n(()=>{f()}),()=>{if(rd())return null;const{prefixCls:m,upDisabled:c,downDisabled:h}=e,i=`${m}-handler`,o=Ie(i,`${i}-up`,{[`${i}-up-disabled`]:c}),l=Ie(i,`${i}-down`,{[`${i}-down-disabled`]:h}),s={unselectable:"on",role:"button",onMouseup:f,onMouseleave:f},{upNode:r,downNode:u}=n;return D("div",{class:`${i}-wrap`},[D("span",oe(oe({},s),{},{onMousedown:d=>{p(d,!0)},"aria-label":"Increase Value","aria-disabled":c,class:o}),[(r==null?void 0:r())||D("span",{unselectable:"on",class:`${m}-handler-up-inner`},null)]),D("span",oe(oe({},s),{},{onMousedown:d=>{p(d,!1)},"aria-label":"Decrease Value","aria-disabled":h,class:l}),[(u==null?void 0:u())||D("span",{unselectable:"on",class:`${m}-handler-down-inner`},null)])])}}});function Lp(e,t){const n=Y(null);function a(){try{const{selectionStart:p,selectionEnd:f,value:m}=e.value,c=m.substring(0,p),h=m.substring(f);n.value={start:p,end:f,value:m,beforeTxt:c,afterTxt:h}}catch{}}function v(){if(e.value&&n.value&&t.value)try{const{value:p}=e.value,{beforeTxt:f,afterTxt:m,start:c}=n.value;let h=p.length;if(p.endsWith(m))h=p.length-n.value.afterTxt.length;else if(p.startsWith(f))h=f.length;else{const i=f[c-1],o=p.indexOf(i,c-1);o!==-1&&(h=o+1)}e.value.setSelectionRange(h,h)}catch(p){Uu(!1,`Something warning of cursor restore. Please fire issue about this: ${p.message}`)}}return[a,v]}const Ep=()=>{const e=Qe(0),t=()=>{At.cancel(e.value)};return _n(()=>{t()}),n=>{t(),e.value=At(()=>{n()})}};var Ip=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};const Xa=(e,t)=>e||t.isEmpty()?t.toString():t.toNumber(),Qa=e=>{const t=Xt(e);return t.isInvalidate()?null:t},oc=()=>({stringMode:Ke(),defaultValue:pt([String,Number]),value:pt([String,Number]),prefixCls:Nt(),min:pt([String,Number]),max:pt([String,Number]),step:pt([String,Number],1),tabindex:Number,controls:Ke(!0),readonly:Ke(),disabled:Ke(),autofocus:Ke(),keyboard:Ke(!0),parser:De(),formatter:De(),precision:Number,decimalSeparator:String,onInput:De(),onChange:De(),onPressEnter:De(),onStep:De(),onBlur:De(),onFocus:De()}),Tp=ce({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:J(J({},oc()),{lazy:Boolean}),slots:Object,setup(e,t){let{attrs:n,slots:a,emit:v,expose:p}=t;const f=Qe(),m=Qe(!1),c=Qe(!1),h=Qe(!1),i=Qe(Xt(e.value));function o(N){e.value===void 0&&(i.value=N)}const l=(N,V)=>{if(!V)return e.precision>=0?e.precision:Math.max($o(N),$o(e.step))},s=N=>{const V=String(N);if(e.parser)return e.parser(V);let H=V;return e.decimalSeparator&&(H=H.replace(e.decimalSeparator,".")),H.replace(/[^\w.-]+/g,"")},r=Qe(""),u=(N,V)=>{if(e.formatter)return e.formatter(N,{userTyping:V,input:String(r.value)});let H=typeof N=="number"?Yr(N):N;if(!V){const W=l(H,V);if(Zr(H)&&(e.decimalSeparator||W>=0)){const j=e.decimalSeparator||".";H=Xi(H,j,W)}}return H},d=(()=>{const N=e.value;return i.value.isInvalidate()&&["string","number"].includes(typeof N)?Number.isNaN(N)?"":N:u(i.value.toString(),!1)})();r.value=d;function g(N,V){r.value=u(N.isInvalidate()?N.toString(!1):N.toString(!V),V)}const y=le(()=>Qa(e.max)),x=le(()=>Qa(e.min)),C=le(()=>!y.value||!i.value||i.value.isInvalidate()?!1:y.value.lessEquals(i.value)),b=le(()=>!x.value||!i.value||i.value.isInvalidate()?!1:i.value.lessEquals(x.value)),[w,_]=Lp(f,m),I=N=>y.value&&!N.lessEquals(y.value)?y.value:x.value&&!x.value.lessEquals(N)?x.value:null,E=N=>!I(N),k=(N,V)=>{var H;let W=N,j=E(W)||W.isEmpty();if(!W.isEmpty()&&!V&&(W=I(W)||W,j=!0),!e.readonly&&!e.disabled&&j){const Z=W.toString(),q=l(Z,V);return q>=0&&(W=Xt(Xi(Z,".",q))),W.equals(i.value)||(o(W),(H=e.onChange)===null||H===void 0||H.call(e,W.isEmpty()?null:Xa(e.stringMode,W)),e.value===void 0&&g(W,V)),W}return i.value},A=Ep(),S=N=>{var V;if(w(),r.value=N,!h.value){const H=s(N),W=Xt(H);W.isNaN()||k(W,!0)}(V=e.onInput)===null||V===void 0||V.call(e,N),A(()=>{let H=N;e.parser||(H=N.replace(/。/g,".")),H!==N&&S(H)})},M=()=>{h.value=!0},$=()=>{h.value=!1,S(f.value.value)},L=N=>{S(N.target.value)},T=N=>{var V,H;if(N&&C.value||!N&&b.value)return;c.value=!1;let W=Xt(e.step);N||(W=W.negate());const j=(i.value||Xt(0)).add(W.toString()),Z=k(j,!1);(V=e.onStep)===null||V===void 0||V.call(e,Xa(e.stringMode,Z),{offset:e.step,type:N?"up":"down"}),(H=f.value)===null||H===void 0||H.focus()},R=N=>{const V=Xt(s(r.value));let H=V;V.isNaN()?H=i.value:H=k(V,N),e.value!==void 0?g(i.value,!1):H.isNaN()||g(H,!1)},P=N=>{var V;const{which:H}=N;c.value=!0,H===ze.ENTER&&(h.value||(c.value=!1),R(!1),(V=e.onPressEnter)===null||V===void 0||V.call(e,N)),e.keyboard!==!1&&!h.value&&[ze.UP,ze.DOWN].includes(H)&&(T(ze.UP===H),N.preventDefault())},F=()=>{c.value=!1},O=N=>{R(!1),m.value=!1,c.value=!1,v("blur",N)};return me(()=>e.precision,()=>{i.value.isInvalidate()||g(i.value,!1)},{flush:"post"}),me(()=>e.value,()=>{const N=Xt(e.value);i.value=N;const V=Xt(s(r.value));(!N.equals(V)||!c.value||e.formatter)&&g(N,c.value)},{flush:"post"}),me(r,()=>{e.formatter&&_()},{flush:"post"}),me(()=>e.disabled,N=>{N&&(m.value=!1)}),p({focus:()=>{var N;(N=f.value)===null||N===void 0||N.focus()},blur:()=>{var N;(N=f.value)===null||N===void 0||N.blur()}}),()=>{const N=J(J({},n),e),{prefixCls:V="rc-input-number",min:H,max:W,step:j=1,defaultValue:Z,value:q,disabled:G,readonly:K,keyboard:ee,controls:te=!0,autofocus:ae,stringMode:de,parser:he,formatter:re,precision:ue,decimalSeparator:ne,onChange:pe,onInput:Se,onPressEnter:Me,onStep:Le,lazy:Ae,class:We,style:Ve}=N,Ze=Ip(N,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:se,downHandler:we}=a,Ce=`${V}-input`,Ee={};return Ae?Ee.onChange=L:Ee.onInput=L,D("div",{class:Ie(V,We,{[`${V}-focused`]:m.value,[`${V}-disabled`]:G,[`${V}-readonly`]:K,[`${V}-not-a-number`]:i.value.isNaN(),[`${V}-out-of-range`]:!i.value.isInvalidate()&&!E(i.value)}),style:Ve,onKeydown:P,onKeyup:F},[te&&D(Ap,{prefixCls:V,upDisabled:C.value,downDisabled:b.value,onStep:T},{upNode:se,downNode:we}),D("div",{class:`${Ce}-wrap`},[D("input",oe(oe(oe({autofocus:ae,autocomplete:"off",role:"spinbutton","aria-valuemin":H,"aria-valuemax":W,"aria-valuenow":i.value.isInvalidate()?null:i.value.toString(),step:j},Ze),{},{ref:f,class:Ce,value:r.value,disabled:G,readonly:K,onFocus:Be=>{m.value=!0,v("focus",Be)}},Ee),{},{onBlur:O,onCompositionstart:M,onCompositionend:$}),null)])])}}});function Si(e){return e!=null}const Dp=e=>{const{componentCls:t,lineWidth:n,lineType:a,colorBorder:v,borderRadius:p,fontSizeLG:f,controlHeightLG:m,controlHeightSM:c,colorError:h,inputPaddingHorizontalSM:i,colorTextDescription:o,motionDurationMid:l,colorPrimary:s,controlHeight:r,inputPaddingHorizontal:u,colorBgContainer:d,colorTextDisabled:g,borderRadiusSM:y,borderRadiusLG:x,controlWidth:C,handleVisible:b}=e;return[{[t]:J(J(J(J({},Yt(e)),ar(e)),qs(e,t)),{display:"inline-block",width:C,margin:0,padding:0,border:`${n}px ${a} ${v}`,borderRadius:p,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:f,borderRadius:x,[`input${t}-input`]:{height:m-2*n}},"&-sm":{padding:0,borderRadius:y,[`input${t}-input`]:{height:c-2*n,padding:`0 ${i}px`}},"&:hover":J({},rr(e)),"&-focused":J({},Zo(e)),"&-disabled":J(J({},Eu(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:h}},"&-group":J(J(J({},Yt(e)),Iu(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:x}},"&-sm":{[`${t}-group-addon`]:{borderRadius:y}}}}),[t]:{"&-input":J(J({width:"100%",height:r-2*n,padding:`0 ${u}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:p,outline:0,transition:`all ${l} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},Tu(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:d,borderStartStartRadius:0,borderStartEndRadius:p,borderEndEndRadius:p,borderEndStartRadius:0,opacity:b===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${l} linear ${l}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
${t}-handler-up-inner,
|
|
${t}-handler-down-inner
|
|
`]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:o,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${n}px ${a} ${v}`,transition:`all ${l} linear`,"&:active":{background:e.colorFillAlter},"&:hover":{height:"60%",[`
|
|
${t}-handler-up-inner,
|
|
${t}-handler-down-inner
|
|
`]:{color:s}},"&-up-inner, &-down-inner":J(J({},Bs()),{color:o,transition:`all ${l} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:p},[`${t}-handler-down`]:{borderBlockStart:`${n}px ${a} ${v}`,borderEndEndRadius:p},"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"}},[`
|
|
${t}-handler-up-disabled,
|
|
${t}-handler-down-disabled
|
|
`]:{cursor:"not-allowed"},[`
|
|
${t}-handler-up-disabled:hover &-handler-up-inner,
|
|
${t}-handler-down-disabled:hover &-handler-down-inner
|
|
`]:{color:g}}},{[`${t}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${t}-handler-down`]:{borderBlockStartWidth:0}}}]},Rp=e=>{const{componentCls:t,inputPaddingHorizontal:n,inputAffixPadding:a,controlWidth:v,borderRadiusLG:p,borderRadiusSM:f}=e;return{[`${t}-affix-wrapper`]:J(J(J({},ar(e)),qs(e,`${t}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:v,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:p},"&-sm":{borderRadius:f},[`&:not(${t}-affix-wrapper-disabled):hover`]:J(J({},rr(e)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},[`input${t}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:a},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:a}}})}},Pp=kn("InputNumber",e=>{const t=Qs(e);return[Dp(t),Rp(t),el(t)]},e=>({controlWidth:90,handleWidth:e.controlHeightSM-e.lineWidth*2,handleFontSize:e.fontSize/2,handleVisible:"auto"}));var Np=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};const Ja=oc(),Op=()=>J(J({},Ja),{size:Nt(),bordered:Ke(!0),placeholder:String,name:String,id:String,type:String,addonBefore:Oe.any,addonAfter:Oe.any,prefix:Oe.any,"onUpdate:value":Ja.onChange,valueModifiers:Object,status:Nt()}),ki=ce({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:Op(),slots:Object,setup(e,t){let{emit:n,expose:a,attrs:v,slots:p}=t;var f;const m=qo(),c=sr.useInject(),h=le(()=>lr(c.status,e.status)),{prefixCls:i,size:o,direction:l,disabled:s}=Dt("input-number",e),{compactSize:r,compactItemClassnames:u}=ur(i,l),d=ru(),g=le(()=>{var M;return(M=s.value)!==null&&M!==void 0?M:d.value}),[y,x]=Pp(i),C=le(()=>r.value||o.value),b=Qe((f=e.value)!==null&&f!==void 0?f:e.defaultValue),w=Qe(!1);me(()=>e.value,()=>{b.value=e.value});const _=Qe(null),I=()=>{var M;(M=_.value)===null||M===void 0||M.focus()};a({focus:I,blur:()=>{var M;(M=_.value)===null||M===void 0||M.blur()}});const k=M=>{e.value===void 0&&(b.value=M),n("update:value",M),n("change",M),m.onFieldChange()},A=M=>{w.value=!1,n("blur",M),m.onFieldBlur()},S=M=>{w.value=!0,n("focus",M)};return()=>{var M,$,L,T;const{hasFeedback:R,isFormItemInput:P,feedbackIcon:F}=c,O=(M=e.id)!==null&&M!==void 0?M:m.id.value,N=J(J(J({},v),e),{id:O,disabled:g.value}),{class:V,bordered:H,readonly:W,style:j,addonBefore:Z=($=p.addonBefore)===null||$===void 0?void 0:$.call(p),addonAfter:q=(L=p.addonAfter)===null||L===void 0?void 0:L.call(p),prefix:G=(T=p.prefix)===null||T===void 0?void 0:T.call(p),valueModifiers:K={}}=N,ee=Np(N,["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"]),te=i.value,ae=Ie({[`${te}-lg`]:C.value==="large",[`${te}-sm`]:C.value==="small",[`${te}-rtl`]:l.value==="rtl",[`${te}-readonly`]:W,[`${te}-borderless`]:!H,[`${te}-in-form-item`]:P},yo(te,h.value),V,u.value,x.value);let de=D(Tp,oe(oe({},tl(ee,["size","defaultValue"])),{},{ref:_,lazy:!!K.lazy,value:b.value,class:ae,prefixCls:te,readonly:W,onChange:k,onBlur:A,onFocus:S}),{upHandler:p.upIcon?()=>D("span",{class:`${te}-handler-up-inner`},[p.upIcon()]):()=>D(kp,{class:`${te}-handler-up-inner`},null),downHandler:p.downIcon?()=>D("span",{class:`${te}-handler-down-inner`},[p.downIcon()]):()=>D(ad,{class:`${te}-handler-down-inner`},null)});const he=Si(Z)||Si(q),re=Si(G);if(re||R){const ue=Ie(`${te}-affix-wrapper`,yo(`${te}-affix-wrapper`,h.value,R),{[`${te}-affix-wrapper-focused`]:w.value,[`${te}-affix-wrapper-disabled`]:g.value,[`${te}-affix-wrapper-sm`]:C.value==="small",[`${te}-affix-wrapper-lg`]:C.value==="large",[`${te}-affix-wrapper-rtl`]:l.value==="rtl",[`${te}-affix-wrapper-readonly`]:W,[`${te}-affix-wrapper-borderless`]:!H,[`${V}`]:!he&&V},x.value);de=D("div",{class:ue,style:j,onClick:I},[re&&D("span",{class:`${te}-prefix`},[G]),de,R&&D("span",{class:`${te}-suffix`},[F])])}if(he){const ue=`${te}-group`,ne=`${ue}-addon`,pe=Z?D("div",{class:ne},[Z]):null,Se=q?D("div",{class:ne},[q]):null,Me=Ie(`${te}-wrapper`,ue,{[`${ue}-rtl`]:l.value==="rtl"},x.value),Le=Ie(`${te}-group-wrapper`,{[`${te}-group-wrapper-sm`]:C.value==="small",[`${te}-group-wrapper-lg`]:C.value==="large",[`${te}-group-wrapper-rtl`]:l.value==="rtl"},yo(`${i}-group-wrapper`,h.value,R),V,x.value);de=D("div",{class:Le,style:j},[D("div",{class:Me},[pe&&D($a,null,{default:()=>[D(ba,null,{default:()=>[pe]})]}),de,Se&&D($a,null,{default:()=>[D(ba,null,{default:()=>[Se]})]})])])}return y(qn(de,{style:j}))}}}),ro=J(ki,{install:e=>(e.component(ki.name,ki),e)}),ic=(e,t)=>{let{attrs:n}=t;const{included:a,vertical:v,style:p,class:f}=n;let{length:m,offset:c,reverse:h}=n;m<0&&(h=!h,m=Math.abs(m),c=100-c);const i=v?{[h?"top":"bottom"]:`${c}%`,[h?"bottom":"top"]:"auto",height:`${m}%`}:{[h?"right":"left"]:`${c}%`,[h?"left":"right"]:"auto",width:`${m}%`},o=J(J({},p),i);return a?D("div",{class:f,style:o},null):null};ic.inheritAttrs=!1;const rc=ic,Bp=(e,t,n,a,v,p)=>{Us();const f=Object.keys(t).map(parseFloat).sort((m,c)=>m-c);if(n&&a)for(let m=v;m<=p;m+=a)f.indexOf(m)===-1&&f.push(m);return f},ac=(e,t)=>{let{attrs:n}=t;const{prefixCls:a,vertical:v,reverse:p,marks:f,dots:m,step:c,included:h,lowerBound:i,upperBound:o,max:l,min:s,dotStyle:r,activeDotStyle:u}=n,d=l-s,g=Bp(v,f,m,c,s,l).map(y=>{const x=`${Math.abs(y-s)/d*100}%`,C=!h&&y===o||h&&y<=o&&y>=i;let b=v?J(J({},r),{[p?"top":"bottom"]:x}):J(J({},r),{[p?"right":"left"]:x});C&&(b=J(J({},b),u));const w=Ie({[`${a}-dot`]:!0,[`${a}-dot-active`]:C,[`${a}-dot-reverse`]:p});return D("span",{class:w,style:b,key:y},null)});return D("div",{class:`${a}-step`},[g])};ac.inheritAttrs=!1;const Fp=ac,sc=(e,t)=>{let{attrs:n,slots:a}=t;const{class:v,vertical:p,reverse:f,marks:m,included:c,upperBound:h,lowerBound:i,max:o,min:l,onClickLabel:s}=n,r=Object.keys(m),u=a.mark,d=o-l,g=r.map(parseFloat).sort((y,x)=>y-x).map(y=>{const x=typeof m[y]=="function"?m[y]():m[y],C=typeof x=="object"&&!Fs(x);let b=C?x.label:x;if(!b&&b!==0)return null;u&&(b=u({point:y,label:b}));const w=!c&&y===h||c&&y<=h&&y>=i,_=Ie({[`${v}-text`]:!0,[`${v}-text-active`]:w}),I={marginBottom:"-50%",[f?"top":"bottom"]:`${(y-l)/d*100}%`},E={transform:`translateX(${f?"50%":"-50%"})`,msTransform:`translateX(${f?"50%":"-50%"})`,[f?"right":"left"]:`${(y-l)/d*100}%`},k=p?I:E,A=C?J(J({},k),x.style):k,S={[nl?"onTouchstartPassive":"onTouchstart"]:M=>s(M,y)};return D("span",oe({class:_,style:A,key:y,onMousedown:M=>s(M,y)},S),[b])});return D("div",{class:v},[g])};sc.inheritAttrs=!1;const Hp=sc,lc=ce({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:Oe.oneOfType([Oe.number,Oe.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,t){let{attrs:n,emit:a,expose:v}=t;const p=Qe(!1),f=Qe(),m=()=>{document.activeElement===f.value&&(p.value=!0)},c=d=>{p.value=!1,a("blur",d)},h=()=>{p.value=!1},i=()=>{var d;(d=f.value)===null||d===void 0||d.focus()},o=()=>{var d;(d=f.value)===null||d===void 0||d.blur()},l=()=>{p.value=!0,i()},s=d=>{d.preventDefault(),i(),a("mousedown",d)};v({focus:i,blur:o,clickFocus:l,ref:f});let r=null;ot(()=>{r=Vt(document,"mouseup",m)}),_n(()=>{r==null||r.remove()});const u=le(()=>{const{vertical:d,offset:g,reverse:y}=e;return d?{[y?"top":"bottom"]:`${g}%`,[y?"bottom":"top"]:"auto",transform:y?null:"translateY(+50%)"}:{[y?"right":"left"]:`${g}%`,[y?"left":"right"]:"auto",transform:`translateX(${y?"+":"-"}50%)`}});return()=>{const{prefixCls:d,disabled:g,min:y,max:x,value:C,tabindex:b,ariaLabel:w,ariaLabelledBy:_,ariaValueTextFormatter:I,onMouseenter:E,onMouseleave:k}=e,A=Ie(n.class,{[`${d}-handle-click-focused`]:p.value}),S={"aria-valuemin":y,"aria-valuemax":x,"aria-valuenow":C,"aria-disabled":!!g},M=[n.style,u.value];let $=b||0;(g||b===null)&&($=null);let L;I&&(L=I(C));const T=J(J(J(J({},n),{role:"slider",tabindex:$}),S),{class:A,onBlur:c,onKeydown:h,onMousedown:s,onMouseenter:E,onMouseleave:k,ref:f,style:M});return D("div",oe(oe({},T),{},{"aria-label":w,"aria-labelledby":_,"aria-valuetext":L}),null)}}});function _i(e,t){try{return Object.keys(t).some(n=>e.target===t[n].ref)}catch{return!1}}function cc(e,t){let{min:n,max:a}=t;return e<n||e>a}function qa(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function es(e,t){let{marks:n,step:a,min:v,max:p}=t;const f=Object.keys(n).map(parseFloat);if(a!==null){const c=Math.pow(10,uc(a)),h=Math.floor((p*c-v*c)/(a*c)),i=Math.min((e-v)/a,h),o=Math.round(i)*a+v;f.push(o)}const m=f.map(c=>Math.abs(e-c));return f[m.indexOf(Math.min(...m))]}function uc(e){const t=e.toString();let n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}function ts(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.clientY:t.pageX)/n}function ns(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.touches[0].clientY:t.touches[0].pageX)/n}function os(e,t){const n=t.getBoundingClientRect();return e?n.top+n.height*.5:window.scrollX+n.left+n.width*.5}function Kr(e,t){let{max:n,min:a}=t;return e<=a?a:e>=n?n:e}function dc(e,t){const{step:n}=t,a=isFinite(es(e,t))?es(e,t):0;return n===null?a:parseFloat(a.toFixed(uc(n)))}function eo(e){e.stopPropagation(),e.preventDefault()}function zp(e,t,n){const a={increase:(f,m)=>f+m,decrease:(f,m)=>f-m},v=a[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),p=Object.keys(n.marks)[v];return n.step?a[e](t,n.step):Object.keys(n.marks).length&&n.marks[p]?n.marks[p]:t}function hc(e,t,n){const a="increase",v="decrease";let p=a;switch(e.keyCode){case ze.UP:p=t&&n?v:a;break;case ze.RIGHT:p=!t&&n?v:a;break;case ze.DOWN:p=t&&n?a:v;break;case ze.LEFT:p=!t&&n?a:v;break;case ze.END:return(f,m)=>m.max;case ze.HOME:return(f,m)=>m.min;case ze.PAGE_UP:return(f,m)=>f+m.step*2;case ze.PAGE_DOWN:return(f,m)=>f-m.step*2;default:return}return(f,m)=>zp(p,f,m)}var Wp=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};function Tn(){}function fc(e){const t={id:String,min:Number,max:Number,step:Number,marks:Oe.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:Oe.object,maximumTrackStyle:Oe.object,handleStyle:Oe.oneOfType([Oe.object,Oe.arrayOf(Oe.object)]),trackStyle:Oe.oneOfType([Oe.object,Oe.arrayOf(Oe.object)]),railStyle:Oe.object,dotStyle:Oe.object,activeDotStyle:Oe.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return ce({compatConfig:{MODE:3},name:"CreateSlider",mixins:[dr,e],inheritAttrs:!1,props:ei(t,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data(){return Us(),this.handlesRefs={},{}},mounted(){this.$nextTick(()=>{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:n,disabled:a}=this;n&&!a&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(n){var{index:a,directives:v,className:p,style:f}=n,m=Wp(n,["index","directives","className","style"]);if(delete m.dragging,m.value===null)return null;const c=J(J({},m),{class:p,style:f,key:a});return D(lc,c,null)},onDown(n,a){let v=a;const{draggableTrack:p,vertical:f}=this.$props,{bounds:m}=this.$data,c=p&&this.positionGetValue?this.positionGetValue(v)||[]:[],h=_i(n,this.handlesRefs);if(this.dragTrack=p&&m.length>=2&&!h&&!c.map((i,o)=>{const l=o?!0:i>=m[o];return o===c.length-1?i<=m[o]:l}).some(i=>!i),this.dragTrack)this.dragOffset=v,this.startBounds=[...m];else{if(!h)this.dragOffset=0;else{const i=os(f,n.target);this.dragOffset=v-i,v=i}this.onStart(v)}},onMouseDown(n){if(n.button!==0)return;this.removeDocumentEvents();const a=this.$props.vertical,v=ts(a,n);this.onDown(n,v),this.addDocumentMouseEvents()},onTouchStart(n){if(qa(n))return;const a=this.vertical,v=ns(a,n);this.onDown(n,v),this.addDocumentTouchEvents(),eo(n)},onFocus(n){const{vertical:a}=this;if(_i(n,this.handlesRefs)&&!this.dragTrack){const v=os(a,n.target);this.dragOffset=0,this.onStart(v),eo(n),this.$emit("focus",n)}},onBlur(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(n){if(!this.sliderRef){this.onEnd();return}const a=ts(this.vertical,n);this.onMove(n,a-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(n){if(qa(n)||!this.sliderRef){this.onEnd();return}const a=ns(this.vertical,n);this.onMove(n,a-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(n){this.sliderRef&&_i(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel(n,a){n.stopPropagation(),this.onChange({sValue:a}),this.setState({sValue:a},()=>this.onEnd(!0))},getSliderStart(){const n=this.sliderRef,{vertical:a,reverse:v}=this,p=n.getBoundingClientRect();return a?v?p.bottom:p.top:window.scrollX+(v?p.right:p.left)},getSliderLength(){const n=this.sliderRef;if(!n)return 0;const a=n.getBoundingClientRect();return this.vertical?a.height:a.width},addDocumentTouchEvents(){this.onTouchMoveListener=Vt(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Vt(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=Vt(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Vt(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(n=>{var a,v;(v=(a=this.handlesRefs[n])===null||a===void 0?void 0:a.blur)===null||v===void 0||v.call(a)})},calcValue(n){const{vertical:a,min:v,max:p}=this,f=Math.abs(Math.max(n,0)/this.getSliderLength());return a?(1-f)*(p-v)+v:f*(p-v)+v},calcValueByPos(n){const v=(this.reverse?-1:1)*(n-this.getSliderStart());return this.trimAlignValue(this.calcValue(v))},calcOffset(n){const{min:a,max:v}=this,p=(n-a)/(v-a);return Math.max(0,p*100)},saveSlider(n){this.sliderRef=n},saveHandle(n,a){this.handlesRefs[n]=a}},render(){const{prefixCls:n,marks:a,dots:v,step:p,included:f,disabled:m,vertical:c,reverse:h,min:i,max:o,maximumTrackStyle:l,railStyle:s,dotStyle:r,activeDotStyle:u,id:d}=this,{class:g,style:y}=this.$attrs,{tracks:x,handles:C}=this.renderSlider(),b=Ie(n,g,{[`${n}-with-marks`]:Object.keys(a).length,[`${n}-disabled`]:m,[`${n}-vertical`]:c,[`${n}-horizontal`]:!c}),w={vertical:c,marks:a,included:f,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:o,min:i,reverse:h,class:`${n}-mark`,onClickLabel:m?Tn:this.onClickMarkLabel},_={[nl?"onTouchstartPassive":"onTouchstart"]:m?Tn:this.onTouchStart};return D("div",oe(oe({id:d,ref:this.saveSlider,tabindex:"-1",class:b},_),{},{onMousedown:m?Tn:this.onMouseDown,onMouseup:m?Tn:this.onMouseUp,onKeydown:m?Tn:this.onKeyDown,onFocus:m?Tn:this.onFocus,onBlur:m?Tn:this.onBlur,style:y}),[D("div",{class:`${n}-rail`,style:J(J({},l),s)},null),x,D(Fp,{prefixCls:n,vertical:c,reverse:h,marks:a,dots:v,step:p,included:f,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:o,min:i,dotStyle:r,activeDotStyle:u},null),C,D(Hp,w,{mark:this.$slots.mark}),au(this)])}})}const Vp=ce({compatConfig:{MODE:3},name:"Slider",mixins:[dr],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:Oe.oneOfType([Oe.number,Oe.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,t=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(t),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const t=e!==void 0?e:this.sValue,n=this.trimAlignValue(t,this.$props);n!==this.sValue&&(this.setState({sValue:n}),cc(t,this.$props)&&this.$emit("change",n))},onChange(e){const t=!Ri(this,"value"),n=e.sValue>this.max?J(J({},e),{sValue:this.max}):e;t&&this.setState(n);const a=n.sValue;this.$emit("change",a)},onStart(e){this.setState({dragging:!0});const{sValue:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e,n!==t&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd(e){const{dragging:t}=this;this.removeDocumentEvents(),(t||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,t){eo(e);const{sValue:n}=this,a=this.calcValueByPos(t);a!==n&&this.onChange({sValue:a})},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,a=hc(e,n,t);if(a){eo(e);const{sValue:v}=this,p=a(v,this.$props),f=this.trimAlignValue(p);if(f===v)return;this.onChange({sValue:f}),this.$emit("afterChange",f),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const n=J(J({},this.$props),t),a=Kr(e,n);return dc(a,n)},getTrack(e){let{prefixCls:t,reverse:n,vertical:a,included:v,minimumTrackStyle:p,mergedTrackStyle:f,length:m,offset:c}=e;return D(rc,{class:`${t}-track`,vertical:a,included:v,offset:c,reverse:n,length:m,style:J(J({},p),f)},null)},renderSlider(){const{prefixCls:e,vertical:t,included:n,disabled:a,minimumTrackStyle:v,trackStyle:p,handleStyle:f,tabindex:m,ariaLabelForHandle:c,ariaLabelledByForHandle:h,ariaValueTextFormatterForHandle:i,min:o,max:l,startPoint:s,reverse:r,handle:u,defaultHandle:d}=this,g=u||d,{sValue:y,dragging:x}=this,C=this.calcOffset(y),b=g({class:`${e}-handle`,prefixCls:e,vertical:t,offset:C,value:y,dragging:x,disabled:a,min:o,max:l,reverse:r,index:0,tabindex:m,ariaLabel:c,ariaLabelledBy:h,ariaValueTextFormatter:i,style:f[0]||f,ref:I=>this.saveHandle(0,I),onFocus:this.onFocus,onBlur:this.onBlur}),w=s!==void 0?this.calcOffset(s):0,_=p[0]||p;return{tracks:this.getTrack({prefixCls:e,reverse:r,vertical:t,included:n,offset:w,minimumTrackStyle:v,mergedTrackStyle:_,length:C-w}),handles:b}}}}),jp=fc(Vp),go=e=>{let{value:t,handle:n,bounds:a,props:v}=e;const{allowCross:p,pushable:f}=v,m=Number(f),c=Kr(t,v);let h=c;return!p&&n!=null&&a!==void 0&&(n>0&&c<=a[n-1]+m&&(h=a[n-1]+m),n<a.length-1&&c>=a[n+1]-m&&(h=a[n+1]-m)),dc(h,v)},Up={defaultValue:Oe.arrayOf(Oe.number),value:Oe.arrayOf(Oe.number),count:Number,pushable:su(Oe.oneOfType([Oe.looseBool,Oe.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:Oe.arrayOf(Oe.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Gp=ce({compatConfig:{MODE:3},name:"Range",mixins:[dr],inheritAttrs:!1,props:ei(Up,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:t,max:n}=this,a=Array(...Array(e+1)).map(()=>t),v=Ri(this,"defaultValue")?this.defaultValue:a;let{value:p}=this;p===void 0&&(p=v);const f=p.map((c,h)=>go({value:c,handle:h,props:this.$props}));return{sHandle:null,recent:f[0]===n?0:f.length-1,bounds:f}},watch:{value:{handler(e){const{bounds:t}=this;this.setChangeValue(e||t)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:t}=this;let n=e.map((a,v)=>go({value:a,handle:v,bounds:t,props:this.$props}));if(t.length===n.length){if(n.every((a,v)=>a===t[v]))return null}else n=e.map((a,v)=>go({value:a,handle:v,props:this.$props}));if(this.setState({bounds:n}),e.some(a=>cc(a,this.$props))){const a=e.map(v=>Kr(v,this.$props));this.$emit("change",a)}},onChange(e){if(!Ri(this,"value"))this.setState(e);else{const v={};["sHandle","recent"].forEach(p=>{e[p]!==void 0&&(v[p]=e[p])}),Object.keys(v).length&&this.setState(v)}const a=J(J({},this.$data),e).bounds;this.$emit("change",a)},positionGetValue(e){const t=this.getValue(),n=this.calcValueByPos(e),a=this.getClosestBound(n),v=this.getBoundNeedMoving(n,a),p=t[v];if(n===p)return null;const f=[...t];return f[v]=n,f},onStart(e){const{bounds:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e;const a=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,a),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const v=t[this.prevMovedHandleIndex];if(n===v)return;const p=[...t];p[this.prevMovedHandleIndex]=n,this.onChange({bounds:p})},onEnd(e){const{sHandle:t}=this;this.removeDocumentEvents(),t||(this.dragTrack=!1),(t!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,t,n,a){eo(e);const{$data:v,$props:p}=this,f=p.max||100,m=p.min||0;if(n){let l=p.vertical?-t:t;l=p.reverse?-l:l;const s=f-Math.max(...a),r=m-Math.min(...a),u=Math.min(Math.max(l/(this.getSliderLength()/100),r),s),d=a.map(g=>Math.floor(Math.max(Math.min(g+u,f),m)));v.bounds.map((g,y)=>g===d[y]).some(g=>!g)&&this.onChange({bounds:d});return}const{bounds:c,sHandle:h}=this,i=this.calcValueByPos(t),o=c[h];i!==o&&this.moveTo(i)},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,a=hc(e,n,t);if(a){eo(e);const{bounds:v,sHandle:p}=this,f=v[p===null?this.recent:p],m=a(f,this.$props),c=go({value:m,handle:p,bounds:v,props:this.$props});if(c===f)return;const h=!0;this.moveTo(c,h)}},getClosestBound(e){const{bounds:t}=this;let n=0;for(let a=1;a<t.length-1;a+=1)e>=t[a]&&(n=a);return Math.abs(t[n+1]-e)<Math.abs(t[n]-e)&&(n+=1),n},getBoundNeedMoving(e,t){const{bounds:n,recent:a}=this;let v=t;const p=n[t+1]===n[t];return p&&n[a]===n[t]&&(v=a),p&&e!==n[t+1]&&(v=e<n[t+1]?t:t+1),v},getLowerBound(){return this.bounds[0]},getUpperBound(){const{bounds:e}=this;return e[e.length-1]},getPoints(){const{marks:e,step:t,min:n,max:a}=this,v=this.internalPointsCache;if(!v||v.marks!==e||v.step!==t){const p=J({},e);if(t!==null)for(let m=n;m<=a;m+=t)p[m]=m;const f=Object.keys(p).map(parseFloat);f.sort((m,c)=>m-c),this.internalPointsCache={marks:e,step:t,points:f}}return this.internalPointsCache.points},moveTo(e,t){const n=[...this.bounds],{sHandle:a,recent:v}=this,p=a===null?v:a;n[p]=e;let f=p;this.$props.pushable!==!1?this.pushSurroundingHandles(n,f):this.$props.allowCross&&(n.sort((m,c)=>m-c),f=n.indexOf(e)),this.onChange({recent:f,sHandle:f,bounds:n}),t&&(this.$emit("afterChange",n),this.setState({},()=>{this.handlesRefs[f].focus()}),this.onEnd())},pushSurroundingHandles(e,t){const n=e[t],{pushable:a}=this,v=Number(a);let p=0;if(e[t+1]-n<v&&(p=1),n-e[t-1]<v&&(p=-1),p===0)return;const f=t+p,m=p*(e[f]-n);this.pushHandle(e,f,p,v-m)||(e[t]=e[f]-p*v)},pushHandle(e,t,n,a){const v=e[t];let p=e[t];for(;n*(p-v)<a;){if(!this.pushHandleOnePoint(e,t,n))return e[t]=v,!1;p=e[t]}return!0},pushHandleOnePoint(e,t,n){const a=this.getPoints(),p=a.indexOf(e[t])+n;if(p>=a.length||p<0)return!1;const f=t+n,m=a[p],{pushable:c}=this,h=Number(c),i=n*(e[f]-m);return this.pushHandle(e,f,n,h-i)?(e[t]=m,!0):!1},trimAlignValue(e){const{sHandle:t,bounds:n}=this;return go({value:e,handle:t,bounds:n,props:this.$props})},ensureValueNotConflict(e,t,n){let{allowCross:a,pushable:v}=n;const p=this.$data||{},{bounds:f}=p;if(e=e===void 0?p.sHandle:e,v=Number(v),!a&&e!=null&&f!==void 0){if(e>0&&t<=f[e-1]+v)return f[e-1]+v;if(e<f.length-1&&t>=f[e+1]-v)return f[e+1]-v}return t},getTrack(e){let{bounds:t,prefixCls:n,reverse:a,vertical:v,included:p,offsets:f,trackStyle:m}=e;return t.slice(0,-1).map((c,h)=>{const i=h+1,o=Ie({[`${n}-track`]:!0,[`${n}-track-${i}`]:!0});return D(rc,{class:o,vertical:v,reverse:a,included:p,offset:f[i-1],length:f[i]-f[i-1],style:m[h],key:i},null)})},renderSlider(){const{sHandle:e,bounds:t,prefixCls:n,vertical:a,included:v,disabled:p,min:f,max:m,reverse:c,handle:h,defaultHandle:i,trackStyle:o,handleStyle:l,tabindex:s,ariaLabelGroupForHandles:r,ariaLabelledByGroupForHandles:u,ariaValueTextFormatterGroupForHandles:d}=this,g=h||i,y=t.map(b=>this.calcOffset(b)),x=`${n}-handle`,C=t.map((b,w)=>{let _=s[w]||0;(p||s[w]===null)&&(_=null);const I=e===w;return g({class:Ie({[x]:!0,[`${x}-${w+1}`]:!0,[`${x}-dragging`]:I}),prefixCls:n,vertical:a,dragging:I,offset:y[w],value:b,index:w,tabindex:_,min:f,max:m,reverse:c,disabled:p,style:l[w],ref:E=>this.saveHandle(w,E),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:r[w],ariaLabelledBy:u[w],ariaValueTextFormatter:d[w]})});return{tracks:this.getTrack({bounds:t,prefixCls:n,reverse:c,vertical:a,included:v,offsets:y,trackStyle:o}),handles:C}}}}),Yp=fc(Gp),Zp=ce({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Gu(),setup(e,t){let{attrs:n,slots:a}=t;const v=Y(null),p=Y(null);function f(){At.cancel(p.value),p.value=null}function m(){p.value=At(()=>{var h;(h=v.value)===null||h===void 0||h.forcePopupAlign(),p.value=null})}const c=()=>{f(),e.open&&m()};return me([()=>e.open,()=>e.title],()=>{c()},{flush:"post",immediate:!0}),Gs(()=>{c()}),_n(()=>{f()}),()=>D(en,oe(oe({ref:v},e),n),a)}}),Kp=e=>{const{componentCls:t,controlSize:n,dotSize:a,marginFull:v,marginPart:p,colorFillContentHover:f}=e;return{[t]:J(J({},Yt(e)),{position:"relative",height:n,margin:`${p}px ${v}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${v}px ${p}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:f},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
|
|
inset-inline-start ${e.motionDurationMid},
|
|
inset-block-start ${e.motionDurationMid},
|
|
width ${e.motionDurationMid},
|
|
height ${e.motionDurationMid},
|
|
box-shadow ${e.motionDurationMid}
|
|
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+e.handleLineWidthHover*2,height:e.handleSizeHover+e.handleLineWidthHover*2},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:a,height:a,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,"&-active":{borderColor:e.colorPrimaryBorder}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${t}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[`
|
|
${t}-dot
|
|
`]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new Gt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[`
|
|
${t}-mark-text,
|
|
${t}-dot
|
|
`]:{cursor:"not-allowed !important"}}})}},pc=(e,t)=>{const{componentCls:n,railSize:a,handleSize:v,dotSize:p}=e,f=t?"paddingBlock":"paddingInline",m=t?"width":"height",c=t?"height":"width",h=t?"insetBlockStart":"insetInlineStart",i=t?"top":"insetInlineStart";return{[f]:a,[c]:a*3,[`${n}-rail`]:{[m]:"100%",[c]:a},[`${n}-track`]:{[c]:a},[`${n}-handle`]:{[h]:(a*3-v)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[i]:v,[m]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[i]:a,[m]:"100%",[c]:a},[`${n}-dot`]:{position:"absolute",[h]:(a-p)/2}}},Xp=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:J(J({},pc(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},Qp=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:J(J({},pc(e,!1)),{height:"100%"})}},Jp=kn("Slider",e=>{const t=Jt(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[Kp(t),Xp(t),Qp(t)]},e=>{const n=e.controlHeightLG/4,a=e.controlHeightSM/2,v=e.lineWidth+1,p=e.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:a,dotSize:8,handleLineWidth:v,handleLineWidthHover:p}});var is=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,a=Object.getOwnPropertySymbols(e);v<a.length;v++)t.indexOf(a[v])<0&&Object.prototype.propertyIsEnumerable.call(e,a[v])&&(n[a[v]]=e[a[v]]);return n};const qp=e=>typeof e=="number"?e.toString():"",eg=()=>({id:String,prefixCls:String,tooltipPrefixCls:String,range:pt([Boolean,Object]),reverse:Ke(),min:Number,max:Number,step:pt([Object,Number]),marks:Go(),dots:Ke(),value:pt([Array,Number]),defaultValue:pt([Array,Number]),included:Ke(),disabled:Ke(),vertical:Ke(),tipFormatter:pt([Function,Object],()=>qp),tooltipOpen:Ke(),tooltipVisible:Ke(),tooltipPlacement:Nt(),getTooltipPopupContainer:De(),autofocus:Ke(),handleStyle:pt([Array,Object]),trackStyle:pt([Array,Object]),onChange:De(),onAfterChange:De(),onFocus:De(),onBlur:De(),"onUpdate:value":De()}),tg=ce({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:eg(),slots:Object,setup(e,t){let{attrs:n,slots:a,emit:v,expose:p}=t;const{prefixCls:f,rootPrefixCls:m,direction:c,getPopupContainer:h,configProvider:i}=Dt("slider",e),[o,l]=Jp(f),s=qo(),r=Y(),u=Y({}),d=(_,I)=>{u.value[_]=I},g=le(()=>e.tooltipPlacement?e.tooltipPlacement:e.vertical?c.value==="rtl"?"left":"right":"top"),y=()=>{var _;(_=r.value)===null||_===void 0||_.focus()},x=()=>{var _;(_=r.value)===null||_===void 0||_.blur()},C=_=>{v("update:value",_),v("change",_),s.onFieldChange()},b=_=>{v("blur",_)};p({focus:y,blur:x});const w=_=>{var{tooltipPrefixCls:I}=_,E=_.info,{value:k,dragging:A,index:S}=E,M=is(E,["value","dragging","index"]);const{tipFormatter:$,tooltipOpen:L=e.tooltipVisible,getTooltipPopupContainer:T}=e,R=$?u.value[S]||A:!1,P=L||L===void 0&&R;return D(Zp,{prefixCls:I,title:$?$(k):"",open:P,placement:g.value,transitionName:`${m.value}-zoom-down`,key:S,overlayClassName:`${f.value}-tooltip`,getPopupContainer:T||(h==null?void 0:h.value)},{default:()=>[D(lc,oe(oe({},M),{},{value:k,onMouseenter:()=>d(S,!0),onMouseleave:()=>d(S,!1)}),null)]})};return()=>{const{tooltipPrefixCls:_,range:I,id:E=s.id.value}=e,k=is(e,["tooltipPrefixCls","range","id"]),A=i.getPrefixCls("tooltip",_),S=Ie(n.class,{[`${f.value}-rtl`]:c.value==="rtl"},l.value);c.value==="rtl"&&!k.vertical&&(k.reverse=!k.reverse);let M;return typeof I=="object"&&(M=I.draggableTrack),o(I?D(Yp,oe(oe(oe({},n),k),{},{step:k.step,draggableTrack:M,class:S,ref:r,handle:$=>w({tooltipPrefixCls:A,prefixCls:f.value,info:$}),prefixCls:f.value,onChange:C,onBlur:b}),{mark:a.mark}):D(jp,oe(oe(oe({},n),k),{},{id:E,step:k.step,class:S,ref:r,handle:$=>w({tooltipPrefixCls:A,prefixCls:f.value,info:$}),prefixCls:f.value,onChange:C,onBlur:b}),{mark:a.mark}))}}}),Xr=js(tg);var ng={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 og=ng;var ig={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-upload",theme:"outlined"};const rg=ig;var ag={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"};const sg=ag;var lg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M764 280.9c-14-30.6-33.9-58.1-59.3-81.6C653.1 151.4 584.6 125 512 125s-141.1 26.4-192.7 74.2c-25.4 23.6-45.3 51-59.3 81.7-14.6 32-22 65.9-22 100.9v27c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-27c0-99.5 88.6-180.4 197.6-180.4s197.6 80.9 197.6 180.4c0 40.8-14.5 79.2-42 111.2-27.2 31.7-65.6 54.4-108.1 64-24.3 5.5-46.2 19.2-61.7 38.8a110.85 110.85 0 00-23.9 68.6v31.4c0 6.2 5 11.2 11.2 11.2h54c6.2 0 11.2-5 11.2-11.2v-31.4c0-15.7 10.9-29.5 26-32.9 58.4-13.2 111.4-44.7 149.3-88.7 19.1-22.3 34-47.1 44.3-74 10.7-27.9 16.1-57.2 16.1-87 0-35-7.4-69-22-100.9zM512 787c-30.9 0-56 25.1-56 56s25.1 56 56 56 56-25.1 56-56-25.1-56-56-56z"}}]},name:"question",theme:"outlined"};const cg=lg;var ug={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z"}}]},name:"table",theme:"outlined"};const dg=ug;function rs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){hg(e,v,n[v])})}return e}function hg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qr=function(t,n){var a=rs({},t,n.attrs);return D(Mo,rs({},a,{icon:og}),null)};Qr.displayName="CaretRightOutlined";Qr.inheritAttrs=!1;const gc=Qr;function as(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){fg(e,v,n[v])})}return e}function fg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jr=function(t,n){var a=as({},t,n.attrs);return D(Mo,as({},a,{icon:rg}),null)};Jr.displayName="CloudUploadOutlined";Jr.inheritAttrs=!1;const pg=Jr;function ss(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){gg(e,v,n[v])})}return e}function gg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qr=function(t,n){var a=ss({},t,n.attrs);return D(Mo,ss({},a,{icon:sg}),null)};qr.displayName="FileImageOutlined";qr.inheritAttrs=!1;const mg=qr;function ls(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){vg(e,v,n[v])})}return e}function vg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ea=function(t,n){var a=ls({},t,n.attrs);return D(Mo,ls({},a,{icon:cg}),null)};ea.displayName="QuestionOutlined";ea.inheritAttrs=!1;const yg=ea;function cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable}))),a.forEach(function(v){wg(e,v,n[v])})}return e}function wg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ta=function(t,n){var a=cs({},t,n.attrs);return D(Mo,cs({},a,{icon:dg}),null)};ta.displayName="TableOutlined";ta.inheritAttrs=!1;const bg=ta,Tt=(e,t)=>{e.pointsList?e.zIndex=t:e.setZIndex(t)},Cg=(e,t,n)=>{e.forEach((a,v)=>{if(a.id===t.id){const p=e[v-1];if(p){const f=t.zIndex;Tt(n,p.zIndex),f===p.zIndex?Tt(p,f+1):Tt(p,f)}}})},xg=(e,t,n)=>{e.forEach((a,v)=>{if(a.id===t.id){const p=e[v+1];if(p){const f=t.zIndex;Tt(n,p.zIndex),f===p.zIndex?Tt(p,f-1):Tt(p,f)}}})};function na(){return Ct({moveToFront:(v,p,f=[])=>{if(f.length>0){const m=v.getModelById(p.id),c=f.sort((h,i)=>h.zIndex-i.zIndex);c.forEach((h,i)=>{if(h.id===p.id){const o=c[i+1];if(o){const l=p.zIndex;Tt(m,o.zIndex),l===o.zIndex?Tt(o,l-1):Tt(o,l)}else{const{nodes:l,edges:s}=v.graphModel,u=[].concat(l).concat(s).sort((d,g)=>d.zIndex-g.zIndex);xg(u,p,m)}}})}},moveToBack:(v,p,f=[])=>{if(f.length>0){const m=v.getModelById(p.id),c=f.sort((h,i)=>h.zIndex-i.zIndex);c.forEach((h,i)=>{if(h.id===p.id){const o=c[i-1];if(o){const l=p.zIndex;Tt(m,o.zIndex),l===o.zIndex?Tt(o,l+1):Tt(o,l)}else{const{nodes:l,edges:s}=v.graphModel,u=[].concat(l).concat(s).sort((d,g)=>d.zIndex-g.zIndex);Cg(u,p,m)}}})}},moveToTop:(v,p)=>{const f=v.getGraphData(),m=f.nodes.filter(s=>s.type!=="helper-circle-point").map(s=>s.zIndex),c=Math.max(...m),h=f.edges.map(s=>s.zIndex),i=Math.max(...h),o=Math.max(c,i),l=v.getModelById(p.id);Tt(l,o+2)},moveToBottom:(v,p)=>{const f=v.getGraphData(),m=f.nodes.filter(s=>s.type!=="helper-circle-point").map(s=>s.zIndex),c=Math.min(...m),h=f.edges.map(s=>s.zIndex),i=Math.min(...h),o=Math.min(c,i),l=v.getModelById(p.id);Tt(l,o-2)}})}const jn=Jo("graphTransform",{state:()=>({SCALE_X:1,SCALE_Y:1,TRANSLATE_X:0,TRANSLATE_Y:0}),getters:{getScale(e){return{scaleX:e.SCALE_X,scaleY:e.SCALE_Y}},getTranslate(e){return{translateX:e.TRANSLATE_X,translateY:e.TRANSLATE_Y}}},actions:{setScale(e,t){this.SCALE_X=e,this.SCALE_Y=t},setTranslate(e,t){this.TRANSLATE_X=e,this.TRANSLATE_Y=t}}}),$g=jn();let Dn=null;function Sg(e,t){return e.x+=t,e.y+=t,e.text&&(e.text.x+=t,e.text.y+=t),e.properties.x=e.x,e.properties.y=e.y,e}function kg(e,t){return e.x=e.x+t.x,e.y=e.y+t.y,e.text&&(e.text.x+=t.x,e.text.y+=t.y),e.properties.x=e.x,e.properties.y=e.y,e}const _g=40,mo={x:0,y:0},Mg=()=>{const e=document.getElementById("diagram"),{left:t,top:n}=e==null?void 0:e.getBoundingClientRect();return{left:t,top:n}};function mc(){const e=(s,r)=>{if(!s||!s.pointsList[0])return;const u={x:s.pointsList[0].x,y:s.pointsList[0].y},d={x:s.pointsList[s.pointsList.length-1].x,y:s.pointsList[s.pointsList.length-1].y};s.startPoint=u,s.endPoint=d};let t=0,n=0,a=null,v=null,p=null;const f=(s,r,u,d)=>{t=u.x,n=u.y,a=nt(d);const g=s.getNodeModelById(d.sourceNodeId),y=s.getNodeModelById(d.targetNodeId);v=nt(g),p=nt(y),v.id=St(),p.id=St(),a.id=St(),a.sourceNodeId=v.id,a.targetNodeId=p.id},m=(s,r,u)=>{let d=null,g=null,y=null;d=nt(a);const x=v,C=p;if(g=nt(x),y=nt(C),g.id=St(),y.id=St(),d.id=St(),d.sourceNodeId=g.id,d.targetNodeId=y.id,d){const b=u.x-t,w=u.y-n;let _="";d.pointsList.forEach(I=>{I.x=I.x+b,I.y=I.y+w,_+=`${I.x},${I.y} `}),d.points=_.trimEnd(),g&&(g.x=d.pointsList[0].x,g.y=d.pointsList[0].y,s.graphModel.addNode(g)),y&&(y.x=d.pointsList[d.pointsList.length-1].x,y.y=d.pointsList[d.pointsList.length-1].y,s.graphModel.addNode(y)),e(d),s.graphModel.addEdge(d),setTimeout(()=>{const I=s.getNodeModelById(g.id);I.virtual=!1;const E=s.getNodeModelById(y.id);E.virtual=!1},500)}},c={startCopyX:0,endCopyY:0,OriginEdges:[],reset(){this.startCopyX=0,this.endCopyY=0,this.OriginEdges=[]},copy(s,r,u,d){this.startCopyX=u.x,this.endCopyY=u.y;const g=s.getNodeModelById(d.sourceNodeId),y=s.getNodeModelById(d.targetNodeId);this.OriginEdges.push({originEdge:d,originStartNode:g,originEndNode:y})},paste(s,r,u){this.OriginEdges.forEach(d=>{let g=null,y=null,x=null;if(g=nt(d.originEdge),y=nt(d.originStartNode),x=nt(d.originEndNode),y.id=St(),x.id=St(),g.id=St(),g.sourceNodeId=y.id,g.targetNodeId=x.id,g){const C=u.x-this.startCopyX,b=u.y-this.endCopyY;let w="";g.pointsList.forEach(_=>{_.x=_.x+C,_.y=_.y+b,w+=`${_.x},${_.y} `}),g.points=w.trimEnd(),y&&(y.x=g.pointsList[0].x,y.y=g.pointsList[0].y,s.graphModel.addNode(y)),x&&(x.x=g.pointsList[g.pointsList.length-1].x,x.y=g.pointsList[g.pointsList.length-1].y,s.graphModel.addNode(x)),e(g),s.graphModel.addEdge(g),setTimeout(()=>{const _=s.getNodeModelById(y.id);_.virtual=!1;const I=s.getNodeModelById(x.id);I.virtual=!1},500)}})}},h=(s,r)=>{if(r.textEditElement)return!0;const{guards:u}=s.options,d=r.getSelectElements(!1);if(!(u&&u.beforeClone?u.beforeClone(d):!0)||d.nodes.length===0&&d.edges.length===0)return Dn=null,ye.warning("请选择需要复制的元素!"),!0;d.nodes=d.nodes.map(x=>(x.properties.x=x.x,x.properties.y=x.y,x));const y=document.querySelector(".lf-multiple-select");if(y){const x=$g.getScale,{left:C,top:b,width:w,height:_}=window.getComputedStyle(y,null),I=Mg(),E=parseInt(C)+I.left,k=parseInt(b)+I.top,A=s.getPointByClient(E,k),{x:S,y:M}=A.canvasOverlayPosition;mo.x=S+parseInt(w)/x.scaleX/2,mo.y=M+parseInt(_)/x.scaleY/2}return c.reset(),d.edges.forEach(x=>{c.copy(s,s.graphModel,mo,x)}),Dn=d,!1},i=(s,r,u,d)=>{if(r.textEditElement)return!0;if(Dn&&(Dn.nodes||Dn.edges)){if(s.clearSelectElements(),!Dn)return!0;const g=nt(Dn);let y={};const{nodes:x,edges:C}=g;x.length>1||C.length>1?y={x:u.x-mo.x,y:u.y-mo.y}:y={x:u.x-x[0].x,y:u.y-x[0].y},g.nodes.forEach(w=>{w.type==="custom-text-node"&&(w.properties.id=w.id),u?kg(w,y):Sg(w,_g)}),c.paste(s,s.graphModel,u);const b=s.addElements(g);b.nodes.forEach(w=>{s.selectElementById(w.id,!0),d&&d("nodeSelected",w)}),b.edges.forEach(w=>s.selectElementById(w.id,!0))}return!1},o=(s,r)=>{if(r.textEditElement)return!0;const u=r.getSelectElements(!0);return s.clearSelectElements(),u.edges.forEach(d=>s.deleteEdge(d.id)),u.nodes.forEach(d=>s.deleteNode(d.id)),!1};return Ct({copy:h,paste:i,cut:(s,r)=>{h(s,r),o(s,r)},copyEdge:f,pasteEdge:m})}const Ag=["width","height"],Lg={"clip-path":"url(#master_svg0_106_12879)"},Eg=["fill"],vc=ce({__name:"moveToTopIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12879"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",Lg,[z("g",null,[z("path",{d:"M11.46901171875,5.471C11.76191171875,5.17821,12.23671171875,5.17821,12.52951171875,5.471L16.53001171875,9.47C16.83171171875,9.7613,16.835911718749998,10.2433,16.53941171875,10.53981C16.242811718749998,10.83631,15.76081171875,10.83212,15.46951171875,10.5305L12.75001171875,7.811L12.75001171875,22.001C12.75001171875,22.4152,12.41431171875,22.751,12.00001171875,22.751C11.58581171875,22.751,11.25001171875,22.4152,11.25001171875,22.001L11.25001171875,7.811L8.52905171875,10.5305C8.24007171875,10.84403,7.74817171875,10.85388,7.44687171875,10.55215C7.14558171875,10.25043,7.15611171875,9.75854,7.47006171875,9.47L11.46901171875,5.471ZM1.24955651165,2C1.24955642225,1.585786,1.58534271875,1.25,1.99955671875,1.25L21.99901171875,1.25C22.41331171875,1.25,22.74901171875,1.585786,22.74901171875,2C22.74901171875,2.4142099999999997,22.41331171875,2.75,21.99901171875,2.75L1.99505671875,2.75C1.58084271875,2.75,1.24505656875,2.4142099999999997,1.24955651165,2Z",fill:B(n),"fill-opacity":"1"},null,8,Eg)])])],8,Ag))}}),Ig=["width","height"],Tg={"clip-path":"url(#master_svg0_106_12875)"},Dg=["fill"],yc=ce({__name:"moveToBottomIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12875"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",Tg,[z("g",null,[z("path",{d:"M1.2509765625,22.001C1.250976473093,21.5868,1.5867625625,21.251,2.0009765625,21.251L22.0004765625,21.251C22.4146765625,21.251,22.7504765625,21.5868,22.7504765625,22.001C22.7504765625,22.4152,22.4146765625,22.751,22.0004765625,22.751L2.0009765625,22.751C1.5867625625,22.751,1.2509765625,22.4152,1.2509765625,22.001ZM11.9999765625,1.25C12.4141765625,1.249999910593,12.7499765625,1.585786,12.7499765625,2L12.7499765625,16.189999999999998L15.4709765625,13.4705C15.7670765625,13.1984,16.2250765625,13.2082,16.509176562500002,13.4927C16.7933765625,13.7773,16.8024765625,14.2353,16.5299765625,14.531L12.5309765625,18.53C12.2380765625,18.8228,11.7633765625,18.8228,11.4704765625,18.53L7.4699765625,14.531C7.1857465625,14.2367,7.1898165625,13.7689,7.4791165625,13.4796C7.7684165625,13.1903,8.2361965625,13.1863,8.530476562499999,13.4705L11.2499765625,16.189999999999998L11.2499765625,2C11.2499765625,1.585787,11.5857765625,1.250000268221,11.9999765625,1.25Z",fill:B(n),"fill-opacity":"1"},null,8,Dg)])])],8,Ig))}}),Rg=["width","height"],Pg=["fill"],Ng=["fill"],ao=ce({__name:"deleteIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M840 288H688v-56c0-40-32-72-72-72h-208C368 160 336 192 336 232V288h-152c-12.8 0-24 11.2-24 24s11.2 24 24 24h656c12.8 0 24-11.2 24-24s-11.2-24-24-24zM384 288v-56c0-12.8 11.2-24 24-24h208c12.8 0 24 11.2 24 24V288H384zM758.4 384c-12.8 0-24 11.2-24 24v363.2c0 24-19.2 44.8-44.8 44.8H332.8c-24 0-44.8-19.2-44.8-44.8V408c0-12.8-11.2-24-24-24s-24 11.2-24 24v363.2c0 51.2 41.6 92.8 92.8 92.8h358.4c51.2 0 92.8-41.6 92.8-92.8V408c-1.6-12.8-12.8-24-25.6-24z",fill:B(n)},null,8,Pg),z("path",{d:"M444.8 744v-336c0-12.8-11.2-24-24-24s-24 11.2-24 24v336c0 12.8 11.2 24 24 24s24-11.2 24-24zM627.2 744v-336c0-12.8-11.2-24-24-24s-24 11.2-24 24v336c0 12.8 11.2 24 24 24s24-11.2 24-24z",fill:B(n)},null,8,Ng)],8,Rg))}}),Og=["width","height"],Bg={style:{"mix-blend-mode":"passthrough"},"clip-path":"url(#master_svg0_106_13176)"},Fg={style:{"mix-blend-mode":"passthrough"}},Hg=["fill"],Qi=ce({__name:"viewModeIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_13176"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",Bg,[z("g",Fg,[z("path",{d:"M12,3.75C15.7814,4.094,18.719,5.469,20.8126,7.875C22.906,10.280999999999999,23.9684,11.655999999999999,24,12C23.9684,12.344,22.906,13.719,20.8126,16.125C18.719,18.531,15.7814,19.906,12,20.25C8.2185,19.906,5.281,18.531,3.1875,16.125C1.094,13.719,0.0315,12.344,0,12C0.0315,11.655999999999999,1.094,10.280999999999999,3.1875,7.875C5.281,5.469,8.2185,4.094,12,3.75C12,3.75,12,3.75,12,3.75ZM12,5.25C9.3435,5.422,7.1325,6.3165,5.367,7.9335C3.6015,9.5505,2.39825,10.905999999999999,1.75726,12C2.39774,13.094,3.601,14.4495,5.367,16.0666C7.133,17.6836,9.344,18.578,12,18.75C14.6564,18.578,16.8674,17.6836,18.633,16.0666C20.3986,14.4495,21.6018,13.094,22.2427,12C21.6023,10.905999999999999,20.399,9.5505,18.633,7.9335C16.867,6.3165,14.656,5.422,12,5.25C12,5.25,12,5.25,12,5.25ZM12,6.75C13.4845,6.781499999999999,14.7228,7.2932500000000005,15.7147,8.285260000000001C16.7068,9.27725,17.2186,10.5155,17.25,12C17.2186,13.4845,16.7068,14.7228,15.7147,15.7147C14.7228,16.7068,13.4845,17.218600000000002,12,17.25C10.5155,17.218600000000002,9.27725,16.7068,8.28526,15.7147C7.29325,14.7228,6.7815,13.4845,6.75,12C6.7815,10.5155,7.29325,9.27725,8.28526,8.285260000000001C9.27725,7.2932500000000005,10.5155,6.781499999999999,12,6.75C12,6.75,12,6.75,12,6.75ZM12,8.25C10.9375,8.281500000000001,10.0548,8.64875,9.35176,9.351759999999999C8.64875,10.05475,8.2815,10.9375,8.25,12C8.2815,13.0625,8.64875,13.9452,9.35176,14.6482C10.0548,15.3513,10.9375,15.7185,12,15.75C13.0625,15.7185,13.9452,15.3513,14.6483,14.6482C15.3512,13.9452,15.7186,13.0625,15.75,12C15.7186,10.9375,15.3512,10.05475,14.6483,9.351759999999999C13.9452,8.64875,13.0625,8.281500000000001,12,8.25C12,8.25,12,8.25,12,8.25C12,8.25,12,8.25,12,8.25Z",fill:B(n),"fill-opacity":"1"},null,8,Hg)])])],8,Og))}}),zg=["width","height"],Wg=["fill"],us=ce({__name:"hiddenIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1102 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M1080.950154 519.876923l-0.078769-0.157538-0.157539-0.07877c-44.740923-94.444308-98.461538-170.692923-160.846769-228.903384l-62.385231 62.464c53.799385 49.467077 100.273231 115.318154 140.445539 198.025846-102.557538 212.125538-247.886769 312.713846-446.54277 312.713846-63.172923 0-120.989538-10.161231-173.764923-30.798769l-67.347692 67.268923c71.995077 34.658462 152.260923 52.224 241.112615 52.224 236.544 0 412.750769-123.667692 529.48677-369.585231a74.043077 74.043077 0 0 0 0.078769-63.172923z m-78.769231-408.812308l-52.145231-52.224a9.846154 9.846154 0 0 0-13.942154 0L792.418462 202.436923C720.502154 167.620923 640.393846 150.134154 551.384615 150.134154c-236.544 0-412.750769 123.667692-529.486769 369.585231V519.876923a74.200615 74.200615 0 0 0 0 63.409231c44.819692 94.365538 98.461538 170.692923 160.846769 228.982154l-123.904 123.667692a9.846154 9.846154 0 0 0 0 13.942154l52.145231 52.224a9.846154 9.846154 0 0 0 13.942154 0L1002.180923 124.770462a9.767385 9.767385 0 0 0 0-13.784616z m-589.981538 471.591385a137.846154 137.846154 0 0 1 165.572923-165.572923L412.120615 582.656z m227.091692-227.091692a216.772923 216.772923 0 0 0-288.610462 288.610461L245.287385 749.568c-53.799385-49.545846-100.273231-115.318154-140.445539-198.025846C207.478154 339.416615 352.886154 238.828308 551.384615 238.828308c63.172923 0 120.989538 10.161231 173.764923 30.798769l-85.858461 85.937231zM546.500923 689.230769c-7.876923 0-15.675077-0.630154-23.158154-1.969231l-62.936615 62.857847a216.615385 216.615385 0 0 0 284.908308-284.908308l-62.857847 62.936615A138.003692 138.003692 0 0 1 546.422154 689.230769z",fill:B(n),"fill-opacity":".65"},null,8,Wg)],8,zg))}}),Vg=["width","height"],jg={"clip-path":"url(#master_svg0_106_12877)"},Ug=["fill"],Ji=ce({__name:"lockIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12877"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",jg,[z("g",null,[z("path",{d:"M6.4628946875,7.517575L6.4628946875,7.385745L6.4628946875,7.517575C6.4628946875,4.089845,8.9677746875,1.453125,12.0000046875,1.453125C14.9004046875,1.453125,17.537104687499998,3.958005,17.537104687499998,6.858395L17.537104687499998,7.517575L19.5146046875,7.517575C20.8330046875,7.517575,21.8877046875,8.704105,21.8877046875,10.022465L21.8877046875,20.042025C21.8877046875,21.492225,20.8330046875,22.546925,19.5146046875,22.546925L4.4853546875,22.546925C3.1669946875,22.546925,2.1123046875,21.360325,2.1123046875,20.042025L2.1123046875,10.022465C2.1123046875,8.572265,3.1669946875,7.517575,4.4853546875,7.517575L6.4628946875,7.517575ZM7.7812546875,7.517575L16.2187046875,7.517575L16.2187046875,6.858395C16.2187046875,5.012695,14.5049046875,2.771485,12.0000046875,2.771485C9.6269546875,2.771485,7.7812546875,4.880855,7.7812546875,7.517575L7.7812546875,7.385745L7.7812546875,7.517575ZM4.4853546875,8.835935C3.9580046875,8.835935,3.4306646875,9.363285000000001,3.4306646875,10.022465L3.4306646875,20.042025C3.4306646875,20.701125,3.9580046875,21.228525,4.4853546875,21.228525L19.5146046875,21.228525C20.0420046875,21.228525,20.5693046875,20.701125,20.5693046875,20.042025L20.5693046875,10.022465C20.5693046875,9.363285000000001,20.0420046875,8.835935,19.5146046875,8.835935L4.4853546875,8.835935ZM12.0000046875,18.064425C10.4179646875,18.064425,8.9677746875,16.746125,8.9677746875,15.164025C8.9677746875,13.582025,10.2861346875,12.263625,12.0000046875,12.263625C13.5820046875,12.263625,15.0322046875,13.582025,15.0322046875,15.164025C15.0322046875,16.746125,13.5820046875,18.064425,12.0000046875,18.064425ZM12.0000046875,13.450225C11.0771446875,13.450225,10.2861346875,14.241225,10.2861346875,15.032225C10.2861346875,15.823225,11.0771446875,16.614224999999998,12.0000046875,16.614224999999998C12.9228046875,16.614224999999998,13.7139046875,15.823225,13.7139046875,15.032225C13.7139046875,14.241225,12.9228046875,13.450225,12.0000046875,13.450225Z",fill:B(n),"fill-opacity":"1"},null,8,Ug)])])],8,Vg))}}),Gg=["width","height"],Yg=["fill"],qi=ce({__name:"unlockIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M146.77333333 1020.35911111h746.38222222c19.79733333 0 35.84-16.04266667 35.84-35.84V525.08444445c0-19.79733333-16.04266667-35.84-35.84-35.84H254.40711111V338.48888889c0-146.432 119.12533333-265.55733333 265.55733334-265.55733334 107.97511111 0 204.45866667 64.512 245.64622222 164.4088889 7.50933333 18.31822222 28.55822222 27.07911111 46.87644444 19.456 18.31822222-7.50933333 27.07911111-28.55822222 19.456-46.87644445C779.60533333 83.05777778 657.18044445 1.13777778 519.96444445 1.13777778c-186.02666667 0-337.35111111 151.32444445-337.35111112 337.35111111V489.24444445H146.77333333c-19.79733333 0-35.84 16.04266667-35.84 35.84v459.32088888c-0.11377778 19.79733333 15.92888889 35.95377778 35.84 35.95377778zM182.61333333 560.92444445h674.70222222v387.5271111h-674.70222222V560.92444445z m380.35911112 107.74755555V862.43555555c0 19.79733333-16.04266667 35.84-35.84 35.84s-35.84-16.04266667-35.84-35.84v-86.12977777h-21.504c-19.79733333 0-35.84-16.04266667-35.84-35.84s16.04266667-35.84 35.84-35.84h21.504v-35.84c0-19.79733333 16.04266667-35.84 35.84-35.84 19.79733333-0.22755555 35.84 15.81511111 35.84 35.72622222z",fill:B(n)},null,8,Yg)],8,Gg))}}),Un=Jo("graphDataList",{state:()=>({nodes:[],edges:[]}),getters:{getNodes(e){return e.nodes},getEdges(e){return e.edges},getNodesById(e){return t=>e.nodes.find(a=>a.id===t)||null},getEdgesById(e){return t=>e.edges.find(a=>a.id===t)||null}},actions:{set(e){this.$state={...e}},setNodes(e){this.nodes=e},setEdges(e){this.edges=e},updateNode(e){const t=this.nodes.find(n=>n.id===e.id);t&&Object.assign(t,{...e})},updateEdge(e){const t=this.edges.find(n=>n.id===e.id);t&&Object.assign(t,{...e})}}}),Zg={class:"h-full flex flex-col overflow-hidden"},Kg={class:"w-full flex justify-between items-center"},Xg={key:0,class:"flex w-1/2 justify-end"},Qg={class:"layers-footer flex justify-between items-center border-b-solid border border-gray-2 dark:border-dark-1 bg-light dark:bg-dark"},Jg=ce({__name:"layers",emits:["selectElement"],setup(e,{expose:t,emit:n}){const a=n,v=Un(),p=Y(),f=Lt("diagramRef"),m=Y(),c=Y(),h=Y(),i=Y(!1),o=G=>{if(c.value=G.slice().pop(),c.value){f.value.lfInstance.graphModel.selectElementById(c.value,!1),m.value=[c.value],h.value=[c.value];const K=f.value.lfInstance.getDataById(c.value);a("selectElement",K)}},l=G=>{const K=f.value.lfInstance.graphModel;K.clearSelectElements(),m.value=[...G],G.forEach(ee=>{K.selectElementById(ee,!0)}),G.length===p.value.length?i.value=!0:G.length===0&&(i.value=!1)},s=G=>{const K=[];let ee=G.filter(te=>te.children&&te.children.length>0);if(ee&&ee.length>0){const te=[];ee=ee.map(de=>(de.childNodes=[],de.children.forEach(he=>{te.push(he);const re=G.find(ue=>ue.id===he);re&&re.type!=="helper-circle-point"&&de.childNodes.push(re)}),de.childNodes=de.childNodes.sort((he,re)=>re.zIndex-he.zIndex).filter(he=>he.type!=="helper-circle-point"),de));const ae=G.filter(de=>!te.includes(de.id)&&!de.children).filter(de=>de.type!=="helper-circle-point");return K.push(...ae),K.push(...ee),K}else return G.sort((ae,de)=>de.zIndex-ae.zIndex).filter(ae=>ae.type!=="helper-circle-point")};let r=0;me([()=>v.getNodes,()=>v.getEdges],([G,K])=>{if(r>10){r=0;return}else r+=1;const ee=[],te=s(G),ae=s(K);ee.push(...te),ee.push(...ae),p.value=ee.sort((re,ue)=>ue.zIndex-re.zIndex);const de=f.value.lfInstance.getSelectElements(),he=[];de.nodes.forEach(re=>{he.push(re.id)}),de.edges.forEach(re=>{he.push(re.id)}),m.value=he,h.value=he},{immediate:!0,deep:!0});const u=G=>{},d=G=>{},g=Y("#888");me(ht,G=>{g.value=G?"#ffffff":"#888"});const y=G=>{const K=f.value.lfInstance.getModelById(G);return K?K.visible:!0},x=G=>{const K=f.value.lfInstance.getModelById(G);return K?!K.visible:!1},C=G=>{const K=f.value.lfInstance.getModelById(G);K.visible=!1,f.value.lfInstance.setProperties(G,{visible:!1}),K.properties.showHideContainChildren&&Pi(f.value.lfInstance,{nodes:[K],edges:[]}).forEach(te=>{te.visible=K.visible,f.value.lfInstance.setProperties(te.id,{visible:K.visible})})},b=G=>{const K=f.value.lfInstance.getModelById(G);K.visible=!0,f.value.lfInstance.setProperties(G,{visible:!0}),K.properties.showHideContainChildren&&Pi(f.value.lfInstance,{nodes:[K],edges:[]}).forEach(te=>{te.visible=K.visible,f.value.lfInstance.setProperties(te.id,{visible:K.visible})})},w=G=>!f.value.lfInstance.getModelById(G).draggable,_=G=>{const K=f.value.lfInstance.getModelById(G);K.draggable=!0,K.editable=!0,K.isHitable=!0},I=G=>f.value.lfInstance.getModelById(G).draggable,E=G=>{const K=f.value.lfInstance.getModelById(G);K.draggable=!1,K.editable=!1,K.isHitable=!1};let k=[];const A=(G,K)=>{if(k=[],K.pointsList){const ee=G.getElement(K.id),{x:te,y:ae,width:de,height:he}=Ni(ee),re={x:te,y:ae,width:de,height:he};G.nodes.forEach(ue=>{if(ue.type==="helper-circle-point")return;const ne={x:ue.x-ue.width/2,y:ue.y-ue.height/2,width:ue.width,height:ue.height};Ot(ne,re)&&k.push(ue)}),G.edges.forEach(ue=>{if(ue.modelType!=="line-edge"){const ne=ue.pointsList[0],pe=ue.pointsList[ue.pointsList.length-1],Se=Math.abs(pe.x-ne.x),Me=Math.abs(pe.y-ne.y),Le={x:ne.x<pe.x?ne.x:pe.x,y:ne.y<pe.y?ne.y:pe.y,width:Se,height:Me};Ot(Le,re)&&k.push(ue)}else{const ne={x:ue.startPoint.x<ue.endPoint.x?ue.startPoint.x:ue.endPoint.x,y:ue.startPoint.y<ue.endPoint.y?ue.startPoint.y:ue.endPoint.y,width:Math.abs(ue.startPoint.x-ue.endPoint.x),height:Math.abs(ue.startPoint.y-ue.endPoint.y)};Ot(ne,re)&&k.push(ue)}})}else{const ee=G.getElement(K.id),te={x:ee.x-ee.width/2,y:ee.y-ee.height/2,width:ee.width,height:ee.height};G.nodes.forEach(ae=>{if(ae.type==="helper-circle-point")return;const de={x:ae.x-ae.width/2,y:ae.y-ae.height/2,width:ae.width,height:ae.height};Ot(de,te)&&k.push(ae)}),G.edges.forEach(ae=>{const de=ae.pointsList[0],he=ae.pointsList[ae.pointsList.length-1],re=Math.abs(he.x-de.x),ue=Math.abs(he.y-de.y),ne={x:de.x<he.x?de.x:he.x,y:de.y<he.y?de.y:he.y,width:re,height:ue};Ot(ne,te)&&k.push(ae)})}},{moveToFront:S,moveToBack:M}=na(),$=G=>{var te;const K=f.value.lfInstance,ee=K.getModelById(G);A(K.graphModel,ee),k.length===1&&k[0].id===G&&(k=(te=p.value)==null?void 0:te.map(ae=>{const de=K.getModelById(ae.id);return ae.children&&ae.children.length>0&&(ae.children=ae.children.map(he=>K.getModelById(he.id))),de})),S(K,ee,k)},L=G=>{var te;const K=f.value.lfInstance,ee=K.getModelById(G);A(K.graphModel,ee),k.length===1&&k[0].id===G&&(k=(te=p.value)==null?void 0:te.map(ae=>{const de=K.getModelById(ae.id);return ae.children&&ae.children.length>0&&(ae.children=ae.children.map(he=>K.getModelById(he.id))),de})),M(K,ee,k)},{copy:T,paste:R,pasteEdge:P,copyEdge:F}=mc(),O=()=>{if(!c.value)return ye.warning("请选择节点");const G=f.value.lfInstance.getModelById(m.value[0]);if(G.type==="default-group")return ye.warning("不能复制部件组");if(G.type==="pure-curved-polyline"){const K=f.value.lfInstance.getEdgeModelById(G.id);G.pointsList=K.pointsList;const{x:ee,y:te,width:ae,height:de}=Ni(K),he={x:ee+ae/2,y:te+de/2};F(f.value.lfInstance,f.value.lfInstance.graphModel,he,G),P(f.value.lfInstance,f.value.lfInstance.graphModel)}else T(f.value.lfInstance,f.value.lfInstance.graphModel),R(f.value.lfInstance,f.value.lfInstance.graphModel)};me(i,G=>{var K,ee;if(G){const te=[];(K=p.value)==null||K.forEach(de=>{if(de.childNodes){const he=de.childNodes.map(re=>re.id);te.push(...he)}}),(ee=p.value)==null||ee.forEach(de=>{te.includes(de.id)||te.push(de.id)}),m.value=te,h.value=te;const ae=f.value.lfInstance.graphModel;ae.clearSelectElements(),te.forEach(de=>{ae.selectElementById(de,!0)})}else m.value=[],h.value=[],f.value.lfInstance.graphModel.clearSelectElements()});const N=()=>{if(m.value.length===0)return ye.warning("请选择节点");m.value.forEach(G=>{f.value.lfInstance.deleteElement(G)})},V=Y(!0),H=Y(!0),W=()=>{const K=f.value.lfInstance.getGraphData();K.nodes.forEach(ee=>{H.value?C(ee.id):b(ee.id)}),K.edges.forEach(ee=>{H.value?C(ee.id):b(ee.id)}),H.value=!H.value,H.value||(f.value.customLinesPoints={}),V.value=!1,bt(()=>{V.value=!0})},j=Y(!1),Z=()=>{const K=f.value.lfInstance.getGraphData();K.nodes.forEach(ee=>{j.value?_(ee.id):E(ee.id)}),K.edges.forEach(ee=>{j.value?_(ee.id):E(ee.id)}),j.value=!j.value,V.value=!1,bt(()=>{V.value=!0})},q=(G,K)=>{if(G.materialName)return G.materialName;if(G.nodeAlias)return G.nodeAlias;switch(K){case"pro-line":return"直线连线";case"pro-polyline":return"直角连线";case"pro-curved-edge":return"圆角连线";case"pure-polyline":return"直角画线";case"pure-curved-polyline":return"圆角画线";case"pro-bezier":return"贝塞尔连线"}};return ot(()=>{f.value.lfInstance.on("blank:click",()=>{m.value=[],h.value=[],i.value=!1})}),t({selectedKeys:m}),(G,K)=>{const ee=en,te=ed,ae=Vo,de=_o;return Q(),ie(Fe,null,[z("div",Zg,[B(V)?(Q(),be(te,{key:0,selectedKeys:B(m),"onUpdate:selectedKeys":K[0]||(K[0]=he=>qe(m)?m.value=he:null),checkedKeys:B(h),"onUpdate:checkedKeys":K[1]||(K[1]=he=>qe(h)?h.value=he:null),class:kt(["draggable-tree flex-auto",{"dark-tree":B(ht)}]),"block-node":"",checkable:"",multiple:!0,"tree-data":B(p),"field-names":{key:"id",children:"childNodes"},onDragenter:u,onDrop:d,onSelect:o,onCheck:l},{title:U(({properties:he,id:re,type:ue})=>[z("div",Kg,[D(ee,{class:"treeTitle"},{title:U(()=>[ve(xt(q(he,ue)),1)]),default:U(()=>[ve(" "+xt(q(he,ue)),1)]),_:2},1024),ue!=="default-group"?(Q(),ie("div",Xg,[D(vc,{width:18,height:18,color:B(g),class:"mr-3 cursor-pointer",onClick:ne=>$(re)},null,8,["color","onClick"]),D(yc,{width:18,height:18,color:B(g),class:"mr-3 cursor-pointer",onClick:ne=>L(re)},null,8,["color","onClick"]),at(D(Qi,{width:18,height:18,color:B(g),class:"mr-3 cursor-pointer",onClick:ne=>C(re)},null,8,["color","onClick"]),[[dt,y(re)]]),at(D(us,{width:18,height:18,color:B(g),class:"mr-3 cursor-pointer",onClick:ne=>b(re)},null,8,["color","onClick"]),[[dt,x(re)]]),at(D(Ji,{width:16,height:16,color:B(g),class:"mr-3 cursor-pointer",onClick:ne=>_(re)},null,8,["color","onClick"]),[[dt,w(re)]]),at(D(qi,{width:16,height:16,color:B(g),class:"mr-3 cursor-pointer",onClick:ne=>E(re)},null,8,["color","onClick"]),[[dt,I(re)]])])):Pe("",!0)])]),_:1},8,["selectedKeys","checkedKeys","class","tree-data"])):Pe("",!0)]),z("div",Qg,[D(de,{checked:B(i),"onUpdate:checked":K[2]||(K[2]=he=>qe(i)?i.value=he:null),style:{"margin-left":"10px"}},{default:U(()=>[D(ee,null,{title:U(()=>K[3]||(K[3]=[ve(" 点击节点--单选节点, 勾选--多选节点 ")])),default:U(()=>[D(ae,{offset:[5,0]},{count:U(()=>[D(B(yg),{style:{"background-color":"#999",color:"#fff","border-radius":"50%","font-size":"10px"}})]),default:U(()=>[K[4]||(K[4]=ve(" 全选 "))]),_:1})]),_:1})]),_:1},8,["checked"]),z("div",null,[D(ee,null,{title:U(()=>K[5]||(K[5]=[ve(" 复制 ")])),default:U(()=>[D(B(Xu),{style:Wt({fontSize:"14px",color:B(g)}),class:"mr-3 cursor-pointer",onClick:O},null,8,["style"])]),_:1}),D(ee,null,{title:U(()=>K[6]||(K[6]=[ve(" 删除 ")])),default:U(()=>[D(ao,{width:16,height:16,color:B(g),class:"mr-3 cursor-pointer",onClick:N},null,8,["color"])]),_:1}),D(ee,null,{title:U(()=>K[7]||(K[7]=[ve(" 显示/隐藏 ")])),default:U(()=>[at(D(Qi,{width:16,height:16,color:B(g),class:"mr-3 cursor-pointer",onClick:W},null,8,["color"]),[[dt,B(H)]]),at(D(us,{width:16,height:16,color:B(g),class:"mr-3 cursor-pointer",onClick:W},null,8,["color"]),[[dt,!B(H)]])]),_:1}),D(ee,null,{title:U(()=>K[8]||(K[8]=[ve(" 锁定/解锁 ")])),default:U(()=>[at(D(Ji,{width:16,height:16,color:B(g),class:"mr-3 cursor-pointer",onClick:Z},null,8,["color"]),[[dt,B(j)]]),at(D(qi,{width:16,height:16,color:B(g),class:"mr-3 cursor-pointer",onClick:Z},null,8,["color"]),[[dt,!B(j)]])]),_:1})])])],64)}}});const qg=it(Jg,[["__scopeId","data-v-6030ec2d"]]);function ri(e,t,n){return le({get(){return new Proxy(e[t],{set(a,v,p){return n(`update:${t}`,{...a,[v]:p}),!0}})},set(a){n(`update:${t}`,a)}})}const vt={queryThingsAttrs:e=>Re.post("/v2/entity/queryThingAttrs",e),filterThingsOnRelation:e=>Re.post("/v2/entity/queryThingAttrs",e),getRelations:e=>Re.get("/v2/dict/relation/list",e),getThingList:e=>Re.get("/v2/entity/list",e),getAttrsList:()=>Re.get("/v2/dict/list"),getThingDetail:e=>Re.get(`/v2/entity/${e}`),getTypeList:()=>Re.get("/v2/entity/types"),getTagList:()=>Re.get("/v2/entity/tags"),getRelationList:e=>Re.get("/v2/relation/detail/list",e),getGroupList:()=>Re.get("/v2/group/list"),getThingGroupList:()=>Re.get("/v2/group/list?type=thing"),getRelationGroupList:()=>Re.get("/v2/relation/root/group"),getAttrList:e=>Re.get("/v2/dict/relation/list",e),getGroupFuncList:()=>Re.get("/v2/api/groupFunc"),createDataSource:e=>Re.post("/v2/api",e),editDataSource:e=>Re.put("/v2/api",e),dataSourceDetail:e=>Re.get(`/v2/api/${e}`),deleteDataSource:e=>Re.delete("/v2/api",e)},e1=ce({__name:"relationForm",props:{modelValue:null},emits:["update:modelValue","sendRelationFormRef"],setup(e,{emit:t}){const n=e,a=t,v=ri(n,"modelValue",a),p=Y(null),f=Y([]),m=Y([]),c=Y([{label:"向上",value:"PU"},{label:"向下",value:"PD"}]),h=async()=>{var d;const u=await vt.getRelationGroupList();return u.code!==0?ye.warning(u.msg):((d=u.data)==null?void 0:d.map(g=>({label:g,value:g})))||[]},i=async()=>{var d;const u=await vt.getRelationList({groupId:v.value.group,limit:9999});if(u.code!==0)return ye.warning(u.msg);if(u.data)return((d=u.data)==null?void 0:d.map(g=>({label:`${g.toName}-${g.toCode}`,value:g.id})))||[]},o=async u=>{const d=await i();m.value=d,setTimeout(()=>{p.value.validateFields(["group"])},100)},l=u=>{setTimeout(()=>{p.value.validateFields(["entity"])},100)},s=u=>{setTimeout(()=>{p.value.validateFields(["to"])},100)},r=()=>{setTimeout(()=>{p.value.validateFields(["level"])},100)};return me(()=>v.value.group,u=>{o()},{immediate:!0}),ot(async()=>{const u=await h();f.value=u,p.value.clearValidate(),p.value.resetFields(),a("sendRelationFormRef",p.value)}),(u,d)=>{const g=fn,y=pn,x=Hn,C=ro,b=zn,w=gn;return Q(),be(w,{ref_key:"relationFormRef",ref:p,model:B(v),name:"basic","label-col":{span:0},"wrapper-col":{span:24},autocomplete:"off"},{default:U(()=>[D(b,{gutter:10},{default:U(()=>[D(x,null,{default:U(()=>[D(y,{label:"",name:"group",rules:[{required:!0,message:"请选择!"}],class:"condition-form-item"},{default:U(()=>[D(g,{value:B(v).group,"onUpdate:value":d[0]||(d[0]=_=>B(v).group=_),style:{width:"180px"},placeholder:"请选择关系组","allow-clear":!0,class:"mr-2",options:B(f),onChange:o},null,8,["value","options"])]),_:1})]),_:1}),D(x,null,{default:U(()=>[D(y,{label:"",name:"entity",class:"condition-form-item",rules:[{required:!0,message:"请选择!"}]},{default:U(()=>[D(g,{value:B(v).entity,"onUpdate:value":d[1]||(d[1]=_=>B(v).entity=_),"allow-clear":!0,style:{width:"180px"},placeholder:"请选择关系点",class:"mr-2",options:B(m),onChange:l},null,8,["value","options"])]),_:1})]),_:1}),D(x,null,{default:U(()=>[D(y,{label:"",name:"to",class:"condition-form-item",rules:[{required:!0,message:"请选择!"}]},{default:U(()=>[D(g,{value:B(v).to,"onUpdate:value":d[2]||(d[2]=_=>B(v).to=_),"allow-clear":!0,style:{width:"180px"},placeholder:"请选择顺序",class:"mr-2",options:B(c),onChange:s},null,8,["value","options"])]),_:1})]),_:1}),D(x,null,{default:U(()=>[D(y,{label:"",name:"level",class:"condition-form-item",rules:[{required:!0,message:"请选择!"}]},{default:U(()=>[D(C,{value:B(v).level,"onUpdate:value":d[3]||(d[3]=_=>B(v).level=_),"allow-clear":!0,min:0,style:{width:"180px"},placeholder:"请输入层级",onChange:r},null,8,["value"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])}}});const wc={getThingConditionList:()=>Re.get("/v2/api/conditionTypes"),save:e=>Re.post("/v2/api",e),edit:e=>Re.put("/v2/api",e),delete:e=>Re.delete("/v2/api",e),info:e=>Re.get(`/v2/api/${e}`),getGroupFuncList:e=>Re.get("/v2/api/groupFunc",e),getIntervalTimesList:()=>Re.get("/sys/dict/type/all")},t1=ce({__name:"thingConditions",props:{modelValue:null,formVisible:{type:Boolean}},emits:["update:modelValue","thingSelected"],setup(e,{expose:t,emit:n}){no(N=>({"70416b53":B(P)}));const a=e,v=n,p=ri(a,"modelValue",v),f=Y([]),m=Y([]),c=Y([]),h=Y([]),i=Y([]),o=Y([]),l=Y([]),s=Y({name:[],code:[]}),r=async()=>{const N=await wc.getThingConditionList();if(N.code!==0)return ye.warning(N.msg);N.data&&(f.value=[],N.data.forEach(V=>{Object.keys(V).forEach(H=>{f.value.push({label:V[H],value:H,disabled:!1})})}))},u=async(N="",V="")=>{const H=await vt.getThingList({name:N,code:V});return H.code!==0?ye.warning(H.msg):H.data},d=async()=>{var V;const N=await vt.getTypeList();return N.code!==0?ye.warning(N.msg):((V=N.data)==null?void 0:V.map(H=>({label:H,value:H})))||[]},g=async()=>{var V;const N=await vt.getTagList();return N.code!==0?ye.warning(N.msg):((V=N.data)==null?void 0:V.map(H=>({label:H,value:H})))||[]},y=async()=>{var V;const N=await vt.getThingGroupList();return N.code!==0?ye.warning(N.msg):((V=N.data)==null?void 0:V.map(H=>({label:H.name,value:H.id})))||[]},x=async(N,V,H,W,j)=>{if(N==="list"||N==="search"){const q=(await u()).map(G=>({...G,label:G.entityName===G.entityCode?`${G.entityName}`:`${G.entityName} - ${G.entityCode}`,value:G.entityId}))||[];m.value[W]=q,c.value=q,j&&(H.value=[])}else if(N==="type"){const Z=await d();m.value[W]=Z,j&&(H.value=[])}else if(N==="tag"){const Z=await g();m.value[W]=Z,j&&(H.value=[])}else if(N==="relation")j&&(H.value={group:null,entity:null,to:null,level:null});else if(N==="group"){j&&(H.value=[]);const Z=await y();m.value[W]=Z}else if(!N){const Z=p.value.thingCondition[W].value;Z&&Z.length>0&&(p.value.thingCondition[W].value=[]),m.value[W]=[]}},C=(N,V)=>V.label.toLowerCase().includes(N.toLowerCase()),b=(N,V,H,W)=>{H.condition==="list"?(h.value=V.map(j=>j.entityId),v("thingSelected",{ids:h.value,index:W})):H.condition==="type"?o.value=V.map(j=>j.value):H.condition==="tag"?l.value=V.map(j=>j.value):H.condition==="group"&&(i.value=V.map(j=>j.value))},w=Y("1"),_=(N,V)=>w.value==="1"?V.entityName.toLowerCase().includes(N.toLowerCase()):V.entityCode.toLowerCase().includes(N.toLowerCase()),I=N=>{p.value.thingCondition[N].value=[]},E=(N,V,H,W)=>{w.value==="1"?(s.value.name=V.map(j=>j.entityName),s.value.code=[],v("thingSelected",{ids:V.map(j=>j.entityId),index:W})):(s.value.code=V.map(j=>j.entityCode),s.value.name=[],v("thingSelected",{ids:V.map(j=>j.entityId),index:W})),H.search={name:s.value.name,code:s.value.code}},k=async()=>{await r(),p.value.thingCondition.forEach((N,V)=>{x(N.condition,f,N,V,!1)})};me([()=>p.value.thingCondition,()=>a.formVisible],async([N,V],[H,W])=>{V&&await k();const j=N.map(Z=>Z.condition).filter(Boolean);f.value.forEach(Z=>{j.includes(Z.value)?Z.disabled=!0:Z.disabled=!1})},{immediate:!0,deep:!0});const A=N=>N.condition!=="search"&&N.condition!=="relation",S=N=>N.condition==="search",M=N=>N.condition==="relation",$=()=>{p.value.thingCondition.push({condition:null,value:[]})},L=N=>{p.value.thingCondition.splice(N,1)},T=Y(null),R=Y("#000"),P=Y("#ddd");me(ht,N=>{R.value=N?"#ffffff":"#666666",P.value=N?"#333":"#ddd"},{immediate:!0});const F=Y([]),O=(N,V)=>{N&&(F.value[V]=N)};return t({thingConditionFormRef:T,relationRefs:F}),(N,V)=>{const H=fn,W=pn,j=xo,Z=oo,q=Hn,G=zn,K=Eo,ee=Mn,te=gn;return Q(),be(te,{ref_key:"thingConditionFormRef",ref:T,model:B(p),name:"basic","label-col":{span:0},"wrapper-col":{span:24},class:"condition-form",autocomplete:"off"},{default:U(()=>[(Q(!0),ie(Fe,null,ct(B(p).thingCondition,(ae,de)=>(Q(),ie("div",{key:ae.condition,class:"relative"},[D(W,{label:"",name:["thingCondition",de,"condition"],rules:[{required:!0,message:"请选择物条件!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[D(H,{value:ae.condition,"onUpdate:value":he=>ae.condition=he,style:{width:"160px"},"allow-clear":!0,placeholder:"请选择物条件",options:B(f),onChange:(he,re)=>x(he,re,ae,de,!0)},null,8,["value","onUpdate:value","options","onChange"])]),_:2},1032,["name"]),A(ae)?(Q(),be(W,{key:0,label:"",name:["thingCondition",de,"value"],rules:[{required:!0,message:"请选择!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[D(H,{value:ae.value,"onUpdate:value":he=>ae.value=he,mode:"multiple",style:{width:"100%"},placeholder:"请选择","show-search":"","allow-clear":!0,options:B(m)[de],"filter-option":C,onChange:(he,re)=>b(he,re,ae,de)},null,8,["value","onUpdate:value","options","onChange"])]),_:2},1032,["name"])):Pe("",!0),S(ae)?(Q(),be(G,{key:1},{default:U(()=>[D(q,null,{default:U(()=>[D(Z,{value:B(w),"onUpdate:value":V[0]||(V[0]=he=>qe(w)?w.value=he:null),name:"radioGroup",style:{"margin-top":"5px"},onChange:he=>I(de)},{default:U(()=>[D(j,{value:"1"},{default:U(()=>V[1]||(V[1]=[ve(" 名称 ")])),_:1}),D(j,{value:"2"},{default:U(()=>V[2]||(V[2]=[ve(" 编号 ")])),_:1})]),_:2},1032,["value","onChange"])]),_:2},1024),D(q,null,{default:U(()=>[D(W,{label:"",name:["thingCondition",de,"value"],rules:[{required:!0,message:"请选择!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[D(H,{value:ae.value,"onUpdate:value":he=>ae.value=he,"show-search":"","allow-clear":!0,mode:"tags",style:{width:"350px"},placeholder:"请选择物",options:B(c),"filter-option":_,onChange:(he,re)=>E(he,re,ae,de)},null,8,["value","onUpdate:value","options","onChange"])]),_:2},1032,["name"])]),_:2},1024)]),_:2},1024)):Pe("",!0),M(ae)?(Q(),be(e1,{key:2,modelValue:ae.value,"onUpdate:modelValue":he=>ae.value=he,onSendRelationFormRef:he=>O(he,de)},null,8,["modelValue","onUpdate:modelValue","onSendRelationFormRef"])):Pe("",!0),de!==0?(Q(),be(ao,{key:3,width:18,height:18,color:B(R),class:"inline-block absolute bottom-2 right-2 z-100 cursor-pointer",onClick:he=>L(de)},null,8,["color","onClick"])):Pe("",!0),D(K,{style:{margin:"10px 0px"}})]))),128)),D(ee,{onClick:$},{icon:U(()=>[D(B(fr),{style:{"vertical-align":"0.125em"}})]),default:U(()=>[V[3]||(V[3]=ve("新增 "))]),_:1})]),_:1},8,["model"])}}});const n1=it(t1,[["__scopeId","data-v-fd11cf5b"]]),o1={class:"flex justify-between mb-3"},i1={class:"flex justify-start"},r1=["onClick"],a1={style:{padding:"4px 8px",cursor:"pointer",display:"flex","justify-content":"flex-end","align-items":"center"}},s1=ce({__name:"thingAttrs",props:{modelValue:null,dialogVisible:null},emits:["update:modelValue","splitType","noneChoosed"],setup(e,{expose:t,emit:n}){no(W=>({"52b5aea4":B(N)}));const a=e,v=n,p=ri(a,"modelValue",v),f=Y(!1),m=Y([]),c=Y([]);me(()=>a.dialogVisible,W=>{W||(p.value.attrCondition=[{device:[],attrs:[]}],f.value=!1)});const h=async(W="",j="")=>{const Z=await vt.getThingList({name:W,code:j});return Z.code!==0?ye.warning(Z.msg):Z.data.map(q=>({...q,label:q.entityName===q.entityCode?`${q.entityName}`:`${q.entityName} - ${q.entityCode}`,value:q.entityId}))||[]},i=async W=>{var q;const j=await vt.getAttrList({entityIds:W});if(j.code!==0)return ye.warning(j.msg);const Z=[];return((q=j.data)==null?void 0:q.map(G=>{const K=G.code===G.name?G.code:`${G.name} - ${G.code}`;return Z.includes(G.id)?null:(Z.push(G.id),{...G,label:K,value:G.id})}).filter(Boolean))||[]},o=Y([]),l=Y([]),s=Y([]),r=Y([]);me(m,W=>{W.forEach((j,Z)=>{if(!l.value[Z]){o.value[Z]=j;const q=window._.groupBy(j,"groupName"),G=[];Object.keys(q).forEach(K=>{G.push({label:K,value:K})}),s.value[Z]=G,r.value[Z]=q}})},{deep:!0,immediate:!0});const u=(W,j)=>{if(W.length>0){const Z=[];W.forEach(q=>{const G=window._.cloneDeep(r.value[j][q]);Z.push(...G)}),o.value[j]=Z}else o.value[j]=window._.cloneDeep(m.value[j])},d=async(W,j)=>{if(!W||W&&W.length===0){const q=c.value.map(G=>G.entityId);if(q.length>0){const G=await i(q.join(","));m.value[j]=G,p.value.attrCondition[j]={...p.value.attrCondition[j],attrs:[]};return}else{m.value[j]=[],p.value.attrCondition[j]={...p.value.attrCondition[j],attrs:[]};return}}const Z=await i(W.join(","));return m.value[j]=Z,[]},g=Y(""),y=(W,j)=>(g.value=W,j.label.toLowerCase().includes(W.toLowerCase())),x=async W=>{const j=await vt.getRelations(W);return j.code!==0?ye.warning(j.msg):j.data},C=async W=>{const j=await vt.queryThingsAttrs(W);return j.code!==0?ye.warning(j.msg):j.data},b=async({type:W,ids:j,index:Z})=>{if(W==="type"){const ae=(await C({entitys:{type:j}})).map(de=>de.entityId);return[...new Set(ae)]}const q={templateMark:"0"};W==="tag"?(q.type="tag",q.ids=j.join(",")):W==="group"&&(q.groupEntityIds=j.join(","));const K=(await x(q)).map(ee=>ee.entityId);return[...new Set(K)]},w=async W=>{const j=await vt.filterThingsOnRelation(W);if(j.code!==0)return ye.warning(j.msg);const Z=j.data.map(q=>q.entityId);return[...new Set(Z)]},_=async W=>{const j=await h(),Z=[];for(let G=0;G<W.length;G++){const K=W[G];if(["list","search"].includes(K.condition))K.value.length>0&&Z.push(...K.value);else if(K.condition==="tag"){if(K.value.length>0){const ee=await b({type:"tag",ids:K.value,index:G});Z.push(...ee)}}else if(K.condition==="type"){if(K.value.length>0){const ee=await b({type:"type",ids:K.value,index:G});Z.push(...ee)}}else if(K.condition==="group"){if(K.value.length>0){const ee=await b({type:"group",ids:K.value,index:G});Z.push(...ee)}}else if(K.condition==="relation"){const{entity:ee,group:te,level:ae,to:de}=K.value||{};if(ee&&te&&ae&&de){const he=await w({entitys:{relation:[K.value]}});Z.push(...he)}}}const q=Array.from(new Set(Z));q.length>0?c.value=j.filter(G=>q.includes(G.entityId)):(c.value=[],p.value.attrCondition.forEach(G=>{G.device=[],G.attrs=[]}))},I=W=>{const j=c.value.map(Z=>Z.entityId);W==="all"?p.value.attrCondition.forEach(async(Z,q)=>{if(j.length>0){const G=await i(j.join(","));m.value[q]=G}else m.value[q]=[]}):p.value.attrCondition.forEach(async(Z,q)=>{if(Z.device.length>0){const G=await i(Z.device.join(","));m.value[q]=G}else if(j.length>0){const G=await i(j.join(","));m.value[q]=G}else m.value[q]=[]})};me([()=>p.value.thingCondition,()=>a.dialogVisible],async([W,j])=>{j&&(await _(W),setTimeout(()=>{I(f.value?"split":"all")},500),l.value=[])},{immediate:!0,deep:!0});const E=()=>{p.value.attrCondition.push({device:[],attrs:[]})},k=W=>{p.value.attrCondition.splice(W,1)},A=Y({}),S=(W,j)=>{W.preventDefault(),A.value[j]=!A.value[j]},M=W=>{document.activeElement.id!=="inputSearch"&&(A.value[W]=!1)},$=(W,j)=>{g.value?W.attrs=o.value[j].filter(Z=>Z.label.toLowerCase().includes(g.value.toLowerCase())).map(Z=>Z.value):W.attrs=o.value[j].map(Z=>Z.value),A.value[j]=!1},L=(W,j)=>{W.attrs=[],g.value="",A.value[j]=!1},T=W=>{W&&W.length===0&&(g.value="")},R=(W,{attrs:j})=>j.vnodes,P=async W=>{v("splitType",W?"split":"all"),await _(p.value.thingCondition),await I(W?"split":"all")},F=Y(null),O=Y("#000"),N=Y("#ddd");me(ht,W=>{O.value=W?"#ffffff":"#666666",N.value=W?"#333":"#ddd"},{immediate:!0});const V=Y(!1),H=W=>{V.value=W.target.checked,v("noneChoosed",W.target.checked)};return t({thingAttrFormRef:F,getAttrList:i,separatedAttr:f,noneAttrs:V}),(W,j)=>{const Z=gr,q=pn,G=_o,K=Mn,ee=fn,te=Hn,ae=Eo,de=zn,he=gn;return Q(),be(he,{ref_key:"thingAttrFormRef",ref:F,model:B(p),name:"basic","label-col":{span:0},"wrapper-col":{span:24},class:"attr-form",autocomplete:"off"},{default:U(()=>[z("div",o1,[z("div",i1,[D(q,{inline:""},{default:U(()=>[j[1]||(j[1]=ve(" 设备分属性 ")),D(Z,{checked:B(f),"onUpdate:checked":j[0]||(j[0]=re=>qe(f)?f.value=re:null),onChange:P},null,8,["checked"])]),_:1}),D(q,{style:{"margin-left":"20px"}},{default:U(()=>[D(G,{checked:B(V),onChange:H},{default:U(()=>j[2]||(j[2]=[ve(" 无属性 ")])),_:1},8,["checked"])]),_:1})]),B(f)?(Q(),be(K,{key:0,onClick:E},{icon:U(()=>[D(B(fr),{style:{"vertical-align":"0.125em"}})]),default:U(()=>[j[3]||(j[3]=ve("新增 "))]),_:1})):Pe("",!0)]),(Q(!0),ie(Fe,null,ct(B(p).attrCondition,(re,ue)=>(Q(),ie("div",{key:re.condition,class:"relative"},[B(f)||!B(f)&&ue===0?(Q(),be(de,{key:0,type:"flex",justify:"space-between",gutter:20},{default:U(()=>[D(te,{span:B(f)?11:0},{default:U(()=>[B(f)?(Q(),be(q,{key:0,label:"",name:["attrCondition",ue,"device"],rules:[{required:!B(V),message:"请选择物!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[D(ee,{value:re.device,"onUpdate:value":ne=>re.device=ne,mode:"tags",style:{width:"100%"},placeholder:"请选择物","max-tag-count":1,options:B(c),"allow-clear":!0,onChange:ne=>d(ne,ue)},null,8,["value","onUpdate:value","options","onChange"])]),_:2},1032,["name","rules"])):Pe("",!0)]),_:2},1032,["span"]),D(te,{span:B(f)?11:22},{default:U(()=>[D(q,{label:"",name:["attrCondition",ue,"attrs"],rules:[{required:!B(V),message:"请选择物属性!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[z("div",{onClick:ne=>S(ne,ue)},[D(ee,{value:re.attrs,"onUpdate:value":ne=>re.attrs=ne,open:B(A)[ue],"show-search":!0,"auto-clear-search-value":!1,style:{width:"100%"},placeholder:"请选择物属性","allow-clear":!0,mode:"multiple","max-tag-count":1,idx:ue,options:B(o)[ue],"filter-option":y,onChange:T,onBlur:ne=>M(ue)},{dropdownRender:U(({menuNode:ne})=>[D(de,null,{default:U(()=>[D(te,{span:10},{default:U(()=>[D(ee,{id:"inputSearch",value:B(l)[ue],"onUpdate:value":pe=>B(l)[ue]=pe,mode:"multiple","max-tag-count":1,"allow-clear":!0,placeholder:"属性组筛选",options:B(s)[ue],class:"w-full",style:{padding:"0px 10px"},onChange:pe=>u(pe,ue),onBlur:pe=>M(ue)},null,8,["value","onUpdate:value","options","onChange","onBlur"])]),_:2},1024),D(te,{span:14,class:"px-5"},{default:U(()=>[D(R,{vnodes:ne},null,8,["vnodes"]),D(ae,{style:{margin:"4px 0"}}),z("div",a1,[D(K,{size:"small",onClick:pe=>$(re,ue)},{default:U(()=>j[4]||(j[4]=[ve(" 全选 ")])),_:2},1032,["onClick"]),D(K,{danger:"",style:{margin:"8px"},size:"small",onClick:pe=>L(re,ue)},{default:U(()=>j[5]||(j[5]=[ve(" 清空 ")])),_:2},1032,["onClick"])])]),_:2},1024)]),_:2},1024)]),_:2},1032,["value","onUpdate:value","open","idx","options","onBlur"])],8,r1)]),_:2},1032,["name","rules"])]),_:2},1032,["span"]),D(te,{span:B(f)?2:0},{default:U(()=>[ue!==0?(Q(),be(ao,{key:0,width:18,height:18,color:B(O),class:"inline-block absolute top-2 right-2 z-100 cursor-pointer",onClick:ne=>k(ue)},null,8,["color","onClick"])):Pe("",!0)]),_:2},1032,["span"])]),_:2},1024)):Pe("",!0),j[6]||(j[6]=z("div",{class:"my-2 border-b border-light-500 dark:border-dark"},null,-1))]))),128))]),_:1},8,["model"])}}});const l1=it(s1,[["__scopeId","data-v-697f3653"]]);var bc={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(un,function(){var n,a,v=1e3,p=6e4,f=36e5,m=864e5,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=31536e6,i=2628e6,o=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l={years:h,months:i,days:m,hours:f,minutes:p,seconds:v,milliseconds:1,weeks:6048e5},s=function(w){return w instanceof C},r=function(w,_,I){return new C(w,I,_.$l)},u=function(w){return a.p(w)+"s"},d=function(w){return w<0},g=function(w){return d(w)?Math.ceil(w):Math.floor(w)},y=function(w){return Math.abs(w)},x=function(w,_){return w?d(w)?{negative:!0,format:""+y(w)+_}:{negative:!1,format:""+w+_}:{negative:!1,format:""}},C=function(){function w(I,E,k){var A=this;if(this.$d={},this.$l=k,I===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return r(I*l[u(E)],this);if(typeof I=="number")return this.$ms=I,this.parseFromMilliseconds(),this;if(typeof I=="object")return Object.keys(I).forEach(function($){A.$d[u($)]=I[$]}),this.calMilliseconds(),this;if(typeof I=="string"){var S=I.match(o);if(S){var M=S.slice(2).map(function($){return $!=null?Number($):0});return this.$d.years=M[0],this.$d.months=M[1],this.$d.weeks=M[2],this.$d.days=M[3],this.$d.hours=M[4],this.$d.minutes=M[5],this.$d.seconds=M[6],this.calMilliseconds(),this}}return this}var _=w.prototype;return _.calMilliseconds=function(){var I=this;this.$ms=Object.keys(this.$d).reduce(function(E,k){return E+(I.$d[k]||0)*l[k]},0)},_.parseFromMilliseconds=function(){var I=this.$ms;this.$d.years=g(I/h),I%=h,this.$d.months=g(I/i),I%=i,this.$d.days=g(I/m),I%=m,this.$d.hours=g(I/f),I%=f,this.$d.minutes=g(I/p),I%=p,this.$d.seconds=g(I/v),I%=v,this.$d.milliseconds=I},_.toISOString=function(){var I=x(this.$d.years,"Y"),E=x(this.$d.months,"M"),k=+this.$d.days||0;this.$d.weeks&&(k+=7*this.$d.weeks);var A=x(k,"D"),S=x(this.$d.hours,"H"),M=x(this.$d.minutes,"M"),$=this.$d.seconds||0;this.$d.milliseconds&&($+=this.$d.milliseconds/1e3,$=Math.round(1e3*$)/1e3);var L=x($,"S"),T=I.negative||E.negative||A.negative||S.negative||M.negative||L.negative,R=S.format||M.format||L.format?"T":"",P=(T?"-":"")+"P"+I.format+E.format+A.format+R+S.format+M.format+L.format;return P==="P"||P==="-P"?"P0D":P},_.toJSON=function(){return this.toISOString()},_.format=function(I){var E=I||"YYYY-MM-DDTHH:mm:ss",k={Y:this.$d.years,YY:a.s(this.$d.years,2,"0"),YYYY:a.s(this.$d.years,4,"0"),M:this.$d.months,MM:a.s(this.$d.months,2,"0"),D:this.$d.days,DD:a.s(this.$d.days,2,"0"),H:this.$d.hours,HH:a.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:a.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:a.s(this.$d.seconds,2,"0"),SSS:a.s(this.$d.milliseconds,3,"0")};return E.replace(c,function(A,S){return S||String(k[A])})},_.as=function(I){return this.$ms/l[u(I)]},_.get=function(I){var E=this.$ms,k=u(I);return k==="milliseconds"?E%=1e3:E=k==="weeks"?g(E/l[k]):this.$d[k],E||0},_.add=function(I,E,k){var A;return A=E?I*l[u(E)]:s(I)?I.$ms:r(I,this).$ms,r(this.$ms+A*(k?-1:1),this)},_.subtract=function(I,E){return this.add(I,E,!0)},_.locale=function(I){var E=this.clone();return E.$l=I,E},_.clone=function(){return r(this.$ms,this)},_.humanize=function(I){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!I)},_.valueOf=function(){return this.asMilliseconds()},_.milliseconds=function(){return this.get("milliseconds")},_.asMilliseconds=function(){return this.as("milliseconds")},_.seconds=function(){return this.get("seconds")},_.asSeconds=function(){return this.as("seconds")},_.minutes=function(){return this.get("minutes")},_.asMinutes=function(){return this.as("minutes")},_.hours=function(){return this.get("hours")},_.asHours=function(){return this.as("hours")},_.days=function(){return this.get("days")},_.asDays=function(){return this.as("days")},_.weeks=function(){return this.get("weeks")},_.asWeeks=function(){return this.as("weeks")},_.months=function(){return this.get("months")},_.asMonths=function(){return this.as("months")},_.years=function(){return this.get("years")},_.asYears=function(){return this.as("years")},w}(),b=function(w,_,I){return w.add(_.years()*I,"y").add(_.months()*I,"M").add(_.days()*I,"d").add(_.hours()*I,"h").add(_.minutes()*I,"m").add(_.seconds()*I,"s").add(_.milliseconds()*I,"ms")};return function(w,_,I){n=I,a=I().$utils(),I.duration=function(A,S){var M=I.locale();return r(A,{$l:M},S)},I.isDuration=s;var E=_.prototype.add,k=_.prototype.subtract;_.prototype.add=function(A,S){return s(A)?b(this,A,1):E.bind(this)(A,S)},_.prototype.subtract=function(A,S){return s(A)?b(this,A,-1):k.bind(this)(A,S)}}})})(bc);var c1=bc.exports;const u1=qt(c1),d1={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},h1=d1,f1={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},Cc=f1,xc={lang:J({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},h1),timePickerLocale:J({},Cc)};xc.lang.ok="确定";const ds=xc,Rt="${label}不是一个有效的${type}",p1={locale:"zh-cn",Pagination:td,DatePicker:ds,TimePicker:Cc,Calendar:ds,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:Rt,method:Rt,array:Rt,object:Rt,number:Rt,date:Rt,boolean:Rt,integer:Rt,float:Rt,regexp:Rt,email:Rt,url:Rt,hex:Rt},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码已过期",refresh:"点击刷新",scanned:"已扫描"}},g1=p1;var m1={exports:{}};(function(e,t){(function(n,a){e.exports=a(Qu)})(un,function(n){function a(f){return f&&typeof f=="object"&&"default"in f?f:{default:f}}var v=a(n),p={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(f,m){return m==="W"?f+"周":f+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(f,m){var c=100*f+m;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return v.default.locale(p,null,!0),p})})(m1);const v1={key:1,class:"flex",style:{"margin-bottom":"15px"}},y1={key:1,class:"flex",style:{"margin-bottom":"15px"}},w1={key:1,class:"flex",style:{"margin-bottom":"15px"}},b1={class:"w-full h-full flex justify-center items-center"},C1=ce({__name:"timeSpan",props:{modelValue:null,dialogVisible:null},emits:["update:modelValue","noneChoosed"],setup(e,{expose:t,emit:n}){no(E=>({"4124463f":B(I)}));const a=e,v=n,p=ri(a,"modelValue",v),f=Y([]),m=Y(!1),c=Y([]),h=Y([]),i=Y(!1),o=Y(""),l=Y(""),s=Y(""),r=Y(""),u=Y(""),d=Y(""),g=Y(null);mt.extend(u1);const y=[{label:"30分钟",value:"00-00-30"},{label:"1小时",value:"00-01-00"},{label:"6小时",value:"00-06-00"},{label:"12小时",value:"00-12-00"},{label:"18小时",value:"00-18-00"},{label:"24小时",value:"00-24-00"}],x=[{label:"1天",value:"01-00-00"},{label:"1周",value:"07-00-00"},{label:"2周",value:"14-00-00"},{label:"3周",value:"21-00-00"},{label:"30天",value:"30-00-00"}],C=le(()=>p.value.timeCondition.spanMode===1||p.value.timeCondition.spanMode===5);me(m,E=>{E?(o.value="",l.value="",s.value=""):p.value.timeCondition.timeSpan=null}),me(i,E=>{E?(r.value="",u.value="",d.value=""):p.value.timeCondition.accumulateInterval=null}),me([o,l,s],([E,k,A])=>{E!=null&&k!=null&&A!=null&&(p.value.timeCondition.timeSpan=`${E}-${k}-${A}`)}),me([r,u,d],([E,k,A])=>{E!=null&&k!=null&&A!=null&&(p.value.timeCondition.accumulateInterval=JSON.stringify({day:E,hour:k,minute:A}))}),me(()=>p.value.timeCondition.spanMode,(E,k)=>{if(E===1)f.value=y,p.value.timeCondition.timeSpan=null,p.value.timeCondition.accumulateInterval=null,p.value.timeCondition.accumulateFunc=null,p.value.timeCondition.maxDataVolumn=null,m.value=!1,i.value=!1,g.value.clearValidate(["timeSpan","accumulateFunc","accumulateInterval","maxDataVolumn"]),v("noneChoosed",!1);else if(E===2){f.value=x;const A=p.value.timeCondition.timeSpan,S=p.value.timeCondition.accumulateInterval,M=x.find(L=>L.value===A),$=h.value.find(L=>{const T=JSON.parse(L.value);return S?T.day===S.day&&T.hour===S.hour&&T.minute===S.minute:!1});!M&&A&&(m.value=!0,bt(()=>{if(typeof A=="string"){const L=A.split("-");o.value=L[0],l.value=L[1],s.value=L[2]}})),!$&&S?i.value=!0:$&&setTimeout(()=>{p.value.timeCondition.accumulateInterval=$.value},500),S&&bt(()=>{r.value=S.day,u.value=S.hour,d.value=S.minute}),v("noneChoosed",!1)}else E===3||E===4?(bt(()=>{const A=p.value.timeCondition.timeSpan;E===4?A&&typeof A=="object"?["day","week","month","year"].includes(A.to)?p.value.timeCondition.timeSpan={from:A.from,to:A==null?void 0:A.to}:p.value.timeCondition.timeSpan={from:"",to:"day"}:p.value.timeCondition.timeSpan={from:"",to:"day"}:A&&typeof A=="object"?["day","week","month","year"].includes(A.to)?p.value.timeCondition.timeSpan={from:window.dayjs().subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),to:window.dayjs().format("YYYY-MM-DD HH:mm:ss")}:p.value.timeCondition.timeSpan={from:A.from,to:A.to}:p.value.timeCondition.timeSpan={from:window.dayjs().subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),to:window.dayjs().format("YYYY-MM-DD HH:mm:ss")}}),v("noneChoosed",!1)):v("noneChoosed",!0)});const b=async()=>{const E=await vt.getGroupFuncList();if(E.code!==0)return ye.warning(E.msg);if(!E.data)return;const k=E.data||[];c.value=k.map(A=>{let S="",M="";return Object.keys(A).forEach($=>{S=A[$],M=$}),{label:S,value:M}})},w=async(E,k)=>!C.value&&k==null?Promise.reject(new Error("不能没有选择")):Promise.resolve(),_=async()=>{const E=await wc.getIntervalTimesList();if(E.code!==0)return ye.warning(E.msg);if(!E.data)return;const k=E.data.find(A=>A.dictType==="api_time_type");k&&(h.value=k.dataList.map(A=>({label:A.dictLabel,value:A.dictValue})))};me(()=>p.value.timeCondition,async E=>{if(await _(),E.accumulateInterval){const k=typeof E.accumulateInterval=="string"?JSON.parse(E.accumulateInterval):E.accumulateInterval,A=h.value.find(S=>{const M=JSON.parse(S.value);return k?M.day===k.day&&M.hour===k.hour&&M.minute===k.minute:!1});!A&&k&&E.spanMode!==1?i.value=!0:A&&(E.spanMode!==1?p.value.timeCondition.accumulateInterval=A.value:p.value.timeCondition.accumulateInterval=null),k&&bt(()=>{r.value=`${k.day}`,u.value=`${k.hour}`,d.value=`${k.minute}`})}},{immediate:!0,deep:!0}),ot(()=>{b(),mt.locale(g1.locale)});const I=Y("#ddd");return me(ht,E=>{I.value=E?"#333":"#ddd"},{immediate:!0}),t({timeFormRef:g,timeSpanDay:o,timeSpanHour:l,timeSpanMinute:s,accumulateIntervalDay:r,accumulateIntervalHour:u,accumulateIntervalMinute:d}),(E,k)=>{const A=xo,S=oo,M=pn,$=fn,L=hn,T=Df,R=pr,P=Hn,F=gr,O=zn,N=ro,V=gn;return Q(),be(V,{ref_key:"timeFormRef",ref:g,model:B(p).timeCondition,name:"basic","label-col":{span:0},"wrapper-col":{span:24},class:"timeSpan-form",autocomplete:"off"},{default:U(()=>[D(M,{label:"",name:"spanMode",class:"flex justify-start mb-2"},{default:U(()=>[D(S,{value:B(p).timeCondition.spanMode,"onUpdate:value":k[0]||(k[0]=H=>B(p).timeCondition.spanMode=H)},{default:U(()=>[D(A,{value:1},{default:U(()=>k[17]||(k[17]=[ve(" 最新 ")])),_:1}),D(A,{value:2},{default:U(()=>k[18]||(k[18]=[ve(" 最近 ")])),_:1}),D(A,{value:3},{default:U(()=>k[19]||(k[19]=[ve(" 时间段 ")])),_:1}),D(A,{value:4},{default:U(()=>k[20]||(k[20]=[ve(" 区间 ")])),_:1}),D(A,{value:5},{default:U(()=>k[21]||(k[21]=[ve(" 无 ")])),_:1})]),_:1},8,["value"])]),_:1}),D(O,{type:"flex",justify:"space-between",gutter:20},{default:U(()=>[D(P,{span:21},{default:U(()=>[B(p).timeCondition.spanMode===1||B(p).timeCondition.spanMode===2?(Q(),ie(Fe,{key:0},[B(m)?Pe("",!0):(Q(),be(M,{key:0,label:"",name:"timeSpan",rules:[{required:!B(C),message:"请选择时间!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[D($,{value:B(p).timeCondition.timeSpan,"onUpdate:value":k[1]||(k[1]=H=>B(p).timeCondition.timeSpan=H),style:{width:"100%"},placeholder:"请选择时间","allow-clear":!0,disabled:B(C),options:B(f)},null,8,["value","disabled","options"])]),_:1},8,["rules"])),B(m)?(Q(),ie("div",v1,[D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[D(L,{value:B(o),"onUpdate:value":k[2]||(k[2]=H=>qe(o)?o.value=H:null),placeholder:"请输入天, 没有请填 0"},null,8,["value"])]),_:1}),k[22]||(k[22]=z("span",{class:"timeName"},"天",-1)),D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[D(L,{value:B(l),"onUpdate:value":k[3]||(k[3]=H=>qe(l)?l.value=H:null),placeholder:"请输入小时,没有请填 0"},null,8,["value"])]),_:1}),k[23]||(k[23]=z("span",{class:"timeName"},"小时",-1)),D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[D(L,{value:B(s),"onUpdate:value":k[4]||(k[4]=H=>qe(s)?s.value=H:null),placeholder:"请输入分钟, 没有请填 0"},null,8,["value"])]),_:1}),k[24]||(k[24]=z("span",{class:"timeName"},"分钟",-1))])):Pe("",!0)],64)):B(p).timeCondition.spanMode===3&&B(p).timeCondition.timeSpan?(Q(),ie("div",y1,[k[25]||(k[25]=z("span",{class:"timeName"},"从",-1)),D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[D(T,{value:B(p).timeCondition.timeSpan.from,"onUpdate:value":k[5]||(k[5]=H=>B(p).timeCondition.timeSpan.from=H),format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","show-time":"","allow-clear":!0,placeholder:"请选择开始时间"},null,8,["value"])]),_:1}),k[26]||(k[26]=z("span",{class:"timeName"},"到",-1)),D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[D(T,{value:B(p).timeCondition.timeSpan.to,"onUpdate:value":k[6]||(k[6]=H=>B(p).timeCondition.timeSpan.to=H),format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","show-time":"","allow-clear":!0,placeholder:"请选择结束时间"},null,8,["value"])]),_:1})])):B(p).timeCondition.spanMode===4&&B(p).timeCondition.timeSpan?(Q(),be(L,{key:2,value:B(p).timeCondition.timeSpan.from,"onUpdate:value":k[8]||(k[8]=H=>B(p).timeCondition.timeSpan.from=H)},{addonAfter:U(()=>[D($,{value:B(p).timeCondition.timeSpan.to,"onUpdate:value":k[7]||(k[7]=H=>B(p).timeCondition.timeSpan.to=H),style:{width:"80px"}},{default:U(()=>[D(R,{value:"day"},{default:U(()=>k[27]||(k[27]=[ve(" 天 ")])),_:1}),D(R,{value:"week"},{default:U(()=>k[28]||(k[28]=[ve(" 周 ")])),_:1}),D(R,{value:"month"},{default:U(()=>k[29]||(k[29]=[ve(" 月 ")])),_:1}),D(R,{value:"year"},{default:U(()=>k[30]||(k[30]=[ve(" 年 ")])),_:1})]),_:1},8,["value"])]),_:1},8,["value"])):Pe("",!0)]),_:1}),D(P,{span:3},{default:U(()=>[B(p).timeCondition.spanMode!==3&&B(p).timeCondition.spanMode!==4?(Q(),be(M,{key:0},{default:U(()=>[k[31]||(k[31]=ve(" 高级 ")),D(F,{checked:B(m),"onUpdate:checked":k[9]||(k[9]=H=>qe(m)?m.value=H:null),disabled:B(C)},null,8,["checked","disabled"])]),_:1})):Pe("",!0)]),_:1})]),_:1}),D(O,{type:"flex",justify:"space-between",gutter:20},{default:U(()=>[D(P,{span:21},{default:U(()=>[k[32]||(k[32]=z("div",null,"聚合函数",-1)),D(M,{label:"",name:"accumulateFunc",rules:[{required:!B(C),validator:w,message:"请选择聚合函数!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[D($,{value:B(p).timeCondition.accumulateFunc,"onUpdate:value":k[10]||(k[10]=H=>B(p).timeCondition.accumulateFunc=H),style:{width:"100%"},placeholder:"请选择聚合函数","allow-clear":!0,disabled:B(C),options:B(c)},null,8,["value","disabled","options"])]),_:1},8,["rules"])]),_:1}),D(P,{span:3})]),_:1}),D(O,{type:"flex",justify:"space-between",gutter:20},{default:U(()=>[D(P,{span:21},{default:U(()=>[k[36]||(k[36]=z("div",null,"聚合间隔",-1)),B(i)?Pe("",!0):(Q(),be(M,{key:0,label:"",name:"accumulateInterval",rules:[{required:!1,message:"请选择聚合间隔!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[D($,{value:B(p).timeCondition.accumulateInterval,"onUpdate:value":k[11]||(k[11]=H=>B(p).timeCondition.accumulateInterval=H),style:{width:"100%"},placeholder:"请选择聚合间隔","allow-clear":!0,disabled:B(C)||!B(p).timeCondition.accumulateFunc,options:B(h)},null,8,["value","disabled","options"])]),_:1})),B(i)?(Q(),ie("div",w1,[D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[D(L,{value:B(r),"onUpdate:value":k[12]||(k[12]=H=>qe(r)?r.value=H:null),placeholder:"请输入天,没有请填 0","allow-clear":!0},null,8,["value"])]),_:1}),k[33]||(k[33]=z("span",{class:"timeName"},"天",-1)),D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[D(L,{value:B(u),"onUpdate:value":k[13]||(k[13]=H=>qe(u)?u.value=H:null),placeholder:"请输入小时,没有请填 0","allow-clear":!0},null,8,["value"])]),_:1}),k[34]||(k[34]=z("span",{class:"timeName"},"小时",-1)),D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[D(L,{value:B(d),"onUpdate:value":k[14]||(k[14]=H=>qe(d)?d.value=H:null),placeholder:"请输入分钟,没有请填 0","allow-clear":!0},null,8,["value"])]),_:1}),k[35]||(k[35]=z("span",{class:"timeName"},"分钟",-1))])):Pe("",!0)]),_:1}),D(P,{span:3},{default:U(()=>[z("div",b1,[D(M,{style:{"margin-bottom":"0"}},{default:U(()=>[k[37]||(k[37]=ve(" 高级 ")),D(F,{checked:B(i),"onUpdate:checked":k[15]||(k[15]=H=>qe(i)?i.value=H:null),disabled:B(C)},null,8,["checked","disabled"])]),_:1})])]),_:1})]),_:1}),D(O,{type:"flex",justify:"space-between",gutter:20},{default:U(()=>[D(P,{span:21},{default:U(()=>[k[38]||(k[38]=z("div",null,"最大数据量",-1)),D(M,{label:"",name:"maxDataVolumn",rules:[{required:!1,message:"请输入最大数据量!"}],style:{"margin-bottom":"15px"}},{default:U(()=>[D(N,{value:B(p).timeCondition.maxDataVolumn,"onUpdate:value":k[16]||(k[16]=H=>B(p).timeCondition.maxDataVolumn=H),style:{width:"100%"},"allow-clear":!0,disabled:B(C),placeholder:"请输入最大数据量"},null,8,["value","disabled"])]),_:1})]),_:1}),D(P,{span:3})]),_:1})]),_:1},8,["model"])}}});const x1=it(C1,[["__scopeId","data-v-7aca7d4a"]]),$1=ce({components:{ThingConditions:n1,ThingAttrs:l1,TimeSpan:x1},props:{showModal:Boolean,modalTitle:String},emits:["showHideModal","addDataSource","editDataSource"],setup(e,{emit:t}){const n=le({get(){return e.showModal},set(b){t("showHideModal",b)}}),a=Y({name:"",thingCondition:[{condition:"list",value:[]}],attrCondition:[{device:[],attrs:[]}],timeCondition:{spanMode:1,timeSpan:null,accumulateFunc:null,accumulateInterval:null,maxDataVolumn:null},sort:"desc"}),v=Y(null),p=Y(null),f=Y(null),m=b=>{const{ids:w,index:_}=b,I=a.value.attrCondition;I[_]?(I[_].device=w,w.length===0&&(I[_].attrs=[])):I[_]={device:w,attrs:[]};const E=I.reduce((k,A)=>(k.push(...A.device),k),[]);p.value.getAttrList(E.join(","))},c=async b=>{var _;const w=await vt.getAttrList({entityIds:b});return w.code!==0?ye.warning(w.msg):((_=w.data)==null?void 0:_.map(I=>I.code))||[]},h=Y(!0),i=b=>{h.value=!b,b&&(a.value.timeCondition={spanMode:5,timeSpan:null,accumulateFunc:null,accumulateInterval:null,maxDataVolumn:null})},o=Y(!0),l=b=>{o.value=!b,b&&(a.value.attrCondition=[{device:[],attrs:[]}])},s=()=>{const b=[],w=[],_=[],I=[],E=[],k={name:[],code:[]};return a.value.thingCondition.forEach(async A=>{if(A.condition==="list")w.push(...A.value);else if(A.condition==="type")_.push(...A.value);else if(A.condition==="tag")I.push(...A.value);else if(A.condition==="relation")E.push(A.value);else if(A.condition==="search"){if(A.search)k.name.push(...A.search.name),k.code.push(...A.search.code);else if(A.value){const S=await c(A.value.join(","));A.search={name:[],code:S}}}else A.condition==="group"&&b.push(...A.value)}),{entitys:{group:b,list:w,type:_,tag:I,search:k,relation:E}}},r=Y("all"),u=()=>{let b=null;return o.value?r.value==="all"?b={type:"all",keyType:"SQ",keys:a.value.attrCondition.reduce((w,_)=>(w.push(..._.attrs),w),[])}:b={type:"split",keys:a.value.attrCondition.map(_=>({entitys:_.device,keys:_.attrs,keyType:"SQ"}))}:b={type:"none",keyType:"SQ",keys:a.value.attrCondition.reduce((w,_)=>(w.push(..._.attrs),w),[])},{attrs:b}},d=()=>{var I,E,k,A;const b=a.value.timeCondition,_={nearest:{day:"",hour:"",minute:""},agg:{day:"",hour:"",minute:""},startTime:"",endTime:"",type:{1:"last",2:"nearest",3:"range",4:"interval",5:"none"}[b.spanMode]};if(b.spanMode===2){if(b.timeSpan){const S=b.timeSpan.split("-");_.nearest={day:S[0],hour:S[1],minute:S[2]}}}else b.spanMode===3?(_.startTime=(I=b.timeSpan)==null?void 0:I.from,_.endTime=(E=b.timeSpan)==null?void 0:E.to):b.spanMode===4&&(_.interval={duration:(k=b.timeSpan)==null?void 0:k.from,type:(A=b.timeSpan)==null?void 0:A.to});if(b.accumulateInterval&&b.accumulateInterval){const S=typeof b.accumulateInterval=="string"?JSON.parse(b.accumulateInterval):b.accumulateInterval;_.agg={day:S.day,hour:S.hour,minute:S.minute}}return{..._,func:b.accumulateFunc,max:b.maxDataVolumn}},g=async b=>{const w=await vt.createDataSource(b);if(w.code!==0){ye.warning(w.msg);return}return w.data},y=async b=>{const w=await vt.editDataSource(b);if(w.code!==0){ye.warning(w.msg);return}return ye.success("修改成功!"),w.data},x=Y(null),C=()=>{const b=[v.value.$refs.thingConditionFormRef.validate(),p.value.$refs.thingAttrFormRef.validate(),f.value.$refs.timeFormRef.validate()],w=v.value.relationRefs.map(_=>_.validate());b.push(...w),x.value.validate().then(()=>{Promise.all(b).then(async()=>{const _=s(),I=u(),E=d(),k=E.nearest;if(E.type==="nearest"&&(!k.day||!k.hour||!k.minute))return ye.warning("请选择时间!");if(E.type==="range"&&(!E.startTime||!E.endTime))return ye.warning("请选择开始结束时间!");const A={type:"0",routeUrl:"url",routeId:"1",name:a.value.name,sort:a.value.sort,thingCondition:JSON.stringify(_),attrCondition:JSON.stringify(I),timeCondition:JSON.stringify(E),remark:"0"};if(A.reqParams=JSON.stringify({..._,...I,times:E}),e.modalTitle==="新增"){const S=await g(A);S&&(n.value=!1,t("addDataSource",S))}else{const S=await y({id:a.value.id,...A});S&&(n.value=!1,t("editDataSource",S))}}).catch(()=>{})}).catch(()=>{})};return me(n,b=>{b&&setTimeout(()=>{var w;v.value.thingConditionFormRef.clearValidate(),v.value.thingConditionFormRef.resetFields(),v.value.relationRefs=[],p.value.thingAttrFormRef.clearValidate(),p.value.thingAttrFormRef.resetFields(),f.value.timeFormRef.clearValidate(),f.value.timeFormRef.resetFields(),f.value.timeSpanDay="",f.value.timeSpanHour="",f.value.timeSpanMinute="",f.value.accumulateIntervalDay="",f.value.accumulateIntervalHour="",f.value.accumulateIntervalMinute="",f.value.timeSpanFrom="",f.value.timeSpanTo="",(w=v.value.relationRefs)==null||w.forEach(_=>{_.clearValidate(),_.resetFields()})},50)}),{visible:n,dataSourceForm:x,conditionRef:v,attrRef:p,timeRef:f,handleOk:C,formState:a,thingSelectedHandler:m,splitTypes:r,timeRequired:h,timeNoneChoose:i,attrRequired:o,attrNoneChoose:l}}});function S1(e,t,n,a,v,p){const f=hn,m=pn,c=et("ThingConditions"),h=et("ThingAttrs"),i=et("TimeSpan"),o=xo,l=oo,s=gn,r=Bt;return Q(),ie("div",null,[D(r,{open:e.visible,"onUpdate:open":t[6]||(t[6]=u=>e.visible=u),title:e.modalTitle,width:"1100px","cancel-text":"取消","ok-text":"确认",class:"datasource-modal custom-modal-scrollbar","wrap-class-name":"datasource-dialog",centered:!0,onOk:e.handleOk},{default:U(()=>[D(s,{ref:"dataSourceForm",model:e.formState,name:"basic","label-col":{span:3},"wrapper-col":{span:21},class:"dataSourceForm",autocomplete:"off"},{default:U(()=>[D(m,{label:"数据名称",name:"name",rules:[{required:!0,message:"请输入数据名称!"}]},{default:U(()=>[D(f,{value:e.formState.name,"onUpdate:value":t[0]||(t[0]=u=>e.formState.name=u)},null,8,["value"])]),_:1}),D(m,{label:"物条件",name:"thingCondition",rules:[{required:!0,message:"请选择物条件!"}]},{default:U(()=>[D(c,{ref:"conditionRef",modelValue:e.formState,"onUpdate:modelValue":t[1]||(t[1]=u=>e.formState=u),"form-visible":e.visible,onThingSelected:e.thingSelectedHandler},null,8,["modelValue","form-visible","onThingSelected"])]),_:1}),D(m,{label:"物属性",name:"attrCondition",rules:[{required:e.attrRequired,message:"请选择时间!"}]},{default:U(()=>[D(h,{ref:"attrRef",modelValue:e.formState,"onUpdate:modelValue":t[2]||(t[2]=u=>e.formState=u),"dialog-visible":e.visible,onSplitType:t[3]||(t[3]=u=>e.splitTypes=u),onNoneChoosed:e.attrNoneChoose},null,8,["modelValue","dialog-visible","onNoneChoosed"])]),_:1},8,["rules"]),D(m,{label:"时间",name:"timeCondition",rules:[{required:e.timeRequired,message:"请选择时间!"}]},{default:U(()=>[D(i,{ref:"timeRef",modelValue:e.formState,"onUpdate:modelValue":t[4]||(t[4]=u=>e.formState=u),"dialog-visible":e.visible,onNoneChoosed:e.timeNoneChoose},null,8,["modelValue","dialog-visible","onNoneChoosed"])]),_:1},8,["rules"]),D(m,{label:"排序",name:"sort"},{default:U(()=>[D(l,{value:e.formState.sort,"onUpdate:value":t[5]||(t[5]=u=>e.formState.sort=u)},{default:U(()=>[D(o,{value:"asc",style:{"margin-right":"30px"}},{default:U(()=>t[7]||(t[7]=[ve(" 正序 ")])),_:1}),D(o,{value:"desc"},{default:U(()=>t[8]||(t[8]=[ve(" 倒序 ")])),_:1})]),_:1},8,["value"])]),_:1})]),_:1},8,["model"])]),_:1},8,["open","title","onOk"])])}const k1=it($1,[["render",S1],["__scopeId","data-v-29729e00"]]),_1=["width","height"],M1={"clip-path":"url(#master_svg0_106_12904)"},A1=["fill"],L1=["fill"],E1=ce({__name:"copyIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[1]||(f[1]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12904"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",M1,[z("g",null,[z("path",{d:"M16.875,4.5L4.125,4.5C3.0899799999999997,4.50123918,2.25123936,5.33998,2.25,6.375L2.25,20.625C2.25,21.6593,3.0915,22.5,4.125,22.5L16.875,22.5C17.9093,22.5,18.75,21.6593,18.75,20.625L18.75,6.375C18.75,5.3415,17.9093,4.5,16.875,4.5ZM17.25,20.625C17.25,20.8313,17.0813,21,16.875,21L4.125,21C3.91789,21,3.75,20.8321,3.75,20.625L3.75,6.375C3.75,6.16789,3.91789,6,4.125,6L16.875,6C17.0821,6,17.25,6.16789,17.25,6.375L17.25,20.625Z",fill:B(n),"fill-opacity":"1"},null,8,A1)]),z("g",null,[z("path",{d:"M19.875,1.5L7.125,1.5C6.710786,1.5,6.375,1.835786,6.375,2.25C6.375,2.6642099999999997,6.710786,3,7.125,3L19.875,3C20.0821,3,20.25,3.16789,20.25,3.375L20.25,17.625C20.25,18.0392,20.5858,18.375,21,18.375C21.4142,18.375,21.75,18.0392,21.75,17.625L21.75,3.375C21.75,2.3415,20.9093,1.5,19.875,1.5Z",fill:B(n),"fill-opacity":"1"},null,8,L1)]),f[0]||(f[0]=z("g",null,[z("path",{d:"M14.25,8.4375L6.75,8.4375C6.335786,8.4375,6,8.773286,6,9.1875C6,9.60171,6.335786,9.9375,6.75,9.9375L14.25,9.9375C14.66421,9.9375,15,9.60171,15,9.1875C15,8.773286,14.66421,8.4375,14.25,8.4375ZM14.25,12.1875L6.75,12.1875C6.335786,12.1875,6,12.52329,6,12.9375C6,13.35171,6.335786,13.6875,6.75,13.6875L14.25,13.6875C14.66421,13.6875,15,13.35171,15,12.9375C15,12.52329,14.66421,12.1875,14.25,12.1875ZM11.25,15.905999999999999L6.75,15.905999999999999C6.335786,15.905999999999999,6,16.24179,6,16.656C6,17.07021,6.335786,17.406,6.75,17.406L11.25,17.406C11.66421,17.406,12,17.07021,12,16.656C12,16.24179,11.66421,15.905999999999999,11.25,15.905999999999999Z",fill:"#888888","fill-opacity":"1"})],-1))])],8,_1))}}),I1=["width","height"],T1=["fill"],D1=ce({__name:"penEditIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 13.333333015441895 13.333333015441895"},[z("g",null,[z("path",{d:"M12.9697,4.24243C13.4545,3.75757,13.4545,3.0303,12.9697,2.54545C12.9697,2.54545,10.7879,0.363636,10.7879,0.363636C10.303,-0.121212,9.57573,-0.121212,9.09093,0.363636C9.09093,0.363636,0,9.45453,0,9.45453C0,9.45453,0,13.3333,0,13.3333C0,13.3333,3.87879,13.3333,3.87879,13.3333C3.87879,13.3333,12.9697,4.24243,12.9697,4.24243C12.9697,4.24243,12.9697,4.24243,12.9697,4.24243ZM9.9394,1.21212C9.9394,1.21212,12.1212,3.39394,12.1212,3.39394C12.1212,3.39394,10.303,5.21212,10.303,5.21212C10.303,5.21212,8.1212,3.0303,8.1212,3.0303C8.1212,3.0303,9.9394,1.21212,9.9394,1.21212C9.9394,1.21212,9.9394,1.21212,9.9394,1.21212ZM1.21212,12.1212C1.21212,12.1212,1.21212,9.9394,1.21212,9.9394C1.21212,9.9394,7.27273,3.87879,7.27273,3.87879C7.27273,3.87879,9.45453,6.06061,9.45453,6.06061C9.45453,6.06061,3.39394,12.1212,3.39394,12.1212C3.39394,12.1212,1.21212,12.1212,1.21212,12.1212C1.21212,12.1212,1.21212,12.1212,1.21212,12.1212Z",fill:B(n),"fill-opacity":"1"},null,8,T1)])],8,I1))}}),R1={class:"w-full"},P1={class:"px-3"},N1={class:"flex justify-between mb-2"},O1={class:"flex flex-1 justify-start"},B1={class:"flex flex-1 justify-end"},F1=["data-clipboard-text"],H1=ce({__name:"dataSource",emits:["dataSourceAction"],setup(e,{emit:t}){const n=t,a=Y(""),v=Y("#000");me(ht,k=>{v.value=k?"#ffffff":"#666666"},{immediate:!0});const p=Y([]);let f=[];const m=Lt("thingApiDTOList"),c=Lt("apiSetIdsList"),h=Y([]),i=async()=>{const k=await vt.getThingList({name:"",code:""});if(k.code!==0)return ye.warning(k.msg);h.value=k.data||[]},o=Y([]),l=async()=>{const k=await vt.getAttrsList();if(k.code!==0)return ye.warning(k.msg);o.value=k.data||[]},s=le(()=>k=>{const A=h.value.find(S=>S.entityId===k);return A&&A.entityName}),r=le(()=>k=>{const A=o.value.find(S=>S.id===k);return A&&`${A.name} - ${A.code}`}),u=(k,A)=>{if(!k.attrCondition)return;const S=JSON.parse(k.attrCondition),M=[];let $=[];S.attrs.type==="all"?$=S.attrs.keys:S.attrs.keys.forEach(T=>{M.push(...T.entitys),$.push(...T.keys)}),A!==void 0?p.value[A]={...k,dataName:k.name,things:M,attrs:$}:p.value.push({...k,dataName:k.name,things:M,attrs:$}),f=nt(p.value)};me(a,k=>{k?p.value=f.filter(A=>A.dataName.includes(k)):p.value=f});const d=k=>{u(k,void 0),m.value.push(k),c.value.push(k.id),n("dataSourceAction",k.id)},g=k=>{const A=p.value.findIndex(S=>S.id===k.id);A>-1&&(u(k,A),m.value[A]=k,n("dataSourceAction"))},y=async k=>{Bt.confirm({title:"确认",icon:D(On),content:"确认要删除此数据源吗?",okText:"确认",cancelText:"取消",onOk:async()=>{const A=await vt.deleteDataSource([k.id]);if(A.code!==0)return ye.warning(A.msg);const S=p.value.findIndex(M=>M.id===k.id);S>-1&&(m.value.splice(S,1),p.value.splice(S,1),c.value.splice(S,1),f=nt(p.value)),ye.success("删除成功!")}})};me(m,async k=>{k&&k.length>0&&(await i(),await l(),k.forEach(A=>{u(A,void 0)}))},{immediate:!0});const x=Y(!1),C=Y("新增"),b=Y(null),w=()=>{x.value=!0,C.value="新增",bt(()=>{b.value.dataSourceForm.clearValidate(),b.value.dataSourceForm.resetFields(),b.value.formState={name:"",thingCondition:[{condition:"list",value:[]}],attrCondition:[{device:[],attrs:[]}],timeCondition:{spanMode:1,timeSpan:null,accumulateFunc:null,accumulateInterval:null,maxDataVolumn:null},sort:"desc"}})},_=async(k,A)=>{var M,$;const S=await vt.getThingList({name:"",code:""});return S.code!==0?ye.warning(S.msg):k.length>0?(M=S.data)==null?void 0:M.map(L=>k.includes(L.entityName)?L.entityId:null):A.length>0?($=S.data)==null?void 0:$.map(L=>A.includes(L.entityCode)?L.entityId:null):[]},I=k=>{const A=JSON.parse(k.thingCondition||"{}"),S=JSON.parse(k.attrCondition||"{}"),M=JSON.parse(k.timeCondition||"{}"),$=[],L=[],T=A.entitys;T&&Object.keys(T).forEach(async(j,Z)=>{if(j==="relation")T[j].forEach(q=>{q&&$.push({condition:"relation",value:q})});else if(j==="search"){const G=(await _(T[j].name,T[j].code)).filter(Boolean);G&&G.length>0&&$.push({condition:"search",value:G})}else T[j]&&T[j].length>0&&$.push({condition:j,value:T[j]})});const R=S.attrs;let P=!1;const F=R.type;R.type==="all"?(P=!1,L.push({device:[],attrs:R.keys})):R.type==="split"?(P=!0,R.keys.forEach(j=>{L.push({device:j.entitys,attrs:j.keys})})):R.type==="none"&&(P=!1);const O=M.nearest,N=M.agg,V={last:1,nearest:2,range:3,interval:4,none:5};let H="";M.type==="nearest"?H=`${O.day}-${O.hour}-${O.minute}`:M.type==="range"?H={from:M.startTime,to:M.endTime}:M.type==="interval"&&(H={from:M==null?void 0:M.interval.duration,to:M==null?void 0:M.interval.type});const W={spanMode:V[M.type],timeSpan:H,accumulateFunc:M.func,accumulateInterval:N,maxDataVolumn:M.max};x.value=!0,C.value="编辑",setTimeout(()=>{b.value.attrRef.separatedAttr=P,b.value.formState={...k,thingCondition:$,attrCondition:L,timeCondition:W},b.value.splitTypes=P?"split":"all",b.value.attrRef.noneAttrs=F==="none",b.value.attrRequired=F!=="none",b.value.timeRequired=M.type!=="none"},500)};return ot(()=>{const k=new ol(".copy-id");k.on("success",A=>{ye.success("复制api id 成功!"),A.clearSelection()}),k.on("error",()=>{ye.warning("没有可复制的api id")})}),(k,A)=>{const S=hn,M=Hn,$=Mn,L=zn,T=en,R=Vl;return Q(),ie("div",R1,[D(L,{type:"flex",justify:"space-between",class:"mt-2 mb-3 px-3"},{default:U(()=>[D(M,{span:14},{default:U(()=>[D(S,{value:B(a),"onUpdate:value":A[0]||(A[0]=P=>qe(a)?a.value=P:null),placeholder:"搜索数据名称",bordered:!1,style:{"border-bottom":"1px solid #ccc"}},{prefix:U(()=>[D(sl,{width:16,height:16,color:B(v)},null,8,["color"])]),_:1},8,["value"])]),_:1}),D(M,{span:10},{default:U(()=>[D($,{onClick:w},{icon:U(()=>[D(B(fr),{style:{"vertical-align":"0.125em"}})]),default:U(()=>[A[2]||(A[2]=ve("新增 "))]),_:1})]),_:1})]),_:1}),z("div",P1,[(Q(!0),ie(Fe,null,ct(B(p),(P,F)=>(Q(),ie("div",{key:F,class:"px-3 pt-3 pb-1 bg-[#ffffff] dark:bg-dark-3 mb-3",style:{"border-radius":"6px"}},[z("div",N1,[z("div",O1,xt(P.dataName),1),z("div",B1,[D(T,null,{title:U(()=>A[3]||(A[3]=[ve(" 复制id ")])),default:U(()=>[z("a",{"data-clipboard-text":P.id,class:"copy-id"},[D(E1,{width:18,height:18,color:B(v),class:"mr-3 cursor-pointer"},null,8,["color"])],8,F1)]),_:2},1024),D(D1,{width:18,height:18,color:B(v),class:"mr-3 cursor-pointer",onClick:O=>I(P)},null,8,["color","onClick"]),D(ao,{width:18,height:18,color:B(v),class:"cursor-pointer",onClick:O=>y(P)},null,8,["color","onClick"])])]),z("ul",null,[(Q(!0),ie(Fe,null,ct(P.things,O=>(Q(),ie("li",{key:O.value,class:"flex justify-start mb-2"},[D(R,{color:"blue",class:"my-tag"},{default:U(()=>[ve(xt(B(s)(O)),1)]),_:2},1024)]))),128))]),z("ul",null,[(Q(!0),ie(Fe,null,ct(P.attrs,O=>(Q(),ie("li",{key:O.value,class:"flex justify-start mb-2"},[D(R,{color:"green",class:"my-tag"},{default:U(()=>[ve(xt(B(r)(O)),1)]),_:2},1024)]))),128))])]))),128))]),D(k1,{ref_key:"addOrUpdateRef",ref:b,"show-modal":B(x),"modal-title":B(C),onShowHideModal:A[1]||(A[1]=P=>x.value=P),onAddDataSource:d,onEditDataSource:g},null,8,["show-modal","modal-title"])])}}});const z1=it(H1,[["__scopeId","data-v-c05208b2"]]),$c=(e,t,n)=>new Promise((a,v)=>{if(n){const o=t.getElementById(`${n}Scripts`),l=t.getElementById(`${n}StyleSheets`);o&&o.remove(),l&&l.remove()}else{const o=t.getElementById("componentsScripts"),l=t.getElementById("componentsStyleSheets");o&&o.remove(),l&&l.remove()}let p=`;(function(){
|
|
`,f="";const m=[];e.forEach(o=>{const{css:l,javascript:s,jsPlugin:r}=o.files;r&&m.push(...JSON.parse(r)),p+=`;(function(){${s}})();
|
|
`,f+=`${l}
|
|
`});const c=t.getElementsByTagName("script"),h=function(o){return new Promise((l,s)=>{if(Array.from(c).find(d=>{const g=d.getAttribute("src");return o.url.includes(g)})){l();return}if(!o.url){l();return}if(o.url.includes("core.umd.js")||o.url.includes("NodeResize.js")){l();return}const u=t.createElement("script");u.setAttribute("src",o.url),t.body.append(u),u.onload=()=>{l(!0)}})};async function i(){for(let o=0;o<m.length;o++)await h(m[o])}i().then(()=>{p+=`
|
|
})();`;const o=t.createElement("script");o.setAttribute("id",n?`${n}Scripts`:"componentsScripts");const l=URL.createObjectURL(new Blob([p]));if(o.onload=()=>{a()},o.src=l,t.body.append(o),f){const s=t.createElement("style");s.setAttribute("id",n?`${n}StyleSheets`:"componentsStyleSheets"),s.innerText=f,setTimeout(()=>{t.querySelector("head").appendChild(s)},500)}})}),W1=["fill","width","height"],V1=["transform"],j1={transform:"matrix(-1,-5.2146120310681e-8,5.2146120310681e-8,-1,18.132812108112788,15.030350204223224)"},U1=["fill"],G1=ce({__name:"expandFold",props:{color:null,width:null,height:null,rotation:null},setup(e){const t=e,n=le(()=>`rotate(${t.rotation})`),{color:a,width:v,height:p}=xe(t);return(f,m)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:B(a),version:"1.1",width:B(v),height:B(p),viewBox:"0 0 9.06640625 7.51513671875"},[z("g",{transform:B(n),style:{"transform-origin":"center center"}},[z("g",j1,[z("path",{d:"M17.374346250000002,12.086864865722657C17.62335625,11.937034865722655,17.94721625,12.030334865722656,18.07834625,12.289684865722656C18.20947625,12.549024865722657,18.092636249999998,12.865144865722655,17.824346249999998,12.976864865722657L13.82434625,14.976864865722657C13.68282625,15.048184865722657,13.51587625,15.048184865722657,13.37434625,14.976864865722657L9.37434925,12.976864865722657C9.14995245,12.841844865722656,9.06776214,12.556544865722657,9.18593125,12.322834865722657C9.30410025,12.089124865722656,9.58258625,11.986194865722656,9.824349250000001,12.086864865722657L13.59934625,13.971864865722656L17.374346250000002,12.086864865722657ZM17.374346250000002,7.586868765722656C17.62336625,7.437032265722657,17.94721625,7.530329265722656,18.07834625,7.7896788657226566C18.20947625,8.049028865722656,18.092636249999998,8.365149865722657,17.824346249999998,8.476868865722656L13.82434625,10.476864865722657C13.68282625,10.548184865722657,13.51587625,10.548184865722657,13.37434625,10.476864865722657L9.37434925,8.476868865722656C9.10606435,8.365150865722656,8.98922035,8.049028865722656,9.12035255,7.7896788657226566C9.25148425,7.530329265722656,9.57533725,7.437032265722657,9.824349250000001,7.586868765722656L13.59934625,9.471864865722656L17.374346250000002,7.586868765722656Z",fill:B(a),"fill-opacity":"1"},null,8,U1)])],8,V1)],8,W1))}}),ln={uploadDashboardSnapshot:e=>Re.post("/sys/tenant/detail/upload",e,{headers:{"content-type":"multipart/form-data"}}),save:e=>Re.post("/iotconfigurationdesig",e),edit:e=>Re.put("/iotconfigurationdesig",e),info:e=>Re.get("/iotconfigurationdesig/getDetailByBoardManageId",e),getMaterialList:e=>Re.get("/v2/material/page",e),getMaterialGroupList:e=>Re.get("/v2/group/groupTypeListByGroupName",e),getMaterialGroupTreeList:e=>Re.get("/v2/group/groupList",e),getDeviceListByDatasource:e=>Re.get(`/v2/api/telemetryById?id=${e}`),getDatapointList:(e,t)=>Re.get(`/v2/api/callDict?id=${e}&entityId=${t}`)},Y1={class:"px-2 py-2"},Z1={class:"search-box px-2 py-2"},K1={class:"material-groups flex justify-between"},X1={class:"group-types flex flex-col"},Q1={class:"w-full text-center"},J1=["onMousedown"],q1=ce({__name:"index",props:["shrinkLeft","modelValue"],emits:["dragMaterial","update:modelValue"],setup(e,{emit:t}){const n=e,a=t,{shrinkLeft:v}=xe(n),p=Y(""),f=Y([]),m=le({get(){return n.modelValue},set(w){a("update:modelValue",w)}}),c=Y([]),h=Y([]),i=Y([]),o=Y(!1),l=Y({}),s=()=>{m.value=[],c.value=[],h.value=[],l.value={},f.value=[],i.value=[],o.value=!1},r=async(w,_,I)=>{var A;const E=await ln.getMaterialList({name:I,groupIds:_,page:1,limit:9999});if(E.code!==0)return ye.warning(E.msg);const k=((A=E.data)==null?void 0:A.list)||[];w?l.value[w]=k:(l.value.素材=k,c.value=["素材"],i.value=["素材"]),o.value=!1},u=()=>{f.value.forEach((w,_)=>{_===0&&w.typeList.forEach((E,k)=>{k===0?(r(E.businessType,E.id).then(()=>{i.value=[E.businessType],c.value=[E.businessType],h.value=[w.id]}),m.value=[E.id]):l.value[E.businessType]=[]})})},d=async()=>{const w=await ll.getComponentGroupTree({type:"material",name:p.value,businessType:p.value});if(w.code!==0)return ye.warning(w.msg);f.value=w.data,o.value=!1,u()},g=async(w,_)=>{if(i.value=_,c.value=_,w.length!==0){o.value=!0;for(let I=0;I<w.length;I++)await r(_[I],w[I])}},y=le(()=>{const w={};return c.value.forEach(_=>{_&&(w[_]=l.value[_])}),w}),x=w=>{s(),o.value=!0,w.target.value?r("","",w.target.value):(delete l.value.素材,d())},C=(w,_)=>{a("dragMaterial",nt(cl),w,_)},b=Y("#000");return me(ht,w=>{b.value=w?"#ffffff":"#000"}),ot(()=>{o.value=!0,d()}),(w,_)=>{const I=hn,E=il,k=hr,A=Eo,S=jr,M=Bn,$=Sn;return Q(),ie("div",{class:kt(["material-lib h-full",{shrinkLeft:B(v)}])},[z("div",Y1,[D(I,{value:B(p),"onUpdate:value":_[0]||(_[0]=L=>qe(p)?p.value=L:null),"allow-clear":!0,placeholder:"搜索素材",onChange:x},{prefix:U(()=>[D(B(Ju))]),_:1},8,["value"])]),z("div",Z1,[D(E,{value:B(m),"onUpdate:value":_[1]||(_[1]=L=>qe(m)?m.value=L:null),style:{width:"100%"},placeholder:"选择组名称,组类型","tree-checkable":"","allow-clear":!0,"tree-default-expanded-keys":B(h),height:233,"tree-data":B(f),"field-names":{children:"typeList",label:"businessType",value:"id"},"max-tag-count":1,"tree-node-filter-prop":"businessType",onChange:g},null,8,["value","tree-default-expanded-keys","tree-data"])]),z("div",K1,[z("div",X1,[D($,{activeKey:B(i),"onUpdate:activeKey":_[2]||(_[2]=L=>qe(i)?i.value=L:null),"expand-icon-position":"right",ghost:!0,class:"type-collapse type-mat-list"},{expandIcon:U(({isActive:L})=>[D(G1,{width:12,height:12,color:B(b),rotation:L?0:180},null,8,["color","rotation"])]),default:U(()=>[at(z("div",Q1,[D(k,{spinning:B(o),style:{}},null,8,["spinning"])],512),[[dt,B(o)]]),(Q(!0),ie(Fe,null,ct(B(y),(L,T)=>(Q(),be(M,{key:T},{header:U(()=>[D(A,{class:"material-divider"},{default:U(()=>[ve(xt(T),1)]),_:2},1024)]),default:U(()=>[(Q(!0),ie(Fe,null,ct(L,R=>(Q(),ie("div",{key:R.id,class:"w-full mat-grid-item",onMousedown:P=>{P.preventDefault(),C(R.image,R.name)}},[D(S,{preview:!1,src:R.image},null,8,["src"])],40,J1))),128))]),_:2},1024))),128))]),_:1},8,["activeKey"])])])],2)}}});const e0=it(q1,[["__scopeId","data-v-0e7b8992"]]),t0={class:"history-materials"},n0=["onMousedown"],o0=ce({__name:"index",props:["shrinkLeft"],emits:["dragMaterial"],setup(e,{emit:t}){const n=e,a=t,{shrinkLeft:v}=xe(n),p=Lt("historyMaterials"),f=(m,c)=>{a("dragMaterial",nt(cl),m,c)};return(m,c)=>{const h=jr;return Q(),ie("div",{class:kt(["history-mat-wrapper",{shrinkLeft:B(v)}])},[z("div",t0,[(Q(!0),ie(Fe,null,ct(B(p),i=>(Q(),ie("div",{key:i.id,class:kt(["material-item",{"is-dark-img":B(ht)}]),onMousedown:o=>{o.preventDefault(),f(i.href,i.materialName)}},[D(h,{preview:!1,src:i.href},null,8,["src"])],42,n0))),128))])],2)}}});const i0=it(o0,[["__scopeId","data-v-5183cdda"]]),r0=ce({props:{list:{type:Object,default:()=>({})}},emits:["dragComp"],setup(e,{emit:t}){const n=Y([""]),a=(v,p)=>{v.preventDefault(),t("dragComp",p)};return ot(()=>{const v=Object.keys(e.list);n.value=[v[0]]}),{activeKey:n,mousedownHandler:a}}});const a0={class:"widget-item-list"},s0=["onMousedown"],l0={class:"widget-item mx-2 flex justify-center items-center border-rd-1 bg-light dark:bg-dark"},c0=["innerHTML"],u0=["src"];function d0(e,t,n,a,v,p){const f=en,m=Bn,c=Sn;return Q(),be(c,{activeKey:e.activeKey,"onUpdate:activeKey":t[0]||(t[0]=h=>e.activeKey=h),style:{width:"220px"},class:kt(["comps-collapse",{"dark-collapse":"isDark"in e?e.isDark:B(ht)}]),"expand-icon-position":"end",bordered:!1},{default:U(()=>[(Q(!0),ie(Fe,null,ct(e.list,(h,i)=>(Q(),be(m,{key:i,header:i},{default:U(()=>[z("div",a0,[(Q(!0),ie(Fe,null,ct(h,(o,l)=>(Q(),ie("div",{key:l,class:"widget-col flex justify-center items-center cursor-grab overflow-hidden"},[z("div",{class:"w-full widget-item-box",onMousedown:s=>e.mousedownHandler(s,o)},[D(f,null,{title:U(()=>[ve(xt(o.aliasName),1)]),default:U(()=>[z("div",l0,[o.image.includes("<svg")?(Q(),ie("span",{key:0,class:"svg-node",innerHTML:o.image},null,8,c0)):(Q(),ie("img",{key:1,src:o.image||"./defaultPic.svg"},null,8,u0))])]),_:2},1024)],40,s0)]))),128))])]),_:2},1032,["header"]))),128))]),_:1},8,["activeKey","class"])}const h0=it(r0,[["render",d0],["__scopeId","data-v-f5f538b4"]]),f0=["width","height"],p0=["fill"],g0=ce({__name:"componentsIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683162866134",class:"icon inline-block outline-none",style:{position:"relative",top:"-2px"},viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4936","xmlns:xlink":"http://www.w3.org/1999/xlink",width:B(a),height:B(v)},[z("path",{d:"M810.666667 85.333333a85.333333 85.333333 0 0 1 85.333333 85.333334v152.021333c36.821333 9.493333 64 42.88 64 82.645333v405.333334a128 128 0 0 1-128 128H192a128 128 0 0 1-128-128V298.666667a85.376 85.376 0 0 1 64-82.645334V170.666667a85.333333 85.333333 0 0 1 85.333333-85.333334h597.333334zM128.149333 296.170667L128 298.666667v512a64 64 0 0 0 60.245333 63.893333L192 874.666667h640a64 64 0 0 0 63.893333-60.245334L896 810.666667V405.333333a21.333333 21.333333 0 0 0-18.837333-21.184L874.666667 384H638.165333l-122.069333-101.717333a21.333333 21.333333 0 0 0-10.688-4.736l-2.986667-0.213334H149.333333a21.333333 21.333333 0 0 0-21.184 18.837334zM535.189333 213.333333l127.978667 106.666667H832V170.666667a21.333333 21.333333 0 0 0-18.837333-21.184L810.666667 149.333333H213.333333a21.333333 21.333333 0 0 0-21.184 18.837334L192 170.666667v42.666666h343.168z",fill:B(n),"p-id":"4937"},null,8,p0)],8,f0))}}),m0=["width","height"],v0=["fill"],y0=ce({__name:"layersIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683162911426",class:"icon inline-block outline-none",style:{position:"relative",top:"-2px"},viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6081","xmlns:xlink":"http://www.w3.org/1999/xlink",width:B(a),height:B(v)},[z("path",{d:"M976 672c-6.496 0-12.688 1.328-18.352 3.664v-0.016l-0.208 0.08-0.208 0.08L512 860.048 66.784 675.824a1.12 1.12 0 0 0-0.208-0.08l-0.208-0.08-0.016 0.016a48 48 0 0 0-36.704 88.656v0.016l463.584 191.824a1.12 1.12 0 0 0 0.208 0.08l0.208 0.08 0.016-0.016a47.6 47.6 0 0 0 36.688 0.016l0.016 0.016 0.208-0.08a1.12 1.12 0 0 1 0.208-0.08l463.568-191.824v-0.016A48 48 0 0 0 976 672zM29.664 348.336v0.016l463.584 191.824 0.208 0.08 0.208 0.08 0.016-0.016a47.456 47.456 0 0 0 36.672 0.016l0.016 0.016 0.208-0.08a1.12 1.12 0 0 1 0.208-0.08l463.568-191.824v-0.016A48.048 48.048 0 0 0 1024 304a48 48 0 0 0-29.648-44.336v-0.016L530.784 67.824a1.12 1.12 0 0 0-0.208-0.08l-0.208-0.08-0.016 0.016a47.744 47.744 0 0 0-36.688-0.016l-0.016-0.016-0.208 0.08a1.12 1.12 0 0 1-0.208 0.08L29.648 259.648v0.016A48 48 0 0 0 0 304a48 48 0 0 0 29.664 44.336zM976 464c-6.496 0-12.688 1.328-18.352 3.664v-0.016l-0.208 0.096a1.12 1.12 0 0 1-0.208 0.08L512 652.048 66.784 467.824a1.12 1.12 0 0 0-0.208-0.08l-0.208-0.096-0.016 0.016a48 48 0 0 0-36.704 88.672v0.016l463.584 191.824 0.208 0.08 0.208 0.08 0.016-0.016a47.6 47.6 0 0 0 36.688 0.016l0.016 0.016 0.208-0.08a1.12 1.12 0 0 1 0.208-0.08l463.568-191.824v-0.016A48 48 0 0 0 976 464z",fill:B(n),"p-id":"6082"},null,8,v0)],8,m0))}}),w0=["width","height","fill"],b0=ce({__name:"entitiesIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683162959829",class:"icon inline-block outline-none",style:{position:"relative",top:"-2px"},viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7003","xmlns:xlink":"http://www.w3.org/1999/xlink",width:B(a),height:B(v),fill:B(n)},f[0]||(f[0]=[z("path",{d:"M874.6 0 85.4 0c-47.2 0-85.4 38.2-85.4 85.4l0 85.2c0 47.2 38.2 85.4 85.4 85.4l789.2 0c47.2 0 85.4-38.2 85.4-85.4l0-85.2C960 38.2 921.8 0 874.6 0zM896 170.6c0 11.8-9.6 21.4-21.4 21.4L85.4 192c-11.8 0-21.4-9.6-21.4-21.4l0-85.2c0-11.8 9.6-21.4 21.4-21.4l789.2 0c11.8 0 21.4 9.6 21.4 21.4L896 170.6z","p-id":"7004"},null,-1),z("path",{d:"M870 320 90 320c-49.7 0-90 40.3-90 90l0 140c0 49.7 40.3 90 90 90l780 0c49.7 0 90-40.3 90-90l0-140C960 360.3 919.7 320 870 320zM896 550c0 14.3-11.7 26-26 26L90 576c-14.3 0-26-11.7-26-26l0-140c0-14.3 11.7-26 26-26l780 0c14.3 0 26 11.7 26 26L896 550z","p-id":"7005"},null,-1),z("path",{d:"M870 704 90 704c-49.7 0-90 40.3-90 90l0 140c0 49.7 40.3 90 90 90l780 0c49.7 0 90-40.3 90-90l0-140C960 744.3 919.7 704 870 704zM896 934c0 14.3-11.7 26-26 26L90 960c-14.3 0-26-11.7-26-26l0-140c0-14.3 11.7-26 26-26l780 0c14.3 0 26 11.7 26 26L896 934z","p-id":"7006"},null,-1),z("path",{d:"M192 480m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z","p-id":"7007"},null,-1),z("path",{d:"M192 864m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z","p-id":"7008"},null,-1)]),8,w0))}}),C0=["width","height"],x0=["fill"],$0=["fill"],S0=["fill"],k0=["fill"],_0=ce({__name:"basicWidgetIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683167036852",class:"icon inline-block outline-none",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8690",width:B(a),height:B(v)},[z("path",{d:"M241.28 208h-192a35.2 35.2 0 0 1-38.4-35.2 35.2 35.2 0 0 1 35.2-34.56h195.2a34.56 34.56 0 0 1 34.56 34.56 35.2 35.2 0 0 1-34.56 35.2zM984.32 208H463.36a35.2 35.2 0 0 1-34.56-35.2 34.56 34.56 0 0 1 34.56-34.56h520.96a35.2 35.2 0 0 1 35.2 34.56 35.2 35.2 0 0 1-35.2 35.2z",fill:B(n),"p-id":"8691"},null,8,x0),z("path",{d:"M356.48 300.8a128 128 0 1 1 128-128 128 128 0 0 1-128 128z m0-176.64a48.64 48.64 0 0 0-49.28 48.64 49.28 49.28 0 1 0 97.92 0 48.64 48.64 0 0 0-48.64-48.64zM241.28 876.16h-192a35.2 35.2 0 0 1-35.2-34.56 35.2 35.2 0 0 1 35.2-35.2h192a35.2 35.2 0 0 1 34.56 35.2 34.56 34.56 0 0 1-34.56 34.56zM984.32 876.16H463.36a34.56 34.56 0 0 1-34.56-34.56 35.2 35.2 0 0 1 34.56-35.2h520.96a35.2 35.2 0 0 1 35.2 35.2 35.2 35.2 0 0 1-35.2 34.56z",fill:B(n),"p-id":"8692"},null,8,$0),z("path",{d:"M356.48 968.96a128 128 0 1 1 128-128 128 128 0 0 1-128 128z m0-176a48.64 48.64 0 1 0 48.64 48.64 48.64 48.64 0 0 0-48.64-48.64zM789.76 543.36h192a35.2 35.2 0 1 0 0-69.76h-192a35.2 35.2 0 1 0 0 69.76zM46.08 543.36h520.96a35.2 35.2 0 0 0 0-69.76H46.08a35.2 35.2 0 1 0 0 69.76z",fill:B(n),"p-id":"8693"},null,8,S0),z("path",{d:"M546.56 512a128 128 0 1 1 128 128 128 128 0 0 1-128-128z m78.72 0a49.28 49.28 0 1 0 49.28-49.28 49.28 49.28 0 0 0-49.28 49.28z",fill:B(n),"p-id":"8694"},null,8,k0)],8,C0))}}),M0=["fill","width","height"],A0=["fill"],L0=ce({__name:"dynamicWidgetIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon inline-block outline-none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:B(n),version:"1.1",width:B(a),height:B(v),viewBox:"0 0 16 16"},[z("g",null,[z("path",{d:"M1.79195,10.8129C1.78373,10.7642,1.77957,10.7148,1.77951,10.6654L1.77951,5.33269C1.77951,5.28203,1.78395,5.23314,1.79195,5.18515C0.564526,4.75622,-0.174771,3.50477,0.0419036,2.22275C0.258578,0.940719,1.36808,0.00173124,2.66829,4.23804e-7C3.97004,-0.00082557,5.0821,0.938455,5.29904,2.22201C5.51597,3.50556,4.77435,4.75813,3.54462,5.18515C3.55351,5.23314,3.55707,5.28291,3.55707,5.33269L3.55707,10.6654C3.55707,10.716,3.55262,10.7649,3.54462,10.8129C4.77205,11.2418,5.51134,12.4933,5.29467,13.7753C5.078,15.0573,3.96849,15.9963,2.66829,15.9981C1.36653,15.9989,0.254465,15.0596,0.0375325,13.776C-0.1794,12.4925,0.562222,11.2399,1.79195,10.8129ZM15.1112,3.55512L8.00097,3.55512C7.51011,3.55512,7.11219,3.1572,7.11219,2.66634C7.11219,2.17548,7.51011,1.77756,8.00097,1.77756L15.1112,1.77756C15.6021,1.77756,16,2.17548,16,2.66634C16,3.1572,15.6021,3.55512,15.1112,3.55512ZM15.1112,8.88781L9.77853,8.88781C9.28767,8.88781,8.88975,8.48989,8.88975,7.99903C8.88975,7.50817,9.28767,7.11025,9.77853,7.11025L15.1112,7.11025C15.6021,7.11025,16,7.50817,16,7.99903C16,8.48989,15.6021,8.88781,15.1112,8.88781ZM15.1112,14.2205L8.00097,14.2205C7.51011,14.2205,7.11219,13.8226,7.11219,13.3317C7.11219,12.8409,7.51011,12.4429,8.00097,12.4429L15.1112,12.4429C15.6021,12.4429,16,12.8409,16,13.3317C16,13.8226,15.6021,14.2205,15.1112,14.2205ZM2.66829,12.4429C2.17743,12.4429,1.77951,12.8409,1.77951,13.3317C1.77951,13.8226,2.17743,14.2205,2.66829,14.2205C3.15915,14.2205,3.55707,13.8226,3.55707,13.3317C3.55707,12.8409,3.15915,12.4429,2.66829,12.4429ZM2.66829,1.77756C2.17743,1.77756,1.77951,2.17548,1.77951,2.66634C1.77951,3.1572,2.17743,3.55512,2.66829,3.55512C3.15915,3.55512,3.55707,3.1572,3.55707,2.66634C3.55707,2.17548,3.15915,1.77756,2.66829,1.77756Z",fill:B(n),"fill-opacity":"1"},null,8,A0)])],8,M0))}}),E0=["width","height"],I0=["fill"],T0=ce({__name:"decorationWidgetIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683167407004",class:"icon inline-block outline-none",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15084",width:B(a),height:B(v)},[z("path",{d:"M512.690875 1023.99935a202.280506 202.280506 0 0 1-164.977674-85.577089 201.792888 201.792888 0 0 1-240.233498-242.265243 201.711618 201.711618 0 0 1-5.201266-353.848664 201.792888 201.792888 0 0 1 240.802386-249.823333 201.792888 201.792888 0 0 1 334.912804-6.420314 201.792888 201.792888 0 0 1 240.396038 243.809369A201.549078 201.549078 0 0 1 1024.040391 503.872696a201.06146 201.06146 0 0 1-101.668507 178.793537 201.711618 201.711618 0 0 1-240.396038 249.335715A200.81765 200.81765 0 0 1 512.690875 1023.99935z m-142.709751-143.03483l9.833644 17.147926a152.949744 152.949744 0 0 0 268.921734-5.932695l9.671105-18.692052 19.911099 6.826663A153.031014 153.031014 0 0 0 869.627791 679.252902l-8.126979-21.942843 21.699034-9.427296A152.380856 152.380856 0 0 0 975.278517 504.929203 152.868474 152.868474 0 0 0 879.867784 365.714054l-21.699034-8.777138 8.126979-22.105383A153.031014 153.031014 0 0 0 674.580296 137.508484l-18.935861 6.257774-9.833645-17.391735a153.031014 153.031014 0 0 0-269.490623 5.851425l-9.589835 18.854591-19.992368-6.826662A153.031014 153.031014 0 0 0 154.453642 345.640415l8.777137 22.105383-21.536494 9.346026a152.949744 152.949744 0 0 0 3.90095 282.981408l21.861573 8.614597-8.126979 22.186653a153.031014 153.031014 0 0 0 191.552894 196.185272zM512.040716 773.688398a263.395388 263.395388 0 0 1-59.245676-6.745393 260.713485 260.713485 0 0 1-189.43988-330.768044 253.155395 253.155395 0 0 1 18.448242-44.292035A259.494438 259.494438 0 0 1 386.722701 285.256962a255.837298 255.837298 0 0 1 56.888852-23.080621 260.063327 260.063327 0 0 1 293.465211 120.441829 254.536981 254.536981 0 0 1 21.373954 46.648859 262.095072 262.095072 0 0 1 2.844443 159.532597 265.508403 265.508403 0 0 1-19.911098 47.867906 261.038564 261.038564 0 0 1-102.399935 104.025331A260.063327 260.063327 0 0 1 512.040716 773.688398z m-48.192985-54.20695a213.658277 213.658277 0 0 0 102.074856-1.544126 203.743363 203.743363 0 0 0 49.168222-19.829829 211.301453 211.301453 0 0 0 83.382805-84.601851 211.301453 211.301453 0 0 0-3.494601-206.343996 211.301453 211.301453 0 0 0-81.26979-79.156775 206.181456 206.181456 0 0 0-52.175205-20.236178 212.926849 212.926849 0 0 0-105.081838 1.462857A211.301453 211.301453 0 0 0 300.739263 513.381261a212.5205 212.5205 0 0 0 10.808882 67.047577 219.428432 219.428432 0 0 0 16.985386 37.952992 212.195421 212.195421 0 0 0 135.3142 101.099618z",fill:B(n),"p-id":"15085"},null,8,I0)],8,E0))}}),D0=["width","height"],R0=["fill"],P0=["fill"],N0=ce({__name:"deviceWidgetIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683168103501",class:"icon inline-block outline-none",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"34232",width:B(a),height:B(v)},[z("path",{d:"M508.770423 11.025358C231.770945 11.025358 7.225005 235.571298 7.225005 512.570775c0 276.970578 224.545939 501.516517 501.545417 501.516517 276.985028 0 501.538192-224.538714 501.538192-501.516517C1010.31584 235.571298 785.762676 11.025358 508.770423 11.025358zM508.770423 989.63065c-263.481493 0-477.081549-213.592831-477.081549-477.059874 0-263.481493 213.592831-477.074324 477.081549-477.074324s477.074324 213.592831 477.074324 477.074324C985.844747 776.037818 772.259141 989.63065 508.770423 989.63065z",fill:B(n),"p-id":"34233"},null,8,R0),z("path",{d:"M696.613335 825.413505c-61.846045 0-114.299584-46.962534-122.015889-109.24208-2.326452-18.777789-1.004276-34.896776 4.046003-49.267311 0.368475-1.054851 0.411825-1.575051 0.41905-1.705101l0 0c-0.0578 0-0.440725-0.614125-1.741226-1.914626C496.300064 582.573852 424.483511 510.786199 357.738912 443.8104c-1.697876-1.705101-2.160277-1.705101-2.340902-1.705101-0.4624 0-1.372751 0.10115-3.070627 0.578-10.880858 3.056177-22.101291 4.616778-33.336174 4.616778 0 0-0.007225 0-0.007225 0-58.529768 0-109.35768-41.420955-120.874339-98.498497-5.635504-27.94632-2.723827-53.631214 8.662781-76.339406l2.485402-4.956354 5.476554-0.888676c10.273958-1.647301 15.194186 5.050279 17.253313 7.680181 0.21675 0.281775 0.41905 0.56355 0.643025 0.801976 9.486432 9.385282 18.965639 18.871714 28.444846 28.365371 11.979059 11.993509 23.958118 23.987018 36.060001 35.864926 13.66971 13.416835 29.282946 14.804036 41.131955 3.164552 5.512679-5.418754 8.258181-12.000734 7.933056-19.023439-0.3468-7.528456-4.096578-15.136386-10.837508-21.978466-16.299612-16.566937-32.779849-32.967699-49.780286-49.903112l-34.116475-34.037 15.078586-6.17738c19.175164-7.853581 37.078727-11.675609 54.729415-11.675609 19.124589 0 37.880703 4.717928 55.733691 14.023735 51.629888 26.92037 77.524307 86.873464 61.56427 142.571029-0.960926 3.345177-0.975376 3.410202 1.929076 6.300205 60.126494 59.916969 139.204177 138.806802 217.624384 217.653284 2.145827 2.153052 2.911677 2.153052 3.735328 2.153052 1.018726 0 2.463727-0.223975 4.414478-0.693601 11.437183-2.716602 22.715417-4.096578 33.495125-4.096578 34.860651 0 65.082848 13.922585 89.821266 41.37038 31.826148 35.294151 40.539505 77.639907 25.200818 122.471065-1.957976 5.686079-5.577704 16.227362-16.292387 16.234587-6.50973 0-11.552783-4.392803-15.613236-8.691681-20.692415-21.848416-42.656431-43.342807-63.897947-64.129147l-1.076526-1.054851c-9.349157-9.139632-18.994539-11.603358-29.694772-7.528456-10.165582 3.858153-15.779412 10.960333-17.152163 21.718366-1.228251 9.378057 2.181952 17.441163 11.032583 26.168969 16.559712 16.306837 33.025499 32.700374 49.794736 49.390136l31.811698 31.638298-13.10616 6.85653C733.641487 820.919551 715.477824 825.413505 696.613335 825.413505zM355.39801 420.430283c8.648331 0 14.240485 4.616778 17.694038 8.084781 66.722924 66.954124 138.525026 138.720102 219.495661 219.394511 4.970804 4.927454 11.083158 13.026685 6.502505 26.147294-3.915953 11.169858-4.891329 24.066493-2.991152 39.448529 6.372455 51.442038 49.577986 90.233091 100.507049 90.233091 10.273958 0 20.29504-1.647301 29.947647-4.898554l-9.970507-9.919932c-16.733112-16.660862-33.177224-33.025499-49.715261-49.310661-13.778085-13.58301-19.442489-28.105271-17.318338-44.390433 2.384252-18.611614 13.38071-32.534199 30.951923-39.195654 18.647739-7.094955 37.136527-2.788852 52.547463 12.289734l1.076526 1.054851c20.32394 19.883215 41.29813 40.409455 61.33307 61.40532 11.148183-36.009426 3.764228-68.7387-21.992916-97.291921-26.985395-29.954872-61.701545-40.30108-102.204925-30.691822-3.670303 0.874226-6.661455 1.278826-9.421407 1.278826-7.225005 0-13.29401-2.716602-19.095689-8.539956-78.398532-78.824808-157.447315-157.68574-217.559359-217.588259-5.924504-5.895604-11.437183-13.792535-7.470655-27.635645 13.13506-45.835434-8.207606-95.203895-50.748437-117.377436-24.348268-12.687109-48.949411-14.905186-76.462231-7.02993l10.353433 10.317308c17.051012 16.985987 33.5746 33.437324 49.939237 50.054837 10.541283 10.714683 16.436887 23.228392 17.036562 36.182827 0.6069 13.16396-4.501178 25.764369-14.384986 35.489226-9.471982 9.298582-20.923615 14.21881-33.119424 14.21881-13.53966 0-26.81922-6.011204-38.393678-17.368913-12.145234-11.928484-24.174868-23.972568-36.204502-36.016651-8.164256-8.178706-16.328512-16.350187-24.528893-24.492768-4.884104 15.251986-5.512679 32.086249-1.849601 50.228237 9.486432 46.991434 51.384238 81.107909 99.632823 81.107909 0 0 0 0 0 0 9.255232 0 18.503239-1.278826 27.48392-3.807578C349.834756 420.871008 352.674183 420.430283 355.39801 420.430283z",fill:B(n),"p-id":"34234"},null,8,P0),f[0]||(f[0]=z("path",{d:"M508.763198 512.556325","p-id":"34235"},null,-1))],8,D0))}}),O0=["width","height","fill"],B0=ce({__name:"normalWidgetIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683167243127",class:"icon inline-block outline-none",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9905",width:B(a),height:B(v),fill:B(n)},f[0]||(f[0]=[z("path",{d:"M826.56 470.016c-32.896 0-64.384 12.288-89.984 35.52l0-104.96c0-62.208-50.496-112.832-112.64-113.088L623.936 287.04 519.552 287.104C541.824 262.72 554.56 230.72 554.56 197.12c0-73.536-59.904-133.44-133.504-133.44-73.472 0-133.376 59.904-133.376 133.44 0 32.896 12.224 64.256 35.52 89.984L175.232 287.104l0 0.576C113.728 288.704 64 338.88 64 400.576l0.32 0 0.32 116.48C60.864 544.896 70.592 577.728 100.8 588.48c12.736 4.608 37.632 7.488 60.864-25.28 12.992-18.368 34.24-29.248 56.64-29.248 38.336 0 69.504 31.104 69.504 69.312 0 38.4-31.168 69.504-69.504 69.504-22.656 0-44.032-11.264-57.344-30.4C138.688 610.112 112.576 615.36 102.464 619.136c-29.824 10.752-39.104 43.776-38.144 67.392l0 160.384L64 846.912C64 909.248 114.752 960 177.216 960l446.272 0c62.4 0 113.152-50.752 113.152-113.152l0-145.024c24.384 22.272 56.384 35.008 89.984 35.008 73.536 0 133.44-59.904 133.44-133.504C960 529.92 900.096 470.016 826.56 470.016zM826.56 672.896c-22.72 0-44.032-11.264-57.344-30.4-22.272-32.384-48.448-27.136-58.56-23.36-29.824 10.752-39.04 43.776-38.08 67.392l0 160.384c0 27.136-22.016 49.152-49.152 49.152L177.216 896.064C150.08 896 128 873.984 128 846.848l0.32 0 0-145.024c24.384 22.272 56.384 35.008 89.984 35.008 73.6 0 133.504-59.904 133.504-133.504 0-73.472-59.904-133.376-133.504-133.376-32.896 0-64.32 12.288-89.984 35.52l0-104.96L128 400.512c0-27.072 22.08-49.152 49.216-49.152L177.216 351.04 334.656 350.72c3.776 0.512 7.616 0.832 11.52 0.832 24.896 0 50.752-10.816 60.032-37.056 4.544-12.736 7.424-37.568-25.344-60.736C362.624 240.768 351.68 219.52 351.68 197.12c0-38.272 31.104-69.44 69.376-69.44 38.336 0 69.504 31.168 69.504 69.44 0 22.72-11.264 44.032-30.528 57.472C427.968 276.736 433.088 302.784 436.8 313.024c10.752 29.888 43.072 39.232 67.392 38.08l119.232 0 0 0.384c27.136 0 49.152 22.08 49.152 49.152l0.256 116.48c-3.776 27.84 6.016 60.736 36.224 71.488 12.736 4.608 37.632 7.488 60.8-25.28 13.056-18.368 34.24-29.248 56.704-29.248C864.832 534.016 896 565.12 896 603.392 896 641.728 864.832 672.896 826.56 672.896z","p-id":"9906"},null,-1)]),8,O0))}}),F0=["width","height"],H0=["fill"],z0=ce({__name:"bigscreenIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1704179193174",class:"icon inline-block outline-none",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:B(a),height:B(v)},[z("path",{d:"M94.3 201.1V759h828.5V201.1H94.3z m794.6 524.1H128.1V234.9h760.8v490.3z m-169.1-355c-18.7 0-33.8 15.1-33.8 33.8 0 4.1 0.7 8 2 11.6L558.6 516.2c-6.2-6.6-15-10.8-24.8-10.8-9.3 0-17.8 3.8-23.9 9.9l-63.6-63.6c1.9-4.2 3-9 3-13.9 0-18.7-15.1-33.8-33.8-33.8-18.7 0-33.8 15.1-33.8 33.8 0 4.3 0.8 8.4 2.3 12.2l-79.2 66c-6.2-6.5-14.9-10.6-24.5-10.6-18.7 0-33.8 15.1-33.8 33.8s15.1 33.8 33.8 33.8c18.7 0 33.8-15.1 33.8-33.8 0-4.3-0.8-8.4-2.3-12.2l79.2-66c6.2 6.5 14.9 10.6 24.5 10.6 9.3 0 17.8-3.8 23.9-9.9l63.6 63.6c-1.9 4.2-3 9-3 13.9 0 18.7 15.1 33.8 33.8 33.8 18.7 0 33.8-15.1 33.8-33.8 0-4.1-0.7-8-2-11.6L695.1 427c6.2 6.6 15 10.8 24.8 10.8 18.7 0 33.8-15.1 33.8-33.8s-15.2-33.8-33.9-33.8zM280.2 556.1c-9.3 0-16.9-7.6-16.9-16.9s7.6-16.9 16.9-16.9c9.3 0 16.9 7.6 16.9 16.9s-7.5 16.9-16.9 16.9z m135.3-101.4c-9.3 0-16.9-7.6-16.9-16.9s7.6-16.9 16.9-16.9 16.9 7.6 16.9 16.9-7.6 16.9-16.9 16.9z m118.4 101.4c-9.3 0-16.9-7.6-16.9-16.9s7.6-16.9 16.9-16.9 16.9 7.6 16.9 16.9-7.6 16.9-16.9 16.9z m185.9-135.2c-9.3 0-16.9-7.6-16.9-16.9 0-9.3 7.6-16.9 16.9-16.9 9.3 0 16.9 7.6 16.9 16.9 0 9.3-7.5 16.9-16.9 16.9z m-120.4 355l35.9 101.4H364.8l35.9-101.4H365l-50.9 135.3h372l-50.9-135.3h-35.8zM872 251.8H145v16.9h727v-16.9z",fill:B(n)},null,8,H0)],8,F0))}}),W0=["fill","width","height"],V0={"clip-path":"url(#master_svg0_831_14212)"},j0=["fill"],U0=["fill"],G0=["fill"],Y0=["fill"],Z0=["fill"],K0=["fill"],X0=ce({__name:"materialLib",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:B(n),class:"icon inline-block outline-none",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 18 18"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_831_14212"},[z("rect",{x:"0",y:"0",width:"18",height:"18",rx:"0"})])],-1)),z("g",V0,[z("g",null,[z("path",{d:"M9.841796875,7.3125C9.066601875,7.3125,8.435546875,7.943555,8.435546875,8.71875C8.435546875,9.49394,9.066601875,10.125,9.841796875,10.125C10.616986875,10.125,11.248046875,9.49394,11.248046875,8.71875C11.248046875,7.943555,10.616986875,7.3125,9.841796875,7.3125ZM9.841796875,9C9.687106875,9,9.560546875,8.87344,9.560546875,8.71875C9.560546875,8.56406,9.687106875,8.4375,9.841796875,8.4375C9.996486875,8.4375,10.123046875,8.56406,10.123046875,8.71875C10.123046875,8.87344,9.998236875,9,9.841796875,9Z",fill:B(n),"fill-opacity":"1"},null,8,j0)]),z("g",null,[z("path",{d:"M15.755046875,5.0625L6.742776875,5.0625C5.814647875,5.0625,5.060546875,5.816601,5.060546875,6.74473L5.060546875,15.757C5.060546875,16.685200000000002,5.814647875,17.4393,6.742776875,17.4393L15.755046875,17.4393C16.683246875000002,17.4393,17.437346875,16.685200000000002,17.437346875,15.757L17.437346875,6.74473C17.435546875,5.816601,16.681446875,5.0625,15.755046875,5.0625ZM16.310546875,15.7553C16.310546875,16.0629,16.060946875,16.3125,15.753346875,16.3125L6.742776875,16.3125C6.4351568750000006,16.3125,6.185546875,16.0629,6.185546875,15.7553L6.185546875,14.85703L8.739646875,12.30293C8.931246875,12.111329999999999,9.231836874999999,12.08145,9.456836875,12.23262L11.288476875,13.4543C11.958206875,13.90078,12.856446875,13.81113,13.424216875,13.24336L16.308746875,10.358789999999999L16.308746875,15.7553L16.310546875,15.7553ZM16.310546875,8.76797L12.631446875,12.44707C12.439836875000001,12.638670000000001,12.139256875000001,12.66855,11.914256875,12.51738L10.082616875,11.2957C9.412886875,10.849219999999999,8.514646875,10.93887,7.946876875,11.50664L6.185546875,13.26797L6.185546875,6.74473C6.185546875,6.4371100000000006,6.4351568750000006,6.1875,6.742776875,6.1875L15.755046875,6.1875C16.062646875,6.1875,16.312346875,6.4371100000000006,16.312346875,6.74473L16.312346875,8.76797L16.310546875,8.76797Z",fill:B(n),"fill-opacity":"1"},null,8,U0)]),z("g",null,[z("path",{d:"M15.755046875,5.0625L6.742776875,5.0625C5.814647875,5.0625,5.060546875,5.816601,5.060546875,6.74473L5.060546875,15.757C5.060546875,16.685200000000002,5.814647875,17.4393,6.742776875,17.4393L15.755046875,17.4393C16.683246875000002,17.4393,17.437346875,16.685200000000002,17.437346875,15.757L17.437346875,6.74473C17.435546875,5.816601,16.681446875,5.0625,15.755046875,5.0625ZM16.310546875,15.7553C16.310546875,16.0629,16.060946875,16.3125,15.753346875,16.3125L6.742776875,16.3125C6.4351568750000006,16.3125,6.185546875,16.0629,6.185546875,15.7553L6.185546875,14.85703L8.739646875,12.30293C8.931246875,12.111329999999999,9.231836874999999,12.08145,9.456836875,12.23262L11.288476875,13.4543C11.958206875,13.90078,12.856446875,13.81113,13.424216875,13.24336L16.308746875,10.358789999999999L16.308746875,15.7553L16.310546875,15.7553ZM16.310546875,8.76797L12.631446875,12.44707C12.439836875000001,12.638670000000001,12.139256875000001,12.66855,11.914256875,12.51738L10.082616875,11.2957C9.412886875,10.849219999999999,8.514646875,10.93887,7.946876875,11.50664L6.185546875,13.26797L6.185546875,6.74473C6.185546875,6.4371100000000006,6.4351568750000006,6.1875,6.742776875,6.1875L15.755046875,6.1875C16.062646875,6.1875,16.312346875,6.4371100000000006,16.312346875,6.74473L16.312346875,8.76797L16.310546875,8.76797Z",fill:B(n),"fill-opacity":"1"},null,8,G0)]),z("g",null,[z("path",{d:"M15.755046875,5.0625L6.742776875,5.0625C5.814647875,5.0625,5.060546875,5.816601,5.060546875,6.74473L5.060546875,15.757C5.060546875,16.685200000000002,5.814647875,17.4393,6.742776875,17.4393L15.755046875,17.4393C16.683246875000002,17.4393,17.437346875,16.685200000000002,17.437346875,15.757L17.437346875,6.74473C17.435546875,5.816601,16.681446875,5.0625,15.755046875,5.0625ZM16.310546875,15.7553C16.310546875,16.0629,16.060946875,16.3125,15.753346875,16.3125L6.742776875,16.3125C6.4351568750000006,16.3125,6.185546875,16.0629,6.185546875,15.7553L6.185546875,14.85703L8.739646875,12.30293C8.931246875,12.111329999999999,9.231836874999999,12.08145,9.456836875,12.23262L11.288476875,13.4543C11.958206875,13.90078,12.856446875,13.81113,13.424216875,13.24336L16.308746875,10.358789999999999L16.308746875,15.7553L16.310546875,15.7553ZM16.310546875,8.76797L12.631446875,12.44707C12.439836875000001,12.638670000000001,12.139256875000001,12.66855,11.914256875,12.51738L10.082616875,11.2957C9.412886875,10.849219999999999,8.514646875,10.93887,7.946876875,11.50664L6.185546875,13.26797L6.185546875,6.74473C6.185546875,6.4371100000000006,6.4351568750000006,6.1875,6.742776875,6.1875L15.755046875,6.1875C16.062646875,6.1875,16.312346875,6.4371100000000006,16.312346875,6.74473L16.312346875,8.76797L16.310546875,8.76797Z",fill:B(n),"fill-opacity":"1"},null,8,Y0)]),z("g",null,[z("path",{d:"M3.935546875,11.8125L2.2427768749999997,11.8125C1.935156875,11.8125,1.685546875,11.5629,1.685546875,11.2553L1.685546875,10.35703L3.935546875,8.10703L3.935546875,6.74297C3.935546875,6.7166,3.935546875,6.69199,3.937306875,6.66562C3.758006875,6.74648,3.591016875,6.86074,3.445116875,7.00664L1.685546875,8.76797L1.685546875,2.2447299999999997C1.685546875,1.93711,1.935156875,1.6875,2.2427768749999997,1.6875L11.255046875,1.6875C11.562646875,1.6875,11.812346875,1.93711,11.812346875,2.2447299999999997L11.812346875,3.9375L12.937346875,3.9375L12.937346875,2.2447299999999997C12.937346875,1.316601,12.183246875,0.5625,11.255046875,0.5625L2.2427768749999997,0.5625C1.314648875,0.5625,0.56054700911,1.316602,0.56054700911,2.2447299999999997L0.56054700911,11.257C0.56054700911,12.1852,1.314648875,12.9393,2.2427768749999997,12.9393L3.935546875,12.9393L3.935546875,11.8125Z",fill:B(n),"fill-opacity":"1"},null,8,Z0)]),z("g",null,[z("path",{d:"M4.374999875,5.2382289843750005C4.578905875,4.918308984375,4.844335875,4.644088984375,5.157226875,4.429638984375C5.099216875,4.378658984375,5.060546875,4.303078984375,5.060546875,4.218698984375C5.060546875,4.0640089843750005,5.187106875,3.937448984375,5.341796875,3.937448984375C5.480666875,3.937448984375,5.596676875,4.039408984375,5.619526875,4.172998984375C5.957026875,4.025338984375,6.329686875,3.940968984375,6.719916875,3.939208984375C6.589846875,3.297606984375,6.020316875,2.814208984375,5.341796875,2.814208984375C4.566601875,2.814208984375,3.935546875,3.445263984375,3.935546875,4.220458984375C3.935546875,4.619478984375,4.104296875,4.981588984375,4.374999875,5.2382289843750005Z",fill:B(n),"fill-opacity":"1"},null,8,K0)])])],8,W0))}}),Q0={class:"sidebar-wrapper h-full flex flex-col overflow-hidden"},J0={key:0,class:"components-wrapper flex-1 flex flex-row"},q0={class:"components-toggle flex flex-col justify-start border-r border-solid border-gray-200 dark:border-dark"},em=["onClick"],tm={key:0},nm={key:1},om={key:0,class:"tip absolute right-0 top-0 bottom-0 bg-blue-500"},im={class:"p-2"},rm={class:"px-2"},am={class:"widget-item-list"},sm=["onMousedown"],lm={class:"widget-item mx-2 flex justify-center items-center border-rd-1 bg-light dark:bg-dark"},cm=["innerHTML"],um=["src"],dm=ce({__name:"index",props:["shrinkLeft","diagramInited"],emits:["dragInNode","handleTargetChange","remoteCompRegistered","elementSelected","saveBoardAction"],setup(e,{expose:t,emit:n}){no(O=>({"393ea658":B(A)}));const a=e,v=n,{shrinkLeft:p}=xe(a),f=Y("基础"),m=Y(!0),c=Y({}),h=Y({}),i="production",o=Y(),l={基础:"basicWidgetIcon",动态:"dynamicWidgetIcon",装饰:"decorationWidgetIcon",设备:"deviceWidgetIcon",素材:"materialLib",组件:"normalWidgetIcon",大屏:"bigscreenIcon"},s=Y({}),r=async()=>{const O=await ll.getTypeList({queryType:1,type:"section"});if(O.code!==0)return ye.warning(O.msg);const N=O.data.sort((V,H)=>V==="基础"||V==="动态"&&H!=="基础"?-1:1);N.push("素材库"),N.push("历史素材"),s.value=N.map((V,H)=>({value:V,id:H,name:V,icon:l[V]||"normalWidgetIcon",category:V}))},u=Y(""),d=Y([]),g=new Map;g.set("基础","basic"),g.set("动态","dynamic"),g.set("装饰","decorations"),g.set("设备","device"),g.set("组件","widgets");const y=Y(),x=async()=>{var V;const O="production";let N=window.totalRemoteComps;if(!N){const H=await yd.getList({limit:9999,page:1,name:u.value,sectionType:"",isLocal:O!=="development",group_ids:""});if(H.code!==0)return ye.warning(H.msg);N=((V=H.data)==null?void 0:V.list)||[]}d.value.push(...N),o.value||(o.value={}),N.forEach(H=>{H.groupName==="大屏"?(h.value[H.groupName]||(h.value[H.groupName]={},c.value[H.groupName]={}),h.value[H.groupName][H.groupType]||(h.value[H.groupName][H.groupType]={},c.value[H.groupName][H.groupType]={}),h.value[H.groupName][H.groupType][H.name]=H,c.value[H.groupName][H.groupType][H.name]=H):(c.value[H.groupName]||(c.value[H.groupName]={}),c.value[H.groupName][H.groupType]||(c.value[H.groupName][H.groupType]={}),c.value[H.groupName][H.groupType][H.name]=H)}),m.value=!1,$c(N,document,g.get(f.value)).then(()=>{v("remoteCompRegistered")})},C=Ut(O=>{const N=O.target.value;if(N){const V={};Object.keys(o.value).forEach(H=>{const W=o.value[H],j=Object.keys(W).find(Z=>W[Z].aliasName.includes(N));j&&(V[H]||(V[H]={}),V[H][j]=W[j])}),o.value=V}else o.value=y.value},200),b=O=>{f.value=O.category,o.value={}};me(()=>a.diagramInited,O=>{O&&x()},{immediate:!0}),ot(async()=>{await r()});const w=le(()=>{if(o.value){const O={};o.value.常用&&(O.常用=o.value.常用);for(const N in o.value)N!=="常用"&&(O[N]=o.value[N]);return O}else return{}});me([f,c],([O,N])=>{O&&i==="development"&&N[O]?(o.value=N[O],y.value=nt(o.value),m.value=!1):(o.value=N[O],y.value=nt(o.value),m.value=!1)},{immediate:!0,deep:!0});const _=O=>{v("dragInNode",nt(O),"")},I=(O,N,V)=>{v("dragInNode",O,N,V)},E=O=>{switch(O){case"basicWidgetIcon":return _0;case"dynamicWidgetIcon":return L0;case"decorationWidgetIcon":return T0;case"deviceWidgetIcon":return N0;case"normalWidgetIcon":return B0;case"materialLib":return X0;case"bigscreenIcon":return z0;default:return""}},k=Y("#000"),A=Y("#f5f7f9");me(ht,O=>{k.value=O?"#ffffff":"#000",A.value=O?"#181818":"#f5f7f9"},{immediate:!0});const S=Y("components"),M=O=>{v("handleTargetChange",(O==null?void 0:O.target).value)},$=Y({}),L=Y([]);ot(()=>{setTimeout(()=>{Object.values(c).forEach(N=>{Object.keys(N).forEach(V=>{Object.keys(N[V]).forEach(H=>{const W=N[V][H];Object.keys(W).forEach(j=>{$.value[j]||($.value[j]=W[j],L.value.push(j))})})})})},1e3)}),me(d,O=>{O.forEach(N=>{$.value[N.name]=N})},{deep:!0});const T=O=>{v("elementSelected",O)},R=O=>{v("saveBoardAction",O)},P=Y(null),F=Y([]);return t({allLocalCompsNames:L,allRemoteComponentsList:d,totalComponents:$,layers:P}),(O,N)=>{const V=al,H=oo,W=hn,j=hr,Z=Eo,q=en;return Q(),ie("div",Q0,[D(mr,{loading:B(m)},null,8,["loading"]),z("div",{class:kt(["graph-handle-items flex items-center justify-center",{hideComponents:B(p)}])},[D(H,{value:B(S),"onUpdate:value":N[0]||(N[0]=G=>qe(S)?S.value=G:null),"button-style":"solid",onChange:M},{default:U(()=>[D(V,{value:"components"},{default:U(()=>[D(g0,{color:B(S)==="components"?"#ffffff":"#333333",width:14,height:14},null,8,["color"]),N[3]||(N[3]=z("span",{class:"ml-2"},"部件",-1))]),_:1}),D(V,{value:"layers"},{default:U(()=>[D(y0,{color:B(S)==="layers"?"#ffffff":"#333333",width:14,height:14},null,8,["color"]),N[4]||(N[4]=z("span",{class:"ml-2"},"图层",-1))]),_:1}),D(V,{value:"entities"},{default:U(()=>[D(b0,{color:B(S)==="entities"?"#ffffff":"#333333",width:14,height:14},null,8,["color"]),N[5]||(N[5]=z("span",{class:"ml-2"},"数据",-1))]),_:1})]),_:1},8,["value"])],2),B(S)==="components"?(Q(),ie("div",J0,[z("div",q0,[(Q(!0),ie(Fe,null,ct(B(s),G=>(Q(),ie("div",{key:G.id,class:kt(["component-firstClass flex flex-col justify-center items-center mb-2",{"active-menu-item":B(f)===G.category}]),onClick:K=>b(G)},[z("div",null,[(Q(),be(Zn(E(G.icon)),{width:16,height:16,color:B(f)===G.category?"#3b82f6":B(k)},null,8,["color"])),G.name!=="历史素材"?(Q(),ie("p",tm,xt(G.name),1)):(Q(),ie("div",nm,N[6]||(N[6]=[z("p",null,"历史",-1),z("p",null,"素材",-1)])))]),D(or,{name:"slide-up"},{default:U(()=>[B(f)===G.category?(Q(),ie("span",om)):Pe("",!0)]),_:2},1024)],10,em))),128))]),B(f)!=="素材库"&&B(f)!=="历史素材"&&B(f)!=="大屏"?(Q(),ie("div",{key:0,class:kt(["components-list overflow-auto",{shrinkLeft:B(p)}])},[z("div",im,[D(W,{value:B(u),"onUpdate:value":N[1]||(N[1]=G=>qe(u)?u.value=G:null),placeholder:"搜索部件名称",onChange:B(C)},{prefix:U(()=>[D(sl,{width:16,height:16,color:B(k)},null,8,["color"])]),_:1},8,["value","onChange"])]),D(j,{spinning:B(m)},null,8,["spinning"]),(Q(!0),ie(Fe,null,ct(B(w),(G,K)=>(Q(),ie("div",{key:K},[z("div",rm,[D(Z,{class:"businessType-name"},{default:U(()=>[ve(xt(K),1)]),_:2},1024)]),z("div",am,[(Q(!0),ie(Fe,null,ct(G,(ee,te)=>(Q(),ie("div",{key:te,class:"widget-col flex justify-center items-center cursor-grab overflow-hidden"},[z("div",{class:"w-full widget-item-box",onMousedown:ae=>{ae.preventDefault(),_(ee)}},[D(q,null,{title:U(()=>[ve(xt(ee.aliasName),1)]),default:U(()=>[z("div",lm,[ee.image.includes("<svg")?(Q(),ie("span",{key:0,class:"svg-node",innerHTML:ee.image},null,8,cm)):(Q(),ie("img",{key:1,src:ee.image||"./defaultPic.svg"},null,8,um))])]),_:2},1024)],40,sm)]))),128))])]))),128))],2)):B(f)==="素材库"?(Q(),be(e0,{key:1,modelValue:B(F),"onUpdate:modelValue":N[2]||(N[2]=G=>qe(F)?F.value=G:null),"shrink-left":B(p),onDragMaterial:I},null,8,["modelValue","shrink-left"])):B(f)==="历史素材"?(Q(),be(i0,{key:2,"shrink-left":B(p),onDragMaterial:I},null,8,["shrink-left"])):B(f)==="大屏"?(Q(),be(h0,{key:3,list:B(h).大屏,onDragComp:_},null,8,["list"])):Pe("",!0)])):Pe("",!0),B(S)==="layers"?(Q(),ie("div",{key:1,class:kt(["layers relative flex flex-col h-full bg-[#f5f7f9] dark:bg-dark",{shrinkLeft:B(p)}])},[D(qg,{ref_key:"layers",ref:P,onSelectElement:T},null,512)],2)):Pe("",!0),B(S)==="entities"?(Q(),ie("div",{key:2,class:kt(["entities flex h-full bg-[#f5f7f9] dark:bg-dark overflow-auto",{shrinkLeft:B(p)}])},[D(z1,{onDataSourceAction:R})],2)):Pe("",!0)])}}});const hm=it(dm,[["__scopeId","data-v-341d637e"]]),so=(e,t)=>(t.backgroundColor&&(e.fill=t.backgroundColor),t.gradientColor&&e.fill!==t.gradientColor&&(e.fillGradient=t.gradientColor),t.borderColor&&(e.stroke=t.borderColor),t.borderWidth&&(e.strokeWidth=t.borderWidth),t.strokeLineCap&&(e.strokeLineCap=t.strokeLineCap,e.strokeLinecap=t.strokeLineCap),t.borderStyle&&(t.borderStyle==="solid"&&(e.strokeDashArray="0",e.strokeDasharray="0"),t.borderStyle==="dashed"&&(e.strokeDashArray=`${t.strokeDashWidth},${t.strokeDashSpace}`,e.strokeDasharray=`${t.strokeDashWidth},${t.strokeDashSpace}`),t.borderStyle==="dotted"&&(e.strokeDashArray=`${t.strokeDashWidth},${t.strokeDashSpace}`,e.strokeDasharray=`${t.strokeDashWidth},${t.strokeDashSpace}`),t.borderStyle==="hidden"&&(e.stroke=e.fill)),t.strokeDashoffset&&(e.strokeDashoffset=t.strokeDashoffset),e),lo=(e,t)=>(t.fontColor&&(e.color=t.fontColor),t.backgroundColor&&(e.background.fill=t.backgroundColor),t.fontSize&&(e.fontSize=t.fontSize),t.fontFamily&&(e.fontFamily=t.fontFamily),t.lineHeight&&(e.lineHeight=t.lineHeight),t.textAlign&&(e.textAlign=t.textAlign),t.fontWeight&&(e.fontWeight=t.fontWeight),t.textDecoration&&(e.textDecoration=t.textDecoration),t.fontStyle&&(e.fontStyle=t.fontStyle),e),{PolylineEdge:fm,PolylineEdgeModel:pm}=window;class gm extends fm{getEndArrow(){const t=window.h,{model:n,graphModel:a}=this.props,{id:v,properties:{arrowType:p,borderColor:f}}=n,{stroke:m,strokeWidth:c}=n.getArrowStyle(),h={stroke:m,strokeWidth:c};return p==="empty"?t("path",{...h,fill:"#FFF",d:"M 0 0 -10 -5 -10 5 z"}):p==="half"?t("path",{...h,d:"M 0 0 -10 5"}):p==="none"?t("path",{...h,d:""}):t("path",{...h,fill:f,d:"M 0 0 -10 -5 -10 5 z"})}}let mm=class extends pm{constructor(t,n){super(t,n),this.strokeWidth=1}getEdgeAnimationStyle(){const t=super.getEdgeAnimationStyle(),{borderColor:n,strokeDashWidth:a,strokeDashWidth2:v,strokeDashSpace:p,animationName:f,animationDuration:m,animationReverse:c}=this.properties;return t.stroke=n,t.strokeDashoffset="",t.strokeDasharray=`${a},${p},${v}`,t.animationName=f||"lf_animate_dash",t.animationDuration=m||"20s",t.animationDirection=c?"reverse":"",t}setAttributes(){const{defaultValue:t,min:n,max:a,animationStyle:v}=this.properties;if(t){const p=window.resolveScadaNewValue(t),f=n<a?n:a,m=a>n?a:n;p>=f&&p<=m?v==="waterPoint"?this.isAnimation=!1:this.isAnimation=!0:this.isAnimation=!1}else this.isAnimation=this.properties.isAnimation||!1}getTextStyle(){const t=super.getTextStyle();return lo(t,this.properties)}getEdgeStyle(){const t=super.getEdgeStyle(),n=this.properties;return{...so(t,n),fill:"none",class:n.isCustomHelperLine?"customHelperLine":""}}};const vm={type:"pro-polyline",view:gm,model:mm},{PurePolylineEdge:ym,PurePolylineEdgeModel:wm}=window;class bm extends ym{constructor(){super(),this.textRef=null}getText(){return null}getEndArrow(){const t=window.h,{model:n,graphModel:a}=this.props,{id:v,properties:{arrowType:p,borderColor:f}}=n,{stroke:m,strokeWidth:c}=n.getArrowStyle(),h={stroke:m,strokeWidth:c};return p==="empty"?t("path",{...h,fill:"#FFF",d:"M 0 0 -10 -5 -10 5 z"}):p==="half"?t("path",{...h,d:"M 0 0 -10 5"}):p==="none"?t("path",{...h,d:""}):t("path",{...h,fill:f,d:"M 0 0 -10 -5 -10 5 z"})}}class Cm extends wm{constructor(t,n){super(t,n),this.strokeWidth=1,this.offset=20,this.isShowAdjustPoint=!1,this.modelType="pure-polyline-edge"}getEdgeAnimationStyle(){const t=super.getEdgeAnimationStyle(),{borderColor:n,strokeDashWidth:a,strokeDashWidth2:v,strokeDashSpace:p,animationName:f,animationDuration:m,animationReverse:c}=this.properties;return t.stroke=n,t.strokeDashoffset="",t.strokeDasharray=`${a},${p},${v}`,t.animationName=f||"lf_animate_dash",t.animationDuration=m||"20s",t.animationDirection=c?"reverse":"",t}setAttributes(){const{defaultValue:t,min:n,max:a,animationStyle:v}=this.properties;if(t){const p=window.resolveScadaNewValue(t),f=n<a?n:a,m=a>n?a:n;p>=f&&p<=m?v==="waterPoint"?this.isAnimation=!1:this.isAnimation=!0:this.isAnimation=!1}else this.isAnimation=this.properties.isAnimation||!1}getTextStyle(){const t=super.getTextStyle();return lo(t,this.properties)}getEdgeStyle(){const t=super.getEdgeStyle(),n=this.properties;return{...so(t,n),fill:"none",class:n.isCustomHelperLine?"customHelperLine":""}}}const xm={type:"pure-polyline",view:bm,model:Cm},{PureCurvedPolylineEdge:$m,PureCurvedPolylineEdgeModel:Sm}=window;class km extends $m{constructor(){super(),this.textRef=null}getText(){return null}getEndArrow(){const t=window.h,{model:n,graphModel:a}=this.props,{id:v,properties:{arrowType:p,borderColor:f}}=n,{stroke:m,strokeWidth:c}=n.getArrowStyle(),h={stroke:m,strokeWidth:c};return p==="empty"?t("path",{...h,fill:"#FFF",d:"M 0 0 -10 -5 -10 5 z"}):p==="half"?t("path",{...h,d:"M 0 0 -10 5"}):p==="none"?t("path",{...h,d:""}):t("path",{...h,fill:f,d:"M 0 0 -10 -5 -10 5 z"})}}class _m extends Sm{constructor(t,n){super(t,n),this.strokeWidth=1,this.isShowAdjustPoint=!1,this.modelType="pure-curved-polyline-edge",this.isCurved=!1}getEdgeAnimationStyle(){const t=super.getEdgeAnimationStyle(),{borderColor:n,strokeDashWidth:a,strokeDashWidth2:v,strokeDashSpace:p,animationName:f,animationDuration:m,animationReverse:c}=this.properties;return t.stroke=n,t.strokeDashoffset="",t.strokeDasharray=`${a},${p},${v}`,t.animationName=f||"lf_animate_dash",t.animationDuration=m||"20s",t.animationDirection=c?"reverse":"",t}setAttributes(){const{defaultValue:t,min:n,max:a,animationStyle:v}=this.properties;if(t){const p=window.resolveScadaNewValue(t),f=n<a?n:a,m=a>n?a:n;p>=f&&p<=m?v==="waterPoint"?this.isAnimation=!1:this.isAnimation=!0:this.isAnimation=!1}else this.isAnimation=this.properties.isAnimation||!1}getTextStyle(){const t=super.getTextStyle();return lo(t,this.properties)}getEdgeStyle(){const t=super.getEdgeStyle(),n=this.properties;return{stroke:"#FFB243",...so(t,n),fill:"none",class:n.isCustomHelperLine?"customHelperLine":""}}}const Mm={type:"pure-curved-polyline",view:km,model:_m},{LineEdge:Am,LineEdgeModel:Lm}=window;class Em extends Am{getEndArrow(){const t=window.h,{model:n,graphModel:a}=this.props,{id:v,properties:{arrowType:p,borderColor:f}}=n,{stroke:m,strokeWidth:c}=n.getArrowStyle(),h={stroke:m,strokeWidth:c};return p==="empty"?t("path",{...h,fill:"#FFF",d:"M 0 0 -10 -5 -10 5 z"}):p==="half"?t("path",{...h,d:"M 0 0 -10 5"}):p==="none"?t("path",{...h,d:""}):t("path",{...h,fill:f,d:"M 0 0 -10 -5 -10 5 z"})}}let Im=class extends Lm{constructor(t,n){super(t,n),this.strokeWidth=1}getEdgeAnimationStyle(){const t=super.getEdgeAnimationStyle(),{borderColor:n,strokeDashWidth:a,strokeDashWidth2:v,strokeDashSpace:p,animationName:f,animationDuration:m,animationReverse:c}=this.properties;return t.stroke=n,t.strokeDashoffset="",t.strokeDasharray=`${a},${p},${v}`,t.animationName=f||"lf_animate_dash",t.animationDuration=m||"20s",t.animationDirection=c?"reverse":"",t}setAttributes(){const{defaultValue:t,min:n,max:a,animationStyle:v}=this.properties;if(t){const p=window.resolveScadaNewValue(t),f=n<a?n:a,m=a>n?a:n;p>=f&&p<=m?v==="waterPoint"?this.isAnimation=!1:this.isAnimation=!0:this.isAnimation=!1}else this.isAnimation=this.properties.isAnimation||!1}getTextStyle(){const t=super.getTextStyle();return lo(t,this.properties)}getEdgeStyle(){const t=super.getEdgeStyle(),n=this.properties;return{...so(t,n),fill:"none"}}};const Tm={type:"pro-line",view:Em,model:Im},{BezierEdge:Dm,BezierEdgeModel:Rm}=window;class Pm extends Dm{getEndArrow(){const t=window.h,{model:n,graphModel:a}=this.props,{id:v,properties:{arrowType:p,borderColor:f}}=n,{stroke:m,strokeWidth:c}=n.getArrowStyle(),h={stroke:m,strokeWidth:c};return p==="empty"?t("path",{...h,fill:"#FFF",d:"M 0 0 -10 -5 -10 5 z"}):p==="half"?t("path",{...h,d:"M 0 0 -10 5"}):p==="none"?t("path",{...h,d:""}):t("path",{...h,fill:f,d:"M 0 0 -10 -5 -10 5 z"})}}let Nm=class extends Rm{constructor(t,n){super(t,n),this.strokeWidth=1}getEdgeAnimationStyle(){const t=super.getEdgeAnimationStyle(),{borderColor:n,strokeDashWidth:a,strokeDashWidth2:v,strokeDashSpace:p,animationName:f,animationDuration:m,animationReverse:c}=this.properties;return t.stroke=n,t.strokeDashoffset="",t.strokeDasharray=`${a},${p},${v}`,t.animationName=f||"lf_animate_dash",t.animationDuration=m||"20s",t.animationDirection=c?"reverse":"",t}setAttributes(){const{defaultValue:t,min:n,max:a,animationStyle:v}=this.properties;if(t){const p=window.resolveScadaNewValue(t),f=n<a?n:a,m=a>n?a:n;p>=f&&p<=m?v==="waterPoint"?this.isAnimation=!1:this.isAnimation=!0:this.isAnimation=!1}else this.isAnimation=this.properties.isAnimation||!1}getTextStyle(){const t=super.getTextStyle();return lo(t,this.properties)}getEdgeStyle(){const t=super.getEdgeStyle(),n=this.properties;return{...so(t,n),fill:"none"}}};const Om={type:"pro-bezier",view:Pm,model:Nm},{CurvedEdge:Bm,CurvedEdgeModel:Fm}=window;class Hm extends Bm{getEndArrow(){const t=window.h,{model:n,graphModel:a}=this.props,{id:v,properties:{arrowType:p,borderColor:f}}=n,{stroke:m,strokeWidth:c}=n.getArrowStyle(),h={stroke:m,strokeWidth:c};return p==="empty"?t("path",{...h,fill:"#FFF",d:"M 0 0 -10 -5 -10 5 z"}):p==="half"?t("path",{...h,d:"M 0 0 -10 5"}):p==="none"?t("path",{...h,d:""}):t("path",{...h,fill:f,d:"M 0 0 -10 -5 -10 5 z"})}}class zm extends Fm{constructor(t,n){super(t,n),this.strokeWidth=1}getEdgeAnimationStyle(){const t=super.getEdgeAnimationStyle(),{borderColor:n,strokeDashWidth:a,strokeDashWidth2:v,strokeDashSpace:p,animationName:f,animationDuration:m,animationReverse:c}=this.properties;return t.stroke=n,t.strokeDashoffset="",t.strokeDasharray=`${a},${p},${v}`,t.animationName=f||"lf_animate_dash",t.animationDuration=m||"20s",t.animationDirection=c?"reverse":"",t}setAttributes(){this.radius=this.properties.radius||5;const{defaultValue:t,min:n,max:a,animationStyle:v}=this.properties;if(t){const p=window.resolveScadaNewValue(t),f=n<a?n:a,m=a>n?a:n;p>=f&&p<=m?v==="waterPoint"?this.isAnimation=!1:this.isAnimation=!0:this.isAnimation=!1}else this.isAnimation=this.properties.isAnimation||!1}getTextStyle(){const t=super.getTextStyle();return lo(t,this.properties)}getEdgeStyle(){const t=super.getEdgeStyle(),n=this.properties;return{...so(t,n),fill:"none"}}}const Wm={type:"pro-curved-edge",view:Hm,model:zm},Vm=e=>{e.register(vm),e.register(xm),e.register(Mm),e.register(Tm),e.register(Om),e.register(Wm)},jm={class:"flex items-center mr-2"},Um={class:"mr-1"},Gm=ce({__name:"PlusMinus",props:["modelValue","title"],emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,v=Y(0);me(()=>n.modelValue,m=>{v.value=m},{immediate:!0});const p=()=>{v.value<=0||(v.value-=1,a("update:modelValue",v.value))},f=()=>{v.value+=1,a("update:modelValue",v.value)};return(m,c)=>{const h=ro;return Q(),ie("div",jm,[z("span",Um,xt(n.title)+":",1),D(h,{value:B(v),"onUpdate:value":c[0]||(c[0]=i=>qe(v)?v.value=i:null),controls:!1,min:0,precision:0,size:"small",style:{width:"90px"},class:"inputNumberTool",onChange:c[1]||(c[1]=i=>a("update:modelValue",i))},{addonAfter:U(()=>[z("div",{class:"flex items-center",style:{width:"30px"}},[z("div",{class:"flex-1 flex justify-center border-r border-r-gray-2 dark:border-r-dark-1 cursor-pointer",onClick:p}," - "),z("div",{class:"flex-1 flex justify-center cursor-pointer",onClick:f}," + ")])]),_:1},8,["value"])])}}});const Fo=it(Gm,[["__scopeId","data-v-6a5496c7"]]),Ym=["width","height","fill"],Zm=ce({__name:"selectionBatchIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v),fill:B(n)},f[0]||(f[0]=[z("path",{d:"M429.8 890.7h-77.2v-38.2h77.2v38.2z m-154.4 0h-77.2v-38.2h77.2v38.2zM121 890.7H63.7v-57.2h38.2v19.1H121zM101.9 756.3H63.7v-77.2h38.2v77.2z m0-154.4H63.7v-77.2h38.2v77.2z m0-154.4H63.7v-77.2h38.2v77.2z m0-154.4H63.7v-77.2h38.2v77.2zM101.9 138.7H63.7V81.5H121v38.2h-19.1zM738.5 119.7h-77.2V81.5h77.2v38.2z m-154.4 0H507V81.5h77.2v38.2z m-154.3 0h-77.2V81.5h77.2v38.2z m-154.4 0h-77.2V81.5h77.2v38.2zM873 138.7h-38.2v-19h-19.1V81.5H873zM873 447.5h-38.2v-77.2H873v77.2z m0-154.4h-38.2v-77.2H873v77.2z","p-id":"2396"},null,-1),z("path",{d:"M835.2 947.1c-0.8 0-1.5 0-2.3-0.1-4.7-0.6-9.1-3.1-12-6.8l-128.5-166-58.8 45.5c-4.8 3.7-11.2 4.8-17 2.8-5.8-2-10.1-6.8-11.6-12.7L523.1 476c-1.7-6.9 0.8-14.2 6.5-18.6 5.6-4.4 13.3-5 19.6-1.6L852 618.5c5.4 2.9 8.9 8.3 9.4 14.4s-2.1 12-6.9 15.7l-58.8 45.5 128.5 166c6.1 7.9 4.7 19.2-3.2 25.3l-74.7 57.9c-3.2 2.5-7.1 3.8-11.1 3.8zM695.7 730.8c5.4 0 10.7 2.4 14.3 7l128.5 166 46.2-35.8-128.5-166c-2.9-3.8-4.2-8.6-3.6-13.3s3.1-9.1 6.8-12l51.1-39.6-242.6-130.5 65.6 267.5 51.1-39.6c3.3-2.5 7.2-3.7 11.1-3.7z","p-id":"2397"},null,-1)]),8,Ym))}}),Km=["width","height"],Xm=["fill"],Qm=ce({__name:"scaleOneByOne",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M316.2 270.9h108.1c17.7 0 32-14.3 32-32s-14.3-32-32-32H266.4c-32.8 0-59.5 26.7-59.5 59.4v157.9c0 17.7 14.3 32 32 32s32-14.3 32-32v-108l158.2 158.2c6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4c12.5-12.5 12.5-32.8 0-45.2L316.2 270.9zM785.1 567.7c-17.7 0-32 14.3-32 32v108.1L594.9 549.7c-12.5-12.5-32.8-12.5-45.2 0s-12.5 32.8 0 45.2L707.8 753H599.7c-17.7 0-32 14.3-32 32s14.3 32 32 32h157.9c32.8 0 59.5-26.7 59.5-59.4V599.7c0-17.7-14.3-32-32-32z",fill:B(n)},null,8,Xm)],8,Km))}}),Jm=["width","height"],qm=["fill"],hs=ce({__name:"fullscreenIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1699842897634",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:B(a),height:B(v)},[z("path",{d:"M641.750109 384.100028l205.227128-204.519-0.704035 115.89966c-0.282433 9.611915 7.489578 18.09103 17.101493 17.808598l12.297071 0c9.611915-0.283456 17.667382-5.936199 17.808598-15.689331l0.565888-172.57752c0-0.14224 0.282433-9.187243 0.282433-9.187243 0.14224-4.804423-0.99056-9.187243-4.100388-12.297071-3.109828-3.109828-7.347339-5.086855-12.297071-4.946662l-8.763594 0.14224c-0.141216 0-0.278339 0-0.420579 0.14224L697.581696 98.166787c-9.611915 0.283456-17.667382 8.200776-17.808598 17.950837l0 12.297071c1.416256 11.44875 10.458189 18.092054 20.070104 17.808598l112.789832 0.283456-204.66124 203.814965c-9.329483 9.329483-9.329483 24.449855 0 33.778314 9.329483 9.470699 24.452925 9.470699 33.782408 0L641.750109 384.100028zM383.095141 576.889893 177.726797 780.705881l0.707105-115.338888c0.283456-9.607822-7.492648-18.086937-17.104563-17.808598l-13.001105 0c-9.611915 0.283456-17.667382 5.937223-17.808598 15.690354l-0.565888 172.718737c0 0.14224-0.282433 9.187243-0.282433 9.187243-0.14224 4.808516 0.99056 9.187243 4.096295 12.297071 3.109828 3.109828 7.351432 5.086855 12.297071 4.946662l8.762571-0.14224c0.14224 0 0.283456 0 0.425695-0.14224l171.873486 0.708128c9.607822-0.283456 17.667382-8.196683 17.808598-17.950837L344.93503 832.575226c-1.415232-11.44875-10.461259-18.092054-20.074198-17.808598L212.069977 814.483172 416.59 610.671277c9.329483-9.329483 9.329483-24.453948 0-33.782408C407.40685 567.41817 392.424624 567.41817 383.095141 576.889893L383.095141 576.889893zM894.047276 835.967486l-0.424672-172.718737c-0.283456-9.612938-8.200776-15.406898-17.809621-15.690354l-12.296047 0c-9.612938-0.278339-17.243733 8.200776-17.105586 17.808598l0.708128 115.903753L641.750109 576.889893c-9.329483-9.329483-24.452925-9.329483-33.782408 0-9.325389 9.328459-9.325389 24.452925 0 33.782408L812.490795 814.483172l-112.789832 0.283456c-9.611915-0.283456-18.515702 6.502088-20.073174 17.808598l0 12.297071c0.282433 9.611915 8.200776 17.667382 17.808598 17.950837l171.166381-0.708128c0.141216 0 0.282433 0.14224 0.424672 0.14224l8.763594 0.14224c4.803399 0.141216 9.187243-1.694595 12.296047-4.946662 3.109828-3.109828 4.238534-7.488555 4.097318-12.297071 0 0-0.14224-9.046027-0.14224-9.187243L894.047276 835.968509zM212.216309 146.506748l112.789832-0.283456c9.607822 0.283456 18.512632-6.502088 20.070104-17.808598L345.076246 116.116601c-0.283456-9.611915-8.196683-17.667382-17.808598-17.950837l-172.011632 0.708128c-0.14224 0-0.283456-0.14224-0.425695-0.14224l-8.761548-0.14224c-4.808516-0.141216-9.187243 1.694595-12.297071 4.946662-3.109828 3.109828-4.242627 7.488555-4.096295 12.297071 0 0 0.282433 9.046027 0.282433 9.187243l0.420579 172.718737c0.14224 9.608845 8.200776 15.406898 17.808598 15.686261l13.005198 0c9.611915 0.282433 17.242709-8.196683 17.10047-17.808598l-0.564865-115.334795 205.231221 203.958228c9.324366 9.329483 24.448832 9.329483 33.777291 0 9.329483-9.329483 9.329483-24.452925 0-33.782408L212.216309 146.506748 212.216309 146.506748zM212.216309 146.506748",fill:B(n)},null,8,qm)],8,Jm))}}),ev=["width","height"],tv=["fill"],nv=ce({__name:"pathIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 17.874998092651367 17.900999069213867"},[z("g",null,[z("path",{d:"M0.806,17.901C0.598,17.901,0.39,17.823,0.234,17.667C-0.0780002,17.355,-0.0780002,16.835,0.234,16.523L16.497,0.234C16.809,-0.0780002,17.329,-0.0780002,17.641,0.234C17.953,0.546,17.953,1.066,17.641,1.378L1.378,17.654C1.222,17.81,1.014,17.901,0.806,17.901Z",fill:B(n),"fill-opacity":"1"},null,8,tv)])],8,ev))}}),ov=["fill","width","height"],iv=ce({__name:"connectLines",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:B(n),width:B(a),height:B(v)},f[0]||(f[0]=[z("path",{d:"M819.06346667 256.3072a85.33333333 85.33333333 0 0 0-47.44533334 156.2624l-129.46773333 224.256a84.992 84.992 0 0 0-27.88693333-5.0176 84.30933333 84.30933333 0 0 0-20.8896 2.8672L448.85333333 384.34133333c7.33866667-12.5952 11.84426667-27.0336 11.84426667-42.66666666a85.33333333 85.33333333 0 1 0-146.09066667 59.83573333L181.00906667 632.832c-3.4816-0.44373333-6.8608-1.05813333-10.4448-1.05813333a85.33333333 85.33333333 0 1 0 47.44533333 14.4384l129.46773333-224.29013334c8.77226667 3.03786667 18.05653333 5.05173333 27.8528 5.05173334 16.82773333 0 32.42666667-5.0176 45.63626667-13.48266667l138.0352 239.03573333a84.85546667 84.85546667 0 0 0-30.07146667 64.58026667 85.33333333 85.33333333 0 1 0 146.09066667-59.8016l133.59786667-231.38986667c3.4816 0.4096 6.8608 1.05813333 10.4448 1.05813334a85.33333333 85.33333333 0 1 0 0-170.66666667z"},null,-1)]),8,ov))}}),rv=["width","height"],av=["fill"],sv=ce({__name:"curvedEdgeIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M400.096 831.936a80 80 0 0 0 79.808-74.752l0.192-5.248V272.256a48 48 0 0 1 43.36-47.808l4.64-0.224H895.36v-32H528.096a80 80 0 0 0-79.84 74.752l-0.16 5.248v479.712a48 48 0 0 1-43.392 47.776l-4.608 0.224H96.704v32h303.36z",fill:B(n),"p-id":"4260"},null,8,av)],8,rv))}}),lv=["width","height"],cv=["fill"],uv=ce({__name:"polylineIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M640 672a32 32 0 0 1-22.72-9.28L384 429.12l-233.28 233.6a32 32 0 0 1-45.44-45.44l256-256a32 32 0 0 1 45.44 0l233.28 233.6 233.28-233.6a32 32 0 0 1 45.44 45.44l-256 256A32 32 0 0 1 640 672z",fill:B(n)},null,8,cv)],8,lv))}}),dv=["width","height"],hv=["fill"],fv=ce({__name:"bezierIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M310.1 863.9c-124 0-218-4.2-219.3-4.3-12.7-0.6-22.5-11.3-21.9-24 0.6-12.7 11.5-22.6 24-21.9 193.3 8.8 714.8 12.7 805.6-74.1 8.5-8.1 9.5-14.1 9.5-18 0-15-16.7-48.1-128.7-101.8C696.2 580.2 586.1 541 479.6 503 241.6 418 107 366.7 107 300.4c0-43.3 43.6-96.5 383.5-123.4 180-14.3 362.3-14.4 364.1-14.4 12.7 0 22.9 10.3 22.9 22.9s-10.3 22.9-22.9 22.9c-1.8 0-182.5 0.2-360.7 14.3-337.1 26.8-341 77.2-341 77.7 0 0.9 1.1 21.4 96 64.9 65.3 29.9 153.2 61.3 246.2 94.5 277.1 98.9 458.8 170.6 458.8 262.1 0 18.9-8 36.1-23.7 51.1-53.8 51.4-207.7 80.4-470.5 88.7-52 1.6-102.9 2.2-149.6 2.2z",fill:B(n)},null,8,hv)],8,dv))}}),pv=["width","height"],gv=["fill"],mv=ce({__name:"textIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 15.932332038879395 18.8291072845459"},[z("g",null,[z("path",{d:"M12.5431,18.8291L3.3885,18.8291L3.3885,18.0499C3.78969,17.9062,4.19709,17.7806,4.60949,17.6733C5.02083,17.5647,5.46405,17.4763,5.93985,17.4032L5.93985,1.39843L2.46805,1.39843L1.01458,5.24608L0.329509,5.24608C0.274475,4.88761,0.228855,4.47842,0.191914,4.02145C0.154991,3.56595,0.123842,3.09956,0.0955984,2.62232C0.0673547,2.15012,0.0456203,1.68087,0.028244,1.22534C0.00939634,0.769824,0,0.359206,0,0L15.9323,0C15.9323,0.359206,15.9222,0.764013,15.9041,1.21086C15.8853,1.65915,15.8621,2.12118,15.8338,2.59625C15.8056,3.07131,15.7795,3.5377,15.7513,3.99537C15.7238,4.45237,15.6825,4.87095,15.6267,5.24681L14.9054,5.24681L13.4643,1.39916L10.02,1.39916L10.02,17.4046C10.495,17.4951,10.9397,17.5842,11.3496,17.6747C11.7617,17.7638,12.1585,17.8884,12.5431,18.0513L12.5431,18.8291Z",fill:B(n),"fill-opacity":"1"},null,8,gv)])],8,pv))}}),vv=["width","height"],yv=["fill"],wv=["fill"],bv=ce({__name:"inputTextIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:B(a),height:B(v)},[z("path",{d:"M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z",fill:B(n)},null,8,yv),z("path",{d:"M360.96 398.336h113.152v265.216h-37.888v37.888h151.552v-37.888h-37.888V398.336h113.152v38.4h38.4V322.56H322.56v114.176h38.4z",fill:B(n)},null,8,wv)],8,vv))}}),Cv=["width","height"],xv=["fill"],$v=ce({__name:"flipIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 18.864442825317383 17.33333396911621"},[z("g",null,[z("path",{d:"M0,17.3333L8.66667,17.3333L8.66667,0L7.67,0L0,16.3078L0,17.3333ZM11.6422,4.33333L17.0733,15.8889L11.6422,15.8889L11.6422,4.33333ZM11.1944,0L10.1978,0L10.1978,17.3333L18.8644,17.3333L18.8644,16.3078L11.1944,0Z",fill:B(n),"fill-opacity":"1"},null,8,xv)])],8,Cv))}}),Sv=["width","height"],kv=["fill"],_v=ce({__name:"flipVerticalIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M170.666667 140.515556v341.333333h682.666666v-39.253333L211.057778 140.515556H170.666667zM682.666667 599.04l-455.111111 213.902222v-213.902222h455.111111m170.666666-56.888889H170.666667v341.333333h40.391111L853.333333 581.404444v-39.253333z",fill:B(n)},null,8,kv)],8,Sv))}}),Mv=["width","height"],Av={"clip-path":"url(#master_svg0_106_12892)"},Lv=["fill"],Ev=["fill"],Iv=ce({__name:"flipLeftIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 26 26"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12892"},[z("rect",{x:"0",y:"0",width:"26",height:"26",rx:"0"})])],-1)),z("g",Av,[z("g",null,[z("path",{d:"M13.0000244140625,5.85L13.0000244140625,3.25L7.1500244140625,6.5L13.0000244140625,9.75L13.0000244140625,7.15C17.2900244140625,7.15,20.8000244140625,10.4,20.8000244140625,14.43L20.8000244140625,17.55L22.1000244140625,17.55L22.1000244140625,14.43C22.1000244140625,9.684999999999999,18.0050244140625,5.85,13.0000244140625,5.85Z",fill:B(n),"fill-opacity":"1"},null,8,Lv)]),z("g",null,[z("path",{d:"M15.6000244140625,12.35009765625L5.2000244140625,12.35009765625C4.4850244140625,12.35009765625,3.9000244140625,12.93509765625,3.9000244140625,13.65009765625L3.9000244140625,21.45009765625C3.9000244140625,22.165097656249998,4.4850244140625,22.75009765625,5.2000244140625,22.75009765625L15.6000244140625,22.75009765625C16.3150244140625,22.75009765625,16.9000244140625,22.165097656249998,16.9000244140625,21.45009765625L16.9000244140625,13.65009765625C16.9000244140625,12.93509765625,16.3150244140625,12.35009688139,15.6000244140625,12.35009765625ZM15.6000244140625,21.45009765625L5.2000244140625,21.45009765625L5.2000244140625,13.65009765625L15.6000244140625,13.65009765625L15.6000244140625,21.45009765625Z",fill:B(n),"fill-opacity":"1"},null,8,Ev)])])],8,Mv))}}),Tv=["width","height"],Dv={"clip-path":"url(#master_svg0_106_12884)"},Rv=["fill"],Pv=["fill"],Nv=ce({__name:"flipRightIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 26 26"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12884"},[z("rect",{x:"0",y:"0",width:"26",height:"26",rx:"0"})])],-1)),z("g",Dv,[z("g",null,[z("path",{d:"M13.0000244140625,5.85L13.0000244140625,3.25L18.8500244140625,6.5L13.0000244140625,9.75L13.0000244140625,7.15C8.710024414062499,7.15,5.2000244140625,10.4,5.2000244140625,14.43L5.2000244140625,17.55L3.9000244140625,17.55L3.9000244140625,14.43C3.9000244140625,9.684999999999999,7.9950244140625,5.85,13.0000244140625,5.85Z",fill:B(n),"fill-opacity":"1"},null,8,Rv)]),z("g",null,[z("path",{d:"M9.0999755859375,13.65009765625L9.0999755859375,21.45009765625C9.0999755859375,22.165097656249998,9.6849755859375,22.75009765625,10.3999755859375,22.75009765625L20.7999755859375,22.75009765625C21.5149755859375,22.75009765625,22.0999755859375,22.165097656249998,22.0999755859375,21.45009765625L22.0999755859375,13.65009765625C22.0999755859375,12.93509765625,21.5149755859375,12.35009765625,20.7999755859375,12.35009765625L10.3999755859375,12.35009765625C9.6849755859375,12.35009765625,9.0999755859375,12.93509765625,9.0999755859375,13.65009765625ZM10.3999755859375,13.65009765625L20.7999755859375,13.65009765625L20.7999755859375,21.45009765625L10.3999755859375,21.45009765625L10.3999755859375,13.65009765625Z",fill:B(n),"fill-opacity":"1"},null,8,Pv)])])],8,Tv))}}),Ov=["width","height"],Bv={"clip-path":"url(#master_svg0_106_12895)"},Fv=["fill"],Hv=["fill"],zv=ce({__name:"moveTopIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12895"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",Bv,[z("g",null,[z("path",{d:"M11.82811640625,3.3779296875L2.23681640625,3.3779296875C1.8226754062500001,3.3779296875,1.48681640625,3.7137896875,1.48681640625,4.1279296875C1.48681640625,4.5420696875,1.8226754062500001,4.8779296875,2.23681640625,4.8779296875L11.82791640625,4.8779296875C12.24201640625,4.8779296875,12.57791640625,4.5420696875,12.57791640625,4.1279296875C12.57791640625,3.7137896875,12.24231640625,3.3779296875,11.82811640625,3.3779296875ZM11.83981640625,11.030739687499999L2.23681640625,11.030739687499999C1.8226754062500001,11.030739687499999,1.48681640625,11.366599687499999,1.48681640625,11.7807496875C1.48681640625,12.1948796875,1.8226754062500001,12.5307496875,2.23681640625,12.5307496875L11.83981640625,12.5307496875C12.25401640625,12.5307496875,12.58991640625,12.1948796875,12.58991640625,11.7807496875C12.58991640625,11.366599687499999,12.25401640625,11.030739687499999,11.83981640625,11.030739687499999ZM11.83981640625,18.7306296875L2.2485354062500003,18.7306296875C1.83439440625,18.7306296875,1.49853520625,19.0665296875,1.49853520625,19.4806296875C1.49853520625,19.8948296875,1.83439440625,20.2306296875,2.2485354062500003,20.2306296875L11.83961640625,20.2306296875C12.25381640625,20.2306296875,12.58961640625,19.8948296875,12.58961640625,19.4806296875C12.58991640625,19.0663296875,12.25401640625,18.7306296875,11.83981640625,18.7306296875ZM18.50381640625,4.8270696875C18.08971640625,4.8270696875,17.75381640625,5.1629296875,17.75381640625,5.5770696875L17.75381640625,19.9963296875C17.75381640625,20.4104296875,18.08971640625,20.7463296875,18.50381640625,20.7463296875C18.91801640625,20.7463296875,19.25381640625,20.4104296875,19.25381640625,19.9963296875L19.25381640625,5.5770696875C19.25381640625,5.1629296875,18.91801640625,4.8270696875,18.50381640625,4.8270696875Z",fill:B(n),"fill-opacity":"1"},null,8,Fv)]),z("g",null,[z("path",{d:"M18.874313359375,2.9974225L22.208533359375,6.600467500000001C22.530793359375,6.9487475,22.534783359374998,7.5175775,22.216973359375,7.8712475C21.899393359375,8.2246875,21.380483359375,8.2289075,21.058223359375,7.8806275L18.512433359375,5.1295275L15.947203359374999,7.8843775C15.624003359375,8.2317175,15.105093359375,8.2256275,14.788452359375,7.8712475C14.471811259375,7.5166375,14.477201459375,6.9478175,14.800405359375,6.6007075L18.156423359375,2.9964845C18.356113359375,2.7820317,18.675323359375,2.7825006,18.874313359375,2.9974225Z",fill:B(n),"fill-opacity":"1"},null,8,Hv)])])],8,Ov))}}),Wv=["width","height"],Vv={"clip-path":"url(#master_svg0_106_12889)"},jv=["fill"],Uv=["fill"],Gv=ce({__name:"moveBottomIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12889"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",Vv,[z("g",null,[z("path",{d:"M11.82811640625,3.3789845L2.23681640625,3.3789845C1.8226754062500001,3.3789845,1.48681640625,3.7148445,1.48681640625,4.1289875C1.48681640625,4.5431275,1.8226754062500001,4.8789875,2.23681640625,4.8789875L11.82791640625,4.8789875C12.24201640625,4.8789875,12.57791640625,4.5431275,12.57791640625,4.1289875C12.57791640625,3.7148445,12.24231640625,3.3789845,11.82811640625,3.3789845ZM18.50381640625,2.8359375C18.08971640625,2.8359375,17.75381640625,3.1717975,17.75381640625,3.5859375L17.75381640625,18.0051375C17.75381640625,18.419337499999997,18.08971640625,18.7551375,18.50381640625,18.7551375C18.91801640625,18.7551375,19.25381640625,18.419337499999997,19.25381640625,18.0051375L19.25381640625,3.5859375C19.25381640625,3.1717975,18.91801640625,2.8359375,18.50381640625,2.8359375ZM11.83981640625,11.0317975L2.23681640625,11.0317975C1.8226754062500001,11.0317975,1.48681640625,11.3676575,1.48681640625,11.7817975C1.48681640625,12.1959375,1.8226754062500001,12.5317975,2.23681640625,12.5317975L11.83981640625,12.5317975C12.25401640625,12.5317975,12.58991640625,12.1959375,12.58991640625,11.7817975C12.58991640625,11.3676575,12.25401640625,11.0317975,11.83981640625,11.0317975ZM11.83981640625,18.7317375L2.2485354062500003,18.7317375C1.83439440625,18.7317375,1.49853520625,19.0675375,1.49853520625,19.4817375C1.49853520625,19.8958375,1.83439440625,20.2317375,2.2485354062500003,20.2317375L11.83961640625,20.2317375C12.25381640625,20.2317375,12.58961640625,19.8958375,12.58961640625,19.4817375C12.58991640625,19.0673375,12.25401640625,18.7317375,11.83981640625,18.7317375Z",fill:B(n),"fill-opacity":"1"},null,8,jv)]),z("g",null,[z("path",{d:"M18.1331775,20.586202812499998L14.7989575,16.9831528125C14.4766917,16.6348728125,14.4727077,16.0660458125,14.7905205,15.7123728125C15.1080985,15.3589353125,15.6270075,15.3547168125,15.9492675,15.7029978125L18.4952875,18.4540928125L21.0605175,15.6990138125C21.3837275,15.3516698125,21.9026275,15.3577637125,22.2192675,15.7121388125C22.5359075,16.0667478125,22.530517500000002,16.6355728125,22.207317500000002,16.9826828125L18.8510675,20.5873728125C18.6516175,20.8018228125,18.3321575,20.8011228125,18.1331775,20.586202812499998Z",fill:B(n),"fill-opacity":"1"},null,8,Uv)])])],8,Wv))}}),Yv=["fill","width","height"],Zv=ce({__name:"zoomInIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:B(n),width:B(a),height:B(v)},f[0]||(f[0]=[z("path",{d:"M919.264 905.984l-138.912-138.912C851.808 692.32 896 591.328 896 480c0-229.376-186.624-416-416-416S64 250.624 64 480s186.624 416 416 416c95.008 0 182.432-32.384 252.544-86.208l141.44 141.44a31.904 31.904 0 0 0 45.248 0 32 32 0 0 0 0.032-45.248zM128 480C128 285.92 285.92 128 480 128s352 157.92 352 352-157.92 352-352 352S128 674.08 128 480z","p-id":"2399"},null,-1),z("path",{d:"M625.792 448H512v-112a32 32 0 0 0-64 0V448h-112a32 32 0 0 0 0 64H448v112a32 32 0 1 0 64 0V512h113.792a32 32 0 1 0 0-64z","p-id":"2400"},null,-1)]),8,Yv))}}),Kv=["fill","width","height"],Sc=ce({__name:"zoomOutIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:B(n),width:B(a),height:B(v)},f[0]||(f[0]=[z("path",{d:"M919.264 905.984l-138.912-138.912C851.808 692.32 896 591.328 896 480c0-229.376-186.624-416-416-416S64 250.624 64 480s186.624 416 416 416c95.008 0 182.432-32.384 252.544-86.208l141.44 141.44a31.904 31.904 0 0 0 45.248 0 32 32 0 0 0 0.032-45.248zM128 480C128 285.92 285.92 128 480 128s352 157.92 352 352-157.92 352-352 352S128 674.08 128 480z","p-id":"3384"},null,-1),z("path",{d:"M625.792 448H336a32 32 0 0 0 0 64h289.792a32 32 0 1 0 0-64z","p-id":"3385"},null,-1)]),8,Kv))}}),Xv=["width","height"],Qv=["fill"],Jv=["fill"],qv=ce({__name:"undoIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683351144575",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6850",width:B(a),height:B(v)},[z("path",{d:"M967.111111 967.111111h-113.777778v-113.777778c0-221.866667-176.355556-398.222222-398.222222-398.222222H113.777778V341.333333h341.333333c284.444444 0 512 227.555556 512 512v113.777778z",fill:B(n)},null,8,Qv),z("path",{d:"M409.6 762.311111L51.2 398.222222 409.6 39.822222l85.333333 79.644445-284.444444 278.755555 284.444444 284.444445z",fill:B(n)},null,8,Jv)],8,Xv))}}),e2=["width","height"],t2=["fill"],n2=["fill"],o2=ce({__name:"redoIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{t:"1683351286159",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8397",width:B(a),height:B(v)},[z("path",{d:"M170.666667 967.111111H56.888889v-113.777778c0-284.444444 227.555556-512 512-512h341.333333v113.777778h-341.333333c-221.866667 0-398.222222 176.355556-398.222222 398.222222v113.777778z",fill:B(n)},null,8,t2),z("path",{d:"M614.4 762.311111L529.066667 682.666667l284.444444-284.444445-284.444444-278.755555L614.4 39.822222 972.8 398.222222z",fill:B(n)},null,8,n2)],8,e2))}}),i2=["width","height"],r2=["fill"],a2=ce({__name:"checkDataIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M320 576v-128h640v128H320z m0-448h448v128H320V128zM64 64h128v896H64V64z m832 832H320v-128h576v128z",fill:B(n)},null,8,r2)],8,i2))}}),s2=["width","height"],l2=["fill"],c2=ce({__name:"getSnapShotIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M512 46.208a42.666667 42.666667 0 0 1 4.992 85.077333L512 131.541333H174.208a42.666667 42.666667 0 0 0-42.368 37.717334l-0.298667 4.949333v492.416l180.608-165.504a88.874667 88.874667 0 0 1 112.085334-6.570667l5.845333 4.608 147.712 126.634667 99.712-99.626667a88.874667 88.874667 0 0 1 110.122667-12.373333l6.058666 4.138667 104.832 78.634666V512a42.666667 42.666667 0 0 1 85.077334-4.992l0.298666 4.992v342.698667a128 128 0 0 1-120.490666 127.786666l-7.509334 0.213334H174.208a128 128 0 0 1-127.786667-120.490667l-0.213333-7.509333V174.208a128 128 0 0 1 120.490667-127.786667l7.509333-0.213333H512zM371.328 563.2l-1.493333 0.853333-238.293334 218.325334v72.32a42.666667 42.666667 0 0 0 37.717334 42.368l4.949333 0.298666H855.893333a42.666667 42.666667 0 0 0 42.368-37.717333l0.298667-4.949333v-151.808l-3.285333-2.090667-152.789334-114.602667a3.541333 3.541333 0 0 0-3.2-0.554666l-1.450666 0.853333-95.061334 94.976 79.786667 68.352a42.666667 42.666667 0 0 1-51.285333 68.010667l-4.266667-3.2-292.48-250.666667a3.541333 3.541333 0 0 0-3.2-0.768zM805.333333 46.208a42.666667 42.666667 0 0 1 42.368 37.717333l0.298667 4.949334v174.293333l42.709333-42.666667a42.666667 42.666667 0 0 1 56.32-3.541333l4.010667 3.541333a42.666667 42.666667 0 0 1 3.584 56.32l-3.584 4.010667-115.541333 115.541333a42.922667 42.922667 0 0 1-3.84 3.413334l3.84-3.413334a42.965333 42.965333 0 0 1-30.165334 12.501334h-1.408l-2.218666-0.128 3.626666 0.128a43.008 43.008 0 0 1-26.154666-8.96l-0.384-0.256a42.922667 42.922667 0 0 1-3.626667-3.285334L659.626667 280.832a42.666667 42.666667 0 0 1 56.32-63.872l4.010666 3.541333 42.666667 42.666667 0.042667-174.293333a42.666667 42.666667 0 0 1 42.666666-42.666667z",fill:B(n),"p-id":"10259"},null,8,l2)],8,s2))}}),u2={class:"diagram-tool border-b border-b-[#eee] dark:border-b-[#333]"},d2={class:"w-full h-full flex justify-between items-center"},h2={class:"h-full mr-1 float-left flex items-center justify-start flex-1"},f2={class:"flex items-center flex-auto justify-start"},p2={class:"h-full flex items-center justify-end flex-1"},g2=ce({__name:"index",props:["selectedElements"],emits:["action","adjustNodeSize"],setup(e,{emit:t}){const n=e,a=t,v=Lt("lf"),p=wa({selectionBatchIcon:Zm,scaleOneByOne:Qm,fullscreenIcon:hs,connectLinesIcon:iv,pathIcon:nv,curvedEdgeIcon:sv,polylineIcon:uv,bezierIcon:fv,textIcon:mv,inputTextIcon:bv,flipIcon:$v,flipVerticalIcon:_v,flipLeftIcon:Iv,flipRightIcon:Nv,moveTopIcon:zv,moveBottomIcon:Gv,moveToTopIcon:vc,moveToBottomIcon:yc}),f=Y([{name:"selectionBatchIcon",width:16,height:16,alias:"框选",action:"selectionBatch",selected:!1,iconColor:"#555"},{name:"connectLinesIcon",width:18,height:18,alias:"自由绘制连线",action:"drawLines",selected:!1,iconColor:"#555"},{name:"textIcon",width:16,height:16,alias:"文本",action:"dragText",selected:!1,iconColor:"#555"},{name:"inputTextIcon",width:16,height:16,alias:"文本输入",action:"dragInputText",selected:!1,iconColor:"#555"},{name:"flipIcon",width:16,height:16,alias:"左右翻转",action:"flipHorizontal",selected:!1,iconColor:"#555"},{name:"flipVerticalIcon",width:16,height:16,alias:"垂直翻转",action:"flipVertical",selected:!1,iconColor:"#555"},{name:"flipLeftIcon",width:16,height:16,alias:"逆时针翻转",action:"flipLeft",selected:!1,iconColor:"#555"},{name:"flipRightIcon",width:16,height:16,alias:"顺时针翻转",action:"flipRight",selected:!1,iconColor:"#555"},{name:"moveTopIcon",width:16,height:16,alias:"上移一层",action:"moveToFront",selected:!1,iconColor:"#555"},{name:"moveBottomIcon",width:16,height:16,alias:"下移一层",action:"moveToBack",selected:!1,iconColor:"#555"},{name:"moveToTopIcon",width:16,height:16,alias:"移至顶层",action:"moveToTop",selected:!1,iconColor:"#555"},{name:"moveToBottomIcon",width:16,height:16,alias:"移至底层",action:"moveToBottom",selected:!1,iconColor:"#555"}]),m=[{name:"pathIcon",width:16,height:16,alias:"直线连线",action:"path",selected:!1,iconColor:"#555"},{name:"polylineIcon",width:18,height:18,alias:"直角连线",action:"polyline",selected:!1,iconColor:"#555"},{name:"curvedEdgeIcon",width:18,height:18,alias:"圆角连线",action:"curvedEdge",selected:!1,iconColor:"#555"},{name:"bezierIcon",width:16,height:16,alias:"贝塞尔连线",action:"bezier",selected:!1,iconColor:"#555"}],c=Y([{name:"fullscreenIcon",width:16,height:16,alias:"全屏",action:"fullscreen",selected:!1,iconColor:"#555"},{name:"zoomInIcon",width:16,height:16,alias:"放大",action:"zoomIn",selected:!1,iconColor:"#555"},{name:"zoomOutIcon",width:16,height:16,alias:"缩小",action:"zoomOut",selected:!1,iconColor:"#555"},{name:"undoIcon",width:16,height:16,alias:"上一步",action:"undo",selected:!1,iconColor:"#555"},{name:"redoIcon",width:16,height:16,alias:"下一步",action:"redo",selected:!1,iconColor:"#555"},{name:"getSnapShotIcon",width:16,height:16,alias:"下载图片",action:"getSnapShot",selected:!1,iconColor:"#555"},{name:"checkDataIcon",width:16,height:16,alias:"查看数据",action:"checkData",selected:!1,iconColor:"#555"},{name:"miniMapIcon",width:16,height:16,alias:"查看缩略图",action:"miniMap",selected:!1,iconColor:"#555"}]),h=wa({zoomInIcon:Zv,zoomOutIcon:Sc,undoIcon:qv,redoIcon:o2,checkDataIcon:a2,fullscreenIcon:hs,getSnapShotIcon:c2}),i=Y("#555");me(ht,_=>{const I=_?"#ffffff":"#555";f.value.forEach(E=>{E.selected?E.iconColor="#1890ff":E.iconColor=I}),c.value.forEach(E=>{E.selected?E.iconColor="#1890ff":E.iconColor=I}),i.value=I}),ot(()=>{setTimeout(()=>{v.value&&v.value.on("node:click,edge:click,blank:click",_=>{f.value.forEach(I=>{I.iconColor=i.value}),c.value.forEach(I=>{I.iconColor=i.value})})},2e3)});const o=_=>{f.value.forEach(I=>{I.selected=!1,I.iconColor=i.value}),c.value.forEach(I=>{I.selected=!1,I.iconColor=i.value}),_.selected=!0,_.iconColor="#1890ff",a("action",_.action)},l=Y(0),s=Y(0),r=Y(0),u=Y(0),d=Y(!1),g=Y(1),y=()=>{const _=n.selectedElements.node;if(!_)return ye.warning("请选择节点");if(d.value=!d.value,g.value=r.value/u.value,d.value)a("action","scaleOneByOne");else{const I=v.value.getNodeModelById(_.id);if(I.scaleOneByOne)try{I.enableProportionResize(!1),I.scaleOneByOne=!1}catch{}}},x=Ut(_=>{const I=n.selectedElements.node;I&&a("adjustNodeSize",{id:I.id,x:_,y:s.value,width:r.value,height:u.value})},500),C=Ut(_=>{const I=n.selectedElements.node;I&&a("adjustNodeSize",{id:I.id,x:l.value,y:_,width:r.value,height:u.value})},500),b=Ut(_=>{const I=n.selectedElements.node;if(!I)return;const E=d.value?_/g.value:u.value;a("adjustNodeSize",{id:I.id,x:l.value,y:s.value,width:_,height:E}),u.value=E,bt(()=>{d.value&&v.value.getNodeModelById(I.id).enableProportionResize()})},200),w=Ut(_=>{const I=n.selectedElements.node;if(!I)return;const E=d.value?_*g.value:r.value;a("adjustNodeSize",{id:I.id,x:l.value,y:s.value,width:E,height:_}),r.value=E,bt(()=>{d.value&&v.value.getNodeModelById(I.id).enableProportionResize()})},200);return me(()=>n.selectedElements,(_,I)=>{if(_.node){const{x:E,y:k,width:A,height:S,rx:M,ry:$}=_.node.properties;l.value=E,s.value=k,r.value=A||M,u.value=S||$}else l.value=0,s.value=0,r.value=0,u.value=0;if(_.node){const E=v.value.getNodeModelById(_.node.id);E.scaleOneByOne?(d.value=!0,g.value=E.properties.width/E.properties.height):(d.value=!1,g.value=1)}},{deep:!0}),(_,I)=>{const E=en,k=ud,A=dd,S=nd;return Q(),ie("div",u2,[z("div",d2,[z("div",h2,[(Q(!0),ie(Fe,null,ct(B(f),M=>(Q(),be(E,{key:M.name},{title:U(()=>[ve(xt(M.alias),1)]),default:U(()=>[M.name!=="textIcon"&&M.name!=="inputTextIcon"?(Q(),be(Zn(B(p)[M.name]),{key:0,width:18,height:18,color:M.iconColor,class:"mr-3",onClick:$=>o(M)},null,8,["color","onClick"])):(Q(),be(Zn(B(p)[M.name]),{key:1,width:18,height:18,color:M.iconColor,class:"mr-4",onMousedown:$=>o(M)},null,40,["color","onMousedown"]))]),_:2},1024))),128)),D(S,{placement:"bottomLeft",class:"relative"},{overlay:U(()=>[D(A,null,{default:U(()=>[(Q(),ie(Fe,null,ct(m,M=>D(k,{key:M.name},{default:U(()=>[D(E,null,{title:U(()=>[ve(xt(M.alias),1)]),default:U(()=>[(Q(),be(Zn(B(p)[M.name]),{width:18,height:18,color:M.iconColor,class:"mr-4",onMousedown:$=>o(M)},null,40,["color","onMousedown"]))]),_:2},1024)]),_:2},1024)),64))]),_:1})]),default:U(()=>[D(E,null,{title:U(()=>I[5]||(I[5]=[ve(" 连线 ")])),default:U(()=>[(Q(),be(Zn(B(p).pathIcon),{width:18,height:18,color:B(i),class:"mr-4",onClick:I[0]||(I[0]=M=>o(m[0]))},null,8,["color"])),I[6]||(I[6]=z("span",{class:"absolute right-3 bottom--1"},"...",-1))]),_:1})]),_:1})]),z("div",f2,[D(Fo,{modelValue:B(l),"onUpdate:modelValue":[I[1]||(I[1]=M=>qe(l)?l.value=M:null),B(x)],title:"X"},null,8,["modelValue","onUpdate:modelValue"]),D(Fo,{modelValue:B(s),"onUpdate:modelValue":[I[2]||(I[2]=M=>qe(s)?s.value=M:null),B(C)],title:"Y"},null,8,["modelValue","onUpdate:modelValue"]),D(Fo,{modelValue:B(r),"onUpdate:modelValue":[I[3]||(I[3]=M=>qe(r)?r.value=M:null),B(b)],title:"宽"},null,8,["modelValue","onUpdate:modelValue"]),D(E,null,{title:U(()=>I[7]||(I[7]=[ve(" 锁定后,会按照相同比例缩放宽高 ")])),default:U(()=>[B(d)?Pe("",!0):(Q(),be(qi,{key:0,width:18,height:16,color:B(i),class:"mr-2",onClick:y},null,8,["color"])),B(d)?(Q(),be(Ji,{key:1,width:18,height:16,color:B(i),class:"mr-2",onClick:y},null,8,["color"])):Pe("",!0)]),_:1}),D(Fo,{modelValue:B(u),"onUpdate:modelValue":[I[4]||(I[4]=M=>qe(u)?u.value=M:null),B(w)],title:"高"},null,8,["modelValue","onUpdate:modelValue"])]),z("div",p2,[(Q(!0),ie(Fe,null,ct(B(c),M=>(Q(),be(E,{key:M.name},{title:U(()=>[ve(xt(M.alias),1)]),default:U(()=>[(Q(),be(Zn(B(h)[M.name]),{width:18,height:18,color:M.iconColor,class:"mr-3",onClick:$=>o(M)},null,8,["color","onClick"]))]),_:2},1024))),128))])])])}}});const m2=it(g2,[["__scopeId","data-v-40d5cd3b"]]);var kc={exports:{}};(function(e,t){(function(){var n="ace",a=function(){return this}();!a&&typeof window<"u"&&(a=window);var v=function(i,o,l){if(typeof i!="string"){v.original?v.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(l=o),v.modules[i]||(v.payloads[i]=l,v.modules[i]=null)};v.modules={},v.payloads={};var p=function(i,o,l){if(typeof o=="string"){var s=c(i,o);if(s!=null)return l&&l(),s}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var r=[],u=0,d=o.length;u<d;++u){var g=c(i,o[u]);if(g==null&&f.original)return;r.push(g)}return l&&l.apply(null,r)||!0}},f=function(i,o){var l=p("",i,o);return l==null&&f.original?f.original.apply(this,arguments):l},m=function(i,o){if(o.indexOf("!")!==-1){var l=o.split("!");return m(i,l[0])+"!"+m(i,l[1])}if(o.charAt(0)=="."){var s=i.split("/").slice(0,-1).join("/");for(o=s+"/"+o;o.indexOf(".")!==-1&&r!=o;){var r=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},c=function(i,o){o=m(i,o);var l=v.modules[o];if(!l){if(l=v.payloads[o],typeof l=="function"){var s={},r={id:o,uri:"",exports:s,packaged:!0},u=function(g,y){return p(o,g,y)},d=l(u,s,r);s=d||r.exports,v.modules[o]=s,delete v.payloads[o]}l=v.modules[o]=s||l}return l};function h(i){var o=a;i&&(a[i]||(a[i]={}),o=a[i]),(!o.define||!o.define.packaged)&&(v.original=o.define,o.define=v,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(f.original=o.require,o.require=f,o.require.packaged=!0)}h(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,a,v){function p(f,m,c){Object.defineProperty(f,m,{value:c,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||p(String.prototype,"startsWith",function(f,m){return m=m||0,this.lastIndexOf(f,m)===m}),String.prototype.endsWith||p(String.prototype,"endsWith",function(f,m){var c=this;(m===void 0||m>c.length)&&(m=c.length),m-=f.length;var h=c.indexOf(f,m);return h!==-1&&h===m}),String.prototype.repeat||p(String.prototype,"repeat",function(f){for(var m="",c=this;f>0;)f&1&&(m+=c),(f>>=1)&&(c+=c);return m}),String.prototype.includes||p(String.prototype,"includes",function(f,m){return this.indexOf(f,m)!=-1}),Object.assign||(Object.assign=function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var m=Object(f),c=1;c<arguments.length;c++){var h=arguments[c];h!=null&&Object.keys(h).forEach(function(i){m[i]=h[i]})}return m}),Object.values||(Object.values=function(f){return Object.keys(f).map(function(m){return f[m]})}),Array.prototype.find||p(Array.prototype,"find",function(f){for(var m=this.length,c=arguments[1],h=0;h<m;h++){var i=this[h];if(f.call(c,i,h,this))return i}}),Array.prototype.findIndex||p(Array.prototype,"findIndex",function(f){for(var m=this.length,c=arguments[1],h=0;h<m;h++){var i=this[h];if(f.call(c,i,h,this))return h}}),Array.prototype.includes||p(Array.prototype,"includes",function(f,m){return this.indexOf(f,m)!=-1}),Array.prototype.fill||p(Array.prototype,"fill",function(f){for(var m=this,c=m.length>>>0,h=arguments[1],i=h>>0,o=i<0?Math.max(c+i,0):Math.min(i,c),l=arguments[2],s=l===void 0?c:l>>0,r=s<0?Math.max(c+s,0):Math.min(s,c);o<r;)m[o]=f,o++;return m}),Array.of||p(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,a,v){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,a,v){a.deepCopy=function p(f){if(typeof f!="object"||!f)return f;var m;if(Array.isArray(f)){m=[];for(var c=0;c<f.length;c++)m[c]=p(f[c]);return m}if(Object.prototype.toString.call(f)!=="[object Object]")return f;m={};for(var c in f)m[c]=p(f[c]);return m}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,a,v){a.last=function(m){return m[m.length-1]},a.stringReverse=function(m){return m.split("").reverse().join("")},a.stringRepeat=function(m,c){for(var h="";c>0;)c&1&&(h+=m),(c>>=1)&&(m+=m);return h};var p=/^\s\s*/,f=/\s\s*$/;a.stringTrimLeft=function(m){return m.replace(p,"")},a.stringTrimRight=function(m){return m.replace(f,"")},a.copyObject=function(m){var c={};for(var h in m)c[h]=m[h];return c},a.copyArray=function(m){for(var c=[],h=0,i=m.length;h<i;h++)m[h]&&typeof m[h]=="object"?c[h]=this.copyObject(m[h]):c[h]=m[h];return c},a.deepCopy=n("./deep_copy").deepCopy,a.arrayToMap=function(m){for(var c={},h=0;h<m.length;h++)c[m[h]]=1;return c},a.createMap=function(m){var c=Object.create(null);for(var h in m)c[h]=m[h];return c},a.arrayRemove=function(m,c){for(var h=0;h<=m.length;h++)c===m[h]&&m.splice(h,1)},a.escapeRegExp=function(m){return m.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},a.escapeHTML=function(m){return(""+m).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},a.getMatchOffsets=function(m,c){var h=[];return m.replace(c,function(i){h.push({offset:arguments[arguments.length-2],length:i.length})}),h},a.deferredCall=function(m){var c=null,h=function(){c=null,m()},i=function(o){return i.cancel(),c=setTimeout(h,o||0),i};return i.schedule=i,i.call=function(){return this.cancel(),m(),i},i.cancel=function(){return clearTimeout(c),c=null,i},i.isPending=function(){return c},i},a.delayedCall=function(m,c){var h=null,i=function(){h=null,m()},o=function(l){h==null&&(h=setTimeout(i,l||c))};return o.delay=function(l){h&&clearTimeout(h),h=setTimeout(i,l||c)},o.schedule=o,o.call=function(){this.cancel(),m()},o.cancel=function(){h&&clearTimeout(h),h=null},o.isPending=function(){return h},o},a.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},a.skipEmptyMatch=function(m,c,h){return h&&m.codePointAt(c)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,a,v){a.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},a.getOS=function(){return a.isMac?a.OS.MAC:a.isLinux?a.OS.LINUX:a.OS.WINDOWS};var p=typeof navigator=="object"?navigator:{},f=(/mac|win|linux/i.exec(p.platform)||["other"])[0].toLowerCase(),m=p.userAgent||"",c=p.appName||"";a.isWin=f=="win",a.isMac=f=="mac",a.isLinux=f=="linux",a.isIE=c=="Microsoft Internet Explorer"||c.indexOf("MSAppHost")>=0?parseFloat((m.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((m.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),a.isOldIE=a.isIE&&a.isIE<9,a.isGecko=a.isMozilla=m.match(/ Gecko\/\d+/),a.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",a.isWebKit=parseFloat(m.split("WebKit/")[1])||void 0,a.isChrome=parseFloat(m.split(" Chrome/")[1])||void 0,a.isSafari=parseFloat(m.split(" Safari/")[1])&&!a.isChrome||void 0,a.isEdge=parseFloat(m.split(" Edge/")[1])||void 0,a.isAIR=m.indexOf("AdobeAIR")>=0,a.isAndroid=m.indexOf("Android")>=0,a.isChromeOS=m.indexOf(" CrOS ")>=0,a.isIOS=/iPad|iPhone|iPod/.test(m)&&!window.MSStream,a.isIOS&&(a.isMac=!0),a.isMobile=a.isIOS||a.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,a,v){var p=n("./useragent"),f="http://www.w3.org/1999/xhtml";a.buildDom=function l(s,r,u){if(typeof s=="string"&&s){var d=document.createTextNode(s);return r&&r.appendChild(d),d}if(!Array.isArray(s))return s&&s.appendChild&&r&&r.appendChild(s),s;if(typeof s[0]!="string"||!s[0]){for(var g=[],y=0;y<s.length;y++){var x=l(s[y],r,u);x&&g.push(x)}return g}var C=document.createElement(s[0]),b=s[1],w=1;b&&typeof b=="object"&&!Array.isArray(b)&&(w=2);for(var y=w;y<s.length;y++)l(s[y],C,u);return w==2&&Object.keys(b).forEach(function(_){var I=b[_];_==="class"?C.className=Array.isArray(I)?I.join(" "):I:typeof I=="function"||_=="value"||_[0]=="$"?C[_]=I:_==="ref"?u&&(u[I]=C):_==="style"?typeof I=="string"&&(C.style.cssText=I):I!=null&&C.setAttribute(_,I)}),r&&r.appendChild(C),C},a.getDocumentHead=function(l){return l||(l=document),l.head||l.getElementsByTagName("head")[0]||l.documentElement},a.createElement=function(l,s){return document.createElementNS?document.createElementNS(s||f,l):document.createElement(l)},a.removeChildren=function(l){l.innerHTML=""},a.createTextNode=function(l,s){var r=s?s.ownerDocument:document;return r.createTextNode(l)},a.createFragment=function(l){var s=l?l.ownerDocument:document;return s.createDocumentFragment()},a.hasCssClass=function(l,s){var r=(l.className+"").split(/\s+/g);return r.indexOf(s)!==-1},a.addCssClass=function(l,s){a.hasCssClass(l,s)||(l.className+=" "+s)},a.removeCssClass=function(l,s){for(var r=l.className.split(/\s+/g);;){var u=r.indexOf(s);if(u==-1)break;r.splice(u,1)}l.className=r.join(" ")},a.toggleCssClass=function(l,s){for(var r=l.className.split(/\s+/g),u=!0;;){var d=r.indexOf(s);if(d==-1)break;u=!1,r.splice(d,1)}return u&&r.push(s),l.className=r.join(" "),u},a.setCssClass=function(l,s,r){r?a.addCssClass(l,s):a.removeCssClass(l,s)},a.hasCssString=function(l,s){var r=0,u;if(s=s||document,u=s.querySelectorAll("style")){for(;r<u.length;)if(u[r++].id===l)return!0}},a.removeElementById=function(l,s){s=s||document,s.getElementById(l)&&s.getElementById(l).remove()};var m,c=[];a.useStrictCSP=function(l){m=l,l==!1?h():c||(c=[])};function h(){var l=c;c=null,l&&l.forEach(function(s){i(s[0],s[1])})}function i(l,s,r){if(!(typeof document>"u")){if(c){if(r)h();else if(r===!1)return c.push([l,s])}if(!m){var u=r;!r||!r.getRootNode?u=document:(u=r.getRootNode(),(!u||u==r)&&(u=document));var d=u.ownerDocument||u;if(s&&a.hasCssString(s,u))return null;s&&(l+=`
|
|
/*# sourceURL=ace/css/`+s+" */");var g=a.createElement("style");g.appendChild(d.createTextNode(l)),s&&(g.id=s),u==d&&(u=a.getDocumentHead(d)),u.insertBefore(g,u.firstChild)}}}if(a.importCssString=i,a.importCssStylsheet=function(l,s){a.buildDom(["link",{rel:"stylesheet",href:l}],a.getDocumentHead(s))},a.scrollbarWidth=function(l){var s=a.createElement("ace_inner");s.style.width="100%",s.style.minWidth="0px",s.style.height="200px",s.style.display="block";var r=a.createElement("ace_outer"),u=r.style;u.position="absolute",u.left="-10000px",u.overflow="hidden",u.width="200px",u.minWidth="0px",u.height="150px",u.display="block",r.appendChild(s);var d=l&&l.documentElement||document&&document.documentElement;if(!d)return 0;d.appendChild(r);var g=s.offsetWidth;u.overflow="scroll";var y=s.offsetWidth;return g===y&&(y=r.clientWidth),d.removeChild(r),g-y},a.computedStyle=function(l,s){return window.getComputedStyle(l,"")||{}},a.setStyle=function(l,s,r){l[s]!==r&&(l[s]=r)},a.HAS_CSS_ANIMATION=!1,a.HAS_CSS_TRANSFORMS=!1,a.HI_DPI=p.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,p.isChromeOS&&(a.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");a.HI_DPI&&o.style.transform!==void 0&&(a.HAS_CSS_TRANSFORMS=!0),!p.isEdge&&typeof o.style.animationName<"u"&&(a.HAS_CSS_ANIMATION=!0),o=null}a.HAS_CSS_TRANSFORMS?a.translate=function(l,s,r){l.style.transform="translate("+Math.round(s)+"px, "+Math.round(r)+"px)"}:a.translate=function(l,s,r){l.style.top=Math.round(r)+"px",l.style.left=Math.round(s)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,a,v){/*
|
|
* based on code from:
|
|
*
|
|
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
|
* Available via the MIT or new BSD license.
|
|
* see: http://github.com/jrburke/requirejs for details
|
|
*/var p=n("./dom");a.get=function(f,m){var c=new XMLHttpRequest;c.open("GET",f,!0),c.onreadystatechange=function(){c.readyState===4&&m(c.responseText)},c.send(null)},a.loadScript=function(f,m){var c=p.getDocumentHead(),h=document.createElement("script");h.src=f,c.appendChild(h),h.onload=h.onreadystatechange=function(i,o){(o||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,o||m())}},a.qualifyURL=function(f){var m=document.createElement("a");return m.href=f,m.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,a,v){a.inherits=function(p,f){p.super_=f,p.prototype=Object.create(f.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}})},a.mixin=function(p,f){for(var m in f)p[m]=f[m];return p},a.implement=function(p,f){a.mixin(p,f)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,a,v){var p={},f=function(){this.propagationStopped=!0},m=function(){this.defaultPrevented=!0};p._emit=p._dispatchEvent=function(c,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[c]||[],o=this._defaultHandlers[c];if(!(!i.length&&!o)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=c),h.stopPropagation||(h.stopPropagation=f),h.preventDefault||(h.preventDefault=m),i=i.slice();for(var l=0;l<i.length&&(i[l](h,this),!h.propagationStopped);l++);if(o&&!h.defaultPrevented)return o(h,this)}},p._signal=function(c,h){var i=(this._eventRegistry||{})[c];if(i){i=i.slice();for(var o=0;o<i.length;o++)i[o](h,this)}},p.once=function(c,h){var i=this;if(this.on(c,function o(){i.off(c,o),h.apply(null,arguments)}),!h)return new Promise(function(o){h=o})},p.setDefaultHandler=function(c,h){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[c]){var o=i[c],l=i._disabled_[c];l||(i._disabled_[c]=l=[]),l.push(o);var s=l.indexOf(h);s!=-1&&l.splice(s,1)}i[c]=h},p.removeDefaultHandler=function(c,h){var i=this._defaultHandlers;if(i){var o=i._disabled_[c];if(i[c]==h)o&&this.setDefaultHandler(c,o.pop());else if(o){var l=o.indexOf(h);l!=-1&&o.splice(l,1)}}},p.on=p.addEventListener=function(c,h,i){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[c];return o||(o=this._eventRegistry[c]=[]),o.indexOf(h)==-1&&o[i?"unshift":"push"](h),h},p.off=p.removeListener=p.removeEventListener=function(c,h){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[c];if(i){var o=i.indexOf(h);o!==-1&&i.splice(o,1)}},p.removeAllListeners=function(c){c||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[c]=void 0),this._defaultHandlers&&(this._defaultHandlers[c]=void 0)},a.EventEmitter=p}),ace.define("ace/lib/report_error",["require","exports","module"],function(n,a,v){a.reportError=function(f,m){var c=new Error(f);c.data=m,typeof console=="object"&&console.error&&console.error(c),setTimeout(function(){throw c})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(n,a,v){var p={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"};a.defaultEnglishMessages=p}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(n,a,v){"no use strict";var p=n("./oop"),f=n("./event_emitter").EventEmitter,m=n("./report_error").reportError,c=n("./default_english_messages").defaultEnglishMessages,h={setOptions:function(r){Object.keys(r).forEach(function(u){this.setOption(u,r[u])},this)},getOptions:function(r){var u={};if(r)Array.isArray(r)||(u=r,r=Object.keys(u));else{var d=this.$options;r=Object.keys(d).filter(function(g){return!d[g].hidden})}return r.forEach(function(g){u[g]=this.getOption(g)},this),u},setOption:function(r,u){if(this["$"+r]!==u){var d=this.$options[r];if(!d)return i('misspelled option "'+r+'"');if(d.forwardTo)return this[d.forwardTo]&&this[d.forwardTo].setOption(r,u);d.handlesSet||(this["$"+r]=u),d&&d.set&&d.set.call(this,u)}},getOption:function(r){var u=this.$options[r];return u?u.forwardTo?this[u.forwardTo]&&this[u.forwardTo].getOption(r):u&&u.get?u.get.call(this):this["$"+r]:i('misspelled option "'+r+'"')}};function i(r){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,l,s=function(){function r(){this.$defaultOptions={},o=c,l="dollarSigns"}return r.prototype.defineOptions=function(u,d,g){return u.$options||(this.$defaultOptions[d]=u.$options={}),Object.keys(g).forEach(function(y){var x=g[y];typeof x=="string"&&(x={forwardTo:x}),x.name||(x.name=y),u.$options[x.name]=x,"initialValue"in x&&(u["$"+x.name]=x.initialValue)}),p.implement(u,h),this},r.prototype.resetOptions=function(u){Object.keys(u.$options).forEach(function(d){var g=u.$options[d];"value"in g&&u.setOption(d,g.value)})},r.prototype.setDefaultValue=function(u,d,g){if(!u){for(u in this.$defaultOptions)if(this.$defaultOptions[u][d])break;if(!this.$defaultOptions[u][d])return!1}var y=this.$defaultOptions[u]||(this.$defaultOptions[u]={});y[d]&&(y.forwardTo?this.setDefaultValue(y.forwardTo,d,g):y[d].value=g)},r.prototype.setDefaultValues=function(u,d){Object.keys(d).forEach(function(g){this.setDefaultValue(u,g,d[g])},this)},r.prototype.setMessages=function(u,d){o=u,d&&d.placeholders&&(l=d.placeholders)},r.prototype.nls=function(u,d,g){o[u]||(i("No message found for the key '"+u+"' in the provided messages, trying to find a translation for the default string '"+d+"'."),o[d]||i("No message found for the default string '"+d+"' in the provided messages. Falling back to the default English message."));var y=o[u]||o[d]||d;return g&&(l==="dollarSigns"&&(y=y.replace(/\$(\$|[\d]+)/g,function(x,C){return C=="$"?"$":g[C]})),l==="curlyBrackets"&&(y=y.replace(/\{([^\}]+)\}/g,function(x,C){return g[C]}))),y},r}();s.prototype.warn=i,s.prototype.reportError=m,p.implement(s.prototype,f),a.AppConfig=s}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(n,a,v){v.exports=`.ace-tm .ace_gutter {
|
|
background: #f0f0f0;
|
|
color: #333;
|
|
}
|
|
|
|
.ace-tm .ace_print-margin {
|
|
width: 1px;
|
|
background: #e8e8e8;
|
|
}
|
|
|
|
.ace-tm .ace_fold {
|
|
background-color: #6B72E6;
|
|
}
|
|
|
|
.ace-tm {
|
|
background-color: #FFFFFF;
|
|
color: black;
|
|
}
|
|
|
|
.ace-tm .ace_cursor {
|
|
color: black;
|
|
}
|
|
|
|
.ace-tm .ace_invisible {
|
|
color: rgb(191, 191, 191);
|
|
}
|
|
|
|
.ace-tm .ace_storage,
|
|
.ace-tm .ace_keyword {
|
|
color: blue;
|
|
}
|
|
|
|
.ace-tm .ace_constant {
|
|
color: rgb(197, 6, 11);
|
|
}
|
|
|
|
.ace-tm .ace_constant.ace_buildin {
|
|
color: rgb(88, 72, 246);
|
|
}
|
|
|
|
.ace-tm .ace_constant.ace_language {
|
|
color: rgb(88, 92, 246);
|
|
}
|
|
|
|
.ace-tm .ace_constant.ace_library {
|
|
color: rgb(6, 150, 14);
|
|
}
|
|
|
|
.ace-tm .ace_invalid {
|
|
background-color: rgba(255, 0, 0, 0.1);
|
|
color: red;
|
|
}
|
|
|
|
.ace-tm .ace_support.ace_function {
|
|
color: rgb(60, 76, 114);
|
|
}
|
|
|
|
.ace-tm .ace_support.ace_constant {
|
|
color: rgb(6, 150, 14);
|
|
}
|
|
|
|
.ace-tm .ace_support.ace_type,
|
|
.ace-tm .ace_support.ace_class {
|
|
color: rgb(109, 121, 222);
|
|
}
|
|
|
|
.ace-tm .ace_keyword.ace_operator {
|
|
color: rgb(104, 118, 135);
|
|
}
|
|
|
|
.ace-tm .ace_string {
|
|
color: rgb(3, 106, 7);
|
|
}
|
|
|
|
.ace-tm .ace_comment {
|
|
color: rgb(76, 136, 107);
|
|
}
|
|
|
|
.ace-tm .ace_comment.ace_doc {
|
|
color: rgb(0, 102, 255);
|
|
}
|
|
|
|
.ace-tm .ace_comment.ace_doc.ace_tag {
|
|
color: rgb(128, 159, 191);
|
|
}
|
|
|
|
.ace-tm .ace_constant.ace_numeric {
|
|
color: rgb(0, 0, 205);
|
|
}
|
|
|
|
.ace-tm .ace_variable {
|
|
color: rgb(49, 132, 149);
|
|
}
|
|
|
|
.ace-tm .ace_xml-pe {
|
|
color: rgb(104, 104, 91);
|
|
}
|
|
|
|
.ace-tm .ace_entity.ace_name.ace_function {
|
|
color: #0000A2;
|
|
}
|
|
|
|
|
|
.ace-tm .ace_heading {
|
|
color: rgb(12, 7, 255);
|
|
}
|
|
|
|
.ace-tm .ace_list {
|
|
color:rgb(185, 6, 144);
|
|
}
|
|
|
|
.ace-tm .ace_meta.ace_tag {
|
|
color:rgb(0, 22, 142);
|
|
}
|
|
|
|
.ace-tm .ace_string.ace_regex {
|
|
color: rgb(255, 0, 0)
|
|
}
|
|
|
|
.ace-tm .ace_marker-layer .ace_selection {
|
|
background: rgb(181, 213, 255);
|
|
}
|
|
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
|
box-shadow: 0 0 3px 0px white;
|
|
}
|
|
.ace-tm .ace_marker-layer .ace_step {
|
|
background: rgb(252, 255, 0);
|
|
}
|
|
|
|
.ace-tm .ace_marker-layer .ace_stack {
|
|
background: rgb(164, 229, 101);
|
|
}
|
|
|
|
.ace-tm .ace_marker-layer .ace_bracket {
|
|
margin: -1px 0 0 -1px;
|
|
border: 1px solid rgb(192, 192, 192);
|
|
}
|
|
|
|
.ace-tm .ace_marker-layer .ace_active-line {
|
|
background: rgba(0, 0, 0, 0.07);
|
|
}
|
|
|
|
.ace-tm .ace_gutter-active-line {
|
|
background-color : #dcdcdc;
|
|
}
|
|
|
|
.ace-tm .ace_marker-layer .ace_selected-word {
|
|
background: rgb(250, 250, 255);
|
|
border: 1px solid rgb(200, 200, 250);
|
|
}
|
|
|
|
.ace-tm .ace_indent-guide {
|
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
}
|
|
|
|
.ace-tm .ace_indent-guide-active {
|
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
}
|
|
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(n,a,v){a.isDark=!1,a.cssClass="ace-tm",a.cssText=n("./textmate-css"),a.$id="ace/theme/textmate";var p=n("../lib/dom");p.importCssString(a.cssText,a.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,a,v){"no use strict";var p=n("./lib/lang"),f=n("./lib/net"),m=n("./lib/dom"),c=n("./lib/app_config").AppConfig;v.exports=a=new c;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};a.get=function(s){if(!h.hasOwnProperty(s))throw new Error("Unknown config key: "+s);return h[s]},a.set=function(s,r){if(h.hasOwnProperty(s))h[s]=r;else if(this.setDefaultValue("",s,r)==!1)throw new Error("Unknown config key: "+s);s=="useStrictCSP"&&m.useStrictCSP(r)},a.all=function(){return p.copyObject(h)},a.$modes={},a.moduleUrl=function(s,r){if(h.$moduleUrls[s])return h.$moduleUrls[s];var u=s.split("/");r=r||u[u.length-2]||"";var d=r=="snippets"?"/":"-",g=u[u.length-1];if(r=="worker"&&d=="-"){var y=new RegExp("^"+r+"[\\-_]|[\\-_]"+r+"$","g");g=g.replace(y,"")}(!g||g==r)&&u.length>1&&(g=u[u.length-2]);var x=h[r+"Path"];return x==null?x=h.basePath:d=="/"&&(r=d=""),x&&x.slice(-1)!="/"&&(x+="/"),x+r+d+g+this.get("suffix")},a.setModuleUrl=function(s,r){return h.$moduleUrls[s]=r};var i=function(s,r){if(s==="ace/theme/textmate"||s==="./theme/textmate")return r(null,n("./theme/textmate"));if(o)return o(s,r);console.error("loader is not configured")},o;a.setLoader=function(s){o=s},a.dynamicModules=Object.create(null),a.$loading={},a.$loaded={},a.loadModule=function(s,r){var u;if(Array.isArray(s))var d=s[0],g=s[1];else if(typeof s=="string")var g=s;var y=function(x){if(x&&!a.$loading[g])return r&&r(x);if(a.$loading[g]||(a.$loading[g]=[]),a.$loading[g].push(r),!(a.$loading[g].length>1)){var C=function(){i(g,function(b,w){w&&(a.$loaded[g]=w),a._emit("load.module",{name:g,module:w});var _=a.$loading[g];a.$loading[g]=null,_.forEach(function(I){I&&I(w)})})};if(!a.get("packaged"))return C();f.loadScript(a.moduleUrl(g,d),C),l()}};if(a.dynamicModules[g])a.dynamicModules[g]().then(function(x){x.default?y(x.default):y(x)});else{try{u=this.$require(g)}catch{}y(u||a.$loaded[g])}},a.$require=function(s){if(typeof v.require=="function"){var r="require";return v[r](s)}},a.setModuleLoader=function(s,r){a.dynamicModules[s]=r};var l=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),l=function(){})};a.version="1.36.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,a,v){n("./lib/fixoldbrowsers");var p=n("./config");p.setLoader(function(h,i){n([h],function(o){i(null,o)})});var f=function(){return this||typeof window<"u"&&window}();v.exports=function(h){p.init=m,p.$require=n,h.require=n},m(!0);function m(h){if(!(!f||!f.document)){p.set("packaged",h||n.packaged||v.packaged||f.define&&(void 0).packaged);var i={},o="",l=document.currentScript||document._currentScript,s=l&&l.ownerDocument||document;l&&l.src&&(o=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var r=s.getElementsByTagName("script"),u=0;u<r.length;u++){var d=r[u],g=d.src||d.getAttribute("src");if(g){for(var y=d.attributes,x=0,C=y.length;x<C;x++){var b=y[x];b.name.indexOf("data-ace-")===0&&(i[c(b.name.replace(/^data-ace-/,""))]=b.value)}var w=g.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);w&&(o=w[1])}}o&&(i.base=i.base||o,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var _ in i)typeof i[_]<"u"&&p.set(_,i[_])}}function c(h){return h.replace(/-(.)/g,function(i,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,a,v){var p=function(){function f(m,c,h,i){this.start={row:m,column:c},this.end={row:h,column:i}}return f.prototype.isEqual=function(m){return this.start.row===m.start.row&&this.end.row===m.end.row&&this.start.column===m.start.column&&this.end.column===m.end.column},f.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},f.prototype.contains=function(m,c){return this.compare(m,c)==0},f.prototype.compareRange=function(m){var c,h=m.end,i=m.start;return c=this.compare(h.row,h.column),c==1?(c=this.compare(i.row,i.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(i.row,i.column),c==-1?-1:c==1?42:0)},f.prototype.comparePoint=function(m){return this.compare(m.row,m.column)},f.prototype.containsRange=function(m){return this.comparePoint(m.start)==0&&this.comparePoint(m.end)==0},f.prototype.intersects=function(m){var c=this.compareRange(m);return c==-1||c==0||c==1},f.prototype.isEnd=function(m,c){return this.end.row==m&&this.end.column==c},f.prototype.isStart=function(m,c){return this.start.row==m&&this.start.column==c},f.prototype.setStart=function(m,c){typeof m=="object"?(this.start.column=m.column,this.start.row=m.row):(this.start.row=m,this.start.column=c)},f.prototype.setEnd=function(m,c){typeof m=="object"?(this.end.column=m.column,this.end.row=m.row):(this.end.row=m,this.end.column=c)},f.prototype.inside=function(m,c){return this.compare(m,c)==0?!(this.isEnd(m,c)||this.isStart(m,c)):!1},f.prototype.insideStart=function(m,c){return this.compare(m,c)==0?!this.isEnd(m,c):!1},f.prototype.insideEnd=function(m,c){return this.compare(m,c)==0?!this.isStart(m,c):!1},f.prototype.compare=function(m,c){return!this.isMultiLine()&&m===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:m<this.start.row?-1:m>this.end.row?1:this.start.row===m?c>=this.start.column?0:-1:this.end.row===m?c<=this.end.column?0:1:0},f.prototype.compareStart=function(m,c){return this.start.row==m&&this.start.column==c?-1:this.compare(m,c)},f.prototype.compareEnd=function(m,c){return this.end.row==m&&this.end.column==c?1:this.compare(m,c)},f.prototype.compareInside=function(m,c){return this.end.row==m&&this.end.column==c?1:this.start.row==m&&this.start.column==c?-1:this.compare(m,c)},f.prototype.clipRows=function(m,c){if(this.end.row>c)var h={row:c+1,column:0};else if(this.end.row<m)var h={row:m,column:0};if(this.start.row>c)var i={row:c+1,column:0};else if(this.start.row<m)var i={row:m,column:0};return f.fromPoints(i||this.start,h||this.end)},f.prototype.extend=function(m,c){var h=this.compare(m,c);if(h==0)return this;if(h==-1)var i={row:m,column:c};else var o={row:m,column:c};return f.fromPoints(i||this.start,o||this.end)},f.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},f.prototype.isMultiLine=function(){return this.start.row!==this.end.row},f.prototype.clone=function(){return f.fromPoints(this.start,this.end)},f.prototype.collapseRows=function(){return this.end.column==0?new f(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new f(this.start.row,0,this.end.row,0)},f.prototype.toScreenRange=function(m){var c=m.documentToScreenPosition(this.start),h=m.documentToScreenPosition(this.end);return new f(c.row,c.column,h.row,h.column)},f.prototype.moveBy=function(m,c){this.start.row+=m,this.start.column+=c,this.end.row+=m,this.end.column+=c},f}();p.fromPoints=function(f,m){return new p(f.row,f.column,m.row,m.column)},p.comparePoints=function(f,m){return f.row-m.row||f.column-m.column},a.Range=p}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,a,v){for(var p=n("./oop"),f={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},m={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},c=0;c<10;c++)m["Digit"+c]=48+c,m["Numpad"+c]=96+c,f.PRINTABLE_KEYS[48+c]=""+c,f.FUNCTION_KEYS[96+c]="Numpad"+c;for(var c=65;c<91;c++){var h=String.fromCharCode(c+32);m["Key"+h.toUpperCase()]=c,f.PRINTABLE_KEYS[c]=h}for(var c=1;c<13;c++)m["F"+c]=111+c,f.FUNCTION_KEYS[111+c]="F"+c;var i={Shift:16,Control:17,Alt:18,Meta:224};for(var o in i)m[o]=m[o+"Left"]=m[o+"Right"]=i[o];a.$codeToKeyCode=m,f.PRINTABLE_KEYS[173]="-";for(var l in f.FUNCTION_KEYS){var s=f.FUNCTION_KEYS[l].toLowerCase();f[s]=parseInt(l,10)}for(var l in f.PRINTABLE_KEYS){var s=f.PRINTABLE_KEYS[l].toLowerCase();f[s]=parseInt(l,10)}p.mixin(f,f.MODIFIER_KEYS),p.mixin(f,f.PRINTABLE_KEYS),p.mixin(f,f.FUNCTION_KEYS),f.enter=f.return,f.escape=f.esc,f.del=f.delete,function(){for(var r=["cmd","ctrl","alt","shift"],u=Math.pow(2,r.length);u--;)f.KEY_MODS[u]=r.filter(function(d){return u&f.KEY_MODS[d]}).join("-")+"-"}(),f.KEY_MODS[0]="",f.KEY_MODS[-1]="input-",p.mixin(a,f),a.default=a,a.keyCodeToString=function(r){var u=f[r];return typeof u!="string"&&(u=String.fromCharCode(r)),u.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,a,v){var p=n("./keys"),f=n("./useragent"),m=null,c=0,h;function i(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return h={passive:!1},!0}})}catch{}}function o(){return h==null&&i(),h}function l(x,C,b){this.elem=x,this.type=C,this.callback=b}l.prototype.destroy=function(){r(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var s=a.addListener=function(x,C,b,w){x.addEventListener(C,b,o()),w&&w.$toDestroy.push(new l(x,C,b))},r=a.removeListener=function(x,C,b){x.removeEventListener(C,b,o())};a.stopEvent=function(x){return a.stopPropagation(x),a.preventDefault(x),!1},a.stopPropagation=function(x){x.stopPropagation&&x.stopPropagation()},a.preventDefault=function(x){x.preventDefault&&x.preventDefault()},a.getButton=function(x){return x.type=="dblclick"?0:x.type=="contextmenu"||f.isMac&&x.ctrlKey&&!x.altKey&&!x.shiftKey?2:x.button},a.capture=function(x,C,b){var w=x&&x.ownerDocument||document;function _(I){C&&C(I),b&&b(I),r(w,"mousemove",C),r(w,"mouseup",_),r(w,"dragstart",_)}return s(w,"mousemove",C),s(w,"mouseup",_),s(w,"dragstart",_),_},a.addMouseWheelListener=function(x,C,b){s(x,"wheel",function(w){var _=.15,I=w.deltaX||0,E=w.deltaY||0;switch(w.deltaMode){case w.DOM_DELTA_PIXEL:w.wheelX=I*_,w.wheelY=E*_;break;case w.DOM_DELTA_LINE:var k=15;w.wheelX=I*k,w.wheelY=E*k;break;case w.DOM_DELTA_PAGE:var A=150;w.wheelX=I*A,w.wheelY=E*A;break}C(w)},b)},a.addMultiMouseDownListener=function(x,C,b,w,_){var I=0,E,k,A,S={2:"dblclick",3:"tripleclick",4:"quadclick"};function M($){if(a.getButton($)!==0?I=0:$.detail>1?(I++,I>4&&(I=1)):I=1,f.isIE){var L=Math.abs($.clientX-E)>5||Math.abs($.clientY-k)>5;(!A||L)&&(I=1),A&&clearTimeout(A),A=setTimeout(function(){A=null},C[I-1]||600),I==1&&(E=$.clientX,k=$.clientY)}if($._clicks=I,b[w]("mousedown",$),I>4)I=0;else if(I>1)return b[w](S[I],$)}Array.isArray(x)||(x=[x]),x.forEach(function($){s($,"mousedown",M,_)})};function u(x){return 0|(x.ctrlKey?1:0)|(x.altKey?2:0)|(x.shiftKey?4:0)|(x.metaKey?8:0)}a.getModifierString=function(x){return p.KEY_MODS[u(x)]};function d(x,C,b){var w=u(C);if(!b&&C.code&&(b=p.$codeToKeyCode[C.code]||b),!f.isMac&&m){if(C.getModifierState&&(C.getModifierState("OS")||C.getModifierState("Win"))&&(w|=8),m.altGr)if((3&w)!=3)m.altGr=0;else return;if(b===18||b===17){var _=C.location;if(b===17&&_===1)m[b]==1&&(c=C.timeStamp);else if(b===18&&w===3&&_===2){var I=C.timeStamp-c;I<50&&(m.altGr=!0)}}}if(b in p.MODIFIER_KEYS&&(b=-1),!(!w&&b===13&&C.location===3&&(x(C,w,-b),C.defaultPrevented))){if(f.isChromeOS&&w&8){if(x(C,w,b),C.defaultPrevented)return;w&=-9}return!w&&!(b in p.FUNCTION_KEYS)&&!(b in p.PRINTABLE_KEYS)?!1:x(C,w,b)}}a.addCommandKeyListener=function(x,C,b){var w=null;s(x,"keydown",function(_){m[_.keyCode]=(m[_.keyCode]||0)+1;var I=d(C,_,_.keyCode);return w=_.defaultPrevented,I},b),s(x,"keypress",function(_){w&&(_.ctrlKey||_.altKey||_.shiftKey||_.metaKey)&&(a.stopEvent(_),w=null)},b),s(x,"keyup",function(_){m[_.keyCode]=null},b),m||(g(),s(window,"focus",g))};function g(){m=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!f.isOldIE){var y=1;a.nextTick=function(x,C){C=C||window;var b="zero-timeout-message-"+y++,w=function(_){_.data==b&&(a.stopPropagation(_),r(C,"message",w),x())};s(C,"message",w),C.postMessage(b,"*")}}a.$idleBlocked=!1,a.onIdle=function(x,C){return setTimeout(function b(){a.$idleBlocked?setTimeout(b,100):x()},C)},a.$idleBlockId=null,a.blockIdle=function(x){a.$idleBlockId&&clearTimeout(a.$idleBlockId),a.$idleBlocked=!0,a.$idleBlockId=setTimeout(function(){a.$idleBlocked=!1},x||100)},a.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),a.nextFrame?a.nextFrame=a.nextFrame.bind(window):a.nextFrame=function(x){setTimeout(x,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,a,v){var p;v.exports={lineMode:!1,pasteCancelled:function(){return p&&p>Date.now()-50?!0:p=!1},cancel:function(){p=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,a,v){var p=n("../lib/event"),f=n("../config").nls,m=n("../lib/useragent"),c=n("../lib/dom"),h=n("../lib/lang"),i=n("../clipboard"),o=m.isChrome<18,l=m.isIE,s=m.isChrome>63,r=400,u=n("../lib/keys"),d=u.KEY_MODS,g=m.isIOS,y=g?/\s/:/\n/,x=m.isMobile,C;C=function(b,w){var _=c.createElement("textarea");_.className="ace_text-input",_.setAttribute("wrap","off"),_.setAttribute("autocorrect","off"),_.setAttribute("autocapitalize","off"),_.setAttribute("spellcheck","false"),_.style.opacity="0",b.insertBefore(_,b.firstChild);var I=!1,E=!1,k=!1,A=!1,S="";x||(_.style.fontSize="1px");var M=!1,$=!1,L="",T=0,R=0,P=0,F=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,N=0;try{var V=document.activeElement===_}catch{}this.setNumberOfExtraLines=function(se){if(F=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,se<0){N=0;return}N=se},this.setAriaOptions=function(se){if(se.activeDescendant?(_.setAttribute("aria-haspopup","true"),_.setAttribute("aria-autocomplete",se.inline?"both":"list"),_.setAttribute("aria-activedescendant",se.activeDescendant)):(_.setAttribute("aria-haspopup","false"),_.setAttribute("aria-autocomplete","both"),_.removeAttribute("aria-activedescendant")),se.role&&_.setAttribute("role",se.role),se.setLabel){_.setAttribute("aria-roledescription",f("text-input.aria-roledescription","editor"));var we="";if(w.$textInputAriaLabel&&(we+="".concat(w.$textInputAriaLabel,", ")),w.session){var Ce=w.session.selection.cursor.row;we+=f("text-input.aria-label","Cursor at row $0",[Ce+1])}_.setAttribute("aria-label",we)}},this.setAriaOptions({role:"textbox"}),p.addListener(_,"blur",function(se){$||(w.onBlur(se),V=!1)},w),p.addListener(_,"focus",function(se){if(!$){if(V=!0,m.isEdge)try{if(!document.hasFocus())return}catch{}w.onFocus(se),m.isEdge?setTimeout(W):W()}},w),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:w.renderer.enableKeyboardAccessibility}),S||s||this.$focusScroll=="browser")return _.focus({preventScroll:!0});var se=_.style.top;_.style.position="fixed",_.style.top="0px";try{var we=_.getBoundingClientRect().top!=0}catch{return}var Ce=[];if(we)for(var Ee=_.parentElement;Ee&&Ee.nodeType==1;)Ce.push(Ee),Ee.setAttribute("ace_nocontext","true"),!Ee.parentElement&&Ee.getRootNode?Ee=Ee.getRootNode().host:Ee=Ee.parentElement;_.focus({preventScroll:!0}),we&&Ce.forEach(function(Be){Be.removeAttribute("ace_nocontext")}),setTimeout(function(){_.style.position="",_.style.top=="0px"&&(_.style.top=se)},0)},this.blur=function(){_.blur()},this.isFocused=function(){return V},w.on("beforeEndOperation",function(){var se=w.curOp,we=se&&se.command&&se.command.name;if(we!="insertstring"){var Ce=we&&(se.docChanged||se.selectionChanged);k&&Ce&&(L=_.value="",pe()),W()}});var H=function(se,we){for(var Ce=we,Ee=1;Ee<=se-F&&Ee<2*N+1;Ee++)Ce+=w.session.getLine(se-Ee).length+1;return Ce},W=g?function(se){if(!(!V||I&&!se||A)){se||(se="");var we=`
|
|
ab`+se+`cde fg
|
|
`;we!=_.value&&(_.value=L=we);var Ce=4,Ee=4+(se.length||(w.selection.isEmpty()?0:1));(T!=Ce||R!=Ee)&&_.setSelectionRange(Ce,Ee),T=Ce,R=Ee}}:function(){if(!(k||A)&&!(!V&&!G)){k=!0;var se=0,we=0,Ce="";if(w.session){var Ee=w.selection,Be=Ee.getRange(),je=Ee.cursor.row;je===O+1?(F=O+1,O=F+2*N):je===F-1?(O=F-1,F=O-2*N):(je<F-1||je>O+1)&&(F=je>N?je-N:0,O=je>N?je+N:2*N);for(var Ue=[],Xe=F;Xe<=O;Xe++)Ue.push(w.session.getLine(Xe));if(Ce=Ue.join(`
|
|
`),se=H(Be.start.row,Be.start.column),we=H(Be.end.row,Be.end.column),Be.start.row<F){var Je=w.session.getLine(F-1);se=Be.start.row<F-1?0:se,we+=Je.length+1,Ce=Je+`
|
|
`+Ce}else if(Be.end.row>O){var X=w.session.getLine(O+1);we=Be.end.row>O+1?X.length:Be.end.column,we+=Ce.length+1,Ce=Ce+`
|
|
`+X}else x&&je>0&&(Ce=`
|
|
`+Ce,we+=1,se+=1);Ce.length>r&&(se<r&&we<r?Ce=Ce.slice(0,r):(Ce=`
|
|
`,se==we?se=we=0:(se=0,we=1)));var fe=Ce+`
|
|
|
|
`;fe!=L&&(_.value=L=fe,T=R=fe.length)}if(G&&(T=_.selectionStart,R=_.selectionEnd),R!=we||T!=se||_.selectionEnd!=R)try{_.setSelectionRange(se,we),T=se,R=we}catch{}k=!1}};this.resetSelection=W,V&&w.onFocus();var j=function(se){return se.selectionStart===0&&se.selectionEnd>=L.length&&se.value===L&&L&&se.selectionEnd!==R},Z=function(se){k||(I?I=!1:j(_)?(w.selectAll(),W()):x&&_.selectionStart!=T&&W())},q=null;this.setInputHandler=function(se){q=se},this.getInputHandler=function(){return q};var G=!1,K=function(se,we){if(G&&(G=!1),E)return W(),se&&w.onPaste(se),E=!1,"";for(var Ce=_.selectionStart,Ee=_.selectionEnd,Be=T,je=L.length-R,Ue=se,Xe=se.length-Ce,Je=se.length-Ee,X=0;Be>0&&L[X]==se[X];)X++,Be--;for(Ue=Ue.slice(X),X=1;je>0&&L.length-X>T-1&&L[L.length-X]==se[se.length-X];)X++,je--;Xe-=X-1,Je-=X-1;var fe=Ue.length-X+1;if(fe<0&&(Be=-fe,fe=0),Ue=Ue.slice(0,fe),!we&&!Ue&&!Xe&&!Be&&!je&&!Je)return"";A=!0;var ke=!1;return m.isAndroid&&Ue==". "&&(Ue=" ",ke=!0),Ue&&!Be&&!je&&!Xe&&!Je||M?w.onTextInput(Ue):w.onTextInput(Ue,{extendLeft:Be,extendRight:je,restoreStart:Xe,restoreEnd:Je}),A=!1,L=se,T=Ce,R=Ee,P=Je,ke?`
|
|
`:Ue},ee=function(se){if(k)return ne();if(se&&se.inputType){if(se.inputType=="historyUndo")return w.execCommand("undo");if(se.inputType=="historyRedo")return w.execCommand("redo")}var we=_.value,Ce=K(we,!0);(we.length>r+100||y.test(Ce)||x&&T<1&&T==R)&&W()},te=function(se,we,Ce){var Ee=se.clipboardData||window.clipboardData;if(!(!Ee||o)){var Be=l||Ce?"Text":"text/plain";try{return we?Ee.setData(Be,we)!==!1:Ee.getData(Be)}catch(je){if(!Ce)return te(je,we,!0)}}},ae=function(se,we){var Ce=w.getCopyText();if(!Ce)return p.preventDefault(se);te(se,Ce)?(g&&(W(Ce),I=Ce,setTimeout(function(){I=!1},10)),we?w.onCut():w.onCopy(),p.preventDefault(se)):(I=!0,_.value=Ce,_.select(),setTimeout(function(){I=!1,W(),we?w.onCut():w.onCopy()}))},de=function(se){ae(se,!0)},he=function(se){ae(se,!1)},re=function(se){var we=te(se);i.pasteCancelled()||(typeof we=="string"?(we&&w.onPaste(we,se),m.isIE&&setTimeout(W),p.preventDefault(se)):(_.value="",E=!0))};p.addCommandKeyListener(_,function(se,we,Ce){if(!k)return w.onCommandKey(se,we,Ce)},w),p.addListener(_,"select",Z,w),p.addListener(_,"input",ee,w),p.addListener(_,"cut",de,w),p.addListener(_,"copy",he,w),p.addListener(_,"paste",re,w),(!("oncut"in _)||!("oncopy"in _)||!("onpaste"in _))&&p.addListener(b,"keydown",function(se){if(!(m.isMac&&!se.metaKey||!se.ctrlKey))switch(se.keyCode){case 67:he(se);break;case 86:re(se);break;case 88:de(se);break}},w);var ue=function(se){if(!(k||!w.onCompositionStart||w.$readOnly)&&(k={},!M)){se.data&&(k.useTextareaForIME=!1),setTimeout(ne,0),w._signal("compositionStart"),w.on("mousedown",Se);var we=w.getSelectionRange();we.end.row=we.start.row,we.end.column=we.start.column,k.markerRange=we,k.selectionStart=T,w.onCompositionStart(k),k.useTextareaForIME?(L=_.value="",T=0,R=0):(_.msGetInputContext&&(k.context=_.msGetInputContext()),_.getInputContext&&(k.context=_.getInputContext()))}},ne=function(){if(!(!k||!w.onCompositionUpdate||w.$readOnly)){if(M)return Se();if(k.useTextareaForIME)w.onCompositionUpdate(_.value);else{var se=_.value;K(se),k.markerRange&&(k.context&&(k.markerRange.start.column=k.selectionStart=k.context.compositionStartOffset),k.markerRange.end.column=k.markerRange.start.column+R-k.selectionStart+P)}}},pe=function(se){!w.onCompositionEnd||w.$readOnly||(k=!1,w.onCompositionEnd(),w.off("mousedown",Se),se&&ee())};function Se(){$=!0,_.blur(),_.focus(),$=!1}var Me=h.delayedCall(ne,50).schedule.bind(null,null);function Le(se){se.keyCode==27&&_.value.length<_.selectionStart&&(k||(L=_.value),T=R=-1,W()),Me()}p.addListener(_,"compositionstart",ue,w),p.addListener(_,"compositionupdate",ne,w),p.addListener(_,"keyup",Le,w),p.addListener(_,"keydown",Me,w),p.addListener(_,"compositionend",pe,w),this.getElement=function(){return _},this.setCommandMode=function(se){M=se,_.readOnly=!1},this.setReadOnly=function(se){M||(_.readOnly=se)},this.setCopyWithEmptySelection=function(se){},this.onContextMenu=function(se){G=!0,W(),w._emit("nativecontextmenu",{target:w,domEvent:se}),this.moveToMouse(se,!0)},this.moveToMouse=function(se,we){S||(S=_.style.cssText),_.style.cssText=(we?"z-index:100000;":"")+(m.isIE?"opacity:0.1;":"")+"text-indent: -"+(T+R)*w.renderer.characterWidth*.5+"px;";var Ce=w.container.getBoundingClientRect(),Ee=c.computedStyle(w.container),Be=Ce.top+(parseInt(Ee.borderTopWidth)||0),je=Ce.left+(parseInt(Ce.borderLeftWidth)||0),Ue=Ce.bottom-Be-_.clientHeight-2,Xe=function(Je){c.translate(_,Je.clientX-je-2,Math.min(Je.clientY-Be-2,Ue))};Xe(se),se.type=="mousedown"&&(w.renderer.$isMousePressed=!0,clearTimeout(Ae),m.isWin&&p.capture(w.container,Xe,We))},this.onContextMenuClose=We;var Ae;function We(){clearTimeout(Ae),Ae=setTimeout(function(){S&&(_.style.cssText=S,S=""),w.renderer.$isMousePressed=!1,w.renderer.$keepTextAreaAtCursor&&w.renderer.$moveTextAreaToCursor()},0)}var Ve=function(se){w.textInput.onContextMenu(se),We()};p.addListener(_,"mouseup",Ve,w),p.addListener(_,"mousedown",function(se){se.preventDefault(),We()},w),p.addListener(w.renderer.scroller,"contextmenu",Ve,w),p.addListener(_,"contextmenu",Ve,w),g&&Ze(b,w,_);function Ze(se,we,Ce){var Ee=null,Be=!1;Ce.addEventListener("keydown",function(Ue){Ee&&clearTimeout(Ee),Be=!0},!0),Ce.addEventListener("keyup",function(Ue){Ee=setTimeout(function(){Be=!1},100)},!0);var je=function(Ue){if(document.activeElement===Ce&&!(Be||k||we.$mouseHandler.isMousePressed)&&!I){var Xe=Ce.selectionStart,Je=Ce.selectionEnd,X=null,fe=0;if(Xe==0?X=u.up:Xe==1?X=u.home:Je>R&&L[Je]==`
|
|
`?X=u.end:Xe<T&&L[Xe-1]==" "?(X=u.left,fe=d.option):Xe<T||Xe==T&&R!=T&&Xe==Je?X=u.left:Je>R&&L.slice(0,Je).split(`
|
|
`).length>2?X=u.down:Je>R&&L[Je-1]==" "?(X=u.right,fe=d.option):(Je>R||Je==R&&R!=T&&Xe==Je)&&(X=u.right),Xe!==Je&&(fe|=d.shift),X){var ke=we.onCommandKey({},fe,X);if(!ke&&we.commands){X=u.keyCodeToString(X);var Ne=we.commands.findKeyCommand(fe,X);Ne&&we.execCommand(Ne)}T=Xe,R=Je,W("")}}};document.addEventListener("selectionchange",je),we.on("destroy",function(){document.removeEventListener("selectionchange",je)})}this.destroy=function(){_.parentElement&&_.parentElement.removeChild(_)}},a.TextInput=C,a.$setUserAgentForTests=function(b,w){x=b,g=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,a,v){var p=n("../lib/useragent"),f=0,m=550,c=function(){function o(l){l.$clickSelection=null;var s=l.editor;s.setDefaultHandler("mousedown",this.onMouseDown.bind(l)),s.setDefaultHandler("dblclick",this.onDoubleClick.bind(l)),s.setDefaultHandler("tripleclick",this.onTripleClick.bind(l)),s.setDefaultHandler("quadclick",this.onQuadClick.bind(l)),s.setDefaultHandler("mousewheel",this.onMouseWheel.bind(l));var r=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];r.forEach(function(u){l[u]=this[u]},this),l.selectByLines=this.extendSelectionBy.bind(l,"getLineRange"),l.selectByWords=this.extendSelectionBy.bind(l,"getWordRange")}return o.prototype.onMouseDown=function(l){var s=l.inSelection(),r=l.getDocumentPosition();this.mousedownEvent=l;var u=this.editor,d=l.getButton();if(d!==0){var g=u.getSelectionRange(),y=g.isEmpty();(y||d==1)&&u.selection.moveToPosition(r),d==2&&(u.textInput.onContextMenu(l.domEvent),p.isMozilla||l.preventDefault());return}if(this.mousedownEvent.time=Date.now(),s&&!u.isFocused()&&(u.focus(),this.$focusTimeout&&!this.$clickSelection&&!u.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(l);return}return this.captureMouse(l),this.startSelect(r,l.domEvent._clicks>1),l.preventDefault()},o.prototype.startSelect=function(l,s){l=l||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var r=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?r.selection.selectToPosition(l):s||r.selection.moveToPosition(l),s||this.select(),r.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var l,s=this.editor,r=s.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(r);if(u==-1)l=this.$clickSelection.end;else if(u==1)l=this.$clickSelection.start;else{var d=i(this.$clickSelection,r);r=d.cursor,l=d.anchor}s.selection.setSelectionAnchor(l.row,l.column)}s.selection.selectToPosition(r),s.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(l){var s,r=this.editor,u=r.renderer.screenToTextCoordinates(this.x,this.y),d=r.selection[l](u.row,u.column);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(d.start),y=this.$clickSelection.comparePoint(d.end);if(g==-1&&y<=0)s=this.$clickSelection.end,(d.end.row!=u.row||d.end.column!=u.column)&&(u=d.start);else if(y==1&&g>=0)s=this.$clickSelection.start,(d.start.row!=u.row||d.start.column!=u.column)&&(u=d.end);else if(g==-1&&y==1)u=d.end,s=d.start;else{var x=i(this.$clickSelection,u);u=x.cursor,s=x.anchor}r.selection.setSelectionAnchor(s.row,s.column)}r.selection.selectToPosition(u),r.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var l=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),s=Date.now();(l>f||s-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(l){var s=l.getDocumentPosition(),r=this.editor,u=r.session,d=u.getBracketRange(s);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=r.selection.getWordRange(s.row,s.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},o.prototype.onTripleClick=function(l){var s=l.getDocumentPosition(),r=this.editor;this.setState("selectByLines");var u=r.getSelectionRange();u.isMultiLine()&&u.contains(s.row,s.column)?(this.$clickSelection=r.selection.getLineRange(u.start.row),this.$clickSelection.end=r.selection.getLineRange(u.end.row).end):this.$clickSelection=r.selection.getLineRange(s.row),this.select()},o.prototype.onQuadClick=function(l){var s=this.editor;s.selectAll(),this.$clickSelection=s.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(l){if(!l.getAccelKey()){l.getShiftKey()&&l.wheelY&&!l.wheelX&&(l.wheelX=l.wheelY,l.wheelY=0);var s=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var r=this.$lastScroll,u=l.domEvent.timeStamp,d=u-r.t,g=d?l.wheelX/d:r.vx,y=d?l.wheelY/d:r.vy;d<m&&(g=(g+r.vx)/2,y=(y+r.vy)/2);var x=Math.abs(g/y),C=!1;if(x>=1&&s.renderer.isScrollableBy(l.wheelX*l.speed,0)&&(C=!0),x<=1&&s.renderer.isScrollableBy(0,l.wheelY*l.speed)&&(C=!0),C)r.allowed=u;else if(u-r.allowed<m){var b=Math.abs(g)<=1.5*Math.abs(r.vx)&&Math.abs(y)<=1.5*Math.abs(r.vy);b?(C=!0,r.allowed=u):r.allowed=0}if(r.t=u,r.vx=g,r.vy=y,C)return s.renderer.scrollBy(l.wheelX*l.speed,l.wheelY*l.speed),l.stop()}},o}();c.prototype.selectEnd=c.prototype.selectByLinesEnd,c.prototype.selectAllEnd=c.prototype.selectByLinesEnd,c.prototype.selectByWordsEnd=c.prototype.selectByLinesEnd,a.DefaultHandlers=c;function h(o,l,s,r){return Math.sqrt(Math.pow(s-o,2)+Math.pow(r-l,2))}function i(o,l){if(o.start.row==o.end.row)var s=2*l.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var s=l.column-4;else var s=2*l.row-o.start.row-o.end.row;return s<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,a,v){a.preventParentScroll=function(f){f.stopPropagation();var m=f.currentTarget,c=m.scrollHeight>m.clientHeight;c||f.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,a,v){var p=this&&this.__extends||function(){var u=function(d,g){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var C in x)Object.prototype.hasOwnProperty.call(x,C)&&(y[C]=x[C])},u(d,g)};return function(d,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");u(d,g);function y(){this.constructor=d}d.prototype=g===null?Object.create(g):(y.prototype=g.prototype,new y)}}(),f=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,g=d&&u[d],y=0;if(g)return g.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&y>=u.length&&(u=void 0),{value:u&&u[y++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},m=n("./lib/dom");n("./lib/event");var c=n("./range").Range,h=n("./lib/scroll").preventParentScroll,i="ace_tooltip",o=function(){function u(d){this.isOpen=!1,this.$element=null,this.$parentNode=d}return u.prototype.$init=function(){return this.$element=m.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(d){this.getElement().textContent=d},u.prototype.setHtml=function(d){this.getElement().innerHTML=d},u.prototype.setPosition=function(d,g){this.getElement().style.left=d+"px",this.getElement().style.top=g+"px"},u.prototype.setClassName=function(d){m.addCssClass(this.getElement(),d)},u.prototype.setTheme=function(d){this.$element.className=i+" "+(d.isDark?"ace_dark ":"")+(d.cssClass||"")},u.prototype.show=function(d,g,y){d!=null&&this.setText(d),g!=null&&y!=null&&this.setPosition(g,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},u.prototype.hide=function(d){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u}(),l=function(){function u(){this.popups=[]}return u.prototype.addPopup=function(d){this.popups.push(d),this.updatePopups()},u.prototype.removePopup=function(d){var g=this.popups.indexOf(d);g!==-1&&(this.popups.splice(g,1),this.updatePopups())},u.prototype.updatePopups=function(){var d,g,y,x;this.popups.sort(function(S,M){return M.priority-S.priority});var C=[];try{for(var b=f(this.popups),w=b.next();!w.done;w=b.next()){var _=w.value,I=!0;try{for(var E=(y=void 0,f(C)),k=E.next();!k.done;k=E.next()){var A=k.value;if(this.doPopupsOverlap(A,_)){I=!1;break}}}catch(S){y={error:S}}finally{try{k&&!k.done&&(x=E.return)&&x.call(E)}finally{if(y)throw y.error}}I?C.push(_):_.hide()}}catch(S){d={error:S}}finally{try{w&&!w.done&&(g=b.return)&&g.call(b)}finally{if(d)throw d.error}}},u.prototype.doPopupsOverlap=function(d,g){var y=d.getElement().getBoundingClientRect(),x=g.getElement().getBoundingClientRect();return y.left<x.right&&y.right>x.left&&y.top<x.bottom&&y.bottom>x.top},u}(),s=new l;a.popupManager=s,a.Tooltip=o;var r=function(u){p(d,u);function d(g){g===void 0&&(g=document.body);var y=u.call(this,g)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var x=y.getElement();return x.style.whiteSpace="pre-wrap",x.style.pointerEvents="auto",x.addEventListener("mouseout",y.onMouseOut),x.tabIndex=-1,x.addEventListener("blur",(function(){x.contains(document.activeElement)||this.hide()}).bind(y)),x.addEventListener("wheel",h),y}return d.prototype.addToEditor=function(g){g.on("mousemove",this.onMouseMove),g.on("mousedown",this.hide),g.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},d.prototype.removeFromEditor=function(g){g.off("mousemove",this.onMouseMove),g.off("mousedown",this.hide),g.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},d.prototype.onMouseMove=function(g,y){this.lastEvent=g,this.lastT=Date.now();var x=y.$mouseHandler.isMousePressed;if(this.isOpen){var C=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(C.row,C.column)||x||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||x||(this.lastEvent=g,this.timeout=setTimeout(this.waitForHover,this.idleTime))},d.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var g=Date.now()-this.lastT;if(this.idleTime-g>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-g);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},d.prototype.isOutsideOfText=function(g){var y=g.editor,x=g.getDocumentPosition(),C=y.session.getLine(x.row);if(x.column==C.length){var b=y.renderer.pixelToScreenCoordinates(g.clientX,g.clientY),w=y.session.documentToScreenPosition(x.row,x.column);if(w.column!=b.column||w.row!=b.row)return!0}return!1},d.prototype.setDataProvider=function(g){this.$gatherData=g},d.prototype.showForRange=function(g,y,x,C){var b=10;if(!(C&&C!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=g.renderer;this.isOpen||(s.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.addMarker(y,g.session),this.range=c.fromPoints(y.start,y.end);var _=w.textToScreenCoordinates(y.start.row,y.start.column),I=w.scroller.getBoundingClientRect();_.pageX<I.left&&(_.pageX=I.left);var E=this.getElement();E.innerHTML="",E.appendChild(x),E.style.maxHeight="",E.style.display="block";var k=E.clientHeight,A=E.clientWidth,S=window.innerHeight-_.pageY-w.lineHeight,M=!0;_.pageY-k<0&&_.pageY<S&&(M=!1),E.style.maxHeight=(M?_.pageY:S)-b+"px",E.style.top=M?"":_.pageY+w.lineHeight+"px",E.style.bottom=M?window.innerHeight-_.pageY+"px":"",E.style.left=Math.min(_.pageX,window.innerWidth-A-b)+"px"}},d.prototype.addMarker=function(g,y){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=y,this.marker=y&&y.addMarker(g,"ace_highlight-marker","text")},d.prototype.hide=function(g){!g&&document.activeElement==this.getElement()||g&&g.target&&(g.type!="keydown"||g.ctrlKey||g.metaKey)&&this.$element.contains(g.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,s.removePopup(this)))},d.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},d.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},d.prototype.onMouseOut=function(g){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!g.relatedTarget||this.getElement().contains(g.relatedTarget)||g&&g.currentTarget.contains(g.relatedTarget)||g.relatedTarget.classList.contains("ace_content")||this.hide())},d}(o);a.HoverTooltip=r}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(n,a,v){var p=this&&this.__extends||function(){var s=function(r,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,g){d.__proto__=g}||function(d,g){for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(d[y]=g[y])},s(r,u)};return function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(r,u);function d(){this.constructor=r}r.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}(),f=this&&this.__values||function(s){var r=typeof Symbol=="function"&&Symbol.iterator,u=r&&s[r],d=0;if(u)return u.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&d>=s.length&&(s=void 0),{value:s&&s[d++],done:!s}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},m=n("../lib/dom"),c=n("../lib/event"),h=n("../tooltip").Tooltip,i=n("../config").nls;n("../lib/lang");function o(s){var r=s.editor,u=r.renderer.$gutterLayer,d=new l(r);s.editor.setDefaultHandler("guttermousedown",function(w){if(!(!r.isFocused()||w.getButton()!=0)){var _=u.getRegion(w);if(_!="foldWidgets"){var I=w.getDocumentPosition().row,E=r.session.selection;if(w.getShiftKey())E.selectTo(I,0);else{if(w.domEvent.detail==2)return r.selectAll(),w.preventDefault();s.$clickSelection=r.selection.getLineRange(I)}return s.setState("selectByLines"),s.captureMouse(w),w.preventDefault()}}});var g,y;function x(){var w=y.getDocumentPosition().row,_=r.session.getLength();if(w==_){var I=r.renderer.pixelToScreenCoordinates(0,y.y).row,E=y.$pos;if(I>r.session.documentToScreenRow(E.row,E.column))return C()}if(d.showTooltip(w),!!d.isOpen)if(r.on("mousewheel",C),s.$tooltipFollowsMouse)b(y);else{var k=y.getGutterRow(),A=u.$lines.get(k);if(A){var S=A.element.querySelector(".ace_gutter_annotation"),M=S.getBoundingClientRect(),$=d.getElement().style;$.left=M.right+"px",$.top=M.bottom+"px"}else b(y)}}function C(){g&&(g=clearTimeout(g)),d.isOpen&&(d.hideTooltip(),r.off("mousewheel",C))}function b(w){d.setPosition(w.x,w.y)}s.editor.setDefaultHandler("guttermousemove",function(w){var _=w.domEvent.target||w.domEvent.srcElement;if(m.hasCssClass(_,"ace_fold-widget"))return C();d.isOpen&&s.$tooltipFollowsMouse&&b(w),y=w,!g&&(g=setTimeout(function(){g=null,y&&!s.isMousePressed?x():C()},50))}),c.addListener(r.renderer.$gutter,"mouseout",function(w){y=null,!(!d.isOpen||g)&&(g=setTimeout(function(){g=null,C()},50))},r),r.on("changeSession",C),r.on("input",C)}a.GutterHandler=o;var l=function(s){p(r,s);function r(u){var d=s.call(this,u.container)||this;return d.editor=u,d}return r.prototype.setPosition=function(u,d){var g=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,x=this.getWidth(),C=this.getHeight();u+=15,d+=15,u+x>g&&(u-=u+x-g),d+C>y&&(d-=20+C),h.prototype.setPosition.call(this,u,d)},Object.defineProperty(r,"annotationLabels",{get:function(){return{error:{singular:i("gutter-tooltip.aria-label.error.singular","error"),plural:i("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:i("gutter-tooltip.aria-label.security.singular","security finding"),plural:i("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:i("gutter-tooltip.aria-label.warning.singular","warning"),plural:i("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:i("gutter-tooltip.aria-label.info.singular","information message"),plural:i("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:i("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:i("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),r.prototype.showTooltip=function(u){var d,g=this.editor.renderer.$gutterLayer,y=g.$annotations[u],x;y?x={displayText:Array.from(y.displayText),type:Array.from(y.type)}:x={displayText:[],type:[]};var C=g.session.getFoldLine(u);if(C&&g.$showFoldedAnnotations){for(var b={error:[],security:[],warning:[],info:[],hint:[]},w={error:1,security:2,warning:3,info:4,hint:5},_,I=u+1;I<=C.end.row;I++)if(g.$annotations[I])for(var E=0;E<g.$annotations[I].text.length;E++){var k=g.$annotations[I].type[E];b[k].push(g.$annotations[I].text[E]),(!_||w[k]<w[_])&&(_=k)}if(["error","security","warning"].includes(_)){var A="".concat(r.annotationsToSummaryString(b)," in folded code.");x.displayText.push(A),x.type.push(_+"_fold")}}if(x.displayText.length===0)return this.hide();for(var S={error:[],security:[],warning:[],info:[],hint:[]},M=g.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<x.displayText.length;I++){var $=m.createElement("span"),L=m.createElement("span");(d=L.classList).add.apply(d,["ace_".concat(x.type[I]),M]),L.setAttribute("aria-label","".concat(r.annotationLabels[x.type[I].replace("_fold","")].singular)),L.setAttribute("role","img"),L.appendChild(m.createTextNode(" ")),$.appendChild(L),$.appendChild(m.createTextNode(x.displayText[I])),$.appendChild(m.createElement("br")),S[x.type[I].replace("_fold","")].push($)}var T=this.getElement();m.removeChildren(T),S.error.forEach(function(R){return T.appendChild(R)}),S.security.forEach(function(R){return T.appendChild(R)}),S.warning.forEach(function(R){return T.appendChild(R)}),S.info.forEach(function(R){return T.appendChild(R)}),S.hint.forEach(function(R){return T.appendChild(R)}),T.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},r.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},r.annotationsToSummaryString=function(u){var d,g,y=[],x=["error","security","warning","info","hint"];try{for(var C=f(x),b=C.next();!b.done;b=C.next()){var w=b.value;if(u[w].length){var _=u[w].length===1?r.annotationLabels[w].singular:r.annotationLabels[w].plural;y.push("".concat(u[w].length," ").concat(_))}}}catch(I){d={error:I}}finally{try{b&&!b.done&&(g=C.return)&&g.call(C)}finally{if(d)throw d.error}}return y.join(", ")},r}(h);a.GutterTooltip=l}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,a,v){var p=n("../lib/event"),f=n("../lib/useragent"),m=function(){function c(h,i){this.speed,this.wheelX,this.wheelY,this.domEvent=h,this.editor=i,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return c.prototype.stopPropagation=function(){p.stopPropagation(this.domEvent),this.propagationStopped=!0},c.prototype.preventDefault=function(){p.preventDefault(this.domEvent),this.defaultPrevented=!0},c.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},c.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},c.prototype.getGutterRow=function(){var h=this.getDocumentPosition().row,i=this.editor.session.documentToScreenRow(h,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return i-o},c.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,i=h.getSelectionRange();if(i.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=i.contains(o.row,o.column)}return this.$inSelection},c.prototype.getButton=function(){return p.getButton(this.domEvent)},c.prototype.getShiftKey=function(){return this.domEvent.shiftKey},c.prototype.getAccelKey=function(){return f.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},c}();a.MouseEvent=m}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,a,v){var p=n("../lib/dom"),f=n("../lib/event"),m=n("../lib/useragent"),c=200,h=200,i=5;function o(s){var r=s.editor,u=p.createElement("div");u.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",u.textContent=" ";var d=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];d.forEach(function(H){s[H]=this[H]},this),r.on("mousedown",this.onMouseDown.bind(s));var g=r.container,y,x,C,b,w,_,I=0,E,k,A,S,M;this.onDragStart=function(H){if(this.cancelDrag||!g.draggable){var W=this;return setTimeout(function(){W.startSelect(),W.captureMouse(H)},0),H.preventDefault()}w=r.getSelectionRange();var j=H.dataTransfer;j.effectAllowed=r.getReadOnly()?"copy":"copyMove",r.container.appendChild(u),j.setDragImage&&j.setDragImage(u,0,0),setTimeout(function(){r.container.removeChild(u)}),j.clearData(),j.setData("Text",r.session.getTextRange()),k=!0,this.setState("drag")},this.onDragEnd=function(H){if(g.draggable=!1,k=!1,this.setState(null),!r.getReadOnly()){var W=H.dataTransfer.dropEffect;!E&&W=="move"&&r.session.remove(r.getSelectionRange()),r.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(H){if(!(r.getReadOnly()||!N(H.dataTransfer)))return x=H.clientX,C=H.clientY,y||R(),I++,H.dataTransfer.dropEffect=E=V(H),f.preventDefault(H)},this.onDragOver=function(H){if(!(r.getReadOnly()||!N(H.dataTransfer)))return x=H.clientX,C=H.clientY,y||(R(),I++),F!==null&&(F=null),H.dataTransfer.dropEffect=E=V(H),f.preventDefault(H)},this.onDragLeave=function(H){if(I--,I<=0&&y)return P(),E=null,f.preventDefault(H)},this.onDrop=function(H){if(_){var W=H.dataTransfer;if(k)switch(E){case"move":w.contains(_.row,_.column)?w={start:_,end:_}:w=r.moveText(w,_);break;case"copy":w=r.moveText(w,_,!0);break}else{var j=W.getData("Text");w={start:_,end:r.session.insert(_,j)},r.focus(),E=null}return P(),f.preventDefault(H)}},f.addListener(g,"dragstart",this.onDragStart.bind(s),r),f.addListener(g,"dragend",this.onDragEnd.bind(s),r),f.addListener(g,"dragenter",this.onDragEnter.bind(s),r),f.addListener(g,"dragover",this.onDragOver.bind(s),r),f.addListener(g,"dragleave",this.onDragLeave.bind(s),r),f.addListener(g,"drop",this.onDrop.bind(s),r);function $(H,W){var j=Date.now(),Z=!W||H.row!=W.row,q=!W||H.column!=W.column;if(!S||Z||q)r.moveCursorToPosition(H),S=j,M={x,y:C};else{var G=l(M.x,M.y,x,C);G>i?S=null:j-S>=h&&(r.renderer.scrollCursorIntoView(),S=null)}}function L(H,W){var j=Date.now(),Z=r.renderer.layerConfig.lineHeight,q=r.renderer.layerConfig.characterWidth,G=r.renderer.scroller.getBoundingClientRect(),K={x:{left:x-G.left,right:G.right-x},y:{top:C-G.top,bottom:G.bottom-C}},ee=Math.min(K.x.left,K.x.right),te=Math.min(K.y.top,K.y.bottom),ae={row:H.row,column:H.column};ee/q<=2&&(ae.column+=K.x.left<K.x.right?-3:2),te/Z<=1&&(ae.row+=K.y.top<K.y.bottom?-1:1);var de=H.row!=ae.row,he=H.column!=ae.column,re=!W||H.row!=W.row;de||he&&!re?A?j-A>=c&&r.renderer.scrollCursorIntoView(ae):A=j:A=null}function T(){var H=_;_=r.renderer.screenToTextCoordinates(x,C),$(_,H),L(_,H)}function R(){w=r.selection.toOrientedRange(),y=r.session.addMarker(w,"ace_selection",r.getSelectionStyle()),r.clearSelection(),r.isFocused()&&r.renderer.$cursorLayer.setBlinking(!1),clearInterval(b),T(),b=setInterval(T,20),I=0,f.addListener(document,"mousemove",O)}function P(){clearInterval(b),r.session.removeMarker(y),y=null,r.selection.fromOrientedRange(w),r.isFocused()&&!k&&r.$resetCursorStyle(),w=null,_=null,I=0,A=null,S=null,f.removeListener(document,"mousemove",O)}var F=null;function O(){F==null&&(F=setTimeout(function(){F!=null&&y&&P()},20))}function N(H){var W=H.types;return!W||Array.prototype.some.call(W,function(j){return j=="text/plain"||j=="Text"})}function V(H){var W=["copy","copymove","all","uninitialized"],j=["move","copymove","linkmove","all","uninitialized"],Z=m.isMac?H.altKey:H.ctrlKey,q="uninitialized";try{q=H.dataTransfer.effectAllowed.toLowerCase()}catch{}var G="none";return Z&&W.indexOf(q)>=0?G="copy":j.indexOf(q)>=0?G="move":W.indexOf(q)>=0&&(G="copy"),G}}(function(){this.dragWait=function(){var s=Date.now()-this.mousedownEvent.time;s>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var s=this.editor.container;s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(s){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var s=this.editor,r=s.container;r.draggable=!0,s.renderer.$cursorLayer.setBlinking(!1),s.setStyle("ace_dragging");var u=m.isWin?"default":"move";s.renderer.setCursorStyle(u),this.setState("dragReady")},this.onMouseDrag=function(s){var r=this.editor.container;if(m.isIE&&this.state=="dragReady"){var u=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>3&&r.dragDrop()}if(this.state==="dragWait"){var u=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>0&&(r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(s){if(this.$dragEnabled){this.mousedownEvent=s;var r=this.editor,u=s.inSelection(),d=s.getButton(),g=s.domEvent.detail||1;if(g===1&&d===0&&u){if(s.editor.inMultiSelectMode&&(s.getAccelKey()||s.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=s.domEvent.target||s.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),r.getDragDelay()){if(m.isWebKit){this.cancelDrag=!0;var x=r.container;x.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(s,this.onMouseDrag.bind(this)),s.defaultPrevented=!0}}}}).call(o.prototype);function l(s,r,u,d){return Math.sqrt(Math.pow(u-s,2)+Math.pow(d-r,2))}a.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,a,v){var p=n("./mouse_event").MouseEvent,f=n("../lib/event"),m=n("../lib/dom");a.addTouchListeners=function(c,h){var i="scroll",o,l,s,r,u,d,g=0,y,x=0,C=0,b=0,w,_;function I(){var $=window.navigator&&window.navigator.clipboard,L=!1,T=function(){var F=h.getCopyText(),O=h.session.getUndoManager().hasUndo();_.replaceChild(m.buildDom(L?["span",!F&&R("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],F&&R("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],F&&R("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&R("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],O&&R("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],R("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],R("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),_.firstChild)},R=function(F){return h.commands.canExecute(F,h)},P=function(F){var O=F.target.getAttribute("action");if(O=="more"||!L)return L=!L,T();O=="paste"?$.readText().then(function(N){h.execCommand(O,N)}):O&&((O=="cut"||O=="copy")&&($?$.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(O)),_.firstChild.style.display="none",L=!1,O!="openCommandPalette"&&h.focus()};_=m.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(F){i="menu",F.stopPropagation(),F.preventDefault(),h.textInput.focus()},ontouchend:function(F){F.stopPropagation(),F.preventDefault(),P(F)},onclick:P},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function E(){if(!h.getOption("enableMobileMenu")){_&&k();return}_||I();var $=h.selection.cursor,L=h.renderer.textToScreenCoordinates($.row,$.column),T=h.renderer.textToScreenCoordinates(0,0).pageX,R=h.renderer.scrollLeft,P=h.container.getBoundingClientRect();_.style.top=L.pageY-P.top-3+"px",L.pageX-P.left<P.width-70?(_.style.left="",_.style.right="10px"):(_.style.right="",_.style.left=T+R-P.left+"px"),_.style.display="",_.firstChild.style.display="none",h.on("input",k)}function k($){_&&(_.style.display="none"),h.off("input",k)}function A(){u=null,clearTimeout(u);var $=h.selection.getRange(),L=$.contains(y.row,y.column);($.isEmpty()||!L)&&(h.selection.moveToPosition(y),h.selection.selectWord()),i="wait",E()}function S(){u=null,clearTimeout(u),h.selection.moveToPosition(y);var $=x>=2?h.selection.getLineRange(y.row):h.session.getBracketRange(y);$&&!$.isEmpty()?h.selection.setRange($):h.selection.selectWord(),i="wait"}f.addListener(c,"contextmenu",function($){if(w){var L=h.textInput.getElement();L.focus()}},h),f.addListener(c,"touchstart",function($){var L=$.touches;if(u||L.length>1){clearTimeout(u),u=null,s=-1,i="zoom";return}w=h.$mouseHandler.isMousePressed=!0;var T=h.renderer.layerConfig.lineHeight,R=h.renderer.layerConfig.lineHeight,P=$.timeStamp;r=P;var F=L[0],O=F.clientX,N=F.clientY;Math.abs(o-O)+Math.abs(l-N)>T&&(s=-1),o=$.clientX=O,l=$.clientY=N,C=b=0;var V=new p($,h);if(y=V.getDocumentPosition(),P-s<500&&L.length==1&&!g)x++,$.preventDefault(),$.button=0,S();else{x=0;var H=h.selection.cursor,W=h.selection.isEmpty()?H:h.selection.anchor,j=h.renderer.$cursorLayer.getPixelPosition(H,!0),Z=h.renderer.$cursorLayer.getPixelPosition(W,!0),q=h.renderer.scroller.getBoundingClientRect(),G=h.renderer.layerConfig.offset,K=h.renderer.scrollLeft,ee=function(de,he){return de=de/R,he=he/T-.75,de*de+he*he};if($.clientX<q.left){i="zoom";return}var te=ee($.clientX-q.left-j.left+K,$.clientY-q.top-j.top+G),ae=ee($.clientX-q.left-Z.left+K,$.clientY-q.top-Z.top+G);te<3.5&&ae<3.5&&(i=te>ae?"cursor":"anchor"),ae<3.5?i="anchor":te<3.5?i="cursor":i="scroll",u=setTimeout(A,450)}s=P},h),f.addListener(c,"touchend",function($){w=h.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),i=="zoom"?(i="",g=0):u?(h.selection.moveToPosition(y),g=0,E()):i=="scroll"?(M(),k()):E(),clearTimeout(u),u=null},h),f.addListener(c,"touchmove",function($){u&&(clearTimeout(u),u=null);var L=$.touches;if(!(L.length>1||i=="zoom")){var T=L[0],R=o-T.clientX,P=l-T.clientY;if(i=="wait")if(R*R+P*P>4)i="cursor";else return $.preventDefault();o=T.clientX,l=T.clientY,$.clientX=T.clientX,$.clientY=T.clientY;var F=$.timeStamp,O=F-r;if(r=F,i=="scroll"){var N=new p($,h);N.speed=1,N.wheelX=R,N.wheelY=P,10*Math.abs(R)<Math.abs(P)&&(R=0),10*Math.abs(P)<Math.abs(R)&&(P=0),O!=0&&(C=R/O,b=P/O),h._emit("mousewheel",N),N.propagationStopped||(C=b=0)}else{var V=new p($,h),H=V.getDocumentPosition();i=="cursor"?h.selection.moveCursorToPosition(H):i=="anchor"&&h.selection.setSelectionAnchor(H.row,H.column),h.renderer.scrollCursorIntoView(H),$.preventDefault()}}},h);function M(){g+=60,d=setInterval(function(){g--<=0&&(clearInterval(d),d=null),Math.abs(C)<.01&&(C=0),Math.abs(b)<.01&&(b=0),g<20&&(C=.9*C),g<20&&(b=.9*b);var $=h.session.getScrollTop();h.renderer.scrollBy(10*C,10*b),$==h.session.getScrollTop()&&(g=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,a,v){var p=n("../lib/event"),f=n("../lib/useragent"),m=n("./default_handlers").DefaultHandlers,c=n("./default_gutter_handler").GutterHandler,h=n("./mouse_event").MouseEvent,i=n("./dragdrop_handler").DragdropHandler,o=n("./touch_handler").addTouchListeners,l=n("../config"),s=function(){function r(u){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var d=this;this.editor=u,new m(this),new c(this),new i(this);var g=function(C){var b=!document.hasFocus||!document.hasFocus()||!u.isFocused()&&document.activeElement==(u.textInput&&u.textInput.getElement());b&&window.focus(),u.focus(),setTimeout(function(){u.isFocused()||u.focus()})},y=u.renderer.getMouseEventTarget();p.addListener(y,"click",this.onMouseEvent.bind(this,"click"),u),p.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),u),p.addMultiMouseDownListener([y,u.renderer.scrollBarV&&u.renderer.scrollBarV.inner,u.renderer.scrollBarH&&u.renderer.scrollBarH.inner,u.textInput&&u.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",u),p.addMouseWheelListener(u.container,this.onMouseWheel.bind(this,"mousewheel"),u),o(u.container,u);var x=u.renderer.$gutter;p.addListener(x,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),u),p.addListener(x,"click",this.onMouseEvent.bind(this,"gutterclick"),u),p.addListener(x,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),u),p.addListener(x,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),u),p.addListener(y,"mousedown",g,u),p.addListener(x,"mousedown",g,u),f.isIE&&u.renderer.scrollBarV&&(p.addListener(u.renderer.scrollBarV.element,"mousedown",g,u),p.addListener(u.renderer.scrollBarH.element,"mousedown",g,u)),u.on("mousemove",function(C){if(!(d.state||d.$dragDelay||!d.$dragEnabled)){var b=u.renderer.screenToTextCoordinates(C.x,C.y),w=u.session.selection.getRange(),_=u.renderer;!w.isEmpty()&&w.insideStart(b.row,b.column)?_.setCursorStyle("default"):_.setCursorStyle("")}},u)}return r.prototype.onMouseEvent=function(u,d){this.editor.session&&this.editor._emit(u,new h(d,this.editor))},r.prototype.onMouseMove=function(u,d){var g=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!g||!g.length||this.editor._emit(u,new h(d,this.editor))},r.prototype.onMouseWheel=function(u,d){var g=new h(d,this.editor);g.speed=this.$scrollSpeed*2,g.wheelX=d.wheelX,g.wheelY=d.wheelY,this.editor._emit(u,g)},r.prototype.setState=function(u){this.state=u},r.prototype.captureMouse=function(u,d){this.x=u.x,this.y=u.y,this.isMousePressed=!0;var g=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var x=this,C=function(E){if(E){if(f.isWebKit&&!E.which&&x.releaseMouse)return x.releaseMouse();x.x=E.clientX,x.y=E.clientY,d&&d(E),x.mouseEvent=new h(E,x.editor),x.$mouseMoved=!0}},b=function(E){g.off("beforeEndOperation",_),clearInterval(I),g.session&&w(),x[x.state+"End"]&&x[x.state+"End"](E),x.state="",x.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),x.$onCaptureMouseMove=x.releaseMouse=null,E&&x.onMouseEvent("mouseup",E),g.endOperation()},w=function(){x[x.state]&&x[x.state](),x.$mouseMoved=!1};if(f.isOldIE&&u.domEvent.type=="dblclick")return setTimeout(function(){b(u)});var _=function(E){x.releaseMouse&&g.curOp.command.name&&g.curOp.selectionChanged&&(x[x.state+"End"]&&x[x.state+"End"](),x.state="",x.releaseMouse())};g.on("beforeEndOperation",_),g.startOperation({command:{name:"mouse"}}),x.$onCaptureMouseMove=C,x.releaseMouse=p.capture(this.editor.container,C,b);var I=setInterval(w,20)},r.prototype.cancelContextMenu=function(){var u=(function(d){d&&d.domEvent&&d.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",u),d&&d.domEvent&&p.stopEvent(d.domEvent))}).bind(this);setTimeout(u,10),this.editor.on("nativecontextmenu",u)},r.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},r}();s.prototype.releaseMouse=null,l.defineOptions(s.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:f.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),a.MouseHandler=s}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,a,v){var p=n("../lib/dom"),f=function(){function m(c){c.on("click",function(h){var i=h.getDocumentPosition(),o=c.session,l=o.getFoldAt(i.row,i.column,1);l&&(h.getAccelKey()?o.removeFold(l):o.expandFold(l),h.stop());var s=h.domEvent&&h.domEvent.target;s&&p.hasCssClass(s,"ace_inline_button")&&p.hasCssClass(s,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),c.renderer.scrollCursorIntoView())}),c.on("gutterclick",function(h){var i=c.renderer.$gutterLayer.getRegion(h);if(i=="foldWidgets"){var o=h.getDocumentPosition().row,l=c.session;l.foldWidgets&&l.foldWidgets[o]&&c.session.onFoldWidgetClick(o,h),c.isFocused()||c.focus(),h.stop()}}),c.on("gutterdblclick",function(h){var i=c.renderer.$gutterLayer.getRegion(h);if(i=="foldWidgets"){var o=h.getDocumentPosition().row,l=c.session,s=l.getParentFoldRangeData(o,!0),r=s.range||s.firstRange;if(r){o=r.start.row;var u=l.getFoldAt(o,l.getLine(o).length,1);u?l.removeFold(u):(l.addFold("...",r),c.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}h.stop()}})}return m}();a.FoldHandler=f}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,a,v){var p=n("../lib/keys"),f=n("../lib/event"),m=function(){function c(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return c.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},c.prototype.setKeyboardHandler=function(h){var i=this.$handlers;if(i[i.length-1]!=h){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(h,1)}},c.prototype.addKeyboardHandler=function(h,i){if(h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var o=this.$handlers.indexOf(h);o!=-1&&this.$handlers.splice(o,1),i==null?this.$handlers.push(h):this.$handlers.splice(i,0,h),o==-1&&h.attach&&h.attach(this.$editor)}},c.prototype.removeKeyboardHandler=function(h){var i=this.$handlers.indexOf(h);return i==-1?!1:(this.$handlers.splice(i,1),h.detach&&h.detach(this.$editor),!0)},c.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},c.prototype.getStatusText=function(){var h=this.$data,i=h.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(i,h)||""}).filter(Boolean).join(" ")},c.prototype.$callKeyboardHandlers=function(h,i,o,l){for(var s,r=!1,u=this.$editor.commands,d=this.$handlers.length;d--&&(s=this.$handlers[d].handleKeyboard(this.$data,h,i,o,l),!(!(!s||!s.command)&&(s.command=="null"?r=!0:r=u.exec(s.command,this.$editor,s.args,l),r&&l&&h!=-1&&s.passEvent!=!0&&s.command.passEvent!=!0&&f.stopEvent(l),r))););return!r&&h==-1&&(s={command:"insertstring"},r=u.exec("insertstring",this.$editor,i)),r&&this.$editor._signal&&this.$editor._signal("keyboardActivity",s),r},c.prototype.onCommandKey=function(h,i,o){var l=p.keyCodeToString(o);return this.$callKeyboardHandlers(i,l,o,h)},c.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},c}();a.KeyBinding=m}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,a,v){var p=0,f=0,m=!1,c=!1,h=!1,i=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],l=0,s=1,r=0,u=1,d=2,g=3,y=4,x=5,C=6,b=7,w=8,_=9,I=10,E=11,k=12,A=13,S=14,M=15,$=16,L=17,T=18,R=[T,T,T,T,T,T,T,T,T,C,x,C,w,x,T,T,T,T,T,T,T,T,T,T,T,T,T,T,x,x,x,C,w,y,y,E,E,E,y,y,y,y,y,I,_,I,_,_,d,d,d,d,d,d,d,d,d,d,_,y,y,y,y,y,y,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,y,y,y,y,y,y,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,y,y,y,y,T,T,T,T,T,T,x,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,_,y,E,E,E,E,y,y,y,y,r,y,y,T,y,y,E,E,d,d,y,r,y,y,y,d,r,y,y,y,y,y],P=[w,w,w,w,w,w,w,w,w,w,w,T,T,T,r,u,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w,x,A,S,M,$,L,_,E,E,E,E,E,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,_,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w];function F(H,W,j,Z){var q=p?o:i,G=null,K=null,ee=null,te=0,ae=null,de=null,he=-1,re=null,ue=null,ne=[];if(!Z)for(re=0,Z=[];re<j;re++)Z[re]=V(H[re]);for(f=p,m=!1,c=!1,h=!1,ue=0;ue<j;ue++){if(G=te,ne[ue]=K=N(H,Z,ne,ue),te=q[G][K],ae=te&240,te&=15,W[ue]=ee=q[te][5],ae>0)if(ae==16){for(re=he;re<ue;re++)W[re]=1;he=-1}else he=-1;if(de=q[te][6],de)he==-1&&(he=ue);else if(he>-1){for(re=he;re<ue;re++)W[re]=ee;he=-1}Z[ue]==x&&(W[ue]=0),f|=ee}if(h){for(re=0;re<j;re++)if(Z[re]==C){W[re]=p;for(var pe=re-1;pe>=0&&Z[pe]==w;pe--)W[pe]=p}}}function O(H,W,j){if(!(f<H)){if(H==1&&p==s&&!c){j.reverse();return}for(var Z=j.length,q=0,G,K,ee,te;q<Z;){if(W[q]>=H){for(G=q+1;G<Z&&W[G]>=H;)G++;for(K=q,ee=G-1;K<ee;K++,ee--)te=j[K],j[K]=j[ee],j[ee]=te;q=G}q++}}}function N(H,W,j,Z){var q=W[Z],G,K,ee,te;switch(q){case r:case u:m=!1;case y:case g:return q;case d:return m?g:d;case b:return m=!0,u;case w:return y;case _:return Z<1||Z+1>=W.length||(G=j[Z-1])!=d&&G!=g||(K=W[Z+1])!=d&&K!=g?y:(m&&(K=g),K==G?K:y);case I:return G=Z>0?j[Z-1]:x,G==d&&Z+1<W.length&&W[Z+1]==d?d:y;case E:if(Z>0&&j[Z-1]==d)return d;if(m)return y;for(te=Z+1,ee=W.length;te<ee&&W[te]==E;)te++;return te<ee&&W[te]==d?d:y;case k:for(ee=W.length,te=Z+1;te<ee&&W[te]==k;)te++;if(te<ee){var ae=H[Z],de=ae>=1425&&ae<=2303||ae==64286;if(G=W[te],de&&(G==u||G==b))return u}return Z<1||(G=W[Z-1])==x?y:j[Z-1];case x:return m=!1,c=!0,p;case C:return h=!0,y;case A:case S:case $:case L:case M:m=!1;case T:return y}}function V(H){var W=H.charCodeAt(0),j=W>>8;return j==0?W>191?r:R[W]:j==5?/[\u0591-\u05f4]/.test(H)?u:r:j==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(H)?k:/[\u0660-\u0669\u066b-\u066c]/.test(H)?g:W==1642?E:/[\u06f0-\u06f9]/.test(H)?d:b:j==32&&W<=8287?P[W&255]:j==254&&W>=65136?b:y}a.L=r,a.R=u,a.EN=d,a.ON_R=3,a.AN=4,a.R_H=5,a.B=6,a.RLE=7,a.DOT="·",a.doBidiReorder=function(H,W,j){if(H.length<2)return{};var Z=H.split(""),q=new Array(Z.length),G=new Array(Z.length),K=[];p=j?s:l,F(Z,K,Z.length,W);for(var ee=0;ee<q.length;q[ee]=ee,ee++);O(2,K,q),O(1,K,q);for(var ee=0;ee<q.length-1;ee++)W[ee]===g?K[ee]=a.AN:K[ee]===u&&(W[ee]>b&&W[ee]<A||W[ee]===y||W[ee]===T)?K[ee]=a.ON_R:ee>0&&Z[ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(Z[ee])&&(K[ee-1]=K[ee]=a.R_H,ee++);Z[Z.length-1]===a.DOT&&(K[Z.length-1]=a.B),Z[0]===""&&(K[0]=a.RLE);for(var ee=0;ee<q.length;ee++)G[ee]=K[q[ee]];return{logicalFromVisual:q,bidiLevels:G}},a.hasBidiCharacters=function(H,W){for(var j=!1,Z=0;Z<H.length;Z++)W[Z]=V(H.charAt(Z)),!j&&(W[Z]==u||W[Z]==b||W[Z]==g)&&(j=!0);return j},a.getVisualFromLogicalIdx=function(H,W){for(var j=0;j<W.logicalFromVisual.length;j++)if(W.logicalFromVisual[j]==H)return j;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,a,v){var p=n("./lib/bidiutil"),f=n("./lib/lang"),m=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,c=function(){function h(i){this.session=i,this.bidiMap={},this.currentRow=null,this.bidiUtil=p,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=m.test(i.getValue())}return h.prototype.isBidiRow=function(i,o,l){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(o,l),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(i){this.seenBidi?this.currentRow=null:i.action=="insert"&&m.test(i.lines.join(`
|
|
`))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var i=0,o=this.session.$screenRowCache;if(o.length){var l=this.session.$getRowCacheIndex(o,this.currentRow);l>=0&&(i=this.session.$docRowCache[l])}return i},h.prototype.getSplitIndex=function(){var i=0,o=this.session.$screenRowCache;if(o.length)for(var l,s=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-i>0&&(l=this.session.$getRowCacheIndex(o,this.currentRow-i-1),l===s);)s=l,i++;else i=this.currentRow;return i},h.prototype.updateRowLine=function(i,o){i===void 0&&(i=this.getDocumentRow());var l=i===this.session.getLength()-1,s=l?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(i),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var r=this.session.$wrapData[i];r&&(o===void 0&&(o=this.getSplitIndex()),o>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[p.L],this.line=o<r.length?this.line.substring(r[o-1],r[o]):this.line.substring(r[r.length-1])):this.line=this.line.substring(0,r[o]),o==r.length&&(this.line+=this.showInvisibles?s:p.DOT))}else this.line+=this.showInvisibles?s:p.DOT;var u=this.session,d=0,g;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,x){return y===" "||u.isFullWidth(y.charCodeAt(0))?(g=y===" "?u.getScreenTabSize(x+d):2,d+=g-1,f.stringRepeat(p.DOT,g)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==p.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},h.prototype.updateBidiMap=function(){var i=[];p.hasBidiCharacters(this.line,i)||this.isRtlDir?this.bidiMap=p.doBidiReorder(this.line,i,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(i){if(this.characterWidth!==i.$characterSize.width){this.fontMetrics=i;var o=this.characterWidth=i.$characterSize.width,l=i.$measureCharWidth("ה");this.charWidths[p.L]=this.charWidths[p.EN]=this.charWidths[p.ON_R]=o,this.charWidths[p.R]=this.charWidths[p.AN]=l,this.charWidths[p.R_H]=l*.45,this.charWidths[p.B]=this.charWidths[p.RLE]=0,this.currentRow=null}},h.prototype.setShowInvisibles=function(i){this.showInvisibles=i,this.currentRow=null},h.prototype.setEolChar=function(i){this.EOL=i},h.prototype.setContentWidth=function(i){this.contentWidth=i},h.prototype.isRtlLine=function(i){return this.$isRtl?!0:i!=null?this.session.getLine(i).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(i,o){for(var l=i.getCursorPosition(),s=i.selection.getSelectionAnchor().row;s<=l.row;s++)!o&&i.session.getLine(s).charAt(0)===i.session.$bidiHandler.RLE?i.session.doc.removeInLine(s,0,1):o&&i.session.getLine(s).charAt(0)!==i.session.$bidiHandler.RLE&&i.session.doc.insert({column:0,row:s},i.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(i){i-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,l=i>o?this.session.getOverwrite()?i:i-1:o,s=p.getVisualFromLogicalIdx(l,this.bidiMap),r=this.bidiMap.bidiLevels,u=0;!this.session.getOverwrite()&&i<=o&&r[s]%2!==0&&s++;for(var d=0;d<s;d++)u+=this.charWidths[r[d]];return!this.session.getOverwrite()&&i>o&&r[s]%2===0&&(u+=this.charWidths[r[s]]),this.wrapIndent&&(u+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(u+=this.rtlLineOffset),u},h.prototype.getSelections=function(i,o){var l=this.bidiMap,s=l.bidiLevels,r,u=[],d=0,g=Math.min(i,o)-this.wrapIndent,y=Math.max(i,o)-this.wrapIndent,x=!1,C=!1,b=0;this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,_=0;_<s.length;_++)w=l.logicalFromVisual[_],r=s[_],x=w>=g&&w<y,x&&!C?b=d:!x&&C&&u.push({left:b,width:d-b}),d+=this.charWidths[r],C=x;if(x&&_===s.length&&u.push({left:b,width:d-b}),this.isRtlDir)for(var I=0;I<u.length;I++)u[I].left+=this.rtlLineOffset;return u},h.prototype.offsetToCol=function(l){this.isRtlDir&&(l-=this.rtlLineOffset);var o=0,l=Math.max(l,0),s=0,r=0,u=this.bidiMap.bidiLevels,d=this.charWidths[u[r]];for(this.wrapIndent&&(l-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);l>s+d/2;){if(s+=d,r===u.length-1){d=0;break}d=this.charWidths[u[++r]]}return r>0&&u[r-1]%2!==0&&u[r]%2===0?(l<s&&r--,o=this.bidiMap.logicalFromVisual[r]):r>0&&u[r-1]%2===0&&u[r]%2!==0?o=1+(l>s?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===u.length-1&&d===0&&u[r-1]%2===0||!this.isRtlDir&&r===0&&u[r]%2!==0?o=1+this.bidiMap.logicalFromVisual[r]:(r>0&&u[r-1]%2!==0&&d!==0&&r--,o=this.bidiMap.logicalFromVisual[r]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},h}();a.BidiHandler=c}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,a,v){var p=n("./lib/oop"),f=n("./lib/lang"),m=n("./lib/event_emitter").EventEmitter,c=n("./range").Range,h=function(){function i(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var l=this;this.cursor.on("change",function(s){l.$cursorChanged=!0,l.$silent||l._emit("changeCursor"),!l.$isEmpty&&!l.$silent&&l._emit("changeSelection"),!l.$keepDesiredColumnOnChange&&s.old.column!=s.value.column&&(l.$desiredColumn=null)}),this.anchor.on("change",function(){l.$anchorChanged=!0,!l.$isEmpty&&!l.$silent&&l._emit("changeSelection")})}return i.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},i.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},i.prototype.getCursor=function(){return this.lead.getPosition()},i.prototype.setAnchor=function(o,l){this.$isEmpty=!1,this.anchor.setPosition(o,l)},i.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},i.prototype.getSelectionLead=function(){return this.lead.getPosition()},i.prototype.isBackwards=function(){var o=this.anchor,l=this.lead;return o.row>l.row||o.row==l.row&&o.column>l.column},i.prototype.getRange=function(){var o=this.anchor,l=this.lead;return this.$isEmpty?c.fromPoints(l,l):this.isBackwards()?c.fromPoints(l,o):c.fromPoints(o,l)},i.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},i.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},i.prototype.setRange=function(o,l){var s=l?o.end:o.start,r=l?o.start:o.end;this.$setSelection(s.row,s.column,r.row,r.column)},i.prototype.$setSelection=function(o,l,s,r){if(!this.$silent){var u=this.$isEmpty,d=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,l),this.cursor.setPosition(s,r),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||u!=this.$isEmpty||d)&&this._emit("changeSelection")}},i.prototype.$moveSelection=function(o){var l=this.lead;this.$isEmpty&&this.setSelectionAnchor(l.row,l.column),o.call(this)},i.prototype.selectTo=function(o,l){this.$moveSelection(function(){this.moveCursorTo(o,l)})},i.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},i.prototype.moveTo=function(o,l){this.clearSelection(),this.moveCursorTo(o,l)},i.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},i.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},i.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},i.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},i.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},i.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},i.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},i.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},i.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},i.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},i.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},i.prototype.getWordRange=function(o,l){if(typeof l>"u"){var s=o||this.lead;o=s.row,l=s.column}return this.session.getWordRange(o,l)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var o=this.getCursor(),l=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(l)},i.prototype.getLineRange=function(o,l){var s=typeof o=="number"?o:this.lead.row,r,u=this.session.getFoldLine(s);return u?(s=u.start.row,r=u.end.row):r=s,l===!0?new c(s,0,r,this.session.getLine(r).length):new c(s,0,r+1,0)},i.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},i.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},i.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},i.prototype.wouldMoveIntoSoftTab=function(o,l,s){var r=o.column,u=o.column+l;return s<0&&(r=o.column-l,u=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(r,u).split(" ").length-1==l},i.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),l;if(l=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(l.start.row,l.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var s=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,s,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-s):this.moveCursorBy(0,-1)}},i.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),l;if(l=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(l.end.row,l.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var s=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,s,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,s):this.moveCursorBy(0,1)}},i.prototype.moveCursorLineStart=function(){var o=this.lead.row,l=this.lead.column,s=this.session.documentToScreenRow(o,l),r=this.session.screenToDocumentPosition(s,0),u=this.session.getDisplayLine(o,null,r.row,r.column),d=u.match(/^\s*/);d[0].length!=l&&!this.session.$useEmacsStyleLineStart&&(r.column+=d[0].length),this.moveCursorToPosition(r)},i.prototype.moveCursorLineEnd=function(){var o=this.lead,l=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==l.column){var s=this.session.getLine(l.row);if(l.column==s.length){var r=s.search(/\s+$/);r>0&&(l.column=r)}}this.moveCursorTo(l.row,l.column)},i.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,l=this.doc.getLine(o).length;this.moveCursorTo(o,l)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,l=this.lead.column,s=this.doc.getLine(o),r=s.substring(l);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var u=this.session.getFoldAt(o,l,1);if(u){this.moveCursorTo(u.end.row,u.end.column);return}if(this.session.nonTokenRe.exec(r)&&(l+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=s.substring(l)),l>=s.length){this.moveCursorTo(o,s.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(r)&&(l+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,l)},i.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,l=this.lead.column,s;if(s=this.session.getFoldAt(o,l,-1)){this.moveCursorTo(s.start.row,s.start.column);return}var r=this.session.getFoldStringAt(o,l,-1);r==null&&(r=this.doc.getLine(o).substring(0,l));var u=f.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(u)&&(l-=this.session.nonTokenRe.lastIndex,u=u.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),l<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(u)&&(l-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,l)},i.prototype.$shortWordEndIndex=function(o){var l=0,s,r=/\s/,u=this.session.tokenRe;if(u.lastIndex=0,this.session.tokenRe.exec(o))l=this.session.tokenRe.lastIndex;else{for(;(s=o[l])&&r.test(s);)l++;if(l<1){for(u.lastIndex=0;(s=o[l])&&!u.test(s);)if(u.lastIndex=0,l++,r.test(s))if(l>2){l--;break}else{for(;(s=o[l])&&r.test(s);)l++;if(l>2)break}}}return u.lastIndex=0,l},i.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,l=this.lead.column,s=this.doc.getLine(o),r=s.substring(l),u=this.session.getFoldAt(o,l,1);if(u)return this.moveCursorTo(u.end.row,u.end.column);if(l==s.length){var d=this.doc.getLength();do o++,r=this.doc.getLine(o);while(o<d&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),l=0}var g=this.$shortWordEndIndex(r);this.moveCursorTo(o,l+g)},i.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,l=this.lead.column,s;if(s=this.session.getFoldAt(o,l,-1))return this.moveCursorTo(s.start.row,s.start.column);var r=this.session.getLine(o).substring(0,l);if(l===0){do o--,r=this.doc.getLine(o);while(o>0&&/^\s*$/.test(r));l=r.length,/\s+$/.test(r)||(r="")}var u=f.stringReverse(r),d=this.$shortWordEndIndex(u);return this.moveCursorTo(o,l-d)},i.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},i.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},i.prototype.moveCursorBy=function(o,l){var s=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r;if(l===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(s.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(s.column),s.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=s.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?s.column=this.$desiredColumn:this.$desiredColumn=s.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var u=this.session.lineWidgets[this.lead.row];o<0?o-=u.rowsAbove||0:o>0&&(o+=u.rowCount-(u.rowsAbove||0))}var d=this.session.screenToDocumentPosition(s.row+o,s.column,r);o!==0&&l===0&&d.row===this.lead.row&&(d.column,this.lead.column),this.moveCursorTo(d.row,d.column+l,l===0)},i.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},i.prototype.moveCursorTo=function(o,l,s){var r=this.session.getFoldAt(o,l,1);r&&(o=r.start.row,l=r.start.column),this.$keepDesiredColumnOnChange=!0;var u=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(u.charAt(l))&&u.charAt(l-1)&&(this.lead.row==o&&this.lead.column==l+1?l=l-1:l=l+1),this.lead.setPosition(o,l),this.$keepDesiredColumnOnChange=!1,s||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(o,l,s){var r=this.session.screenToDocumentPosition(o,l);this.moveCursorTo(r.row,r.column,s)},i.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},i.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},i.prototype.toOrientedRange=function(o){var l=this.getRange();return o?(o.start.column=l.start.column,o.start.row=l.start.row,o.end.column=l.end.column,o.end.row=l.end.row):o=l,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},i.prototype.getRangeOfMovements=function(o){var l=this.getCursor();try{o(this);var s=this.getCursor();return c.fromPoints(l,s)}catch{return c.fromPoints(l,l)}finally{this.moveCursorToPosition(l)}},i.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(l){var s=l.clone();return s.isBackwards=l.cursor==l.start,s});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o},i.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var l=o.length;l--;){var s=c.fromPoints(o[l].start,o[l].end);o[l].isBackwards&&(s.cursor=s.start),this.addRange(s,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},i.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var l=this.ranges.length;l--;)if(!this.ranges[l].isEqual(o[l]))return!1;return!0},i}();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,p.implement(h.prototype,m),a.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,a,v){var p=n("./lib/report_error").reportError,f=2e3,m=function(){function c(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var i in this.states){for(var o=this.states[i],l=[],s=0,r=this.matchMappings[i]={defaultToken:"text"},u="g",d=[],g=0;g<o.length;g++){var y=o[g];if(y.defaultToken&&(r.defaultToken=y.defaultToken),y.caseInsensitive&&u.indexOf("i")===-1&&(u+="i"),y.unicode&&u.indexOf("u")===-1&&(u+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var x=y.regex,C=new RegExp("(?:("+x+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||C==1?y.token=y.token[0]:C-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:C-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(C>1?y.onMatch=this.$applyToken:y.onMatch=y.token),C>1&&(/\\\d/.test(y.regex)?x=y.regex.replace(/\\([0-9]+)/g,function(b,w){return"\\"+(parseInt(w,10)+s+1)}):(C=1,x=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&d.push(y)),r[s]=g,s+=C,l.push(x),y.onMatch||(y.onMatch=null)}}l.length||(r[0]=0,l.push("$")),d.forEach(function(b){b.splitRegex=this.createSplitterRegexp(b.regex,u)},this),this.regExps[i]=new RegExp("("+l.join(")|(")+")|($)",u)}}return c.prototype.$setMaxTokenCount=function(h){f=h|0},c.prototype.$applyToken=function(h){var i=this.splitRegex.exec(h).slice(1),o=this.token.apply(this,i);if(typeof o=="string")return[{type:o,value:h}];for(var l=[],s=0,r=o.length;s<r;s++)i[s]&&(l[l.length]={type:o[s],value:i[s]});return l},c.prototype.$arrayTokens=function(h){if(!h)return[];var i=this.splitRegex.exec(h);if(!i)return"text";for(var o=[],l=this.tokenArray,s=0,r=l.length;s<r;s++)i[s+1]&&(o[o.length]={type:l[s],value:i[s+1]});return o},c.prototype.removeCapturingGroups=function(h){var i=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,l){return l?"(?:":o});return i},c.prototype.createSplitterRegexp=function(h,i){if(h.indexOf("(?=")!=-1){var o=0,l=!1,s={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(r,u,d,g,y,x){return l?l=y!="]":y?l=!0:g?(o==s.stack&&(s.end=x+1,s.stack=-1),o--):d&&(o++,d.length!=1&&(s.stack=o,s.start=x)),r}),s.end!=null&&/^\)*$/.test(h.substr(s.end))&&(h=h.substring(0,s.start)+h.substr(s.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(i||"").replace("g",""))},c.prototype.getLineTokens=function(h,i){if(i&&typeof i!="string"){var o=i.slice(0);i=o[0],i==="#tmp"&&(o.shift(),i=o.shift())}else var o=[];var l=i||"start",s=this.states[l];s||(l="start",s=this.states[l]);var r=this.matchMappings[l],u=this.regExps[l];u.lastIndex=0;for(var d,g=[],y=0,x=0,C={type:null,value:""};d=u.exec(h);){var b=r.defaultToken,w=null,_=d[0],I=u.lastIndex;if(I-_.length>y){var E=h.substring(y,I-_.length);C.type==b?C.value+=E:(C.type&&g.push(C),C={type:b,value:E})}for(var k=0;k<d.length-2;k++)if(d[k+1]!==void 0){w=s[r[k]],w.onMatch?b=w.onMatch(_,l,o,h):b=w.token,w.next&&(typeof w.next=="string"?l=w.next:l=w.next(l,o),s=this.states[l],s||(this.reportError("state doesn't exist",l),l="start",s=this.states[l]),r=this.matchMappings[l],y=I,u=this.regExps[l],u.lastIndex=I),w.consumeLineEnd&&(y=I);break}if(_){if(typeof b=="string")(!w||w.merge!==!1)&&C.type===b?C.value+=_:(C.type&&g.push(C),C={type:b,value:_});else if(b){C.type&&g.push(C),C={type:null,value:""};for(var k=0;k<b.length;k++)g.push(b[k])}}if(y==h.length)break;if(y=I,x++>f){for(x>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:h});y<h.length;)C.type&&g.push(C),C={value:h.substring(y,y+=500),type:"overflow"};l="start",o=[];break}}return C.type&&g.push(C),o.length>1&&o[0]!==l&&o.unshift("#tmp",l),{tokens:g,state:o.length?o:l}},c}();m.prototype.reportError=p,a.Tokenizer=m}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,a,v){var p=n("../lib/deep_copy").deepCopy,f;f=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(h,i){if(!i){for(var o in h)this.$rules[o]=h[o];return}for(var o in h){for(var l=h[o],s=0;s<l.length;s++){var r=l[s];(r.next||r.onMatch)&&(typeof r.next=="string"&&r.next.indexOf(i)!==0&&(r.next=i+r.next),r.nextState&&r.nextState.indexOf(i)!==0&&(r.nextState=i+r.nextState))}this.$rules[i+o]=l}},this.getRules=function(){return this.$rules},this.embedRules=function(h,i,o,l,s){var r=typeof h=="function"?new h().getRules():h;if(l)for(var u=0;u<l.length;u++)l[u]=i+l[u];else{l=[];for(var d in r)l.push(i+d)}if(this.addRules(r,i),o)for(var g=Array.prototype[s?"push":"unshift"],u=0;u<l.length;u++)g.apply(this.$rules[l[u]],p(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};var m=function(h,i){return(h!="start"||i.length)&&i.unshift(this.nextState,h),this.nextState},c=function(h,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var h=0,i=this.$rules;function o(l){var s=i[l];s.processed=!0;for(var r=0;r<s.length;r++){var u=s[r],d=null;Array.isArray(u)&&(d=u,u={}),!u.regex&&u.start&&(u.regex=u.start,u.next||(u.next=[]),u.next.push({defaultToken:u.token},{token:u.token+".end",regex:u.end||u.start,next:"pop"}),u.token=u.token+".start",u.push=!0);var g=u.next||u.push;if(g&&Array.isArray(g)){var y=u.stateName;y||(y=u.token,typeof y!="string"&&(y=y[0]||""),i[y]&&(y+=h++)),i[y]=g,u.next=y,o(y)}else g=="pop"&&(u.next=c);if(u.push&&(u.nextState=u.next||u.push,u.next=m,delete u.push),u.rules)for(var x in u.rules)i[x]?i[x].push&&i[x].push.apply(i[x],u.rules[x]):i[x]=u.rules[x];var C=typeof u=="string"?u:u.include;if(C&&(C==="$self"&&(C="start"),Array.isArray(C)?d=C.map(function(w){return i[w]}):d=i[C]),d){var b=[r,1].concat(d);u.noEscape&&(b=b.filter(function(w){return!w.next})),s.splice.apply(s,b),r--}u.keywordMap&&(u.token=this.createKeywordMapper(u.keywordMap,u.defaultToken||"text",u.caseInsensitive),delete u.defaultToken)}}Object.keys(i).forEach(o,this)},this.createKeywordMapper=function(h,i,o,l){var s=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(r){for(var u=h[r],d=u.split(l||"|"),g=d.length;g--;){var y=d[g];this.$keywordList.push(y),o&&(y=y.toLowerCase()),s[y]=r}},this),h=null,o?function(r){return s[r.toLowerCase()]||i}:function(r){return s[r]||i}},this.getKeywords=function(){return this.$keywords}}).call(f.prototype),a.TextHighlightRules=f}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,a,v){var p;p=function(){this.$behaviours={}},(function(){this.add=function(f,m,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[f]:this.$behaviours[f]={}}this.$behaviours[f][m]=c},this.addBehaviours=function(f){for(var m in f)for(var c in f[m])this.add(m,c,f[m][c])},this.remove=function(f){this.$behaviours&&this.$behaviours[f]&&delete this.$behaviours[f]},this.inherit=function(f,m){if(typeof f=="function")var c=new f().getBehaviours(m);else var c=f.getBehaviours(m);this.addBehaviours(c)},this.getBehaviours=function(f){if(f){for(var m={},c=0;c<f.length;c++)this.$behaviours[f[c]]&&(m[f[c]]=this.$behaviours[f[c]]);return m}else return this.$behaviours}}).call(p.prototype),a.Behaviour=p}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,a,v){var p=n("./range").Range,f=function(){function m(c,h,i){this.$session=c,this.$row=h,this.$rowTokens=c.getTokens(h);var o=c.getTokenAt(h,i);this.$tokenIndex=o?o.index:-1}return m.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},m.prototype.stepForward=function(){this.$tokenIndex+=1;for(var c;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,c||(c=this.$session.getLength()),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},m.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},m.prototype.getCurrentTokenRow=function(){return this.$row},m.prototype.getCurrentTokenColumn=function(){var c=this.$rowTokens,h=this.$tokenIndex,i=c[h].start;if(i!==void 0)return i;for(i=0;h>0;)h-=1,i+=c[h].value.length;return i},m.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},m.prototype.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new p(this.$row,h,this.$row,h+c.value.length)},m}();a.TokenIterator=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,a,v){var p=n("../../lib/oop"),f=n("../behaviour").Behaviour,m=n("../../token_iterator").TokenIterator,c=n("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,l={},s={'"':'"',"'":"'"},r=function(g){var y=-1;if(g.multiSelect&&(y=g.selection.index,l.rangeCount!=g.multiSelect.rangeCount&&(l={rangeCount:g.multiSelect.rangeCount})),l[y])return o=l[y];o=l[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(g,y,x,C){var b=g.end.row-g.start.row;return{text:x+y+C,selection:[0,g.start.column+1,b,g.end.column+(b?0:1)]}},d;d=function(g){g=g||{},this.add("braces","insertion",function(y,x,C,b,w){var _=C.getCursorPosition(),I=b.doc.getLine(_.row);if(w=="{"){r(C);var E=C.getSelectionRange(),k=b.doc.getTextRange(E),A=b.getTokenAt(_.row,_.column);if(k!==""&&k!=="{"&&C.getWrapBehavioursEnabled())return u(E,k,"{","}");if(A&&/(?:string)\.quasi|\.xml/.test(A.type)){var S=[/tag\-(?:open|name)/,/attribute\-name/];return S.some(function(F){return F.test(A.type)})||/(string)\.quasi/.test(A.type)&&A.value[_.column-A.start-1]!=="$"?void 0:(d.recordAutoInsert(C,b,"}"),{text:"{}",selection:[1,1]})}else if(d.isSaneInsertion(C,b))return/[\]\}\)]/.test(I[_.column])||C.inMultiSelectMode||g.braces?(d.recordAutoInsert(C,b,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(C,b,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){r(C);var M=I.substring(_.column,_.column+1);if(M=="}"){var $=b.$findOpeningBracket("}",{column:_.column+1,row:_.row});if($!==null&&d.isAutoInsertedClosing(_,I,w))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==`
|
|
`||w==`\r
|
|
`){r(C);var L="";d.isMaybeInsertedClosing(_,I)&&(L=c.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var M=I.substring(_.column,_.column+1);if(M==="}"){var T=b.findMatchingBracket({row:_.row,column:_.column+1},"}");if(!T)return null;var R=this.$getIndent(b.getLine(T.row))}else if(L)var R=this.$getIndent(I);else{d.clearMaybeInsertedClosing();return}var P=R+b.getTabString();return{text:`
|
|
`+P+`
|
|
`+R+L,selection:[1,P.length,1,P.length]}}else d.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,x,C,b,w){var _=b.doc.getTextRange(w);if(!w.isMultiLine()&&_=="{"){r(C);var I=b.doc.getLine(w.start.row),E=I.substring(w.end.column,w.end.column+1);if(E=="}")return w.end.column++,w;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,x,C,b,w){if(w=="("){r(C);var _=C.getSelectionRange(),I=b.doc.getTextRange(_);if(I!==""&&C.getWrapBehavioursEnabled())return u(_,I,"(",")");if(d.isSaneInsertion(C,b))return d.recordAutoInsert(C,b,")"),{text:"()",selection:[1,1]}}else if(w==")"){r(C);var E=C.getCursorPosition(),k=b.doc.getLine(E.row),A=k.substring(E.column,E.column+1);if(A==")"){var S=b.$findOpeningBracket(")",{column:E.column+1,row:E.row});if(S!==null&&d.isAutoInsertedClosing(E,k,w))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,x,C,b,w){var _=b.doc.getTextRange(w);if(!w.isMultiLine()&&_=="("){r(C);var I=b.doc.getLine(w.start.row),E=I.substring(w.start.column+1,w.start.column+2);if(E==")")return w.end.column++,w}}),this.add("brackets","insertion",function(y,x,C,b,w){if(w=="["){r(C);var _=C.getSelectionRange(),I=b.doc.getTextRange(_);if(I!==""&&C.getWrapBehavioursEnabled())return u(_,I,"[","]");if(d.isSaneInsertion(C,b))return d.recordAutoInsert(C,b,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){r(C);var E=C.getCursorPosition(),k=b.doc.getLine(E.row),A=k.substring(E.column,E.column+1);if(A=="]"){var S=b.$findOpeningBracket("]",{column:E.column+1,row:E.row});if(S!==null&&d.isAutoInsertedClosing(E,k,w))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,x,C,b,w){var _=b.doc.getTextRange(w);if(!w.isMultiLine()&&_=="["){r(C);var I=b.doc.getLine(w.start.row),E=I.substring(w.start.column+1,w.start.column+2);if(E=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(y,x,C,b,w){var _=b.$mode.$quotes||s;if(w.length==1&&_[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;r(C);var I=w,E=C.getSelectionRange(),k=b.doc.getTextRange(E);if(k!==""&&(k.length!=1||!_[k])&&C.getWrapBehavioursEnabled())return u(E,k,I,I);if(!k){var A=C.getCursorPosition(),S=b.doc.getLine(A.row),M=S.substring(A.column-1,A.column),$=S.substring(A.column,A.column+1),L=b.getTokenAt(A.row,A.column),T=b.getTokenAt(A.row,A.column+1);if(M=="\\"&&L&&/escape/.test(L.type))return null;var R=L&&/string|escape/.test(L.type),P=!T||/string|escape/.test(T.type),F;if($==I)F=R!==P,F&&/string\.end/.test(T.type)&&(F=!1);else{if(R&&!P||R&&P)return null;var O=b.$mode.tokenRe;O.lastIndex=0;var N=O.test(M);O.lastIndex=0;var V=O.test($),H=b.$mode.$pairQuotesAfter,W=H&&H[I]&&H[I].test(M);if(!W&&N||V||$&&!/[\s;,.})\]\\]/.test($))return null;var j=S[A.column-2];if(M==I&&(j==I||O.test(j)))return null;F=!0}return{text:F?I+I:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,x,C,b,w){var _=b.$mode.$quotes||s,I=b.doc.getTextRange(w);if(!w.isMultiLine()&&_.hasOwnProperty(I)){r(C);var E=b.doc.getLine(w.start.row),k=E.substring(w.start.column+1,w.start.column+2);if(k==I)return w.end.column++,w}}),g.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,x,C,b,w){if(y==="doc-start"&&(w===`
|
|
`||w===`\r
|
|
`)&&C.selection.isEmpty()){var _=C.getCursorPosition();if(_.column===0)return;for(var I=b.doc.getLine(_.row),E=b.doc.getLine(_.row+1),k=b.getTokens(_.row),A=0,S=0;S<k.length;S++){A+=k[S].value.length;var M=k[S];if(A>=_.column){if(A===_.column){if(!/\.doc/.test(M.type))return;if(/\*\//.test(M.value)){var $=k[S+1];if(!$||!/\.doc/.test($.type))return}}var L=_.column-(A-M.value.length),T=M.value.indexOf("*/"),R=M.value.indexOf("/**",T>-1?T+2:0);if(R!==-1&&L>R&&L<R+3||T!==-1&&R!==-1&&L>=T&&L<=R||!/\.doc/.test(M.type))return;break}}var P=this.$getIndent(I);if(/\s*\*/.test(E))return/^\s*\*/.test(I)?{text:w+P+"* ",selection:[1,2+P.length,1,2+P.length]}:{text:w+P+" * ",selection:[1,3+P.length,1,3+P.length]};if(/\/\*\*/.test(I.substring(0,_.column)))return{text:w+P+" * "+w+" "+P+"*/",selection:[1,4+P.length,1,4+P.length]}}})},d.isSaneInsertion=function(g,y){var x=g.getCursorPosition(),C=new m(y,x.row,x.column);if(!this.$matchTokenType(C.getCurrentToken()||"text",h)){if(/[)}\]]/.test(g.session.getLine(x.row)[x.column]))return!0;var b=new m(y,x.row,x.column+1);if(!this.$matchTokenType(b.getCurrentToken()||"text",h))return!1}return C.stepForward(),C.getCurrentTokenRow()!==x.row||this.$matchTokenType(C.getCurrentToken()||"text",i)},d.$matchTokenType=function(g,y){return y.indexOf(g.type||g)>-1},d.recordAutoInsert=function(g,y,x){var C=g.getCursorPosition(),b=y.doc.getLine(C.row);this.isAutoInsertedClosing(C,b,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=C.row,o.autoInsertedLineEnd=x+b.substr(C.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(g,y,x){var C=g.getCursorPosition(),b=y.doc.getLine(C.row);this.isMaybeInsertedClosing(C,b)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=C.row,o.maybeInsertedLineStart=b.substr(0,C.column)+x,o.maybeInsertedLineEnd=b.substr(C.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(g,y,x){return o.autoInsertedBrackets>0&&g.row===o.autoInsertedRow&&x===o.autoInsertedLineEnd[0]&&y.substr(g.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(g,y){return o.maybeInsertedBrackets>0&&g.row===o.maybeInsertedRow&&y.substr(g.column)===o.maybeInsertedLineEnd&&y.substr(0,g.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},p.inherits(d,f),a.CstyleBehaviour=d}),ace.define("ace/unicode",["require","exports","module"],function(n,a,v){for(var p=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],f=0,m=[],c=0;c<p.length;c+=2)m.push(f+=p[c]),p[c+1]&&m.push(45,f+=p[c+1]);a.wordChars=String.fromCharCode.apply(null,m)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,a,v){var p=n("../config"),f=n("../tokenizer").Tokenizer,m=n("./text_highlight_rules").TextHighlightRules,c=n("./behaviour/cstyle").CstyleBehaviour,h=n("../unicode"),i=n("../lib/lang"),o=n("../token_iterator").TokenIterator,l=n("../range").Range,s;s=function(){this.HighlightRules=m},(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new f(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(r,u,d,g){var y=u.doc,x=!0,C=!0,b=1/0,w=u.getTabSize(),_=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var k=this.lineCommentStart.map(i.escapeRegExp).join("|"),I=this.lineCommentStart[0];else var k=i.escapeRegExp(this.lineCommentStart),I=this.lineCommentStart;k=new RegExp("^(\\s*)(?:"+k+") ?"),_=u.getUseSoftTabs();var M=function(V,H){var W=V.match(k);if(W){var j=W[1].length,Z=W[0].length;!T(V,j,Z)&&W[0][Z-1]==" "&&Z--,y.removeInLine(H,j,Z)}},L=I+" ",S=function(V,H){(!x||/\S/.test(V))&&(T(V,b,b)?y.insertInLine({row:H,column:b},L):y.insertInLine({row:H,column:b},I))},$=function(V,H){return k.test(V)},T=function(V,H,W){for(var j=0;H--&&V.charAt(H)==" ";)j++;if(j%w!=0)return!1;for(var j=0;V.charAt(W++)==" ";)j++;return w>2?j%w!=w-1:j%w==0}}else{if(!this.blockComment)return!1;var I=this.blockComment.start,E=this.blockComment.end,k=new RegExp("^(\\s*)(?:"+i.escapeRegExp(I)+")"),A=new RegExp("(?:"+i.escapeRegExp(E)+")\\s*$"),S=function(F,O){$(F,O)||(!x||/\S/.test(F))&&(y.insertInLine({row:O,column:F.length},E),y.insertInLine({row:O,column:b},I))},M=function(F,O){var N;(N=F.match(A))&&y.removeInLine(O,F.length-N[0].length,F.length),(N=F.match(k))&&y.removeInLine(O,N[1].length,N[0].length)},$=function(F,O){if(k.test(F))return!0;for(var N=u.getTokens(O),V=0;V<N.length;V++)if(N[V].type==="comment")return!0}}function R(F){for(var O=d;O<=g;O++)F(y.getLine(O),O)}var P=1/0;R(function(F,O){var N=F.search(/\S/);N!==-1?(N<b&&(b=N),C&&!$(F,O)&&(C=!1)):P>F.length&&(P=F.length)}),b==1/0&&(b=P,x=!1,C=!1),_&&b%w!=0&&(b=Math.floor(b/w)*w),R(C?M:S)},this.toggleBlockComment=function(r,u,d,g){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var x=new o(u,g.row,g.column),C=x.getCurrentToken();u.selection;var b=u.selection.toOrientedRange(),w,_;if(C&&/comment/.test(C.type)){for(var I,E;C&&/comment/.test(C.type);){var k=C.value.indexOf(y.start);if(k!=-1){var A=x.getCurrentTokenRow(),S=x.getCurrentTokenColumn()+k;I=new l(A,S,A,S+y.start.length);break}C=x.stepBackward()}for(var x=new o(u,g.row,g.column),C=x.getCurrentToken();C&&/comment/.test(C.type);){var k=C.value.indexOf(y.end);if(k!=-1){var A=x.getCurrentTokenRow(),S=x.getCurrentTokenColumn()+k;E=new l(A,S,A,S+y.end.length);break}C=x.stepForward()}E&&u.remove(E),I&&(u.remove(I),w=I.start.row,_=-y.start.length)}else _=y.start.length,w=d.start.row,u.insert(d.end,y.end),u.insert(d.start,y.start);b.start.row==w&&(b.start.column+=_),b.end.row==w&&(b.end.column+=_),u.selection.fromOrientedRange(b)}},this.getNextLineIndent=function(r,u,d){return this.$getIndent(u)},this.checkOutdent=function(r,u,d){return!1},this.autoOutdent=function(r,u,d){},this.$getIndent=function(r){return r.match(/^\s*/)[0]},this.createWorker=function(r){return null},this.createModeDelegates=function(r){this.$embeds=[],this.$modes={};for(var u in r)if(r[u]){var d=r[u],g=d.prototype.$id,y=p.$modes[g];y||(p.$modes[g]=y=new d),p.$modes[u]||(p.$modes[u]=y),this.$embeds.push(u),this.$modes[u]=y}for(var x=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],C=function(w){(function(_){var I=x[w],E=_[I];_[x[w]]=function(){return this.$delegator(I,arguments,E)}})(b)},b=this,u=0;u<x.length;u++)C(u)},this.$delegator=function(r,u,d){var g=u[0]||"start";if(typeof g!="string"){if(Array.isArray(g[2])){var y=g[2][g[2].length-1],x=this.$modes[y];if(x)return x[r].apply(x,[g[1]].concat([].slice.call(u,1)))}g=g[0]||"start"}for(var C=0;C<this.$embeds.length;C++)if(this.$modes[this.$embeds[C]]){var b=g.split(this.$embeds[C]);if(!b[0]&&b[1]){u[0]=b[1];var x=this.$modes[this.$embeds[C]];return x[r].apply(x,u)}}var w=d.apply(this,u);return d?w:void 0},this.transformAction=function(r,u,d,g,y){if(this.$behaviour){var x=this.$behaviour.getBehaviours();for(var C in x)if(x[C][u]){var b=x[C][u].apply(this,arguments);if(b)return b}}},this.getKeywords=function(r){if(!this.completionKeywords){var u=this.$tokenizer.rules,d=[];for(var g in u)for(var y=u[g],x=0,C=y.length;x<C;x++)if(typeof y[x].token=="string")/keyword|support|storage/.test(y[x].token)&&d.push(y[x].regex);else if(typeof y[x].token=="object"){for(var b=0,w=y[x].token.length;b<w;b++)if(/keyword|support|storage/.test(y[x].token[b])){var g=y[x].regex.match(/\(.+?\)/g)[b];d.push(g.substr(1,g.length-2))}}this.completionKeywords=d}return r?d.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(r,u,d,g){var y=this.$keywordList||this.$createKeywordList();return y.map(function(x){return{name:x,value:x,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(s.prototype),a.Mode=s}),ace.define("ace/apply_delta",["require","exports","module"],function(n,a,v){a.applyDelta=function(p,f,m){var c=f.start.row,h=f.start.column,i=p[c]||"";switch(f.action){case"insert":var o=f.lines;if(o.length===1)p[c]=i.substring(0,h)+f.lines[0]+i.substring(h);else{var l=[c,1].concat(f.lines);p.splice.apply(p,l),p[c]=i.substring(0,h)+p[c],p[c+f.lines.length-1]+=i.substring(h)}break;case"remove":var s=f.end.column,r=f.end.row;c===r?p[c]=i.substring(0,h)+i.substring(s):p.splice(c,r-c+1,i.substring(0,h)+p[r].substring(s));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,a,v){var p=n("./lib/oop"),f=n("./lib/event_emitter").EventEmitter,m=function(){function i(o,l,s){this.$onChange=this.onChange.bind(this),this.attach(o),typeof l!="number"?this.setPosition(l.row,l.column):this.setPosition(l,s)}return i.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},i.prototype.getDocument=function(){return this.document},i.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var l=h(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(l.row,l.column,!0)}},i.prototype.setPosition=function(o,l,s){var r;if(s?r={row:o,column:l}:r=this.$clipPositionToDocument(o,l),!(this.row==r.row&&this.column==r.column)){var u={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:u,value:r})}},i.prototype.detach=function(){this.document.off("change",this.$onChange)},i.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},i.prototype.$clipPositionToDocument=function(o,l){var s={};return o>=this.document.getLength()?(s.row=Math.max(0,this.document.getLength()-1),s.column=this.document.getLine(s.row).length):o<0?(s.row=0,s.column=0):(s.row=o,s.column=Math.min(this.document.getLine(s.row).length,Math.max(0,l))),l<0&&(s.column=0),s},i}();m.prototype.$insertRight=!1,p.implement(m.prototype,f);function c(i,o,l){var s=l?i.column<=o.column:i.column<o.column;return i.row<o.row||i.row==o.row&&s}function h(i,o,l){var s=i.action=="insert",r=(s?1:-1)*(i.end.row-i.start.row),u=(s?1:-1)*(i.end.column-i.start.column),d=i.start,g=s?d:i.end;return c(o,d,l)?{row:o.row,column:o.column}:c(g,o,!l)?{row:o.row+r,column:o.column+(o.row==g.row?u:0)}:{row:d.row,column:d.column}}a.Anchor=m}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,a,v){var p=n("./lib/oop"),f=n("./apply_delta").applyDelta,m=n("./lib/event_emitter").EventEmitter,c=n("./range").Range,h=n("./anchor").Anchor,i=function(){function o(l){this.$lines=[""],l.length===0?this.$lines=[""]:Array.isArray(l)?this.insertMergedLines({row:0,column:0},l):this.insert({row:0,column:0},l)}return o.prototype.setValue=function(l){var s=this.getLength()-1;this.remove(new c(0,0,s,this.getLine(s).length)),this.insert({row:0,column:0},l||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(l,s){return new h(this,l,s)},o.prototype.$detectNewLine=function(l){var s=l.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=s?s[1]:`
|
|
`,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
`;case"unix":return`
|
|
`;default:return this.$autoNewLine||`
|
|
`}},o.prototype.setNewLineMode=function(l){this.$newLineMode!==l&&(this.$newLineMode=l,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(l){return l==`\r
|
|
`||l=="\r"||l==`
|
|
`},o.prototype.getLine=function(l){return this.$lines[l]||""},o.prototype.getLines=function(l,s){return this.$lines.slice(l,s+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(l){return this.getLinesForRange(l).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(l){var s;if(l.start.row===l.end.row)s=[this.getLine(l.start.row).substring(l.start.column,l.end.column)];else{s=this.getLines(l.start.row,l.end.row),s[0]=(s[0]||"").substring(l.start.column);var r=s.length-1;l.end.row-l.start.row==r&&(s[r]=s[r].substring(0,l.end.column))}return s},o.prototype.insertLines=function(l,s){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(l,s)},o.prototype.removeLines=function(l,s){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(l,s)},o.prototype.insertNewLine=function(l){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(l,["",""])},o.prototype.insert=function(l,s){return this.getLength()<=1&&this.$detectNewLine(s),this.insertMergedLines(l,this.$split(s))},o.prototype.insertInLine=function(l,s){var r=this.clippedPos(l.row,l.column),u=this.pos(l.row,l.column+s.length);return this.applyDelta({start:r,end:u,action:"insert",lines:[s]},!0),this.clonePos(u)},o.prototype.clippedPos=function(l,s){var r=this.getLength();l===void 0?l=r:l<0?l=0:l>=r&&(l=r-1,s=void 0);var u=this.getLine(l);return s==null&&(s=u.length),s=Math.min(Math.max(s,0),u.length),{row:l,column:s}},o.prototype.clonePos=function(l){return{row:l.row,column:l.column}},o.prototype.pos=function(l,s){return{row:l,column:s}},o.prototype.$clipPosition=function(l){var s=this.getLength();return l.row>=s?(l.row=Math.max(0,s-1),l.column=this.getLine(s-1).length):(l.row=Math.max(0,l.row),l.column=Math.min(Math.max(l.column,0),this.getLine(l.row).length)),l},o.prototype.insertFullLines=function(l,s){l=Math.min(Math.max(l,0),this.getLength());var r=0;l<this.getLength()?(s=s.concat([""]),r=0):(s=[""].concat(s),l--,r=this.$lines[l].length),this.insertMergedLines({row:l,column:r},s)},o.prototype.insertMergedLines=function(l,s){var r=this.clippedPos(l.row,l.column),u={row:r.row+s.length-1,column:(s.length==1?r.column:0)+s[s.length-1].length};return this.applyDelta({start:r,end:u,action:"insert",lines:s}),this.clonePos(u)},o.prototype.remove=function(l){var s=this.clippedPos(l.start.row,l.start.column),r=this.clippedPos(l.end.row,l.end.column);return this.applyDelta({start:s,end:r,action:"remove",lines:this.getLinesForRange({start:s,end:r})}),this.clonePos(s)},o.prototype.removeInLine=function(l,s,r){var u=this.clippedPos(l,s),d=this.clippedPos(l,r);return this.applyDelta({start:u,end:d,action:"remove",lines:this.getLinesForRange({start:u,end:d})},!0),this.clonePos(u)},o.prototype.removeFullLines=function(l,s){l=Math.min(Math.max(0,l),this.getLength()-1),s=Math.min(Math.max(0,s),this.getLength()-1);var r=s==this.getLength()-1&&l>0,u=s<this.getLength()-1,d=r?l-1:l,g=r?this.getLine(d).length:0,y=u?s+1:s,x=u?0:this.getLine(y).length,C=new c(d,g,y,x),b=this.$lines.slice(l,s+1);return this.applyDelta({start:C.start,end:C.end,action:"remove",lines:this.getLinesForRange(C)}),b},o.prototype.removeNewLine=function(l){l<this.getLength()-1&&l>=0&&this.applyDelta({start:this.pos(l,this.getLine(l).length),end:this.pos(l+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(l,s){if(l instanceof c||(l=c.fromPoints(l.start,l.end)),s.length===0&&l.isEmpty())return l.start;if(s==this.getTextRange(l))return l.end;this.remove(l);var r;return s?r=this.insert(l.start,s):r=l.start,r},o.prototype.applyDeltas=function(l){for(var s=0;s<l.length;s++)this.applyDelta(l[s])},o.prototype.revertDeltas=function(l){for(var s=l.length-1;s>=0;s--)this.revertDelta(l[s])},o.prototype.applyDelta=function(l,s){var r=l.action=="insert";(r?l.lines.length<=1&&!l.lines[0]:!c.comparePoints(l.start,l.end))||(r&&l.lines.length>2e4?this.$splitAndapplyLargeDelta(l,2e4):(f(this.$lines,l,s),this._signal("change",l)))},o.prototype.$safeApplyDelta=function(l){var s=this.$lines.length;(l.action=="remove"&&l.start.row<s&&l.end.row<s||l.action=="insert"&&l.start.row<=s)&&this.applyDelta(l)},o.prototype.$splitAndapplyLargeDelta=function(l,s){for(var r=l.lines,u=r.length-s+1,d=l.start.row,g=l.start.column,y=0,x=0;y<u;y=x){x+=s-1;var C=r.slice(y,x);C.push(""),this.applyDelta({start:this.pos(d+y,g),end:this.pos(d+x,g=0),action:l.action,lines:C},!0)}l.lines=r.slice(y),l.start.row=d+y,l.start.column=g,this.applyDelta(l,!0)},o.prototype.revertDelta=function(l){this.$safeApplyDelta({start:this.clonePos(l.start),end:this.clonePos(l.end),action:l.action=="insert"?"remove":"insert",lines:l.lines.slice()})},o.prototype.indexToPosition=function(l,s){for(var r=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,d=s||0,g=r.length;d<g;d++)if(l-=r[d].length+u,l<0)return{row:d,column:l+r[d].length+u};return{row:g-1,column:l+r[g-1].length+u}},o.prototype.positionToIndex=function(l,s){for(var r=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,d=0,g=Math.min(l.row,r.length),y=s||0;y<g;++y)d+=r[y].length+u;return d+l.column},o.prototype.$split=function(l){return l.split(/\r\n|\r|\n/)},o}();i.prototype.$autoNewLine="",i.prototype.$newLineMode="auto",p.implement(i.prototype,m),a.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,a,v){var p=n("./lib/oop"),f=n("./lib/event_emitter").EventEmitter,m=function(){function c(h,i){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var o=this;this.$worker=function(){if(o.running){for(var l=new Date,s=o.currentLine,r=-1,u=o.doc,d=s;o.lines[s];)s++;var g=u.getLength(),y=0;for(o.running=!1;s<g;){o.$tokenizeRow(s),r=s;do s++;while(o.lines[s]);if(y++,y%5===0&&new Date-l>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=s,r==-1&&(r=s),d<=r&&o.fireUpdateEvent(d,r)}}}return c.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},c.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},c.prototype.fireUpdateEvent=function(h,i){var o={first:h,last:i};this._signal("update",{data:o})},c.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},c.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},c.prototype.$updateOnChange=function(h){var i=h.start.row,o=h.end.row-i;if(o===0)this.lines[i]=null;else if(h.action=="remove")this.lines.splice(i,o+1,null),this.states.splice(i,o+1,null);else{var l=Array(o+1);l.unshift(i,1),this.lines.splice.apply(this.lines,l),this.states.splice.apply(this.states,l)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},c.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},c.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},c.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},c.prototype.$tokenizeRow=function(h){var i=this.doc.getLine(h),o=this.states[h-1],l=this.tokenizer.getLineTokens(i,o,h);return this.states[h]+""!=l.state+""?(this.states[h]=l.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=l.tokens},c.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},c}();p.implement(m.prototype,f),a.BackgroundTokenizer=m}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,a,v){var p=n("./lib/lang"),f=n("./range").Range,m=function(){function c(h,i,o){o===void 0&&(o="text"),this.setRegexp(h),this.clazz=i,this.type=o}return c.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},c.prototype.update=function(h,i,o,l){if(this.regExp)for(var s=l.firstRow,r=l.lastRow,u={},d=s;d<=r;d++){var g=this.cache[d];g==null&&(g=p.getMatchOffsets(o.getLine(d),this.regExp),g.length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES)),g=g.map(function(b){return new f(d,b.offset,d,b.offset+b.length)}),this.cache[d]=g.length?g:"");for(var y=g.length;y--;){var x=g[y].toScreenRange(o),C=x.toString();u[C]||(u[C]=!0,i.drawSingleLineMarker(h,x,this.clazz,l))}}},c}();m.prototype.MAX_RANGES=500,a.SearchHighlight=m}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,a,v){var p=function(){function b(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return b.prototype.addSession=function(w){this.$session=w},b.prototype.add=function(w,_,I){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),_===!1||!this.lastDeltas){this.lastDeltas=[];var E=this.$undoStack.length;E>this.$undoDepth-1&&this.$undoStack.splice(0,E-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},b.prototype.addSelection=function(w,_){this.selections.push({value:w,rev:_||this.$rev})},b.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},b.prototype.markIgnored=function(w,_){_==null&&(_=this.$rev+1);for(var I=this.$undoStack,E=I.length;E--;){var k=I[E][0];if(k.id<=w)break;k.id<_&&(k.ignore=!0)}this.lastDeltas=null},b.prototype.getSelection=function(w,_){for(var I=this.selections,E=I.length;E--;){var k=I[E];if(k.rev<w)return _&&(k=I[E+1]),k}},b.prototype.getRevision=function(){return this.$rev},b.prototype.getDeltas=function(w,_){_==null&&(_=this.$rev+1);for(var I=this.$undoStack,E=null,k=0,A=I.length;A--;){var S=I[A][0];if(S.id<_&&!E&&(E=A+1),S.id<=w){k=A+1;break}}return I.slice(k,E)},b.prototype.getChangedRanges=function(w,_){_==null&&(_=this.$rev+1)},b.prototype.getChangedLines=function(w,_){_==null&&(_=this.$rev+1)},b.prototype.undo=function(w,_){this.lastDeltas=null;var I=this.$undoStack;if(f(I,I.length)){w||(w=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var E=I.pop(),k=null;return E&&(k=w.undoChanges(E,_),this.$redoStack.push(E),this.$syncRev()),this.$fromUndo=!1,k}},b.prototype.redo=function(w,_){if(this.lastDeltas=null,w||(w=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var I=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);C(this.$redoStack,I),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(A){A[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),k=null;return E&&(k=w.redoChanges(E,_),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,k},b.prototype.$syncRev=function(){var w=this.$undoStack,_=w[w.length-1],I=_&&_[0].id||0;this.$redoStackBaseRev=I,this.$rev=I},b.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},b.prototype.canUndo=function(){return this.$undoStack.length>0},b.prototype.canRedo=function(){return this.$redoStack.length>0},b.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},b.prototype.isAtBookmark=function(){return this.$rev===this.mark},b.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},b.prototype.fromJSON=function(w){this.reset(),this.$undoStack=w.$undoStack,this.$redoStack=w.$redoStack},b.prototype.$prettyPrint=function(w){return w?o(w):o(this.$undoStack)+`
|
|
---
|
|
`+o(this.$redoStack)},b}();p.prototype.hasUndo=p.prototype.canUndo,p.prototype.hasRedo=p.prototype.canRedo,p.prototype.isClean=p.prototype.isAtBookmark,p.prototype.markClean=p.prototype.bookmark;function f(b,w){for(var _=w;_--;){var I=b[_];if(I&&!I[0].ignore){for(;_<w-1;){var E=r(b[_],b[_+1]);b[_]=E[0],b[_+1]=E[1],_++}return!0}}}var m=n("./range").Range,c=m.comparePoints;m.comparePoints;function h(b){return{row:b.row,column:b.column}}function i(b){return{start:h(b.start),end:h(b.end),action:b.action,lines:b.lines.slice()}}function o(b){if(b=b||this,Array.isArray(b))return b.map(o).join(`
|
|
`);var w="";return b.action?(w=b.action=="insert"?"+":"-",w+="["+b.lines+"]"):b.value&&(Array.isArray(b.value)?w=b.value.map(l).join(`
|
|
`):w=l(b.value)),b.start&&(w+=l(b)),(b.id||b.rev)&&(w+=" ("+(b.id||b.rev)+")"),w}function l(b){return b.start.row+":"+b.start.column+"=>"+b.end.row+":"+b.end.column}function s(b,w){var _=b.action=="insert",I=w.action=="insert";if(_&&I)if(c(w.start,b.end)>=0)d(w,b,-1);else if(c(w.start,b.start)<=0)d(b,w,1);else return null;else if(_&&!I)if(c(w.start,b.end)>=0)d(w,b,-1);else if(c(w.end,b.start)<=0)d(b,w,-1);else return null;else if(!_&&I)if(c(w.start,b.start)>=0)d(w,b,1);else if(c(w.start,b.start)<=0)d(b,w,1);else return null;else if(!_&&!I)if(c(w.start,b.start)>=0)d(w,b,1);else if(c(w.end,b.start)<=0)d(b,w,-1);else return null;return[w,b]}function r(b,w){for(var _=b.length;_--;)for(var I=0;I<w.length;I++)if(!s(b[_],w[I])){for(;_<b.length;){for(;I--;)s(w[I],b[_]);I=w.length,_++}return[b,w]}return b.selectionBefore=w.selectionBefore=b.selectionAfter=w.selectionAfter=null,[w,b]}function u(b,w){var _=b.action=="insert",I=w.action=="insert";if(_&&I)c(b.start,w.start)<0?d(w,b,1):d(b,w,1);else if(_&&!I)c(b.start,w.end)>=0?d(b,w,-1):(c(b.start,w.start)<=0||d(b,m.fromPoints(w.start,b.start),-1),d(w,b,1));else if(!_&&I)c(w.start,b.end)>=0?d(w,b,-1):(c(w.start,b.start)<=0||d(w,m.fromPoints(b.start,w.start),-1),d(b,w,1));else if(!_&&!I)if(c(w.start,b.end)>=0)d(w,b,-1);else if(c(w.end,b.start)<=0)d(b,w,-1);else{var E,k;return c(b.start,w.start)<0&&(E=b,b=y(b,w.start)),c(b.end,w.end)>0&&(k=y(b,w.end)),g(w.end,b.start,b.end,-1),k&&!E&&(b.lines=k.lines,b.start=k.start,b.end=k.end,k=b),[w,E,k].filter(Boolean)}return[w,b]}function d(b,w,_){g(b.start,w.start,w.end,_),g(b.end,w.start,w.end,_)}function g(b,w,_,I){b.row==(I==1?w:_).row&&(b.column+=I*(_.column-w.column)),b.row+=I*(_.row-w.row)}function y(b,w){var _=b.lines,I=b.end;b.end=h(w);var E=b.end.row-b.start.row,k=_.splice(E,_.length),A=E?w.column:w.column-b.start.column;_.push(k[0].substring(0,A)),k[0]=k[0].substr(A);var S={start:h(w),end:I,lines:k,action:b.action};return S}function x(b,w){w=i(w);for(var _=b.length;_--;){for(var I=b[_],E=0;E<I.length;E++){var k=I[E],A=u(k,w);w=A[0],A.length!=2&&(A[2]?(I.splice(E+1,1,A[1],A[2]),E++):A[1]||(I.splice(E,1),E--))}I.length||b.splice(_,1)}return b}function C(b,w){for(var _=0;_<w.length;_++)for(var I=w[_],E=0;E<I.length;E++)x(b,I[E])}a.UndoManager=p}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,a,v){var p=n("../range").Range,f=function(){function m(c,h){this.foldData=c,Array.isArray(h)?this.folds=h:h=this.folds=[h];var i=h[h.length-1];this.range=new p(h[0].start.row,h[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return m.prototype.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(h){h.start.row+=c,h.end.row+=c})},m.prototype.addFold=function(c){if(c.sameRow){if(c.start.row<this.startRow||c.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(h,i){return-h.range.compareEnd(i.start.row,i.start.column)}),this.range.compareEnd(c.start.row,c.start.column)>0?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else if(c.end.row==this.start.row)this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");c.foldLine=this},m.prototype.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},m.prototype.walk=function(c,h,i){var o=0,l=this.folds,s,r,u,d=!0;h==null&&(h=this.end.row,i=this.end.column);for(var g=0;g<l.length;g++){if(s=l[g],r=s.range.compareStart(h,i),r==-1){c(null,h,i,o,d);return}if(u=c(null,s.start.row,s.start.column,o,d),u=!u&&c(s.placeholder,s.start.row,s.start.column,o),u||r===0)return;d=!s.sameRow,o=s.end.column}c(null,h,i,o,d)},m.prototype.getNextFoldTo=function(c,h){for(var i,o,l=0;l<this.folds.length;l++){if(i=this.folds[l],o=i.range.compareEnd(c,h),o==-1)return{fold:i,kind:"after"};if(o===0)return{fold:i,kind:"inside"}}return null},m.prototype.addRemoveChars=function(c,h,i){var o=this.getNextFoldTo(c,h),l,s;if(o){if(l=o.fold,o.kind=="inside"&&l.start.column!=h&&l.start.row!=c)window.console&&window.console.log(c,h,l);else if(l.start.row==c){s=this.folds;var r=s.indexOf(l);for(r===0&&(this.start.column+=i),r;r<s.length;r++){if(l=s[r],l.start.column+=i,!l.sameRow)return;l.end.column+=i}this.end.column+=i}}},m.prototype.split=function(c,h){var i=this.getNextFoldTo(c,h);if(!i||i.kind=="inside")return null;var o=i.fold,l=this.folds,s=this.foldData,r=l.indexOf(o),u=l[r-1];this.end.row=u.end.row,this.end.column=u.end.column,l=l.splice(r,l.length-r);var d=new m(s,l);return s.splice(s.indexOf(this)+1,0,d),d},m.prototype.merge=function(c){for(var h=c.folds,i=0;i<h.length;i++)this.addFold(h[i]);var o=this.foldData;o.splice(o.indexOf(c),1)},m.prototype.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(h){c.push(" "+h.toString())}),c.push("]"),c.join(`
|
|
`)},m.prototype.idxToPosition=function(c){for(var h=0,i=0;i<this.folds.length;i++){var o=this.folds[i];if(c-=o.start.column-h,c<0)return{row:o.start.row,column:o.start.column+c};if(c-=o.placeholder.length,c<0)return o.start;h=o.end.column}return{row:this.end.row,column:this.end.column+c}},m}();a.FoldLine=f}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,a,v){var p=n("./range").Range,f=p.comparePoints,m=function(){function c(){this.ranges=[],this.$bias=1}return c.prototype.pointIndex=function(h,i,o){for(var l=this.ranges,s=o||0;s<l.length;s++){var r=l[s],u=f(h,r.end);if(!(u>0)){var d=f(h,r.start);return u===0?i&&d!==0?-s-2:s:d>0||d===0&&!i?s:-s-1}}return-s-1},c.prototype.add=function(h){var i=!h.isEmpty(),o=this.pointIndex(h.start,i);o<0&&(o=-o-1);var l=this.pointIndex(h.end,i,o);return l<0?l=-l-1:l++,this.ranges.splice(o,l-o,h)},c.prototype.addList=function(h){for(var i=[],o=h.length;o--;)i.push.apply(i,this.add(h[o]));return i},c.prototype.substractPoint=function(h){var i=this.pointIndex(h);if(i>=0)return this.ranges.splice(i,1)},c.prototype.merge=function(){var h=[],i=this.ranges;i=i.sort(function(u,d){return f(u.start,d.start)});for(var o=i[0],l,s=1;s<i.length;s++){l=o,o=i[s];var r=f(l.end,o.start);r<0||r==0&&!l.isEmpty()&&!o.isEmpty()||(f(l.end,o.end)<0&&(l.end.row=o.end.row,l.end.column=o.end.column),i.splice(s,1),h.push(o),o=l,s--)}return this.ranges=i,h},c.prototype.contains=function(h,i){return this.pointIndex({row:h,column:i})>=0},c.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},c.prototype.rangeAtPoint=function(h){var i=this.pointIndex(h);if(i>=0)return this.ranges[i]},c.prototype.clipRows=function(h,i){var o=this.ranges;if(o[0].start.row>i||o[o.length-1].start.row<h)return[];var l=this.pointIndex({row:h,column:0});l<0&&(l=-l-1);var s=this.pointIndex({row:i,column:0},l);s<0&&(s=-s-1);for(var r=[],u=l;u<s;u++)r.push(o[u]);return r},c.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},c.prototype.attach=function(h){this.session&&this.detach(),this.session=h,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},c.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},c.prototype.$onChange=function(h){for(var i=h.start,o=h.end,l=i.row,s=o.row,r=this.ranges,u=0,d=r.length;u<d;u++){var g=r[u];if(g.end.row>=l)break}if(h.action=="insert")for(var y=s-l,x=-i.column+o.column;u<d;u++){var g=r[u];if(g.start.row>l)break;if(g.start.row==l&&g.start.column>=i.column&&(g.start.column==i.column&&this.$bias<=0||(g.start.column+=x,g.start.row+=y)),g.end.row==l&&g.end.column>=i.column){if(g.end.column==i.column&&this.$bias<0)continue;g.end.column==i.column&&x>0&&u<d-1&&g.end.column>g.start.column&&g.end.column==r[u+1].start.column&&(g.end.column-=x),g.end.column+=x,g.end.row+=y}}else for(var y=l-s,x=i.column-o.column;u<d;u++){var g=r[u];if(g.start.row>s)break;g.end.row<s&&(l<g.end.row||l==g.end.row&&i.column<g.end.column)?(g.end.row=l,g.end.column=i.column):g.end.row==s?g.end.column<=o.column?(y||g.end.column>i.column)&&(g.end.column=i.column,g.end.row=i.row):(g.end.column+=x,g.end.row+=y):g.end.row>s&&(g.end.row+=y),g.start.row<s&&(l<g.start.row||l==g.start.row&&i.column<g.start.column)?(g.start.row=l,g.start.column=i.column):g.start.row==s?g.start.column<=o.column?(y||g.start.column>i.column)&&(g.start.column=i.column,g.start.row=i.row):(g.start.column+=x,g.start.row+=y):g.start.row>s&&(g.start.row+=y)}if(y!=0&&u<d)for(;u<d;u++){var g=r[u];g.start.row+=y,g.end.row+=y}},c}();m.prototype.comparePoints=f,a.RangeList=m}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,a,v){var p=this&&this.__extends||function(){var l=function(s,r){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(u[g]=d[g])},l(s,r)};return function(s,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");l(s,r);function u(){this.constructor=s}s.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}(),f=n("../range_list").RangeList,m=function(l){p(s,l);function s(r,u){var d=l.call(this)||this;return d.foldLine=null,d.placeholder=u,d.range=r,d.start=r.start,d.end=r.end,d.sameRow=r.start.row==r.end.row,d.subFolds=d.ranges=[],d}return s.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},s.prototype.setFoldLine=function(r){this.foldLine=r,this.subFolds.forEach(function(u){u.setFoldLine(r)})},s.prototype.clone=function(){var r=this.range.clone(),u=new s(r,this.placeholder);return this.subFolds.forEach(function(d){u.subFolds.push(d.clone())}),u.collapseChildren=this.collapseChildren,u},s.prototype.addSubFold=function(r){if(!this.range.isEqual(r)){h(r,this.start);for(var x=r.start.row,C=r.start.column,u=0,d=-1;u<this.subFolds.length&&(d=this.subFolds[u].range.compare(x,C),d==1);u++);var g=this.subFolds[u],y=0;if(d==0){if(g.range.containsRange(r))return g.addSubFold(r);y=1}for(var x=r.range.end.row,C=r.range.end.column,b=u,d=-1;b<this.subFolds.length&&(d=this.subFolds[b].range.compare(x,C),d==1);b++);d==0&&b++;for(var w=this.subFolds.splice(u,b-u,r),_=d==0?w.length-1:w.length,I=y;I<_;I++)r.addSubFold(w[I]);return r.setFoldLine(this.foldLine),r}},s.prototype.restoreRange=function(r){return o(r,this.start)},s}(f);function c(l,s){l.row-=s.row,l.row==0&&(l.column-=s.column)}function h(l,s){c(l.start,s),c(l.end,s)}function i(l,s){l.row==0&&(l.column+=s.column),l.row+=s.row}function o(l,s){i(l.start,s),i(l.end,s)}a.Fold=m}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,a,v){var p=n("../range").Range,f=n("./fold_line").FoldLine,m=n("./fold").Fold,c=n("../token_iterator").TokenIterator,h=n("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(o,l,s){var r=this.getFoldLine(o);if(!r)return null;for(var u=r.folds,d=0;d<u.length;d++){var g=u[d].range;if(g.contains(o,l)){if(s==1&&g.isEnd(o,l)&&!g.isEmpty())continue;if(s==-1&&g.isStart(o,l)&&!g.isEmpty())continue;return u[d]}}},this.getFoldsInRange=function(o){var l=o.start,s=o.end,r=this.$foldData,u=[];l.column+=1,s.column-=1;for(var d=0;d<r.length;d++){var g=r[d].range.compareRange(o);if(g!=2){if(g==-2)break;for(var y=r[d].folds,x=0;x<y.length;x++){var C=y[x];if(g=C.range.compareRange(o),g==-2)break;if(g==2)continue;if(g==42)break;u.push(C)}}}return l.column-=1,s.column+=1,u},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var l=[];o.forEach(function(s){l=l.concat(this.getFoldsInRange(s))},this)}else var l=this.getFoldsInRange(o);return l},this.getAllFolds=function(){for(var o=[],l=this.$foldData,s=0;s<l.length;s++)for(var r=0;r<l[s].folds.length;r++)o.push(l[s].folds[r]);return o},this.getFoldStringAt=function(o,l,s,r){if(r=r||this.getFoldLine(o),!r)return null;for(var u={end:{column:0}},d,g,y=0;y<r.folds.length;y++){g=r.folds[y];var x=g.range.compareEnd(o,l);if(x==-1){d=this.getLine(g.start.row).substring(u.end.column,g.start.column);break}else if(x===0)return null;u=g}return d||(d=this.getLine(g.start.row).substring(u.end.column)),s==-1?d.substring(0,l-u.end.column):s==1?d.substring(l-u.end.column):d},this.getFoldLine=function(o,l){var s=this.$foldData,r=0;for(l&&(r=s.indexOf(l)),r==-1&&(r=0),r;r<s.length;r++){var u=s[r];if(u.start.row<=o&&u.end.row>=o)return u;if(u.end.row>o)return null}return null},this.getNextFoldLine=function(o,l){var s=this.$foldData,r=0;for(l&&(r=s.indexOf(l)),r==-1&&(r=0),r;r<s.length;r++){var u=s[r];if(u.end.row>=o)return u}return null},this.getFoldedRowCount=function(o,l){for(var s=this.$foldData,r=l-o+1,u=0;u<s.length;u++){var d=s[u],g=d.end.row,y=d.start.row;if(g>=l){y<l&&(y>=o?r-=l-y:r=0);break}else g>=o&&(y>=o?r-=g-y:r-=g-o+1)}return r},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(l,s){return l.start.row-s.start.row}),o},this.addFold=function(o,l){var s=this.$foldData,r=!1,u;o instanceof m?u=o:(u=new m(l,o),u.collapseChildren=l.collapseChildren),this.$clipRangeToDocument(u.range);var d=u.start.row,g=u.start.column,y=u.end.row,x=u.end.column,C=this.getFoldAt(d,g,1),b=this.getFoldAt(y,x,-1);if(C&&b==C)return C.addSubFold(u);C&&!C.range.isStart(d,g)&&this.removeFold(C),b&&!b.range.isEnd(y,x)&&this.removeFold(b);var w=this.getFoldsInRange(u.range);w.length>0&&(this.removeFolds(w),u.collapseChildren||w.forEach(function(k){u.addSubFold(k)}));for(var _=0;_<s.length;_++){var I=s[_];if(y==I.start.row){I.addFold(u),r=!0;break}else if(d==I.end.row){if(I.addFold(u),r=!0,!u.sameRow){var E=s[_+1];if(E&&E.start.row==y){I.merge(E);break}}break}else if(y<=I.start.row)break}return r||(I=this.$addFoldLine(new f(this.$foldData,u))),this.$useWrapMode?this.$updateWrapData(I.start.row,I.start.row):this.$updateRowLengthCache(I.start.row,I.start.row),this.$modified=!0,this._signal("changeFold",{data:u,action:"add"}),u},this.addFolds=function(o){o.forEach(function(l){this.addFold(l)},this)},this.removeFold=function(o){var l=o.foldLine,s=l.start.row,r=l.end.row,u=this.$foldData,d=l.folds;if(d.length==1)u.splice(u.indexOf(l),1);else if(l.range.isEnd(o.end.row,o.end.column))d.pop(),l.end.row=d[d.length-1].end.row,l.end.column=d[d.length-1].end.column;else if(l.range.isStart(o.start.row,o.start.column))d.shift(),l.start.row=d[0].start.row,l.start.column=d[0].start.column;else if(o.sameRow)d.splice(d.indexOf(o),1);else{var g=l.split(o.start.row,o.start.column);d=g.folds,d.shift(),g.start.row=d[0].start.row,g.start.column=d[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(s,r):this.$updateRowLengthCache(s,r)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var l=[],s=0;s<o.length;s++)l.push(o[s]);l.forEach(function(r){this.removeFold(r)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(l){o.restoreRange(l),this.addFold(l)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(l){this.expandFold(l)},this)},this.unfold=function(o,l){var s,r;if(o==null)s=new p(0,0,this.getLength(),0),l==null&&(l=!0);else if(typeof o=="number")s=new p(o,0,o,this.getLine(o).length);else if("row"in o)s=p.fromPoints(o,o);else{if(Array.isArray(o))return r=[],o.forEach(function(d){r=r.concat(this.unfold(d))},this),r;s=o}r=this.getFoldsInRangeList(s);for(var u=r;r.length==1&&p.comparePoints(r[0].start,s.start)<0&&p.comparePoints(r[0].end,s.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(s);if(l!=!1?this.removeFolds(r):this.expandFolds(r),u.length)return u},this.isRowFolded=function(o,l){return!!this.getFoldLine(o,l)},this.getRowFoldEnd=function(o,l){var s=this.getFoldLine(o,l);return s?s.end.row:o},this.getRowFoldStart=function(o,l){var s=this.getFoldLine(o,l);return s?s.start.row:o},this.getFoldDisplayLine=function(o,l,s,r,u){r==null&&(r=o.start.row),u==null&&(u=0),l==null&&(l=o.end.row),s==null&&(s=this.getLine(l).length);var d=this.doc,g="";return o.walk(function(y,x,C,b){if(!(x<r)){if(x==r){if(C<u)return;b=Math.max(u,b)}y!=null?g+=y:g+=d.getLine(x).substring(b,C)}},l,s),g},this.getDisplayLine=function(o,l,s,r){var u=this.getFoldLine(o);if(u)return this.getFoldDisplayLine(u,o,l,s,r);var d;return d=this.doc.getLine(o),d.substring(r||0,l||d.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(l){var s=l.folds.map(function(r){return r.clone()});return new f(o,s)}),o},this.toggleFold=function(o){var l=this.selection,s=l.getRange(),r,u;if(s.isEmpty()){var d=s.start;if(r=this.getFoldAt(d.row,d.column),r){this.expandFold(r);return}else(u=this.findMatchingBracket(d))?s.comparePoint(u)==1?s.end=u:(s.start=u,s.start.column++,s.end.column--):(u=this.findMatchingBracket({row:d.row,column:d.column+1}))?(s.comparePoint(u)==1?s.end=u:s.start=u,s.start.column++):s=this.getCommentFoldRange(d.row,d.column)||s}else{var g=this.getFoldsInRange(s);if(o&&g.length){this.expandFolds(g);return}else g.length==1&&(r=g[0])}if(r||(r=this.getFoldAt(s.start.row,s.start.column)),r&&r.range.toString()==s.toString()){this.expandFold(r);return}var y="...";if(!s.isMultiLine()){if(y=this.getTextRange(s),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,s)},this.getCommentFoldRange=function(o,l,s){var r=new c(this,o,l),u=r.getCurrentToken(),d=u&&u.type;if(u&&/^comment|string/.test(d)){d=d.match(/comment|string/)[0],d=="comment"&&(d+="|doc-start|\\.doc");var g=new RegExp(d),y=new p;if(s!=1){do u=r.stepBackward();while(u&&g.test(u.type));u=r.stepForward()}y.start.row=r.getCurrentTokenRow(),y.start.column=r.getCurrentTokenColumn()+u.value.length,r=new c(this,o,l);var x=this.getState(r.$row);if(s!=-1){var C=-1;do if(u=r.stepForward(),C==-1){var b=this.getState(r.$row);x.toString()!==b.toString()&&(C=r.$row)}else if(r.$row>C)break;while(u&&g.test(u.type));u=r.stepBackward()}else u=r.getCurrentToken();return y.end.row=r.getCurrentTokenRow(),y.end.column=r.getCurrentTokenColumn(),y}},this.foldAll=function(o,l,s,r){s==null&&(s=1e5);var u=this.foldWidgets;if(u){l=l||this.getLength(),o=o||0;for(var d=o;d<l;d++)if(u[d]==null&&(u[d]=this.getFoldWidget(d)),u[d]=="start"&&!(r&&!r(d))){var g=this.getFoldWidgetRange(d);g&&g.isMultiLine()&&g.end.row<=l&&g.start.row>=o&&(d=g.end.row,g.collapseChildren=s,this.addFold("...",g))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(l){for(var s=o.getTokens(l),r=0;r<s.length;r++){var u=s[r];if(!(u.type=="text"&&/^\s+$/.test(u.value)))return!!/comment/.test(u.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var l=this.$foldMode;this.$setFolding(null),this.$setFolding(l)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(o,l){var s=this.foldWidgets;if(!s||l&&s[o])return{};for(var r=o-1,u;r>=0;){var d=s[r];if(d==null&&(d=s[r]=this.getFoldWidget(r)),d=="start"){var g=this.getFoldWidgetRange(r);if(u||(u=g),g&&g.end.row>=o)break}r--}return{range:r!==-1&&g,firstRange:u}},this.onFoldWidgetClick=function(o,l){l instanceof h&&(l=l.domEvent);var s={children:l.shiftKey,all:l.ctrlKey||l.metaKey,siblings:l.altKey},r=this.$toggleFoldWidget(o,s);if(!r){var u=l.target||l.srcElement;u&&/ace_fold-widget/.test(u.className)&&(u.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,l){if(this.getFoldWidget){var s=this.getFoldWidget(o),r=this.getLine(o),u=s==="end"?-1:1,d=this.getFoldAt(o,u===-1?0:r.length,u);if(d)return l.children||l.all?this.removeFold(d):this.expandFold(d),d;var g=this.getFoldWidgetRange(o,!0);if(g&&!g.isMultiLine()&&(d=this.getFoldAt(g.start.row,g.start.column,1),d&&g.isEqual(d.range)))return this.removeFold(d),d;if(l.siblings){var y=this.getParentFoldRangeData(o);if(y.range)var x=y.range.start.row+1,C=y.range.end.row;this.foldAll(x,C,l.all?1e4:0)}else l.children?(C=g?g.end.row:this.getLength(),this.foldAll(o+1,C,l.all?1e4:0)):g&&(l.all&&(g.collapseChildren=1e4),this.addFold("...",g));return g}},this.toggleFoldWidget=function(o){var l=this.selection.getCursor().row;l=this.getRowFoldStart(l);var s=this.$toggleFoldWidget(l,{});if(!s){var r=this.getParentFoldRangeData(l,!0);if(s=r.range||r.firstRange,s){l=s.start.row;var u=this.getFoldAt(l,this.getLine(l).length,1);u?this.removeFold(u):this.addFold("...",s)}}},this.updateFoldWidgets=function(o){var l=o.start.row,s=o.end.row-l;if(s===0)this.foldWidgets[l]=null;else if(o.action=="remove")this.foldWidgets.splice(l,s+1,null);else{var r=Array(s+1);r.unshift(l,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(o){var l=o.data;l.first!=l.last&&this.foldWidgets.length>l.first&&this.foldWidgets.splice(l.first,this.foldWidgets.length)}}a.Folding=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,a,v){var p=n("../token_iterator").TokenIterator,f=n("../range").Range;function m(){this.findMatchingBracket=function(c,h){if(c.column==0)return null;var i=h||this.getLine(c.row).charAt(c.column-1);if(i=="")return null;var o=i.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],c):this.$findOpeningBracket(o[2],c):null},this.getBracketRange=function(c){var h=this.getLine(c.row),i=!0,o,l=h.charAt(c.column-1),s=l&&l.match(/([\(\[\{])|([\)\]\}])/);if(s||(l=h.charAt(c.column),c={row:c.row,column:c.column+1},s=l&&l.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){var r=this.$findClosingBracket(s[1],c);if(!r)return null;o=f.fromPoints(c,r),i||(o.end.column++,o.start.column--),o.cursor=o.end}else{var r=this.$findOpeningBracket(s[2],c);if(!r)return null;o=f.fromPoints(r,c),i||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(c,h){var i=this.getLine(c.row),o=/([\(\[\{])|([\)\]\}])/,l=!h&&i.charAt(c.column-1),s=l&&l.match(o);if(s||(l=(h===void 0||h)&&i.charAt(c.column),c={row:c.row,column:c.column+1},s=l&&l.match(o)),!s)return null;var r=new f(c.row,c.column-1,c.row,c.column),u=s[1]?this.$findClosingBracket(s[1],c):this.$findOpeningBracket(s[2],c);if(!u)return[r];var d=new f(u.row,u.column,u.row,u.column+1);return[r,d]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,h,i){var o=this.$brackets[c],l=1,s=new p(this,h.row,h.column),r=s.getCurrentToken();if(r||(r=s.stepForward()),!!r){i||(i=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var u=h.column-s.getCurrentTokenColumn()-2,d=r.value;;){for(;u>=0;){var g=d.charAt(u);if(g==o){if(l-=1,l==0)return{row:s.getCurrentTokenRow(),column:u+s.getCurrentTokenColumn()}}else g==c&&(l+=1);u-=1}do r=s.stepBackward();while(r&&!i.test(r.type));if(r==null)break;d=r.value,u=d.length-1}return null}},this.$findClosingBracket=function(c,h,i){var o=this.$brackets[c],l=1,s=new p(this,h.row,h.column),r=s.getCurrentToken();if(r||(r=s.stepForward()),!!r){i||(i=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var u=h.column-s.getCurrentTokenColumn();;){for(var d=r.value,g=d.length;u<g;){var y=d.charAt(u);if(y==o){if(l-=1,l==0)return{row:s.getCurrentTokenRow(),column:u+s.getCurrentTokenColumn()}}else y==c&&(l+=1);u+=1}do r=s.stepForward();while(r&&!i.test(r.type));if(r==null)break;u=0}return null}},this.getMatchingTags=function(c){var h=new p(this,c.row,c.column),i=this.$findTagName(h);if(i){var o=h.stepBackward();return o.value==="<"?this.$findClosingTag(h,i):this.$findOpeningTag(h,i)}},this.$findTagName=function(c){var h=c.getCurrentToken(),i=!1,o=!1;if(h&&h.type.indexOf("tag-name")===-1)do o?h=c.stepBackward():h=c.stepForward(),h&&(h.value==="/>"?o=!0:h.type.indexOf("tag-name")!==-1&&(i=!0));while(h&&!i);return h},this.$findClosingTag=function(c,h){var i,o=h.value,l=h.value,s=0,r=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);h=c.stepForward();var u=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length),d=!1;do{if(i=h,i.type.indexOf("tag-close")!==-1&&!d){var g=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);d=!0}if(h=c.stepForward(),h){if(h.value===">"&&!d){var g=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);d=!0}if(h.type.indexOf("tag-name")!==-1){if(o=h.value,l===o){if(i.value==="<")s++;else if(i.value==="</"&&(s--,s<0)){c.stepBackward();var y=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2);h=c.stepForward();var x=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=c.stepForward()),h&&h.value===">")var C=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);else return}}}else if(l===o&&h.value==="/>"&&(s--,s<0))var y=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+2),x=y,C=x,g=new f(u.end.row,u.end.column,u.end.row,u.end.column+1)}}while(h&&s>=0);if(r&&g&&y&&C&&u&&x)return{openTag:new f(r.start.row,r.start.column,g.end.row,g.end.column),closeTag:new f(y.start.row,y.start.column,C.end.row,C.end.column),openTagName:u,closeTagName:x}},this.$findOpeningTag=function(c,h){var i=c.getCurrentToken(),o=h.value,l=0,s=c.getCurrentTokenRow(),r=c.getCurrentTokenColumn(),u=r+2,d=new f(s,r,s,u);c.stepForward();var g=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=c.stepForward()),!(!h||h.value!==">")){var y=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);c.stepBackward(),c.stepBackward();do if(h=i,s=c.getCurrentTokenRow(),r=c.getCurrentTokenColumn(),u=r+h.value.length,i=c.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(o===h.value)if(i.value==="<"){if(l++,l>0){var x=new f(s,r,s,u),C=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1);do h=c.stepForward();while(h&&h.value!==">");var b=new f(c.getCurrentTokenRow(),c.getCurrentTokenColumn(),c.getCurrentTokenRow(),c.getCurrentTokenColumn()+1)}}else i.value==="</"&&l--}else if(h.value==="/>"){for(var w=0,_=i;_;){if(_.type.indexOf("tag-name")!==-1&&_.value===o){l--;break}else if(_.value==="<")break;_=c.stepBackward(),w++}for(var I=0;I<w;I++)c.stepForward()}}while(i&&l<=0);if(C&&b&&d&&y&&x&&g)return{openTag:new f(C.start.row,C.start.column,b.end.row,b.end.column),closeTag:new f(d.start.row,d.start.column,y.end.row,y.end.column),openTagName:x,closeTagName:g}}}}a.BracketMatch=m}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,a,v){var p=n("./lib/oop"),f=n("./lib/lang"),m=n("./bidihandler").BidiHandler,c=n("./config"),h=n("./lib/event_emitter").EventEmitter,i=n("./selection").Selection,o=n("./mode/text").Mode,l=n("./range").Range,s=n("./document").Document,r=n("./background_tokenizer").BackgroundTokenizer,u=n("./search_highlight").SearchHighlight,d=n("./undomanager").UndoManager,g=function(){function A(S,M){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++A.$uid,this.$foldData.toString=function(){return this.join(`
|
|
`)},this.bgTokenizer=new r(new o().getTokenizer(),this);var $=this;this.bgTokenizer.on("update",function(L){$._signal("tokenizerUpdate",L)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof S!="object"||!S.getLine)&&(S=new s(S)),this.setDocument(S),this.selection=new i(this),this.$bidiHandler=new m(this),c.resetOptions(this),this.setMode(M),c._signal("session",this),this.destroyed=!1}return A.prototype.setDocument=function(S){this.doc&&this.doc.off("change",this.$onChange),this.doc=S,S.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},A.prototype.getDocument=function(){return this.doc},A.prototype.$resetRowCache=function(S){if(!S){this.$docRowCache=[],this.$screenRowCache=[];return}var M=this.$docRowCache.length,$=this.$getRowCacheIndex(this.$docRowCache,S)+1;M>$&&(this.$docRowCache.splice($,M),this.$screenRowCache.splice($,M))},A.prototype.$getRowCacheIndex=function(S,M){for(var $=0,L=S.length-1;$<=L;){var T=$+L>>1,R=S[T];if(M>R)$=T+1;else if(M<R)L=T-1;else return T}return $-1},A.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},A.prototype.onChangeFold=function(S){var M=S.data;this.$resetRowCache(M.start.row)},A.prototype.onChange=function(S){this.$modified=!0,this.$bidiHandler.onChange(S),this.$resetRowCache(S.start.row);var M=this.$updateInternalDataOnChange(S);!this.$fromUndo&&this.$undoManager&&(M&&M.length&&(this.$undoManager.add({action:"removeFolds",folds:M},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(S,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(S),this._signal("change",S)},A.prototype.setValue=function(S){this.doc.setValue(S),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},A.fromJSON=function(S){typeof S=="string"&&(S=JSON.parse(S));var M=new d;M.$undoStack=S.history.undo,M.$redoStack=S.history.redo,M.mark=S.history.mark,M.$rev=S.history.rev;var $=new A(S.value);return S.folds.forEach(function(L){$.addFold("...",l.fromPoints(L.start,L.end))}),$.setAnnotations(S.annotations),$.setBreakpoints(S.breakpoints),$.setMode(S.mode),$.setScrollLeft(S.scrollLeft),$.setScrollTop(S.scrollTop),$.setUndoManager(M),$.selection.fromJSON(S.selection),$},A.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(S){return S.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},A.prototype.toString=function(){return this.doc.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.getState=function(S){return this.bgTokenizer.getState(S)},A.prototype.getTokens=function(S){return this.bgTokenizer.getTokens(S)},A.prototype.getTokenAt=function(S,M){var $=this.bgTokenizer.getTokens(S),L,T=0;if(M==null){var R=$.length-1;T=this.getLine(S).length}else for(var R=0;R<$.length&&(T+=$[R].value.length,!(T>=M));R++);return L=$[R],L?(L.index=R,L.start=T-L.value.length,L):null},A.prototype.setUndoManager=function(S){if(this.$undoManager=S,this.$informUndoManager&&this.$informUndoManager.cancel(),S){var M=this;S.addSession(this),this.$syncInformUndoManager=function(){M.$informUndoManager.cancel(),M.mergeUndoDeltas=!1},this.$informUndoManager=f.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},A.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},A.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},A.prototype.getTabString=function(){return this.getUseSoftTabs()?f.stringRepeat(" ",this.getTabSize()):" "},A.prototype.setUseSoftTabs=function(S){this.setOption("useSoftTabs",S)},A.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},A.prototype.setTabSize=function(S){this.setOption("tabSize",S)},A.prototype.getTabSize=function(){return this.$tabSize},A.prototype.isTabStop=function(S){return this.$useSoftTabs&&S.column%this.$tabSize===0},A.prototype.setNavigateWithinSoftTabs=function(S){this.setOption("navigateWithinSoftTabs",S)},A.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},A.prototype.setOverwrite=function(S){this.setOption("overwrite",S)},A.prototype.getOverwrite=function(){return this.$overwrite},A.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},A.prototype.addGutterDecoration=function(S,M){this.$decorations[S]||(this.$decorations[S]=""),this.$decorations[S]+=" "+M,this._signal("changeBreakpoint",{})},A.prototype.removeGutterDecoration=function(S,M){this.$decorations[S]=(this.$decorations[S]||"").replace(" "+M,""),this._signal("changeBreakpoint",{})},A.prototype.getBreakpoints=function(){return this.$breakpoints},A.prototype.setBreakpoints=function(S){this.$breakpoints=[];for(var M=0;M<S.length;M++)this.$breakpoints[S[M]]="ace_breakpoint";this._signal("changeBreakpoint",{})},A.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},A.prototype.setBreakpoint=function(S,M){M===void 0&&(M="ace_breakpoint"),M?this.$breakpoints[S]=M:delete this.$breakpoints[S],this._signal("changeBreakpoint",{})},A.prototype.clearBreakpoint=function(S){delete this.$breakpoints[S],this._signal("changeBreakpoint",{})},A.prototype.addMarker=function(S,M,$,L){var T=this.$markerId++,R={range:S,type:$||"line",renderer:typeof $=="function"?$:null,clazz:M,inFront:!!L,id:T};return L?(this.$frontMarkers[T]=R,this._signal("changeFrontMarker")):(this.$backMarkers[T]=R,this._signal("changeBackMarker")),T},A.prototype.addDynamicMarker=function(S,M){if(S.update){var $=this.$markerId++;return S.id=$,S.inFront=!!M,M?(this.$frontMarkers[$]=S,this._signal("changeFrontMarker")):(this.$backMarkers[$]=S,this._signal("changeBackMarker")),S}},A.prototype.removeMarker=function(S){var M=this.$frontMarkers[S]||this.$backMarkers[S];if(M){var $=M.inFront?this.$frontMarkers:this.$backMarkers;delete $[S],this._signal(M.inFront?"changeFrontMarker":"changeBackMarker")}},A.prototype.getMarkers=function(S){return S?this.$frontMarkers:this.$backMarkers},A.prototype.highlight=function(S){if(!this.$searchHighlight){var M=new u(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(M)}this.$searchHighlight.setRegexp(S)},A.prototype.highlightLines=function(S,M,$,L){typeof M!="number"&&($=M,M=S),$||($="ace_step");var T=new l(S,0,M,1/0);return T.id=this.addMarker(T,$,"fullLine",L),T},A.prototype.setAnnotations=function(S){this.$annotations=S,this._signal("changeAnnotation",{})},A.prototype.getAnnotations=function(){return this.$annotations||[]},A.prototype.clearAnnotations=function(){this.setAnnotations([])},A.prototype.$detectNewLine=function(S){var M=S.match(/^.*?(\r?\n)/m);M?this.$autoNewLine=M[1]:this.$autoNewLine=`
|
|
`},A.prototype.getWordRange=function(S,M){var $=this.getLine(S),L=!1;if(M>0&&(L=!!$.charAt(M-1).match(this.tokenRe)),L||(L=!!$.charAt(M).match(this.tokenRe)),L)var T=this.tokenRe;else if(/^\s+$/.test($.slice(M-1,M+1)))var T=/\s/;else var T=this.nonTokenRe;var R=M;if(R>0){do R--;while(R>=0&&$.charAt(R).match(T));R++}for(var P=M;P<$.length&&$.charAt(P).match(T);)P++;return new l(S,R,S,P)},A.prototype.getAWordRange=function(S,M){for(var $=this.getWordRange(S,M),L=this.getLine($.end.row);L.charAt($.end.column).match(/[ \t]/);)$.end.column+=1;return $},A.prototype.setNewLineMode=function(S){this.doc.setNewLineMode(S)},A.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},A.prototype.setUseWorker=function(S){this.setOption("useWorker",S)},A.prototype.getUseWorker=function(){return this.$useWorker},A.prototype.onReloadTokenizer=function(S){var M=S.data;this.bgTokenizer.start(M.first),this._signal("tokenizerUpdate",S)},A.prototype.setMode=function(S,M){if(S&&typeof S=="object"){if(S.getTokenizer)return this.$onChangeMode(S);var $=S,L=$.path}else L=S||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[L]&&!$){this.$onChangeMode(this.$modes[L]),M&&M();return}this.$modeId=L,c.loadModule(["mode",L],(function(T){if(this.$modeId!==L)return M&&M();this.$modes[L]&&!$?this.$onChangeMode(this.$modes[L]):T&&T.Mode&&(T=new T.Mode($),$||(this.$modes[L]=T,T.$id=L),this.$onChangeMode(T)),M&&M()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},A.prototype.$onChangeMode=function(S,M){if(M||(this.$modeId=S.$id),this.$mode!==S){var $=this.$mode;this.$mode=S,this.$stopWorker(),this.$useWorker&&this.$startWorker();var L=S.getTokenizer();if(L.on!==void 0){var T=this.onReloadTokenizer.bind(this);L.on("update",T)}this.bgTokenizer.setTokenizer(L),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=S.tokenRe,this.nonTokenRe=S.nonTokenRe,M||(S.attachToSession&&S.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(S.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:$,mode:S}))}},A.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},A.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(S){c.warn("Could not load worker",S),this.$worker=null}},A.prototype.getMode=function(){return this.$mode},A.prototype.setScrollTop=function(S){this.$scrollTop===S||isNaN(S)||(this.$scrollTop=S,this._signal("changeScrollTop",S))},A.prototype.getScrollTop=function(){return this.$scrollTop},A.prototype.setScrollLeft=function(S){this.$scrollLeft===S||isNaN(S)||(this.$scrollLeft=S,this._signal("changeScrollLeft",S))},A.prototype.getScrollLeft=function(){return this.$scrollLeft},A.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},A.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var S=0;return this.lineWidgets.forEach(function(M){M&&M.screenWidth>S&&(S=M.screenWidth)}),this.lineWidgetWidth=S},A.prototype.$computeWidth=function(S){if(this.$modified||S){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var M=this.doc.getAllLines(),$=this.$rowLengthCache,L=0,T=0,R=this.$foldData[T],P=R?R.start.row:1/0,F=M.length,O=0;O<F;O++){if(O>P){if(O=R.end.row+1,O>=F)break;R=this.$foldData[T++],P=R?R.start.row:1/0}$[O]==null&&($[O]=this.$getStringScreenWidth(M[O])[0]),$[O]>L&&(L=$[O])}this.screenWidth=L}},A.prototype.getLine=function(S){return this.doc.getLine(S)},A.prototype.getLines=function(S,M){return this.doc.getLines(S,M)},A.prototype.getLength=function(){return this.doc.getLength()},A.prototype.getTextRange=function(S){return this.doc.getTextRange(S||this.selection.getRange())},A.prototype.insert=function(S,M){return this.doc.insert(S,M)},A.prototype.remove=function(S){return this.doc.remove(S)},A.prototype.removeFullLines=function(S,M){return this.doc.removeFullLines(S,M)},A.prototype.undoChanges=function(S,M){if(S.length){this.$fromUndo=!0;for(var $=S.length-1;$!=-1;$--){var L=S[$];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!M&&this.$undoSelect&&(S.selectionBefore?this.selection.fromJSON(S.selectionBefore):this.selection.setRange(this.$getUndoSelection(S,!0))),this.$fromUndo=!1}},A.prototype.redoChanges=function(S,M){if(S.length){this.$fromUndo=!0;for(var $=0;$<S.length;$++){var L=S[$];(L.action=="insert"||L.action=="remove")&&this.doc.$safeApplyDelta(L)}!M&&this.$undoSelect&&(S.selectionAfter?this.selection.fromJSON(S.selectionAfter):this.selection.setRange(this.$getUndoSelection(S,!1))),this.$fromUndo=!1}},A.prototype.setUndoSelect=function(S){this.$undoSelect=S},A.prototype.$getUndoSelection=function(S,M){function $(F){return M?F.action!=="insert":F.action==="insert"}for(var L,T,R=0;R<S.length;R++){var P=S[R];if(P.start){if(!L){$(P)?L=l.fromPoints(P.start,P.end):L=l.fromPoints(P.start,P.start);continue}$(P)?(T=P.start,L.compare(T.row,T.column)==-1&&L.setStart(T),T=P.end,L.compare(T.row,T.column)==1&&L.setEnd(T)):(T=P.start,L.compare(T.row,T.column)==-1&&(L=l.fromPoints(P.start,P.start)))}}return L},A.prototype.replace=function(S,M){return this.doc.replace(S,M)},A.prototype.moveText=function(S,M,$){var L=this.getTextRange(S),T=this.getFoldsInRange(S),R=l.fromPoints(M,M);if(!$){this.remove(S);var P=S.start.row-S.end.row,F=P?-S.end.column:S.start.column-S.end.column;F&&(R.start.row==S.end.row&&R.start.column>S.end.column&&(R.start.column+=F),R.end.row==S.end.row&&R.end.column>S.end.column&&(R.end.column+=F)),P&&R.start.row>=S.end.row&&(R.start.row+=P,R.end.row+=P)}if(R.end=this.insert(R.start,L),T.length){var O=S.start,N=R.start,P=N.row-O.row,F=N.column-O.column;this.addFolds(T.map(function(W){return W=W.clone(),W.start.row==O.row&&(W.start.column+=F),W.end.row==O.row&&(W.end.column+=F),W.start.row+=P,W.end.row+=P,W}))}return R},A.prototype.indentRows=function(S,M,$){$=$.replace(/\t/g,this.getTabString());for(var L=S;L<=M;L++)this.doc.insertInLine({row:L,column:0},$)},A.prototype.outdentRows=function(S){for(var M=S.collapseRows(),$=new l(0,0,0,0),L=this.getTabSize(),T=M.start.row;T<=M.end.row;++T){var R=this.getLine(T);$.start.row=T,$.end.row=T;for(var P=0;P<L&&R.charAt(P)==" ";++P);P<L&&R.charAt(P)==" "?($.start.column=P,$.end.column=P+1):($.start.column=0,$.end.column=P),this.remove($)}},A.prototype.$moveLines=function(S,M,$){if(S=this.getRowFoldStart(S),M=this.getRowFoldEnd(M),$<0){var L=this.getRowFoldStart(S+$);if(L<0)return 0;var T=L-S}else if($>0){var L=this.getRowFoldEnd(M+$);if(L>this.doc.getLength()-1)return 0;var T=L-M}else{S=this.$clipRowToDocument(S),M=this.$clipRowToDocument(M);var T=M-S+1}var R=new l(S,0,M,Number.MAX_VALUE),P=this.getFoldsInRange(R).map(function(O){return O=O.clone(),O.start.row+=T,O.end.row+=T,O}),F=$==0?this.doc.getLines(S,M):this.doc.removeFullLines(S,M);return this.doc.insertFullLines(S+T,F),P.length&&this.addFolds(P),T},A.prototype.moveLinesUp=function(S,M){return this.$moveLines(S,M,-1)},A.prototype.moveLinesDown=function(S,M){return this.$moveLines(S,M,1)},A.prototype.duplicateLines=function(S,M){return this.$moveLines(S,M,0)},A.prototype.$clipRowToDocument=function(S){return Math.max(0,Math.min(S,this.doc.getLength()-1))},A.prototype.$clipColumnToRow=function(S,M){return M<0?0:Math.min(this.doc.getLine(S).length,M)},A.prototype.$clipPositionToDocument=function(S,M){if(M=Math.max(0,M),S<0)S=0,M=0;else{var $=this.doc.getLength();S>=$?(S=$-1,M=this.doc.getLine($-1).length):M=Math.min(this.doc.getLine(S).length,M)}return{row:S,column:M}},A.prototype.$clipRangeToDocument=function(S){S.start.row<0?(S.start.row=0,S.start.column=0):S.start.column=this.$clipColumnToRow(S.start.row,S.start.column);var M=this.doc.getLength()-1;return S.end.row>M?(S.end.row=M,S.end.column=this.doc.getLine(M).length):S.end.column=this.$clipColumnToRow(S.end.row,S.end.column),S},A.prototype.setUseWrapMode=function(S){if(S!=this.$useWrapMode){if(this.$useWrapMode=S,this.$modified=!0,this.$resetRowCache(0),S){var M=this.getLength();this.$wrapData=Array(M),this.$updateWrapData(0,M-1)}this._signal("changeWrapMode")}},A.prototype.getUseWrapMode=function(){return this.$useWrapMode},A.prototype.setWrapLimitRange=function(S,M){(this.$wrapLimitRange.min!==S||this.$wrapLimitRange.max!==M)&&(this.$wrapLimitRange={min:S,max:M},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},A.prototype.adjustWrapLimit=function(S,M){var $=this.$wrapLimitRange;$.max<0&&($={min:M,max:M});var L=this.$constrainWrapLimit(S,$.min,$.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},A.prototype.$constrainWrapLimit=function(S,M,$){return M&&(S=Math.max(M,S)),$&&(S=Math.min($,S)),S},A.prototype.getWrapLimit=function(){return this.$wrapLimit},A.prototype.setWrapLimit=function(S){this.setWrapLimitRange(S,S)},A.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},A.prototype.$updateInternalDataOnChange=function(S){var M=this.$useWrapMode,$=S.action,L=S.start,T=S.end,R=L.row,P=T.row,F=P-R,O=null;if(this.$updating=!0,F!=0)if($==="remove"){this[M?"$wrapData":"$rowLengthCache"].splice(R,F);var N=this.$foldData;O=this.getFoldsInRange(S),this.removeFolds(O);var V=this.getFoldLine(T.row),H=0;if(V){V.addRemoveChars(T.row,T.column,L.column-T.column),V.shiftRow(-F);var W=this.getFoldLine(R);W&&W!==V&&(W.merge(V),V=W),H=N.indexOf(V)+1}for(H;H<N.length;H++){var V=N[H];V.start.row>=T.row&&V.shiftRow(-F)}P=R}else{var j=Array(F);j.unshift(R,0);var Z=M?this.$wrapData:this.$rowLengthCache;Z.splice.apply(Z,j);var N=this.$foldData,V=this.getFoldLine(R),H=0;if(V){var q=V.range.compareInside(L.row,L.column);q==0?(V=V.split(L.row,L.column),V&&(V.shiftRow(F),V.addRemoveChars(P,0,T.column-L.column))):q==-1&&(V.addRemoveChars(R,0,T.column-L.column),V.shiftRow(F)),H=N.indexOf(V)+1}for(H;H<N.length;H++){var V=N[H];V.start.row>=R&&V.shiftRow(F)}}else{F=Math.abs(S.start.column-S.end.column),$==="remove"&&(O=this.getFoldsInRange(S),this.removeFolds(O),F=-F);var V=this.getFoldLine(R);V&&V.addRemoveChars(R,L.column,F)}return M&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,M?this.$updateWrapData(R,P):this.$updateRowLengthCache(R,P),O},A.prototype.$updateRowLengthCache=function(S,M){this.$rowLengthCache[S]=null,this.$rowLengthCache[M]=null},A.prototype.$updateWrapData=function(S,M){var $=this.doc.getAllLines(),L=this.getTabSize(),T=this.$wrapData,R=this.$wrapLimit,P,F,O=S;for(M=Math.min(M,$.length-1);O<=M;)F=this.getFoldLine(O,F),F?(P=[],F.walk((function(N,V,H,W){var j;if(N!=null){j=this.$getDisplayTokens(N,P.length),j[0]=C;for(var Z=1;Z<j.length;Z++)j[Z]=b}else j=this.$getDisplayTokens($[V].substring(W,H),P.length);P=P.concat(j)}).bind(this),F.end.row,$[F.end.row].length+1),T[F.start.row]=this.$computeWrapSplits(P,R,L),O=F.end.row+1):(P=this.$getDisplayTokens($[O]),T[O]=this.$computeWrapSplits(P,R,L),O++)},A.prototype.$computeWrapSplits=function(S,M,$){if(S.length==0)return[];var L=[],T=S.length,R=0,P=0,F=this.$wrapAsCode,O=this.$indentedSoftWrap,N=M<=Math.max(2*$,8)||O===!1?0:Math.floor(M/2);function V(){var q=0;if(N===0)return q;if(O)for(var G=0;G<S.length;G++){var K=S[G];if(K==_)q+=1;else if(K==I)q+=$;else{if(K==E)continue;break}}return F&&O!==!1&&(q+=$),Math.min(q,N)}function H(q){for(var G=q-R,K=R;K<q;K++){var ee=S[K];(ee===12||ee===2)&&(G-=1)}L.length||(W=V(),L.indent=W),P+=G,L.push(P),R=q}for(var W=0;T-R>M-W;){var j=R+M-W;if(S[j-1]>=_&&S[j]>=_){H(j);continue}if(S[j]==C||S[j]==b){for(j;j!=R-1&&S[j]!=C;j--);if(j>R){H(j);continue}for(j=R+M,j;j<S.length&&S[j]==b;j++);if(j==S.length)break;H(j);continue}for(var Z=Math.max(j-(M-(M>>2)),R-1);j>Z&&S[j]<C;)j--;if(F){for(;j>Z&&S[j]<C;)j--;for(;j>Z&&S[j]==w;)j--}else for(;j>Z&&S[j]<_;)j--;if(j>Z){H(++j);continue}j=R+M,S[j]==x&&j--,H(j-W)}return L},A.prototype.$getDisplayTokens=function(S,M){var $=[],L;M=M||0;for(var T=0;T<S.length;T++){var R=S.charCodeAt(T);if(R==9){L=this.getScreenTabSize($.length+M),$.push(I);for(var P=1;P<L;P++)$.push(E)}else R==32?$.push(_):R>39&&R<48||R>57&&R<64?$.push(w):R>=4352&&k(R)?$.push(y,x):$.push(y)}return $},A.prototype.$getStringScreenWidth=function(S,M,$){if(M==0)return[0,0];M==null&&(M=1/0),$=$||0;var L,T;for(T=0;T<S.length&&(L=S.charCodeAt(T),L==9?$+=this.getScreenTabSize($):L>=4352&&k(L)?$+=2:$+=1,!($>M));T++);return[$,T]},A.prototype.getRowLength=function(S){var M=1;return this.lineWidgets&&(M+=this.lineWidgets[S]&&this.lineWidgets[S].rowCount||0),!this.$useWrapMode||!this.$wrapData[S]?M:this.$wrapData[S].length+M},A.prototype.getRowLineCount=function(S){return!this.$useWrapMode||!this.$wrapData[S]?1:this.$wrapData[S].length+1},A.prototype.getRowWrapIndent=function(S){if(this.$useWrapMode){var M=this.screenToDocumentPosition(S,Number.MAX_VALUE),$=this.$wrapData[M.row];return $.length&&$[0]<M.column?$.indent:0}else return 0},A.prototype.getScreenLastRowColumn=function(S){var M=this.screenToDocumentPosition(S,Number.MAX_VALUE);return this.documentToScreenColumn(M.row,M.column)},A.prototype.getDocumentLastRowColumn=function(S,M){var $=this.documentToScreenRow(S,M);return this.getScreenLastRowColumn($)},A.prototype.getDocumentLastRowColumnPosition=function(S,M){var $=this.documentToScreenRow(S,M);return this.screenToDocumentPosition($,Number.MAX_VALUE/10)},A.prototype.getRowSplitData=function(S){if(this.$useWrapMode)return this.$wrapData[S]},A.prototype.getScreenTabSize=function(S){return this.$tabSize-(S%this.$tabSize|0)},A.prototype.screenToDocumentRow=function(S,M){return this.screenToDocumentPosition(S,M).row},A.prototype.screenToDocumentColumn=function(S,M){return this.screenToDocumentPosition(S,M).column},A.prototype.screenToDocumentPosition=function(S,M,$){if(S<0)return{row:0,column:0};var L,T=0,R=0,P,F=0,O=0,N=this.$screenRowCache,V=this.$getRowCacheIndex(N,S),H=N.length;if(H&&V>=0)var F=N[V],T=this.$docRowCache[V],W=S>N[H-1];else var W=!H;for(var j=this.getLength()-1,Z=this.getNextFoldLine(T),q=Z?Z.start.row:1/0;F<=S&&(O=this.getRowLength(T),!(F+O>S||T>=j));)F+=O,T++,T>q&&(T=Z.end.row+1,Z=this.getNextFoldLine(T,Z),q=Z?Z.start.row:1/0),W&&(this.$docRowCache.push(T),this.$screenRowCache.push(F));if(Z&&Z.start.row<=T)L=this.getFoldDisplayLine(Z),T=Z.start.row;else{if(F+O<=S||T>j)return{row:j,column:this.getLine(j).length};L=this.getLine(T),Z=null}var G=0,K=Math.floor(S-F);if(this.$useWrapMode){var ee=this.$wrapData[T];ee&&(P=ee[K],K>0&&ee.length&&(G=ee.indent,R=ee[K-1]||ee[ee.length-1],L=L.substring(R)))}return $!==void 0&&this.$bidiHandler.isBidiRow(F+K,T,K)&&(M=this.$bidiHandler.offsetToCol($)),R+=this.$getStringScreenWidth(L,M-G)[1],this.$useWrapMode&&R>=P&&(R=P-1),Z?Z.idxToPosition(R):{row:T,column:R}},A.prototype.documentToScreenPosition=function(S,M){if(typeof M>"u")var $=this.$clipPositionToDocument(S.row,S.column);else $=this.$clipPositionToDocument(S,M);S=$.row,M=$.column;var L=0,T=null,R=null;R=this.getFoldAt(S,M,1),R&&(S=R.start.row,M=R.start.column);var P,F=0,O=this.$docRowCache,N=this.$getRowCacheIndex(O,S),V=O.length;if(V&&N>=0)var F=O[N],L=this.$screenRowCache[N],H=S>O[V-1];else var H=!V;for(var W=this.getNextFoldLine(F),j=W?W.start.row:1/0;F<S;){if(F>=j){if(P=W.end.row+1,P>S)break;W=this.getNextFoldLine(P,W),j=W?W.start.row:1/0}else P=F+1;L+=this.getRowLength(F),F=P,H&&(this.$docRowCache.push(F),this.$screenRowCache.push(L))}var Z="";W&&F>=j?(Z=this.getFoldDisplayLine(W,S,M),T=W.start.row):(Z=this.getLine(S).substring(0,M),T=S);var q=0;if(this.$useWrapMode){var G=this.$wrapData[T];if(G){for(var K=0;Z.length>=G[K];)L++,K++;Z=Z.substring(G[K-1]||0,Z.length),q=K>0?G.indent:0}}return this.lineWidgets&&this.lineWidgets[F]&&this.lineWidgets[F].rowsAbove&&(L+=this.lineWidgets[F].rowsAbove),{row:L,column:q+this.$getStringScreenWidth(Z)[0]}},A.prototype.documentToScreenColumn=function(S,M){return this.documentToScreenPosition(S,M).column},A.prototype.documentToScreenRow=function(S,M){return this.documentToScreenPosition(S,M).row},A.prototype.getScreenLength=function(){var S=0,M=null;if(this.$useWrapMode)for(var T=this.$wrapData.length,R=0,L=0,M=this.$foldData[L++],P=M?M.start.row:1/0;R<T;){var F=this.$wrapData[R];S+=F?F.length+1:1,R++,R>P&&(R=M.end.row+1,M=this.$foldData[L++],P=M?M.start.row:1/0)}else{S=this.getLength();for(var $=this.$foldData,L=0;L<$.length;L++)M=$[L],S-=M.end.row-M.start.row}return this.lineWidgets&&(S+=this.$getWidgetScreenLength()),S},A.prototype.$setFontMetrics=function(S){this.$enableVarChar&&(this.$getStringScreenWidth=function(M,$,L){if($===0)return[0,0];$||($=1/0),L=L||0;var T,R;for(R=0;R<M.length&&(T=M.charAt(R),T===" "?L+=this.getScreenTabSize(L):L+=S.getCharacterWidth(T),!(L>$));R++);return[L,R]})},A.prototype.getPrecedingCharacter=function(){var S=this.selection.getCursor();if(S.column===0)return S.row===0?"":this.doc.getNewLineCharacter();var M=this.getLine(S.row);return M[S.column-1]},A.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},A}();g.$uid=0,g.prototype.$modes=c.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=k,p.implement(g.prototype,h);var y=1,x=2,C=3,b=4,w=9,_=10,I=11,E=12;function k(A){return A<4352?!1:A>=4352&&A<=4447||A>=4515&&A<=4519||A>=4602&&A<=4607||A>=9001&&A<=9002||A>=11904&&A<=11929||A>=11931&&A<=12019||A>=12032&&A<=12245||A>=12272&&A<=12283||A>=12288&&A<=12350||A>=12353&&A<=12438||A>=12441&&A<=12543||A>=12549&&A<=12589||A>=12593&&A<=12686||A>=12688&&A<=12730||A>=12736&&A<=12771||A>=12784&&A<=12830||A>=12832&&A<=12871||A>=12880&&A<=13054||A>=13056&&A<=19903||A>=19968&&A<=42124||A>=42128&&A<=42182||A>=43360&&A<=43388||A>=44032&&A<=55203||A>=55216&&A<=55238||A>=55243&&A<=55291||A>=63744&&A<=64255||A>=65040&&A<=65049||A>=65072&&A<=65106||A>=65108&&A<=65126||A>=65128&&A<=65131||A>=65281&&A<=65376||A>=65504&&A<=65510}n("./edit_session/folding").Folding.call(g.prototype),n("./edit_session/bracket_match").BracketMatch.call(g.prototype),c.defineOptions(g.prototype,"session",{wrap:{set:function(A){if(!A||A=="off"?A=!1:A=="free"?A=!0:A=="printMargin"?A=-1:typeof A=="string"&&(A=parseInt(A,10)||!1),this.$wrap!=A)if(this.$wrap=A,!A)this.setUseWrapMode(!1);else{var S=typeof A=="number"?A:null;this.setWrapLimitRange(S,S),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(A){A=A=="auto"?this.$mode.type!="text":A!="text",A!=this.$wrapAsCode&&(this.$wrapAsCode=A,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(A){this.$useWorker=A,this.$stopWorker(),A&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(A){A=parseInt(A),A>0&&this.$tabSize!==A&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=A,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(A){this.setFoldStyle(A)},handlesSet:!0},overwrite:{set:function(A){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(A){this.doc.setNewLineMode(A)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(A){this.setMode(A)},get:function(){return this.$modeId},handlesSet:!0}}),a.EditSession=g}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,a,v){var p=n("./lib/lang"),f=n("./lib/oop"),m=n("./range").Range,c=function(){function i(){this.$options={}}return i.prototype.set=function(o){return f.mixin(this.$options,o),this},i.prototype.getOptions=function(){return p.copyObject(this.$options)},i.prototype.setOptions=function(o){this.$options=o},i.prototype.find=function(o){var l=this.$options,s=this.$matchIterator(o,l);if(!s)return!1;var r=null;return s.forEach(function(u,d,g,y){return r=new m(u,d,g,y),d==y&&l.start&&l.start.start&&l.skipCurrent!=!1&&r.isEqual(l.start)?(r=null,!1):!0}),r},i.prototype.findAll=function(o){var l=this.$options;if(!l.needle)return[];this.$assembleRegExp(l);var s=l.range,r=s?o.getLines(s.start.row,s.end.row):o.doc.getAllLines(),u=[],d=l.re;if(l.$isMultiLine){var g=d.length,y=r.length-g,x;e:for(var C=d.offset||0;C<=y;C++){for(var b=0;b<g;b++)if(r[C+b].search(d[b])==-1)continue e;var w=r[C],_=r[C+g-1],I=w.length-w.match(d[0])[0].length,E=_.match(d[g-1])[0].length;x&&x.end.row===C&&x.end.column>I||(u.push(x=new m(C,I,C+g-1,E)),g>2&&(C=C+g-2))}}else for(var k=0;k<r.length;k++)for(var A=p.getMatchOffsets(r[k],d),b=0;b<A.length;b++){var S=A[b];u.push(new m(k,S.offset,k,S.offset+S.length))}if(s){for(var M=s.start.column,$=s.end.column,k=0,b=u.length-1;k<b&&u[k].start.column<M&&u[k].start.row==0;)k++;for(var L=s.end.row-s.start.row;k<b&&u[b].end.column>$&&u[b].end.row==L;)b--;for(u=u.slice(k,b+1),k=0,b=u.length;k<b;k++)u[k].start.row+=s.start.row,u[k].end.row+=s.start.row}return u},i.prototype.replace=function(o,l){var s=this.$options,r=this.$assembleRegExp(s);if(s.$isMultiLine)return l;if(r){var u=r.exec(o);if(!u||u[0].length!=o.length)return null;if(s.regExp||(l=l.replace(/\$/g,"$$$$")),l=o.replace(r,l),s.preserveCase){l=l.split("");for(var d=Math.min(o.length,o.length);d--;){var g=o[d];g&&g.toLowerCase()!=g?l[d]=l[d].toUpperCase():l[d]=l[d].toLowerCase()}l=l.join("")}return l}},i.prototype.$assembleRegExp=function(o,l){if(o.needle instanceof RegExp)return o.re=o.needle;var s=o.needle;if(!o.needle)return o.re=!1;o.regExp||(s=p.escapeRegExp(s));var r=o.caseSensitive?"gm":"gmi";try{new RegExp(s,"u"),o.$supportsUnicodeFlag=!0,r+="u"}catch{o.$supportsUnicodeFlag=!1}if(o.wholeWord&&(s=h(s,o)),o.$isMultiLine=!l&&/[\n\r]/.test(s),o.$isMultiLine)return o.re=this.$assembleMultilineRegExp(s,r);try{var u=new RegExp(s,r)}catch{u=!1}return o.re=u},i.prototype.$assembleMultilineRegExp=function(o,l){for(var s=o.replace(/\r\n|\r|\n/g,`$
|
|
^`).split(`
|
|
`),r=[],u=0;u<s.length;u++)try{r.push(new RegExp(s[u],l))}catch{return!1}return r},i.prototype.$matchIterator=function(o,l){var s=this.$assembleRegExp(l);if(!s)return!1;var r=l.backwards==!0,u=l.skipCurrent!=!1,d=s.unicode,g=l.range,y=l.start;y||(y=g?g[r?"end":"start"]:o.selection.getRange()),y.start&&(y=y[u!=r?"end":"start"]);var x=g?g.start.row:0,C=g?g.end.row:o.getLength()-1;if(r)var b=function(I){var E=y.row;if(!_(E,y.column,I)){for(E--;E>=x;E--)if(_(E,Number.MAX_VALUE,I))return;if(l.wrap!=!1){for(E=C,x=y.row;E>=x;E--)if(_(E,Number.MAX_VALUE,I))return}}};else var b=function(E){var k=y.row;if(!_(k,y.column,E)){for(k=k+1;k<=C;k++)if(_(k,0,E))return;if(l.wrap!=!1){for(k=x,C=y.row;k<=C;k++)if(_(k,0,E))return}}};if(l.$isMultiLine)var w=s.length,_=function(I,E,k){var A=r?I-w+1:I;if(!(A<0||A+w>o.getLength())){var S=o.getLine(A),M=S.search(s[0]);if(!(!r&&M<E||M===-1)){for(var $=1;$<w;$++)if(S=o.getLine(A+$),S.search(s[$])==-1)return;var L=S.match(s[w-1])[0].length;if(!(r&&L>E)&&k(A,M,A+w-1,L))return!0}}};else if(r)var _=function(E,k,A){var S=o.getLine(E),M=[],$,L=0;for(s.lastIndex=0;$=s.exec(S);){var T=$[0].length;if(L=$.index,!T){if(L>=S.length)break;s.lastIndex=L+=p.skipEmptyMatch(S,L,d)}if($.index+T>k)break;M.push($.index,T)}for(var R=M.length-1;R>=0;R-=2){var P=M[R-1],T=M[R];if(A(E,P,E,P+T))return!0}};else var _=function(E,k,A){var S=o.getLine(E),M,$;for(s.lastIndex=k;$=s.exec(S);){var L=$[0].length;if(M=$.index,A(E,M,E,M+L))return!0;if(!L&&(s.lastIndex=M+=p.skipEmptyMatch(S,M,d),M>=S.length))return!1}};return{forEach:b}},i}();function h(i,o){var l=p.supportsLookbehind();function s(g,y){y===void 0&&(y=!0);var x=l&&o.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return x.test(g)||o.regExp?l&&o.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var r=Array.from(i),u=r[0],d=r[r.length-1];return s(u)+i+s(d,!1)}a.Search=c}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,a,v){var p=this&&this.__extends||function(){var l=function(s,r){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(u[g]=d[g])},l(s,r)};return function(s,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");l(s,r);function u(){this.constructor=s}s.prototype=r===null?Object.create(r):(u.prototype=r.prototype,new u)}}(),f=n("../lib/keys"),m=n("../lib/useragent"),c=f.KEY_MODS,h=function(){function l(s,r){this.$init(s,r,!1)}return l.prototype.$init=function(s,r,u){this.platform=r||(m.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(s),this.$singleCommand=u},l.prototype.addCommand=function(s){this.commands[s.name]&&this.removeCommand(s),this.commands[s.name]=s,s.bindKey&&this._buildKeyHash(s)},l.prototype.removeCommand=function(s,r){var u=s&&(typeof s=="string"?s:s.name);s=this.commands[u],r||delete this.commands[u];var d=this.commandKeyBinding;for(var g in d){var y=d[g];if(y==s)delete d[g];else if(Array.isArray(y)){var x=y.indexOf(s);x!=-1&&(y.splice(x,1),y.length==1&&(d[g]=y[0]))}}},l.prototype.bindKey=function(s,r,u){if(typeof s=="object"&&s&&(u==null&&(u=s.position),s=s[this.platform]),!!s){if(typeof r=="function")return this.addCommand({exec:r,bindKey:s,name:r.name||s});s.split("|").forEach(function(d){var g="";if(d.indexOf(" ")!=-1){var y=d.split(/\s+/);d=y.pop(),y.forEach(function(b){var w=this.parseKeys(b),_=c[w.hashId]+w.key;g+=(g?" ":"")+_,this._addCommandToBinding(g,"chainKeys")},this),g+=" "}var x=this.parseKeys(d),C=c[x.hashId]+x.key;this._addCommandToBinding(g+C,r,u)},this)}},l.prototype._addCommandToBinding=function(s,r,u){var d=this.commandKeyBinding,g;if(!r)delete d[s];else if(!d[s]||this.$singleCommand)d[s]=r;else{Array.isArray(d[s])?(g=d[s].indexOf(r))!=-1&&d[s].splice(g,1):d[s]=[d[s]],typeof u!="number"&&(u=i(r));var y=d[s];for(g=0;g<y.length;g++){var x=y[g],C=i(x);if(C>u)break}y.splice(g,0,r)}},l.prototype.addCommands=function(s){s&&Object.keys(s).forEach(function(r){var u=s[r];if(u){if(typeof u=="string")return this.bindKey(u,r);typeof u=="function"&&(u={exec:u}),typeof u=="object"&&(u.name||(u.name=r),this.addCommand(u))}},this)},l.prototype.removeCommands=function(s){Object.keys(s).forEach(function(r){this.removeCommand(s[r])},this)},l.prototype.bindKeys=function(s){Object.keys(s).forEach(function(r){this.bindKey(r,s[r])},this)},l.prototype._buildKeyHash=function(s){this.bindKey(s.bindKey,s)},l.prototype.parseKeys=function(s){var r=s.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(C){return C}),u=r.pop(),d=f[u];if(f.FUNCTION_KEYS[d])u=f.FUNCTION_KEYS[d].toLowerCase();else if(r.length){if(r.length==1&&r[0]=="shift")return{key:u.toUpperCase(),hashId:-1}}else return{key:u,hashId:-1};for(var g=0,y=r.length;y--;){var x=f.KEY_MODS[r[y]];if(x==null)return typeof console<"u"&&console.error("invalid modifier "+r[y]+" in "+s),!1;g|=x}return{key:u,hashId:g}},l.prototype.findKeyCommand=function(s,r){var u=c[s]+r;return this.commandKeyBinding[u]},l.prototype.handleKeyboard=function(s,r,u,d){if(!(d<0)){var g=c[r]+u,y=this.commandKeyBinding[g];return s.$keyChain&&(s.$keyChain+=" "+g,y=this.commandKeyBinding[s.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(s.$keyChain=s.$keyChain||g,{command:"null"}):(s.$keyChain&&((!r||r==4)&&u.length==1?s.$keyChain=s.$keyChain.slice(0,-g.length-1):(r==-1||d>0)&&(s.$keyChain="")),{command:y})}},l.prototype.getStatusText=function(s,r){return r.$keyChain||""},l}();function i(l){return typeof l=="object"&&l.bindKey&&l.bindKey.position||(l.isDefault?-100:0)}var o=function(l){p(s,l);function s(r,u){var d=l.call(this,r,u)||this;return d.$singleCommand=!0,d}return s}(h);o.call=function(l,s,r){h.prototype.$init.call(l,s,r,!0)},h.call=function(l,s,r){h.prototype.$init.call(l,s,r,!1)},a.HashHandler=o,a.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,a,v){var p=this&&this.__extends||function(){var i=function(o,l){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,r){s.__proto__=r}||function(s,r){for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(s[u]=r[u])},i(o,l)};return function(o,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");i(o,l);function s(){this.constructor=o}o.prototype=l===null?Object.create(l):(s.prototype=l.prototype,new s)}}(),f=n("../lib/oop"),m=n("../keyboard/hash_handler").MultiHashHandler,c=n("../lib/event_emitter").EventEmitter,h=function(i){p(o,i);function o(l,s){var r=i.call(this,s,l)||this;return r.byName=r.commands,r.setDefaultHandler("exec",function(u){return u.args?u.command.exec(u.editor,u.args,u.event,!1):u.command.exec(u.editor,{},u.event,!0)}),r}return o.prototype.exec=function(l,s,r){if(Array.isArray(l)){for(var u=l.length;u--;)if(this.exec(l[u],s,r))return!0;return!1}if(typeof l=="string"&&(l=this.commands[l]),!this.canExecute(l,s))return!1;var d={editor:s,command:l,args:r};return d.returnValue=this._emit("exec",d),this._signal("afterExec",d),d.returnValue!==!1},o.prototype.canExecute=function(l,s){return typeof l=="string"&&(l=this.commands[l]),!(!l||s&&s.$readOnly&&!l.readOnly||this.$checkCommandState!=!1&&l.isAvailable&&!l.isAvailable(s))},o.prototype.toggleRecording=function(l){if(!this.$inReplay)return l&&l._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(s){this.macro.push([s.command,s.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(l){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(l);try{this.$inReplay=!0,this.macro.forEach(function(s){typeof s=="string"?this.exec(s,l):this.exec(s[0],l,s[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(l){return l.map(function(s){return typeof s[0]!="string"&&(s[0]=s[0].name),s[1]||(s=s[0]),s})},o}(m);f.implement(h.prototype,c),a.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,a,v){var p=n("../lib/lang"),f=n("../config"),m=n("../range").Range;function c(i,o){return{win:i,mac:o}}a.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:c("Ctrl-,","Command-,"),exec:function(i){f.loadModule("ace/ext/settings_menu",function(o){o.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:c("Alt-E","F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:c("Alt-Shift-E","Shift-F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:c("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:c(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:c("Ctrl-L","Command-L"),exec:function(i,o){typeof o=="number"&&!isNaN(o)&&i.gotoLine(o),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:c("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:c("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:c("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:c("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:c(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:c("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:c("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:c("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:c("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:c("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:c("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:c("Ctrl-F","Command-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(o){o.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:c("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:c("Ctrl-Home","Command-Home|Command-Up"),exec:function(i){i.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:c("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:c("Up","Up|Ctrl-P"),exec:function(i,o){i.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:c("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(i){i.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:c("Ctrl-End","Command-End|Command-Down"),exec:function(i){i.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:c("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:c("Down","Down|Ctrl-N"),exec:function(i,o){i.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:c("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:c("Ctrl-Left","Option-Left"),exec:function(i){i.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:c("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:c("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:c("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:c("Left","Left|Ctrl-B"),exec:function(i,o){i.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:c("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:c("Ctrl-Right","Option-Right"),exec:function(i){i.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:c("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:c("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:c("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:c("Right","Right|Ctrl-F"),exec:function(i,o){i.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:c(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:c("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:c(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:c("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:c("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:c("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:c("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:c("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:c("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:c("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:c(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var o=i.$copyWithEmptySelection&&i.selection.isEmpty(),l=o?i.selection.getLineRange():i.selection.getRange();i._emit("cut",l),l.isEmpty()||i.session.remove(l),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,o){i.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:c("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:c("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:c("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:c("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:c("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:c("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:c("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:c("Ctrl-H","Command-Option-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(o){o.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:c("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:c("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:c("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:c("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:c("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:c("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:c("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:c("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:c("Shift-Delete",null),exec:function(i){if(i.selection.isEmpty())i.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:c("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:c("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:c("Ctrl-Shift-Backspace",null),exec:function(i){var o=i.selection.getRange();o.start.column=0,i.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:c("Ctrl-Shift-Delete",null),exec:function(i){var o=i.selection.getRange();o.end.column=Number.MAX_VALUE,i.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:c("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:c("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:c("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:c("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:c("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:c("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,o){i.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,o){i.insert(p.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:c(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:c("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:c("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:c("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:c(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:c("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var o=i.selection.getRange();o.start.column=o.end.column=0,o.end.row++,i.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:c("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:c(null,null),exec:function(i){for(var o=i.selection.isBackwards(),l=o?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),s=o?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),r=i.session.doc.getLine(l.row).length,u=i.session.doc.getTextRange(i.selection.getRange()),d=u.replace(/\n\s*/," ").length,g=i.session.doc.getLine(l.row),y=l.row+1;y<=s.row+1;y++){var x=p.stringTrimLeft(p.stringTrimRight(i.session.doc.getLine(y)));x.length!==0&&(x=" "+x),g+=x}s.row+1<i.session.doc.getLength()-1&&(g+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new m(l.row,0,s.row+2,0),g),d>0?(i.selection.moveCursorTo(l.row,l.column),i.selection.selectTo(l.row,l.column+d)):(r=i.session.doc.getLine(l.row).length>r?r+1:r,i.selection.moveCursorTo(l.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:c(null,null),exec:function(i){var o=i.session.doc.getLength()-1,l=i.session.doc.getLine(o).length,s=i.selection.rangeList.ranges,r=[];s.length<1&&(s=[i.selection.getRange()]);for(var u=0;u<s.length;u++)u==s.length-1&&(s[u].end.row===o&&s[u].end.column===l||r.push(new m(s[u].end.row,s[u].end.column,o,l))),u===0?s[u].start.row===0&&s[u].start.column===0||r.push(new m(0,0,s[u].start.row,s[u].start.column)):r.push(new m(s[u-1].end.row,s[u-1].end.column,s[u].start.row,s[u].start.column));i.exitMultiSelectMode(),i.clearSelection();for(var u=0;u<r.length;u++)i.selection.addRange(r[u],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
|
|
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var o=i.getCursorPosition();i.selection.moveTo(o.row-1,Number.MAX_VALUE),i.insert(`
|
|
`),o.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(i){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),i.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:c("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:c(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)a.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(i){i.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,a,v){var p=n("./lib/dom"),f=function(){function m(c){this.session=c,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return m.prototype.getRowLength=function(c){var h;return this.lineWidgets?h=this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[c]?1+h:this.$wrapData[c].length+1+h},m.prototype.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(c+=h.rowCount)}),c},m.prototype.$onChangeEditor=function(c){this.attach(c.editor)},m.prototype.attach=function(c){c&&c.widgetManager&&c.widgetManager!=this&&c.widgetManager.detach(),this.editor!=c&&(this.detach(),this.editor=c,c&&(c.widgetManager=this,c.renderer.on("beforeRender",this.measureWidgets),c.renderer.on("afterRender",this.renderWidgets)))},m.prototype.detach=function(c){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},m.prototype.updateOnFold=function(c,h){var i=h.lineWidgets;if(!(!i||!c.action)){for(var o=c.data,l=o.start.row,s=o.end.row,r=c.action=="add",u=l+1;u<s;u++)i[u]&&(i[u].hidden=r);i[s]&&(r?i[l]?i[s].hidden=r:i[l]=i[s]:(i[l]==i[s]&&(i[l]=void 0),i[s].hidden=r))}},m.prototype.updateOnChange=function(c){var h=this.session.lineWidgets;if(h){var i=c.start.row,o=c.end.row-i;if(o!==0)if(c.action=="remove"){var l=h.splice(i+1,o);!h[i]&&l[l.length-1]&&(h[i]=l.pop()),l.forEach(function(r){r&&this.removeLineWidget(r)},this),this.$updateRows()}else{var s=new Array(o);h[i]&&h[i].column!=null&&c.start.column>h[i].column&&i++,s.unshift(i,0),h.splice.apply(h,s),this.$updateRows()}}},m.prototype.$updateRows=function(){var c=this.session.lineWidgets;if(c){var h=!0;c.forEach(function(i,o){if(i)for(h=!1,i.row=o;i.$oldWidget;)i.$oldWidget.row=o,i=i.$oldWidget}),h&&(this.session.lineWidgets=null)}},m.prototype.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[c.row];return h&&(c.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[c.row]=c,c},m.prototype.addLineWidget=function(c){if(this.$registerLineWidget(c),c.session=this.session,!this.editor)return c;var h=this.editor.renderer;c.html&&!c.el&&(c.el=p.createElement("div"),c.el.innerHTML=c.html),c.text&&!c.el&&(c.el=p.createElement("div"),c.el.textContent=c.text),c.el&&(p.addCssClass(c.el,"ace_lineWidgetContainer"),c.className&&p.addCssClass(c.el,c.className),c.el.style.position="absolute",c.el.style.zIndex="5",h.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex="3"),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/h.layerConfig.lineHeight);var i=this.session.getFoldAt(c.row,0);if(c.$fold=i,i){var o=this.session.lineWidgets;c.row==i.end.row&&!o[i.start.row]?o[i.start.row]=c:c.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(c),c},m.prototype.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[c.row];if(h==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;h;){if(h.$oldWidget==c){h.$oldWidget=c.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},m.prototype.getWidgetsAtRow=function(c){for(var h=this.session.lineWidgets,i=h&&h[c],o=[];i;)o.push(i),i=i.$oldWidget;return o},m.prototype.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},m.prototype.measureWidgets=function(c,h){var i=this.session._changedWidgets,o=h.layerConfig;if(!(!i||!i.length)){for(var l=1/0,s=0;s<i.length;s++){var r=i[s];if(!(!r||!r.el)&&r.session==this.session){if(!r._inDocument){if(this.session.lineWidgets[r.row]!=r)continue;r._inDocument=!0,h.container.appendChild(r.el)}r.h=r.el.offsetHeight,r.fixedWidth||(r.w=r.el.offsetWidth,r.screenWidth=Math.ceil(r.w/o.characterWidth));var u=r.h/o.lineHeight;r.coverLine&&(u-=this.session.getRowLineCount(r.row),u<0&&(u=0)),r.rowCount!=u&&(r.rowCount=u,r.row<l&&(l=r.row))}}l!=1/0&&(this.session._emit("changeFold",{data:{start:{row:l}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},m.prototype.renderWidgets=function(c,h){var i=h.layerConfig,o=this.session.lineWidgets;if(o){for(var l=Math.min(this.firstRow,i.firstRow),s=Math.max(this.lastRow,i.lastRow,o.length);l>0&&!o[l];)l--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,h.$cursorLayer.config=i;for(var r=l;r<=s;r++){var u=o[r];if(!(!u||!u.el)){if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,h.container.appendChild(u.el));var d=h.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;u.coverLine||(d+=i.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=d-i.offset+"px";var g=u.coverGutter?0:h.gutterWidth;u.fixedWidth||(g-=h.scrollLeft),u.el.style.left=g+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=i.width+2*i.padding+"px"),u.fixedWidth?u.el.style.right=h.scrollBar.getWidth()+"px":u.el.style.right=""}}}},m}();a.LineWidgets=f}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,a,v){var p=n("../lib/keys"),f=n("../mouse/default_gutter_handler").GutterTooltip,m=function(){function h(i){this.editor=i,this.gutterLayer=i.renderer.$gutterLayer,this.element=i.renderer.$gutter,this.lines=i.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new f(this.editor)}return h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(i){if(this.annotationTooltip.isOpen){i.preventDefault(),i.keyCode===p.escape&&this.annotationTooltip.hideTooltip();return}if(i.target===this.element){if(i.keyCode!=p.enter)return;i.preventDefault();var o=this.editor.getCursorPosition().row;this.editor.isRowVisible(o)||this.editor.scrollToLine(o,!0,!0),setTimeout((function(){var l=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),s=this.$findNearestFoldWidget(l),r=this.$findNearestAnnotation(l);if(!(s===null&&r===null)){if(s===null&&r!==null){this.activeRowIndex=r,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(s!==null&&r===null){this.activeRowIndex=s,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(r-l)<Math.abs(s-l)){this.activeRowIndex=r,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=s,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(i),setTimeout((function(){this.editor._signal("gutterkeydown",new c(i,this))}).bind(this),10)},h.prototype.$handleGutterKeyboardInteraction=function(i){if(i.keyCode===p.tab){i.preventDefault();return}if(i.keyCode===p.escape){i.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(i.keyCode===p.up){switch(i.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(i.keyCode===p.down){switch(i.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(i.keyCode===p.left){i.preventDefault(),this.$switchLane("annotation");return}if(i.keyCode===p.right){i.preventDefault(),this.$switchLane("fold");return}if(i.keyCode===p.enter||i.keyCode===p.space){switch(i.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var o=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),i),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==o&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(o),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var l=this.lines.cells[this.activeRowIndex].element.childNodes[2],s=l.getBoundingClientRect(),r=this.annotationTooltip.getElement().style;r.left=s.right+"px",r.top=s.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},h.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},h.prototype.$isFoldWidgetVisible=function(i){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),l=this.$getFoldWidget(i).style.display!=="none";return o&&l},h.prototype.$isAnnotationVisible=function(i){var o=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),l=this.$getAnnotation(i).style.display!=="none";return o&&l},h.prototype.$getFoldWidget=function(i){var o=this.lines.get(i),l=o.element;return l.childNodes[1]},h.prototype.$getAnnotation=function(i){var o=this.lines.get(i),l=o.element;return l.childNodes[2]},h.prototype.$findNearestFoldWidget=function(i){if(this.$isFoldWidgetVisible(i))return i;for(var o=0;i-o>0||i+o<this.lines.getLength()-1;){if(o++,i-o>=0&&this.$isFoldWidgetVisible(i-o))return i-o;if(i+o<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(i+o))return i+o}return null},h.prototype.$findNearestAnnotation=function(i){if(this.$isAnnotationVisible(i))return i;for(var o=0;i-o>0||i+o<this.lines.getLength()-1;){if(o++,i-o>=0&&this.$isAnnotationVisible(i-o))return i-o;if(i+o<=this.lines.getLength()-1&&this.$isAnnotationVisible(i+o))return i+o}return null},h.prototype.$focusFoldWidget=function(i){if(i!=null){var o=this.$getFoldWidget(i);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},h.prototype.$focusAnnotation=function(i){if(i!=null){var o=this.$getAnnotation(i);o.classList.add(this.editor.renderer.keyboardFocusClassName),o.focus()}},h.prototype.$blurFoldWidget=function(i){var o=this.$getFoldWidget(i);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},h.prototype.$blurAnnotation=function(i){var o=this.$getAnnotation(i);o.classList.remove(this.editor.renderer.keyboardFocusClassName),o.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var i=this.activeRowIndex;i>0;)if(i--,this.$isFoldWidgetVisible(i)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusFoldWidget(this.activeRowIndex);return}},h.prototype.$moveFoldWidgetDown=function(){for(var i=this.activeRowIndex;i<this.lines.getLength()-1;)if(i++,this.$isFoldWidgetVisible(i)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusFoldWidget(this.activeRowIndex);return}},h.prototype.$moveAnnotationUp=function(){for(var i=this.activeRowIndex;i>0;)if(i--,this.$isAnnotationVisible(i)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$moveAnnotationDown=function(){for(var i=this.activeRowIndex;i<this.lines.getLength()-1;)if(i++,this.$isAnnotationVisible(i)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$switchLane=function(i){switch(i){case"annotation":if(this.activeLane==="annotation")break;var o=this.$findNearestAnnotation(this.activeRowIndex);if(o==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var l=this.$findNearestFoldWidget(this.activeRowIndex);if(l==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusFoldWidget(this.activeRowIndex);break}},h.prototype.$rowIndexToRow=function(i){var o=this.lines.get(i);return o?o.row:null},h.prototype.$rowToRowIndex=function(i){for(var o=0;o<this.lines.getLength();o++){var l=this.lines.get(o);if(l.row==i)return o}return null},h}();a.GutterKeyboardHandler=m;var c=function(){function h(i,o){this.gutterKeyboardHandler=o,this.domEvent=i}return h.prototype.getKey=function(){return p.keyCodeToString(this.domEvent.keyCode)},h.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},h.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},h.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},h}();a.GutterKeyboardEvent=c}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(n,a,v){var p=this&&this.__values||function(M){var $=typeof Symbol=="function"&&Symbol.iterator,L=$&&M[$],T=0;if(L)return L.call(M);if(M&&typeof M.length=="number")return{next:function(){return M&&T>=M.length&&(M=void 0),{value:M&&M[T++],done:!M}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},f=n("./lib/oop"),m=n("./lib/dom"),c=n("./lib/lang"),h=n("./lib/useragent"),i=n("./keyboard/textinput").TextInput,o=n("./mouse/mouse_handler").MouseHandler,l=n("./mouse/fold_handler").FoldHandler,s=n("./keyboard/keybinding").KeyBinding,r=n("./edit_session").EditSession,u=n("./search").Search,d=n("./range").Range,g=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,x=n("./commands/default_commands").commands,C=n("./config"),b=n("./token_iterator").TokenIterator,w=n("./line_widgets").LineWidgets,_=n("./keyboard/gutter_handler").GutterKeyboardHandler,I=n("./config").nls,E=n("./clipboard"),k=n("./lib/keys"),A=function(){function M($,L,T){this.session,this.$toDestroy=[];var R=$.getContainerElement();this.container=R,this.renderer=$,this.id="editor"+ ++M.$uid,this.commands=new y(h.isMac?"mac":"win",x),typeof document=="object"&&(this.textInput=new i($.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new l(this)),this.keyBinding=new s(this),this.$search=new u().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=c.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(P,F){F._$emitInputEvent.schedule(31)}),this.setSession(L||T&&T.session||new r("")),C.resetOptions(this),T&&this.setOptions(T),C._signal("editor",this)}return M.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=c.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},M.prototype.startOperation=function($){if(this.curOp){if(!$||this.curOp.command)return;this.prevOp=this.curOp}$||(this.previousCommand=null,$={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:$.command||{},args:$.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},M.prototype.endOperation=function($){if(this.curOp&&this.session){if($&&$.returnValue===!1||!this.session)return this.curOp=null;if($==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var L=this.curOp.command,T=L&&L.scrollIntoView;if(T){switch(T){case"center-animate":T="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var R=this.selection.getRange(),P=this.renderer.layerConfig;(R.start.row>=P.lastRow||R.end.row<=P.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}T=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var F=this.selection.toJSON();this.curOp.selectionAfter=F,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(F),this.prevOp=this.curOp,this.curOp=null}},M.prototype.$historyTracker=function($){if(this.$mergeUndoDeltas){var L=this.prevOp,T=this.$mergeableCommands,R=L.command&&$.command.name==L.command.name;if($.command.name=="insertstring"){var P=$.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),R=R&&this.mergeNextCommand&&(!/\s/.test(P)||/\s/.test(L.args)),this.mergeNextCommand=!0}else R=R&&T.indexOf($.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(R=!1),R?this.session.mergeUndoDeltas=!0:T.indexOf($.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},M.prototype.setKeyboardHandler=function($,L){if($&&typeof $=="string"&&$!="ace"){this.$keybindingId=$;var T=this;C.loadModule(["keybinding",$],function(R){T.$keybindingId==$&&T.keyBinding.setKeyboardHandler(R&&R.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler($),L&&L()},M.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},M.prototype.setSession=function($){if(this.session!=$){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var T=this.session.getSelection();T.off("changeCursor",this.$onCursorChange),T.off("changeSelection",this.$onSelectionChange)}this.session=$,$?(this.$onDocumentChange=this.onDocumentChange.bind(this),$.on("change",this.$onDocumentChange),this.renderer.setSession($),this.$onChangeMode=this.onChangeMode.bind(this),$.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),$.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),$.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),$.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),$.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),$.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=$.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession($)),this._signal("changeSession",{session:$,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),$&&$._signal("changeEditor",{editor:this}),$&&!$.destroyed&&$.bgTokenizer.scheduleStart()}},M.prototype.getSession=function(){return this.session},M.prototype.setValue=function($,L){return this.session.doc.setValue($),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),$},M.prototype.getValue=function(){return this.session.getValue()},M.prototype.getSelection=function(){return this.selection},M.prototype.resize=function($){this.renderer.onResize($)},M.prototype.setTheme=function($,L){this.renderer.setTheme($,L)},M.prototype.getTheme=function(){return this.renderer.getTheme()},M.prototype.setStyle=function($){this.renderer.setStyle($)},M.prototype.unsetStyle=function($){this.renderer.unsetStyle($)},M.prototype.getFontSize=function(){return this.getOption("fontSize")||m.computedStyle(this.container).fontSize},M.prototype.setFontSize=function($){this.setOption("fontSize",$)},M.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var $=this;this.$highlightPending=!0,setTimeout(function(){$.$highlightPending=!1;var L=$.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(W){L.removeMarker(W)}),L.$bracketHighlight=null);var T=$.getCursorPosition(),R=$.getKeyboardHandler(),P=R&&R.$getDirectionForHighlight&&R.$getDirectionForHighlight($),F=L.getMatchingBracketRanges(T,P);if(!F){var O=new b(L,T.row,T.column),N=O.getCurrentToken();if(N&&/\b(?:tag-open|tag-name)/.test(N.type)){var V=L.getMatchingTags(T);V&&(F=[V.openTagName.isEmpty()?V.openTag:V.openTagName,V.closeTagName.isEmpty()?V.closeTag:V.closeTagName])}}if(!F&&L.$mode.getMatching&&(F=L.$mode.getMatching($.session)),!F){$.getHighlightIndentGuides()&&$.renderer.$textLayer.$highlightIndentGuide();return}var H="ace_bracket";Array.isArray(F)?F.length==1&&(H="ace_error_bracket"):F=[F],F.length==2&&(d.comparePoints(F[0].end,F[1].start)==0?F=[d.fromPoints(F[0].start,F[1].end)]:d.comparePoints(F[0].start,F[1].end)==0&&(F=[d.fromPoints(F[1].start,F[0].end)])),L.$bracketHighlight={ranges:F,markerIds:F.map(function(W){return L.addMarker(W,H,"text")})},$.getHighlightIndentGuides()&&$.renderer.$textLayer.$highlightIndentGuide()}},50)}},M.prototype.focus=function(){this.textInput.focus()},M.prototype.isFocused=function(){return this.textInput.isFocused()},M.prototype.blur=function(){this.textInput.blur()},M.prototype.onFocus=function($){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",$))},M.prototype.onBlur=function($){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",$))},M.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},M.prototype.onDocumentChange=function($){var L=this.session.$useWrapMode,T=$.start.row==$.end.row?$.end.row:1/0;this.renderer.updateLines($.start.row,T,L),this._signal("change",$),this.$cursorChange()},M.prototype.onTokenizerUpdate=function($){var L=$.data;this.renderer.updateLines(L.first,L.last)},M.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},M.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},M.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},M.prototype.$updateHighlightActiveLine=function(){var $=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),$.$highlightLineMarker&&!L)$.removeMarker($.$highlightLineMarker.id),$.$highlightLineMarker=null;else if(!$.$highlightLineMarker&&L){var T=new d(L.row,L.column,L.row,1/0);T.id=$.addMarker(T,"ace_active-line","screenLine"),$.$highlightLineMarker=T}else L&&($.$highlightLineMarker.start.row=L.row,$.$highlightLineMarker.end.row=L.row,$.$highlightLineMarker.start.column=L.column,$._signal("changeBackMarker"))},M.prototype.onSelectionChange=function($){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var T=this.selection.getRange(),R=this.getSelectionStyle();L.$selectionMarker=L.addMarker(T,"ace_selection",R)}var P=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(P),this._signal("changeSelection")},M.prototype.$getSelectionHighLightRegexp=function(){var $=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var T=L.start.column,R=L.end.column,P=$.getLine(L.start.row),F=P.substring(T,R);if(!(F.length>5e3||!/[\w\d]/.test(F))){var O=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:F}),N=P.substring(T-1,R+1);if(O.test(N))return O}}},M.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},M.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},M.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},M.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},M.prototype.onChangeMode=function($){this.renderer.updateText(),this._emit("changeMode",$)},M.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},M.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},M.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},M.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},M.prototype.getCopyText=function(){var $=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),T=!1;if(!$&&this.$copyWithEmptySelection){T=!0;for(var R=this.selection.getAllRanges(),P=0;P<R.length;P++){var F=R[P];P&&R[P-1].start.row==F.start.row||($+=this.session.getLine(F.start.row)+L)}}var O={text:$};return this._signal("copy",O),E.lineMode=T?O.text:!1,O.text},M.prototype.onCopy=function(){this.commands.exec("copy",this)},M.prototype.onCut=function(){this.commands.exec("cut",this)},M.prototype.onPaste=function($,L){var T={text:$,event:L};this.commands.exec("paste",this,T)},M.prototype.$handlePaste=function($){typeof $=="string"&&($={text:$}),this._signal("paste",$);var L=$.text,T=L===E.lineMode,R=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)T?R.insert({row:this.selection.lead.row,column:0},L):this.insert(L);else if(T)this.selection.rangeList.ranges.forEach(function(H){R.insert({row:H.start.row,column:0},L)});else{var P=L.split(/\r\n|\r|\n/),F=this.selection.rangeList.ranges,O=P.length==2&&(!P[0]||!P[1]);if(P.length!=F.length||O)return this.commands.exec("insertstring",this,L);for(var N=F.length;N--;){var V=F[N];V.isEmpty()||R.remove(V),R.insert(V.start,P[N])}}},M.prototype.execCommand=function($,L){return this.commands.exec($,this,L)},M.prototype.insert=function($,L){var T=this.session,R=T.getMode(),P=this.getCursorPosition();if(this.getBehavioursEnabled()&&!L){var F=R.transformAction(T.getState(P.row),"insertion",this,T,$);F&&($!==F.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),$=F.text)}if($==" "&&($=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&$.indexOf(`
|
|
`)==-1){var O=d.fromPoints(P,P);O.end.column+=$.length,this.session.remove(O)}}else{var O=this.getSelectionRange();P=this.session.remove(O),this.clearSelection()}if($==`
|
|
`||$==`\r
|
|
`){var W=T.getLine(P.row);if(P.column>W.search(/\S|$/)){var N=W.substr(P.column).search(/\S|$/);T.doc.removeInLine(P.row,P.column,P.column+N)}}this.clearSelection();var V=P.column,H=T.getState(P.row),W=T.getLine(P.row),j=R.checkOutdent(H,W,$);if(T.insert(P,$),F&&F.selection&&(F.selection.length==2?this.selection.setSelectionRange(new d(P.row,V+F.selection[0],P.row,V+F.selection[1])):this.selection.setSelectionRange(new d(P.row+F.selection[0],F.selection[1],P.row+F.selection[2],F.selection[3]))),this.$enableAutoIndent){if(T.getDocument().isNewLine($)){var Z=R.getNextLineIndent(H,W.slice(0,P.column),T.getTabString());T.insert({row:P.row+1,column:0},Z)}j&&R.autoOutdent(H,T,P.row)}},M.prototype.autoIndent=function(){for(var $=this.session,L=$.getMode(),T=this.selection.isEmpty()?[new d(0,0,$.doc.getLength()-1,0)]:this.selection.getAllRanges(),R="",P="",F="",O=$.getTabString(),N=0;N<T.length;N++)for(var V=T[N].start.row,H=T[N].end.row,W=V;W<=H;W++){W>0&&(R=$.getState(W-1),P=$.getLine(W-1),F=L.getNextLineIndent(R,P,O));var j=$.getLine(W),Z=L.$getIndent(j);if(F!==Z){if(Z.length>0){var q=new d(W,0,W,Z.length);$.remove(q)}F.length>0&&$.insert({row:W,column:0},F)}L.autoOutdent(R,$,W)}},M.prototype.onTextInput=function($,L){if(!L)return this.keyBinding.onTextInput($);this.startOperation({command:{name:"insertstring"}});var T=this.applyComposition.bind(this,$,L);this.selection.rangeCount?this.forEachSelection(T):T(),this.endOperation()},M.prototype.applyComposition=function($,L){if(L.extendLeft||L.extendRight){var T=this.selection.getRange();T.start.column-=L.extendLeft,T.end.column+=L.extendRight,T.start.column<0&&(T.start.row--,T.start.column+=this.session.getLine(T.start.row).length+1),this.selection.setRange(T),!$&&!T.isEmpty()&&this.remove()}if(($||!this.selection.isEmpty())&&this.insert($,!0),L.restoreStart||L.restoreEnd){var T=this.selection.getRange();T.start.column-=L.restoreStart,T.end.column-=L.restoreEnd,this.selection.setRange(T)}},M.prototype.onCommandKey=function($,L,T){return this.keyBinding.onCommandKey($,L,T)},M.prototype.setOverwrite=function($){this.session.setOverwrite($)},M.prototype.getOverwrite=function(){return this.session.getOverwrite()},M.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},M.prototype.setScrollSpeed=function($){this.setOption("scrollSpeed",$)},M.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},M.prototype.setDragDelay=function($){this.setOption("dragDelay",$)},M.prototype.getDragDelay=function(){return this.getOption("dragDelay")},M.prototype.setSelectionStyle=function($){this.setOption("selectionStyle",$)},M.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},M.prototype.setHighlightActiveLine=function($){this.setOption("highlightActiveLine",$)},M.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},M.prototype.setHighlightGutterLine=function($){this.setOption("highlightGutterLine",$)},M.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},M.prototype.setHighlightSelectedWord=function($){this.setOption("highlightSelectedWord",$)},M.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},M.prototype.setAnimatedScroll=function($){this.renderer.setAnimatedScroll($)},M.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},M.prototype.setShowInvisibles=function($){this.renderer.setShowInvisibles($)},M.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},M.prototype.setDisplayIndentGuides=function($){this.renderer.setDisplayIndentGuides($)},M.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},M.prototype.setHighlightIndentGuides=function($){this.renderer.setHighlightIndentGuides($)},M.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},M.prototype.setShowPrintMargin=function($){this.renderer.setShowPrintMargin($)},M.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},M.prototype.setPrintMarginColumn=function($){this.renderer.setPrintMarginColumn($)},M.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},M.prototype.setReadOnly=function($){this.setOption("readOnly",$)},M.prototype.getReadOnly=function(){return this.getOption("readOnly")},M.prototype.setBehavioursEnabled=function($){this.setOption("behavioursEnabled",$)},M.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},M.prototype.setWrapBehavioursEnabled=function($){this.setOption("wrapBehavioursEnabled",$)},M.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},M.prototype.setShowFoldWidgets=function($){this.setOption("showFoldWidgets",$)},M.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},M.prototype.setFadeFoldWidgets=function($){this.setOption("fadeFoldWidgets",$)},M.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},M.prototype.remove=function($){this.selection.isEmpty()&&($=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var T=this.session,R=T.getState(L.start.row),P=T.getMode().transformAction(R,"deletion",this,T,L);if(L.end.column===0){var F=T.getTextRange(L);if(F[F.length-1]==`
|
|
`){var O=T.getLine(L.end.row);/^\s+$/.test(O)&&(L.end.column=O.length)}}P&&(L=P)}this.session.remove(L),this.clearSelection()},M.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var $=this.getSelectionRange();$.start.column==$.end.column&&$.start.row==$.end.row&&($.end.column=0,$.end.row++),this.session.remove($),this.clearSelection()},M.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var $=this.getCursorPosition();this.insert(`
|
|
`),this.moveCursorToPosition($)},M.prototype.setGhostText=function($,L){this.session.widgetManager||(this.session.widgetManager=new w(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText($,L)},M.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},M.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var $=this.getCursorPosition(),L=$.column;if(L!==0){var T=this.session.getLine($.row),R,P;L<T.length?(R=T.charAt(L)+T.charAt(L-1),P=new d($.row,L-1,$.row,L+1)):(R=T.charAt(L-1)+T.charAt(L-2),P=new d($.row,L-2,$.row,L)),this.session.replace(P,R),this.session.selection.moveToPosition(P.end)}}},M.prototype.toLowerCase=function(){var $=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),T=this.session.getTextRange(L);this.session.replace(L,T.toLowerCase()),this.selection.setSelectionRange($)},M.prototype.toUpperCase=function(){var $=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),T=this.session.getTextRange(L);this.session.replace(L,T.toUpperCase()),this.selection.setSelectionRange($)},M.prototype.indent=function(){var $=this.session,L=this.getSelectionRange();if(L.start.row<L.end.row){var T=this.$getSelectedRows();$.indentRows(T.first,T.last," ");return}else if(L.start.column<L.end.column){var R=$.getTextRange(L);if(!/^\s+$/.test(R)){var T=this.$getSelectedRows();$.indentRows(T.first,T.last," ");return}}var P=$.getLine(L.start.row),F=L.start,O=$.getTabSize(),N=$.documentToScreenColumn(F.row,F.column);if(this.session.getUseSoftTabs())var V=O-N%O,H=c.stringRepeat(" ",V);else{for(var V=N%O;P[L.start.column-1]==" "&&V;)L.start.column--,V--;this.selection.setSelectionRange(L),H=" "}return this.insert(H)},M.prototype.blockIndent=function(){var $=this.$getSelectedRows();this.session.indentRows($.first,$.last," ")},M.prototype.blockOutdent=function(){var $=this.session.getSelection();this.session.outdentRows($.getRange())},M.prototype.sortLines=function(){for(var $=this.$getSelectedRows(),L=this.session,T=[],R=$.first;R<=$.last;R++)T.push(L.getLine(R));T.sort(function(O,N){return O.toLowerCase()<N.toLowerCase()?-1:O.toLowerCase()>N.toLowerCase()?1:0});for(var P=new d(0,0,0,0),R=$.first;R<=$.last;R++){var F=L.getLine(R);P.start.row=R,P.end.row=R,P.end.column=F.length,L.replace(P,T[R-$.first])}},M.prototype.toggleCommentLines=function(){var $=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines($,this.session,L.first,L.last)},M.prototype.toggleBlockComment=function(){var $=this.getCursorPosition(),L=this.session.getState($.row),T=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,T,$)},M.prototype.getNumberAt=function($,L){var T=/[\-]?[0-9]+(?:\.[0-9]+)?/g;T.lastIndex=0;for(var R=this.session.getLine($);T.lastIndex<L;){var P=T.exec(R);if(P.index<=L&&P.index+P[0].length>=L){var F={value:P[0],start:P.index,end:P.index+P[0].length};return F}}return null},M.prototype.modifyNumber=function($){var L=this.selection.getCursor().row,T=this.selection.getCursor().column,R=new d(L,T-1,L,T),P=this.session.getTextRange(R);if(!isNaN(parseFloat(P))&&isFinite(P)){var F=this.getNumberAt(L,T);if(F){var O=F.value.indexOf(".")>=0?F.start+F.value.indexOf(".")+1:F.end,N=F.start+F.value.length-O,V=parseFloat(F.value);V*=Math.pow(10,N),O!==F.end&&T<O?$*=Math.pow(10,F.end-T-1):$*=Math.pow(10,F.end-T),V+=$,V/=Math.pow(10,N);var H=V.toFixed(N),W=new d(L,F.start,L,F.end);this.session.replace(W,H),this.moveCursorTo(L,Math.max(F.start+1,T+H.length-F.value.length))}}else this.toggleWord()},M.prototype.toggleWord=function(){var $=this.selection.getCursor().row,L=this.selection.getCursor().column;this.selection.selectWord();var T=this.getSelectedText(),R=this.selection.getWordRange().start.column,P=T.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),F=L-R-1;F<0&&(F=0);var O=0,N=0,V=this;T.match(/[A-Za-z0-9_]+/)&&P.forEach(function(te,ae){N=O+te.length,F>=O&&F<=N&&(T=te,V.selection.clearSelection(),V.moveCursorTo($,O+R),V.selection.selectTo($,N+R)),O=N});for(var H=this.$toggleWordPairs,W,j=0;j<H.length;j++)for(var Z=H[j],q=0;q<=1;q++){var G=+!q,K=T.match(new RegExp("^\\s?_?("+c.escapeRegExp(Z[q])+")\\s?$","i"));if(K){var ee=T.match(new RegExp("([_]|^|\\s)("+c.escapeRegExp(K[1])+")($|\\s)","g"));ee&&(W=T.replace(new RegExp(c.escapeRegExp(Z[q]),"i"),function(te){var ae=Z[G];return te.toUpperCase()==te?ae=ae.toUpperCase():te.charAt(0).toUpperCase()==te.charAt(0)&&(ae=ae.substr(0,0)+Z[G].charAt(0).toUpperCase()+ae.substr(1)),ae}),this.insert(W),W="")}}},M.prototype.findLinkAt=function($,L){var T,R,P=this.session.getLine($),F=P.split(/((?:https?|ftp):\/\/[\S]+)/),O=L;O<0&&(O=0);var N=0,V=0,H;try{for(var W=p(F),j=W.next();!j.done;j=W.next()){var Z=j.value;if(V=N+Z.length,O>=N&&O<=V&&Z.match(/((?:https?|ftp):\/\/[\S]+)/)){H=Z.replace(/[\s:.,'";}\]]+$/,"");break}N=V}}catch(q){T={error:q}}finally{try{j&&!j.done&&(R=W.return)&&R.call(W)}finally{if(T)throw T.error}}return H},M.prototype.openLink=function(){var $=this.selection.getCursor(),L=this.findLinkAt($.row,$.column);return L&&window.open(L,"_blank"),L!=null},M.prototype.removeLines=function(){var $=this.$getSelectedRows();this.session.removeFullLines($.first,$.last),this.clearSelection()},M.prototype.duplicateSelection=function(){var $=this.selection,L=this.session,T=$.getRange(),R=$.isBackwards();if(T.isEmpty()){var P=T.start.row;L.duplicateLines(P,P)}else{var F=R?T.start:T.end,O=L.insert(F,L.getTextRange(T));T.start=F,T.end=O,$.setSelectionRange(T,R)}},M.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},M.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},M.prototype.moveText=function($,L,T){return this.session.moveText($,L,T)},M.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},M.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},M.prototype.$moveLines=function($,L){var T,R,P=this.selection;if(!P.inMultiSelectMode||this.inVirtualSelectionMode){var F=P.toOrientedRange();T=this.$getSelectedRows(F),R=this.session.$moveLines(T.first,T.last,L?0:$),L&&$==-1&&(R=0),F.moveBy(R,0),P.fromOrientedRange(F)}else{var O=P.rangeList.ranges;P.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var N=0,V=0,H=O.length,W=0;W<H;W++){var j=W;O[W].moveBy(N,0),T=this.$getSelectedRows(O[W]);for(var Z=T.first,q=T.last;++W<H;){V&&O[W].moveBy(V,0);var G=this.$getSelectedRows(O[W]);if(L&&G.first!=q)break;if(!L&&G.first>q+1)break;q=G.last}for(W--,N=this.session.$moveLines(Z,q,L?0:$),L&&$==-1&&(j=W+1);j<=W;)O[j].moveBy(N,0),j++;L||(N=0),V+=N}P.fromOrientedRange(P.ranges[0]),P.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},M.prototype.$getSelectedRows=function($){return $=($||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart($.start.row),last:this.session.getRowFoldEnd($.end.row)}},M.prototype.onCompositionStart=function($){this.renderer.showComposition($)},M.prototype.onCompositionUpdate=function($){this.renderer.setCompositionText($)},M.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},M.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},M.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},M.prototype.isRowVisible=function($){return $>=this.getFirstVisibleRow()&&$<=this.getLastVisibleRow()},M.prototype.isRowFullyVisible=function($){return $>=this.renderer.getFirstFullyVisibleRow()&&$<=this.renderer.getLastFullyVisibleRow()},M.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},M.prototype.$moveByPage=function($,L){var T=this.renderer,R=this.renderer.layerConfig,P=$*Math.floor(R.height/R.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(P,0)}):L===!1&&(this.selection.moveCursorBy(P,0),this.selection.clearSelection());var F=T.scrollTop;T.scrollBy(0,P*R.lineHeight),L!=null&&T.scrollCursorIntoView(null,.5),T.animateScrolling(F)},M.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},M.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},M.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},M.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},M.prototype.scrollPageDown=function(){this.$moveByPage(1)},M.prototype.scrollPageUp=function(){this.$moveByPage(-1)},M.prototype.scrollToRow=function($){this.renderer.scrollToRow($)},M.prototype.scrollToLine=function($,L,T,R){this.renderer.scrollToLine($,L,T,R)},M.prototype.centerSelection=function(){var $=this.getSelectionRange(),L={row:Math.floor($.start.row+($.end.row-$.start.row)/2),column:Math.floor($.start.column+($.end.column-$.start.column)/2)};this.renderer.alignCursor(L,.5)},M.prototype.getCursorPosition=function(){return this.selection.getCursor()},M.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},M.prototype.getSelectionRange=function(){return this.selection.getRange()},M.prototype.selectAll=function(){this.selection.selectAll()},M.prototype.clearSelection=function(){this.selection.clearSelection()},M.prototype.moveCursorTo=function($,L){this.selection.moveCursorTo($,L)},M.prototype.moveCursorToPosition=function($){this.selection.moveCursorToPosition($)},M.prototype.jumpToMatching=function($,L){var T=this.getCursorPosition(),R=new b(this.session,T.row,T.column),P=R.getCurrentToken(),F=0;P&&P.type.indexOf("tag-name")!==-1&&(P=R.stepBackward());var O=P||R.stepForward();if(O){var N,V=!1,H={},W=T.column-O.start,j,Z={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(O.value.match(/[{}()\[\]]/g)){for(;W<O.value.length&&!V;W++)if(Z[O.value[W]])switch(j=Z[O.value[W]]+"."+O.type.replace("rparen","lparen"),isNaN(H[j])&&(H[j]=0),O.value[W]){case"(":case"[":case"{":H[j]++;break;case")":case"]":case"}":H[j]--,H[j]===-1&&(N="bracket",V=!0);break}}else O.type.indexOf("tag-name")!==-1&&(isNaN(H[O.value])&&(H[O.value]=0),P.value==="<"&&F>1?H[O.value]++:P.value==="</"&&H[O.value]--,H[O.value]===-1&&(N="tag",V=!0));V||(P=O,F++,O=R.stepForward(),W=0)}while(O&&!V);if(N){var q,G;if(N==="bracket")q=this.session.getBracketRange(T),q||(q=new d(R.getCurrentTokenRow(),R.getCurrentTokenColumn()+W-1,R.getCurrentTokenRow(),R.getCurrentTokenColumn()+W-1),G=q.start,(L||G.row===T.row&&Math.abs(G.column-T.column)<2)&&(q=this.session.getBracketRange(G)));else if(N==="tag"){if(!O||O.type.indexOf("tag-name")===-1)return;if(q=new d(R.getCurrentTokenRow(),R.getCurrentTokenColumn()-2,R.getCurrentTokenRow(),R.getCurrentTokenColumn()-2),q.compare(T.row,T.column)===0){var K=this.session.getMatchingTags(T);K&&(K.openTag.contains(T.row,T.column)?(q=K.closeTag,G=q.start):(q=K.openTag,K.closeTag.start.row===T.row&&K.closeTag.start.column===T.column?G=q.end:G=q.start))}G=G||q.start}G=q&&q.cursor||G,G&&($?q&&L?this.selection.setRange(q):q&&q.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(G.row,G.column):this.selection.moveTo(G.row,G.column))}}},M.prototype.gotoLine=function($,L,T){this.selection.clearSelection(),this.session.unfold({row:$-1,column:L||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo($-1,L||0),this.isRowFullyVisible($-1)||this.scrollToLine($-1,!0,T)},M.prototype.navigateTo=function($,L){this.selection.moveTo($,L)},M.prototype.navigateUp=function($){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(-$||-1,0)},M.prototype.navigateDown=function($){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy($||1,0)},M.prototype.navigateLeft=function($){if(this.selection.isEmpty())for($=$||1;$--;)this.selection.moveCursorLeft();else{var L=this.getSelectionRange().start;this.moveCursorToPosition(L)}this.clearSelection()},M.prototype.navigateRight=function($){if(this.selection.isEmpty())for($=$||1;$--;)this.selection.moveCursorRight();else{var L=this.getSelectionRange().end;this.moveCursorToPosition(L)}this.clearSelection()},M.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},M.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},M.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},M.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},M.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},M.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},M.prototype.replace=function($,L){L&&this.$search.set(L);var T=this.$search.find(this.session),R=0;return T&&(this.$tryReplace(T,$)&&(R=1),this.selection.setSelectionRange(T),this.renderer.scrollSelectionIntoView(T.start,T.end)),R},M.prototype.replaceAll=function($,L){L&&this.$search.set(L);var T=this.$search.findAll(this.session),R=0;if(!T.length)return R;var P=this.getSelectionRange();this.selection.moveTo(0,0);for(var F=T.length-1;F>=0;--F)this.$tryReplace(T[F],$)&&R++;return this.selection.setSelectionRange(P),R},M.prototype.$tryReplace=function($,L){var T=this.session.getTextRange($);return L=this.$search.replace(T,L),L!==null?($.end=this.session.replace($,L),$):null},M.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},M.prototype.find=function($,L,T){L||(L={}),typeof $=="string"||$ instanceof RegExp?L.needle=$:typeof $=="object"&&f.mixin(L,$);var R=this.selection.getRange();L.needle==null&&($=this.session.getTextRange(R)||this.$search.$options.needle,$||(R=this.session.getWordRange(R.start.row,R.start.column),$=this.session.getTextRange(R)),this.$search.set({needle:$})),this.$search.set(L),L.start||this.$search.set({start:R});var P=this.$search.find(this.session);if(L.preventScroll)return P;if(P)return this.revealRange(P,T),P;L.backwards?R.start=R.end:R.end=R.start,this.selection.setRange(R)},M.prototype.findNext=function($,L){this.find({skipCurrent:!0,backwards:!1},$,L)},M.prototype.findPrevious=function($,L){this.find($,{skipCurrent:!0,backwards:!0},L)},M.prototype.revealRange=function($,L){this.session.unfold($),this.selection.setSelectionRange($);var T=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView($.start,$.end,.5),L!==!1&&this.renderer.animateScrolling(T)},M.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},M.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},M.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function($){$.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},M.prototype.setAutoScrollEditorIntoView=function($){if($){var L,T=this,R=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var P=this.$scrollAnchor;P.style.cssText="position:absolute",this.container.insertBefore(P,this.container.firstChild);var F=this.on("changeSelection",function(){R=!0}),O=this.renderer.on("beforeRender",function(){R&&(L=T.renderer.container.getBoundingClientRect())}),N=this.renderer.on("afterRender",function(){if(R&&L&&(T.isFocused()||T.searchBox&&T.searchBox.isFocused())){var V=T.renderer,H=V.$cursorLayer.$pixelPos,W=V.layerConfig,j=H.top-W.offset;H.top>=0&&j+L.top<0?R=!0:H.top<W.height&&H.top+L.top+W.lineHeight>window.innerHeight?R=!1:R=null,R!=null&&(P.style.top=j+"px",P.style.left=H.left+"px",P.style.height=W.lineHeight+"px",P.scrollIntoView(R)),R=L=null}});this.setAutoScrollEditorIntoView=function(V){V||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",F),this.renderer.off("afterRender",N),this.renderer.off("beforeRender",O))}}},M.prototype.$resetCursorStyle=function(){var $=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test($)),L.isBlinking=!this.$readOnly&&$!="wide",m.setCssClass(L.element,"ace_slim-cursors",/slim/.test($)))},M.prototype.prompt=function($,L,T){var R=this;C.loadModule("ace/ext/prompt",function(P){P.prompt(R,$,L,T)})},M}();A.$uid=0,A.prototype.curOp=null,A.prototype.prevOp={},A.prototype.$mergeableCommands=["backspace","del","insertstring"],A.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],f.implement(A.prototype,g),C.defineOptions(A.prototype,"editor",{selectionStyle:{set:function(M){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:M})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(M){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(M){this.textInput.setReadOnly(M),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(M){this.textInput.setCopyWithEmptySelection(M)},initialValue:!1},cursorStyle:{set:function(M){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(M){this.setAutoScrollEditorIntoView(M)}},keyboardHandler:{set:function(M){this.setKeyboardHandler(M)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(M){this.session.setValue(M)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(M){this.setSession(M)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(M){this.renderer.$gutterLayer.setShowLineNumbers(M),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),M&&this.$relativeLineNumbers?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(M){this.$showLineNumbers&&M?S.attach(this):S.detach(this)}},placeholder:{set:function(M){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var $=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if($&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),m.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!$&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),m.addCssClass(this.container,"ace_hasPlaceholder");var L=m.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!$&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(M){var $={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(R){R.blur(),R.renderer.scroller.focus()},readOnly:!0},L=function(R){if(R.target==this.renderer.scroller&&R.keyCode===k.enter){R.preventDefault();var P=this.getCursorPosition().row;this.isRowVisible(P)||this.scrollToLine(P,!0,!0),this.focus()}},T;M?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",I("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",I("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand($),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",I("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",I("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),T||(T=new _(this)),T.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand($),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),T&&T.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(M){this.$textInputAriaLabel=M},initialValue:""},enableMobileMenu:{set:function(M){this.$enableMobileMenu=M},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var S={getText:function(M,$){return(Math.abs(M.selection.lead.row-$)||$+1+($<9?"·":""))+""},getWidth:function(M,$,L){return Math.max($.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(M,$){$.renderer.$loop.schedule($.renderer.CHANGE_GUTTER)},attach:function(M){M.renderer.$gutterLayer.$renderer=this,M.on("changeSelection",this.update),this.update(null,M)},detach:function(M){M.renderer.$gutterLayer.$renderer==this&&(M.renderer.$gutterLayer.$renderer=null),M.off("changeSelection",this.update),this.update(null,M)}};a.Editor=A}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,a,v){var p=n("../lib/dom"),f=function(){function m(c,h){this.element=c,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return m.prototype.moveContainer=function(c){p.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},m.prototype.pageChanged=function(c,h){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},m.prototype.computeLineTop=function(c,h,i){var o=h.firstRowScreen*h.lineHeight,l=Math.floor(o/this.canvasHeight),s=i.documentToScreenRow(c,0)*h.lineHeight;return s-l*this.canvasHeight},m.prototype.computeLineHeight=function(c,h,i){return h.lineHeight*i.getRowLineCount(c)},m.prototype.getLength=function(){return this.cells.length},m.prototype.get=function(c){return this.cells[c]},m.prototype.shift=function(){this.$cacheCell(this.cells.shift())},m.prototype.pop=function(){this.$cacheCell(this.cells.pop())},m.prototype.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var h=p.createFragment(this.element),i=0;i<c.length;i++)h.appendChild(c[i].element);this.element.appendChild(h)}else this.cells.push(c),this.element.appendChild(c.element)},m.prototype.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var h=p.createFragment(this.element),i=0;i<c.length;i++)h.appendChild(c[i].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},m.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},m.prototype.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},m.prototype.createCell=function(c,h,i,o){var l=this.cellCache.pop();if(!l){var s=p.createElement("div");o&&o(s),this.element.appendChild(s),l={element:s,text:"",row:c}}return l.row=c,l},m}();a.Lines=f}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,a,v){var p=n("../lib/dom"),f=n("../lib/oop"),m=n("../lib/lang"),c=n("../lib/event_emitter").EventEmitter,h=n("./lines").Lines,i=n("../config").nls,o=function(){function s(r){this.element=p.createElement("div"),this.element.className="ace_layer ace_gutter-layer",r.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}return s.prototype.setSession=function(r){this.session&&this.session.off("change",this.$updateAnnotations),this.session=r,r&&r.on("change",this.$updateAnnotations)},s.prototype.addGutterDecoration=function(r,u){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(r,u)},s.prototype.removeGutterDecoration=function(r,u){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(r,u)},s.prototype.setAnnotations=function(r){this.$annotations=[];for(var u=0;u<r.length;u++){var d=r[u],g=d.row,y=this.$annotations[g];y||(y=this.$annotations[g]={text:[],type:[],displayText:[]});var x=d.text,C=d.text,b=d.type;x=x?m.escapeHTML(x):d.html||"",C=C||d.html||"",y.text.indexOf(x)===-1&&(y.text.push(x),y.type.push(b),y.displayText.push(C));var w=d.className;w?y.className=w:b==="error"?y.className=" ace_error":b==="security"&&!/\bace_error\b/.test(y.className)?y.className=" ace_security":b==="warning"&&!/\bace_(error|security)\b/.test(y.className)?y.className=" ace_warning":b==="info"&&!y.className?y.className=" ace_info":b==="hint"&&!y.className&&(y.className=" ace_hint")}},s.prototype.$updateAnnotations=function(r){if(this.$annotations.length){var u=r.start.row,d=r.end.row-u;if(d!==0)if(r.action=="remove")this.$annotations.splice(u,d+1,null);else{var g=new Array(d+1);g.unshift(u,1),this.$annotations.splice.apply(this.$annotations,g)}}},s.prototype.update=function(r){this.config=r;var u=this.session,d=r.firstRow,g=Math.min(r.lastRow+r.gutterOffset,u.getLength()-1);this.oldLastRow=g,this.config=r,this.$lines.moveContainer(r),this.$updateCursorRow();for(var y=u.getNextFoldLine(d),x=y?y.start.row:1/0,C=null,b=-1,w=d;;){if(w>x&&(w=y.end.row+1,y=u.getNextFoldLine(w,y),x=y?y.start.row:1/0),w>g){for(;this.$lines.getLength()>b+1;)this.$lines.pop();break}C=this.$lines.get(++b),C?C.row=w:(C=this.$lines.createCell(w,r,this.session,l),this.$lines.push(C)),this.$renderCell(C,r,y,w),w++}this._signal("afterRender"),this.$updateGutterWidth(r)},s.prototype.$updateGutterWidth=function(r){var u=this.session,d=u.gutterRenderer||this.$renderer,g=u.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||u.$useWrapMode)&&(y=u.getLength()+g-1);var x=d?d.getWidth(u,y,r):y.toString().length*r.characterWidth,C=this.$padding||this.$computePadding();x+=C.left+C.right,x!==this.gutterWidth&&!isNaN(x)&&(this.gutterWidth=x,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",x))},s.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var r=this.session.selection.getCursor();this.$cursorRow!==r.row&&(this.$cursorRow=r.row)}},s.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var r=this.session.selection.cursor.row;if(this.$cursorRow=r,!(this.$cursorCell&&this.$cursorCell.row==r)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var u=this.$lines.cells;this.$cursorCell=null;for(var d=0;d<u.length;d++){var g=u[d];if(g.row>=this.$cursorRow){if(g.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(d>0&&y&&y.start.row==u[d-1].row)g=u[d-1];else break}g.element.className="ace_gutter-active-line "+g.element.className,this.$cursorCell=g;break}}}}},s.prototype.scrollLines=function(r){var u=this.config;if(this.config=r,this.$updateCursorRow(),this.$lines.pageChanged(u,r))return this.update(r);this.$lines.moveContainer(r);var d=Math.min(r.lastRow+r.gutterOffset,this.session.getLength()-1),g=this.oldLastRow;if(this.oldLastRow=d,!u||g<r.firstRow)return this.update(r);if(d<u.firstRow)return this.update(r);if(u.firstRow<r.firstRow)for(var y=this.session.getFoldedRowCount(u.firstRow,r.firstRow-1);y>0;y--)this.$lines.shift();if(g>d)for(var y=this.session.getFoldedRowCount(d+1,g);y>0;y--)this.$lines.pop();r.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLines(r,r.firstRow,u.firstRow-1)),d>g&&this.$lines.push(this.$renderLines(r,g+1,d)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(r)},s.prototype.$renderLines=function(r,u,d){for(var g=[],y=u,x=this.session.getNextFoldLine(y),C=x?x.start.row:1/0;y>C&&(y=x.end.row+1,x=this.session.getNextFoldLine(y,x),C=x?x.start.row:1/0),!(y>d);){var b=this.$lines.createCell(y,r,this.session,l);this.$renderCell(b,r,x,y),g.push(b),y++}return g},s.prototype.$renderCell=function(r,u,d,g){var y=r.element,x=this.session,C=y.childNodes[0],b=y.childNodes[1],w=y.childNodes[2],_=w.firstChild,I=x.$firstLineNumber,E=x.$breakpoints,k=x.$decorations,A=x.gutterRenderer||this.$renderer,S=this.$showFoldWidgets&&x.foldWidgets,M=d?d.start.row:Number.MAX_VALUE,$=u.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",T=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",R=(A?A.getText(x,g):g+I).toString();if(this.$highlightGutterLine&&(g==this.$cursorRow||d&&g<this.$cursorRow&&g>=M&&this.$cursorRow<=d.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=r&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=r)),E[g]&&(L+=E[g]),k[g]&&(L+=k[g]),this.$annotations[g]&&g!==M&&(L+=this.$annotations[g].className),S){var P=S[g];P==null&&(P=S[g]=x.getFoldWidget(g))}if(P){var F="ace_fold-widget ace_"+P,O=P=="start"&&g==M&&g<d.end.row;if(O){F+=" ace_closed";for(var N="",V=!1,H=g+1;H<=d.end.row;H++)if(this.$annotations[H]){if(this.$annotations[H].className===" ace_error"){V=!0,N=" ace_error_fold";break}this.$annotations[H].className===" ace_security"?(V=!0,N=" ace_security_fold"):this.$annotations[H].className===" ace_warning"&&N!==" ace_security_fold"&&(V=!0,N=" ace_warning_fold")}L+=N}else F+=" ace_open";b.className!=F&&(b.className=F),p.setStyle(b.style,"height",$),p.setStyle(b.style,"display","inline-block"),b.setAttribute("role","button"),b.setAttribute("tabindex","-1");var W=x.getFoldWidgetRange(g);W?b.setAttribute("aria-label",i("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[W.start.row+1,W.end.row+1])):d?b.setAttribute("aria-label",i("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[d.start.row+1,d.end.row+1])):b.setAttribute("aria-label",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[g+1])),O?(b.setAttribute("aria-expanded","false"),b.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(b.setAttribute("aria-expanded","true"),b.setAttribute("title",i("gutter.code-folding.open.title","Fold code")))}else b&&(p.setStyle(b.style,"display","none"),b.setAttribute("tabindex","0"),b.removeAttribute("role"),b.removeAttribute("aria-label"));if(V&&this.$showFoldedAnnotations){w.className="ace_gutter_annotation",_.className=T,_.className+=N,p.setStyle(_.style,"height",$),p.setStyle(w.style,"display","block"),p.setStyle(w.style,"height",$);var j;switch(N){case" ace_error_fold":j=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[R]);break;case" ace_security_fold":j=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[R]);break;case" ace_warning_fold":j=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[R]);break}w.setAttribute("aria-label",j),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else if(this.$annotations[g]){w.className="ace_gutter_annotation",_.className=T,this.$useSvgGutterIcons?_.className+=this.$annotations[g].className:y.classList.add(this.$annotations[g].className.replace(" ","")),p.setStyle(_.style,"height",$),p.setStyle(w.style,"display","block"),p.setStyle(w.style,"height",$);var j;switch(this.$annotations[g].className){case" ace_error":j=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[R]);break;case" ace_security":j=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[R]);break;case" ace_warning":j=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[R]);break;case" ace_info":j=i("gutter.annotation.aria-label.info","Info, read annotations row $0",[R]);break;case" ace_hint":j=i("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[R]);break}w.setAttribute("aria-label",j),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")}else p.setStyle(w.style,"display","none"),w.removeAttribute("aria-label"),w.removeAttribute("role"),w.setAttribute("tabindex","0");return R!==C.data&&(C.data=R),y.className!=L&&(y.className=L),p.setStyle(r.element.style,"height",this.$lines.computeLineHeight(g,u,x)+"px"),p.setStyle(r.element.style,"top",this.$lines.computeLineTop(g,u,x)+"px"),r.text=R,w.style.display==="none"&&b.style.display==="none"?r.element.setAttribute("aria-hidden",!0):r.element.setAttribute("aria-hidden",!1),r},s.prototype.setHighlightGutterLine=function(r){this.$highlightGutterLine=r},s.prototype.setShowLineNumbers=function(r){this.$renderer=!r&&{getWidth:function(){return 0},getText:function(){return""}}},s.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},s.prototype.setShowFoldWidgets=function(r){r?p.addCssClass(this.element,"ace_folding-enabled"):p.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=r,this.$padding=null},s.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},s.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var r=p.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(r.borderLeftWidth)||0)+(parseInt(r.paddingLeft)||0)+1,this.$padding.right=(parseInt(r.borderRightWidth)||0)+(parseInt(r.paddingRight)||0),this.$padding},s.prototype.getRegion=function(r){var u=this.$padding||this.$computePadding(),d=this.element.getBoundingClientRect();if(r.x<u.left+d.left)return"markers";if(this.$showFoldWidgets&&r.x>d.right-u.right)return"foldWidgets"},s}();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer="",o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,f.implement(o.prototype,c);function l(s){var r=document.createTextNode("");s.appendChild(r);var u=p.createElement("span");s.appendChild(u);var d=p.createElement("span");s.appendChild(d);var g=p.createElement("span");return d.appendChild(g),s}a.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,a,v){var p=n("../range").Range,f=n("../lib/dom"),m=function(){function h(i){this.element=f.createElement("div"),this.element.className="ace_layer ace_marker-layer",i.appendChild(this.element)}return h.prototype.setPadding=function(i){this.$padding=i},h.prototype.setSession=function(i){this.session=i},h.prototype.setMarkers=function(i){this.markers=i},h.prototype.elt=function(i,o){var l=this.i!=-1&&this.element.childNodes[this.i];l?this.i++:(l=document.createElement("div"),this.element.appendChild(l),this.i=-1),l.style.cssText=o,l.className=i},h.prototype.update=function(i){if(i){this.config=i,this.i=0;var o;for(var l in this.markers){var s=this.markers[l];if(!s.range){s.update(o,this,this.session,i);continue}var r=s.range.clipRows(i.firstRow,i.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),s.renderer){var u=this.$getTop(r.start.row,i),d=this.$padding+r.start.column*i.characterWidth;s.renderer(o,r,d,u,i)}else s.type=="fullLine"?this.drawFullLineMarker(o,r,s.clazz,i):s.type=="screenLine"?this.drawScreenLineMarker(o,r,s.clazz,i):r.isMultiLine()?s.type=="text"?this.drawTextMarker(o,r,s.clazz,i):this.drawMultiLineMarker(o,r,s.clazz,i):this.drawSingleLineMarker(o,r,s.clazz+" ace_start ace_br15",i)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(i,o){return(i-o.firstRowScreen)*o.lineHeight},h.prototype.drawTextMarker=function(i,o,l,s,r){for(var u=this.session,d=o.start.row,g=o.end.row,y=d,x=0,C=0,b=u.getScreenLastRowColumn(y),w=new p(y,o.start.column,y,C);y<=g;y++)w.start.row=w.end.row=y,w.start.column=y==d?o.start.column:u.getRowWrapIndent(y),w.end.column=b,x=C,C=b,b=y+1<g?u.getScreenLastRowColumn(y+1):y==g?0:o.end.column,this.drawSingleLineMarker(i,w,l+(y==d?" ace_start":"")+" ace_br"+c(y==d||y==d+1&&o.start.column,x<C,C>b,y==g),s,y==g?0:1,r)},h.prototype.drawMultiLineMarker=function(i,o,l,s,r){var u=this.$padding,d=s.lineHeight,g=this.$getTop(o.start.row,s),y=u+o.start.column*s.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var x=o.clone();x.end.row=x.start.row,x.end.column=this.session.getLine(x.start.row).length,this.drawBidiSingleLineMarker(i,x,l+" ace_br1 ace_start",s,null,r)}else this.elt(l+" ace_br1 ace_start","height:"+d+"px;right:"+u+"px;top:"+g+"px;left:"+y+"px;"+(r||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var x=o.clone();x.start.row=x.end.row,x.start.column=0,this.drawBidiSingleLineMarker(i,x,l+" ace_br12",s,null,r)}else{g=this.$getTop(o.end.row,s);var C=o.end.column*s.characterWidth;this.elt(l+" ace_br12","height:"+d+"px;width:"+C+"px;top:"+g+"px;left:"+u+"px;"+(r||""))}if(d=(o.end.row-o.start.row-1)*s.lineHeight,!(d<=0)){g=this.$getTop(o.start.row+1,s);var b=(o.start.column?1:0)|(o.end.column?0:8);this.elt(l+(b?" ace_br"+b:""),"height:"+d+"px;right:"+u+"px;top:"+g+"px;left:"+u+"px;"+(r||""))}},h.prototype.drawSingleLineMarker=function(i,o,l,s,r,u){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(i,o,l,s,r,u);var d=s.lineHeight,g=(o.end.column+(r||0)-o.start.column)*s.characterWidth,y=this.$getTop(o.start.row,s),x=this.$padding+o.start.column*s.characterWidth;this.elt(l,"height:"+d+"px;width:"+g+"px;top:"+y+"px;left:"+x+"px;"+(u||""))},h.prototype.drawBidiSingleLineMarker=function(i,o,l,s,r,u){var d=s.lineHeight,g=this.$getTop(o.start.row,s),y=this.$padding,x=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);x.forEach(function(C){this.elt(l,"height:"+d+"px;width:"+(C.width+(r||0))+"px;top:"+g+"px;left:"+(y+C.left)+"px;"+(u||""))},this)},h.prototype.drawFullLineMarker=function(i,o,l,s,r){var u=this.$getTop(o.start.row,s),d=s.lineHeight;o.start.row!=o.end.row&&(d+=this.$getTop(o.end.row,s)-u),this.elt(l,"height:"+d+"px;top:"+u+"px;left:0;right:0;"+(r||""))},h.prototype.drawScreenLineMarker=function(i,o,l,s,r){var u=this.$getTop(o.start.row,s),d=s.lineHeight;this.elt(l,"height:"+d+"px;top:"+u+"px;left:0;right:0;"+(r||""))},h}();m.prototype.$padding=0;function c(h,i,o,l){return(h?1:0)|(i?2:0)|(o?4:0)|(l?8:0)}a.Marker=m}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,a,v){var p=new Set(["text","rparen","lparen"]);a.isTextToken=function(f){return p.has(f)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,a,v){var p=n("../lib/oop"),f=n("../lib/dom"),m=n("../lib/lang"),c=n("./lines").Lines,h=n("../lib/event_emitter").EventEmitter,i=n("../config").nls,o=n("./text_util").isTextToken,l=function(){function s(r){this.dom=f,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",r.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new c(this.element)}return s.prototype.$updateEolChar=function(){var r=this.session.doc,u=r.getNewLineCharacter()==`
|
|
`&&r.getNewLineMode()!="windows",d=u?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=d)return this.EOL_CHAR=d,!0},s.prototype.setPadding=function(r){this.$padding=r,this.element.style.margin="0 "+r+"px"},s.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},s.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},s.prototype.$setFontMetrics=function(r){this.$fontMetrics=r,this.$fontMetrics.on("changeCharacterSize",(function(u){this._signal("changeCharacterSize",u)}).bind(this)),this.$pollSizeChanges()},s.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},s.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},s.prototype.setSession=function(r){this.session=r,r&&this.$computeTabString()},s.prototype.setShowInvisibles=function(r){return this.showInvisibles==r?!1:(this.showInvisibles=r,typeof r=="string"?(this.showSpaces=/tab/i.test(r),this.showTabs=/space/i.test(r),this.showEOL=/eol/i.test(r)):this.showSpaces=this.showTabs=this.showEOL=r,this.$computeTabString(),!0)},s.prototype.setDisplayIndentGuides=function(r){return this.displayIndentGuides==r?!1:(this.displayIndentGuides=r,this.$computeTabString(),!0)},s.prototype.setHighlightIndentGuides=function(r){return this.$highlightIndentGuides===r?!1:(this.$highlightIndentGuides=r,r)},s.prototype.$computeTabString=function(){var r=this.session.getTabSize();this.tabSize=r;for(var u=this.$tabStrings=[0],d=1;d<r+1;d++)if(this.showTabs){var g=this.dom.createElement("span");g.className="ace_invisible ace_invisible_tab",g.textContent=m.stringRepeat(this.TAB_CHAR,d),u.push(g)}else u.push(this.dom.createTextNode(m.stringRepeat(" ",d),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var y="ace_indent-guide",x=this.showSpaces?" ace_invisible ace_invisible_space":"",C=this.showSpaces?m.stringRepeat(this.SPACE_CHAR,this.tabSize):m.stringRepeat(" ",this.tabSize),b=this.showTabs?" ace_invisible ace_invisible_tab":"",w=this.showTabs?m.stringRepeat(this.TAB_CHAR,this.tabSize):C,g=this.dom.createElement("span");g.className=y+x,g.textContent=C,this.$tabStrings[" "]=g;var g=this.dom.createElement("span");g.className=y+b,g.textContent=w,this.$tabStrings[" "]=g}},s.prototype.updateLines=function(r,u,d){if(this.config.lastRow!=r.lastRow||this.config.firstRow!=r.firstRow)return this.update(r);this.config=r;for(var g=Math.max(u,r.firstRow),y=Math.min(d,r.lastRow),x=this.element.childNodes,C=0,w=r.firstRow;w<g;w++){var _=this.session.getFoldLine(w);if(_)if(_.containsRow(g)){g=_.start.row;break}else w=_.end.row;C++}for(var b=!1,w=g,_=this.session.getNextFoldLine(w),I=_?_.start.row:1/0;w>I&&(w=_.end.row+1,_=this.session.getNextFoldLine(w,_),I=_?_.start.row:1/0),!(w>y);){var E=x[C++];if(E){this.dom.removeChildren(E),this.$renderLine(E,w,w==I?_:!1),b&&(E.style.top=this.$lines.computeLineTop(w,r,this.session)+"px");var k=r.lineHeight*this.session.getRowLength(w)+"px";E.style.height!=k&&(b=!0,E.style.height=k)}w++}if(b)for(;C<this.$lines.cells.length;){var A=this.$lines.cells[C++];A.element.style.top=this.$lines.computeLineTop(A.row,r,this.session)+"px"}},s.prototype.scrollLines=function(r){var u=this.config;if(this.config=r,this.$lines.pageChanged(u,r))return this.update(r);this.$lines.moveContainer(r);var d=r.lastRow,g=u?u.lastRow:-1;if(!u||g<r.firstRow)return this.update(r);if(d<u.firstRow)return this.update(r);if(!u||u.lastRow<r.firstRow)return this.update(r);if(r.lastRow<u.firstRow)return this.update(r);if(u.firstRow<r.firstRow)for(var y=this.session.getFoldedRowCount(u.firstRow,r.firstRow-1);y>0;y--)this.$lines.shift();if(u.lastRow>r.lastRow)for(var y=this.session.getFoldedRowCount(r.lastRow+1,u.lastRow);y>0;y--)this.$lines.pop();r.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLinesFragment(r,r.firstRow,u.firstRow-1)),r.lastRow>u.lastRow&&this.$lines.push(this.$renderLinesFragment(r,u.lastRow+1,r.lastRow)),this.$highlightIndentGuide()},s.prototype.$renderLinesFragment=function(r,u,d){for(var g=[],y=u,x=this.session.getNextFoldLine(y),C=x?x.start.row:1/0;y>C&&(y=x.end.row+1,x=this.session.getNextFoldLine(y,x),C=x?x.start.row:1/0),!(y>d);){var b=this.$lines.createCell(y,r,this.session),w=b.element;this.dom.removeChildren(w),f.setStyle(w.style,"height",this.$lines.computeLineHeight(y,r,this.session)+"px"),f.setStyle(w.style,"top",this.$lines.computeLineTop(y,r,this.session)+"px"),this.$renderLine(w,y,y==C?x:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",g.push(b),y++}return g},s.prototype.update=function(r){this.$lines.moveContainer(r),this.config=r;for(var u=r.firstRow,d=r.lastRow,g=this.$lines;g.getLength();)g.pop();g.push(this.$renderLinesFragment(r,u,d))},s.prototype.$renderToken=function(r,u,d,g){for(var y=this,x=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,C=this.dom.createFragment(this.element),b,w=0;b=x.exec(g);){var _=b[1],I=b[2],E=b[3],k=b[4],A=b[5];if(!(!y.showSpaces&&I)){var S=w!=b.index?g.slice(w,b.index):"";if(w=b.index+b[0].length,S&&C.appendChild(this.dom.createTextNode(S,this.element)),_){var M=y.session.getScreenTabSize(u+b.index);C.appendChild(y.$tabStrings[M].cloneNode(!0)),u+=M-1}else if(I)if(y.showSpaces){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space",$.textContent=m.stringRepeat(y.SPACE_CHAR,I.length),C.appendChild($)}else C.appendChild(this.dom.createTextNode(I,this.element));else if(E){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space ace_invalid",$.textContent=m.stringRepeat(y.SPACE_CHAR,E.length),C.appendChild($)}else if(k){u+=1;var $=this.dom.createElement("span");$.style.width=y.config.characterWidth*2+"px",$.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",$.textContent=y.showSpaces?y.SPACE_CHAR:k,C.appendChild($)}else if(A){u+=1;var $=this.dom.createElement("span");$.style.width=y.config.characterWidth*2+"px",$.className="ace_cjk",$.textContent=A,C.appendChild($)}}}if(C.appendChild(this.dom.createTextNode(w?g.slice(w):g,this.element)),o(d.type))r.appendChild(C);else{var L="ace_"+d.type.replace(/\./g," ace_"),$=this.dom.createElement("span");d.type=="fold"&&($.style.width=d.value.length*this.config.characterWidth+"px",$.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),$.className=L,$.appendChild(C),r.appendChild($)}return u+g.length},s.prototype.renderIndentGuide=function(r,u,d){var g=u.search(this.$indentGuideRe);if(g<=0||g>=d)return u;if(u[0]==" "){g-=g%this.tabSize;for(var y=g/this.tabSize,x=0;x<y;x++)r.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(g)}else if(u[0]==" "){for(var x=0;x<g;x++)r.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(g)}return this.$highlightIndentGuide(),u},s.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var r=this.session.doc.$lines;if(r){var u=this.session.selection.getCursor(),d=/^\s*/.exec(this.session.doc.getLine(u.row))[0].length,g=Math.floor(d/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:g,start:u.row};var y=this.session.$bracketHighlight;if(y){for(var x=this.session.$bracketHighlight.ranges,C=0;C<x.length;C++)if(u.row!==x[C].start.row){this.$highlightIndentGuideMarker.end=x[C].start.row,u.row>x[C].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&r[u.row]!==""&&u.column===r[u.row].length){this.$highlightIndentGuideMarker.dir=1;for(var C=u.row+1;C<r.length;C++){var b=r[C],w=/^\s*/.exec(b)[0].length;if(b!==""&&(this.$highlightIndentGuideMarker.end=C,w<=d))break}}this.$renderHighlightIndentGuide()}}},s.prototype.$clearActiveIndentGuide=function(){for(var r=this.$lines.cells,u=0;u<r.length;u++){var d=r[u],g=d.element.childNodes;if(g.length>0){for(var y=0;y<g.length;y++)if(g[y].classList&&g[y].classList.contains("ace_indent-guide-active")){g[y].classList.remove("ace_indent-guide-active");break}}}},s.prototype.$setIndentGuideActive=function(r,u){var d=this.session.doc.getLine(r.row);if(d!==""){var g=r.element.childNodes;if(g){var y=g[u-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.classList.add("ace_indent-guide-active")}}},s.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var r=this.$lines.cells;this.$clearActiveIndentGuide();var u=this.$highlightIndentGuideMarker.indentLevel;if(u!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var d=0;d<r.length;d++){var g=r[d];if(this.$highlightIndentGuideMarker.end&&g.row>=this.$highlightIndentGuideMarker.start+1){if(g.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(g,u)}}else for(var d=r.length-1;d>=0;d--){var g=r[d];if(this.$highlightIndentGuideMarker.end&&g.row<this.$highlightIndentGuideMarker.start){if(g.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(g,u)}}}},s.prototype.$createLineElement=function(r){var u=this.dom.createElement("div");return u.className="ace_line",u.style.height=this.config.lineHeight+"px",u},s.prototype.$renderWrappedLine=function(r,u,d){var g=0,y=0,x=d[0],C=0,b=this.$createLineElement();r.appendChild(b);for(var w=0;w<u.length;w++){var _=u[w],I=_.value;if(w==0&&this.displayIndentGuides){if(g=I.length,I=this.renderIndentGuide(b,I,x),!I)continue;g-=I.length}if(g+I.length<x)C=this.$renderToken(b,C,_,I),g+=I.length;else{for(;g+I.length>=x;)C=this.$renderToken(b,C,_,I.substring(0,x-g)),I=I.substring(x-g),g=x,b=this.$createLineElement(),r.appendChild(b),b.appendChild(this.dom.createTextNode(m.stringRepeat(" ",d.indent),this.element)),y++,C=0,x=d[y]||Number.MAX_VALUE;I.length!=0&&(g+=I.length,C=this.$renderToken(b,C,_,I))}}d[d.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(b,C,null,"",!0)},s.prototype.$renderSimpleLine=function(r,u){for(var d=0,g=0;g<u.length;g++){var y=u[g],x=y.value;if(!(g==0&&this.displayIndentGuides&&(x=this.renderIndentGuide(r,x),!x))){if(d+x.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(r,d,y,x);d=this.$renderToken(r,d,y,x)}}},s.prototype.$renderOverflowMessage=function(r,u,d,g,y){d&&this.$renderToken(r,u,d,g.slice(0,this.MAX_LINE_LENGTH-u));var x=this.dom.createElement("span");x.className="ace_inline_button ace_keyword ace_toggle_wrap",x.textContent=y?"<hide>":"<click to see more...>",r.appendChild(x)},s.prototype.$renderLine=function(r,u,d){if(!d&&d!=!1&&(d=this.session.getFoldLine(u)),d)var g=this.$getFoldLineTokens(u,d);else var g=this.session.getTokens(u);var y=r;if(g.length){var x=this.session.getRowSplitData(u);if(x&&x.length){this.$renderWrappedLine(r,g,x);var y=r.lastChild}else{var y=r;this.$useLineGroups()&&(y=this.$createLineElement(),r.appendChild(y)),this.$renderSimpleLine(y,g)}}else this.$useLineGroups()&&(y=this.$createLineElement(),r.appendChild(y));if(this.showEOL&&y){d&&(u=d.end.row);var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_eol",C.textContent=u==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(C)}},s.prototype.$getFoldLineTokens=function(r,u){var d=this.session,g=[];function y(C,b,w){for(var _=0,I=0;I+C[_].value.length<b;)if(I+=C[_].value.length,_++,_==C.length)return;if(I!=b){var E=C[_].value.substring(b-I);E.length>w-b&&(E=E.substring(0,w-b)),g.push({type:C[_].type,value:E}),I=b+E.length,_+=1}for(;I<w&&_<C.length;){var E=C[_].value;E.length+I>w?g.push({type:C[_].type,value:E.substring(0,w-I)}):g.push(C[_]),I+=E.length,_+=1}}var x=d.getTokens(r);return u.walk(function(C,b,w,_,I){C!=null?g.push({type:"fold",value:C}):(I&&(x=d.getTokens(b)),x.length&&y(x,_,w))},u.end.row,this.session.getLine(u.end.row).length),g},s.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},s}();l.prototype.EOF_CHAR="¶",l.prototype.EOL_CHAR_LF="¬",l.prototype.EOL_CHAR_CRLF="¤",l.prototype.EOL_CHAR=l.prototype.EOL_CHAR_LF,l.prototype.TAB_CHAR="—",l.prototype.SPACE_CHAR="·",l.prototype.$padding=0,l.prototype.MAX_LINE_LENGTH=1e4,l.prototype.showInvisibles=!1,l.prototype.showSpaces=!1,l.prototype.showTabs=!1,l.prototype.showEOL=!1,l.prototype.displayIndentGuides=!0,l.prototype.$highlightIndentGuides=!0,l.prototype.$tabStrings=[],l.prototype.destroy={},l.prototype.onChangeTabSize=l.prototype.$computeTabString,p.implement(l.prototype,h),a.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,a,v){var p=n("../lib/dom"),f=function(){function m(c){this.element=p.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),p.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return m.prototype.$updateOpacity=function(c){for(var h=this.cursors,i=h.length;i--;)p.setStyle(h[i].style,"opacity",c?"":"0")},m.prototype.$startCssAnimation=function(){for(var c=this.cursors,h=c.length;h--;)c[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&p.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},m.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,p.removeCssClass(this.element,"ace_animate-blinking")},m.prototype.setPadding=function(c){this.$padding=c},m.prototype.setSession=function(c){this.session=c},m.prototype.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},m.prototype.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},m.prototype.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,p.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},m.prototype.addCursor=function(){var c=p.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},m.prototype.removeCursor=function(){if(this.cursors.length>1){var c=this.cursors.pop();return c.parentNode.removeChild(c),c}},m.prototype.hideCursor=function(){this.isVisible=!1,p.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},m.prototype.showCursor=function(){this.isVisible=!0,p.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},m.prototype.restartTimer=function(){var c=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,p.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&p.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),p.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=(function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){c(!0),h()},this.blinkInterval),h()}},m.prototype.getPixelPosition=function(c,h){if(!this.config||!this.session)return{left:0,top:0};c||(c=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(c),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,c.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),l=(i.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:l}},m.prototype.isCursorInView=function(c,h){return c.top>=0&&c.top<h.maxHeight},m.prototype.update=function(c){this.config=c;var h=this.session.$selectionMarkers,i=0,o=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var i=0,l=h.length;i<l;i++){var s=this.getPixelPosition(h[i].cursor,!0);if(!((s.top>c.height+c.offset||s.top<0)&&i>1)){var r=this.cursors[o++]||this.addCursor(),u=r.style;this.drawCursor?this.drawCursor(r,s,c,h[i],this.session):this.isCursorInView(s,c)?(p.setStyle(u,"display","block"),p.translate(r,s.left,s.top),p.setStyle(u,"width",Math.round(c.characterWidth)+"px"),p.setStyle(u,"height",c.lineHeight+"px")):p.setStyle(u,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var d=this.session.getOverwrite();this.$setOverwrite(d),this.$pixelPos=s,this.restartTimer()},m.prototype.$setOverwrite=function(c){c!=this.overwrite&&(this.overwrite=c,c?p.addCssClass(this.element,"ace_overwrite-cursors"):p.removeCssClass(this.element,"ace_overwrite-cursors"))},m.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},m}();f.prototype.$padding=0,f.prototype.drawCursor=null,a.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,a,v){var p=this&&this.__extends||function(){var r=function(u,d){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(g[x]=y[x])},r(u,d)};return function(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");r(u,d);function g(){this.constructor=u}u.prototype=d===null?Object.create(d):(g.prototype=d.prototype,new g)}}(),f=n("./lib/oop"),m=n("./lib/dom"),c=n("./lib/event"),h=n("./lib/event_emitter").EventEmitter,i=32768,o=function(){function r(u,d){this.element=m.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+d,this.inner=m.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),u.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}return r.prototype.setVisible=function(u){this.element.style.display=u?"":"none",this.isVisible=u,this.coeff=1},r}();f.implement(o.prototype,h);var l=function(r){p(u,r);function u(d,g){var y=r.call(this,d,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,g.$scrollbarWidth=y.width=m.scrollbarWidth(d.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return u.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var d=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-d)/(this.coeff-d)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(d){this.element.style.height=d+"px"},u.prototype.setScrollHeight=function(d){this.scrollHeight=d,d>i?(this.coeff=i/d,d=i):this.coeff!=1&&(this.coeff=1),this.inner.style.height=d+"px"},u.prototype.setScrollTop=function(d){this.scrollTop!=d&&(this.skipEvent=!0,this.scrollTop=d,this.element.scrollTop=d*this.coeff)},u}(o);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var s=function(r){p(u,r);function u(d,g){var y=r.call(this,d,"-h")||this;return y.scrollLeft=0,y.height=g.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return u.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},u.prototype.getHeight=function(){return this.isVisible?this.height:0},u.prototype.setWidth=function(d){this.element.style.width=d+"px"},u.prototype.setInnerWidth=function(d){this.inner.style.width=d+"px"},u.prototype.setScrollWidth=function(d){this.inner.style.width=d+"px"},u.prototype.setScrollLeft=function(d){this.scrollLeft!=d&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=d)},u}(o);a.ScrollBar=l,a.ScrollBarV=l,a.ScrollBarH=s,a.VScrollBar=l,a.HScrollBar=s}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,a,v){var p=this&&this.__extends||function(){var s=function(r,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,g){d.__proto__=g}||function(d,g){for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(d[y]=g[y])},s(r,u)};return function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(r,u);function d(){this.constructor=r}r.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}(),f=n("./lib/oop"),m=n("./lib/dom"),c=n("./lib/event"),h=n("./lib/event_emitter").EventEmitter;m.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
position: absolute;
|
|
background: rgba(128, 128, 128, 0.6);
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border: 1px solid #bbb;
|
|
border-radius: 2px;
|
|
z-index: 8;
|
|
}
|
|
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
|
position: absolute;
|
|
z-index: 6;
|
|
background: none;
|
|
overflow: hidden!important;
|
|
}
|
|
.ace_editor>.ace_sb-v {
|
|
z-index: 6;
|
|
right: 0;
|
|
top: 0;
|
|
width: 12px;
|
|
}
|
|
.ace_editor>.ace_sb-v div {
|
|
z-index: 8;
|
|
right: 0;
|
|
width: 100%;
|
|
}
|
|
.ace_editor>.ace_sb-h {
|
|
bottom: 0;
|
|
left: 0;
|
|
height: 12px;
|
|
}
|
|
.ace_editor>.ace_sb-h div {
|
|
bottom: 0;
|
|
height: 100%;
|
|
}
|
|
.ace_editor>.ace_sb_grabbed {
|
|
z-index: 8;
|
|
background: #000;
|
|
}`,"ace_scrollbar.css",!1);var i=function(){function s(r,u){this.element=m.createElement("div"),this.element.className="ace_sb"+u,this.inner=m.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return s.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},s}();f.implement(i.prototype,h);var o=function(s){p(r,s);function r(u,d){var g=s.call(this,u,"-v")||this;return g.scrollTop=0,g.scrollHeight=0,g.parent=u,g.width=g.VScrollWidth,g.renderer=d,g.inner.style.width=g.element.style.width=(g.width||15)+"px",g.$minWidth=0,g}return r.prototype.onMouseDown=function(u,d){if(u==="mousedown"&&!(c.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var g=this,y=d.clientY,x=function(k){y=k.clientY},C=function(){clearInterval(I)},b=d.clientY,w=this.thumbTop,_=function(){if(y!==void 0){var k=g.scrollTopFromThumbTop(w+y-b);k!==g.scrollTop&&g._emit("scroll",{data:k})}};c.capture(this.inner,x,C);var I=setInterval(_,20);return c.preventDefault(d)}var E=d.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(E)}),c.preventDefault(d)}},r.prototype.getHeight=function(){return this.height},r.prototype.scrollTopFromThumbTop=function(u){var d=u*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return d=d>>0,d<0?d=0:d>this.pageHeight-this.viewHeight&&(d=this.pageHeight-this.viewHeight),d},r.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},r.prototype.setHeight=function(u){this.height=Math.max(0,u),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},r.prototype.setScrollHeight=function(u,d){this.pageHeight===u&&!d||(this.pageHeight=u,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},r.prototype.setScrollTop=function(u){this.scrollTop=u,u<0&&(u=0),this.thumbTop=u*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},r}(i);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var l=function(s){p(r,s);function r(u,d){var g=s.call(this,u,"-h")||this;return g.scrollLeft=0,g.scrollWidth=0,g.height=g.HScrollHeight,g.inner.style.height=g.element.style.height=(g.height||12)+"px",g.renderer=d,g}return r.prototype.onMouseDown=function(u,d){if(u==="mousedown"&&!(c.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var g=this,y=d.clientX,x=function(k){y=k.clientX},C=function(){clearInterval(I)},b=d.clientX,w=this.thumbLeft,_=function(){if(y!==void 0){var k=g.scrollLeftFromThumbLeft(w+y-b);k!==g.scrollLeft&&g._emit("scroll",{data:k})}};c.capture(this.inner,x,C);var I=setInterval(_,20);return c.preventDefault(d)}var E=d.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(E)}),c.preventDefault(d)}},r.prototype.getHeight=function(){return this.isVisible?this.height:0},r.prototype.scrollLeftFromThumbLeft=function(u){var d=u*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return d=d>>0,d<0?d=0:d>this.pageWidth-this.viewWidth&&(d=this.pageWidth-this.viewWidth),d},r.prototype.setWidth=function(u){this.width=Math.max(0,u),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},r.prototype.setScrollWidth=function(u,d){this.pageWidth===u&&!d||(this.pageWidth=u,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},r.prototype.setScrollLeft=function(u){this.scrollLeft=u,u<0&&(u=0),this.thumbLeft=u*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},r}(i);l.prototype.setInnerWidth=l.prototype.setScrollWidth,a.ScrollBar=o,a.ScrollBarV=o,a.ScrollBarH=l,a.VScrollBar=o,a.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,a,v){var p=n("./lib/event"),f=function(){function m(c,h){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var i=this;this._flush=function(o){i.pending=!1;var l=i.changes;if(l&&(p.blockIdle(100),i.changes=0,i.onRender(l)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return m.prototype.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(p.nextFrame(this._flush),this.pending=!0)},m.prototype.clear=function(c){var h=this.changes;return this.changes=0,h},m}();a.RenderLoop=f}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,a,v){var p=n("../lib/oop"),f=n("../lib/dom"),m=n("../lib/lang"),c=n("../lib/event"),h=n("../lib/useragent"),i=n("../lib/event_emitter").EventEmitter,o=512,l=typeof ResizeObserver=="function",s=200,r=function(){function u(d){this.el=f.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=f.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=f.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),d.appendChild(this.el),this.$measureNode.textContent=m.stringRepeat("X",o),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}return u.prototype.$setMeasureNodeStyles=function(d,g){d.width=d.height="auto",d.left=d.top="0px",d.visibility="hidden",d.position="absolute",d.whiteSpace="pre",h.isIE<8?d["font-family"]="inherit":d.font="inherit",d.overflow=g?"hidden":"visible"},u.prototype.checkForSizeChanges=function(d){if(d===void 0&&(d=this.$measureSizes()),d&&(this.$characterSize.width!==d.width||this.$characterSize.height!==d.height)){this.$measureNode.style.fontWeight="bold";var g=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=d,this.charSizes=Object.create(null),this.allowBoldFonts=g&&g.width===d.width&&g.height===d.height,this._emit("changeCharacterSize",{data:d})}},u.prototype.$addObserver=function(){var d=this;this.$observer=new window.ResizeObserver(function(g){d.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},u.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var d=this;return this.$pollSizeChangesTimer=c.onIdle(function g(){d.checkForSizeChanges(),c.onIdle(g,500)},500)},u.prototype.setPolling=function(d){d?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},u.prototype.$measureSizes=function(d){var g={height:(d||this.$measureNode).clientHeight,width:(d||this.$measureNode).clientWidth/o};return g.width===0||g.height===0?null:g},u.prototype.$measureCharWidth=function(d){this.$main.textContent=m.stringRepeat(d,o);var g=this.$main.getBoundingClientRect();return g.width/o},u.prototype.getCharacterWidth=function(d){var g=this.charSizes[d];return g===void 0&&(g=this.charSizes[d]=this.$measureCharWidth(d)/this.$characterSize.width),g},u.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},u.prototype.$getZoom=function(d){return!d||!d.parentElement?1:(Number(window.getComputedStyle(d).zoom)||1)*this.$getZoom(d.parentElement)},u.prototype.$initTransformMeasureNodes=function(){var d=function(g,y){return["div",{style:"position: absolute;top:"+g+"px;left:"+y+"px;"}]};this.els=f.buildDom([d(0,0),d(s,0),d(0,s),d(s,s)],this.el)},u.prototype.transformCoordinates=function(d,g){if(d){var y=this.$getZoom(this.el);d=w(1/y,d)}function x(O,N,V){var H=O[1]*N[0]-O[0]*N[1];return[(-N[1]*V[0]+N[0]*V[1])/H,(+O[1]*V[0]-O[0]*V[1])/H]}function C(O,N){return[O[0]-N[0],O[1]-N[1]]}function b(O,N){return[O[0]+N[0],O[1]+N[1]]}function w(O,N){return[O*N[0],O*N[1]]}this.els||this.$initTransformMeasureNodes();function _(O){var N=O.getBoundingClientRect();return[N.left,N.top]}var I=_(this.els[0]),E=_(this.els[1]),k=_(this.els[2]),A=_(this.els[3]),S=x(C(A,E),C(A,k),C(b(E,k),b(A,I))),M=w(1+S[0],C(E,I)),$=w(1+S[1],C(k,I));if(g){var L=g,T=S[0]*L[0]/s+S[1]*L[1]/s+1,R=b(w(L[0],M),w(L[1],$));return b(w(1/T/s,R),I)}var P=C(d,I),F=x(C(M,w(S[0],P)),C($,w(S[1],P)),P);return w(s,F)},u}();r.prototype.$characterSize={width:0,height:0},p.implement(r.prototype,i),a.FontMetrics=r}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,a,v){v.exports=`
|
|
.ace_br1 {border-top-left-radius : 3px;}
|
|
.ace_br2 {border-top-right-radius : 3px;}
|
|
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
.ace_br4 {border-bottom-right-radius: 3px;}
|
|
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
|
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
|
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
|
.ace_br8 {border-bottom-left-radius : 3px;}
|
|
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
.ace_editor {
|
|
position: relative;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
|
direction: ltr;
|
|
text-align: left;
|
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
forced-color-adjust: none;
|
|
}
|
|
|
|
.ace_scroller {
|
|
position: absolute;
|
|
overflow: hidden;
|
|
top: 0;
|
|
bottom: 0;
|
|
background-color: inherit;
|
|
-ms-user-select: none;
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
cursor: text;
|
|
}
|
|
|
|
.ace_content {
|
|
position: absolute;
|
|
box-sizing: border-box;
|
|
min-width: 100%;
|
|
contain: style size layout;
|
|
font-variant-ligatures: no-common-ligatures;
|
|
}
|
|
|
|
.ace_keyboard-focus:focus {
|
|
box-shadow: inset 0 0 0 2px #5E9ED6;
|
|
outline: none;
|
|
}
|
|
|
|
.ace_dragging .ace_scroller:before{
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
content: '';
|
|
background: rgba(250, 250, 250, 0.01);
|
|
z-index: 1000;
|
|
}
|
|
.ace_dragging.ace_dark .ace_scroller:before{
|
|
background: rgba(0, 0, 0, 0.01);
|
|
}
|
|
|
|
.ace_gutter {
|
|
position: absolute;
|
|
overflow : hidden;
|
|
width: auto;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
cursor: default;
|
|
z-index: 4;
|
|
-ms-user-select: none;
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
contain: style size layout;
|
|
}
|
|
|
|
.ace_gutter-active-line {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.ace_scroller.ace_scroll-left:after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding-left: 19px;
|
|
padding-right: 6px;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
|
margin-left: -14px;
|
|
float: left;
|
|
}
|
|
|
|
.ace_gutter-cell .ace_gutter_annotation {
|
|
margin-left: -19px;
|
|
float: left;
|
|
}
|
|
|
|
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
|
background-repeat: no-repeat;
|
|
background-position: 2px center;
|
|
}
|
|
|
|
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
|
background-repeat: no-repeat;
|
|
background-position: 2px center;
|
|
}
|
|
|
|
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
background-repeat: no-repeat;
|
|
background-position: 2px center;
|
|
}
|
|
|
|
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
}
|
|
|
|
.ace_icon_svg.ace_error {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
|
background-color: crimson;
|
|
}
|
|
.ace_icon_svg.ace_security {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
|
background-color: crimson;
|
|
}
|
|
.ace_icon_svg.ace_warning {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
|
background-color: darkorange;
|
|
}
|
|
.ace_icon_svg.ace_info {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
|
background-color: royalblue;
|
|
}
|
|
.ace_icon_svg.ace_hint {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
|
background-color: silver;
|
|
}
|
|
|
|
.ace_icon_svg.ace_error_fold {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
background-color: crimson;
|
|
}
|
|
.ace_icon_svg.ace_security_fold {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
background-color: crimson;
|
|
}
|
|
.ace_icon_svg.ace_warning_fold {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
|
background-color: darkorange;
|
|
}
|
|
|
|
.ace_scrollbar {
|
|
contain: strict;
|
|
position: absolute;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 6;
|
|
}
|
|
|
|
.ace_scrollbar-inner {
|
|
position: absolute;
|
|
cursor: text;
|
|
left: 0;
|
|
top: 0;
|
|
}
|
|
|
|
.ace_scrollbar-v{
|
|
overflow-x: hidden;
|
|
overflow-y: scroll;
|
|
top: 0;
|
|
}
|
|
|
|
.ace_scrollbar-h {
|
|
overflow-x: scroll;
|
|
overflow-y: hidden;
|
|
left: 0;
|
|
}
|
|
|
|
.ace_print-margin {
|
|
position: absolute;
|
|
height: 100%;
|
|
}
|
|
|
|
.ace_text-input {
|
|
position: absolute;
|
|
z-index: 0;
|
|
width: 0.5em;
|
|
height: 1em;
|
|
opacity: 0;
|
|
background: transparent;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
border: none;
|
|
resize: none;
|
|
outline: none;
|
|
overflow: hidden;
|
|
font: inherit;
|
|
padding: 0 1px;
|
|
margin: 0 -1px;
|
|
contain: strict;
|
|
-ms-user-select: text;
|
|
-moz-user-select: text;
|
|
-webkit-user-select: text;
|
|
user-select: text;
|
|
/*with \`pre-line\` chrome inserts instead of space*/
|
|
white-space: pre!important;
|
|
}
|
|
.ace_text-input.ace_composition {
|
|
background: transparent;
|
|
color: inherit;
|
|
z-index: 1000;
|
|
opacity: 1;
|
|
}
|
|
.ace_composition_placeholder { color: transparent }
|
|
.ace_composition_marker {
|
|
border-bottom: 1px solid;
|
|
position: absolute;
|
|
border-radius: 0;
|
|
margin-top: 1px;
|
|
}
|
|
|
|
[ace_nocontext=true] {
|
|
transform: none!important;
|
|
filter: none!important;
|
|
clip-path: none!important;
|
|
mask : none!important;
|
|
contain: none!important;
|
|
perspective: none!important;
|
|
mix-blend-mode: initial!important;
|
|
z-index: auto;
|
|
}
|
|
|
|
.ace_layer {
|
|
z-index: 1;
|
|
position: absolute;
|
|
overflow: hidden;
|
|
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
|
word-wrap: normal;
|
|
white-space: pre;
|
|
height: 100%;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
/* setting pointer-events: auto; on node under the mouse, which changes
|
|
during scroll, will break mouse wheel scrolling in Safari */
|
|
pointer-events: none;
|
|
}
|
|
|
|
.ace_gutter-layer {
|
|
position: relative;
|
|
width: auto;
|
|
text-align: right;
|
|
pointer-events: auto;
|
|
height: 1000000px;
|
|
contain: style size layout;
|
|
}
|
|
|
|
.ace_text-layer {
|
|
font: inherit !important;
|
|
position: absolute;
|
|
height: 1000000px;
|
|
width: 1000000px;
|
|
contain: style size layout;
|
|
}
|
|
|
|
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
|
contain: style size layout;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.ace_hidpi .ace_text-layer,
|
|
.ace_hidpi .ace_gutter-layer,
|
|
.ace_hidpi .ace_content,
|
|
.ace_hidpi .ace_gutter {
|
|
contain: strict;
|
|
}
|
|
.ace_hidpi .ace_text-layer > .ace_line,
|
|
.ace_hidpi .ace_text-layer > .ace_line_group {
|
|
contain: strict;
|
|
}
|
|
|
|
.ace_cjk {
|
|
display: inline-block;
|
|
text-align: center;
|
|
}
|
|
|
|
.ace_cursor-layer {
|
|
z-index: 4;
|
|
}
|
|
|
|
.ace_cursor {
|
|
z-index: 4;
|
|
position: absolute;
|
|
box-sizing: border-box;
|
|
border-left: 2px solid;
|
|
/* workaround for smooth cursor repaintng whole screen in chrome */
|
|
transform: translatez(0);
|
|
}
|
|
|
|
.ace_multiselect .ace_cursor {
|
|
border-left-width: 1px;
|
|
}
|
|
|
|
.ace_slim-cursors .ace_cursor {
|
|
border-left-width: 1px;
|
|
}
|
|
|
|
.ace_overwrite-cursors .ace_cursor {
|
|
border-left-width: 0;
|
|
border-bottom: 1px solid;
|
|
}
|
|
|
|
.ace_hidden-cursors .ace_cursor {
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
|
opacity: 0;
|
|
}
|
|
|
|
.ace_smooth-blinking .ace_cursor {
|
|
transition: opacity 0.18s;
|
|
}
|
|
|
|
.ace_animate-blinking .ace_cursor {
|
|
animation-duration: 1000ms;
|
|
animation-timing-function: step-end;
|
|
animation-name: blink-ace-animate;
|
|
animation-iteration-count: infinite;
|
|
}
|
|
|
|
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
|
animation-duration: 1000ms;
|
|
animation-timing-function: ease-in-out;
|
|
animation-name: blink-ace-animate-smooth;
|
|
}
|
|
|
|
@keyframes blink-ace-animate {
|
|
from, to { opacity: 1; }
|
|
60% { opacity: 0; }
|
|
}
|
|
|
|
@keyframes blink-ace-animate-smooth {
|
|
from, to { opacity: 1; }
|
|
45% { opacity: 1; }
|
|
60% { opacity: 0; }
|
|
85% { opacity: 0; }
|
|
}
|
|
|
|
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
|
position: absolute;
|
|
z-index: 3;
|
|
}
|
|
|
|
.ace_marker-layer .ace_selection {
|
|
position: absolute;
|
|
z-index: 5;
|
|
}
|
|
|
|
.ace_marker-layer .ace_bracket {
|
|
position: absolute;
|
|
z-index: 6;
|
|
}
|
|
|
|
.ace_marker-layer .ace_error_bracket {
|
|
position: absolute;
|
|
border-bottom: 1px solid #DE5555;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.ace_marker-layer .ace_active-line {
|
|
position: absolute;
|
|
z-index: 2;
|
|
}
|
|
|
|
.ace_marker-layer .ace_selected-word {
|
|
position: absolute;
|
|
z-index: 4;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.ace_line .ace_fold {
|
|
box-sizing: border-box;
|
|
|
|
display: inline-block;
|
|
height: 11px;
|
|
margin-top: -2px;
|
|
vertical-align: middle;
|
|
|
|
background-image:
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
|
background-repeat: no-repeat, repeat-x;
|
|
background-position: center center, top left;
|
|
color: transparent;
|
|
|
|
border: 1px solid black;
|
|
border-radius: 2px;
|
|
|
|
cursor: pointer;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.ace_dark .ace_fold {
|
|
}
|
|
|
|
.ace_fold:hover{
|
|
background-image:
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
|
}
|
|
|
|
.ace_tooltip {
|
|
background-color: #f5f5f5;
|
|
border: 1px solid gray;
|
|
border-radius: 1px;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
color: black;
|
|
max-width: 100%;
|
|
padding: 3px 4px;
|
|
position: fixed;
|
|
z-index: 999999;
|
|
box-sizing: border-box;
|
|
cursor: default;
|
|
white-space: pre-wrap;
|
|
word-wrap: break-word;
|
|
line-height: normal;
|
|
font-style: normal;
|
|
font-weight: normal;
|
|
letter-spacing: normal;
|
|
pointer-events: none;
|
|
overflow: auto;
|
|
max-width: min(60em, 66vw);
|
|
overscroll-behavior: contain;
|
|
}
|
|
.ace_tooltip pre {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.ace_tooltip.ace_dark {
|
|
background-color: #636363;
|
|
color: #fff;
|
|
}
|
|
|
|
.ace_tooltip:focus {
|
|
outline: 1px solid #5E9ED6;
|
|
}
|
|
|
|
.ace_icon {
|
|
display: inline-block;
|
|
width: 18px;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.ace_icon_svg {
|
|
display: inline-block;
|
|
width: 12px;
|
|
vertical-align: top;
|
|
-webkit-mask-repeat: no-repeat;
|
|
-webkit-mask-size: 12px;
|
|
-webkit-mask-position: center;
|
|
}
|
|
|
|
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
|
padding-right: 13px;
|
|
}
|
|
|
|
.ace_fold-widget {
|
|
box-sizing: border-box;
|
|
|
|
margin: 0 -12px 0 1px;
|
|
display: none;
|
|
width: 11px;
|
|
vertical-align: top;
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
|
|
border-radius: 3px;
|
|
|
|
border: 1px solid transparent;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ace_folding-enabled .ace_fold-widget {
|
|
display: inline-block;
|
|
}
|
|
|
|
.ace_fold-widget.ace_end {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
}
|
|
|
|
.ace_fold-widget.ace_closed {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
}
|
|
|
|
.ace_fold-widget:hover {
|
|
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.ace_fold-widget:active {
|
|
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
}
|
|
/**
|
|
* Dark version for fold widgets
|
|
*/
|
|
.ace_dark .ace_fold-widget {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
}
|
|
.ace_dark .ace_fold-widget.ace_end {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
}
|
|
.ace_dark .ace_fold-widget.ace_closed {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
}
|
|
.ace_dark .ace_fold-widget:hover {
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
.ace_dark .ace_fold-widget:active {
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.ace_inline_button {
|
|
border: 1px solid lightgray;
|
|
display: inline-block;
|
|
margin: -1px 8px;
|
|
padding: 0 5px;
|
|
pointer-events: auto;
|
|
cursor: pointer;
|
|
}
|
|
.ace_inline_button:hover {
|
|
border-color: gray;
|
|
background: rgba(200,200,200,0.2);
|
|
display: inline-block;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.ace_fold-widget.ace_invalid {
|
|
background-color: #FFB4B4;
|
|
border-color: #DE5555;
|
|
}
|
|
|
|
.ace_fade-fold-widgets .ace_fold-widget {
|
|
transition: opacity 0.4s ease 0.05s;
|
|
opacity: 0;
|
|
}
|
|
|
|
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
transition: opacity 0.05s ease 0.05s;
|
|
opacity:1;
|
|
}
|
|
|
|
.ace_underline {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.ace_bold {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.ace_nobold .ace_bold {
|
|
font-weight: normal;
|
|
}
|
|
|
|
.ace_italic {
|
|
font-style: italic;
|
|
}
|
|
|
|
|
|
.ace_error-marker {
|
|
background-color: rgba(255, 0, 0,0.2);
|
|
position: absolute;
|
|
z-index: 9;
|
|
}
|
|
|
|
.ace_highlight-marker {
|
|
background-color: rgba(255, 255, 0,0.2);
|
|
position: absolute;
|
|
z-index: 8;
|
|
}
|
|
|
|
.ace_mobile-menu {
|
|
position: absolute;
|
|
line-height: 1.5;
|
|
border-radius: 4px;
|
|
-ms-user-select: none;
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
background: white;
|
|
box-shadow: 1px 3px 2px grey;
|
|
border: 1px solid #dcdcdc;
|
|
color: black;
|
|
}
|
|
.ace_dark > .ace_mobile-menu {
|
|
background: #333;
|
|
color: #ccc;
|
|
box-shadow: 1px 3px 2px grey;
|
|
border: 1px solid #444;
|
|
|
|
}
|
|
.ace_mobile-button {
|
|
padding: 2px;
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
}
|
|
.ace_mobile-button:hover {
|
|
background-color: #eee;
|
|
opacity:1;
|
|
}
|
|
.ace_mobile-button:active {
|
|
background-color: #ddd;
|
|
}
|
|
|
|
.ace_placeholder {
|
|
position: relative;
|
|
font-family: arial;
|
|
transform: scale(0.9);
|
|
transform-origin: left;
|
|
white-space: pre;
|
|
opacity: 0.7;
|
|
margin: 0 10px;
|
|
z-index: 1;
|
|
}
|
|
|
|
.ace_ghost_text {
|
|
opacity: 0.5;
|
|
font-style: italic;
|
|
}
|
|
|
|
.ace_ghost_text_container > div {
|
|
white-space: pre;
|
|
}
|
|
|
|
.ghost_text_line_wrapped::after {
|
|
content: "↩";
|
|
position: absolute;
|
|
}
|
|
|
|
.ace_lineWidgetContainer.ace_ghost_text {
|
|
margin: 0px 4px
|
|
}
|
|
|
|
.ace_screenreader-only {
|
|
position:absolute;
|
|
left:-10000px;
|
|
top:auto;
|
|
width:1px;
|
|
height:1px;
|
|
overflow:hidden;
|
|
}
|
|
|
|
.ace_hidden_token {
|
|
display: none;
|
|
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,a,v){var p=n("../lib/dom"),f=n("../lib/oop"),m=n("../lib/event_emitter").EventEmitter,c=function(){function h(i,o){this.canvas=p.createElement("canvas"),this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.canvasHeight=i.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=i.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},i.element.appendChild(this.canvas)}return h.prototype.$updateDecorators=function(i){var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(i){this.maxHeight=i.maxHeight,this.lineHeight=i.lineHeight,this.canvasHeight=i.height;var l=(i.lastRow+1)*this.lineHeight;l<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var s=this.canvas.getContext("2d");function r(A,S){return A.priority<S.priority?-1:A.priority>S.priority?1:0}var u=this.renderer.session.$annotations;if(s.clearRect(0,0,this.canvas.width,this.canvas.height),u){var d={info:1,warning:2,error:3};u.forEach(function(A){A.priority=d[A.type]||null}),u=u.sort(r);for(var g=this.renderer.session.$foldData,y=0;y<u.length;y++){var x=u[y].row,C=this.compensateFoldRows(x,g),b=Math.round((x-C)*this.lineHeight*this.heightRatio),w=Math.round((x-C)*this.lineHeight*this.heightRatio),_=Math.round(((x-C)*this.lineHeight+this.lineHeight)*this.heightRatio),I=_-w;if(I<this.minDecorationHeight){var E=(w+_)/2|0;E<this.halfMinDecorationHeight?E=this.halfMinDecorationHeight:E+this.halfMinDecorationHeight>this.canvasHeight&&(E=this.canvasHeight-this.halfMinDecorationHeight),w=Math.round(E-this.halfMinDecorationHeight),_=Math.round(E+this.halfMinDecorationHeight)}s.fillStyle=o[u[y].type]||null,s.fillRect(0,b,this.canvasWidth,_-w)}}var k=this.renderer.session.selection.getCursor();if(k){var C=this.compensateFoldRows(k.row,g),b=Math.round((k.row-C)*this.lineHeight*this.heightRatio);s.fillStyle="rgba(0, 0, 0, 0.5)",s.fillRect(0,b,this.canvasWidth,2)}},h.prototype.compensateFoldRows=function(i,o){var l=0;if(o&&o.length>0)for(var s=0;s<o.length;s++)i>o[s].start.row&&i<o[s].end.row?l+=i-o[s].start.row:i>=o[s].end.row&&(l+=o[s].end.row-o[s].start.row);return l},h}();f.implement(c.prototype,m),a.Decorator=c}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(n,a,v){var p=n("./lib/oop"),f=n("./lib/dom"),m=n("./lib/lang"),c=n("./config"),h=n("./layer/gutter").Gutter,i=n("./layer/marker").Marker,o=n("./layer/text").Text,l=n("./layer/cursor").Cursor,s=n("./scrollbar").HScrollBar,r=n("./scrollbar").VScrollBar,u=n("./scrollbar_custom").HScrollBar,d=n("./scrollbar_custom").VScrollBar,g=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,x=n("./lib/event_emitter").EventEmitter,C=n("./css/editor-css"),b=n("./layer/decorators").Decorator,w=n("./lib/useragent"),_=n("./layer/text_util").isTextToken;f.importCssString(C,"ace_editor.css",!1);var I=function(){function E(k,A){var S=this;this.container=k||f.createElement("div"),f.addCssClass(this.container,"ace_editor"),f.HI_DPI&&f.addCssClass(this.container,"ace_hidpi"),this.setTheme(A),c.get("useStrictCSP")==null&&c.set("useStrictCSP",!1),this.$gutter=f.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=f.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=f.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var M=this.$textLayer=new o(this.content);this.canvas=M.element,this.$markerFront=new i(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new r(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.on("scroll",function($){S.$scrollAnimation||S.session.setScrollTop($.data-S.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){S.$scrollAnimation||S.session.setScrollLeft($.data-S.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function($){S.updateCharacterSize(),S.onResize(!0,S.gutterWidth,S.$size.width,S.$size.height),S._signal("changeCharacterSize",$)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),c.resetOptions(this),c._signal("renderer",this)}return E.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),f.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.prototype.setSession=function(k){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=k,k&&this.scrollMargin.top&&k.getScrollTop()<=0&&k.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(k),this.$markerBack.setSession(k),this.$markerFront.setSession(k),this.$gutterLayer.setSession(k),this.$textLayer.setSession(k),k&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},E.prototype.updateLines=function(k,A,S){if(A===void 0&&(A=1/0),this.$changedLines?(this.$changedLines.firstRow>k&&(this.$changedLines.firstRow=k),this.$changedLines.lastRow<A&&(this.$changedLines.lastRow=A)):this.$changedLines={firstRow:k,lastRow:A},this.$changedLines.lastRow<this.layerConfig.firstRow)if(S)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},E.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},E.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},E.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},E.prototype.updateFull=function(k){k?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},E.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},E.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},E.prototype.onResize=function(k,A,S,M){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=k?1:0;var $=this.container;M||(M=$.clientHeight||$.scrollHeight),!M&&this.$maxLines&&this.lineHeight>1&&(!$.style.height||$.style.height=="0px")&&($.style.height="1px",M=$.clientHeight||$.scrollHeight),S||(S=$.clientWidth||$.scrollWidth);var L=this.$updateCachedSize(k,A,S,M);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!S&&!M)return this.resizing=0;k&&(this.$gutterLayer.$padding=null),k?this.$renderChanges(L|this.$changes,!0):this.$loop.schedule(L|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},E.prototype.$updateCachedSize=function(k,A,S,M){M-=this.$extraHeight||0;var $=0,L=this.$size,T={width:L.width,height:L.height,scrollerHeight:L.scrollerHeight,scrollerWidth:L.scrollerWidth};if(M&&(k||L.height!=M)&&(L.height=M,$|=this.CHANGE_SIZE,L.scrollerHeight=L.height,this.$horizScroll&&(L.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(L.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),S&&(k||L.width!=S)){$|=this.CHANGE_SIZE,L.width=S,A==null&&(A=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=A,f.setStyle(this.scrollBarH.element.style,"left",A+"px"),f.setStyle(this.scroller.style,"left",A+this.margin.left+"px"),L.scrollerWidth=Math.max(0,S-A-this.scrollBarV.getWidth()-this.margin.h),f.setStyle(this.$gutter.style,"left",this.margin.left+"px");var R=this.scrollBarV.getWidth()+"px";f.setStyle(this.scrollBarH.element.style,"right",R),f.setStyle(this.scroller.style,"right",R),f.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(L.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||k)&&($|=this.CHANGE_FULL)}return L.$dirty=!S||!M,$&&this._signal("resize",T),$},E.prototype.onGutterResize=function(k){var A=this.$showGutter?k:0;A!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,A,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},E.prototype.adjustWrapLimit=function(){var k=this.$size.scrollerWidth-this.$padding*2,A=Math.floor(k/this.characterWidth);return this.session.adjustWrapLimit(A,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function(k){this.setOption("animatedScroll",k)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function(k){this.setOption("showInvisibles",k),this.session.$bidiHandler.setShowInvisibles(k)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function(k){this.setOption("displayIndentGuides",k)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function(k){this.setOption("highlightIndentGuides",k)},E.prototype.setShowPrintMargin=function(k){this.setOption("showPrintMargin",k)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function(k){this.setOption("printMarginColumn",k)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function(k){return this.setOption("showGutter",k)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},E.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var k=f.createElement("div");k.className="ace_layer ace_print-margin-layer",this.$printMarginEl=f.createElement("div"),this.$printMarginEl.className="ace_print-margin",k.appendChild(this.$printMarginEl),this.content.insertBefore(k,this.content.firstChild)}var A=this.$printMarginEl.style;A.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",A.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},E.prototype.getContainerElement=function(){return this.container},E.prototype.getMouseEventTarget=function(){return this.scroller},E.prototype.getTextAreaContainer=function(){return this.container},E.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var k=this.textarea.style,A=this.$composition;if(!this.$keepTextAreaAtCursor&&!A){f.translate(this.textarea,-100,0);return}var S=this.$cursorLayer.$pixelPos;if(S){A&&A.markerRange&&(S=this.$cursorLayer.getPixelPosition(A.markerRange.start,!0));var M=this.layerConfig,$=S.top,L=S.left;$-=M.offset;var T=A&&A.useTextareaForIME||w.isMobile?this.lineHeight:1;if($<0||$>M.height-T){f.translate(this.textarea,0,0);return}var R=1,P=this.$size.height-T;if(!A)$+=this.lineHeight;else if(A.useTextareaForIME){var F=this.textarea.value;R=this.characterWidth*this.session.$getStringScreenWidth(F)[0]}else $+=this.lineHeight+2;L-=this.scrollLeft,L>this.$size.scrollerWidth-R&&(L=this.$size.scrollerWidth-R),L+=this.gutterWidth+this.margin.left,f.setStyle(k,"height",T+"px"),f.setStyle(k,"width",R+"px"),f.translate(this.textarea,Math.min(L,this.$size.scrollerWidth-R),Math.min($,P))}}},E.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},E.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},E.prototype.getLastFullyVisibleRow=function(){var k=this.layerConfig,A=k.lastRow,S=this.session.documentToScreenRow(A,0)*k.lineHeight;return S-this.session.getScrollTop()>k.height-k.lineHeight?A-1:A},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.prototype.setPadding=function(k){this.$padding=k,this.$textLayer.setPadding(k),this.$cursorLayer.setPadding(k),this.$markerFront.setPadding(k),this.$markerBack.setPadding(k),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},E.prototype.setScrollMargin=function(k,A,S,M){var $=this.scrollMargin;$.top=k|0,$.bottom=A|0,$.right=M|0,$.left=S|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},E.prototype.setMargin=function(k,A,S,M){var $=this.margin;$.top=k|0,$.bottom=A|0,$.right=M|0,$.left=S|0,$.v=$.top+$.bottom,$.h=$.left+$.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},E.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},E.prototype.setHScrollBarAlwaysVisible=function(k){this.setOption("hScrollBarAlwaysVisible",k)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function(k){this.setOption("vScrollBarAlwaysVisible",k)},E.prototype.$updateScrollBarV=function(){var k=this.layerConfig.maxHeight,A=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(k-=(A-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>k-A&&(k=this.scrollTop+A,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(k+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},E.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},E.prototype.freeze=function(){this.$frozen=!0},E.prototype.unfreeze=function(){this.$frozen=!1},E.prototype.$renderChanges=function(k,A){if(this.$changes&&(k|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!k&&!A){this.$changes|=k;return}if(this.$size.$dirty)return this.$changes|=k,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",k),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var S=this.layerConfig;if(k&this.CHANGE_FULL||k&this.CHANGE_SIZE||k&this.CHANGE_TEXT||k&this.CHANGE_LINES||k&this.CHANGE_SCROLL||k&this.CHANGE_H_SCROLL){if(k|=this.$computeLayerConfig()|this.$loop.clear(),S.firstRow!=this.layerConfig.firstRow&&S.firstRowScreen==this.layerConfig.firstRowScreen){var M=this.scrollTop+(S.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;M>0&&(this.scrollTop=M,k=k|this.CHANGE_SCROLL,k|=this.$computeLayerConfig()|this.$loop.clear())}S=this.layerConfig,this.$updateScrollBarV(),k&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),f.translate(this.content,-this.scrollLeft,-S.offset);var $=S.width+2*this.$padding+"px",L=S.minHeight+"px";f.setStyle(this.content.style,"width",$),f.setStyle(this.content.style,"height",L)}if(k&this.CHANGE_H_SCROLL&&(f.translate(this.content,-this.scrollLeft,-S.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),k&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}if(k&this.CHANGE_SCROLL){this.$changedLines=null,k&this.CHANGE_TEXT||k&this.CHANGE_LINES?this.$textLayer.update(S):this.$textLayer.scrollLines(S),this.$showGutter&&(k&this.CHANGE_GUTTER||k&this.CHANGE_LINES?this.$gutterLayer.update(S):this.$gutterLayer.scrollLines(S)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}k&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):k&this.CHANGE_LINES?((this.$updateLines()||k&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):k&this.CHANGE_TEXT||k&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):k&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)),k&this.CHANGE_CURSOR&&(this.$cursorLayer.update(S),this.$moveTextAreaToCursor()),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(S),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(S),this._signal("afterRender",k)},E.prototype.$autosize=function(){var k=this.session.getScreenLength()*this.lineHeight,A=this.$maxLines*this.lineHeight,S=Math.min(A,Math.max((this.$minLines||1)*this.lineHeight,k))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(S+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&S>this.$maxPixelHeight&&(S=this.$maxPixelHeight);var M=S<=2*this.lineHeight,$=!M&&k>A;if(S!=this.desiredHeight||this.$size.height!=this.desiredHeight||$!=this.$vScroll){$!=this.$vScroll&&(this.$vScroll=$,this.scrollBarV.setVisible($));var L=this.container.clientWidth;this.container.style.height=S+"px",this.$updateCachedSize(!0,this.$gutterWidth,L,S),this.desiredHeight=S,this._signal("autosize")}},E.prototype.$computeLayerConfig=function(){var k=this.session,A=this.$size,S=A.height<=2*this.lineHeight,M=this.session.getScreenLength(),$=M*this.lineHeight,L=this.$getLongestLine(),T=!S&&(this.$hScrollBarAlwaysVisible||A.scrollerWidth-L-2*this.$padding<0),R=this.$horizScroll!==T;R&&(this.$horizScroll=T,this.scrollBarH.setVisible(T));var P=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var F=A.scrollerHeight+this.lineHeight,O=!this.$maxLines&&this.$scrollPastEnd?(A.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;$+=O;var N=this.scrollMargin;this.session.setScrollTop(Math.max(-N.top,Math.min(this.scrollTop,$-A.scrollerHeight+N.bottom))),this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,L+2*this.$padding-A.scrollerWidth+N.right)));var V=!S&&(this.$vScrollBarAlwaysVisible||A.scrollerHeight-$+O<0||this.scrollTop>N.top),H=P!==V;H&&(this.$vScroll=V,this.scrollBarV.setVisible(V));var W=this.scrollTop%this.lineHeight,j=Math.ceil(F/this.lineHeight)-1,Z=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),q=Z+j,G,K,ee=this.lineHeight;Z=k.screenToDocumentRow(Z,0);var te=k.getFoldLine(Z);te&&(Z=te.start.row),G=k.documentToScreenRow(Z,0),K=k.getRowLength(Z)*ee,q=Math.min(k.screenToDocumentRow(q,0),k.getLength()-1),F=A.scrollerHeight+k.getRowLength(q)*ee+K,W=this.scrollTop-G*ee;var ae=0;return(this.layerConfig.width!=L||R)&&(ae=this.CHANGE_H_SCROLL),(R||H)&&(ae|=this.$updateCachedSize(!0,this.gutterWidth,A.width,A.height),this._signal("scrollbarVisibilityChanged"),H&&(L=this.$getLongestLine())),this.layerConfig={width:L,padding:this.$padding,firstRow:Z,firstRowScreen:G,lastRow:q,lineHeight:ee,characterWidth:this.characterWidth,minHeight:F,maxHeight:$,offset:W,gutterOffset:ee?Math.max(0,Math.ceil((W+A.height-A.scrollerHeight)/ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(L-this.$padding),ae},E.prototype.$updateLines=function(){if(this.$changedLines){var k=this.$changedLines.firstRow,A=this.$changedLines.lastRow;this.$changedLines=null;var S=this.layerConfig;if(!(k>S.lastRow+1)&&!(A<S.firstRow)){if(A===1/0){this.$showGutter&&this.$gutterLayer.update(S),this.$textLayer.update(S);return}return this.$textLayer.updateLines(S,k,A),!0}}},E.prototype.$getLongestLine=function(){var k=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(k+=1),this.$textLayer&&k>this.$textLayer.MAX_LINE_LENGTH&&(k=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(k*this.characterWidth))},E.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},E.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},E.prototype.addGutterDecoration=function(k,A){this.$gutterLayer.addGutterDecoration(k,A)},E.prototype.removeGutterDecoration=function(k,A){this.$gutterLayer.removeGutterDecoration(k,A)},E.prototype.updateBreakpoints=function(k){this._rows=k,this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function(k){this.$gutterLayer.setAnnotations(k),this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},E.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},E.prototype.showCursor=function(){this.$cursorLayer.showCursor()},E.prototype.scrollSelectionIntoView=function(k,A,S){this.scrollCursorIntoView(k,S),this.scrollCursorIntoView(A,S)},E.prototype.scrollCursorIntoView=function(k,A,S){if(this.$size.scrollerHeight!==0){var M=this.$cursorLayer.getPixelPosition(k),$=M.left,L=M.top,T=S&&S.top||0,R=S&&S.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var P=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;P+T>L?(A&&P+T>L+this.lineHeight&&(L-=A*this.$size.scrollerHeight),L===0&&(L=-this.scrollMargin.top),this.session.setScrollTop(L)):P+this.$size.scrollerHeight-R<L+this.lineHeight&&(A&&P+this.$size.scrollerHeight-R<L-this.lineHeight&&(L+=A*this.$size.scrollerHeight),this.session.setScrollTop(L+this.lineHeight+R-this.$size.scrollerHeight));var F=this.scrollLeft,O=2*this.layerConfig.characterWidth;$-O<F?($-=O,$<this.$padding+O&&($=-this.scrollMargin.left),this.session.setScrollLeft($)):($+=O,F+this.$size.scrollerWidth<$+this.characterWidth?this.session.setScrollLeft(Math.round($+this.characterWidth-this.$size.scrollerWidth)):F<=this.$padding&&$-F<this.characterWidth&&this.session.setScrollLeft(0))}},E.prototype.getScrollTop=function(){return this.session.getScrollTop()},E.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},E.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},E.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},E.prototype.scrollToRow=function(k){this.session.setScrollTop(k*this.lineHeight)},E.prototype.alignCursor=function(k,A){typeof k=="number"&&(k={row:k,column:0});var S=this.$cursorLayer.getPixelPosition(k),M=this.$size.scrollerHeight-this.lineHeight,$=S.top-M*(A||0);return this.session.setScrollTop($),$},E.prototype.$calcSteps=function(k,A){var S=0,M=this.STEPS,$=[],L=function(T,R,P){return P*(Math.pow(T-1,3)+1)+R};for(S=0;S<M;++S)$.push(L(S/this.STEPS,k,A-k));return $},E.prototype.scrollToLine=function(k,A,S,M){var $=this.$cursorLayer.getPixelPosition({row:k,column:0}),L=$.top;A&&(L-=this.$size.scrollerHeight/2);var T=this.scrollTop;this.session.setScrollTop(L),S!==!1&&this.animateScrolling(T,M)},E.prototype.animateScrolling=function(k,A){var S=this.scrollTop;if(!this.$animatedScroll)return;var M=this;if(k==S)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(k=$[0],k==S))return}var L=M.$calcSteps(k,S);this.$scrollAnimation={from:k,to:S,steps:L},clearInterval(this.$timer),M.session.setScrollTop(L.shift()),M.session.$scrollTop=S;function T(){M.$timer=clearInterval(M.$timer),M.$scrollAnimation=null,M.$stopAnimation=!1,A&&A()}this.$timer=setInterval(function(){if(M.$stopAnimation){T();return}if(!M.session)return clearInterval(M.$timer);L.length?(M.session.setScrollTop(L.shift()),M.session.$scrollTop=S):S!=null?(M.session.$scrollTop=-1,M.session.setScrollTop(S),S=null):T()},10)},E.prototype.scrollToY=function(k){this.scrollTop!==k&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=k)},E.prototype.scrollToX=function(k){this.scrollLeft!==k&&(this.scrollLeft=k),this.$loop.schedule(this.CHANGE_H_SCROLL)},E.prototype.scrollTo=function(k,A){this.session.setScrollTop(A),this.session.setScrollLeft(k)},E.prototype.scrollBy=function(k,A){A&&this.session.setScrollTop(this.session.getScrollTop()+A),k&&this.session.setScrollLeft(this.session.getScrollLeft()+k)},E.prototype.isScrollableBy=function(k,A){if(A<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||A>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||k<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||k>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},E.prototype.pixelToScreenCoordinates=function(k,A){var S;if(this.$hasCssTransforms){S={top:0,left:0};var M=this.$fontMetrics.transformCoordinates([k,A]);k=M[1]-this.gutterWidth-this.margin.left,A=M[0]}else S=this.scroller.getBoundingClientRect();var $=k+this.scrollLeft-S.left-this.$padding,L=$/this.characterWidth,T=Math.floor((A+this.scrollTop-S.top)/this.lineHeight),R=this.$blockCursor?Math.floor(L):Math.round(L);return{row:T,column:R,side:L-R>0?1:-1,offsetX:$}},E.prototype.screenToTextCoordinates=function(k,A){var S;if(this.$hasCssTransforms){S={top:0,left:0};var M=this.$fontMetrics.transformCoordinates([k,A]);k=M[1]-this.gutterWidth-this.margin.left,A=M[0]}else S=this.scroller.getBoundingClientRect();var $=k+this.scrollLeft-S.left-this.$padding,L=$/this.characterWidth,T=this.$blockCursor?Math.floor(L):Math.round(L),R=Math.floor((A+this.scrollTop-S.top)/this.lineHeight);return this.session.screenToDocumentPosition(R,Math.max(T,0),$)},E.prototype.textToScreenCoordinates=function(k,A){var S=this.scroller.getBoundingClientRect(),M=this.session.documentToScreenPosition(k,A),$=this.$padding+(this.session.$bidiHandler.isBidiRow(M.row,k)?this.session.$bidiHandler.getPosLeft(M.column):Math.round(M.column*this.characterWidth)),L=M.row*this.lineHeight;return{pageX:S.left+$-this.scrollLeft,pageY:S.top+L-this.scrollTop}},E.prototype.visualizeFocus=function(){f.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){f.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function(k){this.$composition=k,k.cssText||(k.cssText=this.textarea.style.cssText),k.useTextareaForIME==null&&(k.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(f.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):k.markerId=this.session.addMarker(k.markerRange,"ace_composition_marker","text")},E.prototype.setCompositionText=function(k){var A=this.session.selection.cursor;this.addToken(k,"composition_placeholder",A.row,A.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),f.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var k=this.session.selection.cursor;this.removeExtraToken(k.row,k.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function(k,A){var S=this.session.selection.cursor,M=A||{row:S.row,column:S.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(k,M);this.addToken($[0].text,"ghost_text",M.row,M.column),this.$ghostText={text:k,position:{row:M.row,column:M.column}};var L=f.createElement("div");if($.length>1){var T=this.hideTokensAfterPosition(M.row,M.column),R;$.slice(1).forEach(function(H){var W=f.createElement("div"),j=f.createElement("span");j.className="ace_ghost_text",H.wrapped&&(W.className="ghost_text_line_wrapped"),H.text.length===0&&(H.text=" "),j.appendChild(f.createTextNode(H.text)),W.appendChild(j),L.appendChild(W),R=W}),T.forEach(function(H){var W=f.createElement("span");_(H.type)||(W.className="ace_"+H.type.replace(/\./g," ace_")),W.appendChild(f.createTextNode(H.value)),R.appendChild(W)}),this.$ghostTextWidget={el:L,row:M.row,column:M.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var P=this.$cursorLayer.getPixelPosition(M,!0),F=this.container,O=F.getBoundingClientRect().height,N=$.length*this.lineHeight,V=N<O-P.top;if(V)return;N<O?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(M.row)}},E.prototype.$calculateWrappedTextChunks=function(k,A){var S=this.$size.scrollerWidth-this.$padding*2,M=Math.floor(S/this.characterWidth)-2;M=M<=0?60:M;for(var $=k.split(/\r?\n/),L=[],T=0;T<$.length;T++){var R=this.session.$getDisplayTokens($[T],A.column),P=this.session.$computeWrapSplits(R,M,this.session.$tabSize);if(P.length>0){var F=0;P.push($[T].length);for(var O=0;O<P.length;O++){var N=$[T].slice(F,P[O]);L.push({text:N,wrapped:!0}),F=P[O]}}else L.push({text:$[T],wrapped:!1})}return L},E.prototype.removeGhostText=function(){if(this.$ghostText){var k=this.$ghostText.position;this.removeExtraToken(k.row,k.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},E.prototype.addToken=function(k,A,S,M){var $=this.session;$.bgTokenizer.lines[S]=null;var L={type:A,value:k},T=$.getTokens(S);if(M==null||!T.length)T.push(L);else for(var R=0,P=0;P<T.length;P++){var F=T[P];if(R+=F.value.length,M<=R){var O=F.value.length-(R-M),N=F.value.slice(0,O),V=F.value.slice(O);T.splice(P,1,{type:F.type,value:N},L,{type:F.type,value:V});break}}this.updateLines(S,S)},E.prototype.hideTokensAfterPosition=function(k,A){for(var S=this.session.getTokens(k),M=0,$=!1,L=[],T=0;T<S.length;T++){var R=S[T];if(M+=R.value.length,R.type!=="ghost_text"){if($){L.push({type:R.type,value:R.value}),R.type="hidden_token";continue}M===A&&($=!0)}}return this.updateLines(k,k),L},E.prototype.removeExtraToken=function(k,A){this.session.bgTokenizer.lines[k]=null,this.updateLines(k,k)},E.prototype.setTheme=function(k,A){var S=this;if(this.$themeId=k,S._dispatchEvent("themeChange",{theme:k}),!k||typeof k=="string"){var M=k||this.$options.theme.initialValue;c.loadModule(["theme",M],$)}else $(k);function $(L){if(S.$themeId!=k)return A&&A();if(!L||!L.cssClass)throw new Error("couldn't load module "+k+" or it didn't call define");L.$id&&(S.$themeId=L.$id),f.importCssString(L.cssText,L.cssClass,S.container),S.theme&&f.removeCssClass(S.container,S.theme.cssClass);var T="padding"in L?L.padding:"padding"in(S.theme||{})?4:S.$padding;S.$padding&&T!=S.$padding&&S.setPadding(T),S.$theme=L.cssClass,S.theme=L,f.addCssClass(S.container,L.cssClass),f.setCssClass(S.container,"ace_dark",L.isDark),S.$size&&(S.$size.width=0,S.$updateSizeAsync()),S._dispatchEvent("themeLoaded",{theme:L}),A&&A(),w.isSafari&&S.scroller&&(S.scroller.style.background="red",S.scroller.style.background="")}},E.prototype.getTheme=function(){return this.$themeId},E.prototype.setStyle=function(k,A){f.setCssClass(this.container,k,A!==!1)},E.prototype.unsetStyle=function(k){f.removeCssClass(this.container,k)},E.prototype.setCursorStyle=function(k){f.setStyle(this.scroller.style,"cursor",k)},E.prototype.setMouseCursor=function(k){f.setStyle(this.scroller.style,"cursor",k)},E.prototype.attachToShadowRoot=function(){f.importCssString(C,"ace_editor.css",this.container)},E.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},E.prototype.$updateCustomScrollbar=function(k){var A=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,k===!0?(this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(S){A.$scrollAnimation||A.session.setScrollTop(S.data-A.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(S){A.$scrollAnimation||A.session.setScrollLeft(S.data-A.scrollMargin.left)}),this.$scrollDecorator=new b(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new r(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.addEventListener("scroll",function(S){A.$scrollAnimation||A.session.setScrollTop(S.data-A.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(S){A.$scrollAnimation||A.session.setScrollLeft(S.data-A.scrollMargin.left)}))},E.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var k=this;this.$resizeTimer=m.delayedCall(function(){k.destroyed||k.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(A){var S=A[0].contentRect.width,M=A[0].contentRect.height;Math.abs(k.$size.width-S)>1||Math.abs(k.$size.height-M)>1?k.$resizeTimer.delay():k.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E}();I.prototype.CHANGE_CURSOR=1,I.prototype.CHANGE_MARKER=2,I.prototype.CHANGE_GUTTER=4,I.prototype.CHANGE_SCROLL=8,I.prototype.CHANGE_LINES=16,I.prototype.CHANGE_TEXT=32,I.prototype.CHANGE_SIZE=64,I.prototype.CHANGE_MARKER_BACK=128,I.prototype.CHANGE_MARKER_FRONT=256,I.prototype.CHANGE_FULL=512,I.prototype.CHANGE_H_SCROLL=1024,I.prototype.$changes=0,I.prototype.$padding=null,I.prototype.$frozen=!1,I.prototype.STEPS=8,p.implement(I.prototype,x),c.defineOptions(I.prototype,"renderer",{useResizeObserver:{set:function(E){!E&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):E&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(E){this.$textLayer.setShowInvisibles(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(E){typeof E=="number"&&(this.$printMarginColumn=E),this.$showPrintMargin=!!E,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(E){this.$gutter.style.display=E?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(E){this.$gutterLayer.$useSvgGutterIcons=E},initialValue:!1},showFoldedAnnotations:{set:function(E){this.$gutterLayer.$showFoldedAnnotations=E},initialValue:!1},fadeFoldWidgets:{set:function(E){f.setCssClass(this.$gutter,"ace_fade-fold-widgets",E)},initialValue:!1},showFoldWidgets:{set:function(E){this.$gutterLayer.setShowFoldWidgets(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(E){this.$textLayer.setDisplayIndentGuides(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(E){this.$textLayer.setHighlightIndentGuides(E)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(E){this.$gutterLayer.setHighlightGutterLine(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(E){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(E){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(E){typeof E=="number"&&(E=E+"px"),this.container.style.fontSize=E,this.updateFontSize()},initialValue:12},fontFamily:{set:function(E){this.container.style.fontFamily=E,this.updateFontSize()}},maxLines:{set:function(E){this.updateFull()}},minLines:{set:function(E){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(E){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(E){E=+E||0,this.$scrollPastEnd!=E&&(this.$scrollPastEnd=E,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(E){this.$gutterLayer.$fixedWidth=!!E,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(E){this.$updateCustomScrollbar(E)},initialValue:!1},theme:{set:function(E){this.setTheme(E)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),a.VirtualRenderer=I}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,a,v){var p=n("../lib/oop"),f=n("../lib/net"),m=n("../lib/event_emitter").EventEmitter,c=n("../config");function h(s){var r="importScripts('"+f.qualifyURL(s)+"');";try{return new Blob([r],{type:"application/javascript"})}catch{var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,d=new u;return d.append(r),d.getBlob("application/javascript")}}function i(s){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(c.get("loadWorkerFromBlob")){var r=h(s),u=window.URL||window.webkitURL,d=u.createObjectURL(r);return new Worker(d)}return new Worker(s)}var o=function(s){s.postMessage||(s=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=s,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){p.implement(this,m),this.$createWorkerFromOldConfig=function(s,r,u,d,g){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),c.get("packaged")||!n.toUrl)d=d||c.moduleUrl(r,"worker");else{var y=this.$normalizePath;d=d||y(n.toUrl("ace/worker/worker.js",null,"_"));var x={};s.forEach(function(C){x[C]=y(n.toUrl(C,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(d),g&&this.send("importScripts",g),this.$worker.postMessage({init:!0,tlns:x,module:r,classname:u}),this.$worker},this.onMessage=function(s){var r=s.data;switch(r.type){case"event":this._signal(r.name,{data:r.data});break;case"call":var u=this.callbacks[r.id];u&&(u(r.data),delete this.callbacks[r.id]);break;case"error":this.reportError(r.data);break;case"log":window.console&&console.log&&console.log.apply(console,r.data);break}},this.reportError=function(s){window.console&&console.error&&console.error(s)},this.$normalizePath=function(s){return f.qualifyURL(s)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(s){s.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(s,r){this.$worker.postMessage({command:s,args:r})},this.call=function(s,r,u){if(u){var d=this.callbackId++;this.callbacks[d]=u,r.push(d)}this.send(s,r)},this.emit=function(s,r){try{r.data&&r.data.err&&(r.data.err={message:r.data.err.message,stack:r.data.err.stack,code:r.data.err.code}),this.$worker&&this.$worker.postMessage({event:s,data:{data:r.data}})}catch(u){console.error(u.stack)}},this.attachToDocument=function(s){this.$doc&&this.terminate(),this.$doc=s,this.call("setValue",[s.getValue()]),s.on("change",this.changeListener,!0)},this.changeListener=function(s){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),s.action=="insert"?this.deltaQueue.push(s.start,s.lines):this.deltaQueue.push(s.start,s.end)},this.$sendDeltaQueue=function(){var s=this.deltaQueue;s&&(this.deltaQueue=null,s.length>50&&s.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:s}))}}).call(o.prototype);var l=function(s,r,u){var d=null,g=!1,y=Object.create(m),x=[],C=new o({messageBuffer:x,terminate:function(){},postMessage:function(w){x.push(w),d&&(g?setTimeout(b):b())}});C.setEmitSync=function(w){g=w};var b=function(){var w=x.shift();w.command?d[w.command].apply(d,w.args):w.event&&y._signal(w.event,w.data)};return y.postMessage=function(w){C.onMessage({data:w})},y.callback=function(w,_){this.postMessage({type:"call",id:_,data:w})},y.emit=function(w,_){this.postMessage({type:"event",name:w,data:_})},c.loadModule(["worker",r],function(w){for(d=new w[u](y);x.length;)b()}),C};a.UIWorkerClient=l,a.WorkerClient=o,a.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,a,v){var p=n("./range").Range,f=n("./lib/event_emitter").EventEmitter,m=n("./lib/oop"),c=function(){function h(i,o,l,s,r,u){var d=this;this.length=o,this.session=i,this.doc=i.getDocument(),this.mainClass=r,this.othersClass=u,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=s,this.$onCursorChange=function(){setTimeout(function(){d.onCursorChange()})},this.$pos=l;var g=i.getUndoManager().$undoStack||i.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=g.length,this.setup(),i.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var i=this,o=this.doc,l=this.session;this.selectionBefore=l.selection.toJSON(),l.selection.inMultiSelectMode&&l.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=l.addMarker(new p(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(r){var u=o.createAnchor(r.row,r.column);u.$insertRight=!0,u.detach(),i.others.push(u)}),l.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,o=this;this.othersActive=!0,this.others.forEach(function(l){l.markerId=i.addMarker(new p(l.row,l.column,l.row,l.column+o.length),o.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},h.prototype.onUpdate=function(i){if(this.$updating)return this.updateAnchors(i);var o=i;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var l=i.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,s=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,r=o.start.column-this.pos.column;if(this.updateAnchors(i),s&&(this.length+=l),s&&!this.session.$fromUndo){if(i.action==="insert")for(var u=this.others.length-1;u>=0;u--){var d=this.others[u],g={row:d.row,column:d.column+r};this.doc.insertMergedLines(g,i.lines)}else if(i.action==="remove")for(var u=this.others.length-1;u>=0;u--){var d=this.others[u],g={row:d.row,column:d.column+r};this.doc.remove(new p(g.row,g.column,g.row,g.column-l))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(i){this.pos.onChange(i);for(var o=this.others.length;o--;)this.others[o].onChange(i);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var i=this,o=this.session,l=function(r,u){o.removeMarker(r.markerId),r.markerId=o.addMarker(new p(r.row,r.column,r.row,r.column+i.length),u,null,!1)};l(this.pos,this.mainClass);for(var s=this.others.length;s--;)l(this.others[s],this.othersClass)}},h.prototype.onCursorChange=function(i){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",i)):(this.hideOtherMarkers(),this._emit("cursorLeave",i))}},h.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var i=this.session.getUndoManager(),o=(i.$undoStack||i.$undostack).length-this.$undoStackDepth,l=0;l<o;l++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h}();m.implement(c.prototype,f),a.PlaceHolder=c}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,a,v){var p=n("../lib/event"),f=n("../lib/useragent");function m(h,i){return h.row==i.row&&h.column==i.column}function c(h){var i=h.domEvent,o=i.altKey,l=i.shiftKey,s=i.ctrlKey,r=h.getAccelKey(),u=h.getButton();if(s&&f.isMac&&(u=i.button),h.editor.inMultiSelectMode&&u==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!s&&!o&&!r){u===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(u===0){var d=h.editor,g=d.selection,y=d.inMultiSelectMode,x=h.getDocumentPosition(),C=g.getCursor(),b=h.inSelection()||g.isEmpty()&&m(x,C),w=h.x,_=h.y,I=function(N){w=N.clientX,_=N.clientY},E=d.session,k=d.renderer.pixelToScreenCoordinates(w,_),A=k,S;if(d.$mouseHandler.$enableJumpToDef)s&&o||r&&o?S=l?"block":"add":o&&d.$blockSelectEnabled&&(S="block");else if(r&&!o){if(S="add",!y&&l)return}else o&&d.$blockSelectEnabled&&(S="block");if(S&&f.isMac&&i.ctrlKey&&d.$mouseHandler.cancelContextMenu(),S=="add"){if(!y&&b)return;if(!y){var M=g.toOrientedRange();d.addSelectionMarker(M)}var $=g.rangeList.rangeAtPoint(x);d.inVirtualSelectionMode=!0,l&&($=null,M=g.ranges[0]||M,d.removeSelectionMarker(M)),d.once("mouseup",function(){var N=g.toOrientedRange();$&&N.isEmpty()&&m($.cursor,N.cursor)?g.substractPoint(N.cursor):(l?g.substractPoint(M.cursor):M&&(d.removeSelectionMarker(M),g.addRange(M)),g.addRange(N)),d.inVirtualSelectionMode=!1})}else if(S=="block"){h.stop(),d.inVirtualSelectionMode=!0;var L,T=[],R=function(){var N=d.renderer.pixelToScreenCoordinates(w,_),V=E.screenToDocumentPosition(N.row,N.column,N.offsetX);m(A,N)&&m(V,g.lead)||(A=N,d.selection.moveToPosition(V),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(T),T=g.rectangularRangeBlock(A,k),d.$mouseHandler.$clickSelection&&T.length==1&&T[0].isEmpty()&&(T[0]=d.$mouseHandler.$clickSelection.clone()),T.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers())};y&&!r?g.toSingleRange():!y&&r&&(L=g.toOrientedRange(),d.addSelectionMarker(L)),l?k=E.documentToScreenPosition(g.lead):g.moveToPosition(x),A={row:-1,column:-1};var P=function(N){R(),clearInterval(O),d.removeSelectionMarkers(T),T.length||(T=[g.toOrientedRange()]),L&&(d.removeSelectionMarker(L),g.toSingleRange(L));for(var V=0;V<T.length;V++)g.addRange(T[V]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null},F=R;p.capture(d.container,I,P);var O=setInterval(function(){F()},20);return h.preventDefault()}}}a.onMouseDown=c}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,a,v){a.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(f){f.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(f){f.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(f){f.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(f){f.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(f){f.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(f){f.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(f){f.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(f){f.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(f){f.multiSelect.rangeCount>1?f.multiSelect.joinSelections():f.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(f){f.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(f){f.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(f){f.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],a.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(f){f.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(f){return f&&f.inMultiSelectMode}}];var p=n("../keyboard/hash_handler").HashHandler;a.keyboardHandler=new p(a.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,a,v){var p=n("./range_list").RangeList,f=n("./range").Range,m=n("./selection").Selection,c=n("./mouse/multi_select_handler").onMouseDown,h=n("./lib/event"),i=n("./lib/lang"),o=n("./commands/multi_select_commands");a.commands=o.defaultCommands.concat(o.multiSelectCommands);var l=n("./search").Search,s=new l;function r(C,b,w){return s.$options.wrap=!0,s.$options.needle=b,s.$options.backwards=w==-1,s.find(C)}var u=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(C,b){if(C){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(C),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),b||this.fromOrientedRange(C);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}C.cursor||(C.cursor=C.end);var _=this.rangeList.add(C);return this.$onAddRange(C),_.length&&this.$onRemoveRange(_),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(C)}},this.toSingleRange=function(C){C=C||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),C&&this.fromOrientedRange(C)},this.substractPoint=function(C){var b=this.rangeList.substractPoint(C);if(b)return this.$onRemoveRange(b),b[0]},this.mergeOverlappingRanges=function(){var C=this.rangeList.merge();C.length&&this.$onRemoveRange(C)},this.$onAddRange=function(C){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(C),this._signal("addRange",{range:C})},this.$onRemoveRange=function(C){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();C.push(b),this.rangeCount=0}for(var w=C.length;w--;){var _=this.ranges.indexOf(C[w]);this.ranges.splice(_,1)}this._signal("removeRange",{ranges:C}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new p,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var C=this.ranges.length?this.ranges:[this.getRange()],b=[],w=0;w<C.length;w++){var _=C[w],I=_.start.row,E=_.end.row;if(I===E)b.push(_.clone());else{for(b.push(new f(I,_.start.column,I,this.session.getLine(I).length));++I<E;)b.push(this.getLineRange(I,!0));b.push(new f(E,0,E,_.end.column))}w==0&&!this.isBackwards()&&(b=b.reverse())}this.toSingleRange();for(var w=b.length;w--;)this.addRange(b[w])},this.joinSelections=function(){var C=this.rangeList.ranges,b=C[C.length-1],w=f.fromPoints(C[0].start,b.end);this.toSingleRange(),this.setSelectionRange(w,b.cursor==b.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var C=this.rangeList.ranges,b=C[C.length-1],w=f.fromPoints(C[0].start,b.end);this.toSingleRange(),this.setSelectionRange(w,b.cursor==b.start)}else{var _=this.session.documentToScreenPosition(this.cursor),I=this.session.documentToScreenPosition(this.anchor),E=this.rectangularRangeBlock(_,I);E.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(C,b,w){var _=[],I=C.column<b.column;if(I)var E=C.column,k=b.column,A=C.offsetX,S=b.offsetX;else var E=b.column,k=C.column,A=b.offsetX,S=C.offsetX;var M=C.row<b.row;if(M)var $=C.row,L=b.row;else var $=b.row,L=C.row;E<0&&(E=0),$<0&&($=0),$==L&&(w=!0);for(var T,R=$;R<=L;R++){var P=f.fromPoints(this.session.screenToDocumentPosition(R,E,A),this.session.screenToDocumentPosition(R,k,S));if(P.isEmpty()){if(T&&g(P.end,T))break;T=P.end}P.cursor=I?P.start:P.end,_.push(P)}if(M&&_.reverse(),!w){for(var F=_.length-1;_[F].isEmpty()&&F>0;)F--;if(F>0)for(var O=0;_[O].isEmpty();)O++;for(var N=F;N>=O;N--)_[N].isEmpty()&&_.splice(N,1)}return _}}).call(m.prototype);var d=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(C){C.cursor||(C.cursor=C.end);var b=this.getSelectionStyle();return C.marker=this.session.addMarker(C,"ace_selection",b),this.session.$selectionMarkers.push(C),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,C},this.removeSelectionMarker=function(C){if(C.marker){this.session.removeMarker(C.marker);var b=this.session.$selectionMarkers.indexOf(C);b!=-1&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(C){for(var b=this.session.$selectionMarkers,w=C.length;w--;){var _=C[w];if(_.marker){this.session.removeMarker(_.marker);var I=b.indexOf(_);I!=-1&&b.splice(I,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(C){this.addSelectionMarker(C.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(C){this.removeSelectionMarkers(C.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(C){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(C){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(C){var b=C.command,w=C.editor;if(w.multiSelect){if(b.multiSelectAction)b.multiSelectAction=="forEach"?_=w.forEachSelection(b,C.args):b.multiSelectAction=="forEachLine"?_=w.forEachSelection(b,C.args,!0):b.multiSelectAction=="single"?(w.exitMultiSelectMode(),_=b.exec(w,C.args||{})):_=b.multiSelectAction(w,C.args||{});else{var _=b.exec(w,C.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return _}},this.forEachSelection=function(C,b,w){if(!this.inVirtualSelectionMode){var _=w&&w.keepOrder,I=w==!0||w&&w.$byLines,E=this.session,k=this.selection,A=k.rangeList,S=(_?k:A).ranges,M;if(!S.length)return C.exec?C.exec(this,b||{}):C(this,b||{});var $=k._eventRegistry;k._eventRegistry={};var L=new m(E);this.inVirtualSelectionMode=!0;for(var T=S.length;T--;){if(I)for(;T>0&&S[T].start.row==S[T-1].end.row;)T--;L.fromOrientedRange(S[T]),L.index=T,this.selection=E.selection=L;var R=C.exec?C.exec(this,b||{}):C(this,b||{});!M&&R!==void 0&&(M=R),L.toOrientedRange(S[T])}L.detach(),this.selection=E.selection=k,this.inVirtualSelectionMode=!1,k._eventRegistry=$,k.mergeOverlappingRanges(),k.ranges[0]&&k.fromOrientedRange(k.ranges[0]);var P=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),P&&P.from==P.to&&this.renderer.animateScrolling(P.from),M}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var C="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,w=[],_=0;_<b.length;_++)w.push(this.session.getTextRange(b[_]));var I=this.session.getDocument().getNewLineCharacter();C=w.join(I),C.length==(w.length-1)*I.length&&(C="")}else this.selection.isEmpty()||(C=this.session.getTextRange(this.getSelectionRange()));return C},this.$checkMultiselectChange=function(C,b){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var w=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&b==this.multiSelect.anchor)return;var _=b==this.multiSelect.anchor?w.cursor==w.start?w.end:w.start:w.cursor;_.row!=b.row||this.session.$clipPositionToDocument(_.row,_.column).column!=b.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(C,b,w){if(b=b||{},b.needle=C||b.needle,b.needle==null){var _=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();b.needle=this.session.getTextRange(_)}this.$search.set(b);var I=this.$search.findAll(this.session);if(!I.length)return 0;var E=this.multiSelect;w||E.toSingleRange(I[0]);for(var k=I.length;k--;)E.addRange(I[k],!0);return _&&E.rangeList.rangeAtPoint(_.start)&&E.addRange(_,!0),I.length},this.selectMoreLines=function(C,b){var w=this.selection.toOrientedRange(),_=w.cursor==w.end,I=this.session.documentToScreenPosition(w.cursor);this.selection.$desiredColumn&&(I.column=this.selection.$desiredColumn);var E=this.session.screenToDocumentPosition(I.row+C,I.column);if(w.isEmpty())var A=E;else var k=this.session.documentToScreenPosition(_?w.end:w.start),A=this.session.screenToDocumentPosition(k.row+C,k.column);if(_){var S=f.fromPoints(E,A);S.cursor=S.start}else{var S=f.fromPoints(A,E);S.cursor=S.end}if(S.desiredColumn=I.column,!this.selection.inMultiSelectMode)this.selection.addRange(w);else if(b)var M=w.cursor;this.selection.addRange(S),M&&this.selection.substractPoint(M)},this.transposeSelections=function(C){for(var b=this.session,w=b.multiSelect,_=w.ranges,I=_.length;I--;){var E=_[I];if(E.isEmpty()){var k=b.getWordRange(E.start.row,E.start.column);E.start.row=k.start.row,E.start.column=k.start.column,E.end.row=k.end.row,E.end.column=k.end.column}}w.mergeOverlappingRanges();for(var A=[],I=_.length;I--;){var E=_[I];A.unshift(b.getTextRange(E))}C<0?A.unshift(A.pop()):A.push(A.shift());for(var I=_.length;I--;){var E=_[I],S=E.clone();b.replace(E,A[I]),E.start.row=S.start.row,E.start.column=S.start.column}w.fromOrientedRange(w.ranges[0])},this.selectMore=function(C,b,w){var _=this.session,I=_.multiSelect,E=I.toOrientedRange();if(!(E.isEmpty()&&(E=_.getWordRange(E.start.row,E.start.column),E.cursor=C==-1?E.start:E.end,this.multiSelect.addRange(E),w))){var k=_.getTextRange(E),A=r(_,k,C);A&&(A.cursor=C==-1?A.start:A.end,this.session.unfold(A),this.multiSelect.addRange(A),this.renderer.scrollCursorIntoView(null,.5)),b&&this.multiSelect.substractPoint(E.cursor)}},this.alignCursors=function(){var C=this.session,b=C.multiSelect,w=b.ranges,_=-1,I=w.filter(function(F){if(F.cursor.row==_)return!0;_=F.cursor.row});if(!w.length||I.length==w.length-1){var E=this.selection.getRange(),k=E.start.row,A=E.end.row,S=k==A;if(S){var M=this.session.getLength(),$;do $=this.session.getLine(A);while(/[=:]/.test($)&&++A<M);do $=this.session.getLine(k);while(/[=:]/.test($)&&--k>0);k<0&&(k=0),A>=M&&(A=M-1)}var L=this.session.removeFullLines(k,A);L=this.$reAlignText(L,S),this.session.insert({row:k,column:0},L.join(`
|
|
`)+`
|
|
`),S||(E.start.column=0,E.end.column=L[L.length-1].length),this.selection.setRange(E)}else{I.forEach(function(F){b.substractPoint(F.cursor)});var T=0,R=1/0,P=w.map(function(F){var O=F.cursor,N=C.getLine(O.row),V=N.substr(O.column).search(/\S/g);return V==-1&&(V=0),O.column>T&&(T=O.column),V<R&&(R=V),V});w.forEach(function(F,O){var N=F.cursor,V=T-N.column,H=P[O]-R;V>H?C.insert(N,i.stringRepeat(" ",V-H)):C.remove(new f(N.row,N.column,N.row,N.column-V+H)),F.start.column=F.end.column=T,F.start.row=F.end.row=N.row,F.cursor=F.end}),b.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(C,b){var w=!0,_=!0,I,E,k;return C.map(function(L){var T=L.match(/(\s*)(.*?)(\s*)([=:].*)/);return T?I==null?(I=T[1].length,E=T[2].length,k=T[3].length,T):(I+E+k!=T[1].length+T[2].length+T[3].length&&(_=!1),I!=T[1].length&&(w=!1),I>T[1].length&&(I=T[1].length),E<T[2].length&&(E=T[2].length),k>T[3].length&&(k=T[3].length),T):[L]}).map(b?S:w?_?M:S:$);function A(L){return i.stringRepeat(" ",L)}function S(L){return L[2]?A(I)+L[2]+A(E-L[2].length+k)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function M(L){return L[2]?A(I+E-L[2].length)+L[2]+A(k)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function $(L){return L[2]?A(I)+L[2]+A(k)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}}}).call(d.prototype);function g(C,b){return C.row==b.row&&C.column==b.column}a.onSessionChange=function(C){var b=C.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var w=C.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(C){C.$multiselectOnSessionChange||(C.$onAddRange=C.$onAddRange.bind(C),C.$onRemoveRange=C.$onRemoveRange.bind(C),C.$onMultiSelect=C.$onMultiSelect.bind(C),C.$onSingleSelect=C.$onSingleSelect.bind(C),C.$multiselectOnSessionChange=a.onSessionChange.bind(C),C.$checkMultiselectChange=C.$checkMultiselectChange.bind(C),C.$multiselectOnSessionChange(C),C.on("changeSession",C.$multiselectOnSessionChange),C.on("mousedown",c),C.commands.addCommands(o.defaultCommands),x(C))}function x(C){if(!C.textInput)return;var b=C.textInput.getElement(),w=!1;h.addListener(b,"keydown",function(I){var E=I.keyCode==18&&!(I.ctrlKey||I.shiftKey||I.metaKey);C.$blockSelectEnabled&&E?w||(C.renderer.setMouseCursor("crosshair"),w=!0):w&&_()},C),h.addListener(b,"keyup",_,C),h.addListener(b,"blur",_,C);function _(I){w&&(C.renderer.setMouseCursor(""),w=!1)}}a.MultiSelect=y,n("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(C){y(this),C?this.on("mousedown",c):this.off("mousedown",c)},value:!0},enableBlockSelect:{set:function(C){this.$blockSelectEnabled=C},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,a,v){var p=n("../../range").Range,f=a.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(m,c,h){var i=m.getLine(h);return this.foldingStartMarker.test(i)?"start":c=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(m,c,h){return null},this.indentationBlock=function(m,c,h){var i=/\S/,o=m.getLine(c),l=o.search(i);if(l!=-1){for(var s=h||o.length,r=m.getLength(),u=c,d=c;++c<r;){var g=m.getLine(c).search(i);if(g!=-1){if(g<=l){var y=m.getTokenAt(c,0);if(!y||y.type!=="string")break}d=c}}if(d>u){var x=m.getLine(d).length;return new p(u,s,d,x)}}},this.openingBracketBlock=function(m,c,h,i,o){var l={row:h,column:i+1},s=m.$findClosingBracket(c,l,o);if(s){var r=m.foldWidgets[s.row];return r==null&&(r=m.getFoldWidget(s.row)),r=="start"&&s.row>l.row&&(s.row--,s.column=m.getLine(s.row).length),p.fromPoints(l,s)}},this.closingBracketBlock=function(m,c,h,i,o){var l={row:h,column:i},s=m.$findOpeningBracket(c,l);if(s)return s.column++,l.column--,p.fromPoints(s,l)}}).call(f.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,a,v){var p=n("../line_widgets").LineWidgets,f=n("../lib/dom"),m=n("../range").Range,c=n("../config").nls;function h(o,l,s){for(var r=0,u=o.length-1;r<=u;){var d=r+u>>1,g=s(l,o[d]);if(g>0)r=d+1;else if(g<0)u=d-1;else return d}return-(r+1)}function i(o,l,s){var r=o.getAnnotations().sort(m.comparePoints);if(r.length){var u=h(r,{row:l,column:-1},m.comparePoints);u<0&&(u=-u-1),u>=r.length?u=s>0?0:r.length-1:u===0&&s<0&&(u=r.length-1);var d=r[u];if(!(!d||!s)){if(d.row===l){do d=r[u+=s];while(d&&d.row===l);if(!d)return r.slice()}var g=[];l=d.row;do g[s<0?"unshift":"push"](d),d=r[u+=s];while(d&&d.row==l);return g.length&&g}}}a.showErrorMarker=function(o,l){var s=o.session;s.widgetManager||(s.widgetManager=new p(s),s.widgetManager.attach(o));var r=o.getCursorPosition(),u=r.row,d=s.widgetManager.getWidgetsAtRow(u).filter(function(E){return E.type=="errorMarker"})[0];d?d.destroy():u-=l;var g=i(s,u,l),y;if(g){var x=g[0];r.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,r.row=x.row,y=o.renderer.$gutterLayer.$annotations[r.row]}else{if(d)return;y={displayText:[c("error-marker.good-state","Looks good!")],className:"ace_ok"}}o.session.unfold(r.row),o.selection.moveToPosition(r);var C={row:r.row,fixedWidth:!0,coverGutter:!0,el:f.createElement("div"),type:"errorMarker"},b=C.el.appendChild(f.createElement("div")),w=C.el.appendChild(f.createElement("div"));w.className="error_widget_arrow "+y.className;var _=o.renderer.$cursorLayer.getPixelPosition(r).left;w.style.left=_+o.renderer.gutterWidth-5+"px",C.el.className="error_widget_wrapper",b.className="error_widget "+y.className,y.displayText.forEach(function(E,k){b.appendChild(f.createTextNode(E)),k<y.displayText.length-1&&b.appendChild(f.createElement("br"))}),b.appendChild(f.createElement("div"));var I=function(E,k,A){if(k===0&&(A==="esc"||A==="return"))return C.destroy(),{command:"null"}};C.destroy=function(){o.$mouseHandler.isMousePressed||(o.keyBinding.removeKeyboardHandler(I),s.widgetManager.removeLineWidget(C),o.off("changeSelection",C.destroy),o.off("changeSession",C.destroy),o.off("mouseup",C.destroy),o.off("change",C.destroy))},o.keyBinding.addKeyboardHandler(I),o.on("changeSelection",C.destroy),o.on("changeSession",C.destroy),o.on("mouseup",C.destroy),o.on("change",C.destroy),o.session.widgetManager.addLineWidget(C),C.el.onmousedown=o.focus.bind(o),o.renderer.scrollCursorIntoView(null,.5,{bottom:C.el.offsetHeight})},f.importCssString(`
|
|
.error_widget_wrapper {
|
|
background: inherit;
|
|
color: inherit;
|
|
border:none
|
|
}
|
|
.error_widget {
|
|
border-top: solid 2px;
|
|
border-bottom: solid 2px;
|
|
margin: 5px 0;
|
|
padding: 10px 40px;
|
|
white-space: pre-wrap;
|
|
}
|
|
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
border-color: #ff5a5a
|
|
}
|
|
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
border-color: #F1D817
|
|
}
|
|
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
border-color: #5a5a5a
|
|
}
|
|
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
border-color: #5aaa5a
|
|
}
|
|
.error_widget_arrow {
|
|
position: absolute;
|
|
border: solid 5px;
|
|
border-top-color: transparent!important;
|
|
border-right-color: transparent!important;
|
|
border-left-color: transparent!important;
|
|
top: -5px;
|
|
}
|
|
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,a,v){n("./loader_build")(a);var p=n("./lib/dom"),f=n("./range").Range,m=n("./editor").Editor,c=n("./edit_session").EditSession,h=n("./undomanager").UndoManager,i=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),a.config=n("./config"),a.edit=function(o,l){if(typeof o=="string"){var s=o;if(o=document.getElementById(s),!o)throw new Error("ace.edit can't find div #"+s)}if(o&&o.env&&o.env.editor instanceof m)return o.env.editor;var r="";if(o&&/input|textarea/i.test(o.tagName)){var u=o;r=u.value,o=p.createElement("pre"),u.parentNode.replaceChild(o,u)}else o&&(r=o.textContent,o.innerHTML="");var d=a.createEditSession(r),g=new m(new i(o),d,l),y={document:d,editor:g,onResize:g.resize.bind(g,null)};return u&&(y.textarea=u),g.on("destroy",function(){y.editor.container.env=null}),g.container.env=g.env=y,g},a.createEditSession=function(o,l){var s=new c(o,l);return s.setUndoManager(new h),s},a.Range=f,a.Editor=m,a.EditSession=c,a.UndoManager=h,a.VirtualRenderer=i,a.version=a.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var a=function(){return this}();!a&&typeof window<"u"&&(a=window),!a&&typeof self<"u"&&(a=self),a.ace||(a.ace=n);for(var v in n)n.hasOwnProperty(v)&&(a.ace[v]=n[v]);a.ace.default=a.ace,e&&(e.exports=a.ace)})}()})(kc);var v2=kc.exports;const y2=qt(v2),fs=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],w2=ce({name:"VAceEditor",props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...fs],render(){return Kn("div")},mounted(){const e=this._editor=lu(y2.edit(this.$el,{placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines,...this.options}));this._contentBackup=this.value,this._isSettingContent=!1,e.on("change",()=>{if(this._isSettingContent)return;const t=e.getValue();this._contentBackup=t,this.$emit("update:value",t)}),fs.forEach(t=>{const n="on"+cu(t);typeof this.$.vnode.props[n]=="function"&&e.on(t,this.$emit.bind(this,t))}),this._ro=new Yu(()=>e.resize()),this._ro.observe(this.$el),this.$emit("init",e)},beforeUnmount(){var e,t;(e=this._ro)===null||e===void 0||e.disconnect(),(t=this._editor)===null||t===void 0||t.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(e){if(this._contentBackup!==e){try{this._isSettingContent=!0,this._editor.setValue(e,1)}finally{this._isSettingContent=!1}this._contentBackup=e}},theme(e){this._editor.setTheme("ace/theme/"+e)},options(e){this._editor.setOptions(e)},readonly(e){this._editor.setReadOnly(e)},placeholder(e){this._editor.setOption("placeholder",e)},wrap(e){this._editor.setWrapBehavioursEnabled(e)},printMargin(e){this._editor.setOption("printMargin",e)},lang(e){this._editor.setOption("mode","ace/mode/"+e)},minLines(e){this._editor.setOption("minLines",e)},maxLines(e){this._editor.setOption("maxLines",e)}}});var b2={exports:{}};(function(e,t){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,a,v){var p=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,m=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},m.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};p.inherits(m,f),m.getTagRule=function(c){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},m.getStartRule=function(c){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:c}},m.getEndRule=function(c){return{token:"comment.doc",regex:"\\*\\/",next:c}},a.JsDocCommentHighlightRules=m}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,a,v){var p=n("../lib/oop"),f=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,m=n("./text_highlight_rules").TextHighlightRules,c="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",h=function(l){var s={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},r=this.createKeywordMapper(s,"identifier"),u="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",d="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",g="(function)(\\s*)(\\*?)",y={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(s).join("|")+"\\b)"+c+")(\\s*)(\\()"};this.$rules={no_regex:[f.getStartRule("doc-start"),o("no_regex"),y,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+c+")(\\s*)(=)(\\s*)"+g+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+c+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+c+")(\\s*)(:)(\\s*)"+g+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+g+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+u+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:r,regex:c},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:g+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:c},{regex:"",token:"empty",next:"no_regex"}],start:[f.getStartRule("doc-start"),o("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[o("function_arguments"),{token:"variable.parameter",regex:c},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!l||!l.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(x,C,b){if(this.next=x=="{"?this.nextState:"",x=="{"&&b.length)b.unshift("start",C);else if(x=="}"&&b.length&&(b.shift(),this.next=b.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return x=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+c+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!l||l.jsx!=!1)&&i.call(this)),this.embedRules(f,"doc-",[f.getEndRule("no_regex")]),this.normalizeRules()};p.inherits(h,m);function i(){var l=c.replace("\\d","\\d\\-"),s={onMatch:function(u,d,g){var y=u.charAt(1)=="/"?2:1;return y==1?(d!=this.nextState?g.unshift(this.next,this.nextState,0):g.unshift(this.next),g[2]++):y==2&&d==this.nextState&&(g[1]--,(!g[1]||g[1]<0)&&(g.shift(),g.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:u.slice(0,y)},{type:"meta.tag.tag-name.xml",value:u.substr(y)}]},regex:"</?(?:"+l+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(s);var r={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[r,s,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(u,d,g){return d==g[0]&&g.shift(),u.length==2&&(g[0]==this.nextState&&g[1]--,(!g[1]||g[1]<0)&&g.splice(0,2)),this.next=g[0]||"start",[{type:this.token,value:u}]},nextState:"jsx"},r,o("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:l},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},s],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function o(l){return[{token:"comment",regex:/\/\*/,next:[f.getTagRule(),{token:"comment",regex:"\\*\\/",next:l||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[f.getTagRule(),{token:"comment",regex:"$|^",next:l||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}a.JavaScriptHighlightRules=h}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,a,v){var p=n("../range").Range,f=function(){};(function(){this.checkOutdent=function(m,c){return/^\s+$/.test(m)?/^\s*\}/.test(c):!1},this.autoOutdent=function(m,c){var h=m.getLine(c),i=h.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,l=m.findMatchingBracket({row:c,column:o});if(!l||l.row==c)return 0;var s=this.$getIndent(m.getLine(l.row));m.replace(new p(c,0,c,o-1),s)},this.$getIndent=function(m){return m.match(/^\s*/)[0]}}).call(f.prototype),a.MatchingBraceOutdent=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(n,a,v){var p=n("../../lib/oop"),f=n("../behaviour").Behaviour,m=n("../../token_iterator").TokenIterator;function c(i,o){return i&&i.type.lastIndexOf(o+".xml")>-1}var h=function(){this.add("string_dquotes","insertion",function(i,o,l,s,r){if(r=='"'||r=="'"){var u=r,d=s.doc.getTextRange(l.getSelectionRange());if(d!==""&&d!=="'"&&d!='"'&&l.getWrapBehavioursEnabled())return{text:u+d+u,selection:!1};var g=l.getCursorPosition(),y=s.doc.getLine(g.row),x=y.substring(g.column,g.column+1),C=new m(s,g.row,g.column),b=C.getCurrentToken();if(x==u&&(c(b,"attribute-value")||c(b,"string")))return{text:"",selection:[1,1]};if(b||(b=C.stepBackward()),!b)return;for(;c(b,"tag-whitespace")||c(b,"whitespace");)b=C.stepBackward();var w=!x||x.match(/\s/);if(c(b,"attribute-equals")&&(w||x==">")||c(b,"decl-attribute-equals")&&(w||x=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,o,l,s,r){var u=s.doc.getTextRange(r);if(!r.isMultiLine()&&(u=='"'||u=="'")){var d=s.doc.getLine(r.start.row),g=d.substring(r.start.column+1,r.start.column+2);if(g==u)return r.end.column++,r}}),this.add("autoclosing","insertion",function(i,o,l,s,r){if(r==">"){var u=l.getSelectionRange().start,d=new m(s,u.row,u.column),g=d.getCurrentToken()||d.stepBackward();if(!g||!(c(g,"tag-name")||c(g,"tag-whitespace")||c(g,"attribute-name")||c(g,"attribute-equals")||c(g,"attribute-value"))||c(g,"reference.attribute-value"))return;if(c(g,"attribute-value")){var y=d.getCurrentTokenColumn()+g.value.length;if(u.column<y)return;if(u.column==y){var x=d.stepForward();if(x&&c(x,"attribute-value"))return;d.stepBackward()}}if(/^\s*>/.test(s.getLine(u.row).slice(u.column)))return;for(;!c(g,"tag-name");)if(g=d.stepBackward(),g.value=="<"){g=d.stepForward();break}var C=d.getCurrentTokenRow(),b=d.getCurrentTokenColumn();if(c(d.stepBackward(),"end-tag-open"))return;var w=g.value;return C==u.row&&(w=w.substring(0,u.column-b)),this.voidElements&&this.voidElements.hasOwnProperty(w.toLowerCase())?void 0:{text:"></"+w+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,o,l,s,r){if(r==`
|
|
`){var u=l.getCursorPosition(),d=s.getLine(u.row),g=new m(s,u.row,u.column),y=g.getCurrentToken();if(c(y,"")&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=g.stepBackward();if(!y)return;var x=y.value,C=g.getCurrentTokenRow();if(y=g.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[x]||!this.voidElements){var b=s.getTokenAt(u.row,u.column+1),d=s.getLine(C),w=this.$getIndent(d),_=w+s.getTabString();return b&&b.value==="</"?{text:`
|
|
`+_+`
|
|
`+w,selection:[1,_.length,1,_.length]}:{text:`
|
|
`+_}}}}})};p.inherits(h,f),a.XmlBehaviour=h}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(n,a,v){var p=n("../../lib/oop"),f=n("../../token_iterator").TokenIterator,m=n("../behaviour/cstyle").CstyleBehaviour,c=n("../behaviour/xml").XmlBehaviour,h=function(){var i=new c({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(i),this.inherit(m),this.add("autoclosing-fragment","insertion",function(o,l,s,r,u){if(u==">"){var d=s.getSelectionRange().start,g=new f(r,d.row,d.column),y=g.getCurrentToken()||g.stepBackward();if(!y)return;if(y.value=="<")return{text:"></>",selection:[1,1]}}})};p.inherits(h,m),a.JavaScriptBehaviour=h}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,a,v){var p=n("../../lib/oop"),f=n("../../range").Range,m=n("./fold_mode").FoldMode,c=a.FoldMode=function(o,l){m.call(this),this.voidElements=o||{},this.optionalEndTags=p.mixin({},this.voidElements),l&&p.mixin(this.optionalEndTags,l)};p.inherits(c,m);var h=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function i(o,l){return o.type.lastIndexOf(l+".xml")>-1}(function(){this.getFoldWidget=function(o,l,s){var r=this._getFirstTagInLine(o,s);return r?r.closing||!r.tagName&&r.selfClosing?l==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())||this._findEndTagInLine(o,s,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(o,s)},this.getCommentFoldWidget=function(o,l){return/comment/.test(o.getState(l))&&/<!-/.test(o.getLine(l))?"start":""},this._getFirstTagInLine=function(o,l){for(var s=o.getTokens(l),r=new h,u=0;u<s.length;u++){var d=s[u];if(i(d,"tag-open")){if(r.end.column=r.start.column+d.value.length,r.closing=i(d,"end-tag-open"),d=s[++u],!d)return null;if(r.tagName=d.value,d.value===""){if(d=s[++u],!d)return null;r.tagName=d.value}for(r.end.column+=d.value.length,u++;u<s.length;u++)if(d=s[u],r.end.column+=d.value.length,i(d,"tag-close")){r.selfClosing=d.value=="/>";break}return r}else if(i(d,"tag-close"))return r.selfClosing=d.value=="/>",r;r.start.column+=d.value.length}return null},this._findEndTagInLine=function(o,l,s,r){for(var u=o.getTokens(l),d=0,g=0;g<u.length;g++){var y=u[g];if(d+=y.value.length,!(d<r-1)&&i(y,"end-tag-open")&&(y=u[g+1],i(y,"tag-name")&&y.value===""&&(y=u[g+2]),y&&y.value==s))return!0}return!1},this.getFoldWidgetRange=function(o,l,s){var r=this._getFirstTagInLine(o,s);if(!r)return this.getCommentFoldWidget(o,s)&&o.getCommentFoldRange(s,o.getLine(s).length);var u=o.getMatchingTags({row:s,column:0});if(u)return new f(u.openTag.end.row,u.openTag.end.column,u.closeTag.start.row,u.closeTag.start.column)}}).call(c.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,a,v){var p=n("../../lib/oop"),f=n("../../range").Range,m=n("./fold_mode").FoldMode,c=a.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end)))};p.inherits(c,m),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,i,o){var l=h.getLine(o);if(this.singleLineBlockCommentRe.test(l)&&!this.startRegionRe.test(l)&&!this.tripleStarBlockCommentRe.test(l))return"";var s=this._getFoldWidgetBase(h,i,o);return!s&&this.startRegionRe.test(l)?"start":s},this.getFoldWidgetRange=function(h,i,o,l){var s=h.getLine(o);if(this.startRegionRe.test(s))return this.getCommentRegionBlock(h,s,o);var d=s.match(this.foldingStartMarker);if(d){var r=d.index;if(d[1])return this.openingBracketBlock(h,d[1],o,r);var u=h.getCommentFoldRange(o,r+d[0].length,1);return u&&!u.isMultiLine()&&(l?u=this.getSectionRange(h,o):i!="all"&&(u=null)),u}if(i!=="markbegin"){var d=s.match(this.foldingStopMarker);if(d){var r=d.index+d[0].length;return d[1]?this.closingBracketBlock(h,d[1],o,r):h.getCommentFoldRange(o,r,-1)}}},this.getSectionRange=function(h,i){var o=h.getLine(i),l=o.search(/\S/),s=i,r=o.length;i=i+1;for(var u=i,d=h.getLength();++i<d;){o=h.getLine(i);var g=o.search(/\S/);if(g!==-1){if(l>g)break;var y=this.getFoldWidgetRange(h,"all",i);if(y){if(y.start.row<=s)break;if(y.isMultiLine())i=y.end.row;else if(l==g)break}u=i}}return new f(s,r,u,h.getLine(u).length)},this.getCommentRegionBlock=function(h,i,o){for(var l=i.search(/\s*$/),s=h.getLength(),r=o,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++o<s;){i=h.getLine(o);var g=u.exec(i);if(g&&(g[1]?d--:d++,!d))break}var y=o;if(y>r)return new f(r,l,y,i.length)}}).call(c.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,a,v){var p=n("../../lib/oop"),f=n("./xml").FoldMode,m=n("./cstyle").FoldMode,c=a.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end))),this.xmlFoldMode=new f};p.inherits(c,m),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,i,o){var l=this.getFoldWidgetBase(h,i,o);return l||this.xmlFoldMode.getFoldWidget(h,i,o)},this.getFoldWidgetRange=function(h,i,o,l){var s=this.getFoldWidgetRangeBase(h,i,o,l);return s||this.xmlFoldMode.getFoldWidgetRange(h,i,o)}}).call(c.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(n,a,v){var p=n("../lib/oop"),f=n("./text").Mode,m=n("./javascript_highlight_rules").JavaScriptHighlightRules,c=n("./matching_brace_outdent").MatchingBraceOutdent,h=n("../worker/worker_client").WorkerClient,i=n("./behaviour/javascript").JavaScriptBehaviour,o=n("./folding/javascript").FoldMode,l=function(){this.HighlightRules=m,this.$outdent=new c,this.$behaviour=new i,this.foldingRules=new o};p.inherits(l,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(s,r,u){var d=this.$getIndent(r),g=this.getTokenizer().getLineTokens(r,s),y=g.tokens,x=g.state;if(y.length&&y[y.length-1].type=="comment")return d;if(s=="start"||s=="no_regex"){var C=r.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);C&&(d+=u)}else if(s=="doc-start"&&(x=="start"||x=="no_regex"))return"";return d},this.checkOutdent=function(s,r,u){return this.$outdent.checkOutdent(r,u)},this.autoOutdent=function(s,r,u){this.$outdent.autoOutdent(r,u)},this.createWorker=function(s){var r=new h(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return r.attachToDocument(s.getDocument()),r.on("annotate",function(u){s.setAnnotations(u.data)}),r.on("terminate",function(){s.clearAnnotations()}),r},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(l.prototype),a.Mode=l}),function(){ace.require(["ace/mode/javascript"],function(n){e&&(e.exports=n)})}()})(b2);var C2={exports:{}};(function(e,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,a,v){var p=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,m=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};p.inherits(m,f),a.JsonHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,a,v){var p=n("../range").Range,f=function(){};(function(){this.checkOutdent=function(m,c){return/^\s+$/.test(m)?/^\s*\}/.test(c):!1},this.autoOutdent=function(m,c){var h=m.getLine(c),i=h.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,l=m.findMatchingBracket({row:c,column:o});if(!l||l.row==c)return 0;var s=this.$getIndent(m.getLine(l.row));m.replace(new p(c,0,c,o-1),s)},this.$getIndent=function(m){return m.match(/^\s*/)[0]}}).call(f.prototype),a.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,a,v){var p=n("../../lib/oop"),f=n("../../range").Range,m=n("./fold_mode").FoldMode,c=a.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end)))};p.inherits(c,m),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,i,o){var l=h.getLine(o);if(this.singleLineBlockCommentRe.test(l)&&!this.startRegionRe.test(l)&&!this.tripleStarBlockCommentRe.test(l))return"";var s=this._getFoldWidgetBase(h,i,o);return!s&&this.startRegionRe.test(l)?"start":s},this.getFoldWidgetRange=function(h,i,o,l){var s=h.getLine(o);if(this.startRegionRe.test(s))return this.getCommentRegionBlock(h,s,o);var d=s.match(this.foldingStartMarker);if(d){var r=d.index;if(d[1])return this.openingBracketBlock(h,d[1],o,r);var u=h.getCommentFoldRange(o,r+d[0].length,1);return u&&!u.isMultiLine()&&(l?u=this.getSectionRange(h,o):i!="all"&&(u=null)),u}if(i!=="markbegin"){var d=s.match(this.foldingStopMarker);if(d){var r=d.index+d[0].length;return d[1]?this.closingBracketBlock(h,d[1],o,r):h.getCommentFoldRange(o,r,-1)}}},this.getSectionRange=function(h,i){var o=h.getLine(i),l=o.search(/\S/),s=i,r=o.length;i=i+1;for(var u=i,d=h.getLength();++i<d;){o=h.getLine(i);var g=o.search(/\S/);if(g!==-1){if(l>g)break;var y=this.getFoldWidgetRange(h,"all",i);if(y){if(y.start.row<=s)break;if(y.isMultiLine())i=y.end.row;else if(l==g)break}u=i}}return new f(s,r,u,h.getLine(u).length)},this.getCommentRegionBlock=function(h,i,o){for(var l=i.search(/\s*$/),s=h.getLength(),r=o,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++o<s;){i=h.getLine(o);var g=u.exec(i);if(g&&(g[1]?d--:d++,!d))break}var y=o;if(y>r)return new f(r,l,y,i.length)}}).call(c.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(n,a,v){var p=n("../lib/oop"),f=n("./text").Mode,m=n("./json_highlight_rules").JsonHighlightRules,c=n("./matching_brace_outdent").MatchingBraceOutdent,h=n("./folding/cstyle").FoldMode,i=n("../worker/worker_client").WorkerClient,o=function(){this.HighlightRules=m,this.$outdent=new c,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new h};p.inherits(o,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(l,s,r){var u=this.$getIndent(s);if(l=="start"){var d=s.match(/^.*[\{\(\[]\s*$/);d&&(u+=r)}return u},this.checkOutdent=function(l,s,r){return this.$outdent.checkOutdent(s,r)},this.autoOutdent=function(l,s,r){this.$outdent.autoOutdent(s,r)},this.createWorker=function(l){var s=new i(["ace"],"ace/mode/json_worker","JsonWorker");return s.attachToDocument(l.getDocument()),s.on("annotate",function(r){l.setAnnotations(r.data)}),s.on("terminate",function(){l.clearAnnotations()}),s},this.$id="ace/mode/json"}).call(o.prototype),a.Mode=o}),function(){ace.require(["ace/mode/json"],function(n){e&&(e.exports=n)})}()})(C2);var x2={exports:{}};(function(e,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(n,a,v){v.exports=`
|
|
|
|
/* ------------------------------------------------------------------------------------------
|
|
* Editor Search Form
|
|
* --------------------------------------------------------------------------------------- */
|
|
.ace_search {
|
|
background-color: #ddd;
|
|
color: #666;
|
|
border: 1px solid #cbcbcb;
|
|
border-top: 0 none;
|
|
overflow: hidden;
|
|
margin: 0;
|
|
padding: 4px 6px 0 4px;
|
|
position: absolute;
|
|
top: 0;
|
|
z-index: 99;
|
|
white-space: normal;
|
|
}
|
|
.ace_search.left {
|
|
border-left: 0 none;
|
|
border-radius: 0px 0px 5px 0px;
|
|
left: 0;
|
|
}
|
|
.ace_search.right {
|
|
border-radius: 0px 0px 0px 5px;
|
|
border-right: 0 none;
|
|
right: 0;
|
|
}
|
|
|
|
.ace_search_form, .ace_replace_form {
|
|
margin: 0 20px 4px 0;
|
|
overflow: hidden;
|
|
line-height: 1.9;
|
|
}
|
|
.ace_replace_form {
|
|
margin-right: 0;
|
|
}
|
|
.ace_search_form.ace_nomatch {
|
|
outline: 1px solid red;
|
|
}
|
|
|
|
.ace_search_field {
|
|
border-radius: 3px 0 0 3px;
|
|
background-color: white;
|
|
color: black;
|
|
border: 1px solid #cbcbcb;
|
|
border-right: 0 none;
|
|
outline: 0;
|
|
padding: 0;
|
|
font-size: inherit;
|
|
margin: 0;
|
|
line-height: inherit;
|
|
padding: 0 6px;
|
|
min-width: 17em;
|
|
vertical-align: top;
|
|
min-height: 1.8em;
|
|
box-sizing: content-box;
|
|
}
|
|
.ace_searchbtn {
|
|
border: 1px solid #cbcbcb;
|
|
line-height: inherit;
|
|
display: inline-block;
|
|
padding: 0 6px;
|
|
background: #fff;
|
|
border-right: 0 none;
|
|
border-left: 1px solid #dcdcdc;
|
|
cursor: pointer;
|
|
margin: 0;
|
|
position: relative;
|
|
color: #666;
|
|
}
|
|
.ace_searchbtn:last-child {
|
|
border-radius: 0 3px 3px 0;
|
|
border-right: 1px solid #cbcbcb;
|
|
}
|
|
.ace_searchbtn:disabled {
|
|
background: none;
|
|
cursor: default;
|
|
}
|
|
.ace_searchbtn:hover {
|
|
background-color: #eef1f6;
|
|
}
|
|
.ace_searchbtn.prev, .ace_searchbtn.next {
|
|
padding: 0px 0.7em
|
|
}
|
|
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
|
content: "";
|
|
border: solid 2px #888;
|
|
width: 0.5em;
|
|
height: 0.5em;
|
|
border-width: 2px 0 0 2px;
|
|
display:inline-block;
|
|
transform: rotate(-45deg);
|
|
}
|
|
.ace_searchbtn.next:after {
|
|
border-width: 0 2px 2px 0 ;
|
|
}
|
|
.ace_searchbtn_close {
|
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
|
border-radius: 50%;
|
|
border: 0 none;
|
|
color: #656565;
|
|
cursor: pointer;
|
|
font: 16px/16px Arial;
|
|
padding: 0;
|
|
height: 14px;
|
|
width: 14px;
|
|
top: 9px;
|
|
right: 7px;
|
|
position: absolute;
|
|
}
|
|
.ace_searchbtn_close:hover {
|
|
background-color: #656565;
|
|
background-position: 50% 100%;
|
|
color: white;
|
|
}
|
|
|
|
.ace_button {
|
|
margin-left: 2px;
|
|
cursor: pointer;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-o-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
overflow: hidden;
|
|
opacity: 0.7;
|
|
border: 1px solid rgba(100,100,100,0.23);
|
|
padding: 1px;
|
|
box-sizing: border-box!important;
|
|
color: black;
|
|
}
|
|
|
|
.ace_button:hover {
|
|
background-color: #eee;
|
|
opacity:1;
|
|
}
|
|
.ace_button:active {
|
|
background-color: #ddd;
|
|
}
|
|
|
|
.ace_button.checked {
|
|
border-color: #3399ff;
|
|
opacity:1;
|
|
}
|
|
|
|
.ace_search_options{
|
|
margin-bottom: 3px;
|
|
text-align: right;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-o-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
clear: both;
|
|
}
|
|
|
|
.ace_search_counter {
|
|
float: left;
|
|
font-family: arial;
|
|
padding: 0 8px;
|
|
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(n,a,v){var p=n("../lib/dom"),f=n("../lib/lang"),m=n("../lib/event"),c=n("./searchbox-css"),h=n("../keyboard/hash_handler").HashHandler,i=n("../lib/keys"),o=n("../config").nls,l=999;p.importCssString(c,"ace_searchbox",!1);var s=function(){function d(g,y,x){this.activeInput;var C=p.createElement("div");p.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:o("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},o("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:o("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},o("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},o("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:o("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:o("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:o("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:o("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:o("search-box.toggle-in-selection.title","Search In Selection")},"S"]]],C),this.element=C.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(g),p.importCssString(c,"ace_searchbox",g.container)}return d.prototype.setEditor=function(g){g.searchBox=this,g.renderer.scroller.appendChild(this.element),this.editor=g},d.prototype.setSession=function(g){this.searchRange=null,this.$syncOptions(!0)},d.prototype.$initElements=function(g){this.searchBox=g.querySelector(".ace_search_form"),this.replaceBox=g.querySelector(".ace_replace_form"),this.searchOption=g.querySelector("[action=searchInSelection]"),this.replaceOption=g.querySelector("[action=toggleReplace]"),this.regExpOption=g.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=g.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=g.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=g.querySelector(".ace_search_counter")},d.prototype.$init=function(){var g=this.element;this.$initElements(g);var y=this;m.addListener(g,"mousedown",function(x){setTimeout(function(){y.activeInput.focus()},0),m.stopPropagation(x)}),m.addListener(g,"click",function(x){var C=x.target||x.srcElement,b=C.getAttribute("action");b&&y[b]?y[b]():y.$searchBarKb.commands[b]&&y.$searchBarKb.commands[b].exec(y),m.stopPropagation(x)}),m.addCommandKeyListener(g,function(x,C,b){var w=i.keyCodeToString(b),_=y.$searchBarKb.findKeyCommand(C,w);_&&_.exec&&(_.exec(y),m.stopEvent(x))}),this.$onChange=f.delayedCall(function(){y.find(!1,!1)}),m.addListener(this.searchInput,"input",function(){y.$onChange.schedule(20)}),m.addListener(this.searchInput,"focus",function(){y.activeInput=y.searchInput,y.searchInput.value&&y.highlight()}),m.addListener(this.replaceInput,"focus",function(){y.activeInput=y.replaceInput,y.searchInput.value&&y.highlight()})},d.prototype.setSearchRange=function(g){this.searchRange=g,g?this.searchRangeMarker=this.editor.session.addMarker(g,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},d.prototype.$syncOptions=function(g){p.setCssClass(this.replaceOption,"checked",this.searchRange),p.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",p.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),p.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),p.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var y=this.editor.getReadOnly();this.replaceOption.style.display=y?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!y?"":"none",this.find(!1,!1,g)},d.prototype.highlight=function(g){this.editor.session.highlight(g||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},d.prototype.find=function(g,y,x){var C=this.editor.find(this.searchInput.value,{skipCurrent:g,backwards:y,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:x,range:this.searchRange}),b=!C&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",b),this.editor._emit("findSearchBox",{match:!b}),this.highlight(),this.updateCounter()},d.prototype.updateCounter=function(){var g=this.editor,y=g.$search.$options.re,x=y.unicode,C=0,b=0;if(y){var w=this.searchRange?g.session.getTextRange(this.searchRange):g.getValue(),_=g.session.doc.positionToIndex(g.selection.anchor);this.searchRange&&(_-=g.session.doc.positionToIndex(this.searchRange.start));for(var I=y.lastIndex=0,E;(E=y.exec(w))&&(C++,I=E.index,I<=_&&b++,!(C>l||!E[0]&&(y.lastIndex=I+=f.skipEmptyMatch(w,I,x),I>=w.length))););}this.searchCounter.textContent=o("search-box.search-counter","$0 of $1",[b,C>l?l+"+":C])},d.prototype.findNext=function(){this.find(!0,!1)},d.prototype.findPrev=function(){this.find(!0,!0)},d.prototype.findAll=function(){var g=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),y=!g&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",y),this.editor._emit("findSearchBox",{match:!y}),this.highlight(),this.hide()},d.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},d.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},d.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},d.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},d.prototype.show=function(g,y){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=y,g&&(this.searchInput.value=g),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},d.prototype.isFocused=function(){var g=document.activeElement;return g==this.searchInput||g==this.replaceInput},d}(),r=new h;r.bindKeys({"Ctrl-f|Command-f":function(d){var g=d.isReplace=!d.isReplace;d.replaceBox.style.display=g?"":"none",d.replaceOption.checked=!1,d.$syncOptions(),d.searchInput.focus()},"Ctrl-H|Command-Option-F":function(d){d.editor.getReadOnly()||(d.replaceOption.checked=!0,d.$syncOptions(),d.replaceInput.focus())},"Ctrl-G|Command-G":function(d){d.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(d){d.findPrev()},esc:function(d){setTimeout(function(){d.hide()})},Return:function(d){d.activeInput==d.replaceInput&&d.replace(),d.findNext()},"Shift-Return":function(d){d.activeInput==d.replaceInput&&d.replace(),d.findPrev()},"Alt-Return":function(d){d.activeInput==d.replaceInput&&d.replaceAll(),d.findAll()},Tab:function(d){(d.activeInput==d.replaceInput?d.searchInput:d.replaceInput).focus()}}),r.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(d){d.regExpOption.checked=!d.regExpOption.checked,d.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(d){d.caseSensitiveOption.checked=!d.caseSensitiveOption.checked,d.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(d){d.wholeWordOption.checked=!d.wholeWordOption.checked,d.$syncOptions()}},{name:"toggleReplace",exec:function(d){d.replaceOption.checked=!d.replaceOption.checked,d.$syncOptions()}},{name:"searchInSelection",exec:function(d){d.searchOption.checked=!d.searchRange,d.setSearchRange(d.searchOption.checked&&d.editor.getSelectionRange()),d.$syncOptions()}}]);var u=new h([{bindKey:"Esc",name:"closeSearchBar",exec:function(d){d.searchBox.hide()}}]);s.prototype.$searchBarKb=r,s.prototype.$closeSearchBarKb=u,a.SearchBox=s,a.Search=function(d,g){var y=d.searchBox||new s(d);y.show(d.session.getTextRange(),g)}}),function(){ace.require(["ace/ext/searchbox"],function(n){e&&(e.exports=n)})}()})(x2);var $2={exports:{}};(function(e,t){ace.define("ace/snippets/javascript.snippets",["require","exports","module"],function(n,a,v){v.exports=`# Prototype
|
|
snippet proto
|
|
\${1:class_name}.prototype.\${2:method_name} = function(\${3:first_argument}) {
|
|
\${4:// body...}
|
|
};
|
|
# Function
|
|
snippet fun
|
|
function \${1?:function_name}(\${2:argument}) {
|
|
\${3:// body...}
|
|
}
|
|
# Anonymous Function
|
|
regex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/
|
|
snippet f
|
|
function\${M1?: \${1:functionName}}($2) {
|
|
\${0:$TM_SELECTED_TEXT}
|
|
}\${M2?;}\${M3?,}\${M4?)}
|
|
# Immediate function
|
|
trigger \\(?f\\(
|
|
endTrigger \\)?
|
|
snippet f(
|
|
(function(\${1}) {
|
|
\${0:\${TM_SELECTED_TEXT:/* code */}}
|
|
}(\${1}));
|
|
# if
|
|
snippet if
|
|
if (\${1:true}) {
|
|
\${0}
|
|
}
|
|
# if ... else
|
|
snippet ife
|
|
if (\${1:true}) {
|
|
\${2}
|
|
} else {
|
|
\${0}
|
|
}
|
|
# tertiary conditional
|
|
snippet ter
|
|
\${1:/* condition */} ? \${2:a} : \${3:b}
|
|
# switch
|
|
snippet switch
|
|
switch (\${1:expression}) {
|
|
case '\${3:case}':
|
|
\${4:// code}
|
|
break;
|
|
\${5}
|
|
default:
|
|
\${2:// code}
|
|
}
|
|
# case
|
|
snippet case
|
|
case '\${1:case}':
|
|
\${2:// code}
|
|
break;
|
|
\${3}
|
|
|
|
# while (...) {...}
|
|
snippet wh
|
|
while (\${1:/* condition */}) {
|
|
\${0:/* code */}
|
|
}
|
|
# try
|
|
snippet try
|
|
try {
|
|
\${0:/* code */}
|
|
} catch (e) {}
|
|
# do...while
|
|
snippet do
|
|
do {
|
|
\${2:/* code */}
|
|
} while (\${1:/* condition */});
|
|
# Object Method
|
|
snippet :f
|
|
regex /([,{[])|^\\s*/:f/
|
|
\${1:method_name}: function(\${2:attribute}) {
|
|
\${0}
|
|
}\${3:,}
|
|
# setTimeout function
|
|
snippet setTimeout
|
|
regex /\\b/st|timeout|setTimeo?u?t?/
|
|
setTimeout(function() {\${3:$TM_SELECTED_TEXT}}, \${1:10});
|
|
# Get Elements
|
|
snippet gett
|
|
getElementsBy\${1:TagName}('\${2}')\${3}
|
|
# Get Element
|
|
snippet get
|
|
getElementBy\${1:Id}('\${2}')\${3}
|
|
# console.log (Firebug)
|
|
snippet cl
|
|
console.log(\${1});
|
|
# return
|
|
snippet ret
|
|
return \${1:result}
|
|
# for (property in object ) { ... }
|
|
snippet fori
|
|
for (var \${1:prop} in \${2:Things}) {
|
|
\${0:$2[$1]}
|
|
}
|
|
# hasOwnProperty
|
|
snippet has
|
|
hasOwnProperty(\${1})
|
|
# docstring
|
|
snippet /**
|
|
/**
|
|
* \${1:description}
|
|
*
|
|
*/
|
|
snippet @par
|
|
regex /^\\s*\\*\\s*/@(para?m?)?/
|
|
@param {\${1:type}} \${2:name} \${3:description}
|
|
snippet @ret
|
|
@return {\${1:type}} \${2:description}
|
|
# JSON.parse
|
|
snippet jsonp
|
|
JSON.parse(\${1:jstr});
|
|
# JSON.stringify
|
|
snippet jsons
|
|
JSON.stringify(\${1:object});
|
|
# self-defining function
|
|
snippet sdf
|
|
var \${1:function_name} = function(\${2:argument}) {
|
|
\${3:// initial code ...}
|
|
|
|
$1 = function($2) {
|
|
\${4:// main code}
|
|
};
|
|
}
|
|
# singleton
|
|
snippet sing
|
|
function \${1:Singleton} (\${2:argument}) {
|
|
// the cached instance
|
|
var instance;
|
|
|
|
// rewrite the constructor
|
|
$1 = function $1($2) {
|
|
return instance;
|
|
};
|
|
|
|
// carry over the prototype properties
|
|
$1.prototype = this;
|
|
|
|
// the instance
|
|
instance = new $1();
|
|
|
|
// reset the constructor pointer
|
|
instance.constructor = $1;
|
|
|
|
\${3:// code ...}
|
|
|
|
return instance;
|
|
}
|
|
# class
|
|
snippet class
|
|
regex /^\\s*/clas{0,2}/
|
|
var \${1:class} = function(\${20}) {
|
|
$40$0
|
|
};
|
|
|
|
(function() {
|
|
\${60:this.prop = ""}
|
|
}).call(\${1:class}.prototype);
|
|
|
|
exports.\${1:class} = \${1:class};
|
|
#
|
|
snippet for-
|
|
for (var \${1:i} = \${2:Things}.length; \${1:i}--; ) {
|
|
\${0:\${2:Things}[\${1:i}];}
|
|
}
|
|
# for (...) {...}
|
|
snippet for
|
|
for (var \${1:i} = 0; $1 < \${2:Things}.length; $1++) {
|
|
\${3:$2[$1]}$0
|
|
}
|
|
# for (...) {...} (Improved Native For-Loop)
|
|
snippet forr
|
|
for (var \${1:i} = \${2:Things}.length - 1; $1 >= 0; $1--) {
|
|
\${3:$2[$1]}$0
|
|
}
|
|
|
|
|
|
#modules
|
|
snippet def
|
|
define(function(require, exports, module) {
|
|
"use strict";
|
|
var \${1/.*\\///} = require("\${1}");
|
|
|
|
$TM_SELECTED_TEXT
|
|
});
|
|
snippet req
|
|
guard ^\\s*
|
|
var \${1/.*\\///} = require("\${1}");
|
|
$0
|
|
snippet requ
|
|
guard ^\\s*
|
|
var \${1/.*\\/(.)/\\u$1/} = require("\${1}").\${1/.*\\/(.)/\\u$1/};
|
|
$0
|
|
`}),ace.define("ace/snippets/javascript",["require","exports","module","ace/snippets/javascript.snippets"],function(n,a,v){a.snippetText=n("./javascript.snippets"),a.scope="javascript"}),function(){ace.require(["ace/snippets/javascript"],function(n){e&&(e.exports=n)})}()})($2);var S2={exports:{}};(function(e,t){(function(){ace.require(["ace/snippets/json"],function(n){e&&(e.exports=n)})})()})(S2);var k2={exports:{}};(function(e,t){ace.define("ace/theme/tomorrow_night-css",["require","exports","module"],function(n,a,v){v.exports=`.ace-tomorrow-night .ace_gutter {
|
|
background: #25282c;
|
|
color: #C5C8C6
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_print-margin {
|
|
width: 1px;
|
|
background: #25282c
|
|
}
|
|
|
|
.ace-tomorrow-night {
|
|
background-color: #1D1F21;
|
|
color: #C5C8C6
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_cursor {
|
|
color: #AEAFAD
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_marker-layer .ace_selection {
|
|
background: #373B41
|
|
}
|
|
|
|
.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {
|
|
box-shadow: 0 0 3px 0px #1D1F21;
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_marker-layer .ace_step {
|
|
background: rgb(102, 82, 0)
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_marker-layer .ace_bracket {
|
|
margin: -1px 0 0 -1px;
|
|
border: 1px solid #4B4E55
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_marker-layer .ace_active-line {
|
|
background: #282A2E
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_gutter-active-line {
|
|
background-color: #282A2E
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_marker-layer .ace_selected-word {
|
|
border: 1px solid #373B41
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_invisible {
|
|
color: #4B4E55
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_keyword,
|
|
.ace-tomorrow-night .ace_meta,
|
|
.ace-tomorrow-night .ace_storage,
|
|
.ace-tomorrow-night .ace_storage.ace_type,
|
|
.ace-tomorrow-night .ace_support.ace_type {
|
|
color: #B294BB
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_keyword.ace_operator {
|
|
color: #8ABEB7
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_constant.ace_character,
|
|
.ace-tomorrow-night .ace_constant.ace_language,
|
|
.ace-tomorrow-night .ace_constant.ace_numeric,
|
|
.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,
|
|
.ace-tomorrow-night .ace_support.ace_constant,
|
|
.ace-tomorrow-night .ace_variable.ace_parameter {
|
|
color: #DE935F
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_constant.ace_other {
|
|
color: #CED1CF
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_invalid {
|
|
color: #CED2CF;
|
|
background-color: #DF5F5F
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_invalid.ace_deprecated {
|
|
color: #CED2CF;
|
|
background-color: #B798BF
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_fold {
|
|
background-color: #81A2BE;
|
|
border-color: #C5C8C6
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_entity.ace_name.ace_function,
|
|
.ace-tomorrow-night .ace_support.ace_function,
|
|
.ace-tomorrow-night .ace_variable {
|
|
color: #81A2BE
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_support.ace_class,
|
|
.ace-tomorrow-night .ace_support.ace_type {
|
|
color: #F0C674
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_heading,
|
|
.ace-tomorrow-night .ace_markup.ace_heading,
|
|
.ace-tomorrow-night .ace_string {
|
|
color: #B5BD68
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_entity.ace_name.ace_tag,
|
|
.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,
|
|
.ace-tomorrow-night .ace_meta.ace_tag,
|
|
.ace-tomorrow-night .ace_string.ace_regexp,
|
|
.ace-tomorrow-night .ace_variable {
|
|
color: #CC6666
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_comment {
|
|
color: #969896
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_indent-guide {
|
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y
|
|
}
|
|
|
|
.ace-tomorrow-night .ace_indent-guide-active {
|
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
}
|
|
`}),ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/theme/tomorrow_night-css","ace/lib/dom"],function(n,a,v){a.isDark=!0,a.cssClass="ace-tomorrow-night",a.cssText=n("./tomorrow_night-css");var p=n("../lib/dom");p.importCssString(a.cssText,a.cssClass,!1)}),function(){ace.require(["ace/theme/tomorrow_night"],function(n){e&&(e.exports=n)})}()})(k2);var _2={exports:{}};(function(e,t){ace.define("ace/theme/chrome-css",["require","exports","module"],function(n,a,v){v.exports=`.ace-chrome .ace_gutter {
|
|
background: #ebebeb;
|
|
color: #333;
|
|
overflow : hidden;
|
|
}
|
|
|
|
.ace-chrome .ace_print-margin {
|
|
width: 1px;
|
|
background: #e8e8e8;
|
|
}
|
|
|
|
.ace-chrome {
|
|
background-color: #FFFFFF;
|
|
color: black;
|
|
}
|
|
|
|
.ace-chrome .ace_cursor {
|
|
color: black;
|
|
}
|
|
|
|
.ace-chrome .ace_invisible {
|
|
color: rgb(191, 191, 191);
|
|
}
|
|
|
|
.ace-chrome .ace_constant.ace_buildin {
|
|
color: rgb(88, 72, 246);
|
|
}
|
|
|
|
.ace-chrome .ace_constant.ace_language {
|
|
color: rgb(88, 92, 246);
|
|
}
|
|
|
|
.ace-chrome .ace_constant.ace_library {
|
|
color: rgb(6, 150, 14);
|
|
}
|
|
|
|
.ace-chrome .ace_invalid {
|
|
background-color: rgb(153, 0, 0);
|
|
color: white;
|
|
}
|
|
|
|
.ace-chrome .ace_fold {
|
|
}
|
|
|
|
.ace-chrome .ace_support.ace_function {
|
|
color: rgb(60, 76, 114);
|
|
}
|
|
|
|
.ace-chrome .ace_support.ace_constant {
|
|
color: rgb(6, 150, 14);
|
|
}
|
|
|
|
.ace-chrome .ace_support.ace_type,
|
|
.ace-chrome .ace_support.ace_class
|
|
.ace-chrome .ace_support.ace_other {
|
|
color: rgb(109, 121, 222);
|
|
}
|
|
|
|
.ace-chrome .ace_variable.ace_parameter {
|
|
font-style:italic;
|
|
color:#FD971F;
|
|
}
|
|
.ace-chrome .ace_keyword.ace_operator {
|
|
color: rgb(104, 118, 135);
|
|
}
|
|
|
|
.ace-chrome .ace_comment {
|
|
color: #236e24;
|
|
}
|
|
|
|
.ace-chrome .ace_comment.ace_doc {
|
|
color: #236e24;
|
|
}
|
|
|
|
.ace-chrome .ace_comment.ace_doc.ace_tag {
|
|
color: #236e24;
|
|
}
|
|
|
|
.ace-chrome .ace_constant.ace_numeric {
|
|
color: rgb(0, 0, 205);
|
|
}
|
|
|
|
.ace-chrome .ace_variable {
|
|
color: rgb(49, 132, 149);
|
|
}
|
|
|
|
.ace-chrome .ace_xml-pe {
|
|
color: rgb(104, 104, 91);
|
|
}
|
|
|
|
.ace-chrome .ace_entity.ace_name.ace_function {
|
|
color: #0000A2;
|
|
}
|
|
|
|
|
|
.ace-chrome .ace_heading {
|
|
color: rgb(12, 7, 255);
|
|
}
|
|
|
|
.ace-chrome .ace_list {
|
|
color:rgb(185, 6, 144);
|
|
}
|
|
|
|
.ace-chrome .ace_marker-layer .ace_selection {
|
|
background: rgb(181, 213, 255);
|
|
}
|
|
|
|
.ace-chrome .ace_marker-layer .ace_step {
|
|
background: rgb(252, 255, 0);
|
|
}
|
|
|
|
.ace-chrome .ace_marker-layer .ace_stack {
|
|
background: rgb(164, 229, 101);
|
|
}
|
|
|
|
.ace-chrome .ace_marker-layer .ace_bracket {
|
|
margin: -1px 0 0 -1px;
|
|
border: 1px solid rgb(192, 192, 192);
|
|
}
|
|
|
|
.ace-chrome .ace_marker-layer .ace_active-line {
|
|
background: rgba(0, 0, 0, 0.07);
|
|
}
|
|
|
|
.ace-chrome .ace_gutter-active-line {
|
|
background-color : #dcdcdc;
|
|
}
|
|
|
|
.ace-chrome .ace_marker-layer .ace_selected-word {
|
|
background: rgb(250, 250, 255);
|
|
border: 1px solid rgb(200, 200, 250);
|
|
}
|
|
|
|
.ace-chrome .ace_storage,
|
|
.ace-chrome .ace_keyword,
|
|
.ace-chrome .ace_meta.ace_tag {
|
|
color: rgb(147, 15, 128);
|
|
}
|
|
|
|
.ace-chrome .ace_string.ace_regex {
|
|
color: rgb(255, 0, 0)
|
|
}
|
|
|
|
.ace-chrome .ace_string {
|
|
color: #1A1AA6;
|
|
}
|
|
|
|
.ace-chrome .ace_entity.ace_other.ace_attribute-name {
|
|
color: #994409;
|
|
}
|
|
|
|
.ace-chrome .ace_indent-guide {
|
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
}
|
|
|
|
.ace-chrome .ace_indent-guide-active {
|
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
}
|
|
`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(n,a,v){a.isDark=!1,a.cssClass="ace-chrome",a.cssText=n("./chrome-css");var p=n("../lib/dom");p.importCssString(a.cssText,a.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(n){e&&(e.exports=n)})}()})(_2);const M2={__name:"index",props:{mode:{default:"json",type:String},modelValue:{type:String,default:""},showLineNumbers:{type:Boolean,default:!1},showGutter:{type:Boolean,default:!1},height:{type:String,default:"500px"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,v=le(()=>ht.value?"tomorrow_night":"chrome"),p=le({get(){return n.modelValue},set(f){a("update:modelValue",f)}});return(f,m)=>(Q(),be(B(w2),{value:B(p),"onUpdate:value":m[0]||(m[0]=c=>qe(p)?p.value=c:null),lang:e.mode,theme:B(v),style:Wt({height:e.height,borderRadius:"4px"}),options:{fontSize:14,tabSize:2,showPrintMargin:!1,showGutter:e.showGutter,showLineNumbers:e.showLineNumbers,highlightActiveLine:!0}},null,8,["value","lang","theme","style","options"]))}},ps=ce({__name:"Ruler",props:{options:{default:()=>({offsetX:0,offsetY:0,scale:.63})},mode:null},setup(e){const t=e,n=Y(ht),a=Y(),v=le(()=>({width:t.mode==="horizontal"?"100%":"30px",height:t.mode==="horizontal"?"30px":"100%",backgroundColor:n.value?"#181818":"white",zIndex:996,display:"block",position:"absolute",top:"0px",left:"0px",cursor:t.mode==="horizontal"?"row-resize":"col-resize"}));function p(h){const i=String(h).indexOf("."),o=String(h).length;return i<0?0:o-i-1}function f(h){return Math.abs(h-Math.round(h))<1e-7}function m(h){return h<=1?100:h<=3?50:h<=4?20:h<=5?10:5}function c(){const h=a.value;if(!h)return;const{width:i,height:o}=h.getBoundingClientRect(),l=2;h.width=i*l,h.height=o*l,h.style.width=`${i}px`,h.style.height=`${o}px`;let{width:s,height:r}=h;s/=l,r/=l;const u=h.getContext("2d");u.scale(l,l),u.clearRect(0,0,s,r),u.save(),u.lineWidth=1,u.strokeStyle=n.value?"#f5f6f7":"#d9d9d9",u.fillStyle=n.value?"#ffffff":"#232323",u.font="12px serif",u.beginPath();const{offsetX:d,offsetY:g,scale:y}=t.options,x=t.mode==="horizontal"?d:g,C=m(y),b=10,w=y*C,_=w/b,I=p(C);let E=x%_>0?_-x%_:-x%_;if(t.mode==="horizontal"){u.translate(29.5,0);do{const k=(x+E)/w*C;if(f(k/C)){u.moveTo(E,r*.5),u.lineTo(E,r);const A=k.toFixed(I),S=u.measureText(A).width;u.fillText(A,E-S/2,10)}else u.moveTo(E,r*.7),u.lineTo(E,r);E+=_}while(E<s)}else{u.translate(0,-.5);do{const k=(x+E)/w*C;if(f(k/C)){u.moveTo(s*.5,E),u.lineTo(s,E);const A=k.toFixed(I);u.save(),u.rotate(-90*Math.PI/180);const S=u.measureText(A).width;u.fillText(A,-(E+S/2),12),u.rotate(0*Math.PI/180),u.restore()}else u.moveTo(s*.7,E),u.lineTo(s,E);E+=_}while(E<r)}u.closePath(),u.stroke(),u.restore()}return window.addEventListener("message",h=>{mu(h.data)&&(JSON.parse(h.data||"{}").isDark===!0?(n.value=!0,c()):(n.value=!1,c()))}),me(n,c),me(()=>t.options,c,{deep:!0}),ot(c),(h,i)=>(Q(),ie("canvas",{ref_key:"widthways",ref:a,style:Wt(v.value)},null,4))}}),A2=ce({__name:"Line",props:{id:null,lineDirection:null,position:null},emits:["delete"],setup(e,{emit:t}){const n=e,a=t,{position:v}=xe(n),p=Y(null);let f=0,m=0,c=null,h=null;const i=Y(!0),o=Y(0);me(()=>n.position,I=>{n.lineDirection==="horizontal"?(f=I.y,m=I.y):(f=I.x,m=I.x)},{immediate:!0});let l={x:0,y:0};const s=I=>{const E=/matrix\([^,]+, [^,]+, [^,]+, [^,]+, ([^,]+), ([^,]+)/,k=I.match(E);if(k){const A=parseFloat(k[1]),S=parseFloat(k[2]);return{x:A,y:S}}},r=jn();me(()=>r.getScale,({scaleX:I,scaleY:E},{scaleX:k})=>{if(m!==0){let A=null;if(n.lineDirection==="horizontal"){const S=I/k;A=l.y+(f-l.y)*S}else{const S=I/k;A=l.x+(f-l.x)*S}f=A,n.lineDirection==="horizontal"?p.value.style.transform=`translate(0px, ${A}px)`:p.value.style.transform=`translate(${A}px, 0px)`}},{deep:!0});const u=I=>{const E=I.clientY-h.top,k=I.clientX-h.left;if(n.lineDirection==="horizontal"){const A=E;p.value.style.transform=`translate(0px, ${A}px)`,f=E,m=E,o.value=Math.round((A-l.y)/r.getScale.scaleX)}else{const A=k;p.value.style.transform=`translate(${A}px, 0px)`,f=k,m=k,o.value=Math.round((A-l.x)/r.getScale.scaleX)}},d=I=>{h&&u(I)},g=I=>{u(I),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",g),(n.lineDirection==="horizontal"&&f<=30||n.lineDirection==="vertical"&&f<=30)&&a("delete",n.id)},y=I=>{if(!i.value)return;const E=I.clientY-h.top,k=I.clientX-h.left;let A=!1;(n.lineDirection==="horizontal"&&Math.abs(E-f)<=10||n.lineDirection==="vertical"&&Math.abs(k-f)<=10)&&(A=!0),A&&(document.addEventListener("mousemove",d),document.addEventListener("mouseup",g))},x=()=>{a("delete",n.id)},C=()=>{i.value=!i.value};ot(()=>{document.addEventListener("mousedown",y),c=document.querySelector(".diagram-wrapper"),h=c.getBoundingClientRect();const I=document.getElementById("diagram");l=s(I.style.transform),p.value.addEventListener("dblclick",C)}),_n(()=>{p.value.removeEventListener("dblclick",C)}),Fn(()=>{document.removeEventListener("mousedown",y)});const b=Y("red");me(ht,I=>{b.value="red"});const w=le(()=>n.lineDirection==="horizontal"?{width:"100%",height:0,borderTop:"1px solid #00ffff",transform:`translate(${v.value.x}px, ${v.value.y}px)`,cursor:"n-resize"}:{height:"100%",width:0,borderLeft:"1px solid #00ffff",transform:`translate(${v.value.x}px, ${v.value.y}px)`,cursor:"e-resize"}),_=le(()=>n.lineDirection==="horizontal"?{position:"absolute",left:"2%",top:"-8px",color:"red"}:{position:"absolute",top:"4%",left:"-8px",color:"red"});return(I,E)=>(Q(),ie("div",{ref_key:"refline",ref:p,class:"guideline",style:Wt(B(w))},[D(B(wd),{style:Wt(B(_)),onClick:x},null,8,["style"])],4))}});const Mi=it(A2,[["__scopeId","data-v-347dc6f3"]]),gs=(e,t,n,a,v)=>{const p=document.querySelector(e);let f=!1,m=!1;const c=d=>{t==="horizontal"?n.value.y=d.offsetY:n.value.x=d.offsetX},h=document.querySelector(".diagram-wrapper"),i=d=>{const g=h.getBoundingClientRect(),y=d.clientY-g.top,x=d.clientX-g.left;m&&!f&&(t==="horizontal"?n.value.y=y:n.value.x=x)},o=d=>{i(d)},l=d=>{if(i(d),document.removeEventListener("mousemove",o,!0),document.removeEventListener("mouseup",l,!0),m=!1,f=!1,a.value=!1,t==="horizontal"&&n.value.y<=30){n.value.y=0;return}else if(t==="vertical"&&n.value.x<=30){n.value.x=0;return}v.value.push({id:St(),direction:t,pos:{x:t==="horizontal"?0:n.value.x,y:t==="horizontal"?n.value.y:0}}),t==="horizontal"?n.value.y=0:n.value.x=0},s=d=>{f=!1,document.addEventListener("mousemove",o,!0),document.addEventListener("mouseup",l,!0)},r=d=>{a.value=!1,f=!1,m=!1,p.removeEventListener("mousemove",c,!0),p.removeEventListener("mouseleave",s,!0),p.removeEventListener("mouseup",r,!0)};function u(d){t==="horizontal"?n.value.y=d.offsetY:n.value.x=d.offsetX,a.value=!0,f=!0,m=!0,p.addEventListener("mousemove",c,!0),p.addEventListener("mouseup",r,!0),p.addEventListener("mouseleave",s,!0)}p.addEventListener("mousedown",u,!0)},L2=ce({__name:"opetationTips",setup(e){const t=Y(!1);return(n,a)=>{const v=Eo,p=Bt,f=en;return Q(),ie(Fe,null,[D(p,{open:B(t),"onUpdate:open":a[0]||(a[0]=m=>qe(t)?t.value=m:null),class:kt(["custom-modal-scrollbar",{"dark-modal":B(ht)}]),title:"操作提示","ok-text":"确认","body-style":{height:"500px","overflow-y":"auto"},"ancel-text":"取消"},{default:U(()=>[a[2]||(a[2]=z("p",{style:{"font-weight":"bold"}}," 画布操作: ",-1)),a[3]||(a[3]=z("p",null,"1. 鼠标向上滚动 --- 画布放大",-1)),a[4]||(a[4]=z("p",null,"2. 鼠标向下滚动 --- 画布缩小",-1)),a[5]||(a[5]=z("p",null,"3. alt 按键 + 画布鼠标移动 --- 画布拖拽",-1)),a[6]||(a[6]=z("p",null,"4. ctrl + c --- 复制元素",-1)),a[7]||(a[7]=z("p",null,"5. ctrl + v --- 粘贴元素",-1)),a[8]||(a[8]=z("p",null,"6. delete --- 删除元素",-1)),D(v),a[9]||(a[9]=z("p",null," 绘制线段: ",-1)),a[10]||(a[10]=z("p",null,'选中工具栏 "自由绘制连线" 后',-1)),a[11]||(a[11]=z("p",null,"1. 单击 ----- 开始画线",-1)),a[12]||(a[12]=z("p",null,"2. 画直线 ----- 按住ctrl键(不松开) + 拖动, 单击结束一段, 继续拖动,单击.., 最后松开ctrl键, 双击结束画线。",-1)),a[13]||(a[13]=z("p",null,"3. 双击 --- 结束画线",-1)),a[14]||(a[14]=z("p",null,"4. 双击线段 --- 在线段上添加拐点",-1)),a[15]||(a[15]=z("p",null,"5. 双击拐点 --- 删除拐点",-1)),a[16]||(a[16]=z("p",null,"6. 鼠标放在线段上按下 --- 拖拽线段 ",-1)),a[17]||(a[17]=z("p",null,"7. 线段右键 --- 复制和删除线段 ",-1)),a[18]||(a[18]=z("p",null,"8. 移动红点(非首个)时吸附为直线 --- 按住ctrl键(不松开) + 拖动, 移动到直线边缘,松开鼠标,会自动吸附为直线。",-1)),a[19]||(a[19]=z("p",{style:{"font-weight":"bold"}}," 辅助线: ",-1)),a[20]||(a[20]=z("p",null,"1. 从标尺拖出辅助线",-1)),a[21]||(a[21]=z("p",null,"2. 双击辅助线可以 【锁定/解锁】辅助线",-1)),a[22]||(a[22]=z("p",{style:{"font-weight":"bold"}}," 框选: ",-1)),a[23]||(a[23]=z("p",null,"1. 按下 shift 键(立马放开),即可开启【框选画布元素】功能",-1)),a[24]||(a[24]=z("p",null,"2. 按住 shift 键(不放开),连续点击多个元素,即可多选。",-1))]),_:1},8,["open","class"]),D(f,{class:"fixed bottom-5 left-95 z-1000"},{title:U(()=>a[25]||(a[25]=[ve(" 画布操作提示 ")])),default:U(()=>[z("div",{style:{width:"30px",height:"30px","line-height":"30px","border-radius":"50%","background-color":"#1890ff",cursor:"pointer"},class:"justify-center items-center",onClick:a[1]||(a[1]=m=>t.value=!0)},[D(B(bg),{style:{color:"#ffffff",cursor:"pointer"}})])]),_:1})],64)}}}),E2=ce({__name:"CirclePointOverlay",props:{edgeId:null,point:null,pointIndex:null,canvasClient:null},emits:["updatePoint"],setup(e,{emit:t}){const n=e,a=t,v=Y(null),p=Lt("lf"),f=Y("transform: translate(0px, 0px)"),m=Y("20px"),c=Y(!1);let h=null;const{canvasClient:i}=xe(n),o={x:0,y:0},l=_=>{const I=parseInt(m.value),{transformModel:E}=p.value.graphModel,k=E.CanvasPointToHtmlPoint([_.x,_.y]),A=`${k[0]-I/2}`,S=`${k[1]-I/2}`;f.value=`transform: translate(${A}px, ${S}px)`,o.x=A,o.y=S,m.value=`${I}px`,c.value=!0};me(()=>n.point,_=>{l(_)},{immediate:!0});let s=!1;const r=_=>{if(h){const I=_.clientX,E=_.clientY,k=I-i.value.x-10,A=E-i.value.y-10;f.value=`transform: translate(${k}px, ${A}px)`,o.x=k,o.y=A;const S=p.value;h.draggable=!1,h.isMoving=!0;let M="";const $=S.getPointByClient(I,E),{x:L,y:T}=$.canvasOverlayPosition;h.pointsList[n.pointIndex]={x:L,y:T},h.pointsList.forEach(R=>{M+=`${R.x},${R.y} `}),h.points=M.trimEnd()}},u=()=>{if(!h)return;const _=p.value,I={x:h.pointsList[0].x,y:h.pointsList[0].y},E={x:h.pointsList[h.pointsList.length-1].x,y:h.pointsList[h.pointsList.length-1].y};h.startPoint=I,h.endPoint=E;const{sourceNodeId:k,targetNodeId:A}=h,S=_.getNodeModelById(k),M=_.getNodeModelById(A);S.x=I.x,S.y=I.y,S.properties.x=I.x,S.properties.y=I.y,M.x=E.x,M.y=E.y,M.properties.x=E.x,M.properties.y=E.y},d=_=>{_.preventDefault()},g=_=>{r(_)},y=_=>{if(v.value){if(v.value.removeEventListener("drag",r),v.value.removeEventListener("dragover",d),v.value.removeEventListener("drop",g),v.value.removeEventListener("dragend",y),r(_),h.isMoving=!1,h.draggable=!0,s){const I=[0,45,90,180,270,360],E=h.pointsList[n.pointIndex-1],k=h.pointsList[n.pointIndex];if(E){const A=k.x-E.x,S=k.y-E.y;let M=Math.atan2(S,A)*180/Math.PI;M<0&&(M+=360);let $=0;for(const P of I)(!$||Math.abs(M-P)<Math.abs(M-$))&&($=P);const L=Math.sqrt(A*A+S*S),T=$*Math.PI/180;k.x=E.x+L*Math.cos(T),k.y=E.y+L*Math.sin(T);let R="";h.pointsList.forEach(P=>{R+=`${P.x},${P.y} `}),h.points=R.trimEnd(),l({x:k.x,y:k.y})}}a("updatePoint",h)}},x=_=>{s=_.ctrlKey,h.isMoving=!0,v.value&&(v.value.addEventListener("drag",r),v.value.addEventListener("dragover",d),v.value.addEventListener("drop",g),v.value.addEventListener("dragend",y),u())},C=()=>{h&&h.isMoving||h&&(h.isMoving=!1)},b=_=>{if(h){if(h.pointsList.length===2)return ye.warning("连线至少保留两个点");h.pointsList.splice(n.pointIndex,1);let I="";h.pointsList.forEach(E=>{I+=`${E.x},${E.y} `}),h.points=I.trimEnd(),u(),c.value=!1}},w=_=>{var S,M;const{clientX:I,clientY:E}=_,k=I-i.value.x,A=E-i.value.y;k-Number(o.x)<=13&&A-Number(o.y)<=13?(S=v.value)==null||S.classList.add("hover-on"):(M=v.value)==null||M.classList.remove("hover-on")};return ot(()=>{h=p.value.getEdgeModelById(n.edgeId),v.value&&(v.value.addEventListener("mousemove",w,!0),v.value.addEventListener("dragstart",x),v.value.addEventListener("mouseleave",C),v.value.addEventListener("dblclick",b))}),Fn(()=>{v.value&&(v.value.removeEventListener("mousemove",w,!0),v.value.removeEventListener("dragstart",x),v.value.removeEventListener("mouseleave",C),v.value.removeEventListener("dblclick",b))}),(_,I)=>at((Q(),ie("div",{ref_key:"el",ref:v,draggable:"true",class:"circlePointOverlay",style:Wt(f.value)},null,4)),[[dt,c.value]])}});const I2=it(E2,[["__scopeId","data-v-dac27893"]]),{moveToFront:ms,moveToBack:vs,moveToTop:ys,moveToBottom:ws}=na(),Ai=jn(),T2=ce({name:"DownloadModes",props:["modelValue"],emits:["update:modelValue"],setup(e,{emit:t}){const n=Y("picture");return()=>Kn("div",null,{default:()=>[Kn("p","下载图片前,请确保所有控件在可视区域内!(svg 下载模式下,【不可包含canvas】渲染的部件, 自定义按钮或其它自定义部件在服务器环境下会显示。)"),Kn(oo,{value:n.value,onChange:a=>{n.value=a.target.value,t("update:modelValue",a.target.value)}},{default:()=>[Kn(xo,{value:"picture"},()=>"图片下载"),Kn(xo,{value:"svg"},()=>"svg下载")]})]})}});function D2(e,t,n,a,v,p,f,m,c){const h=Y(!1),i=Y(null),o=Y(!1),l=Y(!0),s=Y("picture");let r=[];const u=(x,C)=>{const b=Xs(C);b&&(x.graphModel.nodes.forEach(w=>{if(w.type==="helper-circle-point")return;const _={x:w.x-w.width/2,y:w.y-w.height/2,width:w.width,height:w.height};Ot(_,b)&&r.push(w)}),x.graphModel.edges.forEach(w=>{if(w.modelType!=="line-edge"){const _=w.pointsList[0],I=w.pointsList[w.pointsList.length-1],E=Math.abs(I.x-_.x),k=Math.abs(I.y-_.y),A={x:_.x<I.x?_.x:I.x,y:_.y<I.y?_.y:I.y,width:E,height:k};Ot(A,b)&&r.push(w)}else{const _={x:w.startPoint.x<w.endPoint.x?w.startPoint.x:w.endPoint.x,y:w.startPoint.y<w.endPoint.y?w.startPoint.y:w.endPoint.y,width:Math.abs(w.startPoint.x-w.endPoint.x),height:Math.abs(w.startPoint.y-w.endPoint.y)};Ot(_,b)&&r.push(w)}}))},d=()=>{const x=e.value,C=x.getGraphData();C.nodes.forEach(b=>{const w=x.getNodeModelById(b.id);w.visible=!0,x.setProperties(b.id,{visible:w.visible})}),C.edges.forEach(b=>{const w=x.getEdgeModelById(b.id);w.visible=!0})},g=()=>{const x=e.value,C=x.getGraphData();C.nodes.forEach(b=>{const w=x.getNodeModelById(b.id);w.visible=!1,x.setProperties(b.id,{visible:w.visible})}),C.edges.forEach(b=>{const w=x.getEdgeModelById(b.id);w.visible=!1}),m.value={}};return Ct({actionHandler:x=>{const C=e.value,b=Un(),{editConfigModel:w}=C.graphModel,{nodes:_}=C.getSelectElements(),I=C.getGraphData(),{scaleX:E,scaleY:k}=Ai.getScale,A=C.graphModel.transformModel,S=C.getTransform(),M=C.getSelectElements();f.value=!1,r=[];const $=()=>{const{editConfigModel:T}=C.graphModel;T.updateEditConfig({hideAnchors:!1})},L=T=>{r.length===1&&r[0].id===T.id&&(r=[].concat(I.nodes).concat(I.edges).map(P=>C.getModelById(P.id)))};switch(x){case"scaleOneByOne":if(_.length===0)return ye.warning("请选择节点!");_.forEach(T=>{const R=C.getNodeModelById(T.id);if(R.scaleOneByOne)try{R.enableProportionResize(!1),R.scaleOneByOne=!1}catch{}else try{R.enableProportionResize(),R.scaleOneByOne=!0}catch{}});break;case"fullscreen":t.value=!t.value,n(),C.resize(v.value.width,v.value.height),A.SCALE_X=1,A.SCALE_Y=1,Ai.setScale(1,1),function(){const T=document.getElementById("diagram");T.style.transform="matrix(1, 0, 0, 1, 0, 0)",setTimeout(()=>{m.value={};const{left:R,top:P}=T==null?void 0:T.getBoundingClientRect();c.value.x=R,c.value.y=P},100)}();break;case"moveToFront":if(M.nodes.length===0&&M.edges.length===0)return ye.warning("请选择元素");u(C,M),M.nodes.forEach(T=>{L(T),ms(C,T,r)}),M.edges.forEach(T=>{L(T),ms(C,T,r)});break;case"moveToBack":if(M.nodes.length===0&&M.edges.length===0)return ye.warning("请选择元素");u(C,M),M.nodes.forEach(T=>{L(T),vs(C,T,r)}),M.edges.forEach(T=>{L(T),vs(C,T,r)});break;case"moveToTop":if(M.nodes.length===0&&M.edges.length===0)return ye.warning("请选择元素");M.nodes.forEach(T=>{ys(C,T)}),M.edges.forEach(T=>{ys(C,T)});break;case"moveToBottom":if(M.nodes.length===0&&M.edges.length===0)return ye.warning("请选择元素");M.nodes.forEach(T=>{ws(C,T)}),M.edges.forEach(T=>{ws(C,T)});break;case"viewAll":l.value?g():d(),l.value=!l.value;break;case"lockAllOrNot":o.value?o.value=!1:o.value=!0,I.nodes.forEach(T=>{const R=C.getNodeModelById(T.id);R.draggable=!o.value,R.editable=!o.value,R.isHitable=!o.value}),I.edges.forEach(T=>{const R=C.getEdgeModelById(T.id);R.draggable=!o.value,R.editable=!o.value,R.isHitable=!o.value}),o.value&&(m.value={}),b.set(I);break;case"selectionBatch":C.clearSelectElements(),w.updateEditConfig({stopMoveGraph:!0}),C.extension.selectionSelect.openSelectionSelect();break;case"makeGroup":if(p.value.length===0)return ye.warning("请框选部件");if(x==="makeGroup"){const T=C.getSelectElements(),R=document.querySelector(".lf-multiple-select"),{left:P,top:F,width:O,height:N}=getComputedStyle(R),V=T.nodes.map(K=>K.id),H=T.edges.map(K=>K.id);if(H.length>0)return ye.warning("连线/画线不支持加入编组");const W=V.concat(H),{transformModel:j}=C.graphModel,Z=j.HtmlPointToCanvasPoint([parseInt(P),parseInt(F)]),q=j.HtmlPointToCanvasPoint([parseInt(O),parseInt(N)]),G=St();C.graphModel.addNode({id:G,type:"default-group",x:Z[0]+q[0]/2,y:Z[1]+q[1]/2,properties:{nodeAlias:`默认分组${Math.floor(Math.random()*1e3)+1}`,x:Z[0]+q[0]/2,y:Z[1]+q[1]/2,width:q[0],height:q[1],dynamic:{}},text:{value:""},children:W}),setTimeout(()=>{C.extension.selectionSelect.closeSelectionSelect(),C.extension.selectionSelect.close(),R.remove(),C.graphModel.selectNodeById(G),W.forEach(K=>{const ee=C.getModelById(K);ee.draggable=!1})},100)}break;case"drawLines":f.value=!0;break;case"curvedEdge":if(M.nodes.length===0)return ye.warning("请选择元素节点!");C.setDefaultEdgeType("pro-curved-edge"),$();break;case"path":if(M.nodes.length===0)return ye.warning("请选择元素节点!");C.setDefaultEdgeType("pro-line"),$();break;case"polyline":if(M.nodes.length===0)return ye.warning("请选择元素节点!");C.setDefaultEdgeType("pro-polyline"),$();break;case"bezier":if(M.nodes.length===0)return ye.warning("请选择元素节点!");C.setDefaultEdgeType("pro-bezier"),$();break;case"flipHorizontal":_.forEach(T=>{if(T.type!=="helper-circle-point"){const R=C.getNodeModelById(T.id);R.properties.flipX=!R.properties.flipX,R.properties.flipY=!1}});break;case"flipVertical":_.forEach(T=>{if(T.type!=="helper-circle-point"){const R=C.getNodeModelById(T.id);R.properties.flipY=!R.properties.flipY,R.properties.flipX=!1}});break;case"flipLeft":setTimeout(()=>{_.forEach(T=>{const R=C.getNodeModelById(T.id),P=C.getDataById(T.id),F=R.properties.rotation-30;R.properties.rotation=F,P.properties.rotation=F,a("nodeRotated",P)})},200);break;case"flipRight":setTimeout(()=>{_.forEach(T=>{const R=C.getNodeModelById(T.id),P=C.getDataById(T.id),F=R.properties.rotation+30;R.properties.rotation=F,P.properties.rotation=F,a("nodeRotated",P)})},500);break;case"zoomIn":S.SCALE_X>2?C.zoom(2):C.zoom(!0),m.value={};break;case"zoomOut":S.SCALE_X<=.5?C.zoom(.5):C.zoom(!1),m.value={};break;case"dragText":a("dragText");break;case"dragInputText":a("dragInputText");break;case"fit":setTimeout(()=>{Ai.setScale(E,k)},100);break;case"restorePosition":C.resetTranslate();break;case"restorePosAndSize":A.SCALE_X=E,A.SCALE_Y=k,C.resetTranslate();break;case"undo":e.value.undo(),g(),bt(()=>{d()});break;case"redo":e.value.redo(),g(),bt(()=>{d()});break;case"getSnapShot":Bt.confirm({title:"确认",icon:D(On),content:D(T2,{modelValue:s.value,"onUpdate:modelValue":T=>s.value=T}),okText:"确认",cancelText:"取消",onOk:async()=>{const T=v.value.backgroundImage.replace(/url\((.*?)\)/,"$1");if(s.value==="picture")vu(".lf-canvas-overlay").then(R=>{const P=v.value.pageName||`工作页面-${St()}`;yu(R,T,v.value.backgroundColor,v.value.width,v.value.height,P)});else{const R=wu(".lf-canvas-overlay",T,v.value.width,v.value.height);bu(R,`${v.value.pageName}.svg`)}}});break;case"checkData":i.value=C.getGraphData(),h.value=!0;break;case"miniMap":C.extension.miniMap.show(C.graphModel.width-180,20);break}},showGraphData:h,graphData:i})}function R2(e,t,n){let a;const v=(n.left+n.right)/2,p=(n.top+n.bottom)/2;e.forEach(f=>{const m={left:f.x-f.width/2,right:f.x+f.width/2,top:f.y-f.height/2,bottom:f.y+f.height/2},c=(m.left+m.right)/2,h=(m.top+m.bottom)/2;switch(t){case"left":(!a||m.left<a)&&(a=m.left);break;case"right":(!a||m.right>a)&&(a=m.right);break;case"top":(!a||m.top<a)&&(a=m.top);break;case"bottom":(!a||m.bottom>a)&&(a=m.bottom);break;case"horizontalCenter":(!a||Math.abs(h-p)<Math.abs(a-p))&&(a=h);break;case"verticalCenter":(!a||Math.abs(c-v)<Math.abs(a-v))&&(a=c);break}}),e.forEach(f=>{const m={left:f.x-f.width/2,right:f.x+f.width/2,top:f.y-f.height/2,bottom:f.y+f.height/2};let c=0,h=0;switch(t){case"left":c=a-m.left;break;case"right":c=a-m.right;break;case"top":h=a-m.top;break;case"bottom":h=a-m.bottom;break;case"horizontalCenter":h=a-(m.top+m.bottom)/2;break;case"verticalCenter":c=a-(m.left+m.right)/2;break}f.x+=c,f.y+=h,f.modelType==="text-node"&&(f.text.x+=c,f.text.y+=h)})}const{copy:bs,paste:Cs,cut:P2,pasteEdge:Li,copyEdge:xs}=mc(),{moveToFront:$s,moveToBack:Ss,moveToTop:ks,moveToBottom:_s}=na();function N2(e,t,n){let a=1;const v=c=>{const h=c.value,i=h.graphModel;let o=[];h.on("node:contextmenu",({data:d,e:g,position:y})=>{o=[];const x=i.getElement(d.id),C={x:x.x-x.width/2,y:x.y-x.height/2,width:x.width,height:x.height};i.nodes.forEach(b=>{if(b.type==="helper-circle-point")return;const w={x:b.x-b.width/2,y:b.y-b.height/2,width:b.width,height:b.height};Ot(w,C)&&o.push(b)}),i.edges.forEach(b=>{const w=b.pointsList[0],_=b.pointsList[b.pointsList.length-1],I=Math.abs(_.x-w.x),E=Math.abs(_.y-w.y),k={x:w.x<_.x?w.x:_.x,y:w.y<_.y?w.y:_.y,width:I,height:E};Ot(k,C)&&o.push(b)})});let l=null;h.on("edge:contextmenu",({data:d,e:g,position:y})=>{l=y.canvasOverlayPosition,o=[];const x=i.getElement(d.id),C=Ni(x);if(C){const{x:b,y:w,width:_,height:I}=C,E={x:b,y:w,width:_,height:I};i.nodes.forEach(k=>{if(k.type==="helper-circle-point")return;const A={x:k.x-k.width/2,y:k.y-k.height/2,width:k.width,height:k.height};Ot(A,E)&&o.push(k)}),i.edges.forEach(k=>{if(k.modelType!=="line-edge"){const A=k.pointsList[0],S=k.pointsList[k.pointsList.length-1],M=Math.abs(S.x-A.x),$=Math.abs(S.y-A.y),L={x:A.x<S.x?A.x:S.x,y:A.y<S.y?A.y:S.y,width:M,height:$};Ot(L,E)&&o.push(k)}else{const A={x:k.startPoint.x<k.endPoint.x?k.startPoint.x:k.endPoint.x,y:k.startPoint.y<k.endPoint.y?k.startPoint.y:k.endPoint.y,width:Math.abs(k.startPoint.x-k.endPoint.x),height:Math.abs(k.startPoint.y-k.endPoint.y)};Ot(A,E)&&o.push(k)}})}});const s=d=>{o.length===1&&o[0].id===d.id&&(o=[].concat(i.nodes).concat(i.edges).map(y=>h.getModelById(y.id)))};let r=null;h.on("blank:contextmenu",(d,g)=>{t.value||(r=d.position.canvasOverlayPosition)}),h.on("node:contextmenu",({position:d})=>{r=d.canvasOverlayPosition}),h.extension.menu.setMenuConfig({nodeMenu:[{text:"复制",icon:!0,className:"lf-iconfont icon-lf-copy",callback(d){a=1,bs(h,i)}},{text:"粘贴",icon:!0,className:"lf-iconfont icon-lf-paste",callback(d){a===1?Cs(h,i,r,e):Li(h,i,r)}},{text:"剪切",icon:!0,className:"lf-iconfont icon-lf-cut",callback(d){P2(h,i)}},{text:"删除",icon:!0,className:"lf-iconfont icon-lf-delete",callback(d){h.deleteNode(d.id)}},{text:"添加到组",icon:!0,className:"lf-iconfont icon-lf-makegroup",callback(d){const g=h.graphModel.nodes,y=g.filter(C=>C.type==="default-group").map(C=>({label:C.properties.nodeAlias,value:C.id}));let x="";Bt.confirm({title:"添加到组",icon:D(On),okText:"确认",cancelText:"取消",content:D(fn,{options:y,onChange:C=>{x=C},style:{width:"100%"}},null),onOk(){if(x){const C=g.find(b=>b.id===x);C&&C.addChild(d.id)}else return ye.warning("没有可编入的组")},onCancel(){}})}},{text:"重命名",icon:!0,className:"lf-iconfont icon-lf-rename",callback(d){const g=h.getProperties(d.id);let y="";Bt.confirm({title:"重命名",icon:D(On),okText:"确认",cancelText:"取消",content:D(hn,{"onUpdate:value":x=>{y=x}},null),onOk(){h.setProperties(d.id,{...g,nodeAlias:y}),ye.success("重命名成功"),e("renamed",y)},onCancel(){}})}},{text:"上移一层",icon:!0,className:"lf-iconfont icon-lf-movetop",callback(d){s(d),$s(h,d,o)}},{text:"下移一层",icon:!0,className:"lf-iconfont icon-lf-movebottom",callback(d){s(d),Ss(h,d,o)}},{text:"移至顶层",icon:!0,className:"lf-iconfont icon-lf-movetop",callback(d){ks(h,d)}},{text:"移至底层",icon:!0,className:"lf-iconfont icon-lf-movetop",callback(d){_s(h,d)}},{text:"显示/隐藏",icon:!0,className:"lf-iconfont icon-lf-view",callback(d){const g=h.getNodeModelById(d.id);g.visible=!g.visible,h.setProperties(d.id,{visible:g.visible}),g.properties.showHideContainChildren&&Pi(h,{nodes:[g],edges:[]}).forEach(x=>{x.visible=g.visible,h.setProperties(x.id,{visible:g.visible})})}},{text:"锁定/解锁",icon:!0,className:"lf-iconfont icon-lf-lock",callback(d){const g=h.getNodeModelById(d.id);g.draggable=!g.draggable,g.editable=!g.editable}}],edgeMenu:[{text:"删除",icon:!0,className:"lf-iconfont icon-lf-delete",callback(d){h.deleteEdge(d.id)}},{text:"复制",icon:!0,className:"lf-iconfont icon-lf-copy",callback(d){if(d.type==="pure-curved-polyline"){a=2;const g=h.getEdgeModelById(d.id);d.pointsList=g.pointsList,xs(h,i,l,d)}}},{text:"上移一层",icon:!0,className:"lf-iconfont icon-lf-movetop",callback(d){s(d),$s(h,d,o)}},{text:"下移一层",icon:!0,className:"lf-iconfont icon-lf-movebottom",callback(d){s(d),Ss(h,d,o)}},{text:"移至顶层",icon:!0,className:"lf-iconfont icon-lf-movetop",callback(d){ks(h,d)}},{text:"移至底层",icon:!0,className:"lf-iconfont icon-lf-movetop",callback(d){_s(h,d)}},{text:"显示/隐藏",icon:!0,className:"lf-iconfont icon-lf-view",callback(d){const g=h.getEdgeModelById(d.id);g.visible=!g.visible,h.setProperties(d.id,{visible:g.visible}),g.visible||(n.value={})}},{text:"锁定/解锁",icon:!0,className:"lf-iconfont icon-lf-lock",callback(d){const g=h.getEdgeModelById(d.id);g.draggable=!g.draggable,g.editable=!g.editable,g.isHitable=!g.isHitable}}],graphMenu:[{text:"粘贴",icon:!0,className:"lf-iconfont icon-lf-paste",callback(){a===1?Cs(h,i,r,e):Li(h,i,r)}}]}),(()=>{let d=!1,g=null;document.addEventListener("keydown",y=>{y.key==="Control"&&(d=!0),y.ctrlKey&&y.keyCode===67&&h.getSelectElements(!0).edges.forEach(C=>{const b=h.getEdgeModelById(C.id);b.isSelected&&(C.pointsList=b.pointsList,g=C.pointsList[Math.floor(C.pointsList.length/2)],xs(h,i,g,C))})}),document.addEventListener("keyup",y=>{if(y.key==="Control"&&(d=!1),d&&y.key==="v"){if(g&&h.getSelectElements(!0).edges.length===1){const C={x:g.x+20,y:g.y+20};Li(h,i,C),g=C}y.preventDefault()}})})()},p=(c,h,i)=>{const l=c.graphModel.getSelectElements(!0).nodes.map(s=>c.getModelById(s.id));if(l.length>0){const s=document.querySelector(".lf-multiple-select"),r=s==null?void 0:s.getBoundingClientRect();R2(l,i,r)}};return Ct({setMenuConfig:v,setSelectionMenu:c=>{const h=c.value,i=Y("default-group");h.extension.menu.setMenuByType({type:"lf:defaultSelectionMenu",menu:[{text:"复制",icon:!0,className:"lf-iconfont icon-lf-copy",callback(o){a=1,bs(h,h.graphModel)}},{text:"删除",icon:!0,className:"lf-iconfont icon-lf-delete",callback(o){const l=h.graphModel.getSelectElements(!0);l.edges.forEach(s=>{h.deleteEdge(s.id)}),l.nodes.forEach(s=>{h.deleteNode(s.id)})}},{text:"编组",icon:!0,className:"lf-iconfont icon-lf-makegroup",callback(o){const l=document.querySelector(".lf-multiple-select"),{left:s,top:r,right:u,bottom:d}=l.getBoundingClientRect(),g=o.nodes.find($=>$.type===i.value),y=o.nodes.map($=>$.id),x=o.edges.map($=>$.id);if(x.length>0)return ye.warning("连线/画线不支持加入编组");const C=y.concat(x),w=h.getPointByClient(s,r).canvasOverlayPosition,I=h.getPointByClient(u,d).canvasOverlayPosition,E=I.x-w.x,k=I.y-w.y,A=St(),{minWidth:S,minHeight:M}=Cu(C,h);g?g.children=C:h.graphModel.addNode({id:A,type:"default-group",x:w.x+E/2,y:w.y+k/2,properties:{nodeAlias:`默认分组${Math.floor(Math.random()*1e3)+1}`,x:w.x+E/2,y:w.y+k/2,width:E,height:k,minWidth:S,minHeight:M,dynamic:{}},text:{value:""},children:C}),setTimeout(()=>{h.extension.selectionSelect.closeSelectionSelect(),h.extension.selectionSelect.close(),l.remove(),h.graphModel.selectNodeById(A),C.forEach($=>{const L=h.getModelById($);L.draggable=!1})},100)}},{text:"左对齐",icon:!0,className:"lf-iconfont icon-zuoduiqi",callback(o){p(h,o,"left")}},{text:"右对齐",icon:!0,className:"lf-iconfont icon-youduiqi",callback(o){p(h,o,"right")}},{text:"上对齐",icon:!0,className:"lf-iconfont icon-jushangduiqi",callback(o){p(h,o,"top")}},{text:"下对齐",icon:!0,className:"lf-iconfont icon-juxiaduiqi",callback(o){p(h,o,"bottom")}},{text:"水平对齐",icon:!0,className:"lf-iconfont icon-shuipingjuzhongduiqi",callback(o){p(h,o,"horizontalCenter")}},{text:"垂直对齐",icon:!0,className:"lf-iconfont icon-chuizhijuzhongduiqi",callback(o){p(h,o,"verticalCenter")}}]})},setGroupMenu:c=>{const h=c.value;h.extension.menu.setMenuByType({type:"default-group",menu:[{text:"删除编组",callback(i){Bt.confirm({title:"删除编组",icon:D(On),content:"确认要删除编组吗 ?",okText:"确认",cancelText:"取消",onOk:()=>{const o=h.getDataById(i.id),l=h.getNodeModelById(i.id);o.children.forEach(s=>{l.removeChild(s);const r=h.getModelById(s);r.draggable=!0}),h.deleteElement(i.id)}})}}]})}})}const Ms=Object.assign({"../../../components/动态/图表组件/custom-3d-circle-pie/info.json":()=>$e(()=>import("./info-71efd8f4.js"),[],import.meta.url),"../../../components/动态/图表组件/custom-3d-piechart/info.json":()=>$e(()=>import("./info-c98effc2.js"),[],import.meta.url),"../../../components/动态/图表组件/custom-bar-chart/info.json":()=>$e(()=>import("./info-6b960738.js"),[],import.meta.url),"../../../components/动态/图表组件/custom-gauge-chart/info.json":()=>$e(()=>import("./info-c6f8a74d.js"),[],import.meta.url),"../../../components/动态/图表组件/custom-horizontal-barchart/info.json":()=>$e(()=>import("./info-d5248127.js"),[],import.meta.url),"../../../components/动态/图表组件/custom-line-chart/info.json":()=>$e(()=>import("./info-8efb6333.js"),[],import.meta.url),"../../../components/动态/图表组件/custom-liquidball-node/info.json":()=>$e(()=>import("./info-255d5c9c.js"),[],import.meta.url),"../../../components/动态/图表组件/custom-pictorial-bar/info.json":()=>$e(()=>import("./info-ece05237.js"),[],import.meta.url),"../../../components/动态/图表组件/custom-progress-guage/info.json":()=>$e(()=>import("./info-d197110c.js"),[],import.meta.url),"../../../components/动态/数据展示/custom-iframe-node/info.json":()=>$e(()=>import("./info-e021a418.js"),[],import.meta.url),"../../../components/动态/数据展示/custom-scrolltable-node/info.json":()=>$e(()=>import("./info-a4a51b48.js"),[],import.meta.url),"../../../components/动态/数据展示/custom-video-node/info.json":()=>$e(()=>import("./info-316584da.js"),[],import.meta.url),"../../../components/动态/数据展示/scroll-rank-board/info.json":()=>$e(()=>import("./info-e6df7db4.js"),[],import.meta.url),"../../../components/动态/表单控件/custom-select-node/info.json":()=>$e(()=>import("./info-596b63ac.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-actor-node/info.json":()=>$e(()=>import("./info-4a0f3f11.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-cross-node/info.json":()=>$e(()=>import("./info-d6f56af4.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-cylinde-node/info.json":()=>$e(()=>import("./info-bf5450bc.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-diamond-node/info.json":()=>$e(()=>import("./info-dc48a111.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-divide-node/info.json":()=>$e(()=>import("./info-7549d586.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-downarrow-node/info.json":()=>$e(()=>import("./info-4c9a9d21.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-heptagon-node/info.json":()=>$e(()=>import("./info-a733dc48.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-hexagon-node/info.json":()=>$e(()=>import("./info-deacf3c4.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-horizontal-arrow-node/info.json":()=>$e(()=>import("./info-a6b94c12.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-leftarrow-node/info.json":()=>$e(()=>import("./info-42621029.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-minus-node/info.json":()=>$e(()=>import("./info-317ebe0c.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-parallelogram-node/info.json":()=>$e(()=>import("./info-ab52c236.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-pentagon-node/info.json":()=>$e(()=>import("./info-0a571d99.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-rect-node/info.json":()=>$e(()=>import("./info-77023496.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-rightarrow-node/info.json":()=>$e(()=>import("./info-c3ace7d9.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-star-node/info.json":()=>$e(()=>import("./info-ad5faf03.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-times-node/info.json":()=>$e(()=>import("./info-08e12f0e.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-trapezoid-node/info.json":()=>$e(()=>import("./info-46a32539.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-triangle-node/info.json":()=>$e(()=>import("./info-e5876cca.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-uparrow-node/info.json":()=>$e(()=>import("./info-541b0b91.js"),[],import.meta.url),"../../../components/基础/基础图形/custom-vertical-arrow-node/info.json":()=>$e(()=>import("./info-6da626c8.js"),[],import.meta.url),"../../../components/基础/基础图形/rect-node-radius/info.json":()=>$e(()=>import("./info-638b0652.js"),[],import.meta.url),"../../../components/基础/常用/command-send/info.json":()=>$e(()=>import("./info-44578003.js"),[],import.meta.url),"../../../components/基础/常用/custom-button-node/info.json":()=>$e(()=>import("./info-86ba7f3f.js"),[],import.meta.url),"../../../components/基础/常用/custom-checkbox-node/info.json":()=>$e(()=>import("./info-57a9c7ea.js"),[],import.meta.url),"../../../components/基础/常用/custom-datetime-node/info.json":()=>$e(()=>import("./info-e237f052.js"),[],import.meta.url),"../../../components/基础/常用/custom-form-input/info.json":()=>$e(()=>import("./info-ec6ace8e.js"),[],import.meta.url),"../../../components/基础/常用/custom-image-node/info.json":()=>$e(()=>import("./info-9a8ec598.js"),[],import.meta.url),"../../../components/基础/常用/custom-input-node/info.json":()=>$e(()=>import("./info-4610c551.js"),[],import.meta.url),"../../../components/基础/常用/custom-radios-node/info.json":()=>$e(()=>import("./info-4133f838.js"),[],import.meta.url),"../../../components/基础/常用/custom-switch-node/info.json":()=>$e(()=>import("./info-f0f26aae.js"),[],import.meta.url),"../../../components/基础/常用/custom-tab-node/info.json":()=>$e(()=>import("./info-7c32e9fc.js"),[],import.meta.url),"../../../components/基础/常用/custom-text-node/info.json":()=>$e(()=>import("./info-c4102b75.js"),[],import.meta.url),"../../../components/基础/常用/custom-time-show/info.json":()=>$e(()=>import("./info-d7bdf5af.js"),[],import.meta.url),"../../../components/基础/常用/custom-tricolor-light/info.json":()=>$e(()=>import("./info-62b39cd7.js"),[],import.meta.url),"../../../components/大屏/仪表板/custom-guage-outline-one/info.json":()=>$e(()=>import("./info-5ade6f96.js"),[],import.meta.url),"../../../components/大屏/仪表板/custom-guage-outline-two/info.json":()=>$e(()=>import("./info-259e1b04.js"),[],import.meta.url),"../../../components/大屏/水位/custom-polar-waterfill-node/info.json":()=>$e(()=>import("./info-a3cc1055.js"),[],import.meta.url),"../../../components/大屏/水位/custom-simple-waterfill-node/info.json":()=>$e(()=>import("./info-2ff9aad8.js"),[],import.meta.url),"../../../components/大屏/水位/custom-therm-waterfill-node/info.json":()=>$e(()=>import("./info-6ddc8560.js"),[],import.meta.url),"../../../components/大屏/水位/horizontal-capsule-tank/info.json":()=>$e(()=>import("./info-109d5228.js"),[],import.meta.url),"../../../components/大屏/水位/horizontal-cylinder-tank/info.json":()=>$e(()=>import("./info-db2c5133.js"),[],import.meta.url),"../../../components/大屏/水位/horizontal-dishends-tank/info.json":()=>$e(()=>import("./info-199dc49a.js"),[],import.meta.url),"../../../components/大屏/水位/horizontal-ellipse-tank/info.json":()=>$e(()=>import("./info-83239efc.js"),[],import.meta.url),"../../../components/大屏/水位/horizontal-elliptical-tank/info.json":()=>$e(()=>import("./info-de1a9542.js"),[],import.meta.url),"../../../components/大屏/水位/horizontal-oval-tank/info.json":()=>$e(()=>import("./info-f60365f6.js"),[],import.meta.url),"../../../components/大屏/水位/rectangle-tank/info.json":()=>$e(()=>import("./info-872e263e.js"),[],import.meta.url),"../../../components/大屏/水位/vertical-capsule-tank/info.json":()=>$e(()=>import("./info-b5eaecb0.js"),[],import.meta.url),"../../../components/大屏/水位/vertical-cylinder-tank/info.json":()=>$e(()=>import("./info-b25092bf.js"),[],import.meta.url),"../../../components/大屏/水位/vertical-oval-tank/info.json":()=>$e(()=>import("./info-cb1106e5.js"),[],import.meta.url),"../../../components/大屏/进度条/custom-progress-node/info.json":()=>$e(()=>import("./info-0574c71f.js"),[],import.meta.url)}),O2=(e,t)=>new Promise((n,a)=>{const v=e.getElementById("componentsScripts"),p=e.getElementById("componentsStyleSheets");v&&v.remove(),p&&p.remove();let f=`;(function(){
|
|
`,m="";const c=[];async function h(){for(const i in Ms){const o=await Ms[i]();if(t&&t.includes(o.name)){const{css:l,javascript:s,jsPlugin:r}=o.files;r&&c.push(...JSON.parse(r)),f+=`;(function(){${s}})();
|
|
`,m+=`${l}
|
|
`}else{const{css:l,javascript:s,jsPlugin:r}=o.files;r&&c.push(...JSON.parse(r)),f+=`;(function(){${s}})();
|
|
`,m+=`${l}
|
|
`}}}h().then(()=>{const i=e.getElementsByTagName("script"),o=function(s){return new Promise((r,u)=>{if(Array.from(i).find(y=>{const x=y.getAttribute("src");return s.url.includes(x)})){r();return}if(!s.url){r();return}if(s.url.includes("core.umd.js")||s.url.includes("NodeResize.js")){r();return}const g=e.createElement("script");g.setAttribute("src",s.url),e.body.append(g),g.onload=()=>{r(!0)}})};async function l(){for(let s=0;s<c.length;s++)await o(c[s])}l().then(()=>{f+=`
|
|
})();`;const s=e.createElement("script");s.setAttribute("id","componentsScripts");const r=URL.createObjectURL(new Blob([f]));if(s.onload=()=>{n()},s.src=r,e.body.append(s),m){const u=e.createElement("style");u.setAttribute("id","componentsStyleSheets"),u.innerText=m,setTimeout(()=>{e.querySelector("head").appendChild(u)},500)}})})}),B2=e=>{class t extends window.GroupNode.view{}class n extends window.GroupNode.model{initNodeData(v){super.initNodeData(v);const{properties:p}=this;this.isRestrict=!0,this.isGroup=!0,this.resizable=!0,this.width=p.width,this.height=p.height,this.minWidth=p.minWidth||p.width,this.minHeight=p.minHeight||p.height}setAttributes(){const{x:v,y:p,properties:f}=this;this.text={...this.text,x:v,y:p,value:f.content||""}}getNodeStyle(){const v=super.getNodeStyle();v.stroke="rgba(175, 175, 175, 0.5)",v.strokeDasharray="3 3",v.strokeWidth=2,v.fill="transparent";const{properties:p}=this;return v.x=p.x,v.y=p.y,v}}e.register({type:"default-group",model:n,view:t})},{EllipseResize:As}=window,F2=e=>{class t extends As.model{initNodeData(a){super.initNodeData(a),this.rx=5,this.ry=5,this.virtual=!1,this.draggable=!1,this.text.editable=!1}setAttributes(){const{x:a,y:v,properties:p}=this,{textHorizontalMove:f=0,textVerticalMove:m=0}=p;this.text={...this.text,x:a+f,y:v+m,value:""}}setToBottom(){this.zIndex=0}getNodeStyle(){const a=super.getNodeStyle();return a.fill="transparent",a.stroke="transparent",a}getDefaultAnchor(){const{id:a,x:v,y:p,width:f,height:m}=this;return[{x:v,y:p,width:2,height:2,id:a,type:"right",autoAttach:!0}]}}e.register({type:"helper-circle-point",model:t,view:As.view})},H2=Un(),z2=(e,t,n,a,v,p)=>{const f=e.value;e.value.on("blank:click",h=>{const i=document.querySelector(".lf-multiple-select");i&&i.remove(),f.extension.selectionSelect.closeSelectionSelect(),f.extension.selectionSelect.close(),f.clearSelectElements(),t("blankClicked"),p.value.edge=null,p.value.node=null}),e.value.on("node:click",({data:h})=>{v.value={};const i={...h,text:h.text||{value:""},properties:{...h.properties,x:h.x,y:h.y}};t("nodeSelected",i),p.value.edge=null,p.value.node=i}),e.value.on("edge:click",h=>{bt(()=>{const{edges:i}=e.value.getSelectElements();i.length>0&&(t("edgeSelected",{...i[0]}),p.value.node=null,p.value.edge=i[0])})}),e.value.on("node:rotation",h=>{t("nodeRotated",{...h,text:h.text||{value:""},properties:{...h.properties,x:h.x,y:h.y}})}),f.on("node:resize",Wo(h=>{const{newNodeSize:i}=h,{id:o,type:l,width:s,height:r,x:u,y:d,rx:g,ry:y}=i,x=f.getProperties(o),C={...x,width:s,height:r,x:u,y:d,rx:g,ry:y},b={id:o,type:l,width:s,height:r,x:u,y:d,rx:g,ry:y,text:{value:x.content},properties:C};t("nodeResized",b),p.value.edge=null,p.value.node=b},100,{leading:!1,trailing:!0})),f.on("node:dnd-add",h=>{f.extension.selectionSelect.closeSelectionSelect(),f.extension.selectionSelect.close(),f.clearSelectElements(),t("nodeAdded",{...h.data,x:h.data.x,y:h.data.y})}),f.on("node:dnd-drag",h=>{t("nodeDragging",{...h.data,x:h.data.x,y:h.data.y})}),f.on("node:drag",({data:h,e:i})=>{const o={...h,x:h.x,y:h.y};t("nodeDragging",o),p.value.edge=null,p.value.node=o}),f.on("node:drop",h=>{const i={...h.data,x:h.data.x,y:h.data.y};t("nodeDroped",i),p.value.edge=null,p.value.node=i,h.data.type==="default-group"&&f.getModelById(h.data.id).children.forEach(l=>{const s=f.getModelById(l);s.properties.x=s.x,s.properties.y=s.y})}),f.on("selection:drop",()=>{f.getSelectElements().nodes.forEach(i=>{const o=f.getModelById(i.id);o.properties.x=o.x,o.properties.y=o.y})}),f.on("text:update",h=>{const i=f.getNodeModelById(h.id);if(i){const{id:o,x:l,y:s,width:r,height:u,type:d,properties:g}=i;t("textUpdated",{id:o,x:l,y:s,width:r,height:u,type:d,text:{value:h.text},properties:{...g,content:h.text}})}}),f.on("selection:selected",h=>{n.value=h.map(i=>i.id)});const m=()=>{const{editConfigModel:h}=f.graphModel;h.updateEditConfig({hideAnchors:!0})};f.on("anchor:dragstart",h=>{t("anchorDragstart",h)}),f.on("node:resize",({oldNodeSize:h,newNodeSize:i})=>{if(i.type==="default-group"){const o=f.getModelById(i.id),l=i.width/h.width,s=i.height/h.height,r=i.x/h.x,u=i.y/h.y;o.children.forEach(d=>{const g=f.getModelById(d);if(g.rx)g.rx=Number((g.rx*l).toFixed(0)),g.ry=Number((g.ry*s).toFixed(0));else{const y=Number((g.width*l).toFixed(0)),x=Number((g.height*s).toFixed(0));g.width=y,g.height=x,g.properties.width=y,g.properties.height=x}g.x=Number((g.x*r).toFixed(0)),g.y=Number((g.y*u).toFixed(0))})}}),f.on("node:rotate",({e:h,nodeModel:i})=>{}),f.on("anchor:dragend",({data:h,e:i,nodeModel:o})=>{o.type!=="helper-circle-point"&&m(),t("anchorDragend",h)}),f.on("anchor:drop",({data:h,e:i,nodeModel:o,edgeModel:l})=>{if(l.type!=="pure-curved-polyline"){const{nodes:s,edges:r}=f.getGraphData(),u=ir(s,r);l.zIndex=u+2}}),f.on("history:change",h=>{if(e.value){const i=e.value.getGraphData();H2.set(i)}});const c=jn();f.on("graph:transform",h=>{c.setScale(h.transform.SCALE_X,h.transform.SCALE_Y);const i=a.value.width*h.transform.SCALE_X,o=a.value.height*h.transform.SCALE_Y;e.value.resize(i,o)}),f.on("node:click",({data:h,e:i})=>{window.totalListeners.click.forEach(o=>{o({data:h,e:i})})}),f.on("node:dbclick",({data:h,e:i})=>{window.totalListeners.dbclick.forEach(o=>{o({data:h,e:i})})}),f.on("node:mouseenter",({data:h,e:i})=>{window.totalListeners.mouseenter.forEach(o=>{o({data:h,e:i})})}),f.on("node:mouseleave",({data:h,e:i})=>{window.totalListeners.mouseleave.forEach(o=>{o({data:h,e:i})})})};function W2(e,t){const n=t.x-e.x,a=t.y-e.y;return Math.sqrt(n*n+a*a)}function V2(e,t,n){const a=n.x-t.x,v=n.y-t.y,p=((e.x-t.x)*a+(e.y-t.y)*v)/(a*a+v*v);let f;return p<0?f=t:p>1?f=n:f={x:t.x+p*a,y:t.y+p*v},W2(e,f)}const j2=(e,t)=>{let n=Number.MAX_SAFE_INTEGER,a=-1;for(let v=0;v<e.length-1;v++){const p=e[v],f=e[v+1],m=V2(t,p,f);m<n&&(n=m,a=v+1)}e.splice(a,0,t)},U2=(e,t,n,a,v)=>{const p=document.querySelector(e);let f=!1,m={},c={},h=[],i=null;function o(y){v.value&&(f?(clearTimeout(i),i=setTimeout(()=>{f=!0,y.ctrlKey||(c={x:y.offsetX,y:y.offsetY}),h.push({start:m,end:c}),m=c,d()},100)):i=setTimeout(()=>{f=!0,m={x:y.offsetX,y:y.offsetY},c={x:y.offsetX,y:y.offsetY},u()},100),p.addEventListener("mousemove",l),p.addEventListener("dblclick",r))}function l(y){if(f){if(y.ctrlKey){const x=[0,45,90,180,270,360];c={x:y.offsetX,y:y.offsetY};const C=c.x-m.x,b=c.y-m.y;let w=Math.atan2(b,C)*180/Math.PI;w<0&&(w+=360);let _=0;for(const k of x)(!_||Math.abs(w-k)<Math.abs(w-_))&&(_=k);const I=Math.sqrt(C*C+b*b),E=_*Math.PI/180;c.x=m.x+I*Math.cos(E),c.y=m.y+I*Math.sin(E)}else c={x:y.offsetX,y:y.offsetY};u()}}function s(){f=!1,m={},c={};const y=[];h.forEach((C,b)=>{b===0?y.push({x:C.start.x+a.x,y:C.start.y+a.y}):y.push({x:C.end.x+a.x,y:C.end.y+a.y})}),t(y,n),h=[],i=null;const x=p.querySelector(".pathContainer");p.removeChild(x),v.value=!1,p.removeEventListener("mousemove",l),p.removeEventListener("dblclick",r)}function r(y){clearTimeout(i),s()}function u(){const y=p.querySelector(".pathContainer");if(!y)g();else{const x=y.querySelector("path");let C="";if(h.length===0)C=`M${m.x},${m.y} L${c.x},${c.y}`,h.push({start:m,end:c});else{for(let b=0;b<h.length;b++){const w=h[b];b===0?C+=`M${w.start.x},${w.start.y} `:C+=`L${w.end.x},${w.end.y} `}C+=`L${c.x},${c.y}`}x.setAttribute("d",C),x.setAttribute("fill","none"),x.setAttribute("stroke","#FFB243"),x.setAttribute("class","path")}}function d(){const y=p.querySelector(".pathContainer");if(!y)g();else{y&&p.removeChild(y);const x=document.createElementNS("http://www.w3.org/2000/svg","g");x.setAttribute("class","pathContainer");const C=document.createElementNS("http://www.w3.org/2000/svg","path");let b="";for(let w=0;w<h.length;w++){const _=h[w];w===0?b+=`M${_.start.x},${_.start.y} `:b+=`L${_.end.x},${_.end.y} `}C.setAttribute("d",b.trimEnd()),C.setAttribute("class","path"),C.setAttribute("fill","none"),C.setAttribute("stroke","#FFB243"),x.appendChild(C),p.appendChild(x)}}function g(){const y=document.createElementNS("http://www.w3.org/2000/svg","g");y.setAttribute("class","pathContainer");for(let x=0;x<h.length;x++){const C=h[x],b=document.createElementNS("http://www.w3.org/2000/svg","path"),w=`M${C.start.x},${C.start.y} L${C.end.x},${C.end.y}`;b.setAttribute("d",w),b.setAttribute("class","path"),y.appendChild(b)}if(f){const x=document.createElementNS("http://www.w3.org/2000/svg","path"),C=`M${m.x},${m.y} L${c.x},${c.y}`;x.setAttribute("d",C),x.setAttribute("class","dashed-path"),y.appendChild(x)}p.appendChild(y)}p&&p.addEventListener("mousedown",o)};Un();const G2=(e,t,n,a,v)=>{const p=e.value,f=r=>{p.graphModel.selectEdgeById(r,!1);const u=p.getEdgeModelById(r);t("edgeSelected",u,!0)},m=r=>{const u=p.getPointByClient(r.x,r.y),{x:d,y:g}=u.canvasOverlayPosition,y=St();return p.addNode({type:"helper-circle-point",x:d,y:g,id:y,properties:{nodeAlias:`虚拟节点${Math.floor(Math.random()*1e3)+1}`,x:d,y:g,dynamic:{}},text:{value:""}}),y},c=(r,u,d)=>{const g=d.map(w=>{const _=p.getPointByClient(w.x,w.y),{x:I,y:E}=_.canvasOverlayPosition;return{x:I,y:E}}),{nodes:y,edges:x}=p.getGraphData(),C=ir(y,x),b=St();return p.addEdge({id:b,type:"pure-curved-polyline",sourceNodeId:r,targetNodeId:u,pointsList:g,text:{value:""},properties:{arrowType:"none",isCustomHelperLine:!0,borderWidth:3},zIndex:C+2}),b};U2(".lf-canvas-overlay",(r,u)=>{if(r.length<2)return;u.setDefaultEdgeType("pure-curved-polyline");const d={x:r[0].x,y:r[0].y},g={x:r[r.length-1].x,y:r[r.length-1].y},y=m(d),x=m(g),C=c(y,x,r);f(C)},p,v,a);const i=r=>{if(!r||!r.pointsList[0])return;const u={x:r.pointsList[0].x,y:r.pointsList[0].y},d={x:r.pointsList[r.pointsList.length-1].x,y:r.pointsList[r.pointsList.length-1].y};r.startPoint=u,r.endPoint=d;const{sourceNodeId:g,targetNodeId:y}=r,x=p.getNodeModelById(g),C=p.getNodeModelById(y);!x||!C||(x.x=u.x,x.y=u.y,x.properties.x=u.x,x.properties.y=u.y,C.x=d.x,C.y=d.y,C.properties.x=d.x,C.properties.y=d.y)};let o=null;e.value.on("edge:dbclick",({data:r,e:u})=>{if(["pure-polyline","pure-curved-polyline"].includes(r.type)){const g=p.getPointByClient(u.x,u.y).canvasOverlayPosition,y=p.getEdgeModelById(r.id);if(o=y,!o.draggable&&!o.editable||y.pointsList.find(b=>b.x===g.x&&b.y===g.y))return;j2(y.pointsList,{x:g.x,y:g.y});let C="";y.pointsList.forEach(b=>{C+=`${b.x},${b.y} `}),y.points=C.trimEnd(),n.value={},n.value[r.id]=y.pointsList,i(y)}}),e.value.on("edge:delete",({data:r})=>{const u=p.getNodeModelById(r.sourceNodeId),d=p.getNodeModelById(r.targetNodeId);u.type==="helper-circle-point"&&(p.deleteNode(r.sourceNodeId),n.value={},o=null),d.type==="helper-circle-point"&&(p.deleteNode(r.targetNodeId),n.value={},o=null)}),(()=>{let r=0,u=0;const d=x=>{document.removeEventListener("mousemove",y,!0),o&&(i(o),o&&(n.value[o.id]=o.pointsList),document.removeEventListener("mouseup",d,!0),p.clearSelectElements(),p.selectElementById(o.id,!0))},g=x=>{if(x.target.classList.contains("edge-move-append")){const C=p.getPointByClient(x.clientX,x.clientY),{x:b,y:w}=C.canvasOverlayPosition;r=b,u=w,document.addEventListener("mousemove",y,!0),document.addEventListener("mouseup",d,!0)}};document.addEventListener("mousedown",g,!0);function y(x){if(!o)return;n.value={};const C=p.getPointByClient(x.clientX,x.clientY),{x:b,y:w}=C.canvasOverlayPosition,_=b,I=w,E=_-r,k=I-u;let A="";o.pointsList.forEach(S=>{A+=`${S.x+E},${S.y+k} `,S.x=S.x+E,S.y=S.y+k}),o.points=A.trimEnd(),r=b,u=w,t("updateEdgePoints",o)}})(),e.value.on("edge:mousedown",({data:r})=>{o=p.getEdgeModelById(r.id),["pure-polyline","pure-curved-polyline"].includes(r.type)?(n.value={},n.value[r.id]=r.pointsList):setTimeout(()=>{n.value={}},100)}),e.value.on("blank:click",({data:r})=>{n.value={},o=null}),p.graphModel.moveEdges=function(r,u,d){r.forEach(g=>{let y="";g.pointsList=g.pointsList.map(x=>(x.x=x.x+u,x.y=x.y+d,y+=`${x.x},${x.y} `,x)),g.points=y.trimEnd(),g.startPoint={...g.pointsList[0]},g.endPoint={...g.pointsList[g.pointsList.length-1]},i(g)})},p.graphModel.movePoints=function(r,u,d){r.forEach(g=>{g.x+=u,g.y+=d,g.properties.x+=u,g.properties.y+=d})},(()=>{let r=[],u=0,d=0;p.on("selection:selected",g=>{r=g.filter(y=>y.modelType==="pure-curved-polyline-edge")}),p.on("selection:mousedown",({e:g})=>{const y=p.getPointByClient(g.clientX,g.clientY),{x,y:C}=y.canvasOverlayPosition;u=x,d=C}),p.on("selection:mousemove",({e:g})=>{if(r.length===0)return;const y=p.getPointByClient(g.clientX,g.clientY),{x,y:C}=y.canvasOverlayPosition,b=x-u,w=C-d;p.graphModel.moveEdges(r,b,w),u=x,d=C})})()};function Ls(e){const n=e.substring(7,e.length-1).split(",").map(parseFloat),a=n[4],v=n[5],p=n[0],f=n[3];return{translateX:a,translateY:v,scaleX:p,scaleY:f}}const Y2=(e,t)=>{const n=document.getElementById(e);n.addEventListener("mousedown",l);const a=n.style.transform,{translateX:v,translateY:p}=Ls(a);let f=0,m=0,c=v,h=p,i=!1;const o=()=>{const u=document.getElementById("diagram"),{left:d,top:g}=u==null?void 0:u.getBoundingClientRect();t.value.x=d,t.value.y=g};function l(u){u.altKey&&(n.addEventListener("mousemove",s),n.addEventListener("mouseup",r),f=u.clientX,m=u.clientY,i=!0)}function s(u){if(i){const d=u.clientX-f,g=u.clientY-m;n.style.transform=`matrix(1, 0 , 0, 1, ${c+d}, ${h+g})`}}function r(){i=!1;const u=n.style.transform,{translateX:d,translateY:g}=Ls(u);c=d,h=g,n.removeEventListener("mousemove",s),n.removeEventListener("mouseup",r),o()}},Es=jn(),Z2=(e,t,n,a,v,p)=>{document.querySelector(e);const f=document.querySelector(t);let m=1;me(()=>Es.getScale,l=>{m=l.scaleX},{immediate:!0});function c(l,s){const r=n.value.graphModel.transformModel;if(r.SCALE_X!==Number(l)||r.SCALE_Y!==Number(s)){r.SCALE_X=Number(l),r.SCALE_Y=Number(s),Es.setScale(Number(l),Number(s));const u=document.getElementById("diagram"),{left:d,top:g}=u==null?void 0:u.getBoundingClientRect();a.value.x=d,a.value.y=g}}const h=Ut(c,100);function i(l){if(l.shiftKey||l.altKey){l.preventDefault();return}p.value={};let s=!0;s=l.wheelDelta?l.wheelDelta<0:l.detail>0;let r;s?(r=m-.05,r<.5&&(r=.5)):(r=m+.05,r>2&&(r=2));const u=v.value.width*r,d=v.value.height*r;return n.value.resize(u,d),h((u/v.value.width).toFixed(2),(d/v.value.height).toFixed(2)),m=r,l.preventDefault&&l.preventDefault(),!1}function o(l,s,r){l.attachEvent?l.attachEvent(`on${s}`,r):l.addEventListener(s,r,!1)}o(f,"mousewheel",i),o(f,"DOMMouseScroll",i)},K2=(e,t)=>{const n=f=>{const m=window.lf.getModelById(f.id),{x:c,y:h}=f.basicForm;m&&(m.x=c,m.y=h),window.lf.setProperties(f.id,{...f.basicForm})},a=f=>{const m=window.lf.getModelById(f.id);m.pointsList=f.pointsList,m.startPoint=f.startPoint,m.endPoint=f.endPoint;let c="";m.pointsList.forEach(h=>{c+=`${h.x},${h.y} `}),m.points=c.trimEnd()};return{updateNodePosition:n,updateEdgePosition:a,updatePos:f=>{e.value={};const m=window.lf.getSelectElements(!0);m.edges.forEach(c=>{const h=c.pointsList.map(i=>({x:f==="left"?i.x-1:f==="right"?i.x+1:i.x,y:f==="up"?i.y-1:f==="down"?i.y+1:i.y}));c.pointsList=h,c.startPoint=h[0],c.endPoint=h[h.length-1],a(c)}),m.nodes.forEach(c=>{const h=window.lf.getModelById(c.id);if(!h.draggable&&!h.editable)return;const i=nt(c.properties);switch(f){case"up":i.y-=1;break;case"down":i.y+=1;break;case"left":i.x-=1;break;case"right":i.x+=1;break}n({...c,basicForm:i}),t("nodeDragging",window.lf.getNodeDataById(c.id)),c.children&&c.children.forEach(o=>{const l=window.lf.getDataById(o),s=nt(l.properties);switch(f){case"up":s.y-=1;break;case"down":s.y+=1;break;case"left":s.x-=1;break;case"right":s.x+=1;break}n({...l,basicForm:s})})})},hasLockedElements:()=>{const f=window.lf.getSelectElements(!0);let m=!1;return f.nodes.forEach(c=>{const h=window.lf.getModelById(c.id);h.type!=="helper-circle-point"&&!h.draggable&&(m=!0)}),f.edges.forEach(c=>{window.lf.getModelById(c.id).draggable||(m=!0)}),m}}},X2=["fill","width","height"],Q2=ce({__name:"exitFullscreen",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",fill:B(n),width:B(a),height:B(v)},f[0]||(f[0]=[z("path",{d:"M142.4 96.8l-44.8 44.8 173.6 174.4-68 68H384V203.2l-67.2 67.2zM752.8 316l173.6-174.4-44.8-44.8-174.4 173.6-67.2-67.2V384h180.8zM270.4 707.2l-169.6 170.4 44.8 49.6 170.4-174.4 68 68V640H203.2zM820.8 640H640v180.8l68-68 170.4 174.4 44.8-49.6-169.6-170.4z"},null,-1)]),8,X2))}}),J2=e=>{e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},q2=()=>{const e=document;e.exitFullscreen?e.exitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()},Is=()=>{const e=document;return e.isFullScreen||e.mozIsFullScreen||e.webkitIsFullScreen},e5=()=>{const e=Y(!1),t=Y(null),n=()=>{Is()||(e.value=!1)},a=()=>{e.value&&q2(),Is()||(J2(document.querySelector("body")),e.value=!e.value)},v=p=>{p.keyCode===122&&(p.returnValue=!1,a())};return ot(()=>{window.addEventListener("keydown",v,!0),window.addEventListener("resize",n)}),{bol:e,fullscreenEl:t,onPageFullScreen:a}},t5={class:"diagram-container h-full flex-auto flex flex-col overflow-hidden"},n5={class:"relative w-full h-full flex overflow-hidden"},o5=ce({__name:"index",props:{pageConfigs:{type:Object,default:()=>({})}},emits:["instanceInited","nodeAdded","nodeSelected","nodeRotated","nodeDroped","nodeDragging","nodeResized","textUpdated","renamed","blankClicked","edgeSelected","anchorDragend","anchorDragstart","dragText","dragInputText","updateEdgePoints"],setup(e,{expose:t,emit:n}){no(ne=>({"183d6a02":B(de),b665f3be:B(re),"3430c3de":B(he)}));const a=e,v=n,p=Y([]),{pageConfigs:f}=xe(a),m=Qe(null);Qt("lf",m);const c=Y({node:null,edge:null}),h=Y({}),i=Y({x:0,y:0}),o=Y(!1),l=Y([]),s=Y({x:0,y:0}),r=Y(!1),u=Y({x:0,y:0}),d=Y(!1),g=ne=>{const pe=l.value.findIndex(Se=>Se.id===ne);pe>-1&&l.value.splice(pe,1)},{setMenuConfig:y,setSelectionMenu:x,setGroupMenu:C}=N2(v,o,h),{updatePos:b,hasLockedElements:w}=K2(h,v),_=async ne=>{const pe=window.LogicFlow;pe.use(window.SelectionSelect),pe.use(window.Group),pe.use(window.Menu),pe.use(window.Snapshot),pe.use(window.MiniMap);const Se=new pe({container:document.getElementById("diagram"),width:1920,height:1080,overlapMode:1,autoWrap:!0,autoExpand:!1,snapline:!0,history:!0,animation:!0,adjustEdgeStartAndEnd:!1,partial:!0,stopZoomGraph:!0,allowRotation:!1,stopScrollGraph:!0,stopMoveGraph:!0,edgeTextEdit:!1,hideAnchors:!0,grid:{visible:!1,size:1},multipleSelectKey:"shift",background:{backgroundImage:'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=")',backgroundColor:"#ffffff",backgroundRepeat:"repeat",backgroundSize:""},keyboard:{enabled:!0,shortcuts:[{keys:["backspace"],callback(){}},{keys:["delete"],callback(){const Le=window.lf.getSelectElements(!0);window.lf.clearSelectElements(),Le.edges.forEach(Ae=>Se.deleteEdge(Ae.id)),Le.nodes.forEach(Ae=>Se.deleteNode(Ae.id))}},{keys:["up"],callback(Le){if(w()){ye.warning("元素被锁定!");return}b("up")}},{keys:["down"],callback(){if(w()){ye.warning("元素被锁定!");return}b("down")}},{keys:["left"],callback(){if(w()){ye.warning("元素被锁定!");return}b("left")}},{keys:["right"],callback(){if(w()){ye.warning("元素被锁定!");return}b("right")}},{keys:["shift"],callback(){window.lf.extension.selectionSelect.openSelectionSelect()}}]}});Se.setTheme({baseEdge:{strokeWidth:1,stroke:"#FFB243"},anchorLine:{stroke:"#FFB243",strokeWidth:2,strokeDasharray:"3,2"},baseNode:{strokeWidth:1},nodeText:{overflowMode:"autoWrap",lineHeight:1.5},edgeText:{overflowMode:"autoWrap",lineHeight:1.5}}),window.lf=null,window.lf=Se,m.value=Se,Se.setDefaultEdgeType("pro-polyline"),Vm(Se),y(m),x(m),C(m),B2(m.value),F2(m.value);const{transformModel:Me}=Se.graphModel;Me.setZoomMiniSize(.3),Me.setZoomMaxSize(1.5),z2(m,v,p,f,h,c),Se.render(),v("instanceInited"),setTimeout(()=>{G2(m,v,h,o,i.value)},500)},I=jn(),E=Y({x:0,y:0}),k=Y({offsetX:0,offsetY:0,scale:1}),A=Y({offsetX:0,offsetY:0,scale:1});me([()=>I.getScale,i],([{scaleX:ne,scaleY:pe},Se])=>{const{x:Me,y:Le}=E.value;if(Me===0&&Le===0)return;const Ae=Se.x-Me-30,We=Se.y-Le;Ae<0&&We<0||(k.value={scale:ne,offsetX:-Ae,offsetY:0},A.value={scale:pe,offsetX:0,offsetY:-We})},{deep:!0});const S=e5(),{fullscreenEl:M,onPageFullScreen:$}=S,L=Y(1920),T=Y(1080);let R=0,P=0,F=0,O=0,N={scaleX:0,scaleY:0};const V=Y(!1),H=Ut((ne,pe)=>{const Se=T.value/L.value,Me=ne*Se;F=ne*.95,O=Me*.95,V.value=!0,m.value.resize(F,O);const Le=ne*.95/L.value,Ae=Me*.95/T.value,We=m.value.graphModel.transformModel;We.SCALE_X=Le,We.SCALE_Y=Ae,I.setScale(Le,Ae),N={scaleX:Le,scaleY:Ae},setTimeout(()=>{const Ve=document.getElementById("diagram");R=(ne+30-ne*.95)/2,P=(pe-Me*.95)/2,Ve.style.transform=`matrix(1, 0, 0, 1, ${R}, ${P})`;const{left:Ze,top:se}=Ve==null?void 0:Ve.getBoundingClientRect();i.value.x=Ze,i.value.y=se,Y2("diagram",i),Z2(".lf-graph",".diagram-wrapper",m,i,f,h)},500)},100);me(f,ne=>{const{backgroundImage:pe,width:Se,height:Me,backgroundColor:Le,backgroundRepeat:Ae,backgroundSize:We}=ne;L.value=Se,T.value=Me,m.value||_(),m.value.graphModel.changeBackground({backgroundImage:pe,backgroundColor:Le,backgroundRepeat:Ae,backgroundSize:We});const Ve=document.querySelector(".diagram-wrapper"),{width:Ze,height:se}=Ve.getBoundingClientRect();H(Ze,se)},{deep:!0});const W=Y(!1),j=D2(m,W,$,v,f,p,o,h,i),{actionHandler:Z,showGraphData:q,graphData:G}=xe(j),K=()=>{W.value=!1,$();const ne=document.getElementById("diagram");ne.style.transform=`matrix(1, 0, 0, 1, ${R}, ${P})`,m.value.resize(F,O);const pe=m.value.graphModel.transformModel;pe.SCALE_X=N.scaleX,pe.SCALE_Y=N.scaleY,I.setScale(N.scaleX,N.scaleY),setTimeout(()=>{h.value={};const{left:Se,top:Me}=ne==null?void 0:ne.getBoundingClientRect();i.value.x=Se,i.value.y=Me},100)};me(S.bol,ne=>{if(ne){const{width:pe,height:Se}=document.body.getBoundingClientRect();let Me=0,Le=0;pe<L.value?(Le=pe,Me=Se<T.value?T.value-98:Se):(Le=L.value,Me=T.value),m.value.resize(Le,Me);const Ae=m.value.graphModel.transformModel;Ae.SCALE_X=Le/L.value,Ae.SCALE_Y=Me/T.value,I.setScale(Ae.SCALE_X,Ae.SCALE_Y)}});const ee=Un(),te=le({get(){return JSON.stringify(G.value,null,2)},set(ne){try{const pe=JSON.parse(ne);pe.nodes&&pe.edges&&ee.set(pe),setTimeout(()=>{m.value.render(pe)},200)}catch(pe){console.error(pe),ye.error("数据格式错误!")}}}),ae=({id:ne,x:pe,y:Se,width:Me,height:Le})=>{const Ae=m.value.getNodeDataById(ne);if(!Ae)return;const{properties:We}=Ae,Ve={...We,width:Me,height:Le,x:pe,y:Se};We.rx&&We.ry&&(Ve.rx=Me,Ve.ry=Le);const Ze={...Ae,x:pe,y:Se,properties:Ve};v("nodeResized",Ze)},de=Y("#fff"),he=Y("#e8e8e8"),re=Y("1px solid #efefee");me(ht,ne=>{de.value=ne?"#333":"#fff",re.value=ne?"1px solid #666":"1px solid #efefee",he.value=ne?"#666":"#e8e8e8"}),Gs(()=>{}),ot(()=>{const ne=document.querySelector(".diagram-wrapper");if(ne){const{left:pe,top:Se}=ne==null?void 0:ne.getBoundingClientRect();E.value.x=pe,E.value.y=Se,gs(".hori-ruler","horizontal",s,r,l),gs(".vert-ruler","vertical",u,d,l)}});const ue=ne=>{v("updateEdgePoints",ne)};return t({lfInstance:m,scaleFn:H,customLinesPoints:h}),(ne,pe)=>{const Se=Bt;return Q(),ie("div",t5,[D(m2,{"selected-elements":B(c),onAction:B(Z),onAdjustNodeSize:ae},null,8,["selected-elements","onAction"]),D(Se,{open:B(q),"onUpdate:open":pe[1]||(pe[1]=Me=>qe(q)?q.value=Me:null),title:"图数据","cancel-text":"取消","ok-text":"确认",width:"800px",onOk:pe[2]||(pe[2]=()=>q.value=!1)},{default:U(()=>[D(M2,{modelValue:B(te),"onUpdate:modelValue":pe[0]||(pe[0]=Me=>qe(te)?te.value=Me:null),mode:"json",height:"700px"},null,8,["modelValue"]),pe[3]||(pe[3]=z("div",{class:"mt-2"}," 【CTRL + F】 可快速搜索并替换 ",-1))]),_:1},8,["open"]),z("div",n5,[z("div",{class:kt(["diagram-wrapper flex-auto relative bg-[#f5f6f7] dark:bg-dark-300",{isFullscreen:B(W)}])},[at(z("div",{id:"diagram",ref_key:"fullscreenEl",ref:M,class:"lf-diagram",style:{transform:"matrix(1, 0, 0, 1, 42.6136, 91.6974)"}},null,512),[[dt,B(V)]]),B(V)?(Q(),be(Ys,{key:0,to:".lf-graph"},[(Q(!0),ie(Fe,null,ct(B(h),(Me,Le)=>(Q(),ie(Fe,{key:Le},[(Q(!0),ie(Fe,null,ct(Me,(Ae,We)=>(Q(),be(I2,{key:We,point:Ae,"point-index":We,"edge-id":Le,"canvas-client":B(i),onUpdatePoint:ue},null,8,["point","point-index","edge-id","canvas-client"]))),128))],64))),128))])):Pe("",!0),B(W)?(Q(),ie("span",{key:1,class:"absolute top-8 right-10 cursor-pointer",style:{"z-index":"8000"},onClick:K},[D(Q2,{width:22,height:22,color:"#999"})])):Pe("",!0)],2),at(D(ps,{options:B(k),mode:"horizontal",class:"hori-ruler"},null,8,["options"]),[[dt,B(V)]]),at(D(ps,{options:B(A),mode:"vertical",class:"vert-ruler"},null,8,["options"]),[[dt,B(V)]]),at(D(Mi,{id:"hori","line-direction":"horizontal",position:B(s)},null,8,["position"]),[[dt,B(r)]]),at(D(Mi,{id:"vert","line-direction":"vertical",position:B(u)},null,8,["position"]),[[dt,B(d)]]),(Q(!0),ie(Fe,null,ct(B(l),Me=>(Q(),be(Mi,{key:Me.id,id:Me.id,"line-direction":Me.direction,position:Me.pos,onDelete:g},null,8,["id","line-direction","position"]))),128))]),D(L2)])}}});const i5=it(o5,[["__scopeId","data-v-ad5e37f5"]]),_c=Jo("graphItemConfig",{state:()=>({id:"",name:"",aliasName:"",image:"",imageType:"",sectionType:"",groupId:"",groupName:"",groupType:"",config:"",files:{jsPlugin:"",json:"",javascript:"",css:"",fakeData:""},isDefault:!1,isOperate:"0",isRemote:!1,remarks:""}),getters:{getId(e){return e.id},itemConfigState(e){return e},getJson(e){return e.files.json}},actions:{set(e){this.$state={...e}},setConfig(e){this.config=e},setJsPlugin(e){this.files.jsPlugin=e},setFiles(e){this.files=e},setJson(e){this.files.json=e}}}),r5={class:"w-full h-full relative"},a5=ce({__name:"index",props:{basicProps:null,dynamicProps:null,currentAmisConfig:null,currentNodeId:null},emits:["updateProps"],setup(e,{emit:t}){const n=e,a=t,v=_c(),p=window.amisRequire("amis/embed");let f=null,m="",c="";const h=Y("antd");let i={},o={};uu(()=>{f&&(f.close(),f.unmount(),f=null,window.graphDatList=[])}),me(ht,d=>{const g=document.querySelector("html");d?g.classList.add("darkTheme"):g.classList.remove("darkTheme"),h.value=d?"dark":"antd",setTimeout(()=>{f.updateProps({theme:d?"dark":"antd"},200)})},{immediate:!0});const l=Y(!0),s=function(){if(f){const d=()=>{const C=f.getComponentByName("page1.tab.basicPropForm"),b=()=>{const w=C.getValues();o=w,v.setJson(JSON.stringify({nodes:[{id:m,type:c,text:w.content,x:w.x,y:w.y,properties:{...w,dynamic:i}}]})),m&&c&&a("updateProps",{basicForm:w,dynamicForm:i,id:m,type:c,text:{value:w.content}})};C.props.store.$mobx.changeListeners.length=0,C.props.store.$mobx.changeListeners.push(b)};d();const g=()=>{v.setJson(JSON.stringify({nodes:[{id:m,type:c,text:o.content,x:o.x,y:o.y,properties:{...o,dynamic:i}}]}))},y=C=>{C.newValue.value.tab==="交互"?setTimeout(()=>{const b=f.getComponentByName("page1.tab.dynamicService.normalService"),w=f.getComponentByName("page1.tab.dynamicService.eventsService"),_=f.getComponentByName("page1.tab.dynamicService.uiService"),I=f.getComponentByName("page1.tab.dynamicService.animationService"),E=f.getComponentByName("page1.tab.dynamicService.hiddenService");b&&b.setData(i.normalData||b.getData()),w&&w.setData(i.eventsData||w.getData()),_&&_.setData(i.uiData||_.getData()),I&&I.setData(i.animationData||I.getData()),E&&E.setData(i.hiddenData||E.getData());const k=()=>{const L=b.getData();i.normalData=L,a("updateProps",{basicForm:o,dynamicForm:i,id:m,type:c,text:{value:o.content}}),g()},A=()=>{const L=w.getData();i.eventsData=L,a("updateProps",{basicForm:o,dynamicForm:i,id:m,type:c,text:{value:o.content}}),g()},S=()=>{const L=_.getData();i.uiData=L,a("updateProps",{basicForm:o,dynamicForm:i,id:m,type:c,text:{value:o.content}})},M=()=>{const L=I.getData();i.animationData=L,a("updateProps",{basicForm:o,dynamicForm:i,id:m,type:c,text:{value:o.content}}),g()},$=()=>{const L=E.getData();i.hiddenData=L,a("updateProps",{basicForm:o,dynamicForm:i,id:m,type:c,text:{value:o.content}}),g()};b&&b.props.store.$mobx.changeListeners.splice(-1,1),w&&w.props.store.$mobx.changeListeners.splice(-1,1),_&&_.props.store.$mobx.changeListeners.splice(-1,1),I&&I.props.store.$mobx.changeListeners.splice(-1,1),E&&E.props.store.$mobx.changeListeners.splice(-1,1),b&&b.props.store.$mobx.changeListeners.push(k),w&&w.props.store.$mobx.changeListeners.push(A),_&&_.props.store.$mobx.changeListeners.push(S),I&&I.props.store.$mobx.changeListeners.push(M),E&&E.props.store.$mobx.changeListeners.push($)},500):C.newValue.value.tab==="脚本解析"?setTimeout(()=>{const b=f.getComponentByName("page1.tab.scriptService");b&&b.setData(i.scriptData||b.getData());const w=()=>{const _=b.getData();_.save&&(i.scriptData=_,a("updateProps",{basicForm:o,dynamicForm:i,id:m,type:c,text:{value:o.content}}))};b&&(b.props.store.$mobx.changeListeners.splice(-1,1),b.props.store.$mobx.changeListeners.push(w))},500):C.newValue.value.tab==="样式"&&setTimeout(()=>{d()},500)};f.getComponentByName("page1.tab").props.store.$mobx.changeListeners.push(y)}};Un().$subscribe((d,g)=>{const y=[];g.nodes.forEach(x=>{const C=[];x.properties&&Object.keys(x.properties).forEach(b=>{C.push({label:b,value:`${x.id}=${b}`})}),y.push({label:`${x.properties.nodeAlias}-${x.id}`,value:x.id,children:C})}),g.edges.forEach(x=>{const C=[];x.properties&&Object.keys(x.properties).forEach(b=>{C.push({label:b,value:`${x.id}=${b}`})}),y.push({label:`连线-${x.id}`,value:x.id,children:C})}),window.graphDataList=y},{detached:!0});const u=Lt("thingApiDTOList");return ot(()=>{f&&(f.unmount(),f.close(),f=null),window.thingApiDTOList=u.value,window.myToken=sessionStorage.getItem("token")||window.developToken,f=p.embed("#configPanel",bd,{data:{graphDataList:window.graphDataList,thingApiDTOList:u.value,myToken:sessionStorage.getItem("token")||window.developToken,myTenantCode:localStorage.getItem("v1@CacheTenantCode")||"",myCompanyId:localStorage.getItem("v1@CacheTenantCode")||""}},{theme:h.value,useMobileUI:!1}),setTimeout(()=>{s(),l.value=!1},100)}),me([()=>n.currentNodeId,()=>n.currentAmisConfig,()=>n.basicProps,()=>n.dynamicProps],([d,g,y,x],[C])=>{if(d&&g)if(d!==C)f&&(f.unmount(),f.close(),f=null,window.thingApiDTOList=u.value,f=p.embed("#configPanel",JSON.parse(g),{data:{graphDataList:window.graphDataList,thingApiDTOList:u.value,myToken:sessionStorage.getItem("token")||window.developToken,myTenantCode:localStorage.getItem("v1@CacheTenantCode")||"",myCompanyId:localStorage.getItem("v1@CacheTenantCode")||""}},{theme:h.value,useMobileUI:!1})),setTimeout(()=>{const b=f.getComponentByName("page1.tab.basicPropForm"),{properties:w,id:_,type:I}=y;m=_,c=I;const E=nt(w),k=Ca(E,["dynamic"]);o=k,i=E.dynamic||{},b.setValues({...k}),s(),l.value=!1,b.reload()},100);else{if(!f)return;const b=f.getComponentByName("page1.tab.basicPropForm"),{properties:w,id:_,type:I}=y;if(!w)return;m=_,c=I;const E=nt(w),k=Ca(E,["dynamic"]);o=k,i=E.dynamic||{},b.setValues({...k}),l.value=!1}},{deep:!0}),(d,g)=>(Q(),ie("div",r5,[D(mr,{loading:B(l)},null,8,["loading"]),g[0]||(g[0]=z("div",{id:"configPanel"},null,-1))]))}});const s5=["width","height"],l5={"clip-path":"url(#master_svg0_106_12921)"},c5=["fill"],u5=ce({__name:"computerIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12921"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",l5,[z("g",null,[z("path",{d:"M22.344,3.3104434375Q22.3433,3.3104434375,22.3448,17.0645734375Q22.3448,17.0659734375,1.65604,17.0654734375Q1.65675,17.0654734375,1.65517,3.3113834375Q1.65517,3.3099934375,22.344,3.3104434375ZM0,17.0645734375C0,17.9772734375,0.741865,18.7206734375,1.65604,18.7206734375L22.344,18.7206734375C23.26,18.7206734375,24,17.9794734375,24,17.0645734375L24,3.3113834375C24,2.3986554375,23.2581,1.6552734375,22.344,1.6552734375L1.65604,1.6552734375C0.740028,1.6552734375,0,2.3964244375,0,3.3113834375L0,17.0645734375ZM19.7051,22.5924734375C20.1622,22.5924734375,20.5327,22.2219734375,20.5327,21.7648734375L20.5327,21.7263734375C20.5327,21.2692734375,20.1622,20.8987734375,19.7051,20.8987734375L4.29489,20.8987734375C3.83782,20.8987734375,3.4673,21.2692734375,3.4673,21.7263734375L3.4673,21.7648734375C3.4673,22.2219734375,3.83782,22.5924734375,4.29489,22.5924734375Q4.75195,22.5924734375,19.7051,22.5924734375ZM11.1532,20.9180734375L12.8083,20.9180734375L12.8083,18.7206734375L11.1917,18.7206734375L11.1532,20.9180734375Z",fill:B(n),"fill-opacity":"1"},null,8,c5)])])],8,s5))}}),d5=["width","height"],h5={style:{"mix-blend-mode":"passthrough"},"clip-path":"url(#master_svg0_106_13178)"},f5={style:{"mix-blend-mode":"passthrough"},transform:"matrix(-1,0,0,-1,40.782958984375,30.3330078125)"},p5=["fill"],g5={style:{"mix-blend-mode":"passthrough"}},m5=["fill"],v5=ce({__name:"uploadIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 28.166667938232422 26"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_13178"},[z("rect",{x:"0",y:"0",width:"28.166667938232422",height:"26",rx:"0"})])],-1)),z("g",h5,[z("g",f5,[z("path",{d:"M25.5260294921875,27.08320390625C25.5260294921875,27.68150390625,26.0514794921875,28.16650390625,26.6996394921875,28.16650390625C27.347799492187498,28.16650390625,27.8732494921875,27.68150390625,27.8732494921875,27.08320390625C27.8732494921875,27.08320390625,25.5260294921875,27.08320390625,25.5260294921875,27.08320390625C25.5260294921875,27.08320390625,25.5260294921875,27.08320390625,25.5260294921875,27.08320390625ZM27.8732494921875,16.24983390625C27.8732494921875,15.65152890625,27.347799492187498,15.16650390625,26.6996394921875,15.16650390625C26.0514794921875,15.16650390625,25.5260294921875,15.65152890625,25.5260294921875,16.24983390625C25.5260294921875,16.24983390625,27.8732494921875,16.24983390625,27.8732494921875,16.24983390625C27.8732494921875,16.24983390625,27.8732494921875,16.24983390625,27.8732494921875,16.24983390625ZM22.3949594921875,21.57755390625C21.9366394921875,21.15448390625,21.1935444921875,21.15448390625,20.7352214921875,21.57755390625C20.2768984921875,22.00062390625,20.2768984921875,22.68655390625,20.7352214921875,23.10962390625C20.7352214921875,23.10962390625,22.3949594921875,21.57755390625,22.3949594921875,21.57755390625C22.3949594921875,21.57755390625,22.3949594921875,21.57755390625,22.3949594921875,21.57755390625ZM26.6996394921875,27.08320390625C26.6996394921875,27.08320390625,25.8697694921875,27.84920390625,25.8697694921875,27.84920390625C26.328099492187498,28.27220390625,27.0711794921875,28.27220390625,27.5295094921875,27.84920390625C27.5295094921875,27.84920390625,26.6996394921875,27.08320390625,26.6996394921875,27.08320390625C26.6996394921875,27.08320390625,26.6996394921875,27.08320390625,26.6996394921875,27.08320390625ZM32.6640794921875,23.10962390625C33.1223794921875,22.68655390625,33.1223794921875,22.00062390625,32.6640794921875,21.57755390625C32.2057794921875,21.15448390625,31.462679492187497,21.15448390625,31.0042794921875,21.57755390625C31.0042794921875,21.57755390625,32.6640794921875,23.10962390625,32.6640794921875,23.10962390625C32.6640794921875,23.10962390625,32.6640794921875,23.10962390625,32.6640794921875,23.10962390625ZM27.8732494921875,27.08320390625C27.8732494921875,27.08320390625,27.8732494921875,16.24983390625,27.8732494921875,16.24983390625C27.8732494921875,16.24983390625,25.5260294921875,16.24983390625,25.5260294921875,16.24983390625C25.5260294921875,16.24983390625,25.5260294921875,27.08320390625,25.5260294921875,27.08320390625C25.5260294921875,27.08320390625,27.8732494921875,27.08320390625,27.8732494921875,27.08320390625C27.8732494921875,27.08320390625,27.8732494921875,27.08320390625,27.8732494921875,27.08320390625ZM25.5260294921875,16.24983390625C25.5260294921875,16.24983390625,25.5260294921875,27.08320390625,25.5260294921875,27.08320390625C25.5260294921875,27.08320390625,27.8732494921875,27.08320390625,27.8732494921875,27.08320390625C27.8732494921875,27.08320390625,27.8732494921875,16.24983390625,27.8732494921875,16.24983390625C27.8732494921875,16.24983390625,25.5260294921875,16.24983390625,25.5260294921875,16.24983390625C25.5260294921875,16.24983390625,25.5260294921875,16.24983390625,25.5260294921875,16.24983390625ZM20.7352214921875,23.10962390625C20.7352214921875,23.10962390625,25.8697694921875,27.84920390625,25.8697694921875,27.84920390625C25.8697694921875,27.84920390625,27.5295094921875,26.31710390625,27.5295094921875,26.31710390625C27.5295094921875,26.31710390625,22.3949594921875,21.57755390625,22.3949594921875,21.57755390625C22.3949594921875,21.57755390625,20.7352214921875,23.10962390625,20.7352214921875,23.10962390625C20.7352214921875,23.10962390625,20.7352214921875,23.10962390625,20.7352214921875,23.10962390625ZM27.5295094921875,27.84920390625C27.5295094921875,27.84920390625,32.6640794921875,23.10962390625,32.6640794921875,23.10962390625C32.6640794921875,23.10962390625,31.0042794921875,21.57755390625,31.0042794921875,21.57755390625C31.0042794921875,21.57755390625,25.8697694921875,26.31710390625,25.8697694921875,26.31710390625C25.8697694921875,26.31710390625,27.5295094921875,27.84920390625,27.5295094921875,27.84920390625C27.5295094921875,27.84920390625,27.5295094921875,27.84920390625,27.5295094921875,27.84920390625Z",fill:B(n),"fill-opacity":"1"},null,8,p5)]),z("g",g5,[z("path",{d:"M4.7311311328125,14.08333C4.7311311328125,13.485025,4.2056911328125,13,3.5575211328125,13C2.9093541328125,13,2.3839111328125,13.485025,2.3839111328125,14.08333C2.3839111328125,14.08333,4.7311311328125,14.08333,4.7311311328125,14.08333C4.7311311328125,14.08333,4.7311311328125,14.08333,4.7311311328125,14.08333ZM25.7828111328125,14.08333C25.7828111328125,13.485025,25.2573111328125,13,24.6092111328125,13C23.9610111328125,13,23.4356111328125,13.485025,23.4356111328125,14.08333C23.4356111328125,14.08333,25.7828111328125,14.08333,25.7828111328125,14.08333C25.7828111328125,14.08333,25.7828111328125,14.08333,25.7828111328125,14.08333ZM2.3839111328125,14.08333C2.3839111328125,14.08333,2.3839111328125,20.58333,2.3839111328125,20.58333C2.3839111328125,20.58333,4.7311311328125,20.58333,4.7311311328125,20.58333C4.7311311328125,20.58333,4.7311311328125,14.08333,4.7311311328125,14.08333C4.7311311328125,14.08333,2.3839111328125,14.08333,2.3839111328125,14.08333C2.3839111328125,14.08333,2.3839111328125,14.08333,2.3839111328125,14.08333ZM5.9047411328125,23.8333C5.9047411328125,23.8333,22.2619111328125,23.8333,22.2619111328125,23.8333C22.2619111328125,23.8333,22.2619111328125,21.66667,22.2619111328125,21.66667C22.2619111328125,21.66667,5.9047411328125,21.66667,5.9047411328125,21.66667C5.9047411328125,21.66667,5.9047411328125,23.8333,5.9047411328125,23.8333C5.9047411328125,23.8333,5.9047411328125,23.8333,5.9047411328125,23.8333ZM25.7828111328125,20.58333C25.7828111328125,20.58333,25.7828111328125,14.08333,25.7828111328125,14.08333C25.7828111328125,14.08333,23.4356111328125,14.08333,23.4356111328125,14.08333C23.4356111328125,14.08333,23.4356111328125,20.58333,23.4356111328125,20.58333C23.4356111328125,20.58333,25.7828111328125,20.58333,25.7828111328125,20.58333C25.7828111328125,20.58333,25.7828111328125,20.58333,25.7828111328125,20.58333ZM22.2619111328125,23.8333C24.2065111328125,23.8333,25.7828111328125,22.37825,25.7828111328125,20.58333C25.7828111328125,20.58333,23.4356111328125,20.58333,23.4356111328125,20.58333C23.4356111328125,21.181649999999998,22.9101111328125,21.66667,22.2619111328125,21.66667C22.2619111328125,21.66667,22.2619111328125,23.8333,22.2619111328125,23.8333C22.2619111328125,23.8333,22.2619111328125,23.8333,22.2619111328125,23.8333ZM2.3839111328125,20.58333C2.3839111328125,22.37825,3.9602411328125,23.8333,5.9047411328125,23.8333C5.9047411328125,23.8333,5.9047411328125,21.66667,5.9047411328125,21.66667C5.256581132812499,21.66667,4.7311311328125,21.18164,4.7311311328125,20.58333C4.7311311328125,20.58333,2.3839111328125,20.58333,2.3839111328125,20.58333C2.3839111328125,20.58333,2.3839111328125,20.58333,2.3839111328125,20.58333Z",fill:B(n),"fill-opacity":"1"},null,8,m5)])])],8,d5))}}),y5=["width","height"],w5={style:{"mix-blend-mode":"passthrough"},"clip-path":"url(#master_svg0_106_13183)"},b5={style:{"mix-blend-mode":"passthrough"}},C5=["fill"],x5={style:{"mix-blend-mode":"passthrough"}},$5=["fill"],S5=ce({__name:"downloadIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 28.166667938232422 26"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_13183"},[z("rect",{x:"0",y:"0",width:"28.166667938232422",height:"26",rx:"0"})])],-1)),z("g",w5,[z("g",b5,[z("path",{d:"M12.9137248046875,14.4557625C12.9137248046875,15.0540625,13.4391748046875,15.5390625,14.0873348046875,15.5390625C14.7354948046875,15.5390625,15.260944804687501,15.0540625,15.260944804687501,14.4557625C15.260944804687501,14.4557625,12.9137248046875,14.4557625,12.9137248046875,14.4557625C12.9137248046875,14.4557625,12.9137248046875,14.4557625,12.9137248046875,14.4557625ZM15.260944804687501,3.6223925C15.260944804687501,3.0240875,14.7354948046875,2.5390625,14.0873348046875,2.5390625C13.4391748046875,2.5390625,12.9137248046875,3.0240875,12.9137248046875,3.6223925C12.9137248046875,3.6223925,15.260944804687501,3.6223925,15.260944804687501,3.6223925C15.260944804687501,3.6223925,15.260944804687501,3.6223925,15.260944804687501,3.6223925ZM9.7826548046875,8.9501125C9.3243348046875,8.5270425,8.5812398046875,8.5270425,8.1229168046875,8.9501125C7.6645938046875,9.3731825,7.6645938046875,10.059112500000001,8.1229168046875,10.4821825C8.1229168046875,10.4821825,9.7826548046875,8.9501125,9.7826548046875,8.9501125C9.7826548046875,8.9501125,9.7826548046875,8.9501125,9.7826548046875,8.9501125ZM14.0873348046875,14.4557625C14.0873348046875,14.4557625,13.257464804687501,15.2217625,13.257464804687501,15.2217625C13.7157948046875,15.6447625,14.4588748046875,15.6447625,14.9172048046875,15.2217625C14.9172048046875,15.2217625,14.0873348046875,14.4557625,14.0873348046875,14.4557625C14.0873348046875,14.4557625,14.0873348046875,14.4557625,14.0873348046875,14.4557625ZM20.0517748046875,10.4821825C20.5100748046875,10.059112500000001,20.5100748046875,9.3731825,20.0517748046875,8.9501125C19.5934748046875,8.5270425,18.850374804687497,8.5270425,18.3919748046875,8.9501125C18.3919748046875,8.9501125,20.0517748046875,10.4821825,20.0517748046875,10.4821825C20.0517748046875,10.4821825,20.0517748046875,10.4821825,20.0517748046875,10.4821825ZM15.260944804687501,14.4557625C15.260944804687501,14.4557625,15.260944804687501,3.6223925,15.260944804687501,3.6223925C15.260944804687501,3.6223925,12.9137248046875,3.6223925,12.9137248046875,3.6223925C12.9137248046875,3.6223925,12.9137248046875,14.4557625,12.9137248046875,14.4557625C12.9137248046875,14.4557625,15.260944804687501,14.4557625,15.260944804687501,14.4557625C15.260944804687501,14.4557625,15.260944804687501,14.4557625,15.260944804687501,14.4557625ZM12.9137248046875,3.6223925C12.9137248046875,3.6223925,12.9137248046875,14.4557625,12.9137248046875,14.4557625C12.9137248046875,14.4557625,15.260944804687501,14.4557625,15.260944804687501,14.4557625C15.260944804687501,14.4557625,15.260944804687501,3.6223925,15.260944804687501,3.6223925C15.260944804687501,3.6223925,12.9137248046875,3.6223925,12.9137248046875,3.6223925C12.9137248046875,3.6223925,12.9137248046875,3.6223925,12.9137248046875,3.6223925ZM8.1229168046875,10.4821825C8.1229168046875,10.4821825,13.257464804687501,15.2217625,13.257464804687501,15.2217625C13.257464804687501,15.2217625,14.9172048046875,13.6896625,14.9172048046875,13.6896625C14.9172048046875,13.6896625,9.7826548046875,8.9501125,9.7826548046875,8.9501125C9.7826548046875,8.9501125,8.1229168046875,10.4821825,8.1229168046875,10.4821825C8.1229168046875,10.4821825,8.1229168046875,10.4821825,8.1229168046875,10.4821825ZM14.9172048046875,15.2217625C14.9172048046875,15.2217625,20.0517748046875,10.4821825,20.0517748046875,10.4821825C20.0517748046875,10.4821825,18.3919748046875,8.9501125,18.3919748046875,8.9501125C18.3919748046875,8.9501125,13.257464804687501,13.6896625,13.257464804687501,13.6896625C13.257464804687501,13.6896625,14.9172048046875,15.2217625,14.9172048046875,15.2217625C14.9172048046875,15.2217625,14.9172048046875,15.2217625,14.9172048046875,15.2217625Z",fill:B(n),"fill-opacity":"1"},null,8,C5)]),z("g",x5,[z("path",{d:"M4.73253494140625,13.7786425C4.73253494140625,13.1803375,4.20709494140625,12.6953125,3.55892494140625,12.6953125C2.91075794140625,12.6953125,2.38531494140625,13.1803375,2.38531494140625,13.7786425C2.38531494140625,13.7786425,4.73253494140625,13.7786425,4.73253494140625,13.7786425C4.73253494140625,13.7786425,4.73253494140625,13.7786425,4.73253494140625,13.7786425ZM25.78421494140625,13.7786425C25.78421494140625,13.1803375,25.25871494140625,12.6953125,24.61061494140625,12.6953125C23.96241494140625,12.6953125,23.43701494140625,13.1803375,23.43701494140625,13.7786425C23.43701494140625,13.7786425,25.78421494140625,13.7786425,25.78421494140625,13.7786425C25.78421494140625,13.7786425,25.78421494140625,13.7786425,25.78421494140625,13.7786425ZM2.38531494140625,13.7786425C2.38531494140625,13.7786425,2.38531494140625,20.2786425,2.38531494140625,20.2786425C2.38531494140625,20.2786425,4.73253494140625,20.2786425,4.73253494140625,20.2786425C4.73253494140625,20.2786425,4.73253494140625,13.7786425,4.73253494140625,13.7786425C4.73253494140625,13.7786425,2.38531494140625,13.7786425,2.38531494140625,13.7786425C2.38531494140625,13.7786425,2.38531494140625,13.7786425,2.38531494140625,13.7786425ZM5.90614494140625,23.5286125C5.90614494140625,23.5286125,22.26331494140625,23.5286125,22.26331494140625,23.5286125C22.26331494140625,23.5286125,22.26331494140625,21.3619825,22.26331494140625,21.3619825C22.26331494140625,21.3619825,5.90614494140625,21.3619825,5.90614494140625,21.3619825C5.90614494140625,21.3619825,5.90614494140625,23.5286125,5.90614494140625,23.5286125C5.90614494140625,23.5286125,5.90614494140625,23.5286125,5.90614494140625,23.5286125ZM25.78421494140625,20.2786425C25.78421494140625,20.2786425,25.78421494140625,13.7786425,25.78421494140625,13.7786425C25.78421494140625,13.7786425,23.43701494140625,13.7786425,23.43701494140625,13.7786425C23.43701494140625,13.7786425,23.43701494140625,20.2786425,23.43701494140625,20.2786425C23.43701494140625,20.2786425,25.78421494140625,20.2786425,25.78421494140625,20.2786425C25.78421494140625,20.2786425,25.78421494140625,20.2786425,25.78421494140625,20.2786425ZM22.26331494140625,23.5286125C24.20791494140625,23.5286125,25.78421494140625,22.0735625,25.78421494140625,20.2786425C25.78421494140625,20.2786425,23.43701494140625,20.2786425,23.43701494140625,20.2786425C23.43701494140625,20.876962499999998,22.91151494140625,21.3619825,22.26331494140625,21.3619825C22.26331494140625,21.3619825,22.26331494140625,23.5286125,22.26331494140625,23.5286125C22.26331494140625,23.5286125,22.26331494140625,23.5286125,22.26331494140625,23.5286125ZM2.38531494140625,20.2786425C2.38531494140625,22.0735625,3.96164494140625,23.5286125,5.90614494140625,23.5286125C5.90614494140625,23.5286125,5.90614494140625,21.3619825,5.90614494140625,21.3619825C5.257984941406249,21.3619825,4.73253494140625,20.8769525,4.73253494140625,20.2786425C4.73253494140625,20.2786425,2.38531494140625,20.2786425,2.38531494140625,20.2786425C2.38531494140625,20.2786425,2.38531494140625,20.2786425,2.38531494140625,20.2786425Z",fill:B(n),"fill-opacity":"1"},null,8,$5)])])],8,y5))}}),k5=["width","height"],_5={"clip-path":"url(#master_svg0_106_13172)"},M5=["fill"],A5=ce({__name:"saveIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 26 26"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_13172"},[z("rect",{x:"0",y:"0",width:"26",height:"26",rx:"0"})])],-1)),z("g",_5,[z("g",null,[z("path",{d:"M23.49265,9.062619999999999L16.937350000000002,2.507375C16.63245,2.202515,16.219250000000002,2.03125,15.78855,2.03125L3.65625,2.03125C2.758787,2.031249806285,2.03125,2.758787,2.03125,3.65625L2.03125,22.34375C2.03125,23.24125,2.758787,23.96875,3.65625,23.96875L22.34375,23.96875C23.24125,23.96875,23.96875,23.24125,23.96875,22.34375L23.96875,10.2115C23.96865,9.780560000000001,23.79735,9.3673,23.49265,9.062619999999999ZM7.3125,3.65625L12.18745,3.65625L12.18745,6.5L7.3125,6.5L7.3125,3.65625ZM18.68745,22.34375L7.3125,22.34375L7.3125,18.68745L18.68745,18.68745L18.68745,22.34375ZM22.34375,22.34375L20.31245,22.34375L20.31245,17.87505C20.31245,17.42625,19.94875,17.06245,19.50005,17.06245L6.5,17.06245C6.05127,17.06245,5.6875,17.42625,5.6875,17.87505L5.6875,22.34375L3.65625,22.34375L3.65625,3.65625L5.6875,3.65625L5.6875,7.3125C5.6875,7.76123,6.05127,8.125,6.5,8.125L12.99995,8.125C13.44875,8.125,13.81245,7.76123,13.81245,7.3125L13.81245,3.65625L15.78845,3.65625L22.34375,10.2115L22.34375,22.34375Z",fill:B(n),"fill-opacity":"1"},null,8,M5)])])],8,k5))}}),L5=["width","height"],E5={"clip-path":"url(#master_svg0_106_12937)"},I5=["fill"],T5=["fill"],D5=["fill"],R5=ce({__name:"previewIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 24 24"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_106_12937"},[z("rect",{x:"0",y:"0",width:"24",height:"24",rx:"0"})])],-1)),z("g",E5,[z("g",null,[z("path",{d:"M12.00001033203125,15.06825796875C13.91251033203125,15.06825796875,15.69379033203125,14.07685796875,17.37889033203125,12.00029796875C15.69139033203125,9.92372796875,13.91251033203125,8.93232796875,12.00001033203125,8.93232796875C10.08751033203125,8.93232796875,8.30626033203125,9.92372796875,6.62111033203125,12.00029796875C8.30626033203125,14.07685796875,10.08751033203125,15.06825796875,12.00001033203125,15.06825796875ZM12.00001033203125,16.52841796875C9.53204033203125,16.52841796875,7.2797003320312506,15.27216796875,5.23829333203125,12.76200796875C4.87735583203125,12.31903796875,4.87735583203125,11.68388796875,5.23829333203125,11.24091796875C7.2797003320312506,8.72841796875,9.53204033203125,7.47216796875,12.00001033203125,7.47216796875C14.46798033203125,7.47216796875,16.72029033203125,8.72841796875,18.76169033203125,11.23857796875C19.122690332031247,11.68154796875,19.122690332031247,12.316697968749999,18.76169033203125,12.75966796875C16.72029033203125,15.27216796875,14.46798033203125,16.52841796875,12.00001033203125,16.52841796875Z",fill:B(n),"fill-opacity":"1"},null,8,I5)]),z("g",null,[z("path",{d:"M11.999994907226561,12.65595453125C12.363274907226563,12.65595453125,12.656244907226561,12.36298453125,12.656244907226561,11.99970453125C12.656244907226561,11.63876453125,12.363274907226563,11.34345453125,11.999994907226561,11.34345453125C11.636704907226562,11.34345453125,11.343744907226563,11.63642453125,11.343744907226563,11.99970453125C11.343744907226563,12.36064453125,11.636704907226562,12.65595453125,11.999994907226561,12.65595453125ZM11.999994907226561,14.34111453125C11.163274907226562,14.34111453125,10.389833907226562,13.89580453125,9.970302907226563,13.17158453125C9.550771907226563,12.447364531249999,9.550771907226563,11.55439453125,9.970302907226563,10.83017453125C10.389833907226562,10.10595653125,11.163274907226562,9.66064453125,11.999994907226561,9.66064453125C13.293744907226563,9.66064453125,14.343744907226561,10.70830453125,14.343744907226561,12.00205453125C14.343744907226561,13.29345453125,13.293744907226563,14.34111453125,11.999994907226561,14.34111453125Z",fill:B(n),"fill-opacity":"1"},null,8,T5)]),z("g",null,[z("path",{d:"M3.1875,20.8125L3.1875,17.460900000000002C3.1875,16.994500000000002,2.8101599999999998,16.6172,2.34375,16.6172C1.877344,16.6172,1.5,16.994500000000002,1.5,17.460900000000002L1.5,21.0938C1.5,21.8695,2.1304689999999997,22.5,2.90625,22.5L6.53906,22.5C7.00547,22.5,7.38281,22.1227,7.38281,21.6562C7.38281,21.1898,7.00547,20.8125,6.53906,20.8125L3.1875,20.8125ZM3.1875,3.1875L6.53906,3.1875C7.00547,3.1875,7.38281,2.8101599999999998,7.38281,2.34375C7.38281,1.877344,7.00547,1.5,6.53906,1.5L2.90625,1.5C2.1304689999999997,1.5,1.5,2.1304689999999997,1.5,2.90625L1.5,6.53906C1.5,7.00547,1.877344,7.38281,2.34375,7.38281C2.8101599999999998,7.38281,3.1875,7.00547,3.1875,6.53906L3.1875,3.1875ZM20.8125,3.1875L20.8125,6.53906C20.8125,7.00547,21.1898,7.38281,21.6562,7.38281C22.1227,7.38281,22.5,7.00547,22.5,6.53906L22.5,2.90625C22.5,2.1304689999999997,21.8695,1.5,21.0938,1.5L17.460900000000002,1.5C16.994500000000002,1.5,16.6172,1.877344,16.6172,2.34375C16.6172,2.8101599999999998,16.994500000000002,3.1875,17.460900000000002,3.1875L20.8125,3.1875ZM20.8125,20.8125L17.460900000000002,20.8125C16.994500000000002,20.8125,16.6172,21.1898,16.6172,21.6562C16.6172,22.1227,16.994500000000002,22.5,17.460900000000002,22.5L21.0938,22.5C21.8695,22.5,22.5,21.8695,22.5,21.0938L22.5,17.460900000000002C22.5,16.994500000000002,22.1227,16.6172,21.6562,16.6172C21.1898,16.6172,20.8125,16.994500000000002,20.8125,17.460900000000002L20.8125,20.8125Z",fill:B(n),"fill-opacity":"1"},null,8,D5)])])],8,L5))}}),P5={class:"header-center flex-auto flex items-center justify-center"},N5={class:"header-right flex justify-evenly items-center"},O5={"dark:bg-dark":"","bg-white":"","border-rd-2":"","px-2":"","py-1":"","cursor-pointer":""},B5=ce({__name:"index",props:{pageName:null},emits:["preview","publish","download","save","uploadDashboard"],setup(e,{emit:t}){const n=e,a=t,{pageName:v}=xe(n),p=Y("#888");me(ht,o=>{p.value=o?"#ffffff":"#888"});const f=()=>{a("preview")},m=()=>{a("publish")},c=()=>{a("download")},h=()=>!1,i=o=>{const l=new FileReader;l.readAsText(o.file),l.onload=function(){a("uploadDashboard",this.result)}};return(o,l)=>{const s=en,r=Mn,u=sd;return Q(),ie(Fe,null,[l[6]||(l[6]=z("div",{class:"header-left"},null,-1)),z("div",P5,[z("div",null,[D(u5,{width:20,height:20,color:B(p)},null,8,["color"]),ve(xt(B(v)||"工作页面001"),1)])]),z("div",N5,[z("div",{"dark:bg-dark":"","bg-white":"","border-rd-2":"","px-2":"","py-1":"","cursor-pointer":"",onClick:c},[D(s,null,{title:U(()=>l[0]||(l[0]=[ve(" 下载 ")])),default:U(()=>[D(S5,{width:20,height:20,color:B(p)},null,8,["color"])]),_:1})]),z("div",O5,[D(s,null,{title:U(()=>l[1]||(l[1]=[ve(" 上传 ")])),default:U(()=>[D(u,{action:"","show-upload-list":!1,"before-upload":h,onChange:i},{default:U(()=>[D(r,{style:{padding:"0",height:"20px",border:"none"}},{default:U(()=>[D(v5,{width:20,height:20,color:B(p)},null,8,["color"])]),_:1})]),_:1})]),_:1})]),z("div",{"dark:bg-dark":"","bg-white":"","border-rd-2":"","px-2":"","py-1":"","cursor-pointer":"",onClick:m},[D(s,null,{title:U(()=>l[2]||(l[2]=[ve(" 保存 ")])),default:U(()=>[D(A5,{width:20,height:20,color:B(p)},null,8,["color"])]),_:1})]),z("div",{"dark:bg-dark":"","bg-white":"","border-rd-2":"","px-2":"","py-1":"","cursor-pointer":"",onClick:f},[D(s,null,{title:U(()=>l[3]||(l[3]=[ve(" 预览 ")])),default:U(()=>[D(R5,{width:20,height:20,color:B(p),class:"mr-1"},null,8,["color"]),l[4]||(l[4]=ve()),l[5]||(l[5]=z("span",{style:{"font-size":"14px","vertical-align":"middle"}},"预览",-1))]),_:1})])])],64)}}});const F5=it(B5,[["__scopeId","data-v-3c3bfccb"]]),H5=ce({props:{modalVisible:{type:Boolean,default:!1}},emits:["selected"],setup(e,{emit:t}){const n=Ct({materilGroup:null,materialName:""}),a=Y([]),v=Y([]),p=Y(1),f=Y(24),m=Y(0),c=Y(!1),h=Y([]),i=Y(["16","24","32","40","48"]),o=async()=>{const d=await ln.getMaterialGroupTreeList({name:"",type:"material"});if(d.code!==0)return ye.warning(d.msg);a.value=d.data||[]},l=async()=>{var g,y;c.value=!0;const d=await ln.getMaterialList({limit:f.value,page:p.value,name:n.materialName,groupIds:n.materilGroup});if(d.code!==0)return ye.warning(d.msg);h.value=((g=d.data)==null?void 0:g.list.map(x=>(x.checked=!1,x)))||[],m.value=(y=d.data)==null?void 0:y.total,c.value=!1},s=(d,g)=>{f.value=g,p.value=d,l()},r=d=>{h.value.forEach(g=>{g.id!==d.id?g.checked=!1:g.checked=!0}),t("selected",d.image)},u=Ut(()=>{p.value=1,l()},500);return ot(()=>{o(),l()}),{formState:n,materilGroupOpts:a,materialNameOpts:v,currentPage:p,myPageSize:f,total:m,loading:c,materialList:h,getMaterialList:l,onChange:s,itemCheckedHandler:r,pageSizeOptions:i,materialNameChange:u}}});const z5={class:"flex justify-center items-center"},W5={class:"mb-3 grid-box"};function V5(e,t,n,a,v,p){const f=il,m=pn,c=hn,h=gn,i=hr,o=jr,l=_o,s=ul,r=od;return Q(),ie(Fe,null,[D(h,{model:e.formState,name:"material","label-col":{span:8},"wrapper-col":{span:16},layout:"inline",autocomplete:"off",style:{"margin-bottom":"15px"}},{default:U(()=>[D(m,{label:"素材组",name:"materilGroup"},{default:U(()=>[D(f,{ref:"select",value:e.formState.materilGroup,"onUpdate:value":t[0]||(t[0]=u=>e.formState.materilGroup=u),"tree-data":e.materilGroupOpts,"allow-clear":!0,"field-names":{label:"name",value:"id",children:"typeList"},placeholder:"选择素材组","tree-default-expand-all":"","show-search":"","tree-node-filter-prop":"name","dropdown-match-select-width":!1,style:{width:"120px"},onChange:t[1]||(t[1]=u=>(e.currentPage=1,e.getMaterialList()))},null,8,["value","tree-data"])]),_:1}),D(m,{label:"素材名称",name:"materialName"},{default:U(()=>[D(c,{ref:"select",value:e.formState.materialName,"onUpdate:value":t[2]||(t[2]=u=>e.formState.materialName=u),placeholder:"搜索素材名称","allow-clear":!0,style:{width:"150px"},onChange:e.materialNameChange},null,8,["value","onChange"])]),_:1})]),_:1},8,["model"]),z("div",z5,[D(i,{spinning:e.loading},null,8,["spinning"])]),z("div",W5,[(Q(!0),ie(Fe,null,ct(e.materialList,(u,d)=>(Q(),be(s,{key:d,title:"",style:{"margin-bottom":"10px","margin-right":"10px"},class:"material-card"},{default:U(()=>[D(o,{width:115,height:115,src:u.image},null,8,["src"]),D(l,{checked:u.checked,class:"selectedBtn absolute top-1 right-1 z-1000 flex justify-end",onChange:g=>e.itemCheckedHandler(u)},null,8,["checked","onChange"])]),_:2},1024))),128))]),D(r,{current:e.currentPage,"onUpdate:current":t[3]||(t[3]=u=>e.currentPage=u),pageSize:e.myPageSize,"onUpdate:pageSize":t[4]||(t[4]=u=>e.myPageSize=u),total:e.total,"page-size-options":e.pageSizeOptions,"show-less-items":"",onChange:e.onChange},{buildOptionText:U(u=>[z("span",null,xt(u.value)+"条/页",1)]),_:1},8,["current","pageSize","total","page-size-options","onChange"])],64)}const j5=it(H5,[["render",V5],["__scopeId","data-v-e8f34da1"]]);function U5(e){return new Promise((t,n)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>t(a.result),a.onerror=v=>n(v)})}const G5=ce({components:{CloudUploadOutlined:pg,FileImageOutlined:mg,SelectMaterial:j5,ViewModeIcon:Qi,DeleteIcon:ao},emits:["imagedChanged"],setup(e,{emit:t}){const n=Y(!1),a=Y(""),v=s=>(["image/png","image/jpg","image/jpeg","image/jif"].includes(s.type)||ye.error(`${s.name} 不是有效文件`),s.size/1024/1024<5||ye.error("文件大小不能小于 5MB!"),!1),p=async s=>{a.value=await U5(s.file),t("imagedChanged",a.value),ye.success(`${s.file.name} 文件上传成功.`)},f=Y([]),m=()=>{a.value="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=",f.value.length=0,t("imagedChanged","")},c=Y(!1),h=Y("");return{previewVisible:n,previewSrc:a,beforeUpload:v,handleChange:p,removeImage:m,fileList:f,handleDrop:s=>{},chooseImage:()=>{c.value=!0},materialVisible:c,selectMaterial:()=>{h.value&&(c.value=!1,a.value=h.value,t("imagedChanged",h.value))},selectMaterialHandler:s=>{h.value=s}}}});const Y5={class:"ant-upload-drag-icon"},Z5={key:0,class:"preview absolute w-full h-full top-0 bottom-0 left-0 right-0 z-100"},K5=["src"],X5={class:"preview-overlay flex justify-center items-center"},Q5={class:"image-handle-icon"},J5=["src"];function q5(e,t,n,a,v,p){const f=et("CloudUploadOutlined"),m=et("ViewModeIcon"),c=et("DeleteIcon"),h=et("FileImageOutlined"),i=ld,o=Bt,l=et("SelectMaterial");return Q(),ie(Fe,null,[D(i,{fileList:e.fileList,"onUpdate:fileList":t[1]||(t[1]=s=>e.fileList=s),name:"file","max-count":1,"before-upload":e.beforeUpload,class:"relative uploadDragger","show-upload-list":!1,onChange:e.handleChange,onDrop:e.handleDrop},{default:U(()=>[z("p",Y5,[D(f)]),t[5]||(t[5]=z("p",{class:"ant-upload-text text-1"}," 点击/拖拽上传 ",-1)),t[6]||(t[6]=z("p",{class:"ant-upload-hint"}," 背景图小于5M, 采用png, jpg, jpeg, gif 等格式 ",-1)),e.previewSrc?(Q(),ie("div",Z5,[z("img",{src:e.previewSrc,class:"w-full h-full"},null,8,K5),z("div",X5,[z("div",Q5,[D(m,{width:16,height:16,color:"#fff",class:"previewIcon inline-block mr-3",onClick:t[0]||(t[0]=$n(s=>e.previewVisible=!0,["stop"]))}),D(c,{width:16,height:16,color:"#fff",class:"deleteIcon inline-block mr-3",onClick:$n(e.removeImage,["stop"])},null,8,["onClick"]),D(h,{style:{color:"#ffffff"},class:"imageIcon inline-block",onClick:$n(e.chooseImage,["stop"])},null,8,["onClick"])])])])):Pe("",!0)]),_:1},8,["fileList","before-upload","onChange","onDrop"]),D(o,{open:e.previewVisible,"onUpdate:open":t[2]||(t[2]=s=>e.previewVisible=s),footer:null,width:"1000px",onCancel:t[3]||(t[3]=s=>e.previewVisible=!1)},{default:U(()=>[z("img",{alt:"example",style:{width:"100%"},src:e.previewSrc},null,8,J5)]),_:1},8,["open"]),D(o,{open:e.materialVisible,"onUpdate:open":t[4]||(t[4]=s=>e.materialVisible=s),title:"选择素材",width:"1250px","ok-text":"确认","cancel-text":"取消",onOk:e.selectMaterial},{default:U(()=>[D(l,{"modal-visible":e.materialVisible,onSelected:e.selectMaterialHandler},null,8,["modal-visible","onSelected"])]),_:1},8,["open","onOk"])],64)}const e3=it(G5,[["render",q5],["__scopeId","data-v-f22590aa"]]),t3=["accept"],n3=ce({__name:"Upload",props:{option:{type:Object,required:!0}},setup(e,{expose:t}){const n=e,a={json:".json",image:"image/*"},v={option:n.option},p=Y();function f(h){v.option=h;let i=a[h.resultType];h.accept&&(i=h.accept),p.value.setAttribute("accept",i),p.value.click()}async function m(h){if(!v.option||!v.option.onChange)return;const{resultType:i,onChange:o}=v.option;let l=h;const s=h.target.files[0];["json","text"].includes(i)?l=await c(s):i==="image"&&(l=await c(s,i)),o(l,s),p.value.value=""}function c(h,i="text"){return new Promise(o=>{const l=new FileReader;l.addEventListener("load",s=>{const r=s.target.result||"{}";o(r)}),i==="text"?l.readAsText(h):l.readAsDataURL(h)})}return ot(()=>{f(n.option)}),t({open:f}),(h,i)=>{var o;return Q(),ie("input",{ref_key:"inpurRef",ref:p,type:"file",accept:(o=v.option)==null?void 0:o.accept,class:"es-upload",onChange:m},null,40,t3)}}});const o3=it(n3,[["__scopeId","data-v-38e273c3"]]);let Ho=null;function i3(e){if(Ho){const{open:t}=Ho.component.exposed;t(e)}else{const t=document.createElement("div");Ho=D(o3,{option:e}),du(Ho,t),document.body.appendChild(t.firstElementChild)}}const r3=""+new URL("../defaultPic.svg",import.meta.url).href,a3={class:"screen-shot mb-3 w-full flex justify-between"},s3={class:"flex flex-1 items-center justify-between"},l3={class:"flex-auto"},c3=["src"],u3=["src"],d3={class:"preview-mask"},h3=["src"],f3=ce({__name:"ScreenShot",emits:["uploadThumbnai"],setup(e,{emit:t}){const n=t,a=Lt("thumbnailImageUrl"),v=Y(""),p=Y(!1),f=Y(!1);me(a,o=>{o?v.value=o:v.value=""});async function m(o){v.value=o,f.value=!1;const l=window.atob(o.split(",")[1]),s=new ArrayBuffer(l.length),r=new Uint8Array(s);for(let g=0;g<l.length;g++)r[g]=l.charCodeAt(g);const u=new Blob([s],{type:"image/jpeg"}),d=new FormData;d.append("file",u,`${Date.now()}.jpeg`),n("uploadThumbnai",d)}function c(){f.value=!1}function h(){v.value="",p.value=!1,n("uploadThumbnai",null)}async function i(){i3({resultType:"image",onChange(o){m(o)}})}return(o,l)=>{const s=Mn,r=Zu,u=hu,d=ul,g=et("screen-short"),y=Bt;return Q(),ie("div",a3,[z("div",s3,[l[5]||(l[5]=z("div",{style:{flex:"0 0 50px"}}," 缩略图 ",-1)),z("div",l3,[D(r,{class:"mt-3 mb-2 w-full flex"},{default:U(()=>[D(s,{class:"flex-1",onClick:l[0]||(l[0]=x=>f.value=!0)},{default:U(()=>l[3]||(l[3]=[ve(" 截取封面 ")])),_:1}),D(s,{class:"flex-1",onClick:i},{default:U(()=>l[4]||(l[4]=[ve(" 上传封面 ")])),_:1})]),_:1}),D(d,{class:"preview-card relative h-[150px] w-full"},{default:U(()=>[B(v)?(Q(),ie("img",{key:0,src:B(v),alt:"封面预览",class:"h-full w-full object-contain"},null,8,c3)):(Q(),be(u,{key:1,description:""},{image:U(()=>[z("img",{src:B(r3),alt:"无封面",style:{width:"35px",height:"35px"}},null,8,u3)]),_:1})),z("div",d3,[z("span",{class:"mr-2 cursor-pointer",onClick:l[1]||(l[1]=x=>B(v)&&(p.value=!0))},[D(Sc,{width:20,height:20,color:"#999"})]),z("span",{class:"cursor-pointer",onClick:h},[D(ao,{width:20,height:20,color:"#999"})])])]),_:1})])]),B(f)?(Q(),be(g,{key:0,onGetImageData:m,onDestroyComponent:c})):Pe("",!0),D(y,{open:B(p),"onUpdate:open":l[2]||(l[2]=x=>qe(p)?p.value=x:null),style:{width:"800px"}},{default:U(()=>[z("img",{src:B(v),alt:"封面预览",class:"h-full w-full object-contain"},null,8,h3)]),_:1},8,["open"])])}}});const p3=it(f3,[["__scopeId","data-v-2a33828d"]]);/*!
|
|
* vue-color-kit v1.0.6
|
|
* (c) 2023
|
|
* @license MIT
|
|
*/function Rn(e){let t={r:0,g:0,b:0,a:1};/#/.test(e)?t=m3(e):/rgb/.test(e)?t=Ts(e):typeof e=="string"?t=Ts(`rgba(${e})`):Object.prototype.toString.call(e)==="[object Object]"&&(t=e);const{r:n,g:a,b:v,a:p}=t,{h:f,s:m,v:c}=v3(t);return{r:n,g:a,b:v,a:p===void 0?1:p,h:f,s:m,v:c}}function oa(e){const t=document.createElement("canvas"),n=t.getContext("2d"),a=e*2;return t.width=a,t.height=a,n.fillStyle="#ffffff",n.fillRect(0,0,a,a),n.fillStyle="#ccd5db",n.fillRect(0,0,e,e),n.fillRect(e,e,e,e),t}function er(e,t,n,a,v,p){const f=e==="l",m=t.createLinearGradient(0,0,f?n:0,f?0:a);m.addColorStop(.01,v),m.addColorStop(.99,p),t.fillStyle=m,t.fillRect(0,0,n,a)}function g3({r:e,g:t,b:n},a){const v=f=>("0"+Number(f).toString(16)).slice(-2),p=`#${v(e)}${v(t)}${v(n)}`;return a?p.toUpperCase():p}function m3(e){e=e.slice(1);const t=n=>parseInt(n,16)||0;return{r:t(e.slice(0,2)),g:t(e.slice(2,4)),b:t(e.slice(4,6))}}function Ts(e){return typeof e=="string"?(e=(/rgba?\((.*?)\)/.exec(e)||["","0,0,0,1"])[1].split(","),{r:Number(e[0])||0,g:Number(e[1])||0,b:Number(e[2])||0,a:Number(e[3]?e[3]:1)}):e}function v3({r:e,g:t,b:n}){e=e/255,t=t/255,n=n/255;const a=Math.max(e,t,n),v=Math.min(e,t,n),p=a-v;let f=0;a===v?f=0:a===e?t>=n?f=60*(t-n)/p:f=60*(t-n)/p+360:a===t?f=60*(n-e)/p+120:a===n&&(f=60*(e-t)/p+240),f=Math.floor(f);let m=parseFloat((a===0?0:1-v/a).toFixed(2)),c=parseFloat(a.toFixed(2));return{h:f,s:m,v:c}}var ia=ce({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const e=this.$refs.canvasSaturation,t=this.size,n=e.getContext("2d");e.width=t,e.height=t,n.fillStyle=this.color,n.fillRect(0,0,t,t),er("l",n,t,t,"#FFFFFF","rgba(255,255,255,0)"),er("p",n,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(e){const{top:t,left:n}=this.$el.getBoundingClientRect(),a=e.target.getContext("2d"),v=f=>{let m=f.clientX-n,c=f.clientY-t;m<0&&(m=0),c<0&&(c=0),m>this.size&&(m=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:m-5+"px",top:c-5+"px"};const h=a.getImageData(Math.min(m,this.size-1),Math.min(c,this.size-1),1,1),[i,o,l]=h.data;this.$emit("selectSaturation",{r:i,g:o,b:l})};v(e);const p=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",p)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",p)}}});const y3={ref:"canvasSaturation"};function w3(e,t,n,a,v,p){return Q(),be("div",{class:"saturation",onMousedown:t[1]||(t[1]=$n((...f)=>e.selectSaturation&&e.selectSaturation(...f),["prevent","stop"]))},[D("canvas",y3,null,512),D("div",{style:e.slideSaturationStyle,class:"slide"},null,4)],32)}ia.render=w3;ia.__file="src/color/Saturation.vue";var ra=ce({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const e=this.$refs.canvasHue,t=this.width,n=this.height,a=e.getContext("2d");e.width=t,e.height=n;const v=a.createLinearGradient(0,0,0,n);v.addColorStop(0,"#FF0000"),v.addColorStop(.17*1,"#FF00FF"),v.addColorStop(.17*2,"#0000FF"),v.addColorStop(.17*3,"#00FFFF"),v.addColorStop(.17*4,"#00FF00"),v.addColorStop(.17*5,"#FFFF00"),v.addColorStop(1,"#FF0000"),a.fillStyle=v,a.fillRect(0,0,t,n)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(e){const{top:t}=this.$el.getBoundingClientRect(),n=e.target.getContext("2d"),a=p=>{let f=p.clientY-t;f<0&&(f=0),f>this.height&&(f=this.height),this.slideHueStyle={top:f-2+"px"};const m=n.getImageData(0,Math.min(f,this.height-1),1,1),[c,h,i]=m.data;this.$emit("selectHue",{r:c,g:h,b:i})};a(e);const v=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",v)}}});const b3={ref:"canvasHue"};function C3(e,t,n,a,v,p){return Q(),be("div",{class:"hue",onMousedown:t[1]||(t[1]=$n((...f)=>e.selectHue&&e.selectHue(...f),["prevent","stop"]))},[D("canvas",b3,null,512),D("div",{style:e.slideHueStyle,class:"slide"},null,4)],32)}ra.render=C3;ra.__file="src/color/Hue.vue";var aa=ce({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const e=this.$refs.canvasAlpha,t=this.width,n=this.height,a=this.alphaSize,v=oa(a),p=e.getContext("2d");e.width=t,e.height=n,p.fillStyle=p.createPattern(v,"repeat"),p.fillRect(0,0,t,n),er("p",p,t,n,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(e){const{top:t}=this.$el.getBoundingClientRect(),n=v=>{let p=v.clientY-t;p<0&&(p=0),p>this.height&&(p=this.height);let f=parseFloat((p/this.height).toFixed(2));this.$emit("selectAlpha",f)};n(e);const a=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)}}});const x3={ref:"canvasAlpha"};function $3(e,t,n,a,v,p){return Q(),be("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=$n((...f)=>e.selectAlpha&&e.selectAlpha(...f),["prevent","stop"]))},[D("canvas",x3,null,512),D("div",{style:e.slideAlphaStyle,class:"slide"},null,4)],32)}aa.render=$3;aa.__file="src/color/Alpha.vue";var sa=ce({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const e=this.$el,t=this.width,n=this.height,a=this.alphaSize,v=oa(a),p=e.getContext("2d");e.width=t,e.height=n,p.fillStyle=p.createPattern(v,"repeat"),p.fillRect(0,0,t,n),p.fillStyle=this.color,p.fillRect(0,0,t,n)}}});function S3(e,t,n,a,v,p){return Q(),be("canvas")}sa.render=S3;sa.__file="src/color/Preview.vue";var la=ce({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(e){this.isSucking=!1,this.suckColor(e)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(e){e.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(e){const{clientX:t,clientY:n}=e,{top:a,left:v,width:p,height:f}=this.suckerCanvas.getBoundingClientRect(),m=t-v,c=n-a,i=this.suckerCanvas.getContext("2d").getImageData(Math.min(m,p-1),Math.min(c,f-1),1,1);let[o,l,s,r]=i.data;r=parseFloat((r/255).toFixed(2));const u=this.suckerPreview.style;Object.assign(u,{position:"absolute",left:t+20+"px",top:n-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${o}, ${l}, ${s}, ${r})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&n>=this.suckerArea[1]&&t<=this.suckerArea[2]&&n<=this.suckerArea[3]?u.display="":u.display="none"},suckColor(e){e&&e.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),e.addEventListener("click",t=>{const{clientX:n,clientY:a}=t,{top:v,left:p,width:f,height:m}=e.getBoundingClientRect(),c=n-p,h=a-v,o=e.getContext("2d").getImageData(Math.min(c,f-1),Math.min(h,m-1),1,1);let[l,s,r,u]=o.data;u=parseFloat((u/255).toFixed(2)),this.$emit("selectSucker",{r:l,g:s,b:r,a:u})}))}}});const k3=D("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),_3={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},M3=D("g",{fill:"none","fill-rule":"evenodd"},[D("g",{transform:"translate(1 1)","stroke-width":"4"},[D("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),D("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[D("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function A3(e,t,n,a,v,p){return Q(),be("div",null,[e.isSucking?Pe("v-if",!0):(Q(),be("svg",{key:0,class:[{active:e.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...f)=>e.openSucker&&e.openSucker(...f))},[k3],2)),e.isSucking?(Q(),be("svg",_3,[M3])):Pe("v-if",!0)])}la.render=A3;la.__file="src/color/Sucker.vue";var ca=ce({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(e,{emit:t}){return{modelColor:le({get(){return e.color||""},set(p){t("inputColor",p)}}),handleFocus:p=>{t("inputFocus",p)},handleBlur:p=>{t("inputBlur",p)}}}});const L3={class:"color-type"},E3={class:"name"};function I3(e,t,n,a,v,p){return Q(),be("div",L3,[D("span",E3,xt(e.name),1),at(D("input",{"onUpdate:modelValue":t[1]||(t[1]=f=>e.modelColor=f),class:"value",onFocus:t[2]||(t[2]=(...f)=>e.handleFocus&&e.handleFocus(...f)),onBlur:t[3]||(t[3]=(...f)=>e.handleBlur&&e.handleBlur(...f))},null,544),[[Zs,e.modelColor]])])}ca.render=I3;ca.__file="src/color/Box.vue";var ua=ce({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(e,{emit:t}){const n=Y(),a=Y([]),v=Y();e.colorsHistoryKey&&localStorage&&(a.value=JSON.parse(localStorage.getItem(e.colorsHistoryKey))||[]),v.value=oa(4).toDataURL(),Fn(()=>{p(n.value)});function p(m){if(!m)return;const c=a.value||[],h=c.indexOf(m);h>=0&&c.splice(h,1),c.length>=8&&(c.length=7),c.unshift(m),a.value=c||[],localStorage&&e.colorsHistoryKey&&localStorage.setItem(e.colorsHistoryKey,JSON.stringify(c))}function f(m){t("selectColor",m)}return{setColorsHistory:p,colorsHistory:a,color:n,imgAlphaBase64:v,selectColor:f}}});const T3={class:"colors"},D3={key:0,class:"colors history"};function R3(e,t,n,a,v,p){return Q(),be("div",null,[D("ul",T3,[(Q(!0),be(Fe,null,ct(e.colorsDefault,f=>(Q(),be("li",{key:f,class:"item",onClick:m=>e.selectColor(f)},[D("div",{style:{background:`url(${e.imgAlphaBase64})`},class:"alpha"},null,4),D("div",{style:{background:f},class:"color"},null,4)],8,["onClick"]))),128))]),e.colorsHistory.length?(Q(),be("ul",D3,[(Q(!0),be(Fe,null,ct(e.colorsHistory,f=>(Q(),be("li",{key:f,class:"item",onClick:m=>e.selectColor(f)},[D("div",{style:{background:`url(${e.imgAlphaBase64})`},class:"alpha"},null,4),D("div",{style:{background:f},class:"color"},null,4)],8,["onClick"]))),128))])):Pe("v-if",!0)])}ua.render=R3;ua.__file="src/color/Colors.vue";var Jn=ce({components:{Saturation:ia,Hue:ra,Alpha:aa,Preview:sa,Sucker:la,Box:ca,Colors:ua},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return g3(this.rgba,!0)}},created(){Object.assign(this,Rn(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(e){const{r:t,g:n,b:a,h:v,s:p,v:f}=Rn(e);Object.assign(this,{r:t,g:n,b:a,h:v,s:p,v:f}),this.setText()},handleFocus(e){this.$emit("inputFocus",e)},handleBlur(e){this.$emit("inputBlur",e)},selectHue(e){const{r:t,g:n,b:a,h:v,s:p,v:f}=Rn(e);Object.assign(this,{r:t,g:n,b:a,h:v,s:p,v:f}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(e){this.a=e,this.setText()},inputHex(e){const{r:t,g:n,b:a,a:v,h:p,s:f,v:m}=Rn(e);Object.assign(this,{r:t,g:n,b:a,a:v,h:p,s:f,v:m}),this.modelHex=e,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(e){const{r:t,g:n,b:a,a:v,h:p,s:f,v:m}=Rn(e);Object.assign(this,{r:t,g:n,b:a,a:v,h:p,s:f,v:m}),this.modelHex=this.hexString,this.modelRgba=e,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(e){this.$emit("openSucker",e)},selectSucker(e){const{r:t,g:n,b:a,a:v,h:p,s:f,v:m}=Rn(e);Object.assign(this,{r:t,g:n,b:a,a:v,h:p,s:f,v:m}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(e){const{r:t,g:n,b:a,a:v,h:p,s:f,v:m}=Rn(e);Object.assign(this,{r:t,g:n,b:a,a:v,h:p,s:f,v:m}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const P3={class:"color-set"};function N3(e,t,n,a,v,p){const f=et("Saturation"),m=et("Hue"),c=et("Alpha"),h=et("Preview"),i=et("Sucker"),o=et("Box"),l=et("Colors");return Q(),be("div",{class:["hu-color-picker",{light:e.isLightTheme}],style:{width:e.totalWidth+"px"}},[D("div",P3,[D(f,{ref:"saturation",color:e.rgbString,hsv:e.hsv,size:e.hueHeight,onSelectSaturation:e.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),D(m,{ref:"hue",hsv:e.hsv,width:e.hueWidth,height:e.hueHeight,onSelectHue:e.selectHue},null,8,["hsv","width","height","onSelectHue"]),D(c,{ref:"alpha",color:e.rgbString,rgba:e.rgba,width:e.hueWidth,height:e.hueHeight,onSelectAlpha:e.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),D("div",{style:{height:e.previewHeight+"px"},class:"color-show"},[D(h,{color:e.rgbaString,width:e.previewWidth,height:e.previewHeight},null,8,["color","width","height"]),e.suckerHide?Pe("v-if",!0):(Q(),be(i,{key:0,"sucker-canvas":e.suckerCanvas,"sucker-area":e.suckerArea,onOpenSucker:e.openSucker,onSelectSucker:e.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),D(o,{name:"HEX",color:e.modelHex,onInputColor:e.inputHex,onInputFocus:e.handleFocus,onInputBlur:e.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),D(o,{name:"RGBA",color:e.modelRgba,onInputColor:e.inputRgba,onInputFocus:e.handleFocus,onInputBlur:e.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),D(l,{color:e.rgbaString,"colors-default":e.colorsDefault,"colors-history-key":e.colorsHistoryKey,onSelectColor:e.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),Pe(" custom options "),Ks(e.$slots,"default")],6)}Jn.render=N3;Jn.__file="src/color/ColorPicker.vue";Jn.install=e=>{e.component(Jn.name,Jn)};var cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.validateAlphaValue=cn.validateColorStops=cn.validateMinMaxValues=void 0;function O3(e,t){if(e===t)throw new Error("The minimum value cannot be equal to the maximum value.");if(e>t)throw new Error("The minimum value must be less than the maximum value.")}cn.validateMinMaxValues=O3;function B3(e){if(e.length<2)throw new Error("At least two colors must be provided.")}cn.validateColorStops=B3;function F3(e){if(e<0||e>1)throw new Error("The alpha value must be between 0 and 1.")}cn.validateAlphaValue=F3;const H3=cn;function Ei(e){const t=e.toString(16);return t.length===1?"0"+t:t}function z3(e){const t=Math.floor(e.r*e.a),n=Math.floor(e.g*e.a),a=Math.floor(e.b*e.a);return`#${Ei(t)}${Ei(n)}${Ei(a)}`}let W3=class{constructor(t,n,a,v=1){H3.validateAlphaValue(v),this.r=t,this.g=n,this.b=a,this.a=v}toRGBString(){return`rgb(${Math.floor(this.r*this.a)},${Math.floor(this.g*this.a)},${Math.floor(this.b*this.a)})`}toRGBAString(){return`rgba(${this.r},${this.g},${this.b},${this.a})`}toHexString(){return z3(this)}};var V3=W3;const Mc=V3,Ii=cn;function j3(e,t){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return new Mc(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),t);throw new Error(`${e} is not a valid hex value.`)}let U3=class{constructor(t,n,a,v=1){Ii.validateMinMaxValues(t,n),Ii.validateColorStops(a),Ii.validateAlphaValue(v),this.min=t,this.max=n,this.alpha=v,this.colorStops=a.map(p=>j3(p,v))}getColor(t){const n=this.colorStops.length;if(t<this.min)return this.colorStops[0];if(t>this.max)return this.colorStops[n-1];const a=this.max-this.min;let v=(t-this.min)/a;const p=Math.max(Math.ceil(v*(n-1)),1),f=this.colorStops[p-1],m=this.colorStops[p];v=v*(n-1)-(p-1);const c=Math.floor(v*m.r+(1-v)*f.r),h=Math.floor(v*m.g+(1-v)*f.g),i=Math.floor(v*m.b+(1-v)*f.b);return new Mc(c,h,i,this.alpha)}};var G3=U3;const Y3=G3;var Z3=Y3;const K3=qt(Z3);function Pt(e){let t;if(Array.isArray(e))t=[],e.forEach(n=>{t.push(Pt(n))});else if(typeof e=="object"&&e!==null){t={};for(const n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=Pt(e[n]))}else t=e;return t}function Ds(e,t=2){const n=new RegExp(`^\\d+(?:\\.\\d{0,${t}})?`,"g");return e.match(n)?e.match(n):""}function X3(e,t,n,a=!1){const v=Ct({mouseStartPst:{},movePst:{x:0,y:0},pageX:0,pageY:0}),p=document.body;let f=!1;function m(){f=!1,v.mouseStartPst={},v.movePst.x=0,v.movePst.y=0}function c(){p.addEventListener("mousedown",i,a),p.addEventListener("mousemove",o,a),p.addEventListener("mouseup",l,a)}function h(){p.removeEventListener("mousedown",i,a),p.removeEventListener("mousemove",o,a),p.removeEventListener("mouseup",l,a)}function i(u){f=!0,v.mouseStartPst.x=u.pageX,v.mouseStartPst.y=u.pageY,v.dragEleDistPst={},typeof e=="function"&&e(u)}function o(u){f&&(v.movePst.x=u.pageX-v.mouseStartPst.x,v.movePst.y=u.pageY-v.mouseStartPst.y,v.pageX=u.pageX,v.pageY=u.pageY,typeof t=="function"&&t(u))}function l(u){f=!1,s(),typeof n=="function"&&n(u)}function s(){h()}function r(){c()}return{...xe(v),clearDraggble:s,enableDraggle:r,resetDraggle:m}}const Q3=[[{color:"rgba(229, 38, 0, 1)",hex:"#e52600",rgba:{r:229,g:38,b:0,a:1},pst:0},{color:"rgba(204, 0, 0, 1)",hex:"#cc0000",rgba:{r:204,g:0,b:0,a:1},pst:33},{color:"rgba(255, 146, 92, 1)",hex:"#ff925c",rgba:{r:255,g:146,b:92,a:1},pst:66},{color:"rgba(255, 98, 46, 1)",hex:"#ff925c",rgba:{r:255,g:98,b:46,a:1},pst:100}],[{color:"rgba(179, 104, 0, 1)",hex:"#b36800",rgba:{r:179,g:104,b:0,a:1},pst:0},{color:"rgba(230, 217, 80, 1)",hex:"#e6d950",rgba:{r:230,g:217,b:80,a:1},pst:50},{color:"rgba(204, 177, 37, 1)",hex:"#ff925c",rgba:{r:204,g:177,b:37,a:1},pst:100}],[{color:"rgba(0, 179, 90, 1)",hex:"#00b35a",rgba:{r:0,g:179,b:90,a:1},pst:0},{color:"rgba(0, 115, 95, 1)",hex:"#00735f",rgba:{r:0,g:115,b:95,a:1},pst:33},{color:"rgba(81, 230, 155, 1)",hex:"#51e69b",rgba:{r:81,g:230,b:155,a:1},pst:66},{color:"rgba(36, 204, 107, 1)",hex:"#24cc6b",rgba:{r:36,g:204,b:107,a:1},pst:100}],[{color:"rgba(0, 115, 230, 1)",hex:"#0073e6",rgba:{r:0,g:115,b:230,a:1},pst:0},{color:"rgba(20, 51, 204, 1)",hex:"#1433cc",rgba:{r:20,g:51,b:204,a:1},pst:33},{color:"rgba(89, 200, 255, 1)",hex:"#59c8ff",rgba:{r:89,g:200,b:255,a:1},pst:66},{color:"rgba(46, 165, 255, 1)",hex:"#2ea5ff",rgba:{r:46,g:165,b:255,a:1},pst:100}],[{color:"rgba(255, 98, 46, 1)",hex:"#ff622e",rgba:{r:255,g:98,b:46,a:1},pst:0},{color:"rgba(255, 98, 46, 1)",hex:"#ff622e",rgba:{r:255,g:98,b:46,a:1},pst:36},{color:"rgba(204, 0, 0, 1)",hex:"#cc0000",rgba:{r:204,g:0,b:0,a:1},pst:40},{color:"rgba(255, 98, 46, 1)",hex:"#ff622e",rgba:{r:255,g:98,b:46,a:1},pst:100}],[{color:"rgba(204, 177, 37, 1)",hex:"#ccb125",rgba:{r:204,g:177,b:37,a:1},pst:0},{color:"rgba(204, 177, 37, 1)",hex:"#ccb125",rgba:{r:204,g:177,b:37,a:1},pst:36},{color:"rgba(179, 104, 0, 1)",hex:"#b36800",rgba:{r:179,g:104,b:0,a:1},pst:40},{color:"rgba(204, 177, 37, 1)",hex:"#ccb125",rgba:{r:204,g:177,b:37,a:1},pst:100}],[{color:"rgba(36, 204, 107, 1)",hex:"#24cc6b",rgba:{r:36,g:204,b:107,a:1},pst:0},{color:"rgba(36, 204, 107, 1)",hex:"#24cc6b",rgba:{r:36,g:204,b:107,a:1},pst:36},{color:"rgba(0, 115, 95, 1)",hex:"#00735f",rgba:{r:0,g:115,b:95,a:1},pst:40},{color:"rgba(36, 204, 107, 1)",hex:"#24cc6b",rgba:{r:36,g:204,b:107,a:1},pst:100}],[{color:"rgba(46, 165, 255, 1)",hex:"#2ea5ff",rgba:{r:36,g:204,b:107,a:1},pst:0},{color:"rgba(46, 165, 255, 1)",hex:"#2ea5ff",rgba:{r:36,g:204,b:107,a:1},pst:36},{color:"rgba(20, 51, 204, 1)",hex:"#1433cc",rgba:{r:20,g:51,b:204,a:1},pst:40},{color:"rgba(46, 165, 255, 1)",hex:"#2ea5ff",rgba:{r:36,g:204,b:107,a:1},pst:100}],[{color:"rgba(186, 194, 201, 1)",hex:"#bac2c9",rgba:{r:186,g:194,b:201,a:1},pst:0},{color:"rgba(186, 194, 201, 1)",hex:"#bac2c9",rgba:{r:186,g:194,b:201,a:1},pst:36},{color:"rgba(123, 127, 140, 1)",hex:"#7b7f8c",rgba:{r:123,g:127,b:140,a:1},pst:40},{color:"rgba(186, 194, 201, 1)",hex:"#bac2c9",rgba:{r:186,g:194,b:201,a:1},pst:100}]],J3=ce({name:"ColorPickerGradient",components:{ColorPicker:Jn},props:{modelValue:{type:Boolean,default:!1},type:{type:String,default:"linear"},disabledColorDeg:{type:Boolean,default:!1},pDeg:{type:Number,default:90},pColor:{type:Object,default(){return{hex:"#000000",rgba:{r:0,g:0,b:0,a:1},color:"rgba(0,0,0,1)"}}},pColors:{type:Array,default(){return[{color:"rgba(255, 255, 255, 1)",hex:"#ffffff",rgba:{r:255,g:255,b:255,a:1},pst:100},{color:"rgba(0, 0, 0, 1)",hex:"#000000",rgba:{r:0,g:0,b:0,a:1},pst:0}]}},showClose:{type:Boolean,default:!0},closeOnClickBody:{type:Boolean,default:!1},titleConfig:{type:Object,default(){return{text:"颜色选择器",style:{}}}}},setup(e,{emit:t}){const{type:n,pColors:a,pDeg:v,pColor:p}=xe(e),f=Ct({refColorBar:null,refBox:null,color:p.value,deg:v.value,colors:a.value,selectIndex:0,startMovePst:0,defaultGradientColors:Q3}),m=le(()=>{if(!f.colors)return"";const T=Pt(f.colors).sort((R,P)=>R.pst-P.pst).map(R=>`${R.color} ${Ds(String(R.pst)||0,5)}%`);return`linear-gradient(${f.deg}deg, ${T.join(",")})`}),c=le(()=>T=>{const R=Pt(T).sort((P,F)=>P.pst-F.pst).map(P=>`${P.color} ${Ds(String(P.pst)||0,5)}%`);return`linear-gradient(${f.deg}deg, ${R.join(",")})`}),h=T=>{f.colors=Pt(T)},{movePst:i,enableDraggle:o,resetDraggle:l}=X3(b,_,w);Fn(()=>{t("onClose"),u()}),ot(()=>{s()}),me(m,T=>{n.value!=="linear"&&k({style:T})}),me(p,T=>{f.color=Pt(T)},{deep:!0,immediate:!0}),me(a,T=>{f.selectIndex>=T.length&&(f.selectIndex=T.length-1),f.colors=Pt(T)},{deep:!0});function s(){if(r(),n.value==="gradient"){const T=Pt(f.colors).sort((R,P)=>R.pst-P.pst);f.selectIndex=f.colors.findIndex(R=>R.pst===T[0].pst),bt(()=>{k({style:m.value})})}else k({color:Pt(f.color)})}function r(){n.value==="gradient"&&window.addEventListener("keyup",g),e.closeOnClickBody&&window.addEventListener("click",d)}function u(){n.value==="gradient"&&window.removeEventListener("keyup",g),e.closeOnClickBody&&window.removeEventListener("click",d)}function d(){t("update:modelValue",!1),t("onClose")}function g(T){[8,46].includes(T.keyCode)&&y()}function y(){f.colors.length!==2&&(f.colors.splice(f.selectIndex,1),s())}function x(T){if(!f.refColorBar)return;const R=f.refColorBar.getBoundingClientRect(),P=R.left,F=T.pageX-P,O=Pt(f.colors).sort((j,Z)=>j.pst-Z.pst).map(j=>j.hex),N=new K3(0,R.width,O),V=N.getColor(F).toHexString(),H=N.getColor(F).toRGBAString(),W=100*F/R.width;f.colors.push({color:H,hex:V,pst:W}),f.selectIndex=f.colors.length-1}function C(T){S(T),o()}function b(){f.startMovePst=f.colors[f.selectIndex].pst}function w(){l()}function _(){var P;const T=(P=f.refColorBar)==null?void 0:P.getBoundingClientRect().width;let R=(f.startMovePst*T/100+i.value.x)/T;R>1?R=1:R<0&&(R=0),f.colors[f.selectIndex].pst=Math.round(R*100)}function I(T){return`calc(${T}% - 8px)`}function E(T){const R=T.rgba,P=T.hex;if(n.value==="linear"){const F=`rgba(${R.r}, ${R.g}, ${R.b}, ${R.a})`;f.color={rgba:R,hex:P,color:F},k({color:Pt(f.color)})}else A(T)}function k({style:T,colors:R=Pt(f.colors),color:P=Pt(f.color),deg:F=f.deg}){t("changeColor",{style:T,colors:R,color:P,deg:F})}function A(T){const R=T.rgba;f.colors[f.selectIndex].color=`rgba(${R.r}, ${R.g}, ${R.b}, ${R.a})`,f.colors[f.selectIndex].hex=T.hex,f.colors[f.selectIndex].rgba=T.rgba}function S(T){f.selectIndex!==T&&(f.selectIndex=T)}function M(T){f.colors.length!==2&&f.colors.splice(T,1)}function $(){d()}const L=T=>{T.target.checked?f.defaultGradientColors.push(f.colors):f.defaultGradientColors.pop()};return{...xe(f),changeColor:E,getBarPst:I,barStyle:m,gradientPointStyle:c,chooseDefault:h,clickGColorPot:S,removeColorPot:M,sliderPotDown:C,handlePotBar:x,close:$,setAsCommonChange:L}}});const q3={class:"color_picker_wrapper"},e4={key:0,class:"title"},t4={key:1,class:"gcolor"},n4={key:0,class:"gcolor_deg"},o4={style:{flex:"1"}},i4={ref:"refColorBar",class:"gcolor_bar"},r4={class:"gcolor_bar_pot_box"},a4=["onMousedown","onClick","onDblclick"],s4={class:"setAsCommon"},l4={key:0,class:"gradient_box"},c4={key:1,class:"linear"},u4={key:2},d4={class:"gradient-box"},h4=["onClick"];function f4(e,t,n,a,v,p){const f=Xr,m=et("ColorPicker");return at((Q(),ie("div",q3,[z("div",{ref:"refBox",class:"color_picker_box",onClick:t[5]||(t[5]=$n(()=>{},["stop"]))},[z("div",{class:kt(["color_hd",!(e.showClose||e.titleConfig.show)&&!e.titleConfig.text?"color_hd_0":""])},[e.titleConfig.show!==!1?(Q(),ie("div",e4,[z("span",{style:Wt(e.titleConfig.style||{})},xt(e.titleConfig.text),5),e.showClose?(Q(),ie("span",{key:0,class:"close_box",onClick:t[0]||(t[0]=(...c)=>e.close&&e.close(...c))},"x")):Pe("",!0)])):Pe("",!0),e.type==="gradient"?(Q(),ie("div",t4,[e.disabledColorDeg?Pe("",!0):(Q(),ie("div",n4,[t[6]||(t[6]=z("div",{class:"gcolor_deg_span"}," 角度 ",-1)),z("div",o4,[D(f,{value:e.deg,"onUpdate:value":t[1]||(t[1]=c=>e.deg=c),min:0,max:360},null,8,["value"])]),at(z("input",{"onUpdate:modelValue":t[2]||(t[2]=c=>e.deg=c),class:"number_input"},null,512),[[Zs,e.deg]])])),z("div",i4,[z("div",{class:"gcolor_bar_bg",style:Wt(`background: ${e.barStyle}`),onClick:t[3]||(t[3]=(...c)=>e.handlePotBar&&e.handlePotBar(...c))},null,4),z("div",r4,[(Q(!0),ie(Fe,null,ct(e.colors,(c,h)=>(Q(),ie("div",{key:`${c.pst}_${h}`,class:kt(["gcolor_bar_pot",{on:e.selectIndex===h}]),style:Wt({left:e.getBarPst(c.pst)}),onMousedown:i=>e.sliderPotDown(h),onClick:i=>e.clickGColorPot(h),onDblclick:i=>e.removeColorPot(h)},null,46,a4))),128))])],512),z("div",s4,[z("input",{type:"checkbox",onChange:t[4]||(t[4]=(...c)=>e.setAsCommonChange&&e.setAsCommonChange(...c))},null,32),t[7]||(t[7]=ve("预设颜色 "))])])):Pe("",!0)],2),e.type==="gradient"?(Q(),ie("div",l4,[(Q(!0),ie(Fe,null,ct(e.colors,(c,h)=>(Q(),ie(Fe,{key:`${c.pst}_${h}`},[h===e.selectIndex?(Q(),be(m,{key:0,theme:"light",color:c.color,"sucker-hide":!0,style:{width:"218px"},onChangeColor:e.changeColor},null,8,["color","onChangeColor"])):Pe("",!0)],64))),128))])):(Q(),ie("div",c4,[D(m,{theme:"light",color:e.color.color,"sucker-hide":!0,style:{width:"218px"},onChangeColor:e.changeColor},null,8,["color","onChangeColor"])])),e.type==="gradient"?(Q(),ie("div",u4,[t[8]||(t[8]=z("p",{style:{"font-size":"14px",margin:"10px 0px"}}," 系统预设颜色 ",-1)),z("ul",d4,[(Q(!0),ie(Fe,null,ct(e.defaultGradientColors,(c,h)=>(Q(),ie("li",{key:h,style:Wt(`background: ${e.gradientPointStyle(c)}`),class:"gradient-point",onClick:i=>e.chooseDefault(c)},null,12,h4))),128))])])):Pe("",!0)],512)],512)),[[dt,e.modelValue]])}const p4=it(J3,[["render",f4]]),g4=ce({name:"App",components:{ColorPicker:p4},props:{id:{type:String,default:""},pureColor:{type:String||Array,default:""},gradientStr:{type:String,default:""},gradientColor:{type:Array,default:()=>[]},gradientColorOrigin:{type:Array,default:()=>[]}},emits:["colorChanged","gradientChange"],setup(e,{emit:t}){const n=Ct({isShowColorPicker:!1,style:`background: ${e.pureColor}`,titleConfig:{show:!0,text:"颜色选择器"},pDeg:60,pColor:{hex:"#ffffff",hex8:"#ffffff",hsl:{h:255,s:255,l:255,a:1},hsv:{h:255,s:255,v:255,a:1},rgba:{r:255,g:255,b:255,a:1},a:1,color:"rgba(255,255,255,1)"},pColors:[{color:"rgba(255, 255, 255, 1)",hex:"#ffffff",rgba:{r:255,g:255,b:255,a:1},pst:100},{color:"rgba(0, 0, 0, 1)",hex:"#000000",rgba:{r:0,g:0,b:0,a:1},pst:0}]}),a=le(()=>e.pureColor?"linear":e.gradientColorOrigin&&e.gradientColorOrigin.length>0?"gradient":"linear"),v=({style:i,colors:o,color:l})=>{if(a.value==="linear")t("colorChanged",l.color||l.rgba||l.hex),n.pColor=l;else{t("colorChanged",i);const s=o.sort((u,d)=>u.pst-d.pst),r=[];for(let u=1;u<s.length;u++)r.push({beginColor:s[u-1].color,endColor:s[u].color,ratio:(s[u].pst-s[u-1].pst)/100});n.pColors=o,t("gradientChange",{colorsArr:r,gradientOrigin:o})}};function p(){}function f({style:i,colors:o,deg:l,color:s}){a.value==="linear"?n.style=`background: ${s.color||s.rgba||s.hex}`:n.style=`background: ${i}`,v({style:i,colors:o,color:s})}const m=Y({left:0,top:0}),c=le(()=>({position:"fixed",zIndex:5999,left:`${m.value.left-225}px`,top:`${m.value.top-15}px`}));me([()=>e.pureColor,()=>e.gradientColorOrigin],([i,o])=>{i&&(typeof i=="string"?n.pColor={hex:gi(i),hex8:gi(i),color:gi(i),a:1}:n.pColor=i,n.style=`background: ${i}`),o&&o.length>0&&(n.pColors=o,n.style=`background: ${e.gradientStr}`)},{immediate:!0,deep:!0});function h(){n.isShowColorPicker=!0}return ot(()=>{const i=document.getElementById(e.id),{left:o,top:l}=i.getBoundingClientRect();m.value.left=o;const s=Math.abs(window.innerHeight-l-565);m.value.top=l-s}),{...xe(n),colorType:a,changeColor:f,showPicker:h,onClosePicker:p,colorPickerPosition:c}}}),m4=["id"];function v4(e,t,n,a,v,p){const f=et("ColorPicker"),m=en;return Q(),be(m,null,fu({default:U(()=>[z("div",{class:"scada-color-box inline-block",onClick:t[1]||(t[1]=$n((...c)=>e.showPicker&&e.showPicker(...c),["stop"]))},[z("div",{id:e.id,style:Wt([e.style,{width:"25px",height:"25px"}])},null,12,m4),e.isShowColorPicker?(Q(),be(Ys,{key:0,to:"body"},[D(f,{modelValue:e.isShowColorPicker,"onUpdate:modelValue":t[0]||(t[0]=c=>e.isShowColorPicker=c),type:e.colorType,"p-deg":90,"p-color":e.pColor,"p-colors":e.pColors,"show-close":!0,style:Wt(e.colorPickerPosition),"close-on-click-body":!0,onChangeColor:e.changeColor,onOnClose:e.onClosePicker},null,8,["modelValue","type","p-color","p-colors","style","onChangeColor","onOnClose"])])):Pe("",!0)])]),_:2},[e.id==="lineBackgradient"?{name:"title",fn:U(()=>[t[2]||(t[2]=ve(" 提示: 管道渐变背景,只需配置从边缘到中间的过渡。 "))]),key:"0"}:void 0]),1024)}const Ac=it(g4,[["render",v4]]),y4=["width","height"],w4={"clip-path":"url(#master_svg0_76_8101)"},b4=["fill"],C4=["fill"],x4=["fill"],$4=ce({__name:"containIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 22 22"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_76_8101"},[z("rect",{x:"0",y:"0",width:"22",height:"22",rx:"0"})])],-1)),z("g",w4,[z("g",null,[z("path",{d:"M11.438224921875,2.05583489375C10.142714921875001,1.99138179375,8.888024921875001,2.19978059375,7.682754921875,2.69177259375C4.591154921875,3.9529035937500003,2.481387921875,6.83611359375,2.223575021875,10.16404359375C2.105411021875,11.69157359375,2.367519921875,13.15463359375,3.012051921875,14.54683359375C3.435294921875,15.45993359375,4.002484921875,16.27633359375,4.705024921875,16.99823359375C4.7866649218749995,17.082033593749998,4.879044921875,17.13573359375,4.999354921875,17.12063359375C5.132554921875,17.10353359375,5.224944921875,17.03263359375,5.2679149218750005,16.90583359375C5.319474921875,16.75973359375,5.261464921875,16.645833593749998,5.158344921875,16.53843359375C3.630804921875,14.94863359375,2.870254921875,13.04513359375,2.840175921875,11.14802359375C2.840175921875,9.95564359375,2.981972921875,9.09411359375,3.2612749218749997,8.25407359375C4.6792349218750005,4.01306359375,9.272594921875001,1.70349159375,13.526544921875,3.09138359375C17.239044921875,4.30310359375,19.582944921875,8.00485359375,19.086644921875,11.86345359375C18.912644921875,13.20833359375,18.439944921875,14.43293359375,17.664344921875,15.54373359375C17.477444921874998,15.81013359375,17.271244921875002,16.063633593749998,17.056344921875002,16.30643359375C16.968344921875,16.40743359375,16.946844921874998,16.52123359375,16.994044921875002,16.645833593749998C17.039244921875,16.76403359375,17.129444921875,16.828533593750002,17.251944921875,16.84563359375C17.380844921875,16.86503359375,17.477444921874998,16.80483359375,17.561244921875,16.71033359375C19.574344921875,14.35993359375,20.255444921875,11.66794359375,19.516344921875,8.66872359375C18.592544921875,4.91970359375,15.288244921875,2.24704559375,11.438224921875,2.05583489375Z",fill:B(n),"fill-opacity":"1"},null,8,b4)]),z("g",null,[z("path",{d:"M18.145712890625,19.88389390625C15.786812890625,17.62803390625,13.427782890625,15.37217390625,11.070942890625,13.11417140625C11.010792890625,13.05616330625,10.980712890625,13.06046040625,10.924852890625,13.11846850625L4.174462790625,19.86885390625C4.150829890625,19.89249390625,4.116455090625,19.91182390625,4.105712890625,19.95479390625L18.199512890625,19.95479390625C18.195212890625,19.91612390625,18.165112890625,19.90323390625,18.145712890625,19.88389390625ZM16.588112890625,19.31026390625L5.661182890625,19.31026390625C5.671922890625,19.26729390625,5.704152890625,19.24796390625,5.729932890625,19.22432390625C7.463722890625,17.49053390625,9.197512890625,15.756753906250001,10.931302890625,14.02081090625C10.980712890625,13.96924790625,11.010792890625,13.94346790625,11.079542890625,14.01006890625C12.890672890625,15.74815390625,14.703912890625,17.48194390625,16.517212890625,19.21573390625C16.545212890625002,19.24151390625,16.577412890625,19.26514390625,16.609612890625,19.28878390625L16.588112890625,19.31026390625Z",fill:B(n),"fill-opacity":"1"},null,8,C4)]),z("g",null,[z("path",{d:"M14.6244979296875,13.767576875C14.5407079296875,13.853516875,14.4783979296875,13.945896875,14.4955879296875,14.070506875C14.5127779296875,14.201556875,14.5858279296875,14.296096875,14.7125779296875,14.339056875C14.8543779296875,14.388476875,14.9703979296875,14.341206875,15.0713679296875,14.235936875C16.4034279296875,12.826566875000001,16.9168279296875,11.159376875,16.536627929687498,9.260156875C16.0210279296875,6.6906268749999995,13.7651179296875,4.875195115,11.159067929687499,4.873046875C10.7959779296875,4.875195445,10.4371879296875,4.905273475,10.0826979296875,4.978319875C7.7408979296875,5.448827875,5.9856289296875,7.345896875,5.6977375296875,9.728516875C5.5451979296875,10.993946874999999,5.8137529296875,12.173436875,6.4754719296875,13.260546875C6.6989079296875005,13.625776875,6.9631679296875,13.958786875,7.2660979296875,14.259566875C7.3778179296875,14.371286875,7.5325079296875,14.386326875,7.6592579296875005,14.311136875C7.7817179296875,14.238086875,7.8397279296875,14.089846875,7.8032079296875,13.948046875C7.7817179296875,13.868556875,7.7258579296875,13.812696875,7.6721479296875,13.756836875C6.5184399296875,12.525776875,6.0758619296875,11.069136875,6.3981279296875,9.416986875C6.9116079296875,6.780856875,9.4746879296875,5.090039875,12.1043779296875,5.612109875C15.1766479296875,6.222266875,16.876027929687503,9.560936875,15.5633679296875,12.405466875C15.3313279296875,12.914646875,15.0176579296875,13.370116875,14.6244979296875,13.767576875Z",fill:B(n),"fill-opacity":"1"},null,8,x4)])])],8,y4))}}),S4=["width","height"],k4={"clip-path":"url(#master_svg0_76_8106)"},_4=["fill"],M4=["fill"],A4=ce({__name:"yfullIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 22 22"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_76_8106"},[z("rect",{x:"0",y:"0",width:"22",height:"22",rx:"0"})])],-1)),z("g",k4,[z("g",null,[z("path",{d:"M17.7428998046875,1.40380859375L4.5662998046875,1.40380859375C2.9327198046875003,1.40532511375,1.6088166546875,2.7292285937500003,1.6072998046875,4.36280859375L1.6072998046875,17.54080859375C1.6072998046875,19.17290859375,2.9341698046875,20.49980859375,4.5662998046875,20.49980859375L17.7428998046875,20.49980859375C19.3761998046875,20.49750859375,20.6996998046875,19.17410859375,20.7018998046875,17.54080859375L20.7018998046875,4.36417859375C20.7011998046875,2.73006859375,19.3769998046875,1.40532478375,17.7428998046875,1.40380859375ZM20.0157998046875,17.54220859375C20.0157998046875,18.79480859375,18.9968998046875,19.81370859375,17.7442998046875,19.81370859375L4.5662998046875,19.81370859375C3.3124098046875,19.81220859375,2.2963138046875002,18.79610859375,2.2947998046875,17.54220859375L2.2947998046875,4.36417859375C2.2947998046875,3.11155859375,3.3136798046875002,2.09268359375,4.5662998046875,2.09268359375L17.7428998046875,2.09268359375C18.9955998046875,2.09268359375,20.0143998046875,3.11155859375,20.0143998046875,4.36417859375L20.0143998046875,17.54220859375L20.0157998046875,17.54220859375Z",fill:B(n),"fill-opacity":"1"},null,8,_4)]),z("g",null,[z("path",{d:"M13.624786328125001,8.02027109375C13.744406328124999,8.15502109375,13.938286328124999,8.15502109375,14.056536328125,8.02027109375C14.174786328125,7.88552109375,14.176156328125,7.6682710937500005,14.056536328125,7.53352109375L11.402786328125,4.54426709375C11.290616328125001,4.40907259375,11.083196328125,4.40907259375,10.971036328124999,4.54426709375L8.317284328125,7.53352109375C8.199034128125,7.6682710937500005,8.199034128125,7.88552109375,8.317284328125,8.02027109375C8.435534328125,8.15502109375,8.629408328125,8.15502109375,8.747659328125,8.02027109375L10.844536328124999,5.66077109375L10.844536328124999,16.31697109375L8.685784328125,13.88602109375C8.566159328125,13.75127109375,8.372284328125,13.75127109375,8.255408928125,13.88602109375C8.138533928125,14.02077109375,8.137159028125,14.23802109375,8.255408928125,14.37277109375L10.910536328125,17.36197109375C11.022696328125,17.497171093749998,11.230116328125,17.497171093749998,11.342286328125,17.36197109375L13.997406328124999,14.37277109375C14.115716328125,14.23209109375,14.115716328125,14.02670109375,13.997406328124999,13.88602109375C13.885246328125,13.75082109375,13.677826328125,13.75082109375,13.565656328125,13.88602109375L11.533406328125,16.173971093749998L11.533406328125,5.66214109375L13.624786328125001,8.02027109375Z",fill:B(n),"fill-opacity":"1"},null,8,M4)])])],8,S4))}}),L4=["width","height"],E4={"clip-path":"url(#master_svg0_76_8110)"},I4=["fill"],T4=["fill"],D4=ce({__name:"xfullIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 22 22"},[f[0]||(f[0]=z("defs",null,[z("clipPath",{id:"master_svg0_76_8110"},[z("rect",{x:"0",y:"0",width:"22",height:"22",rx:"0"})])],-1)),z("g",E4,[z("g",null,[z("path",{d:"M17.7428998046875,1.40380859375L4.5662998046875,1.40380859375C2.9327198046875003,1.40532511375,1.6088166546875,2.7292285937500003,1.6072998046875,4.36280859375L1.6072998046875,17.54080859375C1.6072998046875,19.17290859375,2.9341698046875,20.49980859375,4.5662998046875,20.49980859375L17.7428998046875,20.49980859375C19.3761998046875,20.49750859375,20.6996998046875,19.17410859375,20.7018998046875,17.54080859375L20.7018998046875,4.36417859375C20.7011998046875,2.73006859375,19.3769998046875,1.40532478375,17.7428998046875,1.40380859375ZM20.0157998046875,17.54220859375C20.0157998046875,18.79480859375,18.9968998046875,19.81370859375,17.7442998046875,19.81370859375L4.5662998046875,19.81370859375C3.3124098046875,19.81220859375,2.2963138046875002,18.79610859375,2.2947998046875,17.54220859375L2.2947998046875,4.36417859375C2.2947998046875,3.11155859375,3.3136798046875002,2.09268359375,4.5662998046875,2.09268359375L17.7428998046875,2.09268359375C18.9955998046875,2.09268359375,20.0143998046875,3.11155859375,20.0143998046875,4.36417859375L20.0143998046875,17.54220859375L20.0157998046875,17.54220859375Z",fill:B(n),"fill-opacity":"1"},null,8,I4)]),z("g",null,[z("path",{d:"M14.575004375,8.1125230625C14.434324375,7.9942107625,14.228934375,7.9942107625,14.088254375,8.1125230625C13.953064375,8.2246890625,13.953064375,8.4321060625,14.088254375,8.5442730625L16.376284374999997,10.576524062499999L5.865754375,10.576524062499999L8.222504375,8.4823980625C8.357704375,8.3702320625,8.357704375,8.1628150625,8.222504375,8.0506479625C8.081824375,7.9323356625,7.8764343750000005,7.9323356625,7.735754375,8.0506479625L4.747879375,10.7057740625C4.612685875,10.8179440625,4.612685875,11.0253540625,4.747879375,11.137524062499999L7.737134375,13.791274062500001C7.8718843750000005,13.909524062500001,8.089134375,13.909524062500001,8.223884375,13.791274062500001C8.358634375,13.6730240625,8.358634375,13.4791440625,8.223884375,13.3608940625L5.863004375,11.264024062499999L16.519284374999998,11.264024062499999L14.088254375,13.4227740625C13.953504375,13.5423940625,13.953504375,13.7362740625,14.088254375,13.8531440625C14.223004375,13.9700240625,14.440254375,13.9713940625,14.575004375,13.8531440625L17.564284375,11.1980240625C17.699484375,11.085854062500001,17.699484375,10.8784340625,17.564284375,10.766274062499999L14.575004375,8.1125230625Z",fill:B(n),"fill-opacity":"1"},null,8,T4)])])],8,L4))}}),R4=["width","height"],P4=["fill"],N4=ce({__name:"coverIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",width:B(a),height:B(v),viewBox:"0 0 18 18"},[z("g",null,[z("path",{d:"M2.04,16.8L4.8,16.8L4.8,18L0,18L0,13.2L1.2,13.2L1.2,15.96L4.8,12.36L5.64,13.2L2.04,16.8ZM15.96,16.8L12.36,13.2L13.2,12.36L16.8,15.96L16.8,13.2L18,13.2L18,18L13.2,18L13.2,16.8L15.96,16.8ZM2.04,1.2L5.64,4.8L4.8,5.64L1.2,2.04L1.2,4.8L0,4.8L0,0L4.8,0L4.8,1.2L2.04,1.2ZM15.96,1.2L13.2,1.2L13.2,0L18,0L18,4.8L16.8,4.8L16.8,2.04L13.2,5.64L12.36,4.8L15.96,1.2Z",fill:B(n),"fill-opacity":"1"},null,8,P4)])],8,R4))}}),O4=["width","height"],B4=["fill"],F4=["fill"],H4=ce({__name:"autoFitIcon",props:{color:null,width:null,height:null},setup(e){const t=e,{color:n,width:a,height:v}=xe(t);return(p,f)=>(Q(),ie("svg",{class:"icon",viewBox:"0 0 1160 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:B(a),height:B(v)},[z("path",{d:"M194.56 419.157333H136.533333V136.533333h273.066667v59.392H194.56z m829.44 0h-58.026667V195.925333H750.933333V136.533333h273.066667zM409.6 887.466667H136.533333V604.842667h58.026667v223.232H409.6z m614.4 0h-273.066667v-59.392h217.770667V604.842667H1024z",fill:B(n)},null,8,B4),z("path",{d:"M0 0v1024h1160.533333V0z m1103.189333 963.925333H57.344V60.074667h1045.845333z",fill:B(n)},null,8,F4)],8,O4))}}),z4=()=>{const e=window.screen.width*window.devicePixelRatio,t=window.screen.height*window.devicePixelRatio;return`${e}*${t}`},W4=ce({components:{UploaderDragger:e3,ColorPicker:Ac,ContainIcon:$4,YfullIcon:A4,XfullIcon:D4,CoverIcon:N4,AutoFitIcon:H4,ScreenShot:p3},props:["pageConfigs","pageName"],emits:["pageConfigChanged","pageNameChanged","uploadThumbnaiFile"],setup(e,{emit:t}){const n=Y(null),a=Ct({width:1920,height:1080,backgroundImage:"url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=)",backgroundColor:"",backgroundRepeat:"repeat",pageName:"",deviceRatio:z4(),backgroundSize:"",isDefaultBackImg:!1,boardType:"svg"});me(()=>e.pageName,o=>{a.pageName=o});const v=Y(!0);me(()=>e.pageConfigs,o=>{if(Object.assign(a,{...o}),o.backgroundImage&&o.backgroundImage.includes("url")){let l="";o.backgroundImage.includes('url("')?l=o.backgroundImage.replace('url("',"").replace('")',""):o.backgroundImage.includes("url(")&&(l=o.backgroundImage.replace("url(","").replace(")","")),n.value.previewSrc=l,l.includes("data:image/svg+xml;base64,PHN2ZyB3")?(v.value=!0,a.isDefaultBackImg=!0):(v.value=!1,a.isDefaultBackImg=!1)}else v.value=!0,a.isDefaultBackImg=!0});const p=o=>{a.backgroundColor=o},f=Y("#888");me(ht,o=>{f.value=o?"#ffffff":"#888"});const m=o=>{o?(a.backgroundImage=`url(${o})`,v.value=!1,a.isDefaultBackImg=!1):(a.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=)",a.backgroundSize="",a.backgroundRepeat="repeat",v.value=!0,a.isDefaultBackImg=!0)};me(a,o=>{t("pageConfigChanged",o)},{deep:!0});const c=Ut(o=>{a.width=o},1e3),h=Ut(o=>{a.height=o},1e3);function i(o){t("uploadThumbnaiFile",o)}return{picUploader:n,formState:a,iconColor:f,isDefaultBackImg:v,backColorChanged:p,imgChangeHandler:m,widthChange:c,heightChange:h,uploadThumbnai:i}}});const V4={class:"page-config p-4"},j4={class:"mt-4"},U4={class:"mt-4"},G4={class:"mt-4"},Y4={class:"mt-4"},Z4={class:"mt-4 relative"},K4={class:"mt-4 relative"};function X4(e,t,n,a,v,p){const f=Mn,m=ro,c=pn,h=Hn,i=zn,o=et("UploaderDragger"),l=hn,s=et("ColorPicker"),r=pr,u=fn,d=et("ContainIcon"),g=en,y=al,x=et("YfullIcon"),C=et("XfullIcon"),b=et("CoverIcon"),w=et("AutoFitIcon"),_=oo,I=et("ScreenShot"),E=gn;return Q(),ie("div",V4,[D(E,{model:e.formState,name:"basic","label-col":{span:7},"label-align":"left","wrapper-col":{span:17,offset:1},autocomplete:"off"},{default:U(()=>[D(f,{type:"primary",class:"w-3/4 mt-2 mb-4"},{default:U(()=>t[6]||(t[6]=[ve(" 页面配置 ")])),_:1}),D(i,null,{default:U(()=>[D(h,{span:12},{default:U(()=>[D(c,{label:"宽度",name:"width",rules:[{required:!0,message:"请输入宽度!"}]},{default:U(()=>[D(m,{value:e.formState.width,"allow-clear":!0,onChange:e.widthChange},null,8,["value","onChange"])]),_:1})]),_:1}),D(h,{span:12},{default:U(()=>[D(c,{label:"高度",name:"width",rules:[{required:!0,message:"请输入高度!"}]},{default:U(()=>[D(m,{value:e.formState.height,"allow-clear":!0,onChange:e.heightChange},null,8,["value","onChange"])]),_:1})]),_:1})]),_:1}),D(o,{ref:"picUploader",onImagedChanged:e.imgChangeHandler},null,8,["onImagedChanged"]),z("div",j4,[D(c,{label:"页面名称",name:"pageName",rules:[{required:!0,message:"请输入页面名称!"}]},{default:U(()=>[D(l,{value:e.formState.pageName,"onUpdate:value":t[0]||(t[0]=k=>e.formState.pageName=k),"allow-clear":!0,readonly:!0,onChange:t[1]||(t[1]=k=>e.$emit("pageNameChanged",k.target.value))},null,8,["value"])]),_:1})]),z("div",U4,[D(c,{label:"背景颜色",name:"backgroundColor",rules:[{required:!0,message:"请选择背景颜色!"}]},{default:U(()=>[D(i,null,{default:U(()=>[D(h,{span:5},{default:U(()=>[D(s,{id:"pageBackColor","pure-color":e.formState.backgroundColor,"gradient-color":[],onColorChanged:e.backColorChanged},null,8,["pure-color","onColorChanged"])]),_:1})]),_:1})]),_:1})]),z("div",G4,[D(c,{label:"背景重复",name:"backgroundRepeat",rules:[{required:!0,message:"请选择背景重复!"}]},{default:U(()=>[D(u,{ref:"select",value:e.formState.backgroundRepeat,"onUpdate:value":t[2]||(t[2]=k=>e.formState.backgroundRepeat=k),"allow-clear":!0},{default:U(()=>[D(r,{value:"repeat"},{default:U(()=>t[7]||(t[7]=[ve(" 平铺 ")])),_:1}),D(r,{value:"repeat-x"},{default:U(()=>t[8]||(t[8]=[ve(" 横向平铺 ")])),_:1}),D(r,{value:"repeat-y"},{default:U(()=>t[9]||(t[9]=[ve(" 纵向平铺 ")])),_:1}),D(r,{value:"no-repeat"},{default:U(()=>t[10]||(t[10]=[ve(" 不平铺 ")])),_:1})]),_:1},8,["value"])]),_:1})]),z("div",Y4,[D(c,{label:"分辨率",name:"deviceRatio",rules:[{required:!0,message:"请选择设备分辨率!"}]},{default:U(()=>[D(u,{ref:"select",value:e.formState.deviceRatio,"onUpdate:value":t[3]||(t[3]=k=>e.formState.deviceRatio=k),"allow-clear":!0},{default:U(()=>[D(r,{value:"3840*2160"},{default:U(()=>t[11]||(t[11]=[ve(" 3840 x 2160 ")])),_:1}),D(r,{value:"2048*1080"},{default:U(()=>t[12]||(t[12]=[ve(" 2048 x 1080 ")])),_:1}),D(r,{value:"1920*1080"},{default:U(()=>t[13]||(t[13]=[ve(" 1920 x 1080 ")])),_:1}),D(r,{value:"1680*1050"},{default:U(()=>t[14]||(t[14]=[ve(" 1680 x 1050 ")])),_:1}),D(r,{value:"1440*900"},{default:U(()=>t[15]||(t[15]=[ve(" 1440 x 900 ")])),_:1}),D(r,{value:"1280*800"},{default:U(()=>t[16]||(t[16]=[ve(" 1280 x 800 ")])),_:1})]),_:1},8,["value"])]),_:1})]),z("div",Z4,[D(c,{label:"自适应",name:"boardType",rules:[{required:!0,message:"请选择看板类型!"}],style:{"margin-bottom":"0"}},{default:U(()=>[D(u,{value:e.formState.boardType,"onUpdate:value":t[4]||(t[4]=k=>e.formState.boardType=k),"allow-clear":!0},{default:U(()=>[D(r,{value:"svg"},{default:U(()=>t[17]||(t[17]=[ve(" 宽度自适应 ")])),_:1}),D(r,{value:"bigscreen"},{default:U(()=>t[18]||(t[18]=[ve(" 高度自适应 ")])),_:1})]),_:1},8,["value"])]),_:1})]),z("div",K4,[D(c,{label:"背景适配",name:"backgroundSize",rules:[{required:!0,message:"请选择背景适配!"}],style:{"margin-bottom":"0"}}),D(_,{value:e.formState.backgroundSize,"onUpdate:value":t[5]||(t[5]=k=>e.formState.backgroundSize=k),class:"absolute right-0 top-8"},{default:U(()=>[D(y,{value:"contain",class:"radio-p"},{default:U(()=>[D(g,null,{title:U(()=>t[19]||(t[19]=[ve(" 适配内容 ")])),default:U(()=>[D(d,{width:20,height:20,color:e.iconColor,class:"outline-none mt-1"},null,8,["color"])]),_:1})]),_:1}),D(y,{value:"auto 100%",class:"radio-p"},{default:U(()=>[D(g,null,{title:U(()=>t[20]||(t[20]=[ve(" 纵向撑满 ")])),default:U(()=>[D(x,{width:20,height:20,color:e.iconColor,class:"outline-none mt-1"},null,8,["color"])]),_:1})]),_:1}),D(y,{value:"100% auto",class:"radio-p"},{default:U(()=>[D(g,null,{title:U(()=>t[21]||(t[21]=[ve(" 横向撑满 ")])),default:U(()=>[D(C,{width:20,height:20,color:e.iconColor,class:"outline-none mt-1"},null,8,["color"])]),_:1})]),_:1}),D(y,{value:"cover",class:"radio-p"},{default:U(()=>[D(g,null,{title:U(()=>t[22]||(t[22]=[ve(" 全屏撑满 ")])),default:U(()=>[D(b,{width:20,height:20,color:e.iconColor,class:"outline-none mt-1"},null,8,["color"])]),_:1})]),_:1}),D(y,{value:"auto",class:"radio-p"},{default:U(()=>[D(g,null,{title:U(()=>t[23]||(t[23]=[ve(" 自适应 ")])),default:U(()=>[D(w,{width:20,height:20,color:e.iconColor,class:"outline-none mt-1"},null,8,["color"])]),_:1})]),_:1})]),_:1},8,["value"])]),D(I,{onUploadThumbnai:e.uploadThumbnai},null,8,["onUploadThumbnai"])]),_:1},8,["model"])])}const Q4=it(W4,[["render",X4],["__scopeId","data-v-fce2318c"]]),J4=function(){return function(e){var E,k;const{context:t,service:n,nodeId:a,dataPointStr:v,dynamicFlag:p,dataSource:f,deviceCode:m,devices:c,enableDataHandle:h,deviceAttrs:i,calcRules:o,uniquePoint:l,dataPoint:s,attrs:r,callBacks:u}=this.info;if(!s)return;const d=((E=e.data)==null?void 0:E.result.info)||{},g=((k=e.data)==null?void 0:k.result.values)||[];let y="";const x=s.split(","),C=c.split(","),b={},w=Object.keys(d).filter(A=>C.includes(d[A].entityId)?(b[d[A].entityId]=A,!0):!1);if(x.length>0){const A=g.filter(S=>w.includes(S.thingCode)&&x.includes(S.attrKey));h?y=window.dataProcessFn({info:this.info,apiid:this.apiid,defaultValueIndex:this.defaultValueIndex,values:A,deviceIdCodeMap:b}):y=JSON.stringify(A)}if(y&&y==="[]")return;const _=t.getProperties(a),I=this.defaultValueIndex;if(I!==void 0){const A=p==="animationData"?"animationCombo":"hiddenCombo";_.dynamic[p][A]&&(_.dynamic[p][A]=_.dynamic[p][A].map((S,M)=>(M===I&&(S.defaultValue=y,S.dataPointArr=x,S.thingCodeArr=w),S)),t.setProperties(a,{..._,apiid:this.apiid,dynamic:{..._.dynamic,[p]:{..._.dynamic[p]}}}))}else t.setProperties(a,{..._,apiid:this.apiid,dynamic:{..._.dynamic,[p]:{..._.dynamic[p],defaultValue:y,dataPointArr:x,thingCodeArr:w}}});u.forEach(A=>{A(t,a)})}},wt={},Lc=(e,t,n)=>{wt[e]||(wt[e]={}),wt[e]&&(wt[e][t.nodeId||t.edgeId]||(wt[e][t.nodeId||t.edgeId]={}),wt[e][t.nodeId||t.edgeId][t.dynamicFlag]=n.bind({defaultValueIndex:t.defaultValueIndex,apiid:e,info:t}))},Ec=(e,t)=>{wt[e]&&wt[e][t.nodeId||t.edgeId]&&wt[e][t.nodeId||t.edgeId][t.dynamicFlag]&&(wt[e][t.nodeId||t.edgeId][t.dynamicFlag]="")},Rs=(e,t)=>{for(const n in e){const a=e[n];for(const v in a){const p=a[v];if(typeof p=="function")try{p(t)}catch{}}}},Ti={};window.totalHistoryDatas={};window.totalApiParams={};window.totalDeviceInfos={};window.historyDataApiIds=[];const q4=function(){return(e,t,n,a,v,p,f)=>{if(!p||!n)return;let m="";const c=p.split(","),h=a.split(","),i={},o=Object.keys(t).filter(l=>h.includes(t[l].entityId)?(i[t[l].entityId]=l,!0):!1);if(c.length>0){const l=n.filter(s=>o.includes(s.thingCode)&&c.includes(s.attrKey));v?m=window.dataProcessFn({info:f,apiid:e,defaultValueIndex:0,values:l,deviceIdCodeMap:i}):m=JSON.stringify(l)}if(!(m&&m==="[]"))return{dataPointValue:m,thingCodeArr:o,dataPointArr:c}}},Ps=function(e,t,n,a,v,p,f,m,c){try{const h=q4()(e,v,a,p,f,m,c);if(h){const{dataPointValue:i,thingCodeArr:o,dataPointArr:l}=h;if(i){const s=t.getProperties(n);t.setProperties(n,{...s,apiid:e,dynamic:{...s.dynamic,[c.dynamicFlag]:{...s.dynamic[c.dynamicFlag],defaultValue:i,thingCodeArr:o,dataPointArr:l}}})}}}catch{console.warn("error: historyData ->",e)}},Qo=async(e,t)=>{var a,v,p;const n=await t.get(`/v1/api/telemetryById?id=${e}`);if(n.data)return window.totalHistoryDatas[e]=(a=n.data.result)==null?void 0:a.values,window.totalApiParams[e]||(window.totalApiParams[e]=n.data.param),window.totalDeviceInfos[e]=(v=n.data.result)==null?void 0:v.info,(p=n.data.result)==null?void 0:p.values},Di=(e,t,n,a)=>{if(a)window.historyDataApiIds.includes(e)||(window.historyDataApiIds.push(e),Qo(e,n),setInterval(()=>{Qo(e,n)},3e4));else{if(wt[e])return;const v=window.location.host,p=sessionStorage.getItem("token")||window.developToken,f=`ws://${v}/thing/websocket?token=${p}&apiId=${e}`,m=new WebSocket(f);m.onopen=function(c){wt[e]||(wt[e]={})},m.onmessage=function(c){if(!c.data)return;const h=JSON.parse(c.data);for(const i in wt)if(e===i){const o=wt[i];Rs(o,h),Object.keys(o).length===0&&setTimeout(()=>{Rs(wt[i],h)},1e3)}Promise.resolve().then(()=>{Ti[e]=h.data.result,window.globalDashboardDatas=Ti,t.forEach(i=>{i(Ti)})})},m.onclose=function(c){wt[e]=0,c.wasClean},m.onerror=function(){wt[e]=0}}},e6=async e=>{const{context:t,nodeId:n,service:a,dataPoint:v,dataFilterFn:p,requestMethod:f,requestParams:m="return {};"}=e;if(!v)return;const h=new Function("",m)();let i=null;if(!h||window._.isEmpty(h)?i=await a[f||"get"](v):i=await a[f||"get"](v,h),i.code===0&&(i.data||i.data.list)){const o=i.data||i.data.list;if(o)try{let l=[];if(o.length>0?l=new Function("datas",p)(o):o.result&&o.result.info?l=new Function("datas",p)(o.result.info):Object.prototype.toString.call(o)==="[object Object]"&&(l=new Function("datas",p)(o)),!window._.isEmpty(l)){const r=t.getProperties(n);t.setProperties(n,{...r,dynamic:{...r.dynamic,normalData:{...r.dynamic.normalData,defaultOptions:JSON.stringify(l),customApiDatas:l}}})}}catch{}}},zo=async(e,t,n,a,v="normalData",p,f)=>{if(window.isJSON(a)){const m=JSON.parse(a||"{}"),{dataSource:c,deviceCode:h,dataPoint:i,attrs:o,devices:l,enableDataHandle:s,deviceAttrs:r,calcRules:u,uniquePoint:d}=m,g={context:e,service:t,nodeId:n,dataPointStr:a,dynamicFlag:v,dataSource:c,deviceCode:h,devices:l,enableDataHandle:s,deviceAttrs:r,calcRules:u,uniquePoint:d,dataPoint:i,attrs:o,callBacks:p,defaultValueIndex:f};if(!a)Ec(c,g),p.forEach(y=>{y(e,n)});else if(window.historyDataApiIds.includes(c)){const y=window.totalHistoryDatas[c];if(window.totalHistoryDatas[c]){const x=window.totalDeviceInfos[c];Ps(c,e,n,y,x,l,s,i,g)}else{const x=await Qo(c,t),C=window.totalDeviceInfos[c];Ps(c,e,n,x,C,l,s,i,g)}}else Lc(c,g,J4())}else{const m=e.getProperties(n);if(!m)return;const{normalData:c}=m.dynamic||{};if(c){const{dataPoint:h,dataFilterFn:i,requestMethod:o,requestParams:l}=c;if(window.isJSON(h))return;e6({context:e,nodeId:n,service:t,dataPoint:h,dataFilterFn:i,requestMethod:o,requestParams:l})}}},t6=function(){return function(e){var r;const{context:t,service:n,edgeId:a,dataPointStr:v,dynamicFlag:p,dataSource:f,deviceCode:m,dataPoint:c,attrs:h,callBacks:i}=this.info;if(!c)return;const o=((r=e.data)==null?void 0:r.result.values)||[];let l="";if(c.length>0){const u=o.filter(d=>d.thingCode===m&&c.includes(d.attrKey));l=JSON.stringify(u)}if(l&&l==="[]")return;const s=t.getProperties(a);t.setProperties(a,{...s,defaultValue:l})}},Ic=(e,t,n,a,v="edgeData")=>{if(!n||!a)return;const p=JSON.parse(a||"{}"),{dataSource:f,deviceCode:m,dataPoint:c,attrs:h,devices:i,enableDataHandle:o,deviceAttrs:l,calcRules:s,uniquePoint:r}=p;Lc(f,{context:e,service:t,edgeId:n,dataPointStr:a,dynamicFlag:v,dataSource:f,deviceCode:m,devices:i,enableDataHandle:o,deviceAttrs:l,calcRules:s,uniquePoint:r,dataPoint:c,attrs:h,defaultValueIndex:0},t6())},n6=(e,t,n,a,v="edgeData")=>{if(!n)return;const p=JSON.parse(a||"{}"),{dataSource:f,deviceCode:m,dataPoint:c,attrs:h,devices:i,enableDataHandle:o,deviceAttrs:l,calcRules:s,uniquePoint:r}=p;Ec(f,{context:e,service:t,edgeId:n,dataPointStr:a,dynamicFlag:v,dataSource:f,deviceCode:m,devices:i,enableDataHandle:o,deviceAttrs:l,calcRules:s,uniquePoint:r,dataPoint:c,attrs:h,defaultValueIndex:0})},o6=ce({components:{CaretRightOutlined:gc},props:{form:{type:Object,default:()=>({min:null,max:null,dataPoint:""})}},emits:["selectDataPoint","minMax"],setup(e,{emit:t}){const n=Y([]),a=Lt("thingApiDTOList"),v=Y("#000");me(ht,y=>{v.value=y?"#ffffff":"#000"});const p=Y(null),f=Y(null),m=Y(null),c=Y(!1),h=Ct({dataSource:"",device:"",dataPoint:[]}),i=Y([]),o=Y([]),l=async()=>{if(!h.dataSource){h.device="",h.dataPoint=[];return}const y=await ln.getDeviceListByDatasource(h.dataSource);if(y.code!==0)return ye.warning(y.msg);if(y&&y.data&&y.data.result){const x=[],C=y.data.result.info;for(const b in C){const w=C[b];x.push({label:w.entityName,value:w.entityId,deviceCode:w.entityCode,deviceInfo:w,attrs:w.attrs})}i.value=x}},s=async()=>{if(!h.device||!h.dataSource){h.dataPoint=[];return}const y=await ln.getDatapointList(h.dataSource,h.device);if(y.code!==0)return ye.warning(y.msg);o.value=y.data.map(x=>(x.dictName=`${x.dictName} - ${x.dictCode}`,x))||[]},r=Y(""),u=()=>{m.value.validate().then(()=>{const y=i.value.find(x=>x.value===h.device);if(y){const x={dataSource:h.dataSource,device:h.device,dataPoint:h.dataPoint,attrs:y.attrs,deviceCode:y.deviceCode},C=JSON.stringify(x);r.value=C,c.value=!1,t("selectDataPoint",C)}})};me(()=>e.form,y=>{if(y.dataPoint){const x=JSON.parse(y.dataPoint);h.dataSource=x.dataSource,h.device=x.device,h.dataPoint=x.dataPoint,l(),s()}p.value=y.min,f.value=y.max,r.value=y.dataPoint},{immediate:!0}),me([p,f],([y,x])=>{t("minMax",{min:y,max:x})});const d=y=>{y.target.value||(p.value=null,f.value=null,t("minMax",{min:null,max:null}),t("selectDataPoint",""),Object.assign(h,{dataSource:"",device:"",dataPoint:[]}))},g=()=>{c.value=!0,bt(()=>{m.value.clearValidate()})};return me(c,y=>{y||(m.value.clearValidate(),m.value.resetFields(),i.value=[],o.value=[])}),{activeKey:n,iconColor:v,sourceForm:m,min:p,max:f,showDataSource:c,dataPoint:r,handleOk:u,thingApiDTOList:a,formState:h,deviceList:i,dataPointList:o,getDeviceList:l,getDataPointList:s,changeDataPoint:d,showDataSourceDialog:g}}});function i6(e,t,n,a,v,p){const f=et("CaretRightOutlined"),m=hn,c=pn,h=ro,i=gn,o=Bn,l=Sn,s=fn,r=Bt;return Q(),ie(Fe,null,[D(l,{activeKey:e.activeKey,"onUpdate:activeKey":t[3]||(t[3]=u=>e.activeKey=u),bordered:!1,"expand-icon-position":"end",style:{margin:"20px 0px"}},{expandIcon:U(({isActive:u})=>[D(f,{rotate:u?90:0},null,8,["rotate"])]),default:U(()=>[D(o,{key:"1",header:"动效配置",class:"cornerCollapseStyle"},{default:U(()=>[Ks(e.$slots,"default",{},void 0,!0),D(i,{"label-col":{span:5,offset:0},"label-align":"left"},{default:U(()=>[D(c,{label:"数据点",class:"mb-3"},{default:U(()=>[D(m,{value:e.dataPoint,"onUpdate:value":t[0]||(t[0]=u=>e.dataPoint=u),"allow-clear":!0,onClick:e.showDataSourceDialog,onChange:e.changeDataPoint},null,8,["value","onClick","onChange"])]),_:1}),D(c,{label:"范围",class:"mb-3 range-select"},{default:U(()=>[D(h,{value:e.min,"onUpdate:value":t[1]||(t[1]=u=>e.min=u),class:"flex-1"},null,8,["value"]),t[8]||(t[8]=z("span",{style:{flex:"0 0 30px",margin:"0 5px"}},"—",-1)),D(h,{value:e.max,"onUpdate:value":t[2]||(t[2]=u=>e.max=u),class:"flex-1"},null,8,["value"])]),_:1})]),_:1})]),_:3})]),_:3},8,["activeKey"]),D(r,{open:e.showDataSource,"onUpdate:open":t[7]||(t[7]=u=>e.showDataSource=u),title:"请配置需要绑定的数据点",width:500,"ok-text":"确认","cancel-text":"取消",onOk:e.handleOk},{default:U(()=>[D(i,{ref:"sourceForm",model:e.formState,"label-col":{span:3,offset:0}},{default:U(()=>[D(c,{label:"数据源",name:"dataSource",rules:{required:!0,message:"数据源必选"}},{default:U(()=>[D(s,{value:e.formState.dataSource,"onUpdate:value":t[4]||(t[4]=u=>e.formState.dataSource=u),"allow-clear":!0,options:e.thingApiDTOList,"field-names":{label:"name",value:"id"},onChange:e.getDeviceList},null,8,["value","options","onChange"])]),_:1}),D(c,{label:"设备",name:"device",rules:{required:!0,message:"设备必选"}},{default:U(()=>[D(s,{value:e.formState.device,"onUpdate:value":t[5]||(t[5]=u=>e.formState.device=u),"allow-clear":!0,options:e.deviceList,onChange:e.getDataPointList},null,8,["value","options","onChange"])]),_:1}),D(c,{label:"数据点",name:"dataPoint",rules:{required:!0,message:"数据点必选"}},{default:U(()=>[D(s,{value:e.formState.dataPoint,"onUpdate:value":t[6]||(t[6]=u=>e.formState.dataPoint=u),"allow-clear":!0,mode:"multiple",options:e.dataPointList,"field-names":{label:"dictName",value:"dictCode"}},null,8,["value","options"])]),_:1})]),_:1},8,["model"])]),_:1},8,["open","onOk"])],64)}const r6=it(o6,[["render",i6],["__scopeId","data-v-eef4e5c2"]]),a6=Jo("edgeConfig",{state:()=>({id:"",templateId:"",asTemplate:!1,radius:5,showCorner:!1,cornerWidth:15,cornerBack:"red",animationStyle:"none",animationReverse:!1,strokeDashWidth:12,strokeDashWidth2:12,strokeDashSpace:12,strokeDashoffset:"100%",circlePointMoving:!1,circlePointWidth:8,circlePointBackground:"blue",strokeLineCap:"square",lineBackgroundColor:"",lineBackStrokeWidth:10,backgroundColor:"",startGradientBack:!1,lineBackgradient:"linear-gradient(90deg, rgba(46, 129, 255, 1) 0%,rgba(20, 51, 204, 1) 33%,rgba(89, 200, 255, 1) 66%,rgba(46, 165, 255, 1) 100%)",lineBackgradientArr:[{beginColor:"rgba(0, 115, 230, 1)",endColor:"rgba(20, 51, 204, 1)",ratio:.33},{beginColor:"rgba(20, 51, 204, 1)",endColor:"rgba(89, 200, 255, 1)",ratio:.33},{beginColor:"rgba(89, 200, 255, 1)",endColor:"rgba(46, 165, 255, 1)",ratio:.34}],lineBackgradientOrigin:[{color:"rgba(0, 115, 230, 1)",hex:"#0073e6",rgba:{r:0,g:115,b:230,a:1},pst:0},{color:"rgba(20, 51, 204, 1)",hex:"#1433cc",rgba:{r:20,g:51,b:204,a:1},pst:33},{color:"rgba(89, 200, 255, 1)",hex:"#59c8ff",rgba:{r:89,g:200,b:255,a:1},pst:66},{color:"rgba(46, 165, 255, 1)",hex:"#2ea5ff",rgba:{r:46,g:165,b:255,a:1},pst:100}],borderColor:"#FFB243",borderWidth:1,borderStyle:"hidden",isAnimation:!1,animationName:"lf_animate_dash",animationDuration:"20s",arrowType:"none",dataPoint:"",min:void 0,max:void 0,defaultValue:0}),getters:{getId(e){return e.id}},actions:{set(e){this.$state={...e}}}}),s6=ce({components:{ColorPicker:Ac,CaretRightOutlined:gc,AnimationConfig:r6},props:{edgeProperties:{type:Object,default:()=>({})},currentEdgeType:String,edgeId:String,newEdge:Boolean},emits:["updateEdgeProperties","changeEdgeType","adjustStartEndPoints"],setup(e,{emit:t}){const{edgeProperties:n,edgeId:a}=xe(e),v=Ct({id:"",templateId:"",asTemplate:!1,radius:5,showCorner:!1,cornerWidth:15,cornerBack:"#FF1900",animationStyle:"none",animationReverse:!1,strokeDashWidth:12,strokeDashWidth2:12,strokeDashSpace:12,strokeDashoffset:"100%",circlePointMoving:!1,circlePointWidth:8,circlePointBackground:"blue",strokeLineCap:"square",lineBackgroundColor:"#2E81FF",lineBackStrokeWidth:8,backgroundColor:"",startGradientBack:!0,lineBackgradient:"",lineBackgradientArr:[],lineBackgradientOrigin:[],borderColor:"#FFB243",borderWidth:1,borderStyle:"solid",isAnimation:!1,animationName:"lf_animate_dash",animationDuration:"20s",arrowType:"none",dataPoint:"",min:null,max:null,defaultValue:0}),p=()=>{v.borderStyle="hidden",v.lineBackStrokeWidth=8,v.lineBackgradient="linear-gradient(90deg, rgba(46, 129, 255, 1) 0%,rgba(20, 51, 204, 1) 33%,rgba(89, 200, 255, 1) 66%,rgba(46, 165, 255, 1) 100%)",v.lineBackgradientArr=[{beginColor:"rgba(0, 115, 230, 1)",endColor:"rgba(20, 51, 204, 1)",ratio:.33},{beginColor:"rgba(20, 51, 204, 1)",endColor:"rgba(89, 200, 255, 1)",ratio:.33},{beginColor:"rgba(89, 200, 255, 1)",endColor:"rgba(46, 165, 255, 1)",ratio:.34}],v.lineBackgradientOrigin=[{color:"rgba(0, 115, 230, 1)",hex:"#0073e6",rgba:{r:0,g:115,b:230,a:1},pst:0},{color:"rgba(20, 51, 204, 1)",hex:"#1433cc",rgba:{r:20,g:51,b:204,a:1},pst:33},{color:"rgba(89, 200, 255, 1)",hex:"#59c8ff",rgba:{r:89,g:200,b:255,a:1},pst:66},{color:"rgba(46, 165, 255, 1)",hex:"#2ea5ff",rgba:{r:46,g:165,b:255,a:1},pst:100}]},f=()=>{v.borderStyle="solid",v.lineBackStrokeWidth=8,v.lineBackgradient="",v.lineBackgradientArr=[],v.lineBackgradientOrigin=[]};me(()=>v.startGradientBack,F=>{F?p():f()});const m=Lt("diagramRef");me([()=>v.dataPoint,()=>v.min,()=>v.max],([F,O,N],[V])=>{F?Ic(m.value.lfInstance,Re,e.edgeId,F,"edgeData"):(v.defaultValue=0,n6(m.value.lfInstance,Re,e.edgeId,V,"edgeData"))});const c=a6();me(n,F=>{Object.assign(v,{...F,id:e.edgeId})});const h=Ct({startX:0,startY:0,endX:0,endY:0}),i=()=>{const F=m.value.lfInstance.getEdgeModelById(a.value);if(!F)return;const O=F.pointsList;O.length>1&&(h.startX=O[0].x,h.startY=O[0].y,h.endX=O[O.length-1].x,h.endY=O[O.length-1].y)};me(a,()=>{i()},{immediate:!0}),me(h,F=>{const O={x:F.startX,y:F.startY},N={x:F.endX,y:F.endY},V=m.value.lfInstance.getEdgeModelById(a.value);V.pointsList[0]=O,V.pointsList[V.pointsList.length-1]=N;let H="";V.pointsList.forEach(W=>{H+=`${W.x},${W.y} `}),V.points=H.trimEnd(),t("adjustStartEndPoints",V.pointsList)});const o=F=>{v.borderColor=F},l=F=>{v.cornerBack=F},s=F=>{v.lineBackgroundColor=F},r=F=>{v.lineBackgradient=F},u=({colorsArr:F,gradientOrigin:O})=>{v.lineBackgradientArr=F,v.lineBackgradientOrigin=O},d=Array(100).fill("").map((F,O)=>({label:`${O}px`,value:O})),g=[{label:"无",value:"none"},{label:"水流",value:"waterfluid"},{label:"水珠流动",value:"waterPearl"},{label:"圆点",value:"waterPoint"}],y=F=>{v.circlePointBackground=F},x=F=>{if(!F||F==="none"){v.isAnimation=!1,v.strokeDashWidth=12,v.strokeDashWidth2=12,v.strokeDashSpace=12,v.strokeDashoffset="100%",v.circlePointMoving=!1;return}const N=m.value.lfInstance.getEdgeModelById(e.edgeId).pointsList;let V=0;for(let H=1;H<N.length;H++){const W=N[H].x-N[H-1].x,j=N[H].y-N[H-1].y,Z=Math.sqrt(Math.floor(W*W+j*j));V+=Z}F==="waterPearl"?(v.isAnimation=!0,v.lineBackStrokeWidth<8&&(v.lineBackStrokeWidth=8),v.borderStyle="dashed",v.strokeDashWidth=12,v.strokeDashWidth2=12,v.strokeDashSpace=12,v.strokeDashoffset=`${V}`,v.circlePointMoving=!1):F==="waterfluid"?(v.isAnimation=!0,v.lineBackStrokeWidth<8&&(v.lineBackStrokeWidth=8),v.borderStyle="hidden",v.strokeDashWidth=V,v.strokeDashWidth2=V,v.strokeDashSpace=V+20,v.strokeDashoffset=`${V}`,v.circlePointMoving=!1):F==="waterPoint"&&(v.isAnimation=!1,v.lineBackStrokeWidth<8&&(v.lineBackStrokeWidth=8),v.borderStyle="hidden",v.strokeDashWidth=12,v.strokeDashWidth2=12,v.strokeDashSpace=12,v.strokeDashoffset="100%",v.circlePointMoving=!0)},C=[{label:"",value:""},{label:"宋体",value:"SimSun"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"苹方",value:"PingFang SC"},{label:"Andale Mono",value:"andale mono,monospace"},{label:"Arial",value:"arial,helvetica,sans-serif"},{label:"Arial Black",value:"arial black,sans-serif"},{label:"Book Antiqua",value:"book antiqua,palatino,serif"},{label:"Comic Sans MS",value:"comic sans ms,sans-serif"},{label:"Courier New",value:"courier new,courier,monospace"},{label:"Georgia",value:"georgia,palatino,serif"},{label:"Helvetica Neue",value:"Helvetica Neue"},{label:"Helvetica",value:"helvetica,arial,sans-serif"},{label:"Impact",value:"impact,sans-serif"},{label:"Symbol",value:"symbol"},{label:"Tahoma",value:"tahoma,arial,helvetica,sans-serif"},{label:"Terminal",value:"terminal,monaco,monospace"},{label:"Times New Roman",value:"times new roman,times,serif"},{label:"Trebuchet MS",value:"trebuchet ms,geneva,sans-serif"},{label:"Verdana",value:"verdana,geneva,sans-serif"}],b=[{label:"1",value:1},{label:"1.5",value:1.5},{label:"2",value:2},{label:"2.5",value:2.5},{label:"3",value:3}],w=F=>{F.target.checked?(v.animationStyle="waterPearl",v.borderStyle="dashed"):(v.animationStyle="none",v.borderStyle="hidden")},_=()=>{c.$reset(),t("updateEdgeProperties",{...c.$state}),bt(()=>{Object.assign(v,{...c.$state})})},I=Lt("edgesTemplates"),E=F=>{if(F.target.checked)I.value.push({label:`${a.value}`,value:a.value,config:nt({...v})});else{const O=I.value.findIndex(N=>N.value===a.value);O>-1&&I.value.splice(O,1)}},k=F=>{if(F||_(),F===a.value)return;const O=I.value.find(N=>N.value===F);O&&Object.assign(v,nt(O.config),{asTemplate:!1,templateId:F})},A=()=>{new ol(".copy-url").on("success",O=>{ye.success("复制url成功!"),O.clearSelection()})};ot(()=>{A()}),me(v,F=>{if(t("updateEdgeProperties",F),c.set(F),F.asTemplate){const O=I.value.find(N=>N.value===a.value);O&&Object.assign(O.config,nt({...F}))}});const S=Y(null),M=Y(20),$=F=>{Object.assign(v,{animationDuration:`${F}s`})},L=()=>{const F=e.currentEdgeType;return["pro-curved-edge","pure-curved-polyline"].includes(F)},T=Y([]),R=Y([]);return{formState:v,borderColorChanged:o,cornerBackChanged:l,lineBackColorChanged:s,lineBackgradientChanged:r,gradientChanged:u,animationStyleOptions:g,animationStyleChangeHandler:x,circlePointBackgroundChanged:y,borderWidthOptions:d,fontFamilyOptions:C,lineHeightOptions:b,edgeForm:S,animationChange:w,resetEdgeConfig:_,animationRatio:M,flowRatioChanged:$,edgesTemplates:I,asTemplateChange:E,handleTemplateChange:k,isCurvedEdge:L,edgePointsList:h,cornerActiveKey:T,dashConfigActiveKey:R,minMaxHandler:F=>{v.min=F.min,v.max=F.max},setDefaultGradientBack:p,updateEdgePointsList:i,isDark:ht}}});const l6={class:"flex justify-between items-center"};function c6(e,t,n,a,v,p){const f=Mn,m=pn,c=pr,h=fn,i=gr,o=Hn,l=zn,s=et("ColorPicker"),r=ro,u=_o,d=Xr,g=et("AnimationConfig"),y=et("CaretRightOutlined"),x=Bn,C=Sn,b=gn;return Q(),ie("div",{class:kt(["p-3 edgeConfigs",{darkTheme:"isDark"in e?e.isDark:B(ht)}])},[D(b,{ref:"edgeForm",model:e.formState,name:"basic","label-col":{span:6},"wrapper-col":{span:18,offset:1},autocomplete:"off"},{default:U(()=>[D(f,{type:"primary",class:"w-3/4 mt-2 mb-4"},{default:U(()=>t[42]||(t[42]=[ve(" 连线配置 ")])),_:1}),D(m,{label:"常用操作"},{default:U(()=>[z("div",l6,[D(f,{class:"float-left",onClick:e.resetEdgeConfig},{default:U(()=>t[43]||(t[43]=[ve(" 重置 ")])),_:1},8,["onClick"])])]),_:1}),D(m,{label:"线条样式",name:"borderStyle"},{default:U(()=>[D(h,{ref:"select",value:e.formState.borderStyle,"onUpdate:value":t[0]||(t[0]=w=>e.formState.borderStyle=w),"allow-clear":!0,"option-label-prop":"label"},{default:U(()=>[D(c,{value:"hidden",label:"隐藏",class:"mb-3"},{default:U(()=>t[44]||(t[44]=[ve(" 不显示 ")])),_:1}),D(c,{value:"solid",label:"实线"},{default:U(()=>t[45]||(t[45]=[z("div",{style:{"border-bottom":"1px solid #999"}},null,-1)])),_:1}),D(c,{value:"dashed",label:"虚线"},{default:U(()=>t[46]||(t[46]=[z("div",{style:{"border-bottom":"1px dashed #999"}},null,-1)])),_:1}),D(c,{value:"dotted",label:"点线"},{default:U(()=>t[47]||(t[47]=[z("div",{style:{"border-bottom":"1px dotted #999"}},null,-1)])),_:1})]),_:1},8,["value"])]),_:1}),D(m,{label:"线条厚度",name:"borderWidth"},{default:U(()=>[D(h,{ref:"select",value:e.formState.borderWidth,"onUpdate:value":t[1]||(t[1]=w=>e.formState.borderWidth=w),options:e.borderWidthOptions,"option-label-prop":"label","allow-clear":!0},null,8,["value","options"])]),_:1}),D(m,{label:"开启渐变",name:"startGradientBack"},{default:U(()=>[D(l,null,{default:U(()=>[D(o,{span:5},{default:U(()=>[D(i,{checked:e.formState.startGradientBack,"onUpdate:checked":t[2]||(t[2]=w=>e.formState.startGradientBack=w)},null,8,["checked"])]),_:1})]),_:1})]),_:1}),D(m,{label:"线条颜色",name:"borderColor"},{default:U(()=>[D(l,null,{default:U(()=>[D(o,{span:5},{default:U(()=>[D(s,{id:"borderColor","pure-color":e.formState.borderColor,"gradient-color":[],onColorChanged:e.borderColorChanged},null,8,["pure-color","onColorChanged"])]),_:1}),D(l)]),_:1})]),_:1}),e.formState.startGradientBack?(Q(),be(m,{key:0,label:"背景宽度",name:"lineBackStrokeWidth"},{default:U(()=>[D(r,{value:e.formState.lineBackStrokeWidth,"onUpdate:value":t[5]||(t[5]=w=>e.formState.lineBackStrokeWidth=w),min:1,max:64},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[3]||(t[3]=()=>{e.formState.lineBackStrokeWidth-=1})},t[48]||(t[48]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[4]||(t[4]=()=>{e.formState.lineBackStrokeWidth+=1})},t[49]||(t[49]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1})):Pe("",!0),e.formState.startGradientBack?(Q(),be(m,{key:1,label:"线条背景",name:"lineBackgradient"},{default:U(()=>[D(l,null,{default:U(()=>[D(o,{span:5},{default:U(()=>[D(s,{id:"lineBackgradient","pure-color":"","gradient-color":e.formState.lineBackgradientArr,"gradient-str":e.formState.lineBackgradient,"gradient-color-origin":e.formState.lineBackgradientOrigin,onColorChanged:e.lineBackgradientChanged,onGradientChange:e.gradientChanged},null,8,["gradient-color","gradient-str","gradient-color-origin","onColorChanged","onGradientChange"])]),_:1})]),_:1})]),_:1})):Pe("",!0),D(m,{label:"起点坐标X",name:"strokeDashWidth"},{default:U(()=>[D(r,{id:"inputNumber",value:e.edgePointsList.startX,"onUpdate:value":t[8]||(t[8]=w=>e.edgePointsList.startX=w),min:1,max:8e3,precision:0},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[6]||(t[6]=()=>{e.edgePointsList.startX-=1})},t[50]||(t[50]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[7]||(t[7]=()=>{e.edgePointsList.startX+=1})},t[51]||(t[51]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1}),D(m,{label:"起点坐标Y",name:"strokeDashWidth"},{default:U(()=>[D(r,{id:"inputNumber",value:e.edgePointsList.startY,"onUpdate:value":t[11]||(t[11]=w=>e.edgePointsList.startY=w),min:1,max:8e3,precision:0},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[9]||(t[9]=()=>{e.edgePointsList.startY-=1})},t[52]||(t[52]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[10]||(t[10]=()=>{e.edgePointsList.startY+=1})},t[53]||(t[53]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1}),D(m,{label:"终点坐标X",name:"strokeDashWidth"},{default:U(()=>[D(r,{id:"inputNumber",value:e.edgePointsList.endX,"onUpdate:value":t[14]||(t[14]=w=>e.edgePointsList.endX=w),min:1,max:8e3,precision:0},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[12]||(t[12]=()=>{e.edgePointsList.endX-=1})},t[54]||(t[54]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[13]||(t[13]=()=>{e.edgePointsList.endX+=1})},t[55]||(t[55]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1}),D(m,{label:"终点坐标Y",name:"strokeDashWidth"},{default:U(()=>[D(r,{id:"inputNumber",value:e.edgePointsList.endY,"onUpdate:value":t[17]||(t[17]=w=>e.edgePointsList.endY=w),min:1,max:8e3,precision:0},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[15]||(t[15]=()=>{e.edgePointsList.endY-=1})},t[56]||(t[56]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[16]||(t[16]=()=>{e.edgePointsList.endY+=1})},t[57]||(t[57]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1}),D(m,{label:"箭头形状",name:"arrowType"},{default:U(()=>[D(h,{ref:"select",value:e.formState.arrowType,"onUpdate:value":t[18]||(t[18]=w=>e.formState.arrowType=w),"allow-clear":!0,"option-label-prop":"label"},{default:U(()=>[D(c,{value:"default",label:"默认"},{default:U(()=>t[58]||(t[58]=[ve(" 默认 ")])),_:1}),D(c,{value:"empty",label:"空心箭头"},{default:U(()=>t[59]||(t[59]=[ve(" 空心 ")])),_:1}),D(c,{value:"half",label:"半箭头"},{default:U(()=>t[60]||(t[60]=[ve(" 半箭头 ")])),_:1}),D(c,{value:"none",label:"无箭头"},{default:U(()=>t[61]||(t[61]=[ve(" 无箭头 ")])),_:1})]),_:1},8,["value"])]),_:1}),D(g,{form:{min:e.formState.min,max:e.formState.max,dataPoint:e.formState.dataPoint},onSelectDataPoint:t[26]||(t[26]=w=>e.formState.dataPoint=w),onMinMax:e.minMaxHandler},{default:U(()=>[D(m,{label:"动画效果",name:"animationStyle"},{default:U(()=>[D(h,{ref:"select",value:e.formState.animationStyle,"onUpdate:value":t[19]||(t[19]=w=>e.formState.animationStyle=w),options:e.animationStyleOptions,"option-label-prop":"label","allow-clear":!0,onChange:e.animationStyleChangeHandler},null,8,["value","options","onChange"])]),_:1}),e.formState.animationStyle==="waterPoint"?(Q(),be(m,{key:0,label:"圆点宽度",name:"circlePointWidth"},{default:U(()=>[D(r,{id:"inputNumber",value:e.formState.circlePointWidth,"onUpdate:value":t[22]||(t[22]=w=>e.formState.circlePointWidth=w),min:1,max:100,precision:0},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[20]||(t[20]=()=>{e.formState.circlePointWidth-=1})},t[62]||(t[62]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[21]||(t[21]=()=>{e.formState.circlePointWidth+=1})},t[63]||(t[63]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1})):Pe("",!0),e.formState.animationStyle==="waterPoint"?(Q(),be(m,{key:1,label:"圆点背景",name:"circlePointBackground"},{default:U(()=>[D(l,null,{default:U(()=>[D(o,{span:5},{default:U(()=>[D(s,{id:"circlePointBackground","pure-color":e.formState.circlePointBackground,"gradient-color":[],onColorChanged:e.circlePointBackgroundChanged},null,8,["pure-color","onColorChanged"])]),_:1})]),_:1})]),_:1})):Pe("",!0),D(m,{label:"开启流动",name:"isAnimation"},{default:U(()=>[D(u,{checked:e.formState.isAnimation,"onUpdate:checked":t[23]||(t[23]=w=>e.formState.isAnimation=w),class:"float-left",onChange:e.animationChange},null,8,["checked","onChange"])]),_:1}),D(m,{label:"反向流动"},{default:U(()=>[D(u,{checked:e.formState.animationReverse,"onUpdate:checked":t[24]||(t[24]=w=>e.formState.animationReverse=w),class:"float-left"},null,8,["checked"])]),_:1}),D(m,{label:"流动速度"},{default:U(()=>[D(d,{id:"test",value:e.animationRatio,"onUpdate:value":t[25]||(t[25]=w=>e.animationRatio=w),min:1,max:30,onChange:e.flowRatioChanged},null,8,["value","onChange"])]),_:1})]),_:1},8,["form","onMinMax"]),D(C,{activeKey:e.cornerActiveKey,"onUpdate:activeKey":t[30]||(t[30]=w=>e.cornerActiveKey=w),bordered:!1,style:{margin:"20px 0px"},"expand-icon-position":"end"},{expandIcon:U(({isActive:w})=>[D(y,{rotate:w?90:0,class:"arrow-pos"},null,8,["rotate"])]),default:U(()=>[D(x,{key:"1",header:"拐角装饰",class:"cornerCollapseStyle"},{default:U(()=>[e.isCurvedEdge()?(Q(),be(m,{key:0,label:"拐角半径",name:"radius"},{default:U(()=>[D(d,{id:"test",value:e.formState.radius,"onUpdate:value":t[27]||(t[27]=w=>e.formState.radius=w),min:1,max:120},null,8,["value"])]),_:1})):Pe("",!0),e.isCurvedEdge()?(Q(),be(m,{key:1,label:"拐角装饰",name:"showCorner"},{default:U(()=>[D(u,{checked:e.formState.showCorner,"onUpdate:checked":t[28]||(t[28]=w=>e.formState.showCorner=w),class:"float-left"},null,8,["checked"])]),_:1})):Pe("",!0),e.isCurvedEdge()?(Q(),be(m,{key:2,label:"拐角宽度",name:"cornerWidth"},{default:U(()=>[D(d,{value:e.formState.cornerWidth,"onUpdate:value":t[29]||(t[29]=w=>e.formState.cornerWidth=w),min:5,max:60},null,8,["value"])]),_:1})):Pe("",!0),e.isCurvedEdge()?(Q(),be(m,{key:3,label:"拐角颜色",name:"cornerBack"},{default:U(()=>[D(l,null,{default:U(()=>[D(o,{span:5},{default:U(()=>[D(s,{id:"curvedColor","pure-color":e.formState.cornerBack,"gradient-color":[],onColorChanged:e.cornerBackChanged},null,8,["pure-color","onColorChanged"])]),_:1})]),_:1})]),_:1})):Pe("",!0)]),_:1})]),_:1},8,["activeKey"]),D(C,{activeKey:e.dashConfigActiveKey,"onUpdate:activeKey":t[41]||(t[41]=w=>e.dashConfigActiveKey=w),bordered:!1,style:{margin:"20px 0px"},"expand-icon-position":"end"},{expandIcon:U(({isActive:w})=>[D(y,{rotate:w?90:0,class:"arrow-pos"},null,8,["rotate"])]),default:U(()=>[D(x,{key:"1",header:"虚线配置",class:"cornerCollapseStyle"},{default:U(()=>[D(m,{label:"虚线线帽",name:"strokeLineCap"},{default:U(()=>[D(h,{ref:"select",value:e.formState.strokeLineCap,"onUpdate:value":t[31]||(t[31]=w=>e.formState.strokeLineCap=w),"allow-clear":!0,"option-label-prop":"label"},{default:U(()=>[D(c,{value:"square",label:"正方形",class:"mb-3"},{default:U(()=>t[64]||(t[64]=[ve(" 正方形 ")])),_:1}),D(c,{value:"round",label:"圆形"},{default:U(()=>t[65]||(t[65]=[ve(" 圆形 ")])),_:1})]),_:1},8,["value"])]),_:1}),D(m,{label:"虚线长度",name:"strokeDashWidth"},{default:U(()=>[D(r,{id:"inputNumber",value:e.formState.strokeDashWidth,"onUpdate:value":t[34]||(t[34]=w=>e.formState.strokeDashWidth=w),min:1,max:8e3,precision:0},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[32]||(t[32]=()=>{e.formState.strokeDashWidth-=1})},t[66]||(t[66]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[33]||(t[33]=()=>{e.formState.strokeDashWidth+=1})},t[67]||(t[67]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1}),D(m,{label:"虚线间隔",name:"strokeDashSpace"},{default:U(()=>[D(r,{id:"inputNumber",value:e.formState.strokeDashSpace,"onUpdate:value":t[37]||(t[37]=w=>e.formState.strokeDashSpace=w),min:1,max:8e3,precision:0},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[35]||(t[35]=()=>{e.formState.strokeDashSpace-=1})},t[68]||(t[68]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[36]||(t[36]=()=>{e.formState.strokeDashSpace+=1})},t[69]||(t[69]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1}),D(m,{label:"虚线长度2",name:"strokeDashWidth2"},{default:U(()=>[D(r,{id:"inputNumber",value:e.formState.strokeDashWidth2,"onUpdate:value":t[40]||(t[40]=w=>e.formState.strokeDashWidth2=w),min:1,max:8e3,precision:0},{addonBefore:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[38]||(t[38]=()=>{e.formState.strokeDashWidth2-=1})},t[70]||(t[70]=[z("span",null,"-",-1)]))]),addonAfter:U(()=>[z("div",{class:"w-full h-full flex items-center justify-center cursor-pointer",onClick:t[39]||(t[39]=()=>{e.formState.strokeDashWidth2+=1})},t[71]||(t[71]=[z("span",null,"+",-1)]))]),_:1},8,["value"])]),_:1})]),_:1})]),_:1},8,["activeKey"])]),_:1},8,["model"])],2)}const u6=it(s6,[["render",c6],["__scopeId","data-v-123c9af5"]]),d6=ce({props:["pageConfigs"],setup(e){const t=Y(100),n=Array(100).fill(null).map((c,h)=>({value:h,label:`${h}%`})),a=Y(n),v=jn();me(()=>v.getScale,({scaleX:c,scaleY:h})=>{t.value=Number((c*100).toFixed(0))},{deep:!0});const p=Lt("diagramRef"),{pageConfigs:f}=xe(e);return{scaleValue:t,scaleOptions:a,handleChange:c=>{if(c<50)return ye.warning("最低缩放不能小于50%");const h=p.value.lfInstance.graphModel.transformModel;h.SCALE_X=c/100,h.SCALE_Y=c/100,v.setScale(h.SCALE_X,h.SCALE_Y);const i=f.value.width*h.SCALE_X,o=f.value.height*h.SCALE_Y;p.value.lfInstance.resize(i,o)}}}});const h6={class:"scaler-box flex-auto flex flex-row justify-end items-center"},f6={style:{width:"200px"},"ml-3":""};function p6(e,t,n,a,v,p){const f=fn,m=Xr;return Q(),ie("div",h6,[D(f,{ref:"select",value:e.scaleValue,"onUpdate:value":t[0]||(t[0]=c=>e.scaleValue=c),style:{width:"120px"},options:e.scaleOptions,onChange:e.handleChange},null,8,["value","options","onChange"]),z("div",f6,[D(m,{value:e.scaleValue,"onUpdate:value":t[1]||(t[1]=c=>e.scaleValue=c),min:50,max:200,step:3,onChange:e.handleChange},null,8,["value","onChange"])])])}const g6=it(d6,[["render",p6],["__scopeId","data-v-70e83319"]]),m6="production";function v6(e,t,n,a,v,p){const f=sessionStorage.getItem("v1@CacheToken"),c=`/scada/preview.html?token=${JSON.parse(f||"{}").token||sessionStorage.getItem("token")||window.developToken}`,h=window.open(c,"_blank","");h.focus();const i=e.getGraphData(),o=a.filter(s=>i.nodes.find(r=>r.type===s.name)),l=n.filter(s=>i.nodes.find(r=>r.type===s));h.onload=async function(){await O2(h.document,l),$c(o,h.document);const{backgroundImage:s,width:r,height:u,backgroundColor:d,backgroundRepeat:g,backgroundSize:y,boardType:x}=v,C=r,b=u,w=`
|
|
window.isDeveloping = ${m6==="development"};
|
|
var scriptCallbacks = [];
|
|
${JSON.stringify(p)}.forEach((i) => {
|
|
const time = JSON.parse(i.timeCondition || '{}');
|
|
const isHistoryData = time.type !== 'last';
|
|
if (isHistoryData) {
|
|
getHistoryDatas(i.id, service);
|
|
};
|
|
});
|
|
window.lf.render(${JSON.stringify(i)});
|
|
window.lf.graphModel.changeBackground({
|
|
backgroundImage: ${JSON.stringify(s)},
|
|
backgroundColor: ${JSON.stringify(d)},
|
|
backgroundRepeat: ${JSON.stringify(g)},
|
|
backgroundSize: ${JSON.stringify(y)},
|
|
});
|
|
document.querySelector('.lf-background').style.backgroundColor = ${JSON.stringify(d)};
|
|
const resizeGraph = function () {
|
|
if (${JSON.stringify(x)} === 'bigscreen') {
|
|
const diagramDom = document.getElementById('diagram');
|
|
const graph = document.querySelector('.lf-graph');
|
|
const { width, height } = diagramDom.getBoundingClientRect();
|
|
const heightWidthRatio = ${JSON.stringify(b)} / ${JSON.stringify(C)};
|
|
const realHeight = width * heightWidthRatio;
|
|
window.lf.resize(width, realHeight);
|
|
diagramDom.style.overflowY = 'auto';
|
|
graph.style.overflow = 'hidden';
|
|
window.lf.updateEditConfig({
|
|
stopZoomGraph: true,
|
|
});
|
|
} else {
|
|
const diagramDom = document.getElementById('diagram');
|
|
const { width, height } = diagramDom.getBoundingClientRect();
|
|
window.lf.resize(width, height);
|
|
const scaleY = height / ${JSON.stringify(b)};
|
|
const transformModel = window.lf.graphModel.transformModel;
|
|
transformModel.SCALE_Y = scaleY;
|
|
transformModel.SCALE_X = scaleY;
|
|
transformModel.focusOn(${JSON.stringify(C)} / 2, ${JSON.stringify(b)} / 2, width, height);
|
|
const backDom = document.querySelector('.lf-background-area');
|
|
backDom.style.width = height * (${JSON.stringify(C)} / ${JSON.stringify(b)}) + 'px';
|
|
backDom.style.margin = '0 auto';
|
|
};
|
|
};
|
|
resizeGraph();
|
|
window.onresize = function () {
|
|
resizeGraph();
|
|
};
|
|
setTimeout(function() {
|
|
eventHandlers(window.lf, undefined);
|
|
|
|
const currentGraphData = window.lf.getGraphData();
|
|
currentGraphData.nodes.forEach(function(element) {
|
|
const nodeData = lf.getNodeDataById(element.id);
|
|
const { dynamic } = nodeData.properties;
|
|
const { scriptData, normalData, uiData, animationData, hiddenData } = dynamic || {};
|
|
if (normalData) {
|
|
try {
|
|
const dataPointStrParsed = JSON.parse(normalData.dataPoint || '{}');
|
|
const { dataSource } = dataPointStrParsed;
|
|
const findSuperApi = ${JSON.stringify(p)}.find((i) => i.id === dataSource);
|
|
if (findSuperApi) {
|
|
const time = JSON.parse(findSuperApi.timeCondition || '{}');
|
|
const isHistoryData = time.type !== 'last';
|
|
startSocket(dataSource, scriptCallbacks, service, isHistoryData);
|
|
};
|
|
} catch(err) {};
|
|
};
|
|
const nodeModel = lf.getNodeModelById(element.id);
|
|
if (element.properties.visible !== undefined) {
|
|
nodeModel.visible = element.properties.visible
|
|
};
|
|
if(normalData && normalData.dataPoint) {
|
|
dataPointsHandlers(lf, service, element.id, normalData.dataPoint, 'normalData', [])
|
|
}
|
|
if (uiData && uiData.dataPoint) {
|
|
dataPointsHandlers(lf, service, element.id, uiData.dataPoint, 'uiData', [])
|
|
}
|
|
if (animationData) {
|
|
animationData.animationCombo.forEach((anim, index) => {
|
|
if(anim.dataPoint) {
|
|
dataPointsHandlers(lf, service, element.id, anim.dataPoint, 'animationData', [animationHandler], index)
|
|
}
|
|
})
|
|
}
|
|
if (hiddenData) {
|
|
hiddenData.hiddenCombo.forEach((hid, index) => {
|
|
if(hid.dataPoint) {
|
|
dataPointsHandlers(lf, service, element.id, hid.dataPoint, 'hiddenData', [showHideHandler], index)
|
|
}
|
|
})
|
|
}
|
|
if (scriptData && scriptData.script) {
|
|
setTimeout(() => {
|
|
const func = new Function('context', 'service', 'nodeId', scriptData.script);
|
|
window.lf.globalDatas = window.globalDashboardDatas || {};
|
|
const callback = func(window.lf, service, element.id);
|
|
if (callback) {
|
|
scriptCallbacks.push(callback);
|
|
}
|
|
}, 1000);
|
|
}
|
|
});
|
|
currentGraphData.edges.forEach((edge) => {
|
|
const dataPointStrParsed = JSON.parse(edge.properties.dataPoint || '{}');
|
|
const { dataSource } = dataPointStrParsed;
|
|
const findSuperApi = ${JSON.stringify(p)}.find((i) => i.id === dataSource);
|
|
if (findSuperApi) {
|
|
const time = JSON.parse(findSuperApi.timeCondition || '{}');
|
|
const isHistoryData = time.type !== 'last';
|
|
startSocket(dataSource, scriptCallbacks, service, isHistoryData);
|
|
};
|
|
edgeDataPointHandler(lf, service, edge.id, edge.properties.dataPoint, 'edgeData');
|
|
});
|
|
window.layer.close(window.loadIdx);
|
|
}, 1000);
|
|
`,_=h.document.createElement("script");_.innerText=w,setTimeout(()=>{h.document.body.append(_)},1e3)}}const y6=(e,t,n,a,v)=>{window.lf.globalDatas=window.globalDashboardDatas||{};const f=new Function("context","service","nodeId",a)(e,t,n);if(f){const m=f.bind(null,e,t,n);v.push(m)}},w6=(e,t)=>{const n=e.getNodeDataById(t);if(!n)return;const{dynamic:a}=n.properties;if(a){const{animationData:v}=a,{animationCombo:p}=v||{};if(p){p.forEach(c=>{if(c.dataPoint&&c.animationName==="旋转"){const h=window.resolveScadaNewValue(c.defaultValue||"[]");if(h===""){e.setProperties(n.id,{rotateAnimation:!1,animationTime:c.animationTime});return}if(c.min===""||c.max===""){e.setProperties(n.id,{rotateAnimation:!1,animationTime:c.animationTime});return}Number(h)>=Number(c.min)&&h<=Number(c.max)?e.setProperties(n.id,{rotateAnimation:!0,animationTime:c.animationTime}):e.setProperties(n.id,{rotateAnimation:!1,animationTime:c.animationTime})}else if(c.dataPoint&&c.animationName==="闪烁"){const h=window.resolveScadaNewValue(c.defaultValue||"[]");if(h===""){e.setProperties(n.id,{blinkAnimation:!1});return}if(c.min===""||c.max===""){e.setProperties(n.id,{blinkAnimation:!1});return}Number(h)>=Number(c.min)&&h<=Number(c.max)?e.setProperties(n.id,{blinkAnimation:!0}):e.setProperties(n.id,{blinkAnimation:!1})}else!c.dataPoint&&c.animationName==="旋转"?e.setProperties(n.id,{rotateAnimation:!1}):!c.dataPoint&&c.animationName==="闪烁"&&e.setProperties(n.id,{blinkAnimation:!1})});const f=p.find(c=>c.animationName==="旋转"),m=p.find(c=>c.animationName==="闪烁");f||e.setProperties(n.id,{rotateAnimation:!1}),m||e.setProperties(n.id,{blinkAnimation:!1})}}},b6=(e,t)=>{const n=e.getNodeDataById(t);if(!n)return;const{dynamic:a}=n.properties;if(a){const{hiddenData:v}=a,{hiddenCombo:p}=v||{};p&&p.forEach(f=>{if(f.dataPoint&&f.showOrHiddenName==="隐藏"){const m=window.resolveScadaNewValue(f.defaultValue||"[]");if(m===""||f.min===""||f.max==="")return;if(m>=Number(f.min)&&m<=Number(f.max)){const c=e.getNodeModelById(t);c.visible=!1}else{const c=e.getNodeModelById(t);c.visible=!0}}else if(f.dataPoint&&f.showOrHiddenName==="显示"){const m=window.resolveScadaNewValue(f.defaultValue||"[]");if(m===""||f.min===""||f.max==="")return;if(m>=Number(f.min)&&m<=Number(f.max)){const c=e.getNodeModelById(t);c.visible=!0}else{const c=e.getNodeModelById(t);c.visible=!1}}})}};let So=[];const Tc=(e,t)=>{const n=Xs(t);n&&e.graphModel.nodes.forEach(a=>{if(a.type==="helper-circle-point")return;const v={x:a.x-a.width/2,y:a.y-a.height/2,width:a.width,height:a.height};xu(v,n)&&So.push(a)})},C6=e=>{window.layui.use("layer",()=>{window.layui.layer.msg(e)})},Dc=(e,t,n,a)=>{t.operateVariables.forEach(v=>{const p=v.selectedVariable.split("="),f=new Function("inputParamsTable","globalInputParamsCalculated","response","event",v.newValue);if(t.globalInputParamsCalculated)if(Array.isArray(t.globalInputParamsCalculated)){const m=t.globalInputParamsCalculated.length>0?t.globalInputParamsCalculated:t.inputParamsTable,c=f(t.inputParamsTable,m,a,n);e.setProperties(p[0],{[p[1]]:c})}else{const c=Object.keys(t.globalInputParamsCalculated).length>0?t.globalInputParamsCalculated:t.inputParamsTable,h=f(t.inputParamsTable,c,a,n);e.setProperties(p[0],{[p[1]]:h})}})},tr=async(e,t)=>{let n=null;if(e.inputParamsCalculate){const a=new Function("deviceInfo","command","event",e.inputParamsCalculate);window.globalDashboardDatas,n=a(e.device,e.command,t)}return n.event&&n.event instanceof PointerEvent&&(n.event=""),n},x6=(e,t,n,a,v)=>{t.commandNext&&t.commandNext.forEach(p=>{if(p.value==="refreshBoard")n.forEach(f=>{f()});else if(p.value==="operateVariable")Dc(e,t,a,v);else if(p.value==="showOrHide"){const m=new Function("e",t.showHideNewValue)(a);if(m&&m.toString()==="[object Object]")for(const c in m){const h=e.getNodeModelById(c);h.visible=m[c]==="show",h.properties.showHideContainChildren&&(So=[],Tc(e,{nodes:[h],edges:[]}),So.forEach(i=>{i.visible=h.visible,e.setProperties(i.id,{visible:h.visible})}))}}})},Ns=async(e,t,n,a)=>{let v={};if(n.requestUrl=n.requestUrl.replace("/thing",""),n.requestHeader&&(v=n.requestHeader.reduce((p,f)=>(p[f.key]=f.value,p),{})),n.requestMethod==="get"){let p={};if(n.paramsTable){p=n.paramsTable.reduce((m,c)=>(m[c.key]=c.value,m),{});const f=tr(n,e);f&&(p=f)}Re.get(n.requestUrl,p,v).then(f=>{if(f.code!==0)return C6(f.msg);x6(t,n,a,e,f)})}else if(n.requestMethod==="post"||n.requestMethod==="put"){let p=n.bodyJson;const f=await tr(n,e);f&&(p=f),pu.open({message:"指令下发入参如下:",description:JSON.stringify(p)})}},$6=(e,t,n,a)=>{const v=JSON.parse(t.config);if(v.eventAction==="openLink"){let p="";if(v.dataPointParamsCalculate){let m=[];v.dataPointTable&&(m=v.dataPointTable.map(i=>JSON.parse(i.dataPoint||"{}")));const h=new Function("paramsList",m)();Array.isArray(h)&&(p=h.reduce((i,o)=>o.key?`${i}${i?"&":""}${o.key}=${o.value}`:i,""))}let f=`${v.linkAddress}${p}`;if(v.openMethod==="openNewPage")f.includes("http")||(f=`http://${f}`),window.open(f,"_blank"," ");else{const m=window.location.origin;m.includes("localhost")?window.location.href=m+f:window.location.href=`${m}/scada${f}`}}else if(v.eventAction==="openDialog")window.layui.use("layer",()=>{const p=window.layui.layer,f=p.confirm(v.dialogContent,{btn:["确认","取消"]},()=>{Ns(e,n,v,a),p.closeAll()},()=>{p.closeAll()});p.title(v.dialogTitle,f)});else if(v.eventAction==="sendCommand")v.sendCommandMethod==="codes"?new Function("context","service","command","event",v.commandContent)(n,Re,v.selectCommand,e):Ns(e,n,v,a);else if(v.eventAction==="operateVariable"){const p=tr(v,e);p&&(v.globalInputParamsCalculated=p),Dc(n,v,e,null)}else if(v.eventAction==="showHide"){const f=new Function("e",v.showHideNewValue)(e);if(f&&f.toString()==="[object Object]")for(const m in f){const c=n.getNodeModelById(m);c.visible=f[m]==="show",c.properties.showHideContainChildren&&(So=[],Tc(n,{nodes:[c],edges:[]}),So.forEach(h=>{h.visible=c.visible,n.setProperties(h.id,{visible:c.visible})}))}}},vo=Ut($6,200),S6=(e,t,n)=>{e.value.on("myNode:click",({data:a,e:v})=>{var m,c;const f=(((c=(m=a.properties.dynamic)==null?void 0:m.eventsData)==null?void 0:c.eventCombo)||[]).find(h=>h.eventType==="click");f&&f.enable&&f.config&&vo(v,f,e.value,n)}),e.value.on("myNode:dbclick",({data:a,e:v})=>{var m,c;const f=(((c=(m=a.properties.dynamic)==null?void 0:m.eventsData)==null?void 0:c.eventCombo)||[]).find(h=>h.eventType==="dblClick");f&&f.enable&&f.config&&vo(v,f,e.value,n)}),e.value.on("node:change",({data:a,e:v})=>{var c,h;const p=e.value.getProperties(a.id);e.value.setProperties(a.id,{event:v}),p.dynamic;const m=(((h=(c=a.properties.dynamic)==null?void 0:c.eventsData)==null?void 0:h.eventCombo)||[]).find(i=>i.eventType==="change");if(m){if(m.enable&&m.config)if(window.isJSON(m.config))vo(v,m,e.value,n);else{const i=new Function("context","service","nodeId","event",m.config);try{i(e.value,Re,a.id,v)}catch{}}else if(m.enable&&!m.config){if(m.targetNode&&m.apiId){const i=v.value||v,o=window.totalApiParams[m.apiId]||{},l={entitys:window._.cloneDeep(o.entitys),attrs:window._.cloneDeep(o.attrs)},s=Object.prototype.toString.call(i)==="[object Array]";if(m.targetParamsType==="entitys")l.entitys||(l.entitys={}),l.entitys[m.targetParamsEntitys]=s?i:[i];else if(m.targetParamsType==="attrs"){if(l.attrs||(l.attrs={}),m.targetParamsAttrsType==="all")l.attrs.type="all",m.targetParamsAttrsKeysEntitys==="keys"&&(l.attrs.keys=s?i:[i]);else if(l.attrs.type="split",m.targetParamsAttrsKeysEntitys==="entitys"){const r=s?i:[i],u=[];r.forEach(d=>{l.attrs.entitys&&l.attrs.entitys.forEach(g=>{g.entitys.includes(d)&&u.push({entitys:[d],keys:g.keys,keyType:"SQ"})})}),l.attrs.keys=u}else if(m.targetParamsAttrsKeysEntitys==="keys"){const r=s?i:[i],u=[];r.forEach(d=>{l.attrs.keys&&l.attrs.keys.forEach(g=>{g.keys.includes(d)&&u.push({entitys:g.entitys,keys:[d],keyType:"SQ"})})}),u.length>0?l.attrs.keys=u:l.attrs.keys=r}e.value.setProperties(m.targetNode,{requestParams:l,apiId:m.apiId})}else if(m.targetParamsType==="times"){if(l.times={},m.targetParamsTimesType==="nearest")l.times.nearest=i;else if(m.targetParamsTimesType==="range")typeof v=="object"&&(l.times.startTime=v.startTime||v.start||v.startDate,l.times.endTime=v.endTime||v.end||v.endDate);else if(m.targetParamsTimesType==="interval"&&typeof v=="object"){const{duration:u,type:d}=v;l.times.duration=u,l.times.type=d}e.value.setProperties(m.targetNode,{requestParams:l,apiId:m.apiId})}if(Re.get(`/v1/api/telemetryById?id=${m.apiId}&reqParams=${encodeURIComponent(JSON.stringify(l))}`).then(r=>{var u,d;if(r.code===0&&(u=r.data.result)!=null&&u.values){const g=(d=r.data.result)==null?void 0:d.values,y=e.value.getProperties(m.targetNode);if(!y)return;e.value.setProperties(m.targetNode,{...y,apiid:m.apiId,dynamic:{...y.dynamic,normalData:{...y.dynamic.normalData,defaultValue:JSON.stringify(g)}}})}}),m.moreOperation){const r=new Function("context","service","nodeId","event",m.moreOperation);try{r(e.value,Re,a.id,v)}catch{}}}else if(m.moreOperation){const i=new Function("context","service","nodeId","event",m.moreOperation);try{i(e.value,Re,a.id,v)}catch{}}}}}),e.value.on("myNode:mouseenter",({data:a,e:v})=>{var m,c;const f=(((c=(m=a.properties.dynamic)==null?void 0:m.eventsData)==null?void 0:c.eventCombo)||[]).find(h=>h.eventType==="mouseEnter");f&&f.enable&&f.config&&vo(v,f,e.value,n)}),e.value.on("myNode:mouseleave",({data:a,e:v})=>{var m,c;const f=(((c=(m=a.properties.dynamic)==null?void 0:m.eventsData)==null?void 0:c.eventCombo)||[]).find(h=>h.eventType==="mouseLeave");f&&f.enable&&f.config&&vo(v,f,e.value,n)})},k6={normalData:{dataPoint:"",compareType:"",conditionVariables:[],defaultValue:"[]",unit:"kwh"},eventsData:{eventCombo:[{eventType:"click",enable:!1,config:""},{eventType:"dblClick",enable:!1,config:""}]},uiData:{dataPoint:"",compareType:"",conditionVariables:[{type:"rangeColor",label:"范围/颜色",name:""}]},animationData:{animationCombo:[{min:"",max:"",animationName:"旋转"}]},hiddenData:{hiddenCombo:[{dataPoint:"",min:"",max:"",showOrHiddenName:"隐藏"}]}},_6={id:"dashboard-fullscreen",ref:"fullscreenEl",class:"w-full h-full flex flex-col overflow-hidden"},M6={class:"dashboard-header flex items-center","bg-light":"","dark:bg-black":""},A6={class:"dashboard-center flex-auto flex border-t border-b border-solid border-gray-200 dark:border-dark"},L6={class:"board-center border-r border-solid border-gray-200 dark:border-dark relative"},E6=ce({__name:"index",setup(e){no(X=>({cd081852:B(q)}));const t=Y(!0),n=Y(!1),a=Y(null);Qt("diagramRef",a);const v=Y({}),p=Y(""),f=_c(),m=Y(""),c=Y({}),h=Y({}),i=Y(null),o=Y([]);Qt("historyMaterials",o);const l=(X,fe,ke)=>{var Ne;if(f.$reset(),f.set(X),v.value=X,p.value=X.config,m.value="",X.files.json){const Ye=JSON.parse(X.files.json),He=St();Ye.nodes[0].id=He,Ye.nodes[0].properties.id=He;const{nodes:st,edges:rt}=a.value.lfInstance.getGraphData(),lt=ir(st,rt);if(Ye.nodes[0].zIndex=lt+2,fe){Ye.nodes[0].properties.href=fe,ke&&(Ye.nodes[0].properties.materialName=ke);const ut=new Image;ut.src=fe,ut.addEventListener("load",()=>{const $t=ut.width,Zt=ut.height,mn=Ye.nodes[0].properties;mn.width=$t>1920?1920:$t,mn.height=$t>1920?1920/$t*Zt:Zt})}h.value=((Ne=Ye.nodes[0].properties)==null?void 0:Ne.dynamic)||{},a.value.lfInstance.dnd.startDrag({...Ye.nodes[0]})}a.value.lfInstance.setDefaultEdgeType("pro-polyline")},s=()=>{if(i.value.totalComponents){const X=i.value.totalComponents["custom-text-node"];X&&l(nt(X),"")}},r=()=>{if(i.value.totalComponents){const X=i.value.totalComponents["custom-input-node"];X&&l(nt(X),"")}},u=X=>{if(t.value=!1,n.value=!1,m.value=X.id,X.properties.id=X.id,X.properties.x=X.x,X.properties.y=X.y,X.type==="custom-text-node"){const{fontSize:fe}=X.properties;X.properties.width=X.text.value.length*fe,X.properties.height=fe}if(c.value=X,a.value.lfInstance.setProperties(X.id,{...X.properties}),X.text&&a.value.lfInstance.updateText(X.id,X.text.value),X.type==="custom-image-node"&&X.properties.href!=="./defaultPic.svg"){const fe=o.value.findIndex(ke=>ke.href===X.properties.href);fe>-1&&o.value.splice(fe,1),o.value.unshift(X.properties)}},d=Wo(X=>{m.value===X.id&&(t.value=!1,n.value=!1,X.properties.x=X.x,X.properties.y=X.y,X.text&&a.value.lfInstance.updateText(X.id,X.text.value),c.value={...X},a.value.lfInstance.setProperties(X.id,{...X.properties}))},100,{leading:!0,trailing:!1}),g=Wo(X=>{m.value===X.id&&(t.value=!1,n.value=!1,c.value=X)},500,{leading:!1,trailing:!0}),y=X=>{m.value===X.id&&(t.value=!1,n.value=!1,c.value=X,X.text&&a.value.lfInstance.updateText(X.id,X.text.value))},x=X=>{if(i.value.layers&&(i.value.layers.selectedKeys=[X.id]),i.value.totalComponents[X.type]){const fe=i.value.totalComponents[X.type];p.value=fe.config,X.properties.id=X.id,c.value=X,h.value=X.properties.dynamic,m.value=X.id,f.set({...nt(fe),id:X.id})}if(t.value=!1,n.value=!1,X.text&&a.value.lfInstance.updateText(X.id,X.text.value),X.type==="custom-image-node"){const fe=o.value.findIndex(ke=>ke.href===X.properties.href);fe>-1&&o.value.splice(fe,1),o.value.unshift(X.properties)}},C=X=>{if(i.value.totalComponents[X.type]){const fe=i.value.totalComponents[X.type];p.value=fe.config}X.properties.x=X.x,X.properties.y=X.y,c.value=X,m.value=X.id,a.value.lfInstance.setProperties(X.id,{...X.properties}),X.text&&a.value.lfInstance.updateText(X.id,X.text.value)},b=X=>{m.value=X.id,c.value=X},w=X=>{var fe;(fe=c.value)!=null&&fe.properties&&(c.value.properties.nodeAlias=X)},_=[],I=X=>{const{scriptData:fe,normalData:ke,uiData:Ne,animationData:Ye,hiddenData:He}=X.dynamicForm||X.dynamic,{script:st}=fe||{};ke&&zo(a.value.lfInstance,Re,X.id,ke.dataPoint,"normalData",[],void 0),Ne&&zo(a.value.lfInstance,Re,X.id,Ne.dataPoint,"uiData",[],void 0),Ye&&Ye.animationCombo.forEach((rt,lt)=>{zo(a.value.lfInstance,Re,X.id,rt.dataPoint,"animationData",[w6],lt)}),He&&He.hiddenCombo.forEach((rt,lt)=>{zo(a.value.lfInstance,Re,X.id,rt.dataPoint,"hiddenData",[b6],lt)}),st&&setTimeout(()=>{y6(a.value.lfInstance,Re,X.id,st,_)},1e3)},E=Wo(X=>{if(X.id!==m.value||!a.value)return;const fe=a.value.lfInstance.graphModel.nodes.find(ut=>ut.id===X.id),{x:ke,y:Ne,width:Ye,height:He,rx:st,ry:rt}=X.basicForm;let lt=null;fe&&(st||rt?(fe.rx=st,fe.ry=rt,fe.properties.nodeSize&&(lt={rx:st,ry:rt})):fe.type!=="custom-text-node"&&fe.type!=="custom-input-node"&&(fe.width=Ye,fe.height=He,fe.properties.nodeSize&&(lt={width:Ye,height:He})),fe.x=ke,fe.y=Ne,fe.updateText(X.id,X.text&&X.text.value)),I(X),a.value.lfInstance.setProperties(X.id,{...X.basicForm,dynamic:{...X.dynamicForm}}),lt&&a.value.lfInstance.setProperties(X.id,{nodeSize:lt})},100,{leading:!0,trailing:!1}),k=Y({}),A=Y(null),S=Y(""),M=Y(""),$=Y(!1),L=(X,fe)=>{t.value=!1,n.value=!0,S.value=X.id,M.value=X.type,i.value.layers&&(i.value.layers.selectedKeys=[X.id]),bt(()=>{k.value=X.properties,setTimeout(()=>{$.value=!!fe,$.value&&A.value.setDefaultGradientBack()},100)})},T=X=>{a.value.lfInstance.setProperties(S.value,{...X})},R=X=>{X&&(X.pointsList?L(X):x(X))},P=X=>{},F=X=>{},O=Y(!1),N=Y(!1),V=Y(),H=X=>{X.isDefaultBackImg&&(X.backgroundColor&&X.backgroundColor!=="rgba(0, 0, 0, 0)"?(a.value.lfInstance.setGridVisible(!1),X.backgroundImage=""):X.backgroundColor==="rgba(0, 0, 0, 0)"&&(a.value.lfInstance.setGridVisible(!0),X.backgroundColor="",X.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=)"))},W=Y(!1),j=X=>{W.value&&(H(X),V.value=X)},Z=Y(""),q=Y("#f5f7f9");me(ht,X=>{q.value=X?"#181818":"#f5f7f9"},{immediate:!0});const G=gu(),K=Y(""),ee=Y(""),te=Y([]),ae=Y([]);Qt("thingApiDTOList",te),Qt("apiSetIdsList",ae);const de=()=>{const X=window.screen.width,fe=window.screen.height,ke=900,Ne=(900*(fe/X)).toFixed(0),Ye=`width=${ke},height=${+Ne},location=false`;v6(a.value.lfInstance,Ye,i.value.allLocalCompsNames,i.value.allRemoteComponentsList,V.value,te.value)},he=Un(),re=Y([]);Qt("edgesTemplates",re);const ue=Y(!0);let ne=null;const pe=Y(!1),Se=()=>{pe.value=!0,W.value=!0},Me=()=>{if(H(V.value),!ne)return;const X=a.value.lfInstance;if(!X)return;try{X.render(ne)}catch{}he.set(ne),ne.nodes.forEach(ke=>{const Ne=X.getNodeModelById(ke.id),Ye=["helper-circle-point","custom-text-node","custom-input-node","custom-diamond-node"];if(!Ne)return;if(!Ye.includes(Ne.type)){const{width:rt,height:lt,rx:ut,ry:$t}=ke.properties;rt&<&&(Ne.width=rt,Ne.height=lt),ut&&$t&&(Ne.rx=ut,Ne.ry=$t)}ke.properties.visible!==void 0&&(Ne.visible=ke.properties.visible);const{normalData:st}=ke.properties.dynamic||{};if(st)try{const rt=JSON.parse(st.dataPoint||"{}"),{dataSource:lt}=rt,ut=te.value.find($t=>$t.id===lt);if(ut){const Zt=JSON.parse(ut.timeCondition||"{}").type!=="last";Di(lt,_,Re,Zt)}}catch{}I(ke.properties)}),ne.edges.forEach(ke=>{const Ne=JSON.parse(ke.properties.dataPoint||"{}"),{dataSource:Ye}=Ne,He=te.value.find(st=>st.id===Ye);if(He){const rt=JSON.parse(He.timeCondition||"{}").type!=="last";Di(Ye,_,Re,rt)}if(Ic(a.value.lfInstance,Re,ke.id,ke.properties.dataPoint,"edgeData"),ke.type==="pure-curved-polyline"){const{sourceNodeId:st,targetNodeId:rt}=ke,lt=X.getNodeModelById(st),ut=X.getNodeModelById(rt);lt&&ut&&(lt.virtual=!1,ut.virtual=!1)}}),a.value.lfInstance.clearSelectElements(),ue.value=!1;const fe=Qe(a.value.lfInstance);S6(fe,null,[]),setTimeout(()=>{ne.nodes.forEach(ke=>{ke.type==="custom-image-node"&&ke.properties.href!=="./defaultPic.svg"&&setTimeout(()=>{const Ne=o.value.findIndex(Ye=>Ye.href===ke.properties.href);Ne>-1&&o.value.splice(Ne,1),o.value.unshift(ke.properties)})})},300)},Le=()=>{const X=window.screen.width,fe=window.screen.height;return`${X}*${fe}`},Ae=Y("");Qt("thumbnailImageUrl",Ae);const We=async()=>{var Yn;const X=await ln.info({boardManageId:K.value});if(X.code!==0)return ue.value=!1,ye.warning(X.msg);if(!X.data){ue.value=!1,V.value={boardType:"svg",width:1920,height:1080,backgroundImage:"url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=)",backgroundColor:"",backgroundRepeat:"repeat",pageName:"",deviceRatio:Le(),backgroundSize:"",isDefaultBackImg:!1};return}const{boardType:fe,width:ke,height:Ne,backgroundImage:Ye,backgroundColor:He,thumbnailUrl:st,backgroundRepeat:rt,isDefaultBackImg:lt,pageName:ut,deviceRatio:$t,backgroundSize:Zt,pictureData:mn,iotThingApiDTOList:nn,apiSetIds:Gn}=X.data;nn&&(te.value=nn),nn&&nn.forEach(Io=>{JSON.parse(Io.timeCondition||"{}").type!=="last"&&Qo(Io.id,Re)}),Gn&&(Array.isArray(Gn)?ae.value=Gn:ae.value=Gn.split(","));const ai={boardType:fe,width:ke||1920,height:Ne||1080,backgroundImage:Ye||'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=")',backgroundColor:He,backgroundRepeat:rt||"repeat",pageName:Z.value||G.query.name||ut,deviceRatio:$t,backgroundSize:Zt,isDefaultBackImg:lt,thumbnailUrl:st};Ae.value=st,ee.value=((Yn=X.data)==null?void 0:Yn.id)||"",ut&&(Z.value=G.query.name||ut),ne=JSON.parse(mn),V.value=ai},Ve=()=>{window.onbeforeunload=function(X){if(G.path==="/scadaDashboard")return X.preventDefault(),X=X||window.event,X&&(X.returnValue="离开设计器之前,请确保已保存好更改"),"离开设计器之前,请确保已保存好更改"}};ot(()=>{K.value=G.query.id,Z.value=G.query.name,Ve(),We()});const Ze=Y(null),se=async X=>{const fe=window.layer.load(1,{shade:[.2,"#000"]}),ke=a.value.lfInstance.getGraphData();if(ke.nodes=ke.nodes.filter(He=>He.type==="helper-circle-point"&&a.value.lfInstance.getNodeEdges(He.id).length===0?(a.value.lfInstance.deleteNode(He.id),!1):!0),!Ae.value&&!Ze.value)return window.layer.close(fe),ye.warning("请先上传缩略图!");let Ne=Ae.value;if(!Ne){const He=await ln.uploadDashboardSnapshot(Ze.value);if(He.code!==0)return ye.warning(He.msg);Ne=He.data}Ae.value=Ne;const Ye=await ln[ee.value?"edit":"save"]({...V.value,id:ee.value,thumbnailUrl:Ne,previewUrl:Ne,boardManageId:K.value,iotThingApiDTOList:te.value,apiSetIds:ae.value.join(","),pictureData:JSON.stringify(ke)});if(Ye.code!==0)return ye.warning(Ye.msg);re.value=[],window.layer.close(fe),X||ye.success("发布成功!")},we=()=>{V.value.backgroundSize||(V.value.backgroundSize="auto"),a.value.lfInstance.clearSelectElements(),Bt.confirm({title:"确认",icon:D(On),content:"确认要保存看板吗?",okText:"确认",cancelText:"取消",onOk:()=>{se(!1)}})},Ce=()=>{const X=Y(!1);Bt.confirm({title:"下载提示",icon:D(On),okText:"确认",cancelText:"取消",content:D("div",{},["是否保留数据绑定:",D(_o,{"onUpdate:checked":fe=>{X.value=fe}},null)]),async onOk(){const fe=a.value.lfInstance.getGraphData();if(X.value||(fe.nodes.forEach(He=>{He.properties.dynamic=nt(k6)}),fe.edges.forEach(He=>{He.properties.dataPoint="",He.properties.min=null,He.properties.max=null,He.properties.defaultValue=0})),!Ae.value&&!Ze.value)return ye.warning("请先上传缩略图!");let ke=Ae.value;if(!ke){const He=await ln.uploadDashboardSnapshot(Ze.value);if(He.code!==0)return ye.warning(He.msg);ke=He.data}Ae.value=ke;const Ne=JSON.stringify({...V.value,id:ee.value,thumbnailUrl:ke,previewUrl:ke,boardManageId:K.value,pictureData:fe}),Ye=V.value.pageName||`工作页面-${St()}`;$u(Ne,Ye)},onCancel(){}})},Ee=X=>{const fe=JSON.parse(X),{width:ke,height:Ne,backgroundImage:Ye,backgroundColor:He,backgroundRepeat:st,pageName:rt,deviceRatio:lt,backgroundSize:ut,pictureData:$t,id:Zt}=fe;if(Zt===ee.value)return ye.warning("已存在相同的看板!");const mn={width:ke||1920,height:Ne||1080,backgroundImage:Ye||'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2QwZDBkMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDBkMGQwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=")',backgroundColor:He||"#ffffff",backgroundRepeat:st||"repeat",pageName:rt,deviceRatio:lt,backgroundSize:ut};V.value=mn,V.value.pageName=Z.value;const nn=$t;setTimeout(()=>{a.value.lfInstance.render(nn),he.set(nn)},500)},Be=X=>{if(se(!0),X){const fe=te.value.find(ke=>ke.id===X);if(fe){const Ne=JSON.parse(fe.timeCondition||"{}").type!=="last";Di(X,_,Re,Ne)}}},je=()=>{O.value=!O.value},Ue=()=>{N.value=!N.value},Xe=X=>{a.value.customLinesPoints={},a.value.customLinesPoints[S.value]=X},Je=X=>{(!n.value||X.id!==S.value)&&L(X),A.value&&A.value.updateEdgePointsList()};return(X,fe)=>(Q(),ie("div",_6,[z("div",M6,[D(F5,{"page-name":B(Z),onPreview:de,onPublish:we,onDownload:Ce,onUploadDashboard:Ee},null,8,["page-name"]),D(mr,{loading:B(ue)},null,8,["loading"])]),z("div",A6,[z("div",{class:kt(["sidebar",{shrinkLeft:B(O)}])},[D(hm,{ref_key:"sideBarRef",ref:i,"diagram-inited":B(pe),"shrink-left":B(O),onDragInNode:l,onRemoteCompRegistered:Me,onElementSelected:R,onSaveBoardAction:Be},null,8,["diagram-inited","shrink-left"])],2),z("div",L6,[z("div",{class:"collapse-left absolute top-50% left--3 flex items-center justify-center cursor-pointer",onClick:je},[at(D(B(_a),{style:{color:"#ffffff"}},null,512),[[dt,!B(O)]]),at(D(B(Ma),{style:{color:"#ffffff"}},null,512),[[dt,B(O)]])]),D(i5,{ref_key:"diagramRef",ref:a,"page-configs":B(V),onInstanceInited:Se,onNodeResized:y,onNodeAdded:u,onNodeDroped:C,onNodeDragging:B(d),onNodeSelected:x,onNodeRotated:B(g),onTextUpdated:b,onEdgeSelected:L,onAnchorDragend:F,onAnchorDragstart:P,onRenamed:w,onDragText:s,onDragInputText:r,onBlankClicked:fe[0]||(fe[0]=()=>{t.value=!0,n.value=!1}),onUpdateEdgePoints:Je},null,8,["page-configs","onNodeDragging","onNodeRotated"]),D(g6,{"page-configs":B(V)},null,8,["page-configs"]),z("div",{class:"collapse-right absolute top-50% right--3 flex items-center justify-center cursor-pointer",onClick:Ue},[at(D(B(_a),{style:{color:"#ffffff"}},null,512),[[dt,B(N)]]),at(D(B(Ma),{style:{color:"#ffffff"}},null,512),[[dt,!B(N)]])])]),z("div",{class:kt(["propConfig overflow-hidden overflow-y-auto",{shrinkRight:B(N)}])},[at(D(Q4,{"page-configs":B(V),"page-name":B(Z),onPageConfigChanged:j,onPageNameChanged:fe[1]||(fe[1]=ke=>Z.value=ke),onUploadThumbnaiFile:fe[2]||(fe[2]=ke=>Ze.value=ke)},null,8,["page-configs","page-name"]),[[dt,B(t)]]),B(n)?(Q(),be(u6,{key:0,ref_key:"edgeConfigRef",ref:A,"current-edge-type":B(M),"edge-properties":B(k),"edge-id":B(S),"new-edge":B($),onUpdateEdgeProperties:T,onAdjustStartEndPoints:Xe},null,8,["current-edge-type","edge-properties","edge-id","new-edge"])):Pe("",!0),at(D(a5,{"basic-props":B(c),"dynamic-props":B(h),"current-node-id":B(m),"current-amis-config":B(p),onUpdateProps:B(E)},null,8,["basic-props","dynamic-props","current-node-id","current-amis-config","onUpdateProps"]),[[dt,!B(t)&&!B(n)]])],2)])],512))}});const n8=it(E6,[["__scopeId","data-v-c90dc8da"]]);export{n8 as default};
|