UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1 lines 296 kB
(function(K,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("lodash-es"),require("@vueuse/core"),require("../data-view/index.umd.js"),require("../modal/index.umd.js"),require("../transfer/index.umd.js"),require("../tabs/index.umd.js"),require("../order/index.umd.js"),require("../condition/index.umd.js"),require("../checkbox/index.umd.js"),require("../common/index.umd.js"),require("../filter-bar/index.umd.js"),require("../tooltip/index.umd.js"),require("../pagination/index.umd.js"),require("../button/index.umd.js"),require("../search-box/index.umd.js"),require("../tags/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../property-panel/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../../designer/checkbox/index.umd.js"),require("../../designer/checkbox-group/index.umd.js"),require("../combo-list/index.umd.js"),require("../combo-tree/index.umd.js"),require("../component/index.umd.js"),require("../color-picker/index.umd.js"),require("../content-container/index.umd.js"),require("../date-picker/index.umd.js"),require("../../designer/data-grid/index.umd.js"),require("../dropdown/index.umd.js"),require("../events-editor/index.umd.js"),require("../field-selector/index.umd.js"),require("../binding-selector/index.umd.js"),require("../image-cropper/index.umd.js"),require("../../designer/input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../nav/index.umd.js"),require("../number-range/index.umd.js"),require("../number-spinner/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../../designer/radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../schema-selector/index.umd.js"),require("../tree-grid/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../fieldset/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../drawer/index.umd.js"),require("../json-editor/index.umd.js"),require("../property-editor/index.umd.js"),require("../expression-editor/index.umd.js"),require("../code-editor/index.umd.js"),require("../html-template/index.umd.js"),require("../external-container/index.umd.js"),require("../notify/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","@vueuse/core","../data-view/index.umd.js","../modal/index.umd.js","../transfer/index.umd.js","../tabs/index.umd.js","../order/index.umd.js","../condition/index.umd.js","../checkbox/index.umd.js","../common/index.umd.js","../filter-bar/index.umd.js","../tooltip/index.umd.js","../pagination/index.umd.js","../button/index.umd.js","../search-box/index.umd.js","../tags/index.umd.js","../dynamic-form/index.umd.js","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js","../property-panel/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../../designer/button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../../designer/checkbox/index.umd.js","../../designer/checkbox-group/index.umd.js","../combo-list/index.umd.js","../combo-tree/index.umd.js","../component/index.umd.js","../color-picker/index.umd.js","../content-container/index.umd.js","../date-picker/index.umd.js","../../designer/data-grid/index.umd.js","../dropdown/index.umd.js","../events-editor/index.umd.js","../field-selector/index.umd.js","../binding-selector/index.umd.js","../image-cropper/index.umd.js","../../designer/input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../mapping-editor/index.umd.js","../nav/index.umd.js","../number-range/index.umd.js","../number-spinner/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../../designer/radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../schema-selector/index.umd.js","../tree-grid/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../fieldset/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../drawer/index.umd.js","../json-editor/index.umd.js","../property-editor/index.umd.js","../expression-editor/index.umd.js","../code-editor/index.umd.js","../html-template/index.umd.js","../external-container/index.umd.js","../notify/index.umd.js"],i):(K=typeof globalThis<"u"?globalThis:K||self,i(K["response-layout"]={},K.Vue,K.LodashES,K.VueUseCore,K.dataView,null,K.FTransfer,K.FTabs,K.FOrder,null,K.checkbox,K.common,K.FFilterBar,K.FTooltip,K.FPagination,K.FButton,K.FSearchBox,K.FTags,K.FDynamicForm,K.dynamicResolver,K.designerCanvas,K.propertyPanel,K.FAccordion,K.FAvatar,K.FButtonEdit,K.FButtonGroup,K.FCalendar,K.FCapsule,K.FCheckbox,K.FCheckboxGroup,K.FComboList,K.FComboTree,K.FComponent,K.FColorPicker,K.FContentContainer,K.FDatePicker,K.FDataGrid,K.FDropdown,K.FEventsEditor,K.FFieldSelector,K.FBindingSelector,K.FImageCropper,K.FInputGroup,K.FLayout,K.FListNav,K.FListView,K.FLookup,K.FMappingEditor,K.FNav,K.FNumberRange,K.FNumberSpinner,K.FPageHeader,K.FPageFooter,K.FProgress,K.FQuerySolution,K.FRadioGroup,K.FRate,K.FResponseToolbar,K.FResponseLayout$1,K.FResponseLayoutEditorSetting,K.FSection,K.FSmokeDetector,K.FSplitter,K.FStep,K.FSwitch,K.FText,K.FTimePicker,K.FTreeview,K.FUploader,K.FVerifyDetail,K.FVideo,K.FTextArea,K.FSchemaSelector,K.FTreeGrid$1,K.FEventParameter,K.FFilterConditionEditor,K.FFieldset,K.FSortConditionEditor,K.FMenuLookup,K.FDrawer,K.FJsonEditor,K.FPropertyEditor,K.FExpressionEditor,K.FCodeEditor,K.FHtmlTemplate))})(this,function(K,i,Ve,_n,Se,Vc,Oo,Do,Po,Oc,jo,Ne,Bo,Tn,Ro,Lo,$o,Wo,on,rn,jt,Tt,qo,Ao,Ho,Go,zo,Yo,Sn,Fn,an,Uo,Xo,Qo,Ko,Jo,Zo,er,tr,nr,or,rr,ir,ar,sr,lr,cr,ur,dr,fr,pr,mr,hr,gr,yr,vr,br,wr,Cr,xr,_r,Tr,Sr,Fr,kr,Mr,Ir,Nr,Er,Vr,Or,Dr,Pr,jr,Br,Rr,Lr,$r,Wr,qr,Ar,Hr,Gr,zr,Yr){"use strict";var Nc=Object.defineProperty;var Ec=(K,i,Ve)=>i in K?Nc(K,i,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):K[i]=Ve;var B=(K,i,Ve)=>Ec(K,typeof i!="symbol"?i+"":i,Ve);const kn={},Mn={};function sn(n){const{properties:t,title:e,ignore:o}=n,r=o&&Array.isArray(o),a=Object.keys(t).reduce((s,l)=>((!r||!o.find(c=>c===l))&&(s[l]=t[l].type==="object"&&t[l].properties?sn(t[l]):Ve.cloneDeep(t[l].default)),s),{});if(e&&(!r||!o.find(s=>s==="id"))){const s=e.toLowerCase().replace(/-/g,"_");a.id=`${s}_${Math.random().toString().slice(2,6)}`}return a}function Ur(n){const{properties:t,title:e,required:o}=n;if(o&&Array.isArray(o)){const r=o.reduce((a,s)=>(a[s]=t[s].type==="object"&&t[s].properties?sn(t[s]):Ve.cloneDeep(t[s].default),a),{});if(e&&o.find(a=>a==="id")){const a=e.toLowerCase().replace(/-/g,"_");r.id=`${a}_${Math.random().toString().slice(2,6)}`}return r}return{type:e}}function At(n,t={},e){const o=kn[n];if(o){let r=Ur(o);const a=Mn[n];return r=a?a({getSchemaByType:At},r,t,e):r,r}return null}function Xr(n,t){const e=sn(t);return Object.keys(e).reduce((o,r)=>(Object.prototype.hasOwnProperty.call(n,r)&&(o[r]&&Ve.isPlainObject(o[r])&&Ve.isPlainObject(n[r]||!n[r])?Object.assign(o[r],n[r]||{}):o[r]=n[r]),o),e),e}function In(n,t){return Object.keys(n).filter(o=>n[o]!=null).reduce((o,r)=>{if(t.has(r)){const a=t.get(r);if(typeof a=="string")o[a]=n[r];else{const s=a(r,n[r],n);Object.assign(o,s)}}else o[r]=n[r];return o},{})}function Qr(n,t,e=new Map){const o=Xr(n,t);return In(o,e)}function Kr(n={}){function t(d,f,u,h){if(typeof u=="number")return h[d].length===u;if(typeof u=="object"){const p=Object.keys(u)[0],m=u[p];if(p==="not")return Number(h[d].length)!==Number(m);if(p==="moreThan")return Number(h[d].length)>=Number(m);if(p==="lessThan")return Number(h[d].length)<=Number(m)}return!1}function e(d,f,u,h){return h[d]&&h[d].propertyValue&&String(h[d].propertyValue.value)===String(u)}const o=new Map([["length",t],["getProperty",e]]);Object.keys(n).reduce((d,f)=>(d.set(f,n[f]),d),o);function r(d,f){const u=d;return typeof f=="number"?[{target:u,operator:"length",param:null,value:Number(f)}]:typeof f=="boolean"?[{target:u,operator:"getProperty",param:d,value:!!f}]:typeof f=="object"?Object.keys(f).map(h=>{if(h==="length")return{target:u,operator:"length",param:null,value:f[h]};const p=h,m=f[h];return{target:u,operator:"getProperty",param:p,value:m}}):[]}function a(d){return Object.keys(d).reduce((u,h)=>{const p=r(h,d[h]);return u.push(...p),u},[])}function s(d,f){if(o.has(d.operator)){const u=o.get(d.operator);return u&&u(d.target,d.param,d.value,f)||!1}return!1}function l(d,f){return a(d).reduce((p,m)=>p&&s(m,f),!0)}function c(d,f){const u=Object.keys(d),h=u.includes("allOf"),p=u.includes("anyOf"),m=h||p,g=(m?d[m?h?"allOf":"anyOf":"allOf"]:[d]).map(v=>l(v,f));return h?!g.includes(!1):g.includes(!0)}return{parseValueSchema:c}}const re={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"html-template":{type:"html-template",name:"模板容器"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"},"external-container":{type:"external-container",name:"外部容器",icon:"content-container"},"list-nav":{type:"list-nav",name:"列表导航"},"filter-bar":{type:"filter-bar",name:"筛选条"}},Jr={},Zr={};Kr();function pt(n,t,e=new Map,o=(s,l,c,d)=>l,r={},a=s=>s){return kn[t.title]=t,Mn[t.title]=o,Jr[t.title]=r,Zr[t.title]=a,(s={},l=!0)=>{if(!l)return In(s,e);const c=Qr(s,t,e),d=Object.keys(n).reduce((f,u)=>(f[u]=n[u].default,f),{});return Object.assign(d,c)}}function Ht(n,t){return{customClass:t.class,customStyle:t.style}}function ei(){function n(t,e){const{dataSource:o}=t||{};return o===void 0?{}:{}}return{resolve:n}}function ti(){function n(t,e){return t.selectItemById(e)}return{selectItemById:n}}function ni(){function n(t,e){const{columns:o}=e;return t.updateColumns(o)}return{updateColumns:n}}const Nn=new Map([["appearance",Ht]]);function oi(n,t,e){if(e.componentFeature){const o=JSON.parse(e.componentFeature);t.appearance={class:"bg-white"},t.contents=String(o.splitter).split(":").map(r=>{const a=n.getSchemaByType("response-layout-item");return a.appearance={class:`h-100 col-${r} px-0`},a})}return t}const ri={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout.schema.json",title:"response-layout",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Respnse Layout",type:"string"},type:{description:"The type string of Respnse Layout component",type:"string",default:"response-layout"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},Gt={customClass:{type:String,default:""},customStyle:{type:String,default:""}},ln=pt(Gt,ri,Nn,oi),zt=i.defineComponent({name:"FResponseLayout",props:Gt,emits:[],setup(n,t){function e(r,a){r&&a&&a.split(" ").reduce((l,c)=>(l[c]=!0,l),r)}const o=i.computed(()=>{const r={"d-flex":!0};return e(r,n.customClass),r});return()=>i.createVNode("div",{class:o.value,style:n.customStyle},[t.slots.default&&t.slots.default()])}}),ii={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-item.schema.json",title:"response-layout-item",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Respnse Layout Item",type:"string"},type:{description:"The type string of Respnse Layout Item component",type:"string",default:"response-layout-item"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},cn={customClass:{type:String,default:""},customStyle:{type:String,default:""}},En=pt(cn,ii,Nn),Yt=i.defineComponent({name:"FResponseLayoutItem",props:cn,emits:[],setup(n,t){return()=>i.createVNode("div",{class:n.customClass,style:n.customStyle},[t.slots.default&&t.slots.default()])}});function un(n,t,e){var y;const o=e&&e.getStyles&&e.getStyles()||"",r=e&&e.getDesignerClass&&e.getDesignerClass()||"",a=i.ref();function s(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:e&&e.checkCanMoveComponent?e.checkCanMoveComponent():!0}function l(){return!1}function c(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:e&&e.checkCanDeleteComponent?e.checkCanDeleteComponent():!0}function d(){return(t==null?void 0:t.schema.componentType)==="frame"?!0:e&&e.hideNestedPaddingInDesginerView?e.hideNestedPaddingInDesginerView():!1}function f(F){if(!F||!F.value)return null;if(F.value.schema&&F.value.schema.type==="component")return F.value;const T=i.ref(F==null?void 0:F.value.parent),N=f(T);return N||null}function u(F=t){var R;if(e!=null&&e.getDraggableDesignItemElement)return e.getDraggableDesignItemElement(F);const{componentInstance:T,designerItemElementRef:N}=F;if(!T||!T.value)return null;const{getCustomButtons:b}=T.value;return T.value.canMove||b&&((R=b())!=null&&R.length)?N:u(F.parent)}function h(F){return!!e&&e.canAccepts(F)}function p(){return(t==null?void 0:t.schema.label)||(t==null?void 0:t.schema.title)||(t==null?void 0:t.schema.name)}function m(){}function k(F,T){var N;!F||!T||(e!=null&&e.onAcceptMovedChildElement&&e.onAcceptMovedChildElement(F,T),(N=t==null?void 0:t.setupContext)==null||N.emit("dragEnd"))}function C(F,T){const{componentType:N}=F;let b=At(N,F,T);e&&e.onResolveNewComponentSchema&&(b=e.onResolveNewComponentSchema(F,b));const R=N.toLowerCase().replace(/-/g,"_");return b&&!b.id&&b.type===N&&(b.id=`${R}_${Math.random().toString().slice(2,6)}`),b}function g(F){F&&e!=null&&e.onChildElementMovedOut&&e.onChildElementMovedOut(F)}function x(...F){if(e&&e.getPropsConfig)return e.getPropsConfig(...F)}function v(F){if(!F)return;const T=t==null?void 0:t.schema,{formSchemaUtils:N}=F;if(T&&N.getExpressions().length){const b=N.getExpressions().findIndex(R=>R.target===T.id);b>-1&&N.getExpressions().splice(b,1)}}function _(F){e&&e.onRemoveComponent&&e.onRemoveComponent(),v(F),t!=null&&t.schema.contents&&t.schema.contents.map(T=>{let N=T.id;T.type==="component-ref"&&(N=T.component);const b=n.value.querySelectorAll(`#${N}-design-item`);b!=null&&b.length&&Array.from(b).map(R=>{var L;(L=R==null?void 0:R.componentInstance)!=null&&L.value.onRemoveComponent&&R.componentInstance.value.onRemoveComponent(F)})})}function I(){if(e&&e.getCustomButtons)return e.getCustomButtons()}function M(F){if(e&&e.onPropertyChanged)return e.onPropertyChanged(F)}return a.value={canMove:s(),canSelectParent:l(),canDelete:c(),canNested:!d(),contents:t==null?void 0:t.schema.contents,elementRef:n,parent:(y=t==null?void 0:t.parent)==null?void 0:y.componentInstance,schema:t==null?void 0:t.schema,styles:o,designerClass:r,canAccepts:h,getBelongedComponentInstance:f,getDraggableDesignItemElement:u,getDraggingDisplayText:p,getPropConfig:x,getDragScopeElement:m,onAcceptMovedChildElement:k,onChildElementMovedOut:g,addNewChildComponentSchema:C,triggerBelongedComponentToMoveWhenMoved:!!e&&e.triggerBelongedComponentToMoveWhenMoved||i.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!e&&e.triggerBelongedComponentToDeleteWhenDeleted||i.ref(!1),onRemoveComponent:_,getCustomButtons:I,onPropertyChanged:M},a}const Bt=i.ref(0);function ai(n,t){const e=t.getBoundingClientRect(),o=n.getBoundingClientRect(),r=o.top>=e.top,a=o.top<=e.bottom;return r&&a}function si(n){const t=n.querySelector(".component-btn-group");if(!t)return;t.style.display="";const e=t.getBoundingClientRect();if(!(e.top===0&&e.left===0)){const o=t.querySelector("div");if(o){const r=o.getBoundingClientRect();o.style.top=e.top+"px";let a=e.left-r.width;const s=document.querySelector(".editorDiv");if(s){const l=s.getBoundingClientRect();a<l.left&&({left:a}=n.getBoundingClientRect())}o.style.left=a+"px"}}}function li(n){if(!window.scrollContainerList)return;const t=Array.from(window.scrollContainerList);if(t.length&&t.length===1){const e=t[0],o=document.querySelector(`[id=${e}]`);if(o&&o.contains(n))return o}}function Vn(n){if(!n)return;const t=n.getBoundingClientRect();if(t.width===0&&t.height===0)return;const e=n.querySelector(".component-btn-group");if(e){let o=!0;const r=li(n);if(r&&(o=ai(n,r)),!o){e.style.display="none";return}si(n)}}function ci(n){if(!n)return;let t;n.className.includes("dgComponentSelected")?t=n:t=n.querySelector(".dgComponentSelected"),t&&Vn(t)}const ui=i.ref(0);function On(){ui.value++}function di(n){const{formSchemaUtils:t,formStateMachineUtils:e}=n;function o(c,d=""){return{path:d+c.code,field:c.id,fullPath:c.code}}function r(c,d=""){return t.getViewModelById(c).states.map(u=>o(u,d))}function a(c){const d=t.getRootViewModelId(),f=r(c);if(c===d)return f;const u=r(d,"root-component.");return[...f,...u]}function s(c){return c.binding&&c.binding.path||c.id||""}function l(){return e&&e.getRenderStates()||[]}return{getVariables:a,getControlName:s,getStateMachines:l}}class fi{constructor(t){B(this,"sessionVariables",[{key:"CurrentSysOrgName",name:"当前组织Name",description:"当前组织Name"},{key:"CurrentSysOrgId",name:"当前组织Id",description:"当前组织Id"},{key:"CurrentUserName",name:"当前用户Name",description:"当前用户Name"},{key:"CurrentUserCode",name:"当前用户Code",description:"当前用户Code"},{key:"CurrentUserId",name:"当前用户Id",description:"当前用户Id"},{key:"CurrentLanguage",name:"当前语言编号",description:"当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"}]);B(this,"expressionNames",{compute:"计算表达式",dependency:"依赖表达式",validate:"验证表达式",dataPicking:"帮助前表达式",visible:"可见表达式",readonly:"只读表达式",required:"必填表达式"});B(this,"getExpressionConverter",(t,e)=>({convertFrom:(o,r,a,s)=>{const l=a.getExpressionRuleValue(t,e||r);return l&&l.value||""},convertTo:(o,r,a,s,l)=>{var c;if(r==="dataPicking"&&(a!=null&&a.target)){const d=`${a.target}_dataPicking`;((c=a.rules)==null?void 0:c.some(u=>u.id===d&&u.value))?o.dictPickingExpressionId=d:delete o.dictPickingExpressionId}s.updateExpression(a)}}));this.formSchemaService=t}getExpressionRule(t,e){const o=this.formSchemaService.getExpressions();if(!o)return"";const r=o.find(s=>s.target===t);if(!r)return"";const a=r.rules.find(s=>s.type===e);return a||""}getContextFormVariables(){const{module:t}=this.formSchemaService.getFormSchema();if(!t.viewmodels||t.viewmodels.length===0)return[];const e=this.formSchemaService.getRootViewModelId(),o=this.formSchemaService.getViewModelById(e);if(!o||!o.states||o.states.length===0)return[];const r=[];return o.states.forEach(a=>{r.push({key:a.code,name:a.name,description:a.name,category:a.category})}),r}createTreeNode(t,e,o="label"){return{id:t.id,name:t.name,bindingPath:t[o],parents:e}}buildEntityFieldsTreeData(t=null,e){const o=[];return t==null||t.forEach(r=>{var l;const a=this.createTreeNode(r,e);let s=[];(l=r.type)!=null&&l.fields&&(s=this.buildEntityFieldsTreeData(r.type.fields,[...e,r.label])),o.push({data:a,children:s,expanded:!0})}),o}buildChildEntityTreeData(t=null,e){const o=[];return t==null||t.forEach(r=>{var c,d;const a=this.createTreeNode(r,e),s=this.buildEntityFieldsTreeData((c=r.type)==null?void 0:c.fields,[...e,r.label]),l=this.buildChildEntityTreeData((d=r.type)==null?void 0:d.entities,[...e,r.label]);l!=null&&l.length&&(s==null||s.push(...l)),o.push({data:a,children:s||[],expanded:!0})}),o}getEntitiesTreeData(){const t=this.formSchemaService.getSchemaEntities();if(!(t!=null&&t.length))return[];const e=t[0];if(!(e!=null&&e.type))return[];const o=this.buildEntityFieldsTreeData(e.type.fields,[e.code]),r=this.buildChildEntityTreeData(e.type.entities,[e.code]);return r!=null&&r.length&&(o==null||o.push(...r)),{entityCode:e.code,fields:[{data:this.createTreeNode(e,[],"code"),children:o||[]}]}}getEntitiesAndVariables(){return{entities:this.getEntitiesTreeData(),variables:{session:{name:"系统变量",items:this.sessionVariables,visible:!1},forms:{name:"表单变量",items:this.getContextFormVariables(),visible:!0}}}}onBeforeOpenExpression(t,e,o){const r=o==="Field"?t.binding.field:t.id,a=this.getExpressionRule(r,e),s=this.getEntitiesAndVariables(),l={message:["validate","required","dataPicking"].includes(e)&&a?a.message:"",...s};return a.messageType!=null&&(l.messageType=a.messageType),l}buildRule(t,e,o,r){const{expression:a,message:s,messageType:l}=e,c={id:`${t}_${o}`,type:o,value:a};return(o==="validate"||o==="dataPicking"||o==="required")&&(c.message=s),o==="dataPicking"&&(c.messageType=l),o==="validate"&&r&&(c.elementId=r),c}getExpressionData(){const{expressions:t}=this.formSchemaService.getFormSchema().module;return t||[]}updateExpression(t,e,o,r){const a=e==="Field"?t.binding.field:t.id,s=this.buildRule(a,o,r,t.type==="form-group"?t.id:"");let c=this.getExpressionData().find(f=>f.targetType===e&&f.target===a);const d=f=>f.value.trim()==="";if(c){const f=c.rules.find(u=>u.id===s.id);if(f)d(s)?c.rules=c.rules.filter(u=>u.id!==s.id):(Object.assign(f,s),r==="validate"&&t.type==="form-group"&&(f.elementId=t.id));else{if(d(s))return null;c.rules=c.rules||[],c.rules.push(s)}}else{if(d(s))return null;c={target:`${a}`,rules:[s],targetType:e}}return c}getExpressionEditorOptions(t,e,o,r){return o.reduce((a,s)=>{var c,d;const l=e==="Field"?(c=t==null?void 0:t.binding)==null?void 0:c.field:t.id;return a[s]={hide:e==="Field"?!!((d=t==null?void 0:t.binding)!=null&&d.field):!1,description:"",title:this.expressionNames[s],type:"string",$converter:this.getExpressionConverter(l),editor:{type:"expression-editor",singleExpand:!1,dialogTitle:`${this.expressionNames[s]}编辑器`,showMessage:s==="validate"||s==="dataPicking"||s==="required",showMessageType:s==="dataPicking",beforeOpen:()=>this.onBeforeOpenExpression(t,s,e),onSubmitModal:f=>{const u=this.updateExpression(t,e,f,s);if(r){const h=this.buildRule(l,f,s);r(h)}return u}}},a},{})}getExpressionInfo(t,e,o){const r=e==="Field"?t.binding.field:t.id,a=this.getExpressionRule(r,o),s={value:a&&a.value,targetId:r,targetType:e,expressionType:o};return a&&a.message&&(s.message=a.message),s}getExpressionConfig(t,e,o=["compute","dependency","validate"],r){return{description:"表达式",title:"表达式",properties:{...this.getExpressionEditorOptions(t,e,o,r)}}}getExpressionOptions(t,e,o){const r=this.getExpressionInfo(t,e,o);return{dialogTitle:`${this.expressionNames[o]}编辑器`,singleExpand:!1,showMessage:o==="required",beforeOpen:()=>this.onBeforeOpenExpression(t,o,e),expressionInfo:r}}}class Ut{constructor(t,e){B(this,"componentId");B(this,"viewModelId");B(this,"eventsEditorUtils");B(this,"formSchemaUtils");B(this,"formMetadataConverter");B(this,"designViewModelUtils");B(this,"designViewModelField");B(this,"controlCreatorUtils");B(this,"designerHostService");B(this,"schemaService",null);B(this,"metadataService",null);B(this,"propertyConfig",{type:"object",categories:{}});var o;this.componentId=t,this.designerHostService=e,this.eventsEditorUtils=e.eventsEditorUtils,this.formSchemaUtils=e.formSchemaUtils,this.formMetadataConverter=e.formMetadataConverter,this.viewModelId=((o=this.formSchemaUtils)==null?void 0:o.getViewModelIdByComponentId(t))||"",this.designViewModelUtils=e.designViewModelUtils,this.controlCreatorUtils=e.controlCreatorUtils,this.metadataService=e.metadataService,this.schemaService=e.schemaService}getTableInfo(){var t;return(t=this.schemaService)==null?void 0:t.getTableInfoByViewModelId(this.viewModelId)}setDesignViewModelField(t){var o;const e=t.binding&&t.binding.type==="Form"&&t.binding.field;if(e){if(!this.designViewModelField){const r=this.designViewModelUtils.getDgViewModel(this.viewModelId);this.designViewModelField=r.fields.find(a=>a.id===e)}t.updateOn=(o=this.designViewModelField)==null?void 0:o.updateOn}}getBasicPropConfig(t){return{description:"Basic Information",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"combo-list",textField:"name",valueField:"value",idField:"value",editable:!1,data:[{value:t.type,name:re[t.type].name}]}}}}}getAppearanceConfig(t=null,e={},o){const r={title:"外观",description:"Appearance"},a={class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter"},style:{title:"style样式",type:"string",description:"组件的样式",$converter:"/converter/appearance.converter"}};for(const s in e)a[s]=Object.assign(a[s]||{},e[s]);return{...r,properties:{...a},setPropertyRelates(s,l){if(s){switch(s&&s.propertyID){case"class":case"style":{Bt.value++;break}}o&&o(s,t,l)}}}}getPropertyEditorParams(t,e=[],o="visible",r={},a={}){const{getVariables:s,getControlName:l,getStateMachines:c}=di(this.designerHostService),d=this.getRealTargetType(t),f=e&&e.length>0?e:["Const","Variable","StateMachine","Expression"],u={type:"property-editor",propertyTypes:f};return f.map(h=>{switch(h){case"Const":Object.assign(u,{constType:"enum",constEnums:[{id:!0,name:"是"},{id:!1,name:"否"}]},r);break;case"Expression":u.expressionConfig=this.getExpressionOptions(t,d,o);break;case"StateMachine":u.stateMachines=c();break;case"Variable":Object.assign(u,{controlName:l(t),newVariablePrefix:"is",newVariableType:"Boolean",variables:s(this.viewModelId),onBeforeOpenVariables:p=>{p.value=s(this.viewModelId)}},a);break}}),u}getVisibleProperty(t,e=""){return{visible:{title:"是否可见",type:"boolean",description:"运行时组件是否可见",editor:this.getPropertyEditorParams(t,e==="gridFieldEditor"?["Const","Expression"]:["Const","Variable","StateMachine","Expression"],"visible")}}}getBehaviorConfig(t,e="",o={},r){const a={title:"行为",description:""},s=this.getVisibleProperty(t,e);for(const c in o)s[c]=Object.assign(s[c]||{},o[c]);const l=this;return{...a,properties:{...s},setPropertyRelates(c,d){if(c){switch(c.propertyID){case"disabled":case"readonly":case"visible":l.afterMutilEditorChanged(t,c);break}r&&r(c,d)}}}}afterMutilEditorChanged(t,e){this.addNewVariableToViewModel(e,this.viewModelId),this.updateExpressionValue(e),this.clearExpression(e,t)}updateElementByParentContainer(t,e){const o=e&&e.parent&&e.parent.schema;if(!o)return;const r=o.contents.findIndex(s=>s.id===t),a=Ve.cloneDeep(o.contents[r]);o.contents.splice(r,1),o.contents.splice(r,0,a),On()}addNewVariableToViewModel(t,e){const o=t.propertyValue;if(!(o&&typeof o=="object")||!(o.type==="Variable"&&o.isNewVariable))return;const s={id:o.field,category:"locale",code:o.fullPath,name:o.fullPath,type:o.newVariableType||"String"};delete o.newVariableType,delete o.isNewVariable,this.formSchemaUtils.getVariableByCode(s.code)||this.formSchemaUtils.getViewModelById(e).states.push(s)}updateExpressionValue(t){const e=t.propertyValue;if(!((e&&e.type)==="Expression"&&e.expressionInfo))return;const{expressionId:a,expressionInfo:s}=e,{targetId:l,targetType:c,expressionType:d,value:f,message:u}=s,h=this.formSchemaUtils.getModule();h.expressions??(h.expressions=[]);const{expressions:p}=h;let m=p.find(C=>C.target===l);m||(m={target:l,rules:[],targetType:c},p.push(m));const k=m.rules.find(C=>C.type===d);if(k)k.value=f,k.message=u;else{const C={id:a,type:d,value:f,message:u};m.rules.push(C)}delete e.expressionInfo}clearExpression(t,e){const o=t.propertyValue;if(o&&o.type==="Expression")return;const a=t.propertyID,s=this.formSchemaUtils.getExpressions(),l=e.binding?e.binding.field:e.id,c=s.find(d=>d.target===l);!c||!c.rules||(c.rules=c.rules.filter(d=>d.type!==a))}getExpressionOptions(t,e,o){return new fi(this.formSchemaUtils).getExpressionOptions(t,e,o)}getRealTargetType(t){return["response-toolbar-item","tab-toolbar-item","section-toolbar-item"].indexOf(t.type)>-1?"Button":t.binding&&t.binding.field?"Field":"Container"}}class pi extends Ut{constructor(t,e){super(t,e)}getPropertyConfig(t){return this.propertyConfig.categories.basic=this.getBasicPropConfig(t),this.propertyConfig.categories.appearance=this.getAppearanceConfig(t),this.propertyConfig.categories.layout=this.getLayoutPropConfig(t,this.viewModelId),this.propertyConfig}getLayoutPropConfig(t,e){return{title:"布局",description:"layout",properties:{layout:{type:"select",description:"配置布局容器内区块个数及比例。",editor:{type:"response-layout-splitter",layout:t.contents||[]}}},setPropertyRelates(o,r){Bt.value++}}}}function mi(n,t){const e=n.schema;function o(l){return!1}function r(l){return new pi(l,t).getPropertyConfig(e)}function a(){var d;const l=n.designerItemElementRef.value.querySelector(`#${e.id}`);if(!l)return;const c=((d=n.schema.contents)==null?void 0:d.map(f=>f.id))||[];Array.from(l.children).map(f=>{var h;const u=(h=f.componentInstance)==null?void 0:h.value;u!=null&&u.schema&&!c.includes(u.schema.id)&&u.onRemoveComponent&&u.onRemoveComponent(t)})}function s(l){var c;l&&((c=l==null?void 0:l.changeObject)==null?void 0:c.propertyID)==="layout"&&a()}return{canAccepts:o,getPropsConfig:r,onPropertyChanged:s}}const hi=i.defineComponent({name:"FResponseLayoutDesign",props:Gt,emits:[],setup(n,t){const e=i.ref(),o=i.inject("design-item-context"),r=i.inject("designer-host-service"),a=mi(o,r),s=un(e,o,a);i.onMounted(()=>{e.value.componentInstance=s}),t.expose(s.value);function l(d,f){d&&f&&f.split(" ").reduce((h,p)=>(h[p]=!0,h),d)}const c=i.computed(()=>{const d={"d-flex":!0,"response-layout":!0};return l(d,n.customClass),d});return()=>i.createVNode("div",{ref:e,class:c.value,style:"height:inherit;"},[t.slots.default&&t.slots.default()])}});var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xt(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var gi={exports:{}};(function(n,t){(function(e){n.exports=e()})(function(){return function(){function e(o,r,a){function s(d,f){if(!r[d]){if(!o[d]){var u=typeof Xt=="function"&&Xt;if(!f&&u)return u(d,!0);if(l)return l(d,!0);var h=new Error("Cannot find module '"+d+"'");throw h.code="MODULE_NOT_FOUND",h}var p=r[d]={exports:{}};o[d][0].call(p.exports,function(m){var k=o[d][1][m];return s(k||m)},p,p.exports,e,o,r,a)}return r[d].exports}for(var l=typeof Xt=="function"&&Xt,c=0;c<a.length;c++)s(a[c]);return s}return e}()({1:[function(e,o,r){var a={},s="(?:^|\\s)",l="(?:\\s|$)";function c(u){var h=a[u];return h?h.lastIndex=0:a[u]=h=new RegExp(s+u+l,"g"),h}function d(u,h){var p=u.className;p.length?c(h).test(p)||(u.className+=" "+h):u.className=h}function f(u,h){u.className=u.className.replace(c(h)," ").trim()}o.exports={add:d,rm:f}},{}],2:[function(e,o,r){(function(a){var s=e("contra/emitter"),l=e("crossvent"),c=e("./classes"),d=document,f=d.documentElement;function u(b,R){var L=arguments.length;L===1&&Array.isArray(b)===!1&&(R=b,b=[]);var w,S,D,j,O,P,A,V,E,H=null,$,W,z=!1,X=0,J,Q=R||{};Q.moves===void 0&&(Q.moves=x),Q.accepts===void 0&&(Q.accepts=x),Q.invalid===void 0&&(Q.invalid=mt),Q.containers===void 0&&(Q.containers=b||[]),Q.isContainer===void 0&&(Q.isContainer=g),Q.copy===void 0&&(Q.copy=!1),Q.copySortSource===void 0&&(Q.copySortSource=!1),Q.revertOnSpill===void 0&&(Q.revertOnSpill=!1),Q.removeOnSpill===void 0&&(Q.removeOnSpill=!1),Q.direction===void 0&&(Q.direction="vertical"),Q.ignoreInputTextSelection===void 0&&(Q.ignoreInputTextSelection=!0),Q.mirrorContainer===void 0&&(Q.mirrorContainer=d.body);var de=s({containers:Q.containers,start:Oe,end:dt,cancel:Be,remove:Ge,destroy:Y,canMove:Fe,dragging:!1});return Q.removeOnSpill===!0&&de.on("over",xt).on("out",gt),xe(),de;function he(q){return de.containers.indexOf(q)!==-1||Q.isContainer(q)}function xe(q){var ee=q?"remove":"add";m(f,ee,"mousedown",G),m(f,ee,"mouseup",_e)}function De(q){var ee=q?"remove":"add";m(f,ee,"mousemove",te)}function Re(q){var ee=q?"remove":"add";l[ee](f,"selectstart",ue),l[ee](f,"click",ue)}function Y(){xe(!0),_e({})}function ue(q){$&&q.preventDefault()}function G(q){j=q.clientX,O=q.clientY;var ee=k(q)!==1||q.metaKey||q.ctrlKey;if(!ee){var oe=q.target,ne=ve(oe);ne&&($=ne,De(),q.type==="mousedown"&&(M(oe)?oe.focus():q.preventDefault()))}}function te(q){if($){if(k(q)===0){_e({});return}if(!(q.clientX!==void 0&&Math.abs(q.clientX-j)<=(Q.slideFactorX||0)&&q.clientY!==void 0&&Math.abs(q.clientY-O)<=(Q.slideFactorY||0))){if(Q.ignoreInputTextSelection){var ee=N("clientX",q)||0,oe=N("clientY",q)||0,ne=d.elementFromPoint(ee,oe);if(M(ne))return}var be=$;De(!0),Re(),dt(),ot(be),c.add(V||D,"gu-transit"),_t(),Mt(),X=0,ft(q)}}}function ve(q){if(!(de.dragging&&w)&&!he(q)){for(var ee=q;I(q)&&he(I(q))===!1;)if(Q.invalid(q,ee)||(q=I(q),!q))return;var oe=I(q);if(oe&&!Q.invalid(q,ee)){var ne=Q.moves(q,oe,ee,F(q));if(ne)return{item:q,source:oe}}}}function Fe(q){return!!ve(q)}function Oe(q){var ee=ve(q);ee&&ot(ee)}function ot(q){Ie(q.item,q.source)&&(V=q.item.cloneNode(!0),de.emit("cloned",V,q.item,"copy")),S=q.source,D=q.item,P=A=F(q.item),de.dragging=!0,de.emit("drag",D,S)}function mt(){return!1}function dt(){if(de.dragging){var q=V||D;Ee(q,I(q))}}function Z(){$=!1,De(!0),Re(!0)}function _e(q){if(Z(),!!de.dragging){var ee=V||D,oe=N("clientX",q)||0,ne=N("clientY",q)||0,be=C(w,oe,ne),ye=Ct(be,oe,ne);ye&&(V&&Q.copySortSource||!V||ye!==S)?Ee(ee,ye):Q.removeOnSpill?Ge():Be()}}function Ee(q,ee){var oe=I(q);V&&Q.copySortSource&&ee===S&&oe.removeChild(D),ht(ee)?de.emit("cancel",q,S):de.emit("drop",q,ee,S,A),at()}function Ge(){if(de.dragging){var q=V||D,ee=I(q);ee&&ee.removeChild(q),de.emit(V?"cancel":"remove",q,ee,S),at()}}function Be(q){if(de.dragging){var ee=arguments.length>0?q:Q.revertOnSpill,oe=V||D,ne=I(oe),be=ht(ne);be===!1&&ee&&(V?ne&&ne.removeChild(V):S.insertBefore(oe,P)),be||ee?de.emit("cancel",oe,S,S):de.emit("drop",oe,ne,S,A),at()}}function at(){var q=V||D;Z(),ie(),fe(),q&&c.rm(q,"gu-transit"),E&&clearTimeout(E),de.dragging=!1,H&&de.emit("out",q,H,S),de.emit("dragend",q,X),S=D=V=P=A=E=H=null}function ht(q,ee){var oe;return ee!==void 0?oe=ee:w?oe=A:oe=F(V||D),q===S&&oe===P}function Ct(q,ee,oe){for(var ne=q;ne&&!be();)ne=I(ne);return ne;function be(){var ye=he(ne);if(ye===!1)return!1;var je=ge(ne,q),Te=we(ne,je,ee,oe),$e=ht(ne,Te);return $e?!0:Q.accepts(D,ne,S,Te)}}function ft(q){if(!w)return;q.preventDefault();var ee=N("clientX",q)||0,oe=N("clientY",q)||0;w.style.left=ee-2+"px",w.style.top=oe-2+"px";var ne=V||D,be=C(w,ee,oe),ye=Ct(be,ee,oe),je=ye!==null&&ye!==H;(je||ye===null)&&(me(),H=ye,st()),pe(be,oe);var Te=I(ne);if(ye===S&&V&&!Q.copySortSource){Te&&Te.removeChild(ne);return}var $e,rt=ge(ye,be);if(z=Pe(rt,ye),rt!==null)$e=we(ye,rt,ee,oe);else if(Q.revertOnSpill===!0&&!V)$e=P,ye=S;else{V&&Te&&Te.removeChild(ne),V&&W&&(W.style.display="none");return}W.style.display="block",kt($e,ne,je),$e?Ze(rt,$e):U(ye);function Xe(Ce){de.emit(Ce,ne,H,S)}function st(){je&&Xe("over")}function me(){H&&Xe("out")}}function kt(q,ee,oe){(q===ee||q===F(ee))&&(A=F(ee)),(q===null&&oe||q!==ee&&q!==F(ee))&&(A=q)}function xt(q){c.rm(q,"gu-hide")}function gt(q){de.dragging&&c.add(q,"gu-hide")}function Mt(){w||(w=document.createElement("div"),w.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",w.innerHTML=Q.getMirrorText&&Q.getMirrorText(D)||"控件",c.add(w,"gu-mirror"),Q.mirrorContainer.appendChild(w),m(f,"add","mousemove",ft),c.add(Q.mirrorContainer,"gu-unselectable"),de.emit("cloned",w,D,"mirror"))}function _t(){if(W=document.createElement("div"),c.add(W,"gu-insertion"),D){var q=D.getBoundingClientRect();W.style.left=q.left+"px",W.style.top=q.top+"px"}z=!1,Q.mirrorContainer.appendChild(W)}function ie(){w&&(c.rm(Q.mirrorContainer,"gu-unselectable"),m(f,"remove","mousemove",ft),I(w).removeChild(w),w=null)}function fe(){W&&(I(W).removeChild(W),W=null)}function ge(q,ee){for(var oe=ee;oe!==q&&I(oe)!==q;)oe=I(oe);return oe===f?null:oe}function Pe(q,ee){if(!ee)return z;var oe=q||ee&&ee.lastElementChild;if(!oe)return!0;var ne=getComputedStyle(q),be=/^inline/.test(ne.getPropertyValue("display"))||/^(left|right)$/.test(ne.getPropertyValue("float"));if(be)return!0;if(ee){var ye=getComputedStyle(ee),je=ye.getPropertyValue("display");if(/flex$/.test(je)){var Te=ye.getPropertyValue("flex-direction")||"row";if(Te==="row"||Te==="row-reverse")return!ze(ee)}return!1}return!0}function ze(q){if(!q.children||!q.children.length)return!1;for(const ee of Array.from(q.children)){const ne=(ee.className&&ee.className.split(" ")||[]).filter(be=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(be));if(!ne.length)return!1;for(const be of ne){const ye=be.slice(be.lastIndexOf("-")+1);if(parseInt(ye,10)!==12)return!1}}return!0}function Ze(q,ee){const oe=ee.getBoundingClientRect();if(W.style.left=oe.left+"px",W.style.top=oe.top+"px",z){if(W.style.height=oe.height+"px",W.style.width="4px",q){const ne=q.getBoundingClientRect();ne.top!==oe.top&&(W.style.left=ne.right+"px",W.style.top=ne.top+"px",W.style.height=ne.height+"px")}}else if(W.style.height="4px",W.style.width=oe.width+"px",J){const ne=J.getBoundingClientRect();oe.top<ne.top&&(W.style.display="none")}ee===D&&D&&(W.style.display="none")}function U(q){A=null;var ee=q.lastElementChild;if(ee){var oe=ee.getBoundingClientRect();z?(W.style.left=oe.right+"px",W.style.top=oe.top+"px",W.style.height=oe.height+"px",W.style.width="4px"):(W.style.left=oe.left+"px",W.style.top=oe.bottom+"px",W.style.height="4px",W.style.width=oe.width+"px"),ee===D&&D&&(W.style.display="none")}else W.style.display="none"}function pe(q,ee){if(!Q.mirrorContainer.contains(q)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(J=h(q),!J||!J.contains(q)))return;const oe=document.querySelector(".dgComponentSelected"),ne=J.getBoundingClientRect();if(ee-30<ne.top&&J.scrollTop>0){let be=J.scrollTop<10?J.scrollTop:10;J.scrollBy(0,-1*be),oe&&J.contains(oe)&&(X=X+-1*be)}if(ee+30>ne.bottom&&J.scrollTop<J.scrollHeight-J.clientHeight){const be=J.scrollHeight-J.clientHeight-J.scrollTop;let ye=be<10?be:10;J.scrollBy(0,ye),oe&&J.contains(oe)&&(X=X+ye)}}function we(q,ee,oe,ne){var be=Q.direction==="horizontal",ye=Q.direction==="mixed",je=ee!==q?$e():Te();return je;function Te(){var Xe=q.children.length,st,me,Ce;for(st=0;st<Xe;st++)if(me=q.children[st],Ce=me.getBoundingClientRect(),be&&Ce.left+Ce.width/2>oe||!ye&&!be&&Ce.top+Ce.height/2>ne||ye&&Ce.left+Ce.width>oe&&Ce.top+Ce.height>ne)return me;return null}function $e(){var Xe=ee.getBoundingClientRect();if(ye){var st=ne-Xe.top,me=oe-Xe.left,Ce=Xe.bottom-ne,et=Xe.right-oe,Ke=Math.min(me,et,st,Ce),tt;return z?tt=et<me:tt=Ce===Ke||et===Ke||me===Ke,rt(tt)}return rt(be?oe>Xe.left+v(Xe)/2:ne>Xe.top+_(Xe)/2)}function rt(Xe){return Xe?F(ee):ee}}function Ie(q,ee){return typeof Q.copy=="boolean"?Q.copy:Q.copy(q,ee)}}function h(b){const R=Array.from(window.scrollContainerList);if(R.length===1){const w=Array.from(window.scrollContainerList)[0];return document.getElementById(w)}const L=p(R);for(const w of L)if(w.contains(b))return w;return null}function p(b){const R=[];return b.forEach(L=>{const w=document.getElementById(L);w&&R.push(w)}),R.sort((L,w)=>L.contains(w)?1:w.contains(L)?-1:0),R}function m(b,R,L,w){var S={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},D={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},j={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};a.navigator.pointerEnabled?l[R](b,D[L],w):a.navigator.msPointerEnabled?l[R](b,j[L],w):(l[R](b,S[L],w),l[R](b,L,w))}function k(b){if(b.touches!==void 0)return b.touches.length;if(b.which!==void 0&&b.which!==0)return b.which;if(b.buttons!==void 0)return b.buttons;var R=b.button;if(R!==void 0)return R&1?1:R&2?3:R&4?2:0}function C(b,R,L){b=b||{};var w=b.className||"",S;return b.className+=" gu-hide",S=d.elementFromPoint(R,L),b.className=w,S}function g(){return!1}function x(){return!0}function v(b){return b.width||b.right-b.left}function _(b){return b.height||b.bottom-b.top}function I(b){return b.parentNode===d?null:b.parentNode}function M(b){return b.tagName==="INPUT"||b.tagName==="TEXTAREA"||b.tagName==="SELECT"||y(b)}function y(b){return!b||b.contentEditable==="false"?!1:b.contentEditable==="true"?!0:y(I(b))}function F(b){return b.nextElementSibling||R();function R(){var L=b;do L=L.nextSibling;while(L&&L.nodeType!==1);return L}}function T(b){return b.targetTouches&&b.targetTouches.length?b.targetTouches[0]:b.changedTouches&&b.changedTouches.length?b.changedTouches[0]:b}function N(b,R){var L=T(R),w={pageX:"clientX",pageY:"clientY"};return b in w&&!(b in L)&&w[b]in L&&(b=w[b]),L[b]}o.exports=u}).call(this,typeof yt<"u"?yt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(e,o,r){o.exports=function(s,l){return Array.prototype.slice.call(s,l)}},{}],4:[function(e,o,r){var a=e("ticky");o.exports=function(l,c,d){l&&a(function(){l.apply(d||null,c||[])})}},{ticky:10}],5:[function(e,o,r){var a=e("atoa"),s=e("./debounce");o.exports=function(c,d){var f=d||{},u={};return c===void 0&&(c={}),c.on=function(h,p){return u[h]?u[h].push(p):u[h]=[p],c},c.once=function(h,p){return p._once=!0,c.on(h,p),c},c.off=function(h,p){var m=arguments.length;if(m===1)delete u[h];else if(m===0)u={};else{var k=u[h];if(!k)return c;k.splice(k.indexOf(p),1)}return c},c.emit=function(){var h=a(arguments);return c.emitterSnapshot(h.shift()).apply(this,h)},c.emitterSnapshot=function(h){var p=(u[h]||[]).slice(0);return function(){var m=a(arguments),k=this||c;if(h==="error"&&f.throws!==!1&&!p.length)throw m.length===1?m[0]:m;return p.forEach(function(g){f.async?s(g,m,k):g.apply(k,m),g._once&&c.off(h,g)}),c}},c}},{"./debounce":4,atoa:3}],6:[function(e,o,r){(function(a){var s=e("custom-event"),l=e("./eventmap"),c=a.document,d=h,f=m,u=[];a.addEventListener||(d=p,f=k),o.exports={add:d,remove:f,fabricate:C};function h(I,M,y,F){return I.addEventListener(M,y,F)}function p(I,M,y){return I.attachEvent("on"+M,x(I,M,y))}function m(I,M,y,F){return I.removeEventListener(M,y,F)}function k(I,M,y){var F=v(I,M,y);if(F)return I.detachEvent("on"+M,F)}function C(I,M,y){var F=l.indexOf(M)===-1?N():T();I.dispatchEvent?I.dispatchEvent(F):I.fireEvent("on"+M,F);function T(){var b;return c.createEvent?(b=c.createEvent("Event"),b.initEvent(M,!0,!0)):c.createEventObject&&(b=c.createEventObject()),b}function N(){return new s(M,{detail:y})}}function g(I,M,y){return function(T){var N=T||a.event;N.target=N.target||N.srcElement,N.preventDefault=N.preventDefault||function(){N.returnValue=!1},N.stopPropagation=N.stopPropagation||function(){N.cancelBubble=!0},N.which=N.which||N.keyCode,y.call(I,N)}}function x(I,M,y){var F=v(I,M,y)||g(I,M,y);return u.push({wrapper:F,element:I,type:M,fn:y}),F}function v(I,M,y){var F=_(I,M,y);if(F){var T=u[F].wrapper;return u.splice(F,1),T}}function _(I,M,y){var F,T;for(F=0;F<u.length;F++)if(T=u[F],T.element===I&&T.type===M&&T.fn===y)return F}}).call(this,typeof yt<"u"?yt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(e,o,r){(function(a){var s=[],l="",c=/^on/;for(l in a)c.test(l)&&s.push(l.slice(2));o.exports=s}).call(this,typeof yt<"u"?yt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(e,o,r){(function(a){var s=a.CustomEvent;function l(){try{var c=new s("cat",{detail:{foo:"bar"}});return c.type==="cat"&&c.detail.foo==="bar"}catch{}return!1}o.exports=l()?s:typeof document<"u"&&typeof document.createEvent=="function"?function(d,f){var u=document.createEvent("CustomEvent");return f?u.initCustomEvent(d,f.bubbles,f.cancelable,f.detail):u.initCustomEvent(d,!1,!1,void 0),u}:function(d,f){var u=document.createEventObject();return u.type=d,f?(u.bubbles=!!f.bubbles,u.cancelable=!!f.cancelable,u.detail=f.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof yt<"u"?yt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(e,o,r){var a=o.exports={},s,l;function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=c}catch{s=c}try{typeof clearTimeout=="function"?l=clearTimeout:l=d}catch{l=d}})();function f(_){if(s===setTimeout)return setTimeout(_,0);if((s===c||!s)&&setTimeout)return s=setTimeout,setTimeout(_,0);try{return s(_,0)}catch{try{return s.call(null,_,0)}catch{return s.call(this,_,0)}}}function u(_){if(l===clearTimeout)return clearTimeout(_);if((l===d||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(_);try{return l(_)}catch{try{return l.call(null,_)}catch{return l.call(this,_)}}}var h=[],p=!1,m,k=-1;function C(){!p||!m||(p=!1,m.length?h=m.concat(h):k=-1,h.length&&g())}function g(){if(!p){var _=f(C);p=!0;for(var I=h.length;I;){for(m=h,h=[];++k<I;)m&&m[k].run();k=-1,I=h.length}m=null,p=!1,u(_)}}a.nextTick=function(_){var I=new Array(arguments.length-1);if(arguments.length>1)for(var M=1;M<arguments.length;M++)I[M-1]=arguments[M];h.push(new x(_,I)),h.length===1&&!p&&f(g)};function x(_,I){this.fun=_,this.array=I}x.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={};function v(){}a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(_){return[]},a.binding=function(_){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(_){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],10:[function(e,o,r){(function(a){var s=typeof a=="function",l;s?l=function(c){a(c)}:l=function(c){setTimeout(c,0)},o.exports=l}).call(this,e("timers").setImmediate)},{timers:11}],11:[function(e,o,r){(function(a,s){var l=e("process/browser.js").nextTick,c=Function.prototype.apply,d=Array.prototype.slice,f={},u=0;r.setTimeout=function(){return new h(c.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new h(c.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(p){p.close()};function h(p,m){this._id=p,this._clearFn=m}h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(p,m){clearTimeout(p._idleTimeoutId),p._idleTimeout=m},r.unenroll=function(p){clearTimeout(p._idleTimeoutId),p._idleTimeout=-1},r._unrefActive=r.active=function(p){clearTimeout(p._idleTimeoutId);var m=p._idleTimeout;m>=0&&(p._idleTimeoutId=setTimeout(function(){p._onTimeout&&p._onTimeout()},m))},r.setImmediate=