@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 249 kB
JavaScript
(function(G,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("lodash-es"),require("../response-toolbar/index.umd.js"),require("bignumber.js"),require("../common/index.umd.js"),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("../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("../designer-canvas/index.umd.js"),require("../binding-selector/index.umd.js"),require("../notify/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../color-picker/index.umd.js"),require("../combo-list/index.umd.js"),require("../content-container/index.umd.js"),require("../data-grid/index.umd.js"),require("../date-picker/index.umd.js"),require("../dropdown/index.umd.js"),require("../external-container/index.umd.js"),require("../events-editor/index.umd.js"),require("../image-cropper/index.umd.js"),require("../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("../nav/index.umd.js"),require("../number-spinner/index.umd.js"),require("../number-range/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("../radio-group/index.umd.js"),require("../rate/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("../component/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../tree-grid/index.umd.js"),require("../fieldset/index.umd.js"),require("../drawer/index.umd.js"),require("../combo-tree/index.umd.js"),require("../field-selector/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../schema-selector/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../dynamic-resolver/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../response-toolbar/index.umd.js","bignumber.js","../common/index.umd.js","@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","../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","../designer-canvas/index.umd.js","../binding-selector/index.umd.js","../notify/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../color-picker/index.umd.js","../combo-list/index.umd.js","../content-container/index.umd.js","../data-grid/index.umd.js","../date-picker/index.umd.js","../dropdown/index.umd.js","../external-container/index.umd.js","../events-editor/index.umd.js","../image-cropper/index.umd.js","../input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../nav/index.umd.js","../number-spinner/index.umd.js","../number-range/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../radio-group/index.umd.js","../rate/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","../component/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../tree-grid/index.umd.js","../fieldset/index.umd.js","../drawer/index.umd.js","../combo-tree/index.umd.js","../field-selector/index.umd.js","../mapping-editor/index.umd.js","../schema-selector/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../dynamic-resolver/index.umd.js"],n):(G=typeof globalThis<"u"?globalThis:G||self,n(G.section={},G.Vue,G.LodashES,G.FResponseToolbar,G.BigNumber,G.common,G.VueUseCore,G.dataView,null,G.FTransfer,G.FTabs,G.FOrder,null,G.FCheckBox,G.FFilterBar,G.FTooltip,G.FPagination,G.FButton,G.FSearchBox,G.FTags,G.FDynamicForm,G.designerCanvas,G.FBindingSelector,null,G.FAccordion,G.FAvatar,G.FButtonEdit,G.FButtonGroup,G.FCalendar,G.FCapsule,G.FColorPicker,G.FComboList,G.FContentContainer,G.FDataGrid,G.FDatePicker,G.FDropdown,null,G.FEventsEditor,G.FImageCropper,G.FInputGroup,G.FLayout,G.FListNav,G.FListView,G.FLookup,G.FNav,G.FNumberSpinner,G.FNumberRange,G.FPageHeader,G.FPageFooter,G.FProgress,G.FQuerySolution,G.FRadioGroup,G.FRate,G.FResponseLayout,G.FResponseLayoutEditorSetting,G.FSection,G.FSmokeDetector,G.FSplitter,G.FStep,G.FSwitch,G.FText,G.FTimePicker,G.FTreeview,G.FUploader,G.FVerifyDetail,G.FComponent,G.FVideo,G.FTextArea,G.FTreeGrid$1,G.FFieldset,G.FDrawer,G.FComboTree,G.FFieldSelector,G.FMappingEditor,G.FSchemaSelector,G.FEventParameter,G.FFilterConditionEditor,G.FSortConditionEditor,G.FMenuLookup,G.dynamicResolver))})(this,function(G,n,je,qt,ol,Se,Wt,Ce,rl,Hn,qn,Wn,il,zt,zn,Gt,Gn,Un,Yn,Xn,kt,Ut,Kn,al,Qn,Jn,Zn,eo,to,no,oo,Ft,ro,io,ao,lo,ll,so,co,uo,fo,po,mo,ho,go,vo,yo,bo,Co,wo,xo,_o,So,To,No,Vo,ko,Fo,Io,Eo,Mo,jo,Oo,Do,Bo,$o,Ro,Po,Ao,Lo,Ho,qo,Wo,zo,Go,Uo,Yo,Xo,Ko,Qo){"use strict";var tl=Object.defineProperty;var nl=(G,n,je)=>n in G?tl(G,n,{enumerable:!0,configurable:!0,writable:!0,value:je}):G[n]=je;var q=(G,n,je)=>nl(G,typeof n!="symbol"?n+"":n,je);const Yt={},Xt={};function It(t){const{properties:e,title:o,ignore:r}=t,i=r&&Array.isArray(r),l=Object.keys(e).reduce((a,f)=>((!i||!r.find(s=>s===f))&&(a[f]=e[f].type==="object"&&e[f].properties?It(e[f]):je.cloneDeep(e[f].default)),a),{});if(o&&(!i||!r.find(a=>a==="id"))){const a=o.toLowerCase().replace(/-/g,"_");l.id=`${a}_${Math.random().toString().slice(2,6)}`}return l}function Jo(t){const{properties:e,title:o,required:r}=t;if(r&&Array.isArray(r)){const i=r.reduce((l,a)=>(l[a]=e[a].type==="object"&&e[a].properties?It(e[a]):je.cloneDeep(e[a].default),l),{});if(o&&r.find(l=>l==="id")){const l=o.toLowerCase().replace(/-/g,"_");i.id=`${l}_${Math.random().toString().slice(2,6)}`}return i}return{type:o}}function ft(t,e={},o){const r=Yt[t];if(r){let i=Jo(r);const l=Xt[t];return i=l?l({getSchemaByType:ft},i,e,o):i,i}return null}function Zo(t,e){const o=It(e);return Object.keys(o).reduce((r,i)=>(Object.prototype.hasOwnProperty.call(t,i)&&(r[i]&&je.isPlainObject(r[i])&&je.isPlainObject(t[i]||!t[i])?Object.assign(r[i],t[i]||{}):r[i]=t[i]),r),o),o}function Kt(t,e){return Object.keys(t).filter(r=>t[r]!=null).reduce((r,i)=>{if(e.has(i)){const l=e.get(i);if(typeof l=="string")r[l]=t[i];else{const a=l(i,t[i],t);Object.assign(r,a)}}else r[i]=t[i];return r},{})}function er(t,e,o=new Map){const r=Zo(t,e);return Kt(r,o)}function tr(t={}){function e(p,d,c,m){if(typeof c=="number")return m[p].length===c;if(typeof c=="object"){const h=Object.keys(c)[0],b=c[h];if(h==="not")return Number(m[p].length)!==Number(b);if(h==="moreThan")return Number(m[p].length)>=Number(b);if(h==="lessThan")return Number(m[p].length)<=Number(b)}return!1}function o(p,d,c,m){return m[p]&&m[p].propertyValue&&String(m[p].propertyValue.value)===String(c)}const r=new Map([["length",e],["getProperty",o]]);Object.keys(t).reduce((p,d)=>(p.set(d,t[d]),p),r);function i(p,d){const c=p;return typeof d=="number"?[{target:c,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:c,operator:"getProperty",param:p,value:!!d}]:typeof d=="object"?Object.keys(d).map(m=>{if(m==="length")return{target:c,operator:"length",param:null,value:d[m]};const h=m,b=d[m];return{target:c,operator:"getProperty",param:h,value:b}}):[]}function l(p){return Object.keys(p).reduce((c,m)=>{const h=i(m,p[m]);return c.push(...h),c},[])}function a(p,d){if(r.has(p.operator)){const c=r.get(p.operator);return c&&c(p.target,p.param,p.value,d)||!1}return!1}function f(p,d){return l(p).reduce((h,b)=>h&&a(b,d),!0)}function s(p,d){const c=Object.keys(p),m=c.includes("allOf"),h=c.includes("anyOf"),b=m||h,g=(b?p[b?m?"allOf":"anyOf":"allOf"]:[p]).map(S=>f(S,d));return m?!g.includes(!1):g.includes(!0)}return{parseValueSchema:s}}const oe={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:"标签页工具栏按钮"},"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:"抽屉"}},nr={},or={};tr();function Ye(t,e,o=new Map,r=(a,f,s,p)=>f,i={},l=a=>a){return Yt[e.title]=e,Xt[e.title]=r,nr[e.title]=i,or[e.title]=l,(a={},f=!0)=>{if(!f)return Kt(a,o);const s=er(a,e,o),p=Object.keys(t).reduce((d,c)=>(d[c]=t[c].default,d),{});return Object.assign(p,s)}}function pt(t,e){return{customClass:e.class,customStyle:e.style}}function rr(){function t(e,o){const{dataSource:r}=e||{};return r===void 0?{}:{}}return{resolve:t}}function ir(){function t(e,o){return e.selectItemById(o)}return{selectItemById:t}}function ar(){function t(e,o){var f;const r=(f=e.toolbar)==null?void 0:f.buttons;if(!r||r.length<1)return null;const[i,l]=o.payloads,a=r.find(s=>s.id===l);return a?a.onClick||a.click:null}return{resolve:t}}function lr(){function t(e,o){const{columns:r}=o;return e.updateColumns(r)}return{updateColumns:t}}function sr(t,e,o){return e?{enableAccordion:o.accordionMode}:{enableAccordion:""}}function cr(t,e){return{buttons:e.buttons,buttonPosition:e.position}}const ur=new Map([["appearance",pt],["expanded","expandStatus"],["enableAccordion",sr],["toolbar",cr]]);function dr(t,e,o){const r=Math.random().toString().slice(2,6),i=o.parentComponentInstance;Object.assign(e,{id:`section-${r}`,appearance:{class:"f-section-in-mainsubcard"},mainTitle:o.mainTitle||e.mainTitle||"标题"});const l=t.getSchemaByType("content-container");Object.assign(l,{id:`container-${r}`,appearance:{class:"f-struct-wrapper"},contents:[e]});const a=i.schema;switch(a&&a.type){case oe["splitter-pane"].type:{e.appearance.class="f-section-in-main";break}}const f=i.elementRef,s=window.getComputedStyle(f);return s&&s.display==="flex"&&(l.appearance.class+=" d-block"),l}function fr(t,e,o){return o.parentComponentInstance?dr(t,e,o):e}const pr={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/section.schema.json",title:"section",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Section",type:"string"},type:{description:"The type string of Section component",type:"string",default:"section"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contentClass:{description:"",type:"string",default:""},contents:{description:"",type:"array",default:[]},enableAccordion:{description:"",type:"string",default:""},accordionMode:{description:"",type:"string",default:"default"},enableMaximize:{description:"",type:"boolean",default:!1},expanded:{description:"",type:"boolean",default:!0},fill:{description:"",type:"boolean",default:!1},headerClass:{description:"",type:"string",default:""},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},showHeader:{description:"",type:"string",default:!0},mainTitle:{description:"",type:"string",default:""},subTitle:{description:"",type:"string",default:""},headerContentClass:{description:"",type:"string",default:""},extendClass:{description:"",type:"string",default:""},visible:{description:"",type:"boolean",default:!0},toolbar:{description:"",type:"object",properties:{type:{type:"string",default:"section-toolbar"},position:{type:"string",default:"inHead"},buttons:{type:"array",default:[]}},default:null}},required:["id","type","contents"]},Ct={contentClass:{type:String,default:""},customClass:{type:String,default:""},customStyle:{type:String,default:""},enableAccordion:{type:String,default:""},expandStatus:{type:Boolean,default:!0},mainTitle:{type:String,default:""},showHeader:{type:Boolean,default:!0},subTitle:{type:String,default:""},expandLabel:{type:String,default:"展开"},collapseLabel:{type:String,default:"收起"},headerClass:{type:String,default:""},enableMaximize:{type:Boolean,default:!1},headerContentClass:{type:String,default:""},extendClass:{type:String,default:""},buttons:{type:Array,default:[]},buttonPosition:{type:String,default:"inHead"},fill:{type:Boolean,default:!1}},Et=Ye(Ct,pr,ur,fr),Qt=ar(),Jt=Object.assign({},Ct,{componentId:{type:String,default:""}});function Zt(t,e,o){let r;function i(s=1){const p=["body>.f-datagrid-settings-simple-host","body>div","body>farris-dialog>.farris-modal.show","body>.farris-modal.show","body>farris-filter-panel>.f-filter-panel-wrapper","body .f-sidebar-show>.f-sidebar-main","body>.popover.show","body>filter-row-panel>.f-datagrid-filter-panel","body>.f-section-maximize"],d=Array.from(document.body.querySelectorAll(p.join(","))).filter(m=>m).map(m=>{const{display:h,zIndex:b}=window.getComputedStyle(m);return h==="none"?0:parseInt(b,10)}).filter(m=>m);let c=Math.max(...d);return c<1040&&(c=1040),c+s}function l(){r=t.value.nextElementSibling;const s=document&&document.querySelector("body");s&&(s.appendChild(t.value),t.value.style.zIndex=i())}function a(){r?e.value.insertBefore(t.value,r):e.value.appendChild(t.value),t.value.style.zIndex=null}function f(){!t||!e.value||(o.value=!o.value,o.value?l():a())}return{onClickMaxMinIcon:f}}function en(t,e){const o=n.ref(t.buttons),r=n.computed(()=>t.buttonPosition==="inHead"?"right":"left"),i=n.computed(()=>"f-section-toolbar"+(t.buttonPosition==="inHead"?" f-section-header--toolbar":" f-section-content--toolbar")),l=n.computed(()=>t.buttons&&t.buttons.length>0&&t.buttonPosition==="inHead");function a(f,s){e.emit("click",f,s)}return()=>l.value&&n.createVNode(qt,{customClass:i.value,items:o.value,onClick:a,alignment:r.value},null)}function mr(t,e,o,r,i,l){const a=n.computed(()=>t.buttonPosition),f=en(t,e),{onClickMaxMinIcon:s}=Zt(r,i,l),p=n.computed(()=>t.enableMaximize),d=n.computed(()=>t.enableAccordion!==""),c=n.computed(()=>{const y={"f-section-header":!0};return e.slots.header&&t.headerClass.split(" ").reduce((v,x)=>(v[x]=!0,v),y),y});function m(y){y.stopPropagation(),t.enableAccordion!==""&&(o.value=!o.value)}function h(){const y=n.computed(()=>({btn:!0,"f-btn-collapse-expand":!0,"f-btn-mx":!0,"f-state-expand":o.value})),S=n.computed(()=>({"f-icon":!0,"f-icon-maximize":!l.value,"f-icon-minimize":l.value}));return n.createVNode("div",{class:"f-max-accordion"},[p.value?n.createVNode("span",{class:S.value,onClick:s},null):"",d.value?n.createVNode("button",{class:y.value,onClick:m},[n.createVNode("span",null,[o.value?t.collapseLabel:t.expandLabel])]):""])}function b(){return e.slots.header?n.createVNode("div",{class:c.value},[e.slots.header()]):""}function j(){return n.createVNode("div",{class:"f-title",onClick:m},[n.createVNode("h4",{class:"f-title-text"},[t.mainTitle]),t.subTitle&&n.createVNode("span",null,[t.subTitle])])}function T(){const y=n.computed(()=>{const S={"f-content":!0};return t.headerContentClass&&t.headerContentClass.split(" ").reduce((x,V)=>(x[V]=!0,x),S),S});return e.slots.headerContent?n.createVNode("div",{class:y.value},[e.slots.headerContent()]):""}function g(){return n.createVNode("div",{class:c.value},[e.slots.headerTitle?e.slots.headerTitle():j(),T(),a.value==="inHead"&&f(),(p.value||d.value)&&h()])}return()=>t.showHeader&&(e.slots.header?b():g())}const hr=["moz","ms","webkit"];function gr(){let t=0;return e=>{const o=new Date().getTime(),r=Math.max(0,16-(o-t)),i=setTimeout(()=>{e(o+r)},r);return t=o+r,i}}function vr(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const t=hr.filter(e=>`${e}RequestAnimationFrame`in window)[0];return t?window[`${t}RequestAnimationFrame`]:gr()}vr();function mt(t,e){return((e==null?void 0:e.split(" "))||[]).reduce((r,i)=>(i&&(r[i]=!0),r),t),t}var Mt=(t=>(t.String="String",t.DateTime="DateTime",t.Date="Date",t.Enum="Enum",t.Boolean="Boolean",t.Number="Number",t.Text="Text",t.BigNumber="BigNumber",t))(Mt||{});const gt=n.defineComponent({name:"FSection",props:Ct,emits:["click"],setup(t,e){const o=n.ref(),r=n.ref(),i=n.ref(t.customClass),l=n.computed(()=>t.enableAccordion),a=n.ref(t.expandStatus),f=n.computed(()=>t.buttonPosition),s=n.ref(!1),p=mr(t,e,a,o,r,s),d=en(t,e),c=n.computed(()=>{const T={"f-section":!0,"f-section-accordion":l.value==="default","f-state-collapse":(l.value==="default"||l.value==="custom")&&!a.value,"f-section-custom-accordion":l.value==="custom","f-section-fill":t.fill,"f-section-maximize":s.value};return mt(T,i.value)}),m=n.computed(()=>mt({"f-section-content":!0},t.contentClass)),h=n.computed(()=>mt({"f-section-extend":!0},h.value));function b(){return e.slots.extend&&n.createVNode("div",{class:h.value},[e.slots.extend()])}function j(){return n.createVNode("div",{class:m.value},[f.value==="inContent"&&d(),e.slots.default&&e.slots.default()])}return n.watch(()=>t.expandStatus,(T,g)=>{T!==g&&(a.value=T)}),n.onMounted(()=>{o.value&&o.value&&(r.value=o.value.parentElement)}),()=>n.createVNode("div",{class:c.value,ref:o,style:t.customStyle},[p(),b(),j()])}});function yr(){function t(e,o){var a;if(!e)return!1;const r=((a=e.targetContainer)==null?void 0:a.componentInstance)&&e.targetContainer.componentInstance.value;if(!r)return!1;const i=r.schema.type,l=o==null?void 0:o.formSchemaUtils.getComponentById(r.belongedComponentId);return!((e.componentCategory==="input"||e.componentType==="form-group")&&![oe["response-layout-item"].type,oe["response-form"].type,oe.fieldset.type].includes(i)||(e.componentType===oe.tabs.type||e.componentType===oe.section.type)&&((l==null?void 0:l.componentType)!=="frame"||![oe["content-container"].type,oe["splitter-pane"].type,oe["response-layout-item"].type].includes(i))||e.componentType===oe["query-solution"].type||e.componentType===oe.fieldset.type&&i!==oe["response-form"].type)}return{basalDragulaRuleForContainer:t}}const at=n.ref(0);function br(t,e){const o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=r.top>=o.top,l=r.top<=o.bottom;return i&&l}function tn(t){const e=t.querySelector(".component-btn-group");if(!e)return;e.style.display="";const o=e.getBoundingClientRect();if(!(o.top===0&&o.left===0)){const r=e.querySelector("div");if(r){const i=r.getBoundingClientRect();r.style.top=o.top+"px";let l=o.left-i.width;const a=document.querySelector(".editorDiv");if(a){const f=a.getBoundingClientRect();l<f.left&&({left:l}=t.getBoundingClientRect())}r.style.left=l+"px"}}}function Cr(t){if(!window.scrollContainerList)return;const e=Array.from(window.scrollContainerList);if(e.length&&e.length===1){const o=e[0],r=document.querySelector(`[id=${o}]`);if(r&&r.contains(t))return r}}function jt(t){if(!t)return;const e=t.getBoundingClientRect();if(e.width===0&&e.height===0)return;const o=t.querySelector(".component-btn-group");if(o){let r=!0;const i=Cr(t);if(i&&(r=br(t,i)),!r){o.style.display="none";return}tn(t)}}function nn(t){if(!t)return;let e;t.className.includes("dgComponentSelected")?e=t:e=t.querySelector(".dgComponentSelected"),e&&jt(e)}function wr(t){const e=document.querySelector(".dgComponentSelected");if(!e)return;const o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=e.querySelector(".component-btn-group");if(i){const l=i.getBoundingClientRect(),a=r.top<o.top;l.top!==0&&a&&tn(e)}}const xr={title:"section",description:"A Farris Container Component",type:"object",categories:{basic:{title:"基本信息",description:"Basic Infomation",properties:{id:{title:"标识",type:"string",description:"组件标识",readonly:!0},type:{title:"组件类型",type:"enum",description:"组件类型",editor:{type:"combo-list",textField:"value",valueField:"key",editable:!1,data:[{key:"section",value:"分组面板"}]}}}},appearance:{title:"外观",description:"Appearance",properties:{class:{description:"组件的CSS样式",title:"class样式"},style:{description:"组件的内容样式",title:"style样式"},showHeader:{title:"显示标题区域",type:"boolean",description:""},mainTitle:{title:"主标题",type:"string",description:"",visible:{showHeader:!0}},subTitle:{title:"副标题",type:"string",description:"",visible:{showHeader:!0}},fill:{title:"填充内容区域",type:"boolean",description:""},enableAccordion:{title:"面板收折",type:"enum",description:"是否启用分组面板的收折特性",editor:{type:"combo-list",textField:"value",valueField:"key",editable:!1,data:[{key:"",value:"不启用"},{key:"default",value:"启用默认收折"}]},visible:{showHeader:!0}}},setPropertyRelates(t,e){if(t)switch(t&&t.propertyID){case"mainTitle":{t.needRefreshControlTree=!0;break}case"showHeader":{const o=document.getElementsByClassName("dgComponentFocused");Array.from(o).forEach(r=>r.classList.remove("dgComponentFocused")),at.value++;break}}}},extends:{title:"扩展",description:"",properties:{contentClass:{title:"内容区域样式",type:"string",description:""}}}}};class _r{getTemplateRule(e,o){const r=o==null?void 0:o.formSchemaUtils,i=r==null?void 0:r.getFormTemplateRule(),l={canAccept:!0,canDelete:!0,canMove:!0};if(!i)return l;const a=this.getComponentContext(e),{componentClassList:f}=a;return f.forEach(s=>{if(!s||!i[s])return;const{canMove:p,canDelete:d,canAccept:c}=i[s];l.canMove=l.canMove&&this.resolveRuleValue(p,a),l.canDelete=l.canDelete&&this.resolveRuleValue(d,a),l.canAccept=l.canAccept&&this.resolveRuleValue(c,a)}),l}resolveRuleValue(e,o){return typeof e=="boolean"?e:this.parseRuleValueSchema(e,o)}parseRuleValueSchema(e,o){const r=e.invalidContext||[];let i=!0;for(const l of r){if(l.firstLevelChild){if(l.firstLevelChild.class){const{firstLevelChildClassList:a}=o;if(a&&!a.includes(l.firstLevelChild.class)){i=!1;continue}}if(l.firstLevelChild.type){const{firstLevelChildSchema:a}=o;if(!a||a.type!==l.firstLevelChild.type){i=!1;continue}}}if(l.secondLevelChild){if(l.secondLevelChild.class){const{secondLevelChildClassList:a}=o;if(a&&!a.includes(l.secondLevelChild.class)){i=!1;continue}}if(l.secondLevelChild.type){const{secondLevelChildSchema:a}=o;if(!a||a.type!==l.secondLevelChild.type){i=!1;continue}}}if(l.parent){if(l.parent.class){const{parentClassList:a}=o;if(a&&!a.includes(l.parent.class)){i=!1;continue}}if(l.parent.type){const{parentSchema:a}=o;if(a&&a.type!==l.parent.type){i=!1;continue}}}i=!0;break}return!i}getComponentContext(e){var j,T,g,y;const o=e.schema,r=o.appearance&&o.appearance.class||"",i=r.split(" ")||[],l=o.contents||[],a=l.length?l[0]:null,f=a&&a.appearance?a.appearance.class:"",s=f?f.split(" "):[],p=(j=a==null?void 0:a.contents)!=null&&j.length?a==null?void 0:a.contents[0]:null,d=p&&p.appearance?p.appearance.class:"",c=d?d.split(" "):[],m=o.type==="component"?(g=(T=e.parent)==null?void 0:T.parent)==null?void 0:g.schema:(y=e.parent)==null?void 0:y.schema,h=m&&m.appearance&&m.appearance.class||"",b=h?h.split(" "):[];return{componentClass:r,componentClassList:i,childContents:l,firstLevelChildSchema:a,firstLevelChildClass:f,firstLevelChildClassList:s,secondLevelChildSchema:p,secondLevelChildClass:d,secondLevelChildClassList:c,parentSchema:m,parentClass:h,parentClassList:b}}}var lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wt(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var on={exports:{}};(function(t,e){(function(o){t.exports=o()})(function(){return function(){function o(r,i,l){function a(p,d){if(!i[p]){if(!r[p]){var c=typeof wt=="function"&&wt;if(!d&&c)return c(p,!0);if(f)return f(p,!0);var m=new Error("Cannot find module '"+p+"'");throw m.code="MODULE_NOT_FOUND",m}var h=i[p]={exports:{}};r[p][0].call(h.exports,function(b){var j=r[p][1][b];return a(j||b)},h,h.exports,o,r,i,l)}return i[p].exports}for(var f=typeof wt=="function"&&wt,s=0;s<l.length;s++)a(l[s]);return a}return o}()({1:[function(o,r,i){var l={},a="(?:^|\\s)",f="(?:\\s|$)";function s(c){var m=l[c];return m?m.lastIndex=0:l[c]=m=new RegExp(a+c+f,"g"),m}function p(c,m){var h=c.className;h.length?s(m).test(h)||(c.className+=" "+m):c.className=m}function d(c,m){c.className=c.className.replace(s(m)," ").trim()}r.exports={add:p,rm:d}},{}],2:[function(o,r,i){(function(l){var a=o("contra/emitter"),f=o("crossvent"),s=o("./classes"),p=document,d=p.documentElement;function c(_,O){var F=arguments.length;F===1&&Array.isArray(_)===!1&&(O=_,_=[]);var I,k,M,E,D,A,X,ne,ee,fe=null,P,R,L=!1,U=0,Q,Y=O||{};Y.moves===void 0&&(Y.moves=y),Y.accepts===void 0&&(Y.accepts=y),Y.invalid===void 0&&(Y.invalid=rt),Y.containers===void 0&&(Y.containers=_||[]),Y.isContainer===void 0&&(Y.isContainer=g),Y.copy===void 0&&(Y.copy=!1),Y.copySortSource===void 0&&(Y.copySortSource=!1),Y.revertOnSpill===void 0&&(Y.revertOnSpill=!1),Y.removeOnSpill===void 0&&(Y.removeOnSpill=!1),Y.direction===void 0&&(Y.direction="vertical"),Y.ignoreInputTextSelection===void 0&&(Y.ignoreInputTextSelection=!0),Y.mirrorContainer===void 0&&(Y.mirrorContainer=p.body);var B=a({containers:Y.containers,start:ze,end:te,cancel:it,remove:Ve,destroy:_e,canMove:Ee,dragging:!1});return Y.removeOnSpill===!0&&B.on("over",pe).on("out",he),ie(),B;function W($){return B.containers.indexOf($)!==-1||Y.isContainer($)}function ie($){var K=$?"remove":"add";b(d,K,"mousedown",Te),b(d,K,"mouseup",ke)}function J($){var K=$?"remove":"add";b(d,K,"mousemove",Le)}function Z($){var K=$?"remove":"add";f[K](d,"selectstart",Ne),f[K](d,"click",Ne)}function _e(){ie(!0),ke({})}function Ne($){P&&$.preventDefault()}function Te($){E=$.clientX,D=$.clientY;var K=j($)!==1||$.metaKey||$.ctrlKey;if(!K){var z=$.target,ue=Be(z);ue&&(P=ue,J(),$.type==="mousedown"&&(V(z)?z.focus():$.preventDefault()))}}function Le($){if(P){if(j($)===0){ke({});return}if(!($.clientX!==void 0&&Math.abs($.clientX-E)<=(Y.slideFactorX||0)&&$.clientY!==void 0&&Math.abs($.clientY-D)<=(Y.slideFactorY||0))){if(Y.ignoreInputTextSelection){var K=N("clientX",$)||0,z=N("clientY",$)||0,ue=p.elementFromPoint(K,z);if(V(ue))return}var ge=P;J(!0),Z(),te(),qe(ge),s.add(ne||M,"gu-transit"),Fe(),xe(),U=0,Ge($)}}}function Be($){if(!(B.dragging&&I)&&!W($)){for(var K=$;x($)&&W(x($))===!1;)if(Y.invalid($,K)||($=x($),!$))return;var z=x($);if(z&&!Y.invalid($,K)){var ue=Y.moves($,z,K,C($));if(ue)return{item:$,source:z}}}}function Ee($){return!!Be($)}function ze($){var K=Be($);K&&qe(K)}function qe($){Pe($.item,$.source)&&(ne=$.item.cloneNode(!0),B.emit("cloned",ne,$.item,"copy")),k=$.source,M=$.item,A=X=C($.item),B.dragging=!0,B.emit("drag",M,k)}function rt(){return!1}function te(){if(B.dragging){var $=ne||M;Oe($,x($))}}function ye(){P=!1,J(!0),Z(!0)}function ke($){if(ye(),!!B.dragging){var K=ne||M,z=N("clientX",$)||0,ue=N("clientY",$)||0,ge=T(I,z,ue),ve=ct(ge,z,ue);ve&&(ne&&Y.copySortSource||!ne||ve!==k)?Oe(K,ve):Y.removeOnSpill?Ve():it()}}function Oe($,K){var z=x($);ne&&Y.copySortSource&&K===k&&z.removeChild(M),tt(K)?B.emit("cancel",$,k):B.emit("drop",$,K,k,X),et()}function Ve(){if(B.dragging){var $=ne||M,K=x($);K&&K.removeChild($),B.emit(ne?"cancel":"remove",$,K,k),et()}}function it($){if(B.dragging){var K=arguments.length>0?$:Y.revertOnSpill,z=ne||M,ue=x(z),ge=tt(ue);ge===!1&&K&&(ne?ue&&ue.removeChild(ne):k.insertBefore(z,A)),ge||K?B.emit("cancel",z,k,k):B.emit("drop",z,ue,k,X),et()}}function et(){var $=ne||M;ye(),Re(),We(),$&&s.rm($,"gu-transit"),ee&&clearTimeout(ee),B.dragging=!1,fe&&B.emit("out",$,fe,k),B.emit("dragend",$,U),k=M=ne=A=X=ee=fe=null}function tt($,K){var z;return K!==void 0?z=K:I?z=X:z=C(ne||M),$===k&&z===A}function ct($,K,z){for(var ue=$;ue&&!ge();)ue=x(ue);return ue;function ge(){var ve=W(ue);if(ve===!1)return!1;var ae=nt(ue,$),we=Me(ue,ae,K,z),De=tt(ue,we);return De?!0:Y.accepts(M,ue,k,we)}}function Ge($){if(!I)return;$.preventDefault();var K=N("clientX",$)||0,z=N("clientY",$)||0;I.style.left=K-2+"px",I.style.top=z-2+"px";var ue=ne||M,ge=T(I,K,z),ve=ct(ge,K,z),ae=ve!==null&&ve!==fe;(ae||ve===null)&&(Je(),fe=ve,ut()),be(ge,z);var we=x(ue);if(ve===k&&ne&&!Y.copySortSource){we&&we.removeChild(ue);return}var De,Qe=nt(ve,ge);if(L=ot(Qe,ve),Qe!==null)De=Me(ve,Qe,K,z);else if(Y.revertOnSpill===!0&&!ne)De=A,ve=k;else{ne&&we&&we.removeChild(ue),ne&&R&&(R.style.display="none");return}R.style.display="block",re(De,ue,ae),De?H(Qe,De):me(ve);function Ae(He){B.emit(He,ue,fe,k)}function ut(){ae&&Ae("over")}function Je(){fe&&Ae("out")}}function re($,K,z){($===K||$===C(K))&&(X=C(K)),($===null&&z||$!==K&&$!==C(K))&&(X=$)}function pe($){s.rm($,"gu-hide")}function he($){B.dragging&&s.add($,"gu-hide")}function xe(){I||(I=document.createElement("div"),I.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;",I.innerHTML=Y.getMirrorText&&Y.getMirrorText(M)||"控件",s.add(I,"gu-mirror"),Y.mirrorContainer.appendChild(I),b(d,"add","mousemove",Ge),s.add(Y.mirrorContainer,"gu-unselectable"),B.emit("cloned",I,M,"mirror"))}function Fe(){if(R=document.createElement("div"),s.add(R,"gu-insertion"),M){var $=M.getBoundingClientRect();R.style.left=$.left+"px",R.style.top=$.top+"px"}L=!1,Y.mirrorContainer.appendChild(R)}function Re(){I&&(s.rm(Y.mirrorContainer,"gu-unselectable"),b(d,"remove","mousemove",Ge),x(I).removeChild(I),I=null)}function We(){R&&(x(R).removeChild(R),R=null)}function nt($,K){for(var z=K;z!==$&&x(z)!==$;)z=x(z);return z===d?null:z}function ot($,K){if(!K)return L;var z=$||K&&K.lastElementChild;if(!z)return!0;var ue=getComputedStyle($),ge=/^inline/.test(ue.getPropertyValue("display"))||/^(left|right)$/.test(ue.getPropertyValue("float"));if(ge)return!0;if(K){var ve=getComputedStyle(K),ae=ve.getPropertyValue("display");if(/flex$/.test(ae)){var we=ve.getPropertyValue("flex-direction")||"row";if(we==="row"||we==="row-reverse")return!Ue(K)}return!1}return!0}function Ue($){if(!$.children||!$.children.length)return!1;for(const K of Array.from($.children)){const ue=(K.className&&K.className.split(" ")||[]).filter(ge=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ge));if(!ue.length)return!1;for(const ge of ue){const ve=ge.slice(ge.lastIndexOf("-")+1);if(parseInt(ve,10)!==12)return!1}}return!0}function H($,K){const z=K.getBoundingClientRect();if(R.style.left=z.left+"px",R.style.top=z.top+"px",L){if(R.style.height=z.height+"px",R.style.width="4px",$){const ue=$.getBoundingClientRect();ue.top!==z.top&&(R.style.left=ue.right+"px",R.style.top=ue.top+"px",R.style.height=ue.height+"px")}}else if(R.style.height="4px",R.style.width=z.width+"px",Q){const ue=Q.getBoundingClientRect();z.top<ue.top&&(R.style.display="none")}K===M&&M&&(R.style.display="none")}function me($){X=null;var K=$.lastElementChild;if(K){var z=K.getBoundingClientRect();L?(R.style.left=z.right+"px",R.style.top=z.top+"px",R.style.height=z.height+"px",R.style.width="4px"):(R.style.left=z.left+"px",R.style.top=z.bottom+"px",R.style.height="4px",R.style.width=z.width+"px"),K===M&&M&&(R.style.display="none")}else R.style.display="none"}function be($,K){if(!Y.mirrorContainer.contains($)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(Q=m($),!Q||!Q.contains($)))return;const z=document.querySelector(".dgComponentSelected"),ue=Q.getBoundingClientRect();if(K-30<ue.top&&Q.scrollTop>0){let ge=Q.scrollTop<10?Q.scrollTop:10;Q.scrollBy(0,-1*ge),z&&Q.contains(z)&&(U=U+-1*ge)}if(K+30>ue.bottom&&Q.scrollTop<Q.scrollHeight-Q.clientHeight){const ge=Q.scrollHeight-Q.clientHeight-Q.scrollTop;let ve=ge<10?ge:10;Q.scrollBy(0,ve),z&&Q.contains(z)&&(U=U+ve)}}function Me($,K,z,ue){var ge=Y.direction==="horizontal",ve=Y.direction==="mixed",ae=K!==$?De():we();return ae;function we(){var Ae=$.children.length,ut,Je,He;for(ut=0;ut<Ae;ut++)if(Je=$.children[ut],He=Je.getBoundingClientRect(),ge&&He.left+He.width/2>z||!ve&&!ge&&He.top+He.height/2>ue||ve&&He.left+He.width>z&&He.top+He.height>ue)return Je;return null}function De(){var Ae=K.getBoundingClientRect();if(ve){var ut=ue-Ae.top,Je=z-Ae.left,He=Ae.bottom-ue,At=Ae.right-z,Lt=Math.min(Je,At,ut,He),Ht;return L?Ht=At<Je:Ht=He===Lt||At===Lt||Je===Lt,Qe(Ht)}return Qe(ge?z>Ae.left+S(Ae)/2:ue>Ae.top+v(Ae)/2)}function Qe(Ae){return Ae?C(K):K}}function Pe($,K){return typeof Y.copy=="boolean"?Y.copy:Y.copy($,K)}}function m(_){const O=Array.from(window.scrollContainerList);if(O.length===1){const I=Array.from(window.scrollContainerList)[0];return document.getElementById(I)}const F=h(O);for(const I of F)if(I.contains(_))return I;return null}function h(_){const O=[];return _.forEach(F=>{const I=document.getElementById(F);I&&O.push(I)}),O.sort((F,I)=>F.contains(I)?1:I.contains(F)?-1:0),O}function b(_,O,F,I){var k={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},M={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},E={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};l.navigator.pointerEnabled?f[O](_,M[F],I):l.navigator.msPointerEnabled?f[O](_,E[F],I):(f[O](_,k[F],I),f[O](_,F,I))}function j(_){if(_.touches!==void 0)return _.touches.length;if(_.which!==void 0&&_.which!==0)return _.which;if(_.buttons!==void 0)return _.buttons;var O=_.button;if(O!==void 0)return O&1?1:O&2?3:O&4?2:0}function T(_,O,F){_=_||{};var I=_.className||"",k;return _.className+=" gu-hide",k=p.elementFromPoint(O,F),_.className=I,k}function g(){return!1}function y(){return!0}function S(_){return _.width||_.right-_.left}function v(_){return _.height||_.bottom-_.top}function x(_){return _.parentNode===p?null:_.parentNode}function V(_){return _.tagName==="INPUT"||_.tagName==="TEXTAREA"||_.tagName==="SELECT"||u(_)}function u(_){return!_||_.contentEditable==="false"?!1:_.contentEditable==="true"?!0:u(x(_))}function C(_){return _.nextElementSibling||O();function O(){var F=_;do F=F.nextSibling;while(F&&F.nodeType!==1);return F}}function w(_){return _.targetTouches&&_.targetTouches.length?_.targetTouches[0]:_.changedTouches&&_.changedTouches.length?_.changedTouches[0]:_}function N(_,O){var F=w(O),I={pageX:"clientX",pageY:"clientY"};return _ in I&&!(_ in F)&&I[_]in F&&(_=I[_]),F[_]}r.exports=c}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(o,r,i){r.exports=function(a,f){return Array.prototype.slice.call(a,f)}},{}],4:[function(o,r,i){var l=o("ticky");r.exports=function(f,s,p){f&&l(function(){f.apply(p||null,s||[])})}},{ticky:10}],5:[function(o,r,i){var l=o("atoa"),a=o("./debounce");r.exports=function(s,p){var d=p||{},c={};return s===void 0&&(s={}),s.on=function(m,h){return c[m]?c[m].push(h):c[m]=[h],s},s.once=function(m,h){return h._once=!0,s.on(m,h),s},s.off=function(m,h){var b=arguments.length;if(b===1)delete c[m];else if(b===0)c={};else{var j=c[m];if(!j)return s;j.splice(j.indexOf(h),1)}return s},s.emit=function(){var m=l(arguments);return s.emitterSnapshot(m.shift()).apply(this,m)},s.emitterSnapshot=function(m){var h=(c[m]||[]).slice(0);return function(){var b=l(arguments),j=this||s;if(m==="error"&&d.throws!==!1&&!h.length)throw b.length===1?b[0]:b;return h.forEach(function(g){d.async?a(g,b,j):g.apply(j,b),g._once&&s.off(m,g)}),s}},s}},{"./debounce":4,atoa:3}],6:[function(o,r,i){(function(l){var a=o("custom-event"),f=o("./eventmap"),s=l.document,p=m,d=b,c=[];l.addEventListener||(p=h,d=j),r.exports={add:p,remove:d,fabricate:T};function m(x,V,u,C){return x.addEventListener(V,u,C)}function h(x,V,u){return x.attachEvent("on"+V,y(x,V,u))}function b(x,V,u,C){return x.removeEventListener(V,u,C)}function j(x,V,u){var C=S(x,V,u);if(C)return x.detachEvent("on"+V,C)}function T(x,V,u){var C=f.indexOf(V)===-1?N():w();x.dispatchEvent?x.dispatchEvent(C):x.fireEvent("on"+V,C);function w(){var _;return s.createEvent?(_=s.createEvent("Event"),_.initEvent(V,!0,!0)):s.createEventObject&&(_=s.createEventObject()),_}function N(){return new a(V,{detail:u})}}function g(x,V,u){return function(w){var N=w||l.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,u.call(x,N)}}function y(x,V,u){var C=S(x,V,u)||g(x,V,u);return c.push({wrapper:C,element:x,type:V,fn:u}),C}function S(x,V,u){var C=v(x,V,u);if(C){var w=c[C].wrapper;return c.splice(C,1),w}}function v(x,V,u){var C,w;for(C=0;C<c.length;C++)if(w=c[C],w.element===x&&w.type===V&&w.fn===u)return C}}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(o,r,i){(function(l){var a=[],f="",s=/^on/;for(f in l)s.test(f)&&a.push(f.slice(2));r.exports=a}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(o,r,i){(function(l){var a=l.CustomEvent;function f(){try{var s=new a("cat",{detail:{foo:"bar"}});return s.type==="cat"&&s.detail.foo==="bar"}catch{}return!1}r.exports=f()?a:typeof document<"u"&&typeof document.createEvent=="function"?function(p,d){var c=document.createEvent("CustomEvent");return d?c.initCustomEvent(p,d.bubbles,d.cancelable,d.detail):c.initCustomEvent(p,!1,!1,void 0),c}:function(p,d){var c=document.createEventObject();return c.type=p,d?(c.bubbles=!!d.bubbles,c.cancelable=!!d.cancelable,c.detail=d.detail):(c.bubbles=!1,c.cancelable=!1,c.detail=void 0),c}}).call(this,typeof lt<"u"?lt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(o,r,i){var l=r.exports={},a,f;function s(){throw new Error("setTimeout has not been defined")}function p(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=s}catch{a=s}try{typeof clearTimeout=="function"?f=clearTimeout:f=p}catch{f=p}})();function d(v){if(a===setTimeout)return setTimeout(v,0);if((a===s||!a)&&setTimeout)return a=setTimeout,setTimeout(v,0);try{return a(v,0)}catch{try{return a.call(null,v,0)}catch{return a.call(this,v,0)}}}function c(v){if(f===clearTimeout)return clearTimeout(v);if((f===p||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(v);try{return f(v)}catch{try{return f.call(null,v)}catch{return f.call(this,v)}}}var m=[],h=!1,b,j=-1;function T(){!h||!b||(h=!1,b.length?m=b.concat(m):j=-1,m.length&&g())}function g(){if(!h){var v=d(T);h=!0;for(var x=m.length;x;){for(b=m,m=[];++j<x;)b&&b[j].run();j=-1,x=m.length}b=null,h=!1,c(v)}}l.nextTick=function(v){var x=new Array(arguments.length-1);if(arguments.length>1)for(var V=1;V<arguments.length;V++)x[V-1]=arguments[V];m.push(new y(v,x)),m.length===1&&!h&&d(g)};function y(v,x){this.fun=v,this.array=x}y.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={};function S(){}l.on=S,l.addListener=S,l.once=S,l.off=S,l.removeListener=S,l.removeAllListeners=S,l.emit=S,l.prependListener=S,l.prependOnceListener=S,l.listeners=function(v){return[]},l.binding=function(v){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(v){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],10:[function(o,r,i){(function(l){var a=typeof l=="function",f;a?f=function(s){l(s)}:f=function(s){setTimeout(s,0)},r.exports=f}).call(this,o("timers").setImmediate)},{timers:11}],11:[function(o,r,i){(function(l,a){var f=o("process/browser.js").nextTick,s=Function.prototype.apply,p=Array.prototype.slice,d={},c=0;i.setTimeout=function(){return new m(s.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new m(s.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(h){h.close()};function m(h,b){this._id=h,this._clearFn=b}m.prototype.unref=m.prototype.ref=function(){},m.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(h,b){clearTimeout(h._idleTimeoutId),h._idleTimeout=b},i.unenroll=function(h){clearTimeout(h._idleTimeoutId),h._idleTimeout=-1},i._unrefActive=i.active=function(h){clearTimeout(h._idleTimeoutId);var b=h._idleTimeout;b>=0&&(h._idleTimeoutId=setTimeout(function(){h._onTimeout&&h._onTimeout()},b))},i.setImmediate=typeof l=="function"?l:function(h){var b=c++,j=arguments.length<2?!1:p.call(arguments,1);return d[b]=!0,f(function(){d[b]&&(j?h.apply(null,j):h.call(null),i.clearImmediate(b))}),b},i.clearImmediate=typeof a=="function"?a:function(h){delete d[h]}}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(on);var Tr=on.exports;const rn=Sr(Tr),Nr={showCloseButton:{type:Boolean,default:!0},position:{type:String,default:"top-center"},timeout:{type:Number,default:3e3},theme:{type:String,default:"bootstrap"},left:{type:Number},right:{type:Number},top:{type:Number},bottom:{type:Number},id:{type:String},animate:{type:String,default:"fadeIn"},options:{type:Object}},Vr={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},Ot=n.defineComponent({name:"Toast",props:Vr,emits:["close","click"],setup:(t,e)=>{const o=n.ref(t.animate),r="fadeOut",i=n.computed(()=>t.options),l=n.ref(!1),a=n.computed(()=>{const g={animated:l.value,toast:!0};return g[t.animate]=!1,g[r]=l.value,g[i.value.type]=!0,i.value.theme&&(g[i.value.theme]=!0),g}),f=n.computed(()=>{const S=`f-icon-${i.value&&i.value.type?i.value.type.replace("toasty-type-",""):"default"}`,v={"f-icon":!0};return v[S]=!0,v}),s=n.computed(()=>i.value.title||i.value.message),p=n.computed(()=>i.value.title&&i.value.message),d=n.computed(()=>!i.value.title&&i.value.message),c=n.computed(()=>t.showCloseButton),m=n.computed(()=>!!i.value.buttons||!!e.slots.default);function h(g){g.stopPropagation(),g.preventDefault(),l.value=!1,setTimeout(()=>{e.emit("close",i.value)},200)}function b(g,y){}function j(g){return`f-preten-link ${g.customClass?g.customClass:""}`}n.watch(o,()=>{o.value});const T=()=>{var g;return n.createVNode(n.Fragment,null,[n.createVNode("div",{class:"after-toast-msg text-right"},[!e.slots.default&&((g=i.value.buttons)==null?void 0:g.map(y=>n.createVNode("span",{class:j(y),onClick:S=>void 0},[y.text]))),e.slots.default&&e.slots.default()])])};return()=>n.createVNode("div",{class:a.value,style:"min-height:44px"},[c.value&&n.createVNode("button",{title:"关闭",class:"toast-close f-btn-icon f-bare",onClick:h},[n.createVNode("span",{class:"f-icon modal_close"},null)]),s.value&&n.createVNode("section",{class:"modal-tips"},[n.createVNode("div",{class:"float-left modal-tips-iconwrap"},[n.createVNode("span",{class:f.value},null)]),n.createVNode("div",{class:"modal-tips-content"},[p.value&&n.createVNode(n.Fragment,null,[n.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:i.value.title},null),n.createVNode("p",{class:"toast-msg",innerHTML:i.value.message},null),m.value&&T()]),d.value&&(i.value.buttons?n.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[n.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:i.value.message},null),n.createVNode("div",{class:"after-toast-title text-right ml-auto"},[T()])]):n.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:i.value.message},null))])])])}}),xt=n.defineComponent({name:"Notify",props:Nr,emits:["close","empty"],setup(t,e){const o=n.computed(()=>({"farris-notify":!0})),r={left:12,right:12,top:20,bottom:12},i=n.ref(),l=n.ref(t.options),a=n.ref(t.showCloseButton),f=n.computed(()=>t.position||"bottom-right"),s=n.computed(()=>t.timeout!=null?t.timeout:3e3),p=n.computed(()=>{const m=t.bottom?t.bottom:r.bottom,h=t.top?t.top:r.top,b={transition:"all 0.2s ease",left:f.value.indexOf("left")>-1?`${t.left?t.left:r.left}px`:"",right:f.value.indexOf("right")>-1?`${t.right?t.right:r.right}px`:"",top:f.value.indexOf("top")>-1?`${h}px`:"",bottom:f.value.indexOf("bottom")>-1?`${m}px`:""};return f.value.indexOf("center")>-1&&(b.left="50%",b.marginLeft="calc(-24rem / 2)",f.value==="center-center"&&(b.top="50%",b.transform="translate(-50%, -50%)")),b});function d(m){e.emit("close")}s.value&&setTimeout(()=>{d()},s.value),e.expose({closeToast:d,container:i,notifyPosition:f});function c(m,h){d()}return()=>n.createVNode("div",{class:o.value,style:p.value,ref:i},[n.createVNode(Ot,{options:l.value,showCloseButton:a.value,animate:t.animate,onClose:m=>c(m,l.value)},null)])}});class an{constructor(){q(this,"notifyRefs",[]);q(this,"globalConfig",n.reactive({}))}createNotifyInstance(e){const o=this,i=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0},this.globalConfig,{...e}),l=document.createElement("div");l.style.display="contents";const a=n.createApp({setup(){const f=n.ref();function s(){f.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(i,f),a.unmount()},220)}if(i.position.indexOf("top")>-1){const p=o.getNotifyInstances(i.position),d=p[p.length-1];if(d){const c=d.value.container.getBoundingClientRect();i.top=c.bottom}}return n.onUnmounted(()=>{document.body.removeChild(l)}),n.onMounted(()=>{o.updateNotifyPositionForCreate(i,f)}),()=>n.createVNode(n.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[n.createVNode(xt,n.mergeProps({ref:f},i,{onClose:s}),null)]})}});return a.provide("NotifyService",this),document.body.appendChild(l),a.mount(l),a}getNotifyInstances(e){return this.notifyRefs.filter(o=>o.value.notifyPosition===e)}updateNotifyPositionForCreate(e,o){if(this.notifyRefs&&this.notifyRefs.length){const r=window.innerHeight;e.position.indexOf("bottom")>-1&&this.getNotifyInstances(e.position).forEach(i=>{const l=i.value.container.getBoundingClientRect();i.value.container.style.bottom=l.height+r-l.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(e,o){const r=this.notifyRefs.indexOf(o);if(e.position.indexOf("top")>-1){const i=this.getNotifyInstances(e.position),l=i.indexOf(o);i.slice(l+1).forEach(a=>{a.value.container.style.top=a.value.container.offsetTop-a.value.container.offsetHeight+"px"})}r>-1&&this.notifyRefs.splice(r,1)}show(e){return this.createNotifyInstance(e)}buildNotifyProps(e,o){let r="",i="",l,a,f;typeof o=="string"?r=o:o&&(r=o.message||"",i=o.title||"",a=o.position||null,f=o.showCloseButton!=null?o.showCloseButton:null,l=o.timeout!=null?o.timeout:null);const p={options:{type:e,message:r,title:i}};return a!=null&&(p.position=a),f!=null&&(p.showCloseButton=f),l!=null&&(p.timeout=l),p}info(e){const o=this.buildNotifyProps("info",e);return this.show(o)}success(e){const o=this.buildNotifyProps("success",e);return this.show(o)}warning(e){const o=this.buildNotifyProps("warning",e);return this.show(o)}error(e){const o=this.buildNotifyProps("error",e);return this.show(o)}close(e){e&&e.unmount()}closeAll(){this.notifyRefs.forEach(e=>{e==null||e.value.closeToast()}),this.notifyRefs.length=0}}const kr=Symbol("NOTIFY_SERVICE_TOKEN");xt.install=t=>{t.component(xt.name,xt),t.component(Ot.name,Ot);const e=new an;t.provide(kr,e),t.provide("FNotifyService",e)};const ln=new Map([["appearance",pt],["column","co