UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1 lines 269 kB
(function(Y,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("@vueuse/core"),require("lodash-es"),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","@vueuse/core","lodash-es","../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):(Y=typeof globalThis<"u"?globalThis:Y||self,i(Y["tree-grid"]={},Y.Vue,Y.VueUseCore,Y.LodashES,Y.dataView,null,Y.FTransfer,Y.FTabs,Y.FOrder,null,Y.checkbox,Y.common,Y.FFilterBar,Y.FTooltip,Y.FPagination,Y.FButton,Y.FSearchBox,Y.FTags,Y.FDynamicForm,Y.dynamicResolver,null,null,Y.FAccordion,Y.FAvatar,Y.FButtonEdit,Y.FButtonGroup,Y.FCalendar,Y.FCapsule,Y.FCheckbox,Y.FCheckboxGroup,Y.FComboList,Y.FComboTree,Y.FComponent,Y.FColorPicker,Y.FContentContainer,Y.FDatePicker,Y.FDataGrid,Y.FDropdown,Y.FEventsEditor,Y.FFieldSelector,Y.FBindingSelector,Y.FImageCropper,Y.FInputGroup,Y.FLayout,Y.FListNav,Y.FListView,Y.FLookup,Y.FMappingEditor,Y.FNav,Y.FNumberRange,Y.FNumberSpinner,Y.FPageHeader,Y.FPageFooter,Y.FProgress,Y.FQuerySolution,Y.FRadioGroup,Y.FRate,Y.FResponseToolbar,Y.FResponseLayout,Y.FResponseLayoutEditorSetting,Y.FSection,Y.FSmokeDetector,Y.FSplitter,Y.FStep,Y.FSwitch,Y.FText,Y.FTimePicker,Y.FTreeview,Y.FUploader,Y.FVerifyDetail,Y.FVideo,Y.FTextArea,Y.FSchemaSelector,Y.FTreeGrid$1,Y.FEventParameter,Y.FFilterConditionEditor,Y.FFieldset,Y.FSortConditionEditor,Y.FMenuLookup,Y.FDrawer,Y.FJsonEditor,Y.FPropertyEditor,Y.FExpressionEditor,Y.FCodeEditor,Y.FHtmlTemplate))})(this,function(Y,i,_t,$e,Te,fc,Cr,xr,_r,pc,Sr,Ve,Tr,mn,kr,Fr,Mr,Er,Kt,Nr,mc,hc,Or,Vr,Ir,Dr,Pr,jr,hn,gn,Jt,Br,Rr,Hr,$r,Wr,Lr,qr,Ar,zr,Gr,Yr,Ur,Xr,Qr,Kr,Jr,Zr,eo,to,no,ro,oo,io,ao,so,lo,co,uo,fo,po,mo,ho,go,vo,yo,wo,bo,Co,xo,_o,So,To,ko,Fo,Mo,Eo,No,Oo,Vo,Io,Do,Po,jo,Bo){"use strict";var uc=Object.defineProperty;var dc=(Y,i,_t)=>i in Y?uc(Y,i,{enumerable:!0,configurable:!0,writable:!0,value:_t}):Y[i]=_t;var j=(Y,i,_t)=>dc(Y,typeof i!="symbol"?i+"":i,_t);const vn={},yn={};function Zt(n){const{properties:t,title:e,ignore:r}=n,o=r&&Array.isArray(r),a=Object.keys(t).reduce((s,l)=>((!o||!r.find(c=>c===l))&&(s[l]=t[l].type==="object"&&t[l].properties?Zt(t[l]):$e.cloneDeep(t[l].default)),s),{});if(e&&(!o||!r.find(s=>s==="id"))){const s=e.toLowerCase().replace(/-/g,"_");a.id=`${s}_${Math.random().toString().slice(2,6)}`}return a}function Ro(n){const{properties:t,title:e,required:r}=n;if(r&&Array.isArray(r)){const o=r.reduce((a,s)=>(a[s]=t[s].type==="object"&&t[s].properties?Zt(t[s]):$e.cloneDeep(t[s].default),a),{});if(e&&r.find(a=>a==="id")){const a=e.toLowerCase().replace(/-/g,"_");o.id=`${a}_${Math.random().toString().slice(2,6)}`}return o}return{type:e}}function wn(n,t={},e){const r=vn[n];if(r){let o=Ro(r);const a=yn[n];return o=a?a({getSchemaByType:wn},o,t,e):o,o}return null}function Ho(n,t){const e=Zt(t);return Object.keys(e).reduce((r,o)=>(Object.prototype.hasOwnProperty.call(n,o)&&(r[o]&&$e.isPlainObject(r[o])&&$e.isPlainObject(n[o]||!n[o])?Object.assign(r[o],n[o]||{}):r[o]=n[o]),r),e),e}function bn(n,t){return Object.keys(n).filter(r=>n[r]!=null).reduce((r,o)=>{if(t.has(o)){const a=t.get(o);if(typeof a=="string")r[a]=n[o];else{const s=a(o,n[o],n);Object.assign(r,s)}}else r[o]=n[o];return r},{})}function $o(n,t,e=new Map){const r=Ho(n,t);return bn(r,e)}function Wo(n={}){function t(u,d,f,m){if(typeof f=="number")return m[u].length===f;if(typeof f=="object"){const h=Object.keys(f)[0],g=f[h];if(h==="not")return Number(m[u].length)!==Number(g);if(h==="moreThan")return Number(m[u].length)>=Number(g);if(h==="lessThan")return Number(m[u].length)<=Number(g)}return!1}function e(u,d,f,m){return m[u]&&m[u].propertyValue&&String(m[u].propertyValue.value)===String(f)}const r=new Map([["length",t],["getProperty",e]]);Object.keys(n).reduce((u,d)=>(u.set(d,n[d]),u),r);function o(u,d){const f=u;return typeof d=="number"?[{target:f,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:f,operator:"getProperty",param:u,value:!!d}]:typeof d=="object"?Object.keys(d).map(m=>{if(m==="length")return{target:f,operator:"length",param:null,value:d[m]};const h=m,g=d[m];return{target:f,operator:"getProperty",param:h,value:g}}):[]}function a(u){return Object.keys(u).reduce((f,m)=>{const h=o(m,u[m]);return f.push(...h),f},[])}function s(u,d){if(r.has(u.operator)){const f=r.get(u.operator);return f&&f(u.target,u.param,u.value,d)||!1}return!1}function l(u,d){return a(u).reduce((h,g)=>h&&s(g,d),!0)}function c(u,d){const f=Object.keys(u),m=f.includes("allOf"),h=f.includes("anyOf"),g=m||h,w=(g?u[g?m?"allOf":"anyOf":"allOf"]:[u]).map(y=>l(y,d));return m?!w.includes(!1):w.includes(!0)}return{parseValueSchema:c}}const ue={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:"筛选条"}},Lo={},qo={};Wo();function Ot(n,t,e=new Map,r=(s,l,c,u)=>l,o={},a=s=>s){return vn[t.title]=t,yn[t.title]=r,Lo[t.title]=o,qo[t.title]=a,(s={},l=!0)=>{if(!l)return bn(s,e);const c=$o(s,t,e),u=Object.keys(n).reduce((d,f)=>(d[f]=n[f].default,d),{});return Object.assign(u,c)}}function en(n,t){return{customClass:t.class,customStyle:t.style}}function Ao(){function n(t,e){const{dataSource:r}=t||{};return r===void 0?{}:{}}return{resolve:n}}function zo(){function n(t,e){return t.selectItemById(e)}return{selectItemById:n}}function Go(){function n(t,e){const{columns:r}=e;return t.updateColumns(r)}return{updateColumns:n}}const Cn=new Map([["appearance",en],["column","columnOption"]]);function Yo(n,t,e){var f;const r=e.parentComponentInstance,o=r.schema.type,a=String(((f=r.schema.appearance)==null?void 0:f.class)||"").split(" "),s=o==="section"||o==="tab-page",l=a.includes("f-page-content-nav"),c=a.includes("f-page-main"),u=n.getSchemaByType("component");u.id=`${t.id}-component`,u.componentType="data-grid";let d="";return d+=s?"f-struct-data-grid-in-card f-struct-is-subgrid":"",d+=l?"f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column":"",d+=c?"f-struct-data-grid f-struct-wrapper":"",u.appearance={class:d},u.contents=[t],u}function Uo(n,t,e){const r=e.parentComponentInstance,o=String(r.schema.appearance.class||"").split(" "),a=o.includes("f-page-content-nav"),s=o.includes("f-page-main"),l=n.getSchemaByType("section");l.id=`${t.id}-section`;let c="";return c+=a?"f-section-in-nav ":"",c+=s?"f-section-in-managelist ":"",c+="f-section-grid",l.appearance={class:c},l.contents=[t],l}function Xo(n,t,e){const r=n.getSchemaByType("content-container");return r.id=`${t.id}-layout`,r.appearance={class:"f-grid-is-sub f-utils-flex-column"},r.contents=[t],r}function xn(n,t,e){const o=e.parentComponentInstance.schema.type,a=o==="section"||o==="tab-page";t.appearance={class:"f-component-grid"};const l=(a?Xo:Uo)(n,t,e);return Yo(n,l,e)}const _n={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tree-grid.schema.json",title:"tree-grid",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"tree-grid"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},fit:{type:"boolean",default:!1},showStripe:{type:"boolean",default:!0},showBorder:{type:"boolean",default:!1},showTreeNodeIcons:{type:"boolean",default:!1},showSetting:{type:"boolean",default:!1},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},dataSource:{description:"",type:"string",default:""},columns:{description:"",type:"array",default:[]},identifyField:{description:"",type:"string"},editable:{description:"",type:"boolean",default:!1},disabled:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},cell:{type:"object",properties:{highlightFocusingCell:{description:"",type:"boolean",default:!1},mergeCell:{description:"",type:"boolean",default:!1},showEditableIcon:{description:"",type:"boolean",default:!1}}},column:{type:"object",properties:{fitColumns:{description:"",type:"boolean",default:!1},fitMode:{description:"",type:"string",default:"average"},groups:{description:"",type:"array",default:[]},reorderColumn:{description:"Enable to drag column to reorder",type:"boolean",default:!1},resizeColumn:{type:"boolean",default:!0},resizeColumnOnDoubleClick:{description:"",type:"boolean",default:!0}}},command:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},commands:{type:"array",default:[]},commandColumnWidth:{description:"",type:"number",default:120},onClickDeleteCommand:{description:"",type:"string",default:""},onClickEditCommand:{description:"",type:"string",default:""}}},contextMenu:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},customizaiton:{type:"object",properties:{enableScheme:{description:"",type:"boolean",default:!1},enableSetting:{description:"",type:"boolean",default:!1}}},edit:{type:"obejct",properties:{mode:{description:"",type:"string",default:"cell",enum:["cell","row","card"]},selectOnEditing:{description:"",type:"boolean",default:!1},onAppendRow:{description:"",type:"string",default:""},onBeforeEdit:{description:"",type:"string",default:""}}},filter:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},filterStyle:{description:"",type:"string",default:"filter-column",enum:["filter-column","filter-row"]},mode:{description:"",type:"string",default:"server",enum:["client","server"]},showSummary:{description:"",type:"boolean",default:!0},onFilterChange:{description:"",type:"string",default:""}}},footer:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customFooterStyle:{description:"",type:"object"},footerDataCommand:{description:"",type:"string",default:""},footerDataFrom:{description:"",type:"string",default:"client"},footerHeight:{description:"",type:"number",default:29},footerPosition:{description:"",type:"string",default:"bottom"},footerTemplate:{description:"",type:"string",default:""}}},group:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customGroupRow:{description:"",type:"object"},customGroupRowStyle:{description:"",type:"obejct"},customSummaryStyle:{description:"",type:"obejct"},groupColSpan:{description:"",type:"number",default:1},groupFields:{description:"",type:"array",default:[]},showGroupedColumn:{description:"",type:"boolean",default:!0},showGroupPanel:{description:"",type:"boolean",default:!1},showSummary:{description:"",type:"boolean",default:!1},summaryPosition:{description:"",type:"string",default:"separate",enum:["separate","merge-to-group"]},disableGroupOnEditing:{description:"",type:"boolean",default:!0},expandGroupRows:{description:"",type:"boolean",default:!0}}},header:{type:"object",properties:{wrapHeadings:{description:"",type:"boolean",default:!1}}},pagination:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},disablePagination:{description:"",type:"string",default:""},contentTemplate:{description:"",type:"string",default:""},index:{description:"",type:"number",default:1},mode:{description:"",type:"string",default:"server",enum:["server","client"]},showGoto:{description:"",type:"boolean",default:!1},showIndex:{description:"",type:"boolean",default:!0},showLimits:{description:"",type:"boolean",default:!1},showPageInfo:{description:"",type:"boolean",default:!0},size:{description:"",type:"number",default:20},sizeLimits:{description:"",type:"array",default:[10,20,30,50,100]},onPageChange:{description:"",type:"string",default:""},onPageSizeChange:{description:"",type:"string",default:""}}},row:{type:"object",properties:{customRowStyle:{description:"",type:"object"},disable:{description:"",type:"obejct"},height:{description:"",type:"number",default:30},showHovering:{type:"boolean",default:!0},wrapContent:{type:"boolean",default:!1}}},rowNumber:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},heading:{description:"",type:"string",default:"序号"},width:{description:"",type:"number",default:36},onClickRow:{description:"",type:"string",default:""},onDoubleClickRow:{description:"",type:"string",default:""}}},selection:{type:"object",properties:{enableSelectRow:{description:"允许选中行",type:"boolean",default:!0},enable:{description:"",type:"boolean",default:!0},checkOnSelect:{description:"",type:"boolean",default:!1},clearSelectionOnEmpty:{description:"",type:"boolean",default:!0},customSelectionItem:{description:"",type:"object"},focusSelection:{description:"",type:"string",default:"current",enum:["current","all"]},keepSelectingOnClick:{description:"",type:"boolean",default:!0},keepSelectingOnPaging:{description:"",type:"boolean",default:!0},multiSelect:{description:"",type:"boolean",default:!1},selectionMode:{description:"",type:"string",default:"default"},selectOnCheck:{description:"",type:"boolean",default:!1},selectOnEditing:{description:"",type:"boolean",default:!1},showCheckbox:{description:"",type:"boolean",default:!1},showCheckAll:{description:"",type:"boolean",default:!1},showSelection:{description:"",type:"boolean",default:!1},onBeforeSelect:{description:"",type:"string",default:""},onBeforeUnCheck:{description:"",type:"",default:""},onBeforeUnSelect:{description:"",type:"string",default:""},onCheckAll:{description:"",type:"string",default:""},onChecked:{description:"",type:"string",default:""},onSelectionChange:{description:"",type:"string",default:""},onUnCheckAll:{description:"",type:"string",default:""},onUnChecked:{description:"",type:"string",default:""},onCheckedChange:{description:"",type:"string"}}},sort:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},fields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},multiSort:{description:"",type:"boolean",default:!1}}},summary:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customSummaryStyle:{description:"",type:"object"},groupFields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},position:{description:"",type:"boolean",default:"bottom",enum:["bottom","top","both"]}}},toolbar:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},visualization:{autoHeight:{description:"",type:"boolean",default:!1},emptyDataHeight:{description:"",type:"number",default:36},emptyTemplate:{description:"",type:"string",default:""},maxHeight:{description:"",type:"number",default:300},scrollBarShowMode:{description:"",type:"string",default:"auto"},showBorder:{description:"",type:"boolean",default:!1},showScrollArrow:{description:"",type:"boolean",default:!1},striped:{description:"",type:"boolean",default:!0},useBlankWhenDataIsEmpty:{description:"",type:"boolean",default:!1}},onSelectionChange:{description:"行切换事件",type:"string",default:""}},required:["id","type","columns"],events:{onSelectionChange:"行切换事件",onClickRow:"行点击事件"}},Qo={enable:{type:Boolean,default:!1},index:{type:Number,default:1},mode:{type:String,default:"server"},showGoto:{type:Boolean,default:!1},showIndex:{type:Boolean,default:!0},showLimits:{type:Boolean,default:!1},showPageInfo:{type:Boolean,default:!0},size:{type:Number,default:20},sizeLimits:{type:Array,default:[10,20,30,50,100]},total:{type:Number,default:0}},Ko={enable:{type:Boolean,default:!1},fields:{type:Array,default:[]},mode:{type:String,default:"client"},multiSort:{type:Boolean,default:!1}},Jo={customGroupRow:{type:Function,default:()=>{}},customGroupRowStyle:{type:Function,default:()=>{}},customSummaryStyle:{type:Function,default:()=>{}},enable:{type:Boolean,default:!1},groupColSpan:{type:Number,default:1},groupFields:{type:Array,default:[]},showGroupedColumn:{type:Boolean,default:!0},showGroupPanel:{type:Boolean,default:!1},showSummary:{type:Boolean,default:!1},summaryPosition:{type:String,default:"separate"}},Zo={enable:{type:Boolean,default:!1},filterStyle:{type:String,default:"filter-column"},mode:{type:String,default:"server"},showSummary:{type:Boolean,default:!0}},ei={wrapHeadings:{type:Boolean,default:!1}},ti={customRowStyle:{type:Function,default:()=>{}},disable:{type:Function,default:()=>{}},height:{type:Number,default:28},showHovering:{type:Boolean,default:!0},wrapContent:{type:Boolean,default:!1}},ni={enable:{type:Boolean,default:!1},customSummaryStyle:{type:Function,default:()=>{}},groupFields:{type:Array,default:[]},mode:{type:String,default:"client"},position:{type:String,default:"bottom"}},ri={fitColumns:{type:Boolean,default:!1},fitMode:{type:String,default:"average"},groups:{type:Array,defaut:[]},reorderColumn:{type:Boolean,default:!1},resizeColumn:{type:Boolean,default:!0},resizeColumnOnDoubleClick:{type:Boolean,default:!0}},oi={selectOnEditing:{type:Boolean,default:!1},editMode:{type:String,default:"cell"}},ii={show:{type:Boolean,default:!1},message:{type:String,default:"加载中..."}},Lt={autoCheckChildren:{type:Boolean,default:!1},columns:{type:Array,default:[]},columnOption:{type:Object},commandOption:{type:Object,default:{enable:!1,commands:[]}},data:{type:Array,default:[]},disabled:{type:Boolean,default:!1},disabledField:{type:String,default:"disabled"},displayField:{type:String,default:"name"},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},hierarchy:{type:Object,default:{cascadeOption:{autoCancelParent:!0,autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},loading:{type:Boolean,default:!1},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},newDataItem:{type:Function,default:()=>{}},pagination:{type:Object,default:{enable:!1,size:-1}},rowNumber:{type:Object,default:{enable:!0,width:32,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showHorizontalLines:{type:Boolean,default:!0},showLines:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},showVerticallLines:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},virtualized:{type:Boolean,default:!1}},Sn=Ot(Lt,_n,Cn,xn),Tn=zo(),kn=Ao(),tn=Object.assign({},Lt,{componentId:{type:String,default:""}}),Fn=Ot(tn,_n,Cn,xn),Mn=Go();var nt=(n=>(n[n.readonly=0]="readonly",n[n.editable=1]="editable",n[n.editing=2]="editing",n))(nt||{}),lt=(n=>(n[n.initial=0]="initial",n[n.editing=1]="editing",n))(lt||{}),jt=(n=>(n[n.data=0]="data",n[n.group=1]="group",n[n.summary=2]="summary",n))(jt||{}),Je=(n=>(n[n.none=0]="none",n[n.filterable=1]="filterable",n[n.sortable=2]="sortable",n[n.filtered=4]="filtered",n[n.sorted=8]="sorted",n[n.ascending=16]="ascending",n[n.descending=32]="descending",n))(Je||{});function ai(n,t){var h;const e=String(Date.now()),r=((h=n.rowOption)==null?void 0:h.height)||28,o=i.ref(t.value.primaryColumnsWidth);function a(g){const E={};return g.reduce((S,w,b)=>{const y=b<g.length-1?g[b+1]:null;return b===0&&(S[w.field]={left:0}),w.actualWidth!==void 0&&(S[w.field].width=w.actualWidth),y&&(S[y.field]={left:S[w.field].left+(w.actualWidth||0)}),S},E),E}function s(g,E,S){const w=r*(S+1),y=E[g.field].left-w+(E[g.field].width||0),_=g.parent.height?`${g.parent.height}px`:"";return{left:`${w}px`,width:`${y}px`,height:`${_}`}}function l(g,E,S){return{right:"0px",height:`${g.parent.height?`${g.parent.height}px`:""}`}}function c(g,E){const S=g.parent.height?`${g.parent.height}px`:"";return{left:`${E[g.field].left}px`,height:`${S}`,width:isNaN(Number(E[g.field].width))?"100%":`${E[g.field].width}px`}}function u(g,E,S){const b=(E.spanned||[]).reduce((_,T)=>_+(T.parent.height||0),0)+(g.height||0);return{top:`${g.top}px`,left:`${S[E.field].left}px`,width:`${S[E.field].width}px`,height:`${b}px`,padding:`calc(${b/2}px - 1rem) 0`}}function d(g,E){return`${e}_${g.type}_r_${g.index}_c_${E}_${g.refreshKey||""}`}function f(g){return`${e}_${g.type}_r_${g.index}_${g.refreshKey||""}`}function m(g){const E=g.height?`${g.height}px`:"";return{top:`${g.top}px`,width:isNaN(o.value)?"100%":`${o.value}px`,height:`${E}`}}return i.watch(t,()=>{o.value=t.value.primaryColumnsWidth}),{calculateCellPositionInRow:a,cellKey:d,cellPosition:c,groupCellPosition:s,rowKey:f,rowPosition:m,rowSpanCellPosition:u,summaryCellPosition:l}}function si(n,t,e){const{hasChildrenField:r}=e,o=i.ref("#9399a0"),a=i.ref(28);function s(){return[].concat(...t.value.filter(m=>m.raw.__fv_descendant_index__.length!==0).map(m=>[...m.raw.__fv_descendant_index__.slice(-1)]).flat()).sort((m,h)=>Number(m)-Number(h))}function l(d){const f=new Array(t.value.length).fill(0);if(n.showLines){const m=s();t.value.forEach((h,g)=>{const E=m.includes(g),S=h.raw[r.value];f[g]=`repeating-linear-gradient(90deg, ${o.value} 0 1px, transparent 0px 2px) ${S?"-10px":"0px"} ${a.value/2}px/20px 1px no-repeat,repeating-linear-gradient(${o.value} 0 1px, transparent 0px 2px) 0px 0px/1px ${E?"50%":"100%"} no-repeat`}),f[0]=""}return f[d]}function c(d,f,m){return m[d].parents.set(d,!0).forEach(g=>{m[g].childsLength=m[g].childWithLines.filter(E=>f[E].visible).length}),f}function u(d){const h=d.raw.__fv_parent_index__===void 0||d.raw.__fv_parent_index__===-1?0:8,g=0,E=d.raw[r.value],S=`${d.layer*10+d.layer*h+g}px`,w=d.visible||$e.isUndefined(d.visible)?{paddingLeft:`calc(${S} + 0.75rem)`,background:l(d.index),display:"flex",width:"100%",position:"relative"}:{display:"none"};return E||(w.paddingLeft=`calc(${S} + 2rem)`),w}return{hierarchyCellContentStyle:u,handleCollapsedPaddingBottom:c}}function li(n,t,e){const r=i.ref(n.iconField);function o(a,s){if(r.value)return a.raw[n.iconField];let l="";return a.raw[e.value]!==!0?l=t.value.leafnodes:l=a.collapse?t.value.fold:t.value.unfold,l}return{treeNodeIconsClass:o}}function ci(n,t,e,r,o,a,s,l){const{dataView:c,hasRealChildren:u,reOrderVisibleIndex:d}=r,{collapseField:f,hasChildrenField:m}=o,{reCalculateVisualDataRows:h,updateVirticalScroll:g}=a;function E(S){if(S.raw[m.value]){const b=c.value[S.raw.__fv_index__];b[f.value]=!b[f.value],r.toggleChildrenVisibiltyByCollapseStatus(b),b[m.value]=u(b),d(),h(),g()}t.emit("expandNode",{row:S})}return{toggleTreeNode:E}}function ui(n){function t(o){return{}}function e(o){const{valign:a,align:s}=o;return{"d-flex":!0,"h-100":!0,"w-100":!0,"justify-content-start":s!=="center"&&s!=="right","justify-content-center":s==="center","justify-content-right":s==="right","align-items-start":a!=="middle"&&a!=="bottom","align-items-center":a==="middle","align-items-end":a==="bottom"}}function r(o){const{align:a,showEllipsis:s}=o;return{"w-100":!0,"text-left":a!=="center"&&a!=="right","text-center":a==="center","text-right":a==="right","text-truncate":s}}return{cellContentPosition:t,cellContentClass:e,cellContentClassWithEllipsis:r}}function di(n,t,e,r,o,a,s,l,c,u,d,f,m){const{onClickCell:h}=a,{gridCellClass:g,gridHierarchyCellClass:E,gridRowClass:S,onClickRow:w,onMouseoverRow:b,onMouseoutRow:y}=l,{enableMultiSelect:_,select:T,unSelect:k,selectItem:p}=c;i.ref(n.cellHeight);const x=i.ref(n.treeNodeIconsData||{}),{hasChildrenField:C,shouldShowCheckBox:F,shouldShowIcon:v}=s,{toggleTreeNode:O}=ci(n,t,r,o,s,d),{toggleSelectHierarchyItem:V}=u,{cellKey:M,cellPosition:N,rowKey:q,rowPosition:$}=ai(n,e),{cellContentClass:P,cellContentPosition:H,cellContentClassWithEllipsis:X}=ui(),{hierarchyCellContentStyle:D}=si(n,r,s),{treeNodeIconsClass:I}=li(n,x,C);function U(L,ee){const ye=L.raw[C.value];return{"fv-tree-node-toggle":ye&&L.collapse,"fv-tree-node-toggle-minus":ye&&!L.collapse}}function W(L,ee){L.stopPropagation(),O(ee)}function R(L){L.stopPropagation()}function A(L,ee){return i.createVNode("div",{class:U(L),onClick:ye=>W(ye,L),onDblclick:R},null)}function Q(L,ee){return v.value&&i.createVNode("div",{id:"treeNodeIcons",class:I(L,ee)},null)}function oe(L){_.value?(L.checked?T(L):k(L),V(L)):p(L)}function J(L,ee){return F.value&&i.createVNode(Sr.FCheckbox,{id:"checkbox_for_"+M(L,ee.index),indeterminate:L.indeterminate,disabled:L.disabled,checked:L.checked,"onUpdate:checked":ye=>L.checked=ye,onChange:()=>oe(L)},null)}function de(L,ee){return i.createVNode("span",{title:ee.data,style:"user-select:none"},[t.slots.cellTemplate?t.slots.cellTemplate({cell:ee,row:L}):ee.mode===nt.editing?ee.getEditor(ee):ee.formatter?ee.formatter(ee,L):ee.data!=null?ee.data.toString():ee.data])}function he(L,ee){return i.createVNode("div",{class:X(ee)},[ee.showTips?i.createVNode(mn,null,{default:()=>de(L,ee),contentTemplate:()=>de(L,ee)}):de(L,ee)])}function xe(L,ee,ye){const ke=D(L);return i.createVNode("div",{ref:ee.setRef,key:M(L,ee.index),class:"fv-grid-hierarchy-cell",style:N(ee,ye)},[i.createVNode("div",{class:P(ee),style:ke},[A(L),Q(L,ee),J(L,ee),he(L,ee)])])}function Ie(L,ee,ye){return i.createVNode("div",{ref:ee.setRef,key:M(L,ee.index),class:g(ee),style:N(ee,ye),onClick:ke=>h(ke,ee,L,ee.column)},[i.createVNode("div",{class:P(ee)},[i.createVNode("div",{class:X(ee)},[ee.showTips?i.createVNode(mn,null,{default:()=>de(L,ee),contentTemplate:()=>de(L,ee)}):de(L,ee)])])])}function Be(L,ee){return ee==="left"&&e.value.leftColumns.length>0&&e.value.leftColumns[0].field===L.field||ee==="primary"&&e.value.primaryColumns.length>0&&e.value.primaryColumns[0].field===L.field}function z(L,ee){t.emit("dblclickNode",{$event:L,node:ee.raw})}function ce(L,ee,ye="primary",ke){return i.createVNode("div",{ref:L.setRef,key:q(L),class:S(L,ke),style:$(L),onMouseover:Oe=>b(Oe,L),onMouseout:Oe=>y(Oe,L),onClick:Oe=>w(Oe,L),onDblclick:Oe=>z(Oe,L)},[Object.values(L.data).filter(Oe=>ee[Oe.field]&&Oe.rowSpan===1).map(Oe=>Be(Oe,ye)?xe(L,Oe,ee):Ie(L,Oe,ee))])}return{renderDataRow:ce}}function fi(n,t,e){const{horizontalScrollThumbStyle:r,onMouseDownScrollThumb:o,shouldShowHorizontalScrollbar:a}=e;function s(){return a.value&&i.createVNode("div",{class:"fv-grid-horizontal-scroll"},[i.createVNode("div",{class:"fv-grid-horizontal-scroll-thumb",style:r.value,onMousedown:l=>o(l,t,"horizontal")},null)])}return{renderHorizontalScrollbar:s}}function pi(){function n(r,o){switch(r.command){case"edit":case"remove":return o.status===lt.initial;case"accept":case"cancel":return o.status===lt.editing;default:return!r.hidden}}function t(r,o,a){switch(r.onClick(o,a.dataIndex,a),r.command){case"edit":a.status,lt.editing;break;case"accept":case"cancel":a.status,lt.initial;break}}function e(r,o){return r.commands&&r.commands.map(a=>n(a,o)&&i.createVNode(Fr,{class:"ml-2",type:a.type,size:a.size||"small",onClick:s=>t(a,s,o),style:{"margin-bottom":"3px"}},{default:()=>[i.createTextVNode(" "),a.text,i.createTextVNode(" ")]}))}return{renderCommandColumn:e}}function mi(n){const t=i.ref(n.minHeight),e=i.ref(n.minWidth),r=i.ref(n.height),o=i.ref(n.width),a=i.computed(()=>r.value<=0?0:Math.max(r.value,t.value)),s=i.computed(()=>o.value<=0?0:Math.max(o.value,e.value));return i.watch([()=>n.height,()=>n.width,()=>n.minHeight,()=>n.minWidth],([c,u,d,f])=>{t.value=Number(d),e.value=Number(f),r.value=Number(c),o.value=Number(u)}),{containerStyleObject:i.computed(()=>({height:a.value>0?`${a.value}px`:n.fit?"100%":"",width:s.value>0?`${s.value}px`:n.fit?"100%":"",flex:"1 1 0"}))}}i.ref([{name:"七天",selectable:!0},{name:"一个月",selectable:!0},{name:"三个月",selectable:!0},{name:"半年",selectable:!0}]);function hi(n){const e=i.ref(n.commandOption.enable||!1),r=i.ref(n.commandOption.commands||[]);function o(a){if(e.value&&!(a.value.findIndex(l=>l.dataType==="commands")>-1)){const l={field:"__commands__",title:"操作",width:120,fixed:"right",dataType:"commands",commands:r.value,visible:!0};a.value.push(l)}}return{applyCommands:o}}function gi(n,t){var u;const e=i.ref((u=n.columnOption)==null?void 0:u.groups);function r(d,f,m,h,g){const E={actualWidth:0,children:[],depth:1,field:d.field,layer:1,left:0,parent:m,resizable:!0,title:d.title||"",status:Je.none,popoverRef:i.ref(),showPopover:!1,column:null,sortType:"none"},S=h||E;if(d.group){let w=1;d.group.reduce((b,y)=>{if(typeof y=="string"){const _=f.get(y);_&&(g.fieldToRootMap.set(y,S),b.actualWidth+=_.actualWidth,b.children.push(_))}else{const _=r(y,f,b,S,g);w=Math.max(w,_.depth),b.actualWidth+=_.actualWidth,b.children.push(_)}return b},E),E.depth+=w}return t.value.headerDepth=Math.max(t.value.headerDepth,E.depth),E}function o(d){const f={groupedCells:new Map,fieldToRootMap:new Map};return e.value&&e.value.reduce((m,h)=>{const g=r(h,d,null,null,f);return m.groupedCells.set(h.field,g),m},f),f}function a(d){if(!d||d.length===0)return 0;const f=d[0];return f.children&&f.children.length>0&&(f.left=a(f.children)),f.left}function s(d,f){const m=t.value.headerDepth;d.forEach(h=>{h.layer=f?f.layer+1:1;const g=h.children&&h.children.length===0;h.depth=g?m-(h.layer-1):1,h.left=g?h.left:a(h.children),h.children&&s(h.children,h)})}function l(d,f){const m=new Map;return d.forEach(h=>{const g=f.fieldToRootMap.get(h.field),E=g!=null;E&&!m.has(g.field)&&m.set(g.field,g),E||m.set(h.field,h)}),s(Array.from(m.values())),m}function c(d){let f=new Map,m=0;if(d.reduce((h,g)=>{let E=Je.none;E=g.filterable?E|Je.filterable:E,E=g.sort&&g.sort!=="none"?E|Je.sorted|(g.sort==="asc"?Je.ascending:Je.descending):E;const S=g.field;return h.set(S,{actualWidth:g.actualWidth||0,children:[],depth:1,layer:1,left:m,field:S,parent:null,resizable:g.resizable===void 0?!0:g.resizable,title:g.title,status:E,popoverRef:i.ref(),showPopover:!1,column:g,filterValue:null,sortType:g.sort||"none",showSetting:g.showSetting,draggable:g.draggable}),m+=g.actualWidth||0,h},f),e.value){const h=o(f);f=l(f,h)}return f}return{getGridHeaderCells:c}}function vi(n,t){var b;Ve.useGuid();const{idField:e}=t,r=i.ref(n.summary),o=i.ref(n.group),a=i.ref(((b=n.group)==null?void 0:b.groupFields)||[]),s=i.computed(()=>{var y;return(y=n.group)==null?void 0:y.enable}),l=i.computed(()=>{var y;return(y=n.group)==null?void 0:y.showGroupPanel}),c=i.computed(()=>{const y=r.value;return(y==null?void 0:y.groupFields)||[]}),u=i.computed(()=>{const y=o.value;return y&&y.showSummary}),d=i.ref(0),f=new Map;let m=[];function h(y,_,T,k,p){const x=k[T];x&&(_.reduce((C,F,v)=>{var M;const O=F[x];let V=C.get(O);if(!V){const N=c.value.reduce((q,$)=>(q.set($,0),q),new Map);V={field:x,title:((M=p.get(x))==null?void 0:M.title)||x,value:O,layer:T,details:[],groupSummaries:N},C.set(O,V)}return c.value&&c.value.forEach(N=>{if(V){const q=V.groupSummaries.get(N)||0;V.groupSummaries.set(N,q+F[N])}}),V.details.push(F),C},y),T<k.length-1&&y.forEach((C,F)=>{C.nestGroup=new Map,h(C.nestGroup,C.details,T+1,k,p),C.details=[]}))}function g(y,_){return n.group&&n.group.formatter?n.group.formatter(y.value,{...y,total:_}):`${y.title}:${y.value} (${_})`}function E(y,_){const T=[];return y.forEach(k=>{const p={[e.value]:`group_of_${_?_[e.value]+"_":""}${k.field}_${k.value}`,__fv_data_grid_group_collapse__:!1,__fv_data_grid_group_field__:k.field,__fv_data_grid_group_layer__:k.layer,__fv_data_grid_group_row__:!0,__fv_data_grid_group_value__:k.value};let x=0;if(T.push(p),k.nestGroup){const C=E(k.nestGroup,p);T.push(...C),x+=C.length}if(k.details&&k.details.length&&(T.push(...k.details),x+=k.details.length),u.value){const C={__fv_data_grid_group_field__:k.field,__fv_data_grid_group_layer__:k.layer,__fv_data_grid_group_summary__:!0};C[e.value]=`summary_of_${k.field}_${k.value}`,C[k.field]=Array.from(k.groupSummaries.entries()).reduce((F,[v,O])=>`${F} ${v} total:${O} `,""),T.push(C)}k.groupSummaries&&k.groupSummaries.size&&k.groupSummaries.forEach((C,F)=>{p[F]=C}),p[k.field]=g(k,x),p.value=k.value}),T.forEach((k,p)=>{k.__fv_data_index__=p}),T}function S(y,_,T){return!y||y.length===0||!_.length?_:(y.join(","),f.clear(),m=[],_=_.filter(k=>!k.__fv_data_grid_group_row__),h(f,_,0,y,T),m=E(f),m)}function w(y){return{"f-icon":!0,"f-icon-arrow-chevron-down":!0,"fv-grid-group-row-icon-collapse":y.collapse}}return{collpaseGroupIconClass:w,generateGroupData:S,groupFields:a,shouldGroupingData:s,showGroupPanel:l,groupRowSize:d}}function yi(n,t,e,r){const o=i.ref(0),a=i.ref(!!n.hierarchy),{idField:s}=r,{collapseField:l,hasChildrenField:c,parentIdField:u}=e,d=new Map,f=new Map,m=new Map;function h(W,R){f.clear(),W.reduce((A,Q)=>{const oe=Q[u.value]!==void 0?Q[u.value]:"";if(oe&&R.has(oe)){const de=R.get(oe),he=isNaN(Number(de.__fv_layer__))?1:Number(de.__fv_layer__);Q.__fv_layer__=he+1,Q.__fv_parent_index__=de.__fv_index__,de.__fv_hasChildren__=!0}else Q.__fv_layer__=1;const J=A.has(oe)?A.get(oe):[];return J.push(Q),A.set(oe,J),A},f)}function g(W){m.clear(),W.reduce((R,A)=>{const Q=A[s.value];return R.set(Q,A),R},m)}function E(W){W.forEach(R=>{const A=R[s.value];R.__fv_children_index__.map(oe=>W[oe]).forEach(oe=>{oe.__fv_parents__=new Map([...R.__fv_parents__.entries(),[A,!0]])})})}function S(W){W.forEach(R=>{const A=new Set(R.__fv_children_index__);R.__fv_children_index__=[...A].sort((Q,oe)=>Q-oe)})}function w(W){W.forEach(R=>{const A=R.__fv_parents__;Array.from(A.keys()).map(Q=>m.get(Q)).forEach(Q=>{Q.__fv_children_index__.push(R.__fv_index__)})}),S(W)}function b(W){W.forEach(R=>{R.__fv_child_with_lines__=[],R.__fv_child_length__=R.__fv_descendant_index__.length,R.__fv_descendant_index__.map(A=>W[A]).reduce((A,Q)=>(A.__fv_child_length__+=Q.__fv_children_index__.length,A.__fv_child_with_lines__.push(...Q.__fv_children_index__,Q.__fv_index__),A),R)})}function y(W,R){return{id:W,index:R,parentId:"",parentIndex:-1,parents:new Map,children:new Map,descendant:new Map,collapsed:!1,visibleInHierarchy:!0}}function _(W,R,A){Array.from(R.keys()).forEach(Q=>{R.get(Q).reduce((J,de)=>{const he=de[s.value],xe=W.get(de[s.value]),Ie=W.get(Q),Be=A.get(Q);return Ie&&Be&&(Ie.children.set(he,xe),Ie.children.set(he,xe),xe.parentId=Q,xe.parentIndex=Ie.index,xe.parents.set(Q,Ie)),J},W)})}function T(W){W.children.forEach(A=>{A.parents=new Map([...W.parents.entries(),[W.id,W]]),T(A)})}function k(W,R){W.filter(A=>A[u.value]===void 0||A[u.value]==="").forEach(A=>{const Q=A[s.value],oe=R.get(Q);T(oe)})}function p(W){Array.from(W.values()).forEach(R=>{Array.from(R.parents.values()).forEach(A=>{A.descendant.set(R.id,R)})})}function x(W){d.clear(),W.forEach((R,A)=>{const Q=R[s.value];d.set(Q,y(Q,A))}),g(W),h(W,m),_(d,f,m),k(W,d),p(d)}function C(W){const R=W[s.value],A=d.get(R);return A&&A.children.size>0}function F(W){return W[c.value]&&!C(W)}function v(W){const R=W[s.value],A=d.get(R);return A&&A.visibleInHierarchy}function O(){o.value=Date.now()}function V(W,R){R.forEach(A=>{const Q=d.get(A[s.value]),oe=d.get(W),J=m.get(W);oe&&J&&(Q.visibleInHierarchy=!J[l.value]&&oe.visibleInHierarchy)}),O()}function M(W){if(f.has(W)){const A=f.get(W);V(W,A),A.map(Q=>Q[s.value]).forEach(Q=>M(Q))}}function N(W){const R=W[s.value];M(R)}function q(W,R,A=0){W.forEach(Q=>{const oe=F(Q),J=Q.__fv_layer__<=A,de=R==="ToCollapse"?Q.__fv_layer__<=A:!(Q.__fv_layer__<=A),he=J?de:Q[l.value];Q[l.value]=oe||he});for(const[Q,oe]of f.entries())V(Q,oe);return W}function $(W,R){q(W,"ToCollapse",R)}function P(W,R){q(W,"ToExpand",R)}function H(W){W.forEach((R,A)=>{var de;const Q=R[s.value],oe=f.has(Q)?(de=f.get(Q))==null?void 0:de.map(he=>he.__fv_index__):[],J=y(Q,A);R.__fv_graph_node__=J,R.__fv_children_index__=oe,R.__fv_descendant_index__=[...oe],R.__fv_parents__=new Map,F(R)&&(R[l.value]=!0)})}function X(W){var Q,oe;x(t.value),H(W),E(W),w(W),n.showLines&&b(W);const A=((Q=n.hierarchy)==null?void 0:Q.collapseTo)!==void 0?Number((oe=n.hierarchy)==null?void 0:oe.collapseTo):0;return q(W,"ToCollapse",A),W}function D(W,R,A){const oe=A.value[W][s.value],J=d.get(oe);if(J){const de=d.get(J.parentId);let he=A.value.length-1;if(de){const xe=Array.from(de.children.keys()).indexOf(J.id);if(xe===de.children.size-1){const Be=Array.from(de.descendant.values())[de.descendant.size-1];he=A.value.findIndex(ce=>ce[s.value]===Be.id)+1}else{const Be=Array.from(de.children.values())[xe+1];he=A.value.findIndex(ce=>ce[s.value]===Be.id)}R[c.value]=!1,R[u.value]=de.id,A.value.splice(he,0,R)}}}function I(W,R,A){const Q=A.value[W],oe=Q[s.value];if(d.get(oe)){const he=A.value.findIndex(xe=>xe[s.value]===oe)+1;Q[c.value]=!0,Q[l.value]=!1,R[c.value]=!1,R[u.value]=oe,A.value.splice(he,0,R)}}function U(W,R){const A=W[s.value],Q=d.get(A),oe=Array.from(Q.descendant.keys());oe.unshift(A);const J=d.get(Q.parentId);if(J&&(J.children.delete(A),J.children.size===0)){const he=R.find(xe=>xe[s.value]===Q.parentId);he[c.value]=!1,he[l.value]=!1}return R.filter(he=>oe.indexOf(he.id)===-1)}return{checkVisibleInHierarchy:o,collapseTo:$,expandTo:P,generateHierarchyData:X,hasRealChildren:C,insertSibling:D,insertChild:I,isVisibleInTree:v,shouldStratifyData:a,toggleChildrenVisibiltyByCollapseStatus:N,trimmedOriginalData:U}}const wi={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},safeHtml:{type:Boolean,default:!0}},bi={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},nn=i.defineComponent({name:"Toast",props:bi,emits:["close","click"],setup:(n,t)=>{const e=i.ref(n.animate),r="fadeOut",o=i.computed(()=>n.options),a=i.ref(!1),s=i.computed(()=>{const w={animated:a.value,toast:!0};return w[n.animate]=!1,w[r]=a.value,w[o.value.type]=!0,o.value.theme&&(w[o.value.theme]=!0),w}),l=i.computed(()=>{const y=`f-icon-${o.value&&o.value.type?o.value.type.replace("toasty-type-",""):"default"}`,_={"f-icon":!0};return _[y]=!0,_}),c=i.computed(()=>o.value.title||o.value.message),u=i.computed(()=>o.value.title&&o.value.message),d=i.computed(()=>!o.value.title&&o.value.message),f=i.computed(()=>n.showCloseButton),m=i.computed(()=>!!o.value.buttons||!!t.slots.default);function h(w){w.stopPropagation(),w.preventDefault(),a.value=!1,setTimeout(()=>{t.emit("close",o.value)},200)}function g(w,b){}function E(w){return`f-preten-link ${w.customClass?w.customClass:""}`}i.watch(e,()=>{e.value});const S=()=>{var w;return i.createVNode(i.Fragment,null,[i.createVNode("div",{class:"after-toast-msg text-right"},[!t.slots.default&&((w=o.value.buttons)==null?void 0:w.map(b=>i.createVNode("span",{class:E(b),onClick:y=>void 0},[b.text]))),t.slots.default&&t.slots.default()])])};return()=>i.createVNode("div",{class:s.value,style:"min-height:44px"},[f.value&&i.createVNode("button",{title:"关闭",class:"toast-close f-btn-icon f-bare",onClick:h},[i.createVNode("span",{class:"f-icon modal_close"},null)]),c.value&&i.createVNode("section",{class:"modal-tips"},[i.createVNode("div",{class:"float-left modal-tips-iconwrap"},[i.createVNode("span",{class:l.value},null)]),i.createVNode("div",{class:"modal-tips-content"},[u.value&&i.createVNode(i.Fragment,null,[i.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:o.value.title},null),i.createVNode("p",{class:"toast-msg",innerHTML:o.value.message},null),m.value&&S()]),d.value&&(o.value.buttons?i.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[i.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:o.value.message},null),i.createVNode("div",{class:"after-toast-title text-right ml-auto"},[S()])]):i.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:o.value.message},null))])])])}}),qt=i.defineComponent({name:"Notify",props:wi,emits:["close","empty"],setup(n,t){const e=i.computed(()=>({"farris-notify":!0})),r={left:12,right:12,top:20,bottom:12},o=i.ref(),a=i.ref(n.options),s=i.ref(n.showCloseButton),l=i.computed(()=>n.position||"bottom-right"),c=i.computed(()=>n.timeout!=null?n.timeout:3e3),u=i.computed(()=>{const m=n.bottom?n.bottom:r.bottom,h=n.top?n.top:r.top,g={transition:"all 0.2s ease",left:l.value.indexOf("left")>-1?`${n.left?n.left:r.left}px`:"",right:l.value.indexOf("right")>-1?`${n.right?n.right:r.right}px`:"",top:l.value.indexOf("top")>-1?`${h}px`:"",bottom:l.value.indexOf("bottom")>-1?`${m}px`:""};return l.value.indexOf("center")>-1&&(g.left="50%",g.marginLeft="calc(-24rem / 2)",l.value==="center-center"&&(g.top="50%",g.transform="translate(-50%, -50%)")),g});function d(m){t.emit("close")}c.value&&setTimeout(()=>{d()},c.value),t.expose({closeToast:d,container:o,notifyPosition:l});function f(m,h){d()}return()=>i.createVNode("div",{class:e.value,style:u.value,ref:o},[i.createVNode(nn,{options:a.value,showCloseButton:s.value,animate:n.animate,onClose:m=>f(m,a.value)},null)])}});class En{constructor(){j(this,"notifyRefs",[]);j(this,"globalConfig",i.reactive({}))}escapeAllHtml(t){if(typeof t!="string"||!t)return"";const e=document.createElement("div");return e.textContent=t||"",e.innerHTML.replace(/ /g,"&nbsp;").replace(/\\n/g,"<br>").replace(/\\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g,"")}createNotifyInstance(t){const e=this,o=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0,safeHtml:!0},this.globalConfig,{...t}),a=document.createElement("div");a.style.display="contents";const s=i.createApp({setup(){var u;const l=i.ref();function c(){l.value.container.style.transform="scale(0)",setTimeout(()=>{e.updateNotifyPositionForClose(o,l),s.unmount()},220)}if(o.position.indexOf("top")>-1){const d=e.getNotifyInstances(o.position),f=d[d.length-1];if(f){const m=f.value.container.getBoundingClientRect();o.top=m.bottom}}return o.safeHtml&&((u=o.options)!=null&&u.message)&&(o.options.message=e.escapeAllHtml(o.options.message)),i.onUnmounted(()=>{document.body.removeChild(a)}),i.onMounted(()=>{e.updateNotifyPositionForCreate(o,l)}),()=>i.createVNode(i.Transition,{mode:"out-in",name:"fade",appear:!0},{default:()=>[i.createVNode(qt,i.mergeProps({ref:l},o,{onClose:c}),null)]})}});re