fantasia-ui 0.2.13 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/fantasia-ui.css +6892 -1
  2. package/dist/fantasia-ui.es.js +3810 -2248
  3. package/dist/fantasia-ui.umd.js +4516 -9
  4. package/dist/types/assets/index.d.ts +5 -0
  5. package/dist/types/components/index.d.ts +43 -47
  6. package/dist/types/components/modules/FAffix.vue.d.ts +16 -0
  7. package/dist/types/components/modules/FAlert.vue.d.ts +15 -0
  8. package/dist/types/components/modules/FAvatar.vue.d.ts +6 -0
  9. package/dist/types/components/modules/FBadge.vue.d.ts +19 -0
  10. package/dist/types/components/modules/FBreadcrumb.vue.d.ts +19 -0
  11. package/dist/types/components/modules/FButton.vue.d.ts +16 -0
  12. package/dist/types/components/modules/FButtonGroup.vue.d.ts +18 -0
  13. package/dist/types/components/modules/FCard.vue.d.ts +19 -0
  14. package/dist/types/components/modules/FCheckbox.vue.d.ts +11 -0
  15. package/dist/types/components/modules/FCol.vue.d.ts +17 -0
  16. package/dist/types/components/modules/FCollapse.vue.d.ts +27 -0
  17. package/dist/types/components/modules/FCollapseItem.vue.d.ts +18 -0
  18. package/dist/types/components/modules/FColorPicker.vue.d.ts +16 -0
  19. package/dist/types/components/modules/FContainer.vue.d.ts +15 -0
  20. package/dist/types/components/modules/FDialog.vue.d.ts +25 -0
  21. package/dist/types/components/modules/FDivider.vue.d.ts +6 -0
  22. package/dist/types/components/modules/FDropdown.vue.d.ts +25 -0
  23. package/dist/types/components/modules/FEditor.vue.d.ts +15 -0
  24. package/dist/types/components/modules/FEmpty.vue.d.ts +21 -0
  25. package/dist/types/components/modules/FForm.vue.d.ts +21 -0
  26. package/dist/types/components/modules/FFormItem.vue.d.ts +16 -0
  27. package/dist/types/components/modules/FIcon.vue.d.ts +15 -0
  28. package/dist/types/components/modules/FImage.vue.d.ts +15 -0
  29. package/dist/{components/modules/FInput.d.ts → types/components/modules/FInput.vue.d.ts} +6 -7
  30. package/dist/types/components/modules/FInputNumber.vue.d.ts +21 -0
  31. package/dist/types/components/modules/FLink.vue.d.ts +16 -0
  32. package/dist/types/components/modules/FLoading.vue.d.ts +6 -0
  33. package/dist/types/components/modules/FPagination.vue.d.ts +18 -0
  34. package/dist/types/components/modules/FProgress.vue.d.ts +6 -0
  35. package/dist/{components/modules/FRate.d.ts → types/components/modules/FRate.vue.d.ts} +6 -7
  36. package/dist/types/components/modules/FResult.vue.d.ts +18 -0
  37. package/dist/types/components/modules/FRow.vue.d.ts +19 -0
  38. package/dist/types/components/modules/FScrollbar.vue.d.ts +41 -0
  39. package/dist/types/components/modules/FSelect.vue.d.ts +17 -0
  40. package/dist/types/components/modules/FSlider.vue.d.ts +21 -0
  41. package/dist/types/components/modules/FSpace.vue.d.ts +9 -0
  42. package/dist/types/components/modules/FTable.vue.d.ts +38 -0
  43. package/dist/types/components/modules/FTabs.vue.d.ts +21 -0
  44. package/dist/types/components/modules/FTag.vue.d.ts +20 -0
  45. package/dist/types/components/modules/FText.vue.d.ts +17 -0
  46. package/dist/types/components/modules/FTooltip.vue.d.ts +21 -0
  47. package/dist/types/components/modules/FTypography.vue.d.ts +15 -0
  48. package/dist/types/components/modules/FUpload.vue.d.ts +28 -0
  49. package/dist/types/index.d.ts +4 -1
  50. package/dist/types/types/components/index.d.ts +47 -0
  51. package/dist/types/{components → types/components}/modules/base.d.ts +2 -1
  52. package/dist/types/{components → types/components}/modules/f-avatar.d.ts +2 -2
  53. package/dist/types/types/components/modules/f-button-group.d.ts +13 -0
  54. package/dist/types/types/components/modules/f-button.d.ts +17 -0
  55. package/dist/types/{components → types/components}/modules/f-card.d.ts +1 -1
  56. package/dist/types/{components → types/components}/modules/f-divider.d.ts +1 -1
  57. package/dist/types/{components → types/components}/modules/f-dropdown.d.ts +2 -2
  58. package/dist/types/{components → types/components}/modules/f-form.d.ts +1 -1
  59. package/dist/types/{components → types/components}/modules/f-menu.d.ts +1 -1
  60. package/dist/types/{components → types/components}/modules/f-result.d.ts +1 -1
  61. package/dist/types/{components → types/components}/modules/f-row.d.ts +1 -1
  62. package/dist/types/{components → types/components}/modules/f-space.d.ts +1 -1
  63. package/dist/types/{components → types/components}/modules/f-tag.d.ts +1 -1
  64. package/dist/types/{components → types/components}/modules/f-toolbar.d.ts +1 -1
  65. package/dist/types/types/index.d.ts +2 -0
  66. package/dist/{utils → types/utils}/validator.d.ts +1 -1
  67. package/package.json +4 -3
  68. package/dist/assets/index.d.ts +0 -5
  69. package/dist/auto-imports.d.ts +0 -623
  70. package/dist/components/index.d.ts +0 -42
  71. package/dist/components/modules/FAffix.d.ts +0 -22
  72. package/dist/components/modules/FAlert.d.ts +0 -21
  73. package/dist/components/modules/FAvatar.d.ts +0 -7
  74. package/dist/components/modules/FBadge.d.ts +0 -25
  75. package/dist/components/modules/FBreadcrumb.d.ts +0 -25
  76. package/dist/components/modules/FButton.d.ts +0 -22
  77. package/dist/components/modules/FButtonGroup.d.ts +0 -24
  78. package/dist/components/modules/FCard.d.ts +0 -32
  79. package/dist/components/modules/FCheckbox.d.ts +0 -12
  80. package/dist/components/modules/FCol.d.ts +0 -23
  81. package/dist/components/modules/FCollapse.d.ts +0 -29
  82. package/dist/components/modules/FCollapseItem.d.ts +0 -23
  83. package/dist/components/modules/FColorPicker.d.ts +0 -22
  84. package/dist/components/modules/FContainer.d.ts +0 -21
  85. package/dist/components/modules/FDialog.d.ts +0 -31
  86. package/dist/components/modules/FDivider.d.ts +0 -7
  87. package/dist/components/modules/FDropdown.d.ts +0 -36
  88. package/dist/components/modules/FEditor.d.ts +0 -20
  89. package/dist/components/modules/FEmpty.d.ts +0 -25
  90. package/dist/components/modules/FForm.d.ts +0 -27
  91. package/dist/components/modules/FFormItem.d.ts +0 -22
  92. package/dist/components/modules/FIcon.d.ts +0 -21
  93. package/dist/components/modules/FImage.d.ts +0 -24
  94. package/dist/components/modules/FInputNumber.d.ts +0 -24
  95. package/dist/components/modules/FLink.d.ts +0 -22
  96. package/dist/components/modules/FLoading.d.ts +0 -7
  97. package/dist/components/modules/FPagination.d.ts +0 -19
  98. package/dist/components/modules/FProgress.d.ts +0 -7
  99. package/dist/components/modules/FRow.d.ts +0 -25
  100. package/dist/components/modules/FScrollbar.d.ts +0 -57
  101. package/dist/components/modules/FSelect.d.ts +0 -18
  102. package/dist/components/modules/FSlider.d.ts +0 -24
  103. package/dist/components/modules/FSpace.d.ts +0 -10
  104. package/dist/components/modules/FTable.d.ts +0 -43
  105. package/dist/components/modules/FTabs.d.ts +0 -25
  106. package/dist/components/modules/FTag.d.ts +0 -26
  107. package/dist/components/modules/FText.d.ts +0 -23
  108. package/dist/components/modules/FTooltip.d.ts +0 -32
  109. package/dist/components/modules/FTypography.d.ts +0 -21
  110. package/dist/components/modules/FUpload.d.ts +0 -34
  111. package/dist/env.d.ts +0 -24
  112. package/dist/global.d.ts +0 -53
  113. package/dist/index.d.ts +0 -4
  114. package/dist/types/components/modules/f-button-group.d.ts +0 -11
  115. package/dist/types/components/modules/f-button.d.ts +0 -9
  116. package/dist/volar.d.ts +0 -53
  117. /package/dist/types/{components → types/components}/modules/f-affix.d.ts +0 -0
  118. /package/dist/types/{components → types/components}/modules/f-alert.d.ts +0 -0
  119. /package/dist/types/{components → types/components}/modules/f-badge.d.ts +0 -0
  120. /package/dist/types/{components → types/components}/modules/f-breadcrumb.d.ts +0 -0
  121. /package/dist/types/{components → types/components}/modules/f-checkbox.d.ts +0 -0
  122. /package/dist/types/{components → types/components}/modules/f-col.d.ts +0 -0
  123. /package/dist/types/{components → types/components}/modules/f-collapse-item.d.ts +0 -0
  124. /package/dist/types/{components → types/components}/modules/f-collapse.d.ts +0 -0
  125. /package/dist/types/{components → types/components}/modules/f-color-picker.d.ts +0 -0
  126. /package/dist/types/{components → types/components}/modules/f-container.d.ts +0 -0
  127. /package/dist/types/{components → types/components}/modules/f-dialog.d.ts +0 -0
  128. /package/dist/types/{components → types/components}/modules/f-editor.d.ts +0 -0
  129. /package/dist/types/{components → types/components}/modules/f-empty.d.ts +0 -0
  130. /package/dist/types/{components → types/components}/modules/f-form-item.d.ts +0 -0
  131. /package/dist/types/{components → types/components}/modules/f-icon.d.ts +0 -0
  132. /package/dist/types/{components → types/components}/modules/f-image.d.ts +0 -0
  133. /package/dist/types/{components → types/components}/modules/f-input-number.d.ts +0 -0
  134. /package/dist/types/{components → types/components}/modules/f-input.d.ts +0 -0
  135. /package/dist/types/{components → types/components}/modules/f-link.d.ts +0 -0
  136. /package/dist/types/{components → types/components}/modules/f-loading.d.ts +0 -0
  137. /package/dist/types/{components → types/components}/modules/f-pagination.d.ts +0 -0
  138. /package/dist/types/{components → types/components}/modules/f-progress.d.ts +0 -0
  139. /package/dist/types/{components → types/components}/modules/f-rate.d.ts +0 -0
  140. /package/dist/types/{components → types/components}/modules/f-scrollbar.d.ts +0 -0
  141. /package/dist/types/{components → types/components}/modules/f-slider-captcha.d.ts +0 -0
  142. /package/dist/types/{components → types/components}/modules/f-slider.d.ts +0 -0
  143. /package/dist/types/{components → types/components}/modules/f-table.d.ts +0 -0
  144. /package/dist/types/{components → types/components}/modules/f-tabs.d.ts +0 -0
  145. /package/dist/types/{components → types/components}/modules/f-tagsview.d.ts +0 -0
  146. /package/dist/types/{components → types/components}/modules/f-text.d.ts +0 -0
  147. /package/dist/types/{components → types/components}/modules/f-tooltip.d.ts +0 -0
  148. /package/dist/types/{components → types/components}/modules/f-typography.d.ts +0 -0
  149. /package/dist/types/{components → types/components}/modules/f-upload.d.ts +0 -0
  150. /package/dist/types/{models → types/models}/index.d.ts +0 -0
  151. /package/dist/{utils → types/utils}/general.d.ts +0 -0
  152. /package/dist/{utils → types/utils}/index.d.ts +0 -0
@@ -1,9 +1,4516 @@
1
- (function(C,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@vicons/ionicons5"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@vicons/ionicons5","@vueuse/core"],e):(C=typeof globalThis!="undefined"?globalThis:C||self,e(C.FantasiaUI={},C.Vue,C.IconsIonicons5,C.VueUse))})(this,function(C,e,x,ee){"use strict";var ln=Object.defineProperty,rn=Object.defineProperties;var an=Object.getOwnPropertyDescriptors;var Ye=Object.getOwnPropertySymbols;var sn=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable;var Xe=(C,e,x)=>e in C?ln(C,e,{enumerable:!0,configurable:!0,writable:!0,value:x}):C[e]=x,Z=(C,e)=>{for(var x in e||(e={}))sn.call(e,x)&&Xe(C,x,e[x]);if(Ye)for(var x of Ye(e))cn.call(e,x)&&Xe(C,x,e[x]);return C},v=(C,e)=>rn(C,an(e));var G=(C,e,x)=>new Promise((ee,K)=>{var D=W=>{try{X(x.next(W))}catch(q){K(q)}},j=W=>{try{X(x.throw(W))}catch(q){K(q)}},X=W=>W.done?ee(W.value):Promise.resolve(W.value).then(D,j);X((x=x.apply(C,e)).next())});const K=e.defineComponent({__name:"FIcon",props:{color:{},size:{default:"1em"}},setup(s){const t=s,n=e.computed(()=>({width:typeof t.size=="number"?`${t.size}px`:t.size,height:typeof t.size=="number"?`${t.size}px`:t.size,color:t.color}));return(o,l)=>(e.openBlock(),e.createElementBlock("span",{role:"img",class:"f-icon",style:e.normalizeStyle(e.unref(n))},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),D=(s,t)=>{const n=s.__vccOpts||s;for(const[o,l]of t)n[o]=l;return n},j=D(K,[["__scopeId","data-v-baf7de0c"]]),X="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1780285609860'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12961'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M894.4%20281.504a39.36%2039.36%200%200%200-27.104-11.808l-293.888-10.976-22.016%2046.88%2030.592%2087.2-55.2%2099.008%2022.4%2079.904%2056%2068.48%2081.024-70.496c7.808-6.88%2020.288-6.496%2027.104%201.216l103.904%20106.4c7.296%207.296%206.88%2019.2-0.928%2026.112a18.944%2018.944%200%200%201-13.76%204.896l-284.8-10.624-14.24%2038.72%2015.52%2034.592%20327.488%2011.808c21.504%200.8%2039.616-15.104%2040.096-35.52l18.208-439.296a34.368%2034.368%200%200%200-10.4-26.496zM684.096%20483.2c-32.32-1.184-57.28-26.88-56-57.088%201.28-30.592%2028.416-54.208%2060.288-52.992%2031.904%201.184%2057.312%2026.88%2056%2057.088-1.184%2030.208-28.384%2054.304-60.288%2052.992z%20m-211.104%20253.6l9.92-40.8-231.424%2015.104c-10.784%200.8-19.776-6.496-20.672-16.704a17.856%2017.856%200%200%201%204.672-13.504l171.52-186.272a18.048%2018.048%200%200%201%2014.208-6.112c5.184%200%2010.272%201.984%2014.176%205.696l57.28%2056.704-24.576-60.32%2044-104.288L472%20302.72l16.384-48.096-315.392%2020.8c-21.504%201.184-37.504%2018.784-36.192%2039.072l31.904%20439.424c0.384%209.792%205.184%2018.688%2013.408%2024.896%207.776%206.496%2017.696%209.792%2028%208.992l281.792-18.304-18.88-32.704z'%20p-id='12962'%3e%3c/path%3e%3c/svg%3e",W={key:0,class:"loop cubes"},q={key:2,class:"msg"},te=D(e.defineComponent({__name:"FLoading",props:{type:{default:"dots"},text:{},mask:{type:Boolean,default:!1}},setup(s){const t=s;return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex-center-col size-full loading-container",{"global-mask":n.mask}])},[n.type==="cubes"?(e.openBlock(),e.createElementBlock("div",W,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(6,l=>e.createElementVNode("div",{class:"item cubes",key:l})),64))])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loader",n.type])},null,2)),t.text?(e.openBlock(),e.createElementBlock("p",q,e.toDisplayString(t.text),1)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-20f58a50"]]),qe={class:"f-image"},Ge={key:0,class:"f-image__placeholder"},Ke={key:0,class:"f-image__error"},Je=["src","loading"],se=D(e.defineComponent({__name:"FImage",props:{src:{},alt:{},fit:{default:"cover"},lazy:{type:Boolean,default:!0}},setup(s){const t=s,n=e.ref("loading");e.watch(()=>t.src,()=>{n.value="loading"},{immediate:!1});const o=()=>n.value="loaded",l=()=>n.value="error";return(r,d)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(n)==="loading"?(e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(te,{type:"classic first"})])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(n)==="error"?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(r.$slots,"error",{},()=>[e.createVNode(j,{size:"48px"},{default:e.withCtx(()=>[e.createVNode(e.unref(X))]),_:1})],!0)])):e.createCommentVNode("",!0)]),_:3}),e.withDirectives(e.createElementVNode("img",{src:t.src,loading:r.lazy?"lazy":"eager",style:e.normalizeStyle({objectFit:t.fit}),class:"f-image__img",onLoad:o,onError:l},null,44,Je),[[e.vShow,e.unref(n)==="loaded"]])]))}}),[["__scopeId","data-v-e959ab10"]]),Qe=["type","placeholder","disabled","readonly","name","id"],ce=D(e.defineComponent({__name:"FInput",props:e.mergeModels({placeholder:{default:"输入..."},type:{default:"text"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},name:{default:""},id:{default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:e.mergeModels(["input","change","focus","blur"],["update:modelValue"]),setup(s,{emit:t}){const n=e.useModel(s,"modelValue"),o=t,l=a=>{const b=a.target.value;o("input",b)},r=a=>{const b=a.target.value;o("change",b)},d=a=>{o("focus",a)},i=a=>{o("blur",a)};return(a,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-input",{"is-disabled":a.disabled,"is-readonly":"readonly"in a?a.readonly:e.unref(e.readonly)}])},[e.createVNode(j,{class:"f-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.Search))]),_:1}),e.withDirectives(e.createElementVNode("input",{class:"f-input__text","onUpdate:modelValue":b[0]||(b[0]=B=>n.value=B),type:a.type,placeholder:a.placeholder,disabled:a.disabled,readonly:"readonly"in a?a.readonly:e.unref(e.readonly),name:a.name,id:a.id,onInput:l,onChange:r,onFocus:d,onBlur:i},null,40,Qe),[[e.vModelDynamic,n.value]])],2))}}),[["__scopeId","data-v-9af0fbbe"]]),Ze=["onMousemove"],ve={key:0,class:"f-rate__score"},ie=D(e.defineComponent({__name:"FRate",props:e.mergeModels({modelValue:{},count:{default:5},readonly:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},color:{default:"#f5a623"},voidColor:{default:"#c0c4cc"},showText:{type:Boolean,default:!1},scoreTemplate:{default:"{value} 分"},size:{default:"normal"}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(s,{emit:t}){const n=e.useModel(s,"modelValue"),o=s,l=t,r=e.ref(null),d=e.computed(()=>{var m;return(m=r.value)!=null?m:n.value}),i=e.computed(()=>o.scoreTemplate.replace("{value}",String(n.value))),a=e.computed(()=>o.size==="normal"?16:o.size==="small"?12:20),b=m=>{const E=d.value;return E>=m?"full":o.allowHalf&&E>=m-.5?"half":"empty"},B=m=>b(m)==="full"?o.voidColor:o.color,u=(m,E)=>{if(!o.readonly)if(o.allowHalf){const V=m.currentTarget,{left:M,width:F}=V.getBoundingClientRect();r.value=(m.clientX-M)/F<.5?E-.5:E}else r.value=E},p=()=>{o.readonly||(r.value=null)},g=()=>{var E;if(o.readonly)return;const m=(E=r.value)!=null?E:n.value;n.value=m,l("change",m)};return(m,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-rate",{"f-rate--readonly":o.readonly}]),onMouseleave:p},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.count,V=>(e.openBlock(),e.createElementBlock("span",{key:V,class:"f-rate__item",onMousemove:M=>u(M,V),onClick:g},[e.createVNode(j,{color:B(V),size:e.unref(a)},{default:e.withCtx(()=>[b(V)==="full"?(e.openBlock(),e.createBlock(e.unref(x.StarOutline),{key:0})):b(V)==="half"?(e.openBlock(),e.createBlock(e.unref(x.StarHalf),{key:1})):(e.openBlock(),e.createBlock(e.unref(x.Star),{key:2}))]),_:2},1032,["color","size"])],40,Ze))),128)),o.showText?(e.openBlock(),e.createElementBlock("span",ve,e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)],34))}}),[["__scopeId","data-v-3b5c4f14"]]),et={class:"f-dropdown-wrapper"},tt={class:"f-dropdown-content"},ot=["onClick"],nt={key:0,class:"opt-icon"},lt={class:"opt-label"},oe=D(e.defineComponent({__name:"FDropdown",props:{placement:{default:"right-start"},offset:{default:12},zIndex:{default:2e3},trigger:{default:"hover"},options:{default:()=>[]}},emits:["select"],setup(s,{emit:t}){const n=s,o=t,l=e.ref(!1),r=e.ref(null),d=e.ref(null),i=e.ref(null),a=e.ref(0),b=e.ref(0),B=e.computed(()=>{const[w]=n.placement.split("-"),c=(Array.isArray(n.offset)?n.offset[0]:n.offset)+4,h={position:"absolute"};return w==="right"?(h.width=`${c}px`,h.left=`-${c}px`,h.top=0,h.bottom=0):w==="left"?(h.width=`${c}px`,h.right=`-${c}px`,h.top=0,h.bottom=0):w==="bottom"?(h.height=`${c}px`,h.top=`-${c}px`,h.left=0,h.right=0):w==="top"&&(h.height=`${c}px`,h.bottom=`-${c}px`,h.left=0,h.right=0),h}),u=e.computed(()=>{if(!r.value)return{};const w=r.value,{placement:$}=n,c=Array.isArray(n.offset)?n.offset[0]:n.offset,[h,S]=$.split("-"),A=window.innerWidth,z=window.innerHeight,L=b.value||160,_=a.value||200;let f=0,k=0,y=h;h==="right"?(k=w.right+c,k+L>A&&(k=w.left-L-c,y="left")):h==="left"?(k=w.left-L-c,k<0&&(k=w.right+c,y="right")):h==="bottom"?(f=w.bottom+c,f+_>z&&(f=w.top-_-c,y="top")):h==="top"&&(f=w.top-_-c,f<0&&(f=w.bottom+c,y="bottom")),y==="top"||y==="bottom"?(S==="start"?k=w.left:S==="end"?k=w.right-L:k=w.left+(w.width-L)/2,k=Math.max(8,Math.min(k,A-L-8))):(S==="start"?f=w.top:S==="end"?f=w.bottom-_:f=w.top+(w.height-_)/2,f=Math.max(8,Math.min(f,z-_-8)));const N=y==="right"?"left":y==="left"?"right":S==="start"?"left":S==="end"?"right":"center",I=y==="bottom"?"top":y==="top"?"bottom":S==="start"?"top":S==="end"?"bottom":"center";return{top:`${f}px`,left:`${k}px`,transformOrigin:`${I} ${N}`}});let p=null,g=null;const m=()=>{p&&(clearTimeout(p),p=null)},E=w=>{n.trigger==="click"&&(w.stopPropagation(),l.value?l.value=!1:(r.value=d.value.getBoundingClientRect(),l.value=!0))},V=()=>{n.trigger==="hover"&&(m(),g=setTimeout(()=>{d.value&&(r.value=d.value.getBoundingClientRect()),l.value=!0},400))},M=()=>{n.trigger==="hover"&&(g&&(clearTimeout(g),g=null),p=setTimeout(()=>{l.value=!1},400))},F=w=>{n.trigger!=="click"||!l.value||(l.value=!1)},R=w=>{w.disabled||(o("select",w.key,w),w.children||(l.value=!1))};return e.watch(l,w=>G(null,null,function*(){var $,c;w?(r.value=d.value.getBoundingClientRect(),yield e.nextTick(),a.value=(($=i.value)==null?void 0:$.offsetHeight)||200,b.value=((c=i.value)==null?void 0:c.offsetWidth)||160):(a.value=0,b.value=0)})),e.onUnmounted(()=>{m(),g&&clearTimeout(g)}),ee.useEventListener(window,"click",F),(w,$)=>(e.openBlock(),e.createElementBlock("div",et,[e.createElementVNode("div",{ref_key:"triggerRef",ref:d,class:"f-dropdown-trigger-wrapper",onMouseenter:V,onMouseleave:M,onClick:E},[e.renderSlot(w.$slots,"default",{},void 0,!0)],544),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"f-dropdown-motion"},{default:e.withCtx(()=>[e.unref(l)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:i,class:"f-dropdown-item",style:e.normalizeStyle([e.unref(u),{zIndex:w.zIndex}]),onMouseenter:m,onMouseleave:M,onClick:$[0]||($[0]=e.withModifiers(()=>{},["stop"]))},[w.trigger==="hover"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"f-dropdown-bridge",style:e.normalizeStyle(e.unref(B))},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",tt,[w.options&&w.options.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(w.options,c=>(e.openBlock(),e.createElementBlock("div",{key:c.key,class:e.normalizeClass(["f-dropdown-option",{"is-disabled":c.disabled}]),onClick:h=>R(c)},[c.icon?(e.openBlock(),e.createElementBlock("span",nt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon)))])):e.createCommentVNode("",!0),e.createElementVNode("span",lt,e.toDisplayString(c.label),1)],10,ot))),128)):e.renderSlot(w.$slots,"content",{key:1},void 0,!0)])],36)):e.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-addb3a3b"]]),de=D(e.defineComponent({__name:"FSelect",props:e.mergeModels({options:{},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["select"],["update:modelValue"]),setup(s,{emit:t}){const n=s,o=t,l=e.useModel(s,"modelValue"),r=e.ref(!1),d=e.computed(()=>{var B,u,p;return(p=(B=n.options.find(g=>g.key===l.value))==null?void 0:B.label)!=null?p:(u=n.placeholder)!=null?u:"请选择"}),i=e.computed(()=>l.value!==void 0&&l.value!==""),a=(B,u)=>{l.value=B,o("select",B,u),r.value=!1},b=B=>{r.value=B};return(B,u)=>(e.openBlock(),e.createBlock(oe,{options:B.options,trigger:"click",onSelect:a,onShow:u[0]||(u[0]=p=>b(!0)),onHide:u[1]||(u[1]=p=>b(!1)),placement:"bottom",offset:4},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["f-select",{"is-active":e.unref(i),"is-open":e.unref(r)}])},[e.createElementVNode("span",{class:e.normalizeClass(["f-select__label",{"is-placeholder":!e.unref(i)}])},e.toDisplayString(e.unref(d)),3),e.createVNode(j,{class:"f-select__arrow"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.ChevronDownOutline))]),_:1})],2)]),_:1},8,["options"]))}}),[["__scopeId","data-v-61444561"]]),rt={key:0,class:"f-pagination"},at={key:0,class:"f-pagination__total"},st={key:1,class:"f-pagination__size"},ct=["value"],it=["value"],dt={key:3,class:"f-pagination__list"},ft={key:0,class:"page-btn ellipsis"},pt=["onClick"],mt={key:5,class:"f-pagination__jump"},ht=["max"],fe=D(e.defineComponent({__name:"FPagination",props:e.mergeModels({total:{},pageSize:{default:10},hideOnSingle:{type:Boolean,default:!1},pageSizes:{default:()=>[10,20,50,100]},layout:{default:()=>["prev","pager","next"]}},{modelValue:{default:1},modelModifiers:{}}),emits:e.mergeModels(["update:pageSize"],["update:modelValue"]),setup(s,{emit:t}){const n=s,o=t,l=e.useModel(s,"modelValue"),r=e.computed(()=>{var p;return(p=n.layout)!=null?p:["prev","pager","next"]}),d=e.computed(()=>Math.ceil(n.total/n.pageSize)||1),i=e.computed(()=>{const p=d.value,g=l.value;return!p||p<=0?[]:p<=7?Array.from({length:p},(m,E)=>E+1):g<=4?[1,2,3,4,5,"...",p]:g>=p-3?[1,"...",p-4,p-3,p-2,p-1,p]:[1,"...",g-1,g,g+1,"...",p]}),a=p=>{typeof p=="number"&&(p<1||p>d.value||p===l.value||(l.value=p))},b=p=>{o("update:pageSize",parseInt(p.target.value,10)),l.value=1},B=e.ref(""),u=()=>{const p=parseInt(B.value,10);isNaN(p)||a(p),B.value=""};return(p,g)=>!p.hideOnSingle||e.unref(d)>1?(e.openBlock(),e.createElementBlock("div",rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),m=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m},[m==="total"?(e.openBlock(),e.createElementBlock("span",at," 共 "+e.toDisplayString(p.total)+" 条 ",1)):m==="sizes"?(e.openBlock(),e.createElementBlock("div",st,[e.createElementVNode("select",{class:"size-select",value:p.pageSize,onChange:b},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.pageSizes,E=>(e.openBlock(),e.createElementBlock("option",{key:E,value:E},e.toDisplayString(E)+" 条/页",9,it))),128))],40,ct)])):m==="prev"?(e.openBlock(),e.createElementBlock("button",{key:2,class:e.normalizeClass(["page-btn",{disabled:l.value===1}]),onClick:g[0]||(g[0]=E=>a(l.value-1))},[e.createVNode(j,null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.ChevronBackOutline))]),_:1})],2)):m==="pager"?(e.openBlock(),e.createElementBlock("ul",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(E,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V},[E==="..."?(e.openBlock(),e.createElementBlock("li",ft,[e.createVNode(j,null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.EllipsisHorizontal))]),_:1})])):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["page-btn",{active:l.value===E}]),onClick:M=>a(E)},e.toDisplayString(E),11,pt))],64))),128))])):m==="next"?(e.openBlock(),e.createElementBlock("button",{key:4,class:e.normalizeClass(["page-btn",{disabled:l.value===e.unref(d)}]),onClick:g[1]||(g[1]=E=>a(l.value+1))},[e.createVNode(j,null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.ChevronForwardOutline))]),_:1})],2)):m==="jumper"?(e.openBlock(),e.createElementBlock("div",mt,[g[3]||(g[3]=e.createElementVNode("span",{class:"jump-label"},"前往",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[2]||(g[2]=E=>e.isRef(B)?B.value=E:null),class:"jump-input",type:"number",min:1,max:e.unref(d),onKeydown:e.withKeys(u,["enter"]),onBlur:u},null,40,ht),[[e.vModelText,e.unref(B)]]),g[4]||(g[4]=e.createElementVNode("span",{class:"jump-label"},"页",-1))])):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-930f8b20"]]),ut={key:0,class:"f-card__header"},_t={key:0,class:"f-card__header-extra"},kt={key:1,class:"f-card__cover"},gt={key:2,class:"f-card__body"},yt={key:3,class:"f-card__footer"},bt={key:0,class:"f-card__header"},Bt={key:0,class:"f-card__header-extra"},$t={key:1,class:"f-card__cover"},Ct={class:"f-card__content"},Et={key:0,class:"f-card__body"},wt={key:1,class:"f-card__footer"},pe=D(e.defineComponent({__name:"FCard",props:{hoverable:{type:Boolean,default:!0},direction:{default:"vertical"}},setup(s){return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-card",[`f-card--${t.direction}`,{"is-hoverable":t.hoverable}]])},[t.direction==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.$slots.header||t.$slots["header-extra"]?(e.openBlock(),e.createElementBlock("div",ut,[e.renderSlot(t.$slots,"header",{},void 0,!0),t.$slots["header-extra"]?(e.openBlock(),e.createElementBlock("div",_t,[e.renderSlot(t.$slots,"header-extra",{},void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.$slots.cover?(e.openBlock(),e.createElementBlock("div",kt,[e.renderSlot(t.$slots,"cover",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.default?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(t.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",yt,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.$slots.header||t.$slots["header-extra"]?(e.openBlock(),e.createElementBlock("div",bt,[e.renderSlot(t.$slots,"header",{},void 0,!0),t.$slots["header-extra"]?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(t.$slots,"header-extra",{},void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.$slots.cover?(e.openBlock(),e.createElementBlock("div",$t,[e.renderSlot(t.$slots,"cover",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ct,[t.$slots.default?(e.openBlock(),e.createElementBlock("div",Et,[e.renderSlot(t.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",wt,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)])],64))],2))}}),[["__scopeId","data-v-a66fa373"]]),Vt={key:0,class:"f-tag__dot"},ne=D(e.defineComponent({__name:"FTag",props:{color:{},type:{default:"round"},effect:{},closable:{type:Boolean},size:{default:"normal"}},emits:["close"],setup(s,{emit:t}){const n=t,o=e.ref(!1);return(l,r)=>{var d,i,a;return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["f-tag",[`f-tag--${(d=l.type)!=null?d:"round"}`,`f-tag--${(i=l.effect)!=null?i:"light"}`,(a=l.color)!=null?a:"default"]]),onMouseenter:r[1]||(r[1]=b=>o.value=!0),onMouseleave:r[2]||(r[2]=b=>o.value=!1)},[l.type==="dot"?(e.openBlock(),e.createElementBlock("span",Vt)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default",{},void 0,!0),l.closable?(e.openBlock(),e.createBlock(j,{key:1,class:"f-tag__close",onClick:r[0]||(r[0]=e.withModifiers(b=>n("close"),["stop"]))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o)?e.unref(x.CloseCircle):e.unref(x.Close))))]),_:1})):e.createCommentVNode("",!0)],34)}}}),[["__scopeId","data-v-02bd5aa6"]]),le=D(e.defineComponent({__name:"FTooltip",props:{content:{},placement:{default:"top"},disabled:{type:Boolean,default:!1},delay:{default:100},offset:{default:6},maxWidth:{default:240}},setup(s){const t=s,n=e.ref(null),o=e.ref(null),l=e.ref(!1),r=e.ref({top:0,left:0});let d=null;const i=()=>{t.disabled||(d=setTimeout(()=>{l.value=!0,e.nextTick(b)},t.delay))},a=()=>{d&&clearTimeout(d),l.value=!1},b=()=>{var R,w;if(!o.value)return;const B=(w=(R=n.value)==null?void 0:R.firstElementChild)!=null?w:n.value;if(!B)return;const u=B.getBoundingClientRect(),p=o.value.getBoundingClientRect(),g=t.offset,[m,E]=t.placement.split("-");let V=0,M=0;switch(m){case"top":V=u.top-p.height-g;break;case"bottom":V=u.bottom+g;break;case"left":M=u.left-p.width-g;break;case"right":M=u.right+g;break}m==="top"||m==="bottom"?E==="start"?M=u.left:E==="end"?M=u.right-p.width:M=u.left+(u.width-p.width)/2:E==="start"?V=u.top:E==="end"?V=u.bottom-p.height:V=u.top+(u.height-p.height)/2;const F=8;M=Math.max(F,Math.min(M,window.innerWidth-p.width-F)),V=Math.max(F,Math.min(V,window.innerHeight-p.height-F)),r.value={top:V+window.scrollY,left:M+window.scrollX}};return e.onUnmounted(a),(B,u)=>(e.openBlock(),e.createElementBlock("div",{class:"f-tooltip",ref_key:"triggerRef",ref:n,onMouseenter:i,onMouseleave:a},[e.renderSlot(B.$slots,"default",{},void 0,!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"f-tooltip"},{default:e.withCtx(()=>[e.unref(l)&&(B.content||B.$slots.content)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:o,class:e.normalizeClass(["f-tooltip-wrapper",`is-${B.placement.split("-")[0]}`]),style:e.normalizeStyle({top:`${e.unref(r).top}px`,left:`${e.unref(r).left}px`,maxWidth:`${B.maxWidth}px`})},[e.renderSlot(B.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(B.content),1)],!0),u[0]||(u[0]=e.createElementVNode("span",{class:"f-tooltip-arrow"},null,-1))],6)):e.createCommentVNode("",!0)]),_:3})]))],544))}}),[["__scopeId","data-v-be9acca7"]]),St={class:"f-progress"},Nt={key:0,class:"f-progress__text"},re=D(e.defineComponent({__name:"FProgress",props:{percent:{},color:{},showText:{type:Boolean,default:!1},height:{default:5}},setup(s){const t=s,n=e.computed(()=>Math.min(100,Math.max(0,t.percent)));return(o,l)=>(e.openBlock(),e.createElementBlock("div",St,[e.createElementVNode("div",{class:"f-progress__track",style:e.normalizeStyle({height:`${o.height}px`})},[e.createElementVNode("div",{class:"f-progress__fill",style:e.normalizeStyle({width:`${e.unref(n)}%`,background:o.color})},null,4)],4),o.showText?(e.openBlock(),e.createElementBlock("span",Nt,e.toDisplayString(e.unref(n))+"%",1)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-c2164d6e"]]),Ft={class:"f-tabs__nav-container"},Mt={class:"f-tabs__nav"},zt=["onClick"],Tt={class:"f-tabs__label"},me=D(e.defineComponent({__name:"FTabs",props:{tabs:{},active:{},type:{default:"line"}},emits:["update:active","change"],setup(s,{emit:t}){const n=s,o=t,l=e.computed({get:()=>{var i;if(n.active&&n.tabs.some(a=>a.name===n.active&&!a.disabled))return n.active;const d=n.tabs.find(a=>!a.disabled);return(i=d==null?void 0:d.name)!=null?i:""},set:d=>{o("update:active",d),o("change",d)}}),r=(d,i)=>{i||(l.value=d)};return(d,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-tabs",[`f-tabs--${d.type}`]])},[e.createElementVNode("div",Ft,[e.createElementVNode("div",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.tabs,a=>(e.openBlock(),e.createElementBlock("div",{key:a.name,class:e.normalizeClass(["f-tabs__tab",{active:e.unref(l)===a.name,disabled:a.disabled}]),onClick:b=>r(a.name,a.disabled)},[e.createElementVNode("span",Tt,e.toDisplayString(a.label),1)],10,zt))),128))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.tabs,a=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:a.name,class:"f-tabs__panel"},[e.renderSlot(d.$slots,a.name,{},void 0,!0)])),[[e.vShow,e.unref(l)===a.name]])),128))],2))}}),[["__scopeId","data-v-268fc654"]]),It={class:"f-breadcrumb__current","aria-current":"page"},Dt=["href"],xt={key:3,class:"f-breadcrumb__text"},he=D(e.defineComponent({__name:"FBreadcrumb",props:{items:{default:()=>[]},separator:{default:"/"},animated:{type:Boolean,default:!1}},setup(s){return(t,n)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(["f-breadcrumb",{"f-breadcrumb--animated":t.animated}]),"aria-label":"breadcrumb"},[e.createVNode(e.TransitionGroup,{name:"breadcrumb"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o.label},[l>0?(e.openBlock(),e.createElementBlock("span",{key:`sep-${o.label}`,class:"f-breadcrumb__sep","aria-hidden":"true"},e.toDisplayString(t.separator),1)):e.createCommentVNode("",!0),l===t.items.length-1?e.renderSlot(t.$slots,"default",{key:1,item:o},()=>[e.createElementVNode("span",It,e.toDisplayString(o.label),1)],!0):o.href?(e.openBlock(),e.createElementBlock("a",{key:2,href:o.href,class:"f-breadcrumb__link"},e.toDisplayString(o.label),9,Dt)):(e.openBlock(),e.createElementBlock("span",xt,e.toDisplayString(o.label),1))],64))),128))]),_:3})],2))}}),[["__scopeId","data-v-bb787dcc"]]),ue=D(e.defineComponent({__name:"FCol",props:{span:{default:24},offset:{default:0},order:{default:0},xs:{},sm:{},md:{},lg:{}},setup(s){const t=s,n=r=>typeof r=="number"?{span:r}:r,o=e.computed(()=>({"--col-span":t.span,"--col-offset":t.offset,"--col-order":t.order})),l=e.computed(()=>{const r=[],d={xs:t.xs,sm:t.sm,md:t.md,lg:t.lg};for(const[i,a]of Object.entries(d)){if(a===void 0)continue;const{span:b,offset:B,order:u}=n(a);b!==void 0&&r.push(`f-col--${i}-${b}`),B!==void 0&&r.push(`f-col--${i}-offset-${B}`),u!==void 0&&r.push(`f-col--${i}-order-${u}`)}return r});return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-col",e.unref(l)]),style:e.normalizeStyle(e.unref(o))},[e.renderSlot(r.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-5a8b0cb4"]]),_e=D(e.defineComponent({__name:"FRow",props:{gutter:{default:0},justify:{default:"start"},align:{default:"top"},wrap:{default:"wrap"},tag:{default:"div"}},setup(s){const t=s,n=e.computed(()=>Array.isArray(t.gutter)?t.gutter[0]:t.gutter),o=e.computed(()=>Array.isArray(t.gutter)?t.gutter[1]:0),l={start:"flex-start",end:"flex-end",center:"center","space-between":"space-between","space-around":"space-around","space-evenly":"space-evenly"},r={top:"flex-start",middle:"center",bottom:"flex-end",stretch:"stretch"},d=e.computed(()=>({marginLeft:n.value?`-${n.value/2}px`:void 0,marginRight:n.value?`-${n.value/2}px`:void 0,rowGap:o.value?`${o.value}px`:void 0,justifyContent:l[t.justify],alignItems:r[t.align],flexWrap:t.wrap,"--row-gutter-h":n.value?`${n.value/2}px`:"0px"}));return(i,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.tag),{class:"f-row",style:e.normalizeStyle(e.unref(d))},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default",{},void 0,!0)]),_:3},8,["style"]))}}),[["__scopeId","data-v-72f62339"]]),Lt={class:"f-space__item"},Rt={key:0,class:"f-space__split","aria-hidden":"true"},ke=D(e.defineComponent({__name:"FSpace",props:{direction:{default:"horizontal"},size:{default:"normal"},align:{default:"center"},justify:{default:"start"},wrap:{type:Boolean,default:!1},split:{}},setup(s){const t=s,n={small:6,normal:12,large:18},o=a=>typeof a=="number"?a:n[a],l=e.computed(()=>{const a=t.size;return Array.isArray(a)?`${o(a[1])}px ${o(a[0])}px`:`${o(a)}px`}),r=e.computed(()=>({flexDirection:t.direction==="vertical"?"column":"row",alignItems:t.align,justifyContent:t.justify,flexWrap:t.wrap?"wrap":"nowrap",gap:l.value})),d=e.useSlots(),i=e.computed(()=>{var B;const a=(B=d.default)==null?void 0:B.call(d);if(!a)return[];const b=[];for(const u of a)u.type===e.Fragment?b.push(...u.children):b.push(u);return b.filter(u=>u.type!==Comment)});return(a,b)=>(e.openBlock(),e.createElementBlock("div",{class:"f-space",style:e.normalizeStyle(e.unref(r))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(B,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[e.createElementVNode("div",Lt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B)))]),a.split&&u<e.unref(i).length-1?(e.openBlock(),e.createElementBlock("span",Rt,e.toDisplayString(a.split),1)):e.createCommentVNode("",!0)],64))),128))],4))}}),[["__scopeId","data-v-5fb3b1a0"]]),ge=D(e.defineComponent({__name:"FContainer",props:{gap:{default:12}},setup(s){const t=s,n=e.computed(()=>({gap:typeof t.gap=="number"?`${t.gap}px`:t.gap}));return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"f-container",style:e.normalizeStyle(e.unref(n))},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-08450ddf"]]),ye=D(e.defineComponent({__name:"FDivider",props:{color:{},direction:{default:"horizontal"},line:{default:"solid"}},setup(s){const t=s,n=e.computed(()=>{const o=t.color||"var(--el-color-primary)",l=t.direction==="horizontal";return{borderTop:l?`${t.line} ${o}`:"none",borderLeft:l?"none":`${t.line} ${o}`,height:l?"0":"100%",width:l?"100%":"0",margin:l?"24px 0":"0"}});return(o,l)=>(e.openBlock(),e.createElementBlock("hr",{style:e.normalizeStyle(n.value)},null,4))}}),[["__scopeId","data-v-512ee743"]]),At=["src","alt"],be=D(e.defineComponent({__name:"FAvatar",props:{src:{},alt:{},size:{default:"normal"},shape:{default:"circle"},icon:{}},setup(s){const t=s,n={small:"32px",normal:"48px",large:"64px"},o=e.computed(()=>({width:typeof t.size=="string"?n[t.size]:`${t.size}px`,height:typeof t.size=="string"?n[t.size]:`${t.size}px`,borderRadius:t.shape==="circle"?"50%":"8px"}));return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"f-avatar",style:e.normalizeStyle(e.unref(o))},[l.src?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.src,alt:l.alt},null,8,At)):(e.openBlock(),e.createBlock(j,{key:1,size:24},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.icon?l.icon:e.unref(x.Person))))]),_:1}))],4))}}),[["__scopeId","data-v-b3665268"]]),Pt=["disabled"],Be=D(e.defineComponent({__name:"FButton",props:{size:{default:"normal"},round:{type:[Boolean,Number],default:!1},disabled:{type:Boolean},bgColor:{},variant:{}},setup(s){const t=s,n={small:{height:"24px",minWidth:"24px",padding:"0 8px",fontSize:"11px"},normal:{height:"32px",minWidth:"32px",padding:"0 12px",fontSize:"12px"},large:{height:"40px",minWidth:"40px",padding:"0 16px",fontSize:"13px"}},o=e.computed(()=>{var l;return v(Z({},(l=n[t.size])!=null?l:n.normal),{borderRadius:t.round===!0?"999px":typeof t.round=="number"?`${t.round}px`:"6px",backgroundColor:t.bgColor})});return(l,r)=>{var d;return e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["f-button",[`f-button--${(d=l.variant)!=null?d:"default"}`,{"is-disabled":l.disabled}]]),style:e.normalizeStyle(e.unref(o)),disabled:l.disabled},[e.renderSlot(l.$slots,"default",{},void 0,!0)],14,Pt)}}}),[["__scopeId","data-v-eeff7101"]]),$e=D(e.defineComponent({__name:"FTypography",props:{color:{default:""}},setup(s){const t=s,n=e.computed(()=>({color:t.color}));return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"f-typography",style:e.normalizeStyle(e.unref(n))},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-50e044db"]]),Ce=D(e.defineComponent({__name:"FText",props:{tag:{default:"span"},heading:{},size:{default:"normal"},weight:{default:"normal"},color:{},truncate:{type:Boolean},italic:{type:Boolean}},setup(s){const t=s,n={1:"3xl",2:"2xl",3:"xl",4:"lg",5:"normal",6:"sm"},o={1:"bolder",2:"bold",3:"bold",4:"medium",5:"medium",6:"normal"},l=e.computed(()=>{var i;return t.heading?`h${t.heading}`:(i=t.tag)!=null?i:"span"}),r=e.computed(()=>{var i;return(i=t.size)!=null?i:t.heading?n[t.heading]:"normal"}),d=e.computed(()=>{var i;return(i=t.weight)!=null?i:t.heading?o[t.heading]:"normal"});return(i,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l)),{class:e.normalizeClass(["f-text",[`f-text--${e.unref(r)}`,`f-text--${e.unref(d)}`,i.color&&`f-text--${i.color}`,{"f-text--truncate":i.truncate,"f-text--italic":i.italic}]])},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-8bcfc6b3"]]),Ht=["href","target","rel"],Ee=D(e.defineComponent({__name:"FLink",props:{href:{},target:{default:"_self"},underline:{default:"hover"},color:{},disabled:{type:Boolean}},setup(s){const t=s;return(n,o)=>(e.openBlock(),e.createElementBlock("a",{class:e.normalizeClass(["f-link",[t.color&&`f-link--${t.color}`,`f-link--underline-${t.underline}`,{"f-link--disabled":t.disabled}]]),href:t.disabled?void 0:t.href,target:t.target,rel:t.target==="_blank"?"noopener noreferrer":void 0},[e.renderSlot(n.$slots,"default",{},void 0,!0)],10,Ht))}}),[["__scopeId","data-v-daaa3e25"]]),jt={class:"f-badge"},we=D(e.defineComponent({__name:"FBadge",props:{value:{},max:{default:99},dot:{type:Boolean,default:!1},type:{default:"danger"},placement:{default:"top-right"},offset:{default:()=>[0,0]}},setup(s){const t=s,n=e.computed(()=>{var l;return t.dot?"":typeof t.value=="number"&&t.value>t.max?`${t.max}+`:(l=t.value)!=null?l:""}),o=e.computed(()=>{const[l,r]=t.offset;return{"top-right":{top:0,right:0,transform:`translate(calc(50% + ${l}px), calc(-50% + ${r}px))`},"top-left":{top:0,left:0,transform:`translate(calc(-50% + ${l}px), calc(-50% + ${r}px))`},"bottom-right":{bottom:0,right:0,transform:`translate(calc(50% + ${l}px), calc(50% + ${r}px))`},"bottom-left":{bottom:0,left:0,transform:`translate(calc(-50% + ${l}px), calc(50% + ${r}px))`}}[t.placement]});return(l,r)=>(e.openBlock(),e.createElementBlock("div",jt,[e.renderSlot(l.$slots,"default",{},void 0,!0),l.dot||l.value!==void 0&&l.value!==""?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["f-badge__content",[`f-badge--${l.type}`,{"f-badge--dot":l.dot}]]),style:e.normalizeStyle(e.unref(o))},e.toDisplayString(e.unref(n)),7)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-be6947ff"]]),Ve=D(e.defineComponent({__name:"FAffix",props:{placement:{default:"top-right"},offset:{default:()=>[8,8]}},setup(s){const t=s,n=e.computed(()=>{const[o,l]=t.offset;return{"top-left":{top:`${l}px`,left:`${o}px`},"top-right":{top:`${l}px`,right:`${o}px`},"bottom-left":{bottom:`${l}px`,left:`${o}px`},"bottom-right":{bottom:`${l}px`,right:`${o}px`}}[t.placement]});return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"f-affix",style:e.normalizeStyle(e.unref(n))},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-8506d679"]]),Se=D(e.defineComponent({__name:"FForm",props:{model:{},rules:{default:()=>({})},labelWidth:{default:"80px"},labelPosition:{default:"right"},size:{default:"normal"}},setup(s,{expose:t}){const n=s,o=e.ref([]),l=a=>{o.value.push(a)},r=a=>{o.value=o.value.filter(b=>b.prop!==a)};return e.provide("FFormContext",{model:n.model,rules:n.rules,labelWidth:n.labelWidth,labelPosition:e.computed(()=>n.labelPosition),size:e.computed(()=>n.size),registerField:l,unregisterField:r}),t({validate:()=>G(null,null,function*(){const a=o.value.map(u=>u.validate());if((yield Promise.all(a)).filter(u=>u!==void 0).length>0)throw new Error("表单校验失败");return!0}),resetFields:()=>{o.value.forEach(a=>a.clearValidate())}}),(a,b)=>(e.openBlock(),e.createElementBlock("form",{class:e.normalizeClass(["f-form",[`f-form--label-${a.labelPosition}`,`f-form--size-${a.size}`]]),onSubmit:b[0]||(b[0]=e.withModifiers(()=>{},["prevent"]))},[e.renderSlot(a.$slots,"default",{},void 0,!0)],34))}}),[["__scopeId","data-v-21f7de9b"]]),Ot=(s,t)=>G(null,null,function*(){const n=Array.isArray(t)?t:[t];for(let o of n){o.transform&&(s=o.transform(s));const l=s==null||s==="",r=o.whitespace&&typeof s=="string"&&s.trim()==="";if(o.required&&(l||r))return o.message||"此字段为必填项";if(!o.required&&l)continue;if(o.type){const i=Wt(s,o);if(i)return i}const d=Ut(s,o);if(d)return d;if(o.pattern&&!o.pattern.test(String(s)))return o.message||"格式不匹配";if(o.enum&&!o.enum.includes(s))return o.message||"不在指定的枚举范围内";if(o.validator){const i=yield Promise.resolve(o.validator(s,o));if(typeof i=="string")return i;if(i===!1)return o.message||"校验失败"}}}),Wt=(s,t)=>{const{type:n,message:o}=t;switch(n){case"string":if(typeof s!="string")return o||"必须是字符串";break;case"number":if(typeof s!="number"||isNaN(s))return o||"必须是数字";break;case"integer":if(!Number.isInteger(s))return o||"必须是整数";break;case"boolean":if(typeof s!="boolean")return o||"必须是布尔值";break;case"array":if(!Array.isArray(s))return o||"必须是数组";break;case"object":if(typeof s!="object"||s===null)return o||"必须是对象";break;case"email":if(!/^[^\s@]+@([^\s@]+\.)+[^\s@]+$/.test(s))return o||"邮箱格式不正确";break;case"regexp":if(t.pattern&&!t.pattern.test(String(s)))return t.message||"格式不匹配";break}},Ut=(s,t)=>{const{min:n,max:o,len:l,message:r,type:d}=t,i=d==="number"||d==="integer"||d==="float",a=i&&typeof s=="number"?s:s==null?void 0:s.length;if(a!==void 0){if(l!==void 0&&a!==l)return r||(i?`值必须等于 ${l}`:`长度必须为 ${l}`);if(n!==void 0&&a<n)return r||(i?`最小值不能小于 ${n}`:`长度不能小于 ${n}`);if(o!==void 0&&a>o)return r||(i?`最大值不能大于 ${o}`:`长度不能大于 ${o}`)}},Yt={key:0,class:"star"},Xt={class:"f-form-item__content"},qt={key:0,class:"f-form-item__error"},Ne=D(e.defineComponent({__name:"FFormItem",props:{label:{},prop:{}},setup(s,{expose:t}){const n=s,o=e.inject("FFormContext"),l=e.ref(""),r=e.computed(()=>{var u;return((u=o==null?void 0:o.labelPosition)==null?void 0:u.value)||"right"}),d=e.computed(()=>{var u;return((u=o==null?void 0:o.size)==null?void 0:u.value)||"default"}),i=e.computed(()=>{if(!(o!=null&&o.rules)||!n.prop)return[];const u=o.rules[n.prop]||[];return Array.isArray(u)?u:[u]}),a=e.computed(()=>i.value.some(u=>u.required)),b=()=>G(null,null,function*(){if(!n.prop||!o)return;const u=o.model[n.prop],p=yield Ot(u,i.value);return l.value=p||"",p}),B=()=>{l.value=""};return e.provide("FFormItemContext",{errorMsg:l,validate:b}),e.onMounted(()=>{n.prop&&(o!=null&&o.registerField)&&o.registerField({prop:n.prop,validate:b,clearValidate:B})}),e.onUnmounted(()=>{n.prop&&(o!=null&&o.unregisterField)&&o.unregisterField(n.prop)}),e.watch(()=>o==null?void 0:o.model[n.prop],()=>{l.value&&b()}),t({validate:b,clearValidate:B}),(u,p)=>{var g;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-form-item",[`is-label-${e.unref(r)}`,`is-size-${e.unref(d)}`,{"is-error":e.unref(l)}]])},[u.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"f-form-item__label",style:e.normalizeStyle({width:e.unref(r)==="top"?"100%":(g=e.unref(o))==null?void 0:g.labelWidth,textAlign:e.unref(r)==="top"?"left":e.unref(r)})},[e.unref(a)?(e.openBlock(),e.createElementBlock("span",Yt,"*")):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(u.label)+": ",1)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",Xt,[e.renderSlot(u.$slots,"default",{},void 0,!0),e.createVNode(e.Transition,{name:"err-slide"},{default:e.withCtx(()=>[e.unref(l)?(e.openBlock(),e.createElementBlock("p",qt,e.toDisplayString(e.unref(l)),1)):e.createCommentVNode("",!0)]),_:1})])],2)}}}),[["__scopeId","data-v-c3d6ec01"]]),Gt={class:"f-checkbox__wrapper"},Kt=["checked","disabled"],Jt={key:0,class:"f-checkbox__label"},Fe=D(e.defineComponent({__name:"FCheckbox",props:e.mergeModels({label:{},disabled:{type:Boolean}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const t=e.useModel(s,"modelValue"),n=s,o=l=>{if(n.disabled)return;const r=l.target;t.value=r.checked};return(l,r)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["f-checkbox",{"is-disabled":l.disabled}])},[e.createElementVNode("span",Gt,[e.createElementVNode("input",{type:"checkbox",checked:t.value,disabled:l.disabled,onChange:o},null,40,Kt),r[0]||(r[0]=e.createElementVNode("span",{class:"f-checkbox__checkmark"},null,-1))]),l.label?(e.openBlock(),e.createElementBlock("span",Jt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-633b283a"]]),Qt={class:"alert__body"},Zt={class:"alert__title"},vt={class:"alert__content"},Me=D(e.defineComponent({__name:"FAlert",props:{type:{default:"info"},title:{},content:{}},setup(s){const t=s,n=e.computed(()=>({success:{icon:x.CheckmarkCircleOutline,label:"Success"},error:{icon:x.AlertCircleOutline,label:"Error"},warning:{icon:x.WarningOutline,label:"Warning"},info:{icon:x.InformationCircleOutline,label:"Tips"}})[t.type]);return(o,l)=>{var r;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["alert",`alert--${o.type}`])},[e.createVNode(j,{class:"alert__icon"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).icon)))]),_:1}),e.createElementVNode("div",Qt,[e.createElementVNode("h4",Zt,e.toDisplayString((r=o.title)!=null?r:e.unref(n).label),1),e.createElementVNode("div",vt,[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(o.content),1)],!0)])])],2)}}}),[["__scopeId","data-v-f16678ef"]]),eo={class:"f-editor__toolbar"},to={class:"f-editor__status"},oo={class:"f-editor__lines"},no={class:"f-editor__code-wrapper"},lo=["innerHTML"],ro=["rows","readonly","placeholder"],ae=17.6,ze=12,ao=180,so=1500,Te=D(e.defineComponent({__name:"FEditor",props:e.mergeModels({placeholder:{},rows:{},language:{},readonly:{type:Boolean},showLine:{type:Boolean},height:{default:420}},{modelValue:{default:""},modelModifiers:{}}),emits:e.mergeModels(["blur"],["update:modelValue"]),setup(s,{emit:t}){const n=e.useModel(s,"modelValue"),o=s,l=t,r=e.ref(),d=e.ref(),i=e.ref(),a=e.ref(0),b=e.ref(1),B=e.ref(0),u=f=>{if(f.key==="Tab"){f.preventDefault();const k=r.value;if(!k)return;const y=k.selectionStart,N=k.selectionEnd;n.value=n.value.slice(0,y)+" "+n.value.slice(N),e.nextTick(()=>{k.selectionStart=k.selectionEnd=y+2});return}if(f.key==="Enter"){const k=r.value;if(!k)return;const y=k.selectionStart,N=n.value.lastIndexOf(`
2
- `,y-1)+1,I=n.value.slice(N,y),T=I.match(/^\s*/),H=T?T[0]:"",P=I.trim().slice(-1),O=P==="{"||P==="["?" ":"";if(O){f.preventDefault();const U=`
3
- `+H+O;n.value=n.value.slice(0,y)+U+n.value.slice(y),e.nextTick(()=>{k.selectionStart=k.selectionEnd=y+U.length})}}},p=o.height,g=e.computed(()=>{const f=ze*2+V.value*ae;return Math.min(p,Math.max(ao,f))}),m=()=>{const f=r.value;f&&(B.value=f.selectionStart,b.value=n.value.slice(0,f.selectionStart).split(`
4
- `).length)},E=e.computed(()=>n.value.split(`
5
- `)),V=e.computed(()=>E.value.length),M=e.computed(()=>V.value>so);let F=null;const R=e.ref(n.value);e.watch(n,f=>{F&&clearTimeout(F);const k=f.length>2e4?120:0;F=setTimeout(()=>{R.value=f},k)},{immediate:!0});const w=e.computed(()=>{if(o.language!=="json"||!R.value.trim())return null;try{return JSON.parse(R.value),null}catch(f){const k=f.message||"",y=k.match(/position (\d+)/);if(y)return parseInt(y[1],10);const N=k.match(/line (\d+) column (\d+)/);if(N){const I=parseInt(N[1],10),T=parseInt(N[2],10),H=R.value.split(`
6
- `);let P=0;for(let O=0;O<I-1;O++)P+=H[O].length+1;return P+T-1}return R.value.length}}),$=e.computed(()=>w.value===null?null:R.value.slice(0,w.value).split(`
7
- `).length),c=e.computed(()=>w.value===null),h=()=>{if(o.language==="json")try{n.value=JSON.stringify(JSON.parse(n.value),null,2)}catch(f){}},S=f=>f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),A=f=>S(f).replace(/("(?:\\.|[^"\\])*")(\s*:)?/g,(y,N,I)=>`<span class="${I?"tok-key":"tok-string"}">${N}</span>${I||""}`).replace(/\b(true|false|null)\b/g,'<span class="tok-keyword">$1</span>').replace(/(-?\b\d+\.?\d*(?:[eE][+-]?\d+)?\b)/g,'<span class="tok-number">$1</span>').replace(/([{}[\],])/g,'<span class="tok-punct">$1</span>'),z=e.computed(()=>{const k=R.value.split(`
8
- `),y=w.value,N=$.value;let I=0;return k.map((T,H)=>{const P=H+1,O=I;I+=T.length+1;let U;if(N===P&&y!==null){const Y=y-O,J=T.slice(0,Math.max(0,Y)),Q=T.slice(Y,Y+1)||" ",Ue=T.slice(Y+1);U=(M.value?S(J):A(J))+`<span class="tok-error">${S(Q)}</span>`+(M.value?S(Ue):A(Ue))}else o.language==="json"&&!M.value?U=A(T):U=S(T);return{lineNo:P,html:U||"&nbsp;"}})}),L=()=>{r.value&&(a.value=r.value.scrollTop,d.value&&(d.value.scrollTop=r.value.scrollTop,d.value.scrollLeft=r.value.scrollLeft),i.value&&(i.value.scrollTop=r.value.scrollTop))},_=()=>{L(),m()};return(f,k)=>{var y;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-editor",{"f-editor--invalid":!e.unref(c)}])},[e.createElementVNode("div",eo,[e.createElementVNode("span",to,[e.createElementVNode("span",oo,e.toDisplayString(e.unref(V))+" 行",1),e.unref(M)?(e.openBlock(),e.createBlock(ne,{key:0,color:"orange",type:"square",effect:"plain"},{default:e.withCtx(()=>k[2]||(k[2]=[e.createTextVNode("大文件模式")])),_:1,__:[2]})):e.createCommentVNode("",!0)]),f.language==="json"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"f-editor__format",onClick:h}," 格式化 ")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"f-editor__body",style:e.normalizeStyle({height:`${e.unref(g)}px`})},[f.showLine?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"gutterRef",ref:i,class:"f-editor__gutter"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(V),N=>(e.openBlock(),e.createElementBlock("div",{key:N,class:e.normalizeClass(["f-editor__gutter-line",{"f-editor__gutter-line--active":N===e.unref(b)}])},e.toDisplayString(N),3))),128))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",no,[e.createElementVNode("div",{class:"f-editor__active-line",style:e.normalizeStyle({top:`${ze+(e.unref(b)-1)*ae-e.unref(a)}px`,height:`${ae}px`})},null,4),e.createElementVNode("pre",{ref_key:"highlightRef",ref:d,class:"f-editor__highlight"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(z),N=>(e.openBlock(),e.createElementBlock("span",{key:N.lineNo,class:"f-editor__line",innerHTML:N.html+`
9
- `},null,8,lo))),128))],512),e.withDirectives(e.createElementVNode("textarea",{ref_key:"textareaRef",ref:r,"onUpdate:modelValue":k[0]||(k[0]=N=>n.value=N),rows:(y=f.rows)!=null?y:8,readonly:"readonly"in f?f.readonly:e.unref(e.readonly),class:"f-editor__textarea",spellcheck:"false",placeholder:f.placeholder,onKeydown:u,onScroll:L,onInput:_,onClick:m,onKeyup:m,onBlur:k[1]||(k[1]=N=>l("blur"))},null,40,ro),[[e.vModelText,n.value]])])],4)],2)}}}),[["__scopeId","data-v-6d590649"]]),co={class:"f-table"},io={key:0,class:"f-table__loading"},fo={class:"f-table__inner"},po={key:0,class:"f-table__col--index"},mo={class:"f-table__head"},ho={key:0,class:"f-table__th f-table__th--index"},uo={class:"f-table__th-inner"},_o={class:"f-table__body"},ko={key:0,class:"f-table__spacer"},go=["colspan"],yo={key:0,class:"f-table__td f-table__td--index"},bo={key:2},Bo=["colspan"],$o={key:3,class:"f-table__spacer"},Co=["colspan"],Ie=D(e.defineComponent({__name:"FTable",props:{data:{},columns:{},rowHeight:{default:40},overscan:{default:5},showIndex:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingText:{default:"加载中..."},emptyText:{default:"暂无数据"}},setup(s){const t=s,n=e.ref(null),o=e.ref(0),l=e.ref(0),r=e.computed(()=>t.columns.length+(t.showIndex?1:0)),d=e.computed(()=>{const m=Math.floor(o.value/t.rowHeight)-t.overscan;return Math.max(0,m)}),i=e.computed(()=>{const m=Math.ceil(l.value/t.rowHeight),E=d.value+m+t.overscan*2;return Math.min(t.data.length-1,E)}),a=e.computed(()=>t.data.slice(d.value,i.value+1).map((m,E)=>({row:m,index:d.value+E}))),b=e.computed(()=>d.value*t.rowHeight),B=e.computed(()=>Math.max(0,(t.data.length-i.value-1)*t.rowHeight)),u=m=>{o.value=m.target.scrollTop},p=m=>m==null?"-":typeof m=="object"?JSON.stringify(m):String(m);let g=null;return e.onMounted(()=>{n.value&&(l.value=n.value.clientHeight,g=new ResizeObserver(([m])=>{m&&(l.value=m.contentRect.height)}),g.observe(n.value))}),e.onBeforeUnmount(()=>{g==null||g.disconnect()}),e.watch(()=>t.data,()=>{n.value&&(n.value.scrollTop=0),o.value=0}),(m,E)=>(e.openBlock(),e.createElementBlock("div",co,[m.loading?(e.openBlock(),e.createElementBlock("div",io,[E[0]||(E[0]=e.createElementVNode("span",{class:"spinner"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(m.loadingText),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"f-table__scroll",ref_key:"scrollEl",ref:n,onScroll:u},[e.createElementVNode("table",fo,[e.createElementVNode("colgroup",null,[m.showIndex?(e.openBlock(),e.createElementBlock("col",po)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.columns,V=>{var M,F;return e.openBlock(),e.createElementBlock("col",{key:V.key,style:e.normalizeStyle({width:(M=V.width)!=null?M:"auto",minWidth:(F=V.minWidth)!=null?F:"120px"})},null,4)}),128))]),e.createElementVNode("thead",mo,[e.createElementVNode("tr",null,[m.showIndex?(e.openBlock(),e.createElementBlock("th",ho,"#")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.columns,V=>(e.openBlock(),e.createElementBlock("th",{key:V.key,class:e.normalizeClass(["f-table__th",V.thClass])},[e.renderSlot(m.$slots,`header-${V.key}`,{column:V},()=>[e.createElementVNode("div",uo,[e.createElementVNode("span",null,e.toDisplayString(V.label),1)])],!0)],2))),128))])]),e.createElementVNode("tbody",_o,[e.unref(b)>0?(e.openBlock(),e.createElementBlock("tr",ko,[e.createElementVNode("td",{colspan:e.unref(r),style:e.normalizeStyle({height:e.unref(b)+"px"})},null,12,go)])):e.createCommentVNode("",!0),e.unref(a).length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(a),({row:V,index:M})=>(e.openBlock(),e.createElementBlock("tr",{key:M,class:"f-table__row"},[m.showIndex?(e.openBlock(),e.createElementBlock("td",yo,e.toDisplayString(M+1),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.columns,F=>(e.openBlock(),e.createElementBlock("td",{key:F.key,class:e.normalizeClass(["f-table__td",F.tdClass])},[m.$slots[`cell-${F.key}`]?e.renderSlot(m.$slots,`cell-${F.key}`,{key:0,row:V,value:V[F.key],index:M,col:F},void 0,!0):m.$slots.cell?e.renderSlot(m.$slots,"cell",{key:1,row:V,value:V[F.key],index:M,col:F},void 0,!0):(e.openBlock(),e.createBlock(le,{key:2,content:p(V[F.key])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p(V[F.key])),1)]),_:2},1032,["content"]))],2))),128))]))),128)):m.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",bo,[e.createElementVNode("td",{colspan:e.unref(r),class:"f-table__empty"},[e.renderSlot(m.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(m.emptyText),1)],!0)],8,Bo)])),e.unref(B)>0?(e.openBlock(),e.createElementBlock("tr",$o,[e.createElementVNode("td",{colspan:e.unref(r),style:e.normalizeStyle({height:e.unref(B)+"px"})},null,12,Co)])):e.createCommentVNode("",!0)])])],544)]))}}),[["__scopeId","data-v-22daf8be"]]),De=D(e.defineComponent({__name:"FDialog",props:e.mergeModels({maskClosable:{type:Boolean,default:!0},maskColor:{default:"black"},showMask:{type:Boolean,default:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const t=s,n=e.useModel(s,"modelValue"),o=()=>{t.maskClosable&&(n.value=!1)},l=e.computed(()=>{if(!t.showMask)return"transparent";switch(t.maskColor){case"white":return"rgba(255, 255, 255, 0.5)";case"black":return"rgba(0, 0, 0, 0.5)";case"transparent":return"transparent";default:return"rgba(0, 0, 0, 0.5)"}});return(r,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"f-dialog-mask",style:e.normalizeStyle({backgroundColor:e.unref(l)}),onClick:o},[e.createElementVNode("div",{class:"f-dialog-container",onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(r.$slots,"default",{},void 0,!0)])],4)):e.createCommentVNode("",!0)]),_:3})]))}}),[["__scopeId","data-v-31496822"]]),Eo={class:"f-upload"},wo={class:"f-upload__label"},Vo=["accept"],So={key:0,class:"f-upload__file-item"},No={class:"f-upload__file-info"},Fo={class:"f-upload__file-name"},xe=D(e.defineComponent({__name:"FUpload",props:e.mergeModels({accept:{},limit:{},progress:{}},{file:{default:""},fileModifiers:{}}),emits:e.mergeModels(["change","exceed"],["update:file"]),setup(s,{emit:t}){const n=e.useModel(s,"file"),o=s,l=t,r=e.ref(!1),d=e.ref(!1),i=()=>{n.value=""},a=p=>{p.preventDefault(),r.value=!0},b=p=>{p.preventDefault(),r.value=!1},B=p=>{var m,E;p.preventDefault(),r.value=!1;const g=(E=(m=p.dataTransfer)==null?void 0:m.files)==null?void 0:E[0];if(g){if(o.limit&&g.size>o.limit){l("exceed",g);return}l("change",g)}},u=p=>{var m;const g=(m=p.target.files)==null?void 0:m[0];if(g){if(o.limit&&g.size>o.limit){l("exceed",g);return}l("change",g)}};return(p,g)=>(e.openBlock(),e.createElementBlock("div",Eo,[e.createElementVNode("div",{class:e.normalizeClass(["f-upload__zone",{"f-upload--drag":e.unref(r)}]),onDragover:a,onDragleave:b,onDrop:B},[e.createElementVNode("label",wo,[e.createElementVNode("input",{type:"file",accept:p.accept,class:"f-upload__input",onChange:u},null,40,Vo),e.renderSlot(p.$slots,"default",{},()=>[e.createVNode(j,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(x.CloudUpload))]),_:1}),g[2]||(g[2]=e.createElementVNode("span",{class:"f-upload__title"},"点击或拖拽文件至此处",-1)),g[3]||(g[3]=e.createElementVNode("span",{class:"f-upload__hint"},"支持 .xlsx .xls .json .txt",-1))],!0)])],34),n.value?(e.openBlock(),e.createElementBlock("div",So,[e.createVNode(j,null,{default:e.withCtx(()=>[e.createVNode(e.unref(x.DocumentOutline))]),_:1}),e.createElementVNode("div",No,[e.createElementVNode("span",Fo,e.toDisplayString(n.value),1),p.progress!=null?(e.openBlock(),e.createBlock(re,{key:0,percent:p.progress,"show-text":""},null,8,["percent"])):e.createCommentVNode("",!0)]),e.createVNode(j,{onClick:e.withModifiers(i,["stop"]),onMouseenter:g[0]||(g[0]=m=>d.value=!0),onMouseleave:g[1]||(g[1]=m=>d.value=!1),style:{cursor:"pointer",transition:"color 0.2s"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(d)?e.unref(x.CloseCircle):e.unref(x.Close))))]),_:1})])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-07b95a32"]]),Le=e.defineComponent({__name:"FButtonGroup",props:{size:{default:"default"},type:{default:"default"},disabled:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1}},setup(s){const t=s,{size:n,type:o,disabled:l}=e.toRefs(t);return e.provide("fButtonGroupContext",e.reactive({size:n,type:o,disabled:l})),(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-button-group",{"f-button-group--vertical":r.vertical}]),role:"group"},[e.renderSlot(r.$slots,"default")],2))}}),Mo={class:"f-collapse"},Re=e.defineComponent({__name:"FCollapse",props:e.mergeModels({accordion:{type:Boolean,default:!1}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const t=s,n=e.useModel(s,"modelValue"),o=e.computed(()=>Array.isArray(n.value)?n.value:n.value===void 0||n.value===null||n.value===""?[]:[n.value]);function l(r){if(t.accordion){n.value=o.value.includes(r)?"":r;return}const d=[...o.value],i=d.indexOf(r);i>-1?d.splice(i,1):d.push(r),n.value=d}return e.provide("fCollapseContext",e.reactive({activeNames:o,handleItemClick:l})),(r,d)=>(e.openBlock(),e.createElementBlock("div",Mo,[e.renderSlot(r.$slots,"default")]))}}),zo={class:"f-collapse-item__header-title"},To={class:"f-collapse-item__wrapper"},Io={class:"f-collapse-item__content"},Ae=e.defineComponent({__name:"FCollapseItem",props:{name:{},title:{default:""},disabled:{type:Boolean,default:!1}},setup(s){const t=s,n=e.inject("fCollapseContext"),o=e.computed(()=>!!(n!=null&&n.activeNames.includes(t.name)));function l(){t.disabled||n==null||n.handleItemClick(t.name)}function r(a){const b=a;b.style.height="0px",requestAnimationFrame(()=>{b.style.height=`${b.scrollHeight}px`})}function d(a){a.style.height="auto"}function i(a){const b=a;b.style.height=`${b.scrollHeight}px`,requestAnimationFrame(()=>{b.style.height="0px"})}return(a,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-collapse-item",{"f-collapse-item--active":e.unref(o),"f-collapse-item--disabled":a.disabled}])},[e.createElementVNode("div",{class:"f-collapse-item__header",onClick:l},[e.renderSlot(a.$slots,"title",{},()=>[e.createElementVNode("span",zo,e.toDisplayString(a.title),1)]),b[0]||(b[0]=e.createElementVNode("svg",{class:"f-collapse-item__icon",viewBox:"0 0 12 12",width:"12",height:"12"},[e.createElementVNode("path",{d:"M2 4l4 4 4-4",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})],-1))]),e.createVNode(e.Transition,{onEnter:r,onAfterEnter:d,onLeave:i},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",To,[e.createElementVNode("div",Io,[e.renderSlot(a.$slots,"default")])],512),[[e.vShow,e.unref(o)]])]),_:3})],2))}}),Do={class:"f-color-picker__swatch"},xo={key:0,class:"f-color-picker__panel"},Lo={class:"f-color-picker__sliders"},Ro={class:"f-color-picker__slider-group"},Ao=["value"],Po={key:0,class:"f-color-picker__predefine"},Ho=["onClick"],jo="linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)",Pe=e.defineComponent({__name:"FColorPicker",props:e.mergeModels({showAlpha:{type:Boolean,default:!1},predefine:{default:()=>[]},size:{default:"default"},disabled:{type:Boolean,default:!1}},{modelValue:{default:"#409eff"},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const t=s,n=e.useModel(s,"modelValue");function o(_,f,k){f/=100,k/=100;const y=k*f,N=y*(1-Math.abs(_/60%2-1)),I=k-y;let T=0,H=0,P=0;return _<60?[T,H,P]=[y,N,0]:_<120?[T,H,P]=[N,y,0]:_<180?[T,H,P]=[0,y,N]:_<240?[T,H,P]=[0,N,y]:_<300?[T,H,P]=[N,0,y]:[T,H,P]=[y,0,N],{r:Math.round((T+I)*255),g:Math.round((H+I)*255),b:Math.round((P+I)*255)}}function l(_,f,k){_/=255,f/=255,k/=255;const y=Math.max(_,f,k),N=Math.min(_,f,k),I=y-N;let T=0;I!==0&&(y===_?T=60*((f-k)/I%6):y===f?T=60*((k-_)/I+2):T=60*((_-f)/I+4)),T<0&&(T+=360);const H=y===0?0:I/y;return{h:T,s:H*100,v:y*100}}function r(_,f,k){return`#${[_,f,k].map(y=>y.toString(16).padStart(2,"0")).join("")}`}function d(_){const f=_.trim(),k=f.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(k){let N=k[1];N.length===3&&(N=N.split("").map(O=>O+O).join(""));const I=parseInt(N.slice(0,2),16),T=parseInt(N.slice(2,4),16),H=parseInt(N.slice(4,6),16),P=N.length===8?parseInt(N.slice(6,8),16)/255:1;return v(Z({},l(I,T,H)),{a:P})}const y=f.match(/^rgba?\(([^)]+)\)$/i);if(y){const[N,I,T,H=1]=y[1].split(",").map(P=>parseFloat(P.trim()));return v(Z({},l(N,I,T)),{a:H})}return null}const i=e.reactive({h:0,s:0,v:100,a:1});let a=!1;e.watch(n,_=>{if(a){a=!1;return}const f=d(_);f&&(i.h=f.h,i.s=f.s,i.v=f.v,i.a=f.a)},{immediate:!0});function b(){return o(i.h,i.s,i.v)}function B(){const{r:_,g:f,b:k}=b();return t.showAlpha?`rgba(${_}, ${f}, ${k}, ${Math.round(i.a*100)/100})`:r(_,f,k)}function u(){a=!0,n.value=B()}const p=e.computed(()=>b()),g=e.ref(!1),m=e.ref(null);function E(_){m.value&&!m.value.contains(_.target)&&(g.value=!1)}e.watch(g,_=>{_?e.nextTick(()=>document.addEventListener("mousedown",E)):document.removeEventListener("mousedown",E)}),e.onBeforeUnmount(()=>document.removeEventListener("mousedown",E));function V(){t.disabled||(g.value=!g.value)}function M(_,f,k){const y=_.getBoundingClientRect();f(k.clientX,k.clientY,y);function N(T){f(T.clientX,T.clientY,y)}function I(){document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",I)}document.addEventListener("mousemove",N),document.addEventListener("mouseup",I)}function F(_,f,k){return Math.min(Math.max(_,f),k)}const R=e.ref(null);function w(_){R.value&&M(R.value,(f,k,y)=>{const N=F(f-y.left,0,y.width),I=F(k-y.top,0,y.height);i.s=N/y.width*100,i.v=100-I/y.height*100,u()},_)}const $=e.ref(null);function c(_){$.value&&M($.value,(f,k,y)=>{const N=F(f-y.left,0,y.width);i.h=N/y.width*360,u()},_)}const h=e.ref(null);function S(_){h.value&&M(h.value,(f,k,y)=>{const N=F(f-y.left,0,y.width);i.a=N/y.width,u()},_)}function A(_){const f=_.trim();return/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(f)||/^rgba?\([^)]+\)$/i.test(f)?d(f):null}function z(_){const f=_.target,k=A(f.value);k?(i.h=k.h,i.s=k.s,i.v=k.v,i.a=k.a,u()):f.value=B()}function L(_){const f=d(_);f&&(i.h=f.h,i.s=f.s,i.v=f.v,i.a=f.a,u())}return(_,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:m,class:e.normalizeClass(["f-color-picker",[`f-color-picker--${_.size}`,{"f-color-picker--disabled":_.disabled}]])},[e.createElementVNode("div",{class:"f-color-picker__trigger",onClick:V},[e.createElementVNode("div",Do,[e.createElementVNode("span",{class:"f-color-picker__swatch-color",style:e.normalizeStyle({background:`rgba(${e.unref(p).r}, ${e.unref(p).g}, ${e.unref(p).b}, ${e.unref(i).a})`})},null,4)])]),e.createVNode(e.Transition,{name:"f-color-picker-fade"},{default:e.withCtx(()=>[e.unref(g)?(e.openBlock(),e.createElementBlock("div",xo,[e.createElementVNode("div",{ref_key:"panelRef",ref:R,class:"f-color-picker__saturation",style:e.normalizeStyle({backgroundColor:`hsl(${e.unref(i).h}, 100%, 50%)`}),onMousedown:w},[e.createElementVNode("div",{class:"f-color-picker__saturation-thumb",style:e.normalizeStyle({left:`${e.unref(i).s}%`,top:`${100-e.unref(i).v}%`})},null,4)],36),e.createElementVNode("div",Lo,[e.createElementVNode("div",Ro,[e.createElementVNode("div",{ref_key:"hueRef",ref:$,class:"f-color-picker__hue",style:e.normalizeStyle({backgroundImage:jo}),onMousedown:c},[e.createElementVNode("div",{class:"f-color-picker__slider-thumb",style:e.normalizeStyle({left:`${e.unref(i).h/360*100}%`})},null,4)],36),_.showAlpha?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"alphaRef",ref:h,class:"f-color-picker__alpha",onMousedown:S},[e.createElementVNode("div",{class:"f-color-picker__alpha-gradient",style:e.normalizeStyle({backgroundImage:`linear-gradient(to right, transparent, rgb(${e.unref(p).r}, ${e.unref(p).g}, ${e.unref(p).b}))`})},null,4),e.createElementVNode("div",{class:"f-color-picker__slider-thumb",style:e.normalizeStyle({left:`${e.unref(i).a*100}%`})},null,4)],544)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"f-color-picker__current",style:e.normalizeStyle({background:`rgba(${e.unref(p).r}, ${e.unref(p).g}, ${e.unref(p).b}, ${e.unref(i).a})`})},null,4)]),e.createElementVNode("input",{class:"f-color-picker__input",type:"text",value:B(),onChange:z,onKeydown:f[0]||(f[0]=e.withKeys(k=>k.target.blur(),["enter"]))},null,40,Ao),_.predefine.length?(e.openBlock(),e.createElementBlock("div",Po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.predefine,k=>(e.openBlock(),e.createElementBlock("span",{key:k,class:"f-color-picker__predefine-item",style:e.normalizeStyle({background:k}),onClick:y=>L(k)},null,12,Ho))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})],2))}}),Oo={class:"f-empty"},Wo=["src"],Uo={key:1,viewBox:"0 0 160 160",class:"f-empty__image-default"},Yo={class:"f-empty__description"},Xo={key:0,class:"f-empty__extra"},He=e.defineComponent({__name:"FEmpty",props:{description:{default:"暂无数据"},image:{default:""},imageSize:{default:120}},setup(s){return(t,n)=>(e.openBlock(),e.createElementBlock("div",Oo,[e.createElementVNode("div",{class:"f-empty__image",style:e.normalizeStyle({width:`${t.imageSize}px`,height:`${t.imageSize}px`})},[e.renderSlot(t.$slots,"image",{},()=>[t.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.image,class:"f-empty__image-img",alt:""},null,8,Wo)):(e.openBlock(),e.createElementBlock("svg",Uo,n[0]||(n[0]=[e.createStaticVNode('<ellipse cx="80" cy="132" rx="46" ry="8" fill="currentColor" opacity="0.08"></ellipse><path d="M40 60 L120 60 L128 128 L32 128 Z" fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round" opacity="0.35"></path><path d="M40 60 L58 32 L102 32 L120 60" fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round" opacity="0.35"></path><line x1="32" y1="88" x2="128" y2="88" stroke="currentColor" stroke-width="3" opacity="0.35"></line><path d="M64 88 Q80 106 96 88" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" opacity="0.5"></path>',5)])))])],4),e.createElementVNode("div",Yo,[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])]),t.$slots.default?(e.openBlock(),e.createElementBlock("div",Xo,[e.renderSlot(t.$slots,"default")])):e.createCommentVNode("",!0)]))}}),qo={class:"f-slider__mark-label"},Go=["aria-valuemin","aria-valuemax","aria-valuenow","onMousedown","onKeydown","onMouseenter"],Ko={key:0,class:"f-slider__tooltip"},je=e.defineComponent({__name:"FSlider",props:e.mergeModels({min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0},marks:{default:()=>({})},size:{default:"default"}},{modelValue:{default:0},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const t=s,n=e.useModel(s,"modelValue"),o=e.reactive(t.range?[t.min,t.max]:[t.min]);let l=!1;e.watch(n,$=>{if(l){l=!1;return}t.range&&Array.isArray($)?(o[0]=$[0],o[1]=$[1]):!t.range&&typeof $=="number"&&(o[0]=$)},{immediate:!0});function r(){l=!0,n.value=t.range?[o[0],o[1]]:o[0]}const d=e.computed(()=>{const $=String(t.step),c=$.indexOf(".");return c===-1?0:$.length-c-1});function i($){const c=Math.min(Math.max($,t.min),t.max),h=Math.round((c-t.min)/t.step)*t.step+t.min,S=Number(h.toFixed(d.value));return Math.min(Math.max(S,t.min),t.max)}function a($){return t.max===t.min?0:($-t.min)/(t.max-t.min)*100}function b($){return i(t.min+$/100*(t.max-t.min))}const B=e.ref(null),u=e.ref(null),p=e.ref(null);function g($,c,h){return t.vertical?100-Math.min(Math.max(c-h.top,0),h.height)/h.height*100:Math.min(Math.max($-h.left,0),h.width)/h.width*100}function m($,c){if(t.disabled)return;c.preventDefault(),c.stopPropagation();const h=B.value;if(!h)return;const S=h.getBoundingClientRect();u.value=$;function A(_,f){const k=g(_,f,S);let y=b(k);t.range&&($===0?y=Math.min(y,o[1]):y=Math.max(y,o[0])),o[$]!==y&&(o[$]=y,r())}A(c.clientX,c.clientY);function z(_){A(_.clientX,_.clientY)}function L(){u.value=null,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",L)}document.addEventListener("mousemove",z),document.addEventListener("mouseup",L)}function E($){if(t.disabled||!B.value||$.target.closest(".f-slider__thumb"))return;const c=B.value.getBoundingClientRect(),h=g($.clientX,$.clientY,c),S=b(h),A=t.range?Math.abs(S-o[0])<=Math.abs(S-o[1])?0:1:0;o[A]=S,r()}function V($,c){if(t.disabled)return;const h=t.vertical?{inc:"ArrowUp",dec:"ArrowDown"}:{inc:"ArrowRight",dec:"ArrowLeft"};let S=o[$];if(c.key===h.inc)S+=t.step;else if(c.key===h.dec)S-=t.step;else if(c.key==="Home")S=t.min;else if(c.key==="End")S=t.max;else return;c.preventDefault(),S=i(S),t.range&&(S=$===0?Math.min(S,o[1]):Math.max(S,o[0])),o[$]=S,r()}const M=e.computed(()=>{if(t.range){const c=a(o[0]),h=a(o[1]);return t.vertical?{bottom:`${c}%`,height:`${h-c}%`}:{left:`${c}%`,width:`${h-c}%`}}const $=a(o[0]);return t.vertical?{bottom:"0%",height:`${$}%`}:{left:"0%",width:`${$}%`}});function F($){const c=a(o[$]);return t.vertical?{bottom:`${c}%`}:{left:`${c}%`}}const R=e.computed(()=>Object.entries(t.marks).map(([$,c])=>({value:Number($),label:c,percent:a(Number($))})));function w($){return t.showTooltip&&(u.value===$||p.value===$)}return($,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-slider",[`f-slider--${$.size}`,{"f-slider--vertical":$.vertical,"f-slider--disabled":$.disabled,"f-slider--with-marks":e.unref(R).length}]])},[e.createElementVNode("div",{ref_key:"trackRef",ref:B,class:"f-slider__track",onMousedown:E},[e.createElementVNode("div",{class:"f-slider__bar",style:e.normalizeStyle(e.unref(M))},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(R),h=>(e.openBlock(),e.createElementBlock("span",{key:h.value,class:"f-slider__mark",style:e.normalizeStyle($.vertical?{bottom:`${h.percent}%`}:{left:`${h.percent}%`})},[c[1]||(c[1]=e.createElementVNode("span",{class:"f-slider__mark-dot"},null,-1)),e.createElementVNode("span",qo,e.toDisplayString(h.label),1)],4))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(h,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:e.normalizeClass(["f-slider__thumb",{"f-slider__thumb--active":e.unref(u)===S}]),style:e.normalizeStyle(F(S)),tabindex:"0",role:"slider","aria-valuemin":$.min,"aria-valuemax":$.max,"aria-valuenow":h,onMousedown:A=>m(S,A),onKeydown:A=>V(S,A),onMouseenter:A=>p.value=S,onMouseleave:c[0]||(c[0]=A=>p.value=null)},[e.createVNode(e.Transition,{name:"f-slider-tooltip-fade"},{default:e.withCtx(()=>[w(S)?(e.openBlock(),e.createElementBlock("div",Ko,e.toDisplayString(h),1)):e.createCommentVNode("",!0)]),_:2},1024)],46,Go))),128))],544)],2))}}),Oe=e.defineComponent({__name:"FScrollbar",props:{height:{default:""},maxHeight:{default:""},native:{type:Boolean,default:!1},always:{type:Boolean,default:!1},minSize:{default:20},vertical:{type:Boolean,default:!0},horizontal:{type:Boolean,default:!0}},emits:["scroll"],setup(s,{expose:t,emit:n}){const o=s,l=n,r=e.ref(null),d=e.ref(null),i=e.ref(null),a=e.ref(null),b=e.ref(1),B=e.ref(1),u=e.ref(0),p=e.ref(0),g=e.ref(!1),m=e.ref(!1);let E=null,V=null;const M=e.computed(()=>({height:o.height||void 0,maxHeight:o.maxHeight||void 0}));function F(){const z=r.value;if(!z)return;const{clientHeight:L,scrollHeight:_,clientWidth:f,scrollWidth:k,scrollTop:y,scrollLeft:N}=z;b.value=_>0?Math.min(L/_,1):1,B.value=k>0?Math.min(f/k,1):1;const I=_-L,T=k-f;u.value=I>0?y/I*(1-b.value)*100:0,p.value=T>0?N/T*(1-B.value)*100:0}function R(){F(),g.value||$();const z=r.value;z&&l("scroll",{scrollTop:z.scrollTop,scrollLeft:z.scrollLeft})}let w=null;function $(){m.value=!0,w&&clearTimeout(w),w=setTimeout(()=>{g.value||(m.value=!1)},800)}function c(z,L){L.preventDefault(),L.stopPropagation();const _=r.value;if(!_)return;g.value=!0,m.value=!0;const f=z==="y"?L.clientY:L.clientX,k=z==="y"?_.scrollTop:_.scrollLeft,y=z==="y"?_.clientHeight:_.clientWidth,N=z==="y"?_.scrollHeight:_.scrollWidth,I=z==="y"?b.value:B.value;function T(P){const U=(z==="y"?P.clientY:P.clientX)-f,Y=I>0?U/I:0,J=N-y,Q=Math.min(Math.max(k+Y,0),J);z==="y"?_.scrollTop=Q:_.scrollLeft=Q}function H(){g.value=!1,$(),document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",H)}document.addEventListener("mousemove",T),document.addEventListener("mouseup",H)}function h(z,L){const _=r.value;_&&(typeof z=="number"?_.scrollTo(z,L!=null?L:_.scrollTop):_.scrollTo(z))}function S(z){r.value&&(r.value.scrollTop=z)}function A(z){r.value&&(r.value.scrollLeft=z)}return t({scrollTo:h,setScrollTop:S,setScrollLeft:A,update:F,wrapRef:r}),e.onMounted(()=>{o.native||e.nextTick(()=>{F(),r.value&&(E=new ResizeObserver(()=>F()),E.observe(r.value)),d.value&&(V=new ResizeObserver(()=>F()),V.observe(d.value))})}),e.onBeforeUnmount(()=>{E==null||E.disconnect(),V==null||V.disconnect(),w&&clearTimeout(w)}),e.watch(()=>[o.height,o.maxHeight],()=>e.nextTick(F)),(z,L)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-scrollbar",{"f-scrollbar--native":z.native}]),onMouseenter:L[2]||(L[2]=_=>!z.native&&$())},[e.createElementVNode("div",{ref_key:"wrapRef",ref:r,class:e.normalizeClass(["f-scrollbar__wrap",{"f-scrollbar__wrap--hidden-bar":!z.native}]),style:e.normalizeStyle(e.unref(M)),onScroll:R},[e.createElementVNode("div",{ref_key:"resizeRef",ref:d,class:"f-scrollbar__view"},[e.renderSlot(z.$slots,"default")],512)],38),z.native?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[z.vertical&&e.unref(b)<1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["f-scrollbar__bar f-scrollbar__bar--vertical",{"f-scrollbar__bar--visible":z.always||e.unref(m)||e.unref(g)}])},[e.createElementVNode("div",{ref_key:"thumbYRef",ref:i,class:"f-scrollbar__thumb",style:e.normalizeStyle({height:`${e.unref(b)*100}%`,top:`${e.unref(u)}%`}),onMousedown:L[0]||(L[0]=_=>c("y",_))},null,36)],2)):e.createCommentVNode("",!0),z.horizontal&&e.unref(B)<1?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["f-scrollbar__bar f-scrollbar__bar--horizontal",{"f-scrollbar__bar--visible":z.always||e.unref(m)||e.unref(g)}])},[e.createElementVNode("div",{ref_key:"thumbXRef",ref:a,class:"f-scrollbar__thumb",style:e.normalizeStyle({width:`${e.unref(B)*100}%`,left:`${e.unref(p)}%`}),onMousedown:L[1]||(L[1]=_=>c("x",_))},null,36)],2)):e.createCommentVNode("",!0)],64))],34))}}),Jo=["disabled"],Qo=["value","disabled","placeholder"],Zo=["disabled"],vo={key:2,class:"f-input-number__stack"},en=["disabled"],tn=["disabled"],We=e.defineComponent({__name:"FInputNumber",props:e.mergeModels({min:{default:-1/0},max:{default:1/0},step:{default:1},precision:{default:void 0},disabled:{type:Boolean,default:!1},size:{default:"default"},controls:{type:Boolean,default:!0},controlsPosition:{default:"right"},placeholder:{default:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const t=s,n=e.useModel(s,"modelValue"),o=e.ref(null),l=e.ref(!1),r=e.ref("");function d(c){return t.precision!==void 0?c.toFixed(t.precision):String(c)}function i(c){let h=Math.min(Math.max(c,t.min),t.max);return t.precision!==void 0&&(h=Number(h.toFixed(t.precision))),h}e.watch(n,c=>{l.value||(r.value=c==null||Number.isNaN(c)?"":d(c))},{immediate:!0});const a=e.computed(()=>n.value===void 0||n.value<t.max),b=e.computed(()=>n.value===void 0||n.value>t.min);function B(c){if(c.trim()===""){n.value=void 0,r.value="";return}const h=Number(c);if(Number.isNaN(h)){r.value=n.value===void 0?"":d(n.value);return}const S=i(h);n.value=S,r.value=d(S)}function u(c){const h=c.target.value;(h===""||h==="-"||/^-?\d*\.?\d*$/.test(h))&&(r.value=h)}function p(){l.value=!0}function g(){l.value=!1,B(r.value)}function m(){var c;(c=o.value)==null||c.blur()}function E(c){var A;if(t.disabled)return;const h=(A=n.value)!=null?A:0,S=i(h+c*t.step);n.value=S,r.value=d(S)}let V=null,M=null;function F(c){t.disabled||(E(c),V=setTimeout(()=>{M=setInterval(()=>E(c),80)},400))}function R(){V&&clearTimeout(V),M&&clearInterval(M),V=null,M=null}function w(c){c.key==="ArrowUp"?(c.preventDefault(),E(1)):c.key==="ArrowDown"?(c.preventDefault(),E(-1)):c.key==="Enter"&&m()}function $(c){!l.value||t.disabled||(c.preventDefault(),E(c.deltaY<0?1:-1))}return(c,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["f-input-number",[`f-input-number--${c.size}`,`f-input-number--controls-${c.controlsPosition}`,{"f-input-number--disabled":c.disabled,"f-input-number--without-controls":!c.controls}]])},[c.controls&&c.controlsPosition==="both"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"f-input-number__control f-input-number__control--minus",tabindex:"-1",disabled:c.disabled||!e.unref(b),onMousedown:h[0]||(h[0]=e.withModifiers(S=>F(-1),["prevent"])),onMouseup:R,onMouseleave:R},h[4]||(h[4]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",width:"10",height:"10"},[e.createElementVNode("path",{d:"M2 6h8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)]),40,Jo)):e.createCommentVNode("",!0),e.createElementVNode("input",{ref_key:"inputRef",ref:o,class:"f-input-number__inner",type:"text",inputmode:"decimal",value:e.unref(r),disabled:c.disabled,placeholder:c.placeholder,onInput:u,onFocus:p,onBlur:g,onKeydown:w,onWheel:$},null,40,Qo),c.controls&&c.controlsPosition==="both"?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"f-input-number__control f-input-number__control--plus",tabindex:"-1",disabled:c.disabled||!e.unref(a),onMousedown:h[1]||(h[1]=e.withModifiers(S=>F(1),["prevent"])),onMouseup:R,onMouseleave:R},h[5]||(h[5]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",width:"10",height:"10"},[e.createElementVNode("path",{d:"M2 6h8M6 2v8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)]),40,Zo)):e.createCommentVNode("",!0),c.controls&&c.controlsPosition==="right"?(e.openBlock(),e.createElementBlock("div",vo,[e.createElementVNode("button",{type:"button",class:"f-input-number__stack-btn",tabindex:"-1",disabled:c.disabled||!e.unref(a),onMousedown:h[2]||(h[2]=e.withModifiers(S=>F(1),["prevent"])),onMouseup:R,onMouseleave:R},h[6]||(h[6]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",width:"8",height:"8"},[e.createElementVNode("path",{d:"M2 7l4-4 4 4",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),40,en),e.createElementVNode("button",{type:"button",class:"f-input-number__stack-btn",tabindex:"-1",disabled:c.disabled||!e.unref(b),onMousedown:h[3]||(h[3]=e.withModifiers(S=>F(-1),["prevent"])),onMouseup:R,onMouseleave:R},h[7]||(h[7]=[e.createElementVNode("svg",{viewBox:"0 0 12 12",width:"8",height:"8"},[e.createElementVNode("path",{d:"M2 5l4 4 4-4",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),40,tn)])):e.createCommentVNode("",!0)],2))}}),on=Object.freeze(Object.defineProperty({__proto__:null,FAffix:Ve,FAlert:Me,FAvatar:be,FBadge:we,FBreadcrumb:he,FButton:Be,FButtonGroup:Le,FCard:pe,FCheckbox:Fe,FCol:ue,FCollapse:Re,FCollapseItem:Ae,FColorPicker:Pe,FContainer:ge,FDialog:De,FDivider:ye,FDropdown:oe,FEditor:Te,FEmpty:He,FForm:Se,FFormItem:Ne,FIcon:j,FImage:se,FInput:ce,FInputNumber:We,FLink:Ee,FLoading:te,FPagination:fe,FProgress:re,FRate:ie,FRow:_e,FScrollbar:Oe,FSelect:de,FSlider:je,FSpace:ke,FTable:Ie,FTabs:me,FTag:ne,FText:Ce,FTooltip:le,FTypography:$e,FUpload:xe},Symbol.toStringTag,{value:"Module"})),nn=s=>{Object.entries(on).forEach(([t,n])=>{s.component(t,n)})};C.FAffix=Ve,C.FAlert=Me,C.FAvatar=be,C.FBadge=we,C.FBreadcrumb=he,C.FButton=Be,C.FButtonGroup=Le,C.FCard=pe,C.FCheckbox=Fe,C.FCol=ue,C.FCollapse=Re,C.FCollapseItem=Ae,C.FColorPicker=Pe,C.FContainer=ge,C.FDialog=De,C.FDivider=ye,C.FDropdown=oe,C.FEditor=Te,C.FEmpty=He,C.FForm=Se,C.FFormItem=Ne,C.FIcon=j,C.FImage=se,C.FInput=ce,C.FInputNumber=We,C.FLink=Ee,C.FLoading=te,C.FPagination=fe,C.FProgress=re,C.FRate=ie,C.FRow=_e,C.FScrollbar=Oe,C.FSelect=de,C.FSlider=je,C.FSpace=ke,C.FTable=Ie,C.FTabs=me,C.FTag=ne,C.FText=Ce,C.FTooltip=le,C.FTypography=$e,C.FUpload=xe,C.default=nn,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(global, factory) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("@vicons/ionicons5"), require("@vueuse/core")) : typeof define === "function" && define.amd ? define(["exports", "vue", "@vicons/ionicons5", "@vueuse/core"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.FantasiaUI = {}, global.Vue, global.IconsIonicons5, global.VueUse));
3
+ })(this, function(exports2, vue, ionicons5, core) {
4
+ "use strict";var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __async = (__this, __arguments, generator) => {
24
+ return new Promise((resolve, reject) => {
25
+ var fulfilled = (value) => {
26
+ try {
27
+ step(generator.next(value));
28
+ } catch (e) {
29
+ reject(e);
30
+ }
31
+ };
32
+ var rejected = (value) => {
33
+ try {
34
+ step(generator.throw(value));
35
+ } catch (e) {
36
+ reject(e);
37
+ }
38
+ };
39
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
40
+ step((generator = generator.apply(__this, __arguments)).next());
41
+ });
42
+ };
43
+
44
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
45
+ __name: "FIcon",
46
+ props: {
47
+ color: {},
48
+ size: { default: "1em" }
49
+ },
50
+ setup(__props) {
51
+ const props = __props;
52
+ const style = vue.computed(() => ({
53
+ width: typeof props.size === "number" ? `${props.size}px` : props.size,
54
+ height: typeof props.size === "number" ? `${props.size}px` : props.size,
55
+ color: props.color
56
+ }));
57
+ return (_ctx, _cache) => {
58
+ return vue.openBlock(), vue.createElementBlock("span", {
59
+ role: "img",
60
+ class: "f-icon",
61
+ style: vue.normalizeStyle(vue.unref(style))
62
+ }, [
63
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
64
+ ], 4);
65
+ };
66
+ }
67
+ });
68
+ const _export_sfc = (sfc, props) => {
69
+ const target = sfc.__vccOpts || sfc;
70
+ for (const [key, val] of props) {
71
+ target[key] = val;
72
+ }
73
+ return target;
74
+ };
75
+ const FIcon = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-baf7de0c"]]);
76
+ const PictureError = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1780285609860'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12961'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M894.4%20281.504a39.36%2039.36%200%200%200-27.104-11.808l-293.888-10.976-22.016%2046.88%2030.592%2087.2-55.2%2099.008%2022.4%2079.904%2056%2068.48%2081.024-70.496c7.808-6.88%2020.288-6.496%2027.104%201.216l103.904%20106.4c7.296%207.296%206.88%2019.2-0.928%2026.112a18.944%2018.944%200%200%201-13.76%204.896l-284.8-10.624-14.24%2038.72%2015.52%2034.592%20327.488%2011.808c21.504%200.8%2039.616-15.104%2040.096-35.52l18.208-439.296a34.368%2034.368%200%200%200-10.4-26.496zM684.096%20483.2c-32.32-1.184-57.28-26.88-56-57.088%201.28-30.592%2028.416-54.208%2060.288-52.992%2031.904%201.184%2057.312%2026.88%2056%2057.088-1.184%2030.208-28.384%2054.304-60.288%2052.992z%20m-211.104%20253.6l9.92-40.8-231.424%2015.104c-10.784%200.8-19.776-6.496-20.672-16.704a17.856%2017.856%200%200%201%204.672-13.504l171.52-186.272a18.048%2018.048%200%200%201%2014.208-6.112c5.184%200%2010.272%201.984%2014.176%205.696l57.28%2056.704-24.576-60.32%2044-104.288L472%20302.72l16.384-48.096-315.392%2020.8c-21.504%201.184-37.504%2018.784-36.192%2039.072l31.904%20439.424c0.384%209.792%205.184%2018.688%2013.408%2024.896%207.776%206.496%2017.696%209.792%2028%208.992l281.792-18.304-18.88-32.704z'%20p-id='12962'%3e%3c/path%3e%3c/svg%3e";
77
+ const _hoisted_1$w = {
78
+ key: 0,
79
+ class: "loop cubes"
80
+ };
81
+ const _hoisted_2$q = {
82
+ key: 2,
83
+ class: "msg"
84
+ };
85
+ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
86
+ __name: "FLoading",
87
+ props: {
88
+ type: { default: "dots" },
89
+ text: {},
90
+ mask: { type: Boolean, default: false }
91
+ },
92
+ setup(__props) {
93
+ const props = __props;
94
+ return (_ctx, _cache) => {
95
+ return vue.openBlock(), vue.createElementBlock("div", {
96
+ class: vue.normalizeClass(["flex-center-col size-full loading-container", { "global-mask": _ctx.mask }])
97
+ }, [
98
+ _ctx.type === "cubes" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
99
+ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(6, (i) => {
100
+ return vue.createElementVNode("div", {
101
+ class: "item cubes",
102
+ key: i
103
+ });
104
+ }), 64))
105
+ ])) : (vue.openBlock(), vue.createElementBlock("div", {
106
+ key: 1,
107
+ class: vue.normalizeClass(["loader", _ctx.type])
108
+ }, null, 2)),
109
+ props.text ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2$q, vue.toDisplayString(props.text), 1)) : vue.createCommentVNode("", true)
110
+ ], 2);
111
+ };
112
+ }
113
+ });
114
+ const FLoading = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-20f58a50"]]);
115
+ const _hoisted_1$v = { class: "f-image" };
116
+ const _hoisted_2$p = {
117
+ key: 0,
118
+ class: "f-image__placeholder"
119
+ };
120
+ const _hoisted_3$m = {
121
+ key: 0,
122
+ class: "f-image__error"
123
+ };
124
+ const _hoisted_4$b = ["src", "loading"];
125
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
126
+ __name: "FImage",
127
+ props: {
128
+ src: {},
129
+ alt: {},
130
+ fit: { default: "cover" },
131
+ lazy: { type: Boolean, default: true }
132
+ },
133
+ setup(__props) {
134
+ const props = __props;
135
+ const status = vue.ref("loading");
136
+ vue.watch(() => props.src, () => {
137
+ status.value = "loading";
138
+ }, { immediate: false });
139
+ const onLoad = () => status.value = "loaded";
140
+ const onError = () => status.value = "error";
141
+ return (_ctx, _cache) => {
142
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
143
+ vue.createVNode(vue.Transition, { name: "fade" }, {
144
+ default: vue.withCtx(() => [
145
+ vue.unref(status) === "loading" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$p, [
146
+ vue.createVNode(FLoading, { type: "classic first" })
147
+ ])) : vue.createCommentVNode("", true)
148
+ ]),
149
+ _: 1
150
+ }),
151
+ vue.createVNode(vue.Transition, { name: "fade" }, {
152
+ default: vue.withCtx(() => [
153
+ vue.unref(status) === "error" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$m, [
154
+ vue.renderSlot(_ctx.$slots, "error", {}, () => [
155
+ vue.createVNode(FIcon, { size: "48px" }, {
156
+ default: vue.withCtx(() => [
157
+ vue.createVNode(vue.unref(PictureError))
158
+ ]),
159
+ _: 1
160
+ })
161
+ ], true)
162
+ ])) : vue.createCommentVNode("", true)
163
+ ]),
164
+ _: 3
165
+ }),
166
+ vue.withDirectives(vue.createElementVNode("img", {
167
+ src: props.src,
168
+ loading: _ctx.lazy ? "lazy" : "eager",
169
+ style: vue.normalizeStyle({ objectFit: props.fit }),
170
+ class: "f-image__img",
171
+ onLoad,
172
+ onError
173
+ }, null, 44, _hoisted_4$b), [
174
+ [vue.vShow, vue.unref(status) === "loaded"]
175
+ ])
176
+ ]);
177
+ };
178
+ }
179
+ });
180
+ const FImage = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-e959ab10"]]);
181
+ const _hoisted_1$u = ["type", "placeholder", "disabled", "readonly", "name", "id"];
182
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
183
+ __name: "FInput",
184
+ props: /* @__PURE__ */ vue.mergeModels({
185
+ placeholder: { default: "输入..." },
186
+ type: { default: "text" },
187
+ disabled: { type: Boolean, default: false },
188
+ readonly: { type: Boolean, default: false },
189
+ name: { default: "" },
190
+ id: { default: "" }
191
+ }, {
192
+ "modelValue": { default: "" },
193
+ "modelModifiers": {}
194
+ }),
195
+ emits: /* @__PURE__ */ vue.mergeModels(["input", "change", "focus", "blur"], ["update:modelValue"]),
196
+ setup(__props, { emit: __emit }) {
197
+ const model = vue.useModel(__props, "modelValue");
198
+ const emit = __emit;
199
+ const handleInput = (event) => {
200
+ const value = event.target.value;
201
+ emit("input", value);
202
+ };
203
+ const handleChange = (event) => {
204
+ const value = event.target.value;
205
+ emit("change", value);
206
+ };
207
+ const handleFocus = (event) => {
208
+ emit("focus", event);
209
+ };
210
+ const handleBlur = (event) => {
211
+ emit("blur", event);
212
+ };
213
+ return (_ctx, _cache) => {
214
+ return vue.openBlock(), vue.createElementBlock("div", {
215
+ class: vue.normalizeClass(["f-input", { "is-disabled": _ctx.disabled, "is-readonly": "readonly" in _ctx ? _ctx.readonly : vue.unref(vue.readonly) }])
216
+ }, [
217
+ vue.createVNode(FIcon, { class: "f-input__icon" }, {
218
+ default: vue.withCtx(() => [
219
+ vue.createVNode(vue.unref(ionicons5.Search))
220
+ ]),
221
+ _: 1
222
+ }),
223
+ vue.withDirectives(vue.createElementVNode("input", {
224
+ class: "f-input__text",
225
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
226
+ type: _ctx.type,
227
+ placeholder: _ctx.placeholder,
228
+ disabled: _ctx.disabled,
229
+ readonly: "readonly" in _ctx ? _ctx.readonly : vue.unref(vue.readonly),
230
+ name: _ctx.name,
231
+ id: _ctx.id,
232
+ onInput: handleInput,
233
+ onChange: handleChange,
234
+ onFocus: handleFocus,
235
+ onBlur: handleBlur
236
+ }, null, 40, _hoisted_1$u), [
237
+ [vue.vModelDynamic, model.value]
238
+ ])
239
+ ], 2);
240
+ };
241
+ }
242
+ });
243
+ const FInput = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-9af0fbbe"]]);
244
+ const _hoisted_1$t = ["onMousemove"];
245
+ const _hoisted_2$o = {
246
+ key: 0,
247
+ class: "f-rate__score"
248
+ };
249
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
250
+ __name: "FRate",
251
+ props: /* @__PURE__ */ vue.mergeModels({
252
+ modelValue: {},
253
+ count: { default: 5 },
254
+ readonly: { type: Boolean, default: false },
255
+ allowHalf: { type: Boolean, default: false },
256
+ color: { default: "#f5a623" },
257
+ voidColor: { default: "#c0c4cc" },
258
+ showText: { type: Boolean, default: false },
259
+ scoreTemplate: { default: "{value} 分" },
260
+ size: { default: "normal" }
261
+ }, {
262
+ "modelValue": { default: 0 },
263
+ "modelModifiers": {}
264
+ }),
265
+ emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
266
+ setup(__props, { emit: __emit }) {
267
+ const model = vue.useModel(__props, "modelValue");
268
+ const props = __props;
269
+ const emit = __emit;
270
+ const hoverValue = vue.ref(null);
271
+ const displayValue = vue.computed(() => {
272
+ var _a;
273
+ return (_a = hoverValue.value) != null ? _a : model.value;
274
+ });
275
+ const scoreText = vue.computed(
276
+ () => props.scoreTemplate.replace("{value}", String(model.value))
277
+ );
278
+ const starSize = vue.computed(
279
+ () => props.size === "normal" ? 16 : props.size === "small" ? 12 : 20
280
+ );
281
+ const getStarType = (index) => {
282
+ const val = displayValue.value;
283
+ if (val >= index) return "full";
284
+ if (props.allowHalf && val >= index - 0.5) return "half";
285
+ return "empty";
286
+ };
287
+ const getStarColor = (index) => {
288
+ return getStarType(index) === "full" ? props.voidColor : props.color;
289
+ };
290
+ const onMouseMove = (event, index) => {
291
+ if (props.readonly) return;
292
+ if (props.allowHalf) {
293
+ const target = event.currentTarget;
294
+ const { left, width } = target.getBoundingClientRect();
295
+ hoverValue.value = (event.clientX - left) / width < 0.5 ? index - 0.5 : index;
296
+ } else {
297
+ hoverValue.value = index;
298
+ }
299
+ };
300
+ const onMouseLeave = () => {
301
+ if (props.readonly) return;
302
+ hoverValue.value = null;
303
+ };
304
+ const onClick = () => {
305
+ var _a;
306
+ if (props.readonly) return;
307
+ const val = (_a = hoverValue.value) != null ? _a : model.value;
308
+ model.value = val;
309
+ emit("change", val);
310
+ };
311
+ return (_ctx, _cache) => {
312
+ return vue.openBlock(), vue.createElementBlock("div", {
313
+ class: vue.normalizeClass(["f-rate", { "f-rate--readonly": props.readonly }]),
314
+ onMouseleave: onMouseLeave
315
+ }, [
316
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.count, (index) => {
317
+ return vue.openBlock(), vue.createElementBlock("span", {
318
+ key: index,
319
+ class: "f-rate__item",
320
+ onMousemove: ($event) => onMouseMove($event, index),
321
+ onClick
322
+ }, [
323
+ vue.createVNode(FIcon, {
324
+ color: getStarColor(index),
325
+ size: vue.unref(starSize)
326
+ }, {
327
+ default: vue.withCtx(() => [
328
+ getStarType(index) === "full" ? (vue.openBlock(), vue.createBlock(vue.unref(ionicons5.StarOutline), { key: 0 })) : getStarType(index) === "half" ? (vue.openBlock(), vue.createBlock(vue.unref(ionicons5.StarHalf), { key: 1 })) : (vue.openBlock(), vue.createBlock(vue.unref(ionicons5.Star), { key: 2 }))
329
+ ]),
330
+ _: 2
331
+ }, 1032, ["color", "size"])
332
+ ], 40, _hoisted_1$t);
333
+ }), 128)),
334
+ props.showText ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$o, vue.toDisplayString(vue.unref(scoreText)), 1)) : vue.createCommentVNode("", true)
335
+ ], 34);
336
+ };
337
+ }
338
+ });
339
+ const FRate = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-3b5c4f14"]]);
340
+ const _hoisted_1$s = { class: "f-dropdown-wrapper" };
341
+ const _hoisted_2$n = { class: "f-dropdown-content" };
342
+ const _hoisted_3$l = ["onClick"];
343
+ const _hoisted_4$a = {
344
+ key: 0,
345
+ class: "opt-icon"
346
+ };
347
+ const _hoisted_5$9 = { class: "opt-label" };
348
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
349
+ __name: "FDropdown",
350
+ props: {
351
+ placement: { default: "right-start" },
352
+ offset: { default: 12 },
353
+ zIndex: { default: 2e3 },
354
+ trigger: { default: "hover" },
355
+ options: { default: () => [] }
356
+ },
357
+ emits: ["select"],
358
+ setup(__props, { emit: __emit }) {
359
+ const props = __props;
360
+ const emit = __emit;
361
+ const show = vue.ref(false);
362
+ const anchorRect = vue.ref(null);
363
+ const triggerRef = vue.ref(null);
364
+ const dropdownRef = vue.ref(null);
365
+ const dropdownHeight = vue.ref(0);
366
+ const dropdownWidth = vue.ref(0);
367
+ const bridgeStyle = vue.computed(() => {
368
+ const [side] = props.placement.split("-");
369
+ const gap = Array.isArray(props.offset) ? props.offset[0] : props.offset;
370
+ const size = gap + 4;
371
+ const styles = { position: "absolute" };
372
+ if (side === "right") {
373
+ styles.width = `${size}px`;
374
+ styles.left = `-${size}px`;
375
+ styles.top = 0;
376
+ styles.bottom = 0;
377
+ } else if (side === "left") {
378
+ styles.width = `${size}px`;
379
+ styles.right = `-${size}px`;
380
+ styles.top = 0;
381
+ styles.bottom = 0;
382
+ } else if (side === "bottom") {
383
+ styles.height = `${size}px`;
384
+ styles.top = `-${size}px`;
385
+ styles.left = 0;
386
+ styles.right = 0;
387
+ } else if (side === "top") {
388
+ styles.height = `${size}px`;
389
+ styles.bottom = `-${size}px`;
390
+ styles.left = 0;
391
+ styles.right = 0;
392
+ }
393
+ return styles;
394
+ });
395
+ const dropdownStyle = vue.computed(() => {
396
+ if (!anchorRect.value) return {};
397
+ const rect = anchorRect.value;
398
+ const { placement } = props;
399
+ const gap = Array.isArray(props.offset) ? props.offset[0] : props.offset;
400
+ const [side, align] = placement.split("-");
401
+ const vw = window.innerWidth;
402
+ const vh = window.innerHeight;
403
+ const w = dropdownWidth.value || 160;
404
+ const h = dropdownHeight.value || 200;
405
+ let top = 0;
406
+ let left = 0;
407
+ let resolvedSide = side;
408
+ if (side === "right") {
409
+ left = rect.right + gap;
410
+ if (left + w > vw) {
411
+ left = rect.left - w - gap;
412
+ resolvedSide = "left";
413
+ }
414
+ } else if (side === "left") {
415
+ left = rect.left - w - gap;
416
+ if (left < 0) {
417
+ left = rect.right + gap;
418
+ resolvedSide = "right";
419
+ }
420
+ } else if (side === "bottom") {
421
+ top = rect.bottom + gap;
422
+ if (top + h > vh) {
423
+ top = rect.top - h - gap;
424
+ resolvedSide = "top";
425
+ }
426
+ } else if (side === "top") {
427
+ top = rect.top - h - gap;
428
+ if (top < 0) {
429
+ top = rect.bottom + gap;
430
+ resolvedSide = "bottom";
431
+ }
432
+ }
433
+ if (resolvedSide === "top" || resolvedSide === "bottom") {
434
+ if (align === "start") left = rect.left;
435
+ else if (align === "end") left = rect.right - w;
436
+ else left = rect.left + (rect.width - w) / 2;
437
+ left = Math.max(8, Math.min(left, vw - w - 8));
438
+ } else {
439
+ if (align === "start") top = rect.top;
440
+ else if (align === "end") top = rect.bottom - h;
441
+ else top = rect.top + (rect.height - h) / 2;
442
+ top = Math.max(8, Math.min(top, vh - h - 8));
443
+ }
444
+ const originX = resolvedSide === "right" ? "left" : resolvedSide === "left" ? "right" : align === "start" ? "left" : align === "end" ? "right" : "center";
445
+ const originY = resolvedSide === "bottom" ? "top" : resolvedSide === "top" ? "bottom" : align === "start" ? "top" : align === "end" ? "bottom" : "center";
446
+ return {
447
+ top: `${top}px`,
448
+ left: `${left}px`,
449
+ transformOrigin: `${originY} ${originX}`
450
+ };
451
+ });
452
+ let leaveTimer = null;
453
+ let showTimer = null;
454
+ const clearLeaveTimer = () => {
455
+ if (leaveTimer) {
456
+ clearTimeout(leaveTimer);
457
+ leaveTimer = null;
458
+ }
459
+ };
460
+ const handleTriggerClick = (e) => {
461
+ if (props.trigger !== "click") return;
462
+ e.stopPropagation();
463
+ if (!show.value) {
464
+ anchorRect.value = triggerRef.value.getBoundingClientRect();
465
+ show.value = true;
466
+ } else {
467
+ show.value = false;
468
+ }
469
+ };
470
+ const handleMouseEnter = () => {
471
+ if (props.trigger !== "hover") return;
472
+ clearLeaveTimer();
473
+ showTimer = setTimeout(() => {
474
+ if (triggerRef.value) {
475
+ anchorRect.value = triggerRef.value.getBoundingClientRect();
476
+ }
477
+ show.value = true;
478
+ }, 400);
479
+ };
480
+ const handleMouseLeave = () => {
481
+ if (props.trigger !== "hover") return;
482
+ if (showTimer) {
483
+ clearTimeout(showTimer);
484
+ showTimer = null;
485
+ }
486
+ leaveTimer = setTimeout(() => {
487
+ show.value = false;
488
+ }, 400);
489
+ };
490
+ const handleWindowClick = (e) => {
491
+ if (props.trigger !== "click" || !show.value) return;
492
+ show.value = false;
493
+ };
494
+ const handleOptionClick = (option) => {
495
+ if (option.disabled) return;
496
+ emit("select", option.key, option);
497
+ if (!option.children) show.value = false;
498
+ };
499
+ vue.watch(show, (val) => __async(null, null, function* () {
500
+ var _a, _b;
501
+ if (val) {
502
+ anchorRect.value = triggerRef.value.getBoundingClientRect();
503
+ yield vue.nextTick();
504
+ dropdownHeight.value = ((_a = dropdownRef.value) == null ? void 0 : _a.offsetHeight) || 200;
505
+ dropdownWidth.value = ((_b = dropdownRef.value) == null ? void 0 : _b.offsetWidth) || 160;
506
+ } else {
507
+ dropdownHeight.value = 0;
508
+ dropdownWidth.value = 0;
509
+ }
510
+ }));
511
+ vue.onUnmounted(() => {
512
+ clearLeaveTimer();
513
+ if (showTimer) clearTimeout(showTimer);
514
+ });
515
+ core.useEventListener(window, "click", handleWindowClick);
516
+ return (_ctx, _cache) => {
517
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
518
+ vue.createElementVNode("div", {
519
+ ref_key: "triggerRef",
520
+ ref: triggerRef,
521
+ class: "f-dropdown-trigger-wrapper",
522
+ onMouseenter: handleMouseEnter,
523
+ onMouseleave: handleMouseLeave,
524
+ onClick: handleTriggerClick
525
+ }, [
526
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
527
+ ], 544),
528
+ (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
529
+ vue.createVNode(vue.Transition, { name: "f-dropdown-motion" }, {
530
+ default: vue.withCtx(() => [
531
+ vue.unref(show) ? (vue.openBlock(), vue.createElementBlock("div", {
532
+ key: 0,
533
+ ref_key: "dropdownRef",
534
+ ref: dropdownRef,
535
+ class: "f-dropdown-item",
536
+ style: vue.normalizeStyle([vue.unref(dropdownStyle), { zIndex: _ctx.zIndex }]),
537
+ onMouseenter: clearLeaveTimer,
538
+ onMouseleave: handleMouseLeave,
539
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
540
+ }, ["stop"]))
541
+ }, [
542
+ _ctx.trigger === "hover" ? (vue.openBlock(), vue.createElementBlock("div", {
543
+ key: 0,
544
+ class: "f-dropdown-bridge",
545
+ style: vue.normalizeStyle(vue.unref(bridgeStyle))
546
+ }, null, 4)) : vue.createCommentVNode("", true),
547
+ vue.createElementVNode("div", _hoisted_2$n, [
548
+ _ctx.options && _ctx.options.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.options, (opt) => {
549
+ return vue.openBlock(), vue.createElementBlock("div", {
550
+ key: opt.key,
551
+ class: vue.normalizeClass(["f-dropdown-option", { "is-disabled": opt.disabled }]),
552
+ onClick: ($event) => handleOptionClick(opt)
553
+ }, [
554
+ opt.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$a, [
555
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(opt.icon)))
556
+ ])) : vue.createCommentVNode("", true),
557
+ vue.createElementVNode("span", _hoisted_5$9, vue.toDisplayString(opt.label), 1)
558
+ ], 10, _hoisted_3$l);
559
+ }), 128)) : vue.renderSlot(_ctx.$slots, "content", { key: 1 }, void 0, true)
560
+ ])
561
+ ], 36)) : vue.createCommentVNode("", true)
562
+ ]),
563
+ _: 3
564
+ })
565
+ ]))
566
+ ]);
567
+ };
568
+ }
569
+ });
570
+ const FDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-addb3a3b"]]);
571
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
572
+ __name: "FSelect",
573
+ props: /* @__PURE__ */ vue.mergeModels({
574
+ options: {},
575
+ placeholder: {}
576
+ }, {
577
+ "modelValue": {},
578
+ "modelModifiers": {}
579
+ }),
580
+ emits: /* @__PURE__ */ vue.mergeModels(["select"], ["update:modelValue"]),
581
+ setup(__props, { emit: __emit }) {
582
+ const props = __props;
583
+ const emit = __emit;
584
+ const modelValue = vue.useModel(__props, "modelValue");
585
+ const isOpen = vue.ref(false);
586
+ const selectedLabel = vue.computed(
587
+ () => {
588
+ var _a, _b, _c;
589
+ return (_c = (_a = props.options.find((o) => o.key === modelValue.value)) == null ? void 0 : _a.label) != null ? _c : (_b = props.placeholder) != null ? _b : "请选择";
590
+ }
591
+ );
592
+ const hasValue = vue.computed(() => modelValue.value !== void 0 && modelValue.value !== "");
593
+ const handleSelect = (key, option) => {
594
+ modelValue.value = key;
595
+ emit("select", key, option);
596
+ isOpen.value = false;
597
+ };
598
+ const handleDropdownShow = (val) => {
599
+ isOpen.value = val;
600
+ };
601
+ return (_ctx, _cache) => {
602
+ return vue.openBlock(), vue.createBlock(FDropdown, {
603
+ options: _ctx.options,
604
+ trigger: "click",
605
+ onSelect: handleSelect,
606
+ onShow: _cache[0] || (_cache[0] = ($event) => handleDropdownShow(true)),
607
+ onHide: _cache[1] || (_cache[1] = ($event) => handleDropdownShow(false)),
608
+ placement: "bottom",
609
+ offset: 4
610
+ }, {
611
+ default: vue.withCtx(() => [
612
+ vue.createElementVNode("div", {
613
+ class: vue.normalizeClass(["f-select", { "is-active": vue.unref(hasValue), "is-open": vue.unref(isOpen) }])
614
+ }, [
615
+ vue.createElementVNode("span", {
616
+ class: vue.normalizeClass(["f-select__label", { "is-placeholder": !vue.unref(hasValue) }])
617
+ }, vue.toDisplayString(vue.unref(selectedLabel)), 3),
618
+ vue.createVNode(FIcon, { class: "f-select__arrow" }, {
619
+ default: vue.withCtx(() => [
620
+ vue.createVNode(vue.unref(ionicons5.ChevronDownOutline))
621
+ ]),
622
+ _: 1
623
+ })
624
+ ], 2)
625
+ ]),
626
+ _: 1
627
+ }, 8, ["options"]);
628
+ };
629
+ }
630
+ });
631
+ const FSelect = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-61444561"]]);
632
+ const _hoisted_1$r = {
633
+ key: 0,
634
+ class: "f-pagination"
635
+ };
636
+ const _hoisted_2$m = {
637
+ key: 0,
638
+ class: "f-pagination__total"
639
+ };
640
+ const _hoisted_3$k = {
641
+ key: 1,
642
+ class: "f-pagination__size"
643
+ };
644
+ const _hoisted_4$9 = ["value"];
645
+ const _hoisted_5$8 = ["value"];
646
+ const _hoisted_6$7 = {
647
+ key: 3,
648
+ class: "f-pagination__list"
649
+ };
650
+ const _hoisted_7$3 = {
651
+ key: 0,
652
+ class: "page-btn ellipsis"
653
+ };
654
+ const _hoisted_8$2 = ["onClick"];
655
+ const _hoisted_9$2 = {
656
+ key: 5,
657
+ class: "f-pagination__jump"
658
+ };
659
+ const _hoisted_10$2 = ["max"];
660
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
661
+ __name: "FPagination",
662
+ props: /* @__PURE__ */ vue.mergeModels({
663
+ total: {},
664
+ pageSize: { default: 10 },
665
+ hideOnSingle: { type: Boolean, default: false },
666
+ pageSizes: { default: () => [10, 20, 50, 100] },
667
+ layout: { default: () => ["prev", "pager", "next"] }
668
+ }, {
669
+ "modelValue": { default: 1 },
670
+ "modelModifiers": {}
671
+ }),
672
+ emits: /* @__PURE__ */ vue.mergeModels(["update:pageSize"], ["update:modelValue"]),
673
+ setup(__props, { emit: __emit }) {
674
+ const props = __props;
675
+ const emit = __emit;
676
+ const currentPage = vue.useModel(__props, "modelValue");
677
+ const layoutItems = vue.computed(
678
+ () => {
679
+ var _a;
680
+ return (_a = props.layout) != null ? _a : ["prev", "pager", "next"];
681
+ }
682
+ );
683
+ const pageCount = vue.computed(() => Math.ceil(props.total / props.pageSize) || 1);
684
+ const pages = vue.computed(() => {
685
+ const total = pageCount.value;
686
+ const cur = currentPage.value;
687
+ if (!total || total <= 0) return [];
688
+ if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
689
+ if (cur <= 4) return [1, 2, 3, 4, 5, "...", total];
690
+ if (cur >= total - 3) return [1, "...", total - 4, total - 3, total - 2, total - 1, total];
691
+ return [1, "...", cur - 1, cur, cur + 1, "...", total];
692
+ });
693
+ const go = (page) => {
694
+ if (typeof page !== "number") return;
695
+ if (page < 1 || page > pageCount.value || page === currentPage.value) return;
696
+ currentPage.value = page;
697
+ };
698
+ const onPageSizeChange = (e) => {
699
+ emit("update:pageSize", parseInt(e.target.value, 10));
700
+ currentPage.value = 1;
701
+ };
702
+ const jumpInput = vue.ref("");
703
+ const onJump = () => {
704
+ const n = parseInt(jumpInput.value, 10);
705
+ if (!isNaN(n)) go(n);
706
+ jumpInput.value = "";
707
+ };
708
+ return (_ctx, _cache) => {
709
+ return !_ctx.hideOnSingle || vue.unref(pageCount) > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$r, [
710
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(layoutItems), (item) => {
711
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: item }, [
712
+ item === "total" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$m, " 共 " + vue.toDisplayString(_ctx.total) + " 条 ", 1)) : item === "sizes" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$k, [
713
+ vue.createElementVNode("select", {
714
+ class: "size-select",
715
+ value: _ctx.pageSize,
716
+ onChange: onPageSizeChange
717
+ }, [
718
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.pageSizes, (s) => {
719
+ return vue.openBlock(), vue.createElementBlock("option", {
720
+ key: s,
721
+ value: s
722
+ }, vue.toDisplayString(s) + " 条/页", 9, _hoisted_5$8);
723
+ }), 128))
724
+ ], 40, _hoisted_4$9)
725
+ ])) : item === "prev" ? (vue.openBlock(), vue.createElementBlock("button", {
726
+ key: 2,
727
+ class: vue.normalizeClass(["page-btn", { disabled: currentPage.value === 1 }]),
728
+ onClick: _cache[0] || (_cache[0] = ($event) => go(currentPage.value - 1))
729
+ }, [
730
+ vue.createVNode(FIcon, null, {
731
+ default: vue.withCtx(() => [
732
+ vue.createVNode(vue.unref(ionicons5.ChevronBackOutline))
733
+ ]),
734
+ _: 1
735
+ })
736
+ ], 2)) : item === "pager" ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6$7, [
737
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(pages), (page, index) => {
738
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index }, [
739
+ page === "..." ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_7$3, [
740
+ vue.createVNode(FIcon, null, {
741
+ default: vue.withCtx(() => [
742
+ vue.createVNode(vue.unref(ionicons5.EllipsisHorizontal))
743
+ ]),
744
+ _: 1
745
+ })
746
+ ])) : (vue.openBlock(), vue.createElementBlock("li", {
747
+ key: 1,
748
+ class: vue.normalizeClass(["page-btn", { active: currentPage.value === page }]),
749
+ onClick: ($event) => go(page)
750
+ }, vue.toDisplayString(page), 11, _hoisted_8$2))
751
+ ], 64);
752
+ }), 128))
753
+ ])) : item === "next" ? (vue.openBlock(), vue.createElementBlock("button", {
754
+ key: 4,
755
+ class: vue.normalizeClass(["page-btn", { disabled: currentPage.value === vue.unref(pageCount) }]),
756
+ onClick: _cache[1] || (_cache[1] = ($event) => go(currentPage.value + 1))
757
+ }, [
758
+ vue.createVNode(FIcon, null, {
759
+ default: vue.withCtx(() => [
760
+ vue.createVNode(vue.unref(ionicons5.ChevronForwardOutline))
761
+ ]),
762
+ _: 1
763
+ })
764
+ ], 2)) : item === "jumper" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$2, [
765
+ _cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "jump-label" }, "前往", -1)),
766
+ vue.withDirectives(vue.createElementVNode("input", {
767
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(jumpInput) ? jumpInput.value = $event : null),
768
+ class: "jump-input",
769
+ type: "number",
770
+ min: 1,
771
+ max: vue.unref(pageCount),
772
+ onKeydown: vue.withKeys(onJump, ["enter"]),
773
+ onBlur: onJump
774
+ }, null, 40, _hoisted_10$2), [
775
+ [vue.vModelText, vue.unref(jumpInput)]
776
+ ]),
777
+ _cache[4] || (_cache[4] = vue.createElementVNode("span", { class: "jump-label" }, "页", -1))
778
+ ])) : vue.createCommentVNode("", true)
779
+ ], 64);
780
+ }), 128))
781
+ ])) : vue.createCommentVNode("", true);
782
+ };
783
+ }
784
+ });
785
+ const FPagination = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-930f8b20"]]);
786
+ const _hoisted_1$q = {
787
+ key: 0,
788
+ class: "f-card__header"
789
+ };
790
+ const _hoisted_2$l = {
791
+ key: 0,
792
+ class: "f-card__header-extra"
793
+ };
794
+ const _hoisted_3$j = {
795
+ key: 1,
796
+ class: "f-card__cover"
797
+ };
798
+ const _hoisted_4$8 = {
799
+ key: 2,
800
+ class: "f-card__body"
801
+ };
802
+ const _hoisted_5$7 = {
803
+ key: 3,
804
+ class: "f-card__footer"
805
+ };
806
+ const _hoisted_6$6 = {
807
+ key: 0,
808
+ class: "f-card__header"
809
+ };
810
+ const _hoisted_7$2 = {
811
+ key: 0,
812
+ class: "f-card__header-extra"
813
+ };
814
+ const _hoisted_8$1 = {
815
+ key: 1,
816
+ class: "f-card__cover"
817
+ };
818
+ const _hoisted_9$1 = { class: "f-card__content" };
819
+ const _hoisted_10$1 = {
820
+ key: 0,
821
+ class: "f-card__body"
822
+ };
823
+ const _hoisted_11$1 = {
824
+ key: 1,
825
+ class: "f-card__footer"
826
+ };
827
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
828
+ __name: "FCard",
829
+ props: {
830
+ hoverable: { type: Boolean, default: true },
831
+ direction: { default: "vertical" }
832
+ },
833
+ setup(__props) {
834
+ return (_ctx, _cache) => {
835
+ return vue.openBlock(), vue.createElementBlock("div", {
836
+ class: vue.normalizeClass(["f-card", [`f-card--${_ctx.direction}`, { "is-hoverable": _ctx.hoverable }]])
837
+ }, [
838
+ _ctx.direction === "vertical" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
839
+ _ctx.$slots.header || _ctx.$slots["header-extra"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q, [
840
+ vue.renderSlot(_ctx.$slots, "header", {}, void 0, true),
841
+ _ctx.$slots["header-extra"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$l, [
842
+ vue.renderSlot(_ctx.$slots, "header-extra", {}, void 0, true)
843
+ ])) : vue.createCommentVNode("", true)
844
+ ])) : vue.createCommentVNode("", true),
845
+ _ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$j, [
846
+ vue.renderSlot(_ctx.$slots, "cover", {}, void 0, true)
847
+ ])) : vue.createCommentVNode("", true),
848
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$8, [
849
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
850
+ ])) : vue.createCommentVNode("", true),
851
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$7, [
852
+ vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
853
+ ])) : vue.createCommentVNode("", true)
854
+ ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
855
+ _ctx.$slots.header || _ctx.$slots["header-extra"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$6, [
856
+ vue.renderSlot(_ctx.$slots, "header", {}, void 0, true),
857
+ _ctx.$slots["header-extra"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, [
858
+ vue.renderSlot(_ctx.$slots, "header-extra", {}, void 0, true)
859
+ ])) : vue.createCommentVNode("", true)
860
+ ])) : vue.createCommentVNode("", true),
861
+ _ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, [
862
+ vue.renderSlot(_ctx.$slots, "cover", {}, void 0, true)
863
+ ])) : vue.createCommentVNode("", true),
864
+ vue.createElementVNode("div", _hoisted_9$1, [
865
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$1, [
866
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
867
+ ])) : vue.createCommentVNode("", true),
868
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, [
869
+ vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
870
+ ])) : vue.createCommentVNode("", true)
871
+ ])
872
+ ], 64))
873
+ ], 2);
874
+ };
875
+ }
876
+ });
877
+ const FCard = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-a66fa373"]]);
878
+ const _hoisted_1$p = {
879
+ key: 0,
880
+ class: "f-tag__dot"
881
+ };
882
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
883
+ __name: "FTag",
884
+ props: {
885
+ color: {},
886
+ type: { default: "round" },
887
+ effect: {},
888
+ closable: { type: Boolean },
889
+ size: { default: "normal" }
890
+ },
891
+ emits: ["close"],
892
+ setup(__props, { emit: __emit }) {
893
+ const emit = __emit;
894
+ const isHover = vue.ref(false);
895
+ return (_ctx, _cache) => {
896
+ var _a, _b, _c;
897
+ return vue.openBlock(), vue.createElementBlock("span", {
898
+ class: vue.normalizeClass(["f-tag", [
899
+ `f-tag--${(_a = _ctx.type) != null ? _a : "round"}`,
900
+ `f-tag--${(_b = _ctx.effect) != null ? _b : "light"}`,
901
+ (_c = _ctx.color) != null ? _c : "default"
902
+ ]]),
903
+ onMouseenter: _cache[1] || (_cache[1] = ($event) => isHover.value = true),
904
+ onMouseleave: _cache[2] || (_cache[2] = ($event) => isHover.value = false)
905
+ }, [
906
+ _ctx.type === "dot" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$p)) : vue.createCommentVNode("", true),
907
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
908
+ _ctx.closable ? (vue.openBlock(), vue.createBlock(FIcon, {
909
+ key: 1,
910
+ class: "f-tag__close",
911
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => emit("close"), ["stop"]))
912
+ }, {
913
+ default: vue.withCtx(() => [
914
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(isHover) ? vue.unref(ionicons5.CloseCircle) : vue.unref(ionicons5.Close))))
915
+ ]),
916
+ _: 1
917
+ })) : vue.createCommentVNode("", true)
918
+ ], 34);
919
+ };
920
+ }
921
+ });
922
+ const FTag = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-02bd5aa6"]]);
923
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
924
+ __name: "FTooltip",
925
+ props: {
926
+ content: {},
927
+ placement: { default: "top" },
928
+ disabled: { type: Boolean, default: false },
929
+ delay: { default: 100 },
930
+ offset: { default: 6 },
931
+ maxWidth: { default: 240 }
932
+ },
933
+ setup(__props) {
934
+ const props = __props;
935
+ const triggerRef = vue.ref(null);
936
+ const tooltipRef = vue.ref(null);
937
+ const visible = vue.ref(false);
938
+ const position = vue.ref({ top: 0, left: 0 });
939
+ let showTimer = null;
940
+ const show = () => {
941
+ if (props.disabled) return;
942
+ showTimer = setTimeout(() => {
943
+ visible.value = true;
944
+ vue.nextTick(updatePosition);
945
+ }, props.delay);
946
+ };
947
+ const hide = () => {
948
+ if (showTimer) clearTimeout(showTimer);
949
+ visible.value = false;
950
+ };
951
+ const updatePosition = () => {
952
+ var _a, _b;
953
+ if (!tooltipRef.value) return;
954
+ const triggerEl = (_b = (_a = triggerRef.value) == null ? void 0 : _a.firstElementChild) != null ? _b : triggerRef.value;
955
+ if (!triggerEl) return;
956
+ const trigger = triggerEl.getBoundingClientRect();
957
+ const tooltip = tooltipRef.value.getBoundingClientRect();
958
+ const gap = props.offset;
959
+ const [side, align] = props.placement.split("-");
960
+ let top = 0;
961
+ let left = 0;
962
+ switch (side) {
963
+ case "top":
964
+ top = trigger.top - tooltip.height - gap;
965
+ break;
966
+ case "bottom":
967
+ top = trigger.bottom + gap;
968
+ break;
969
+ case "left":
970
+ left = trigger.left - tooltip.width - gap;
971
+ break;
972
+ case "right":
973
+ left = trigger.right + gap;
974
+ break;
975
+ }
976
+ if (side === "top" || side === "bottom") {
977
+ if (align === "start") left = trigger.left;
978
+ else if (align === "end") left = trigger.right - tooltip.width;
979
+ else left = trigger.left + (trigger.width - tooltip.width) / 2;
980
+ } else {
981
+ if (align === "start") top = trigger.top;
982
+ else if (align === "end") top = trigger.bottom - tooltip.height;
983
+ else top = trigger.top + (trigger.height - tooltip.height) / 2;
984
+ }
985
+ const padding = 8;
986
+ left = Math.max(padding, Math.min(left, window.innerWidth - tooltip.width - padding));
987
+ top = Math.max(padding, Math.min(top, window.innerHeight - tooltip.height - padding));
988
+ position.value = { top: top + window.scrollY, left: left + window.scrollX };
989
+ };
990
+ vue.onUnmounted(hide);
991
+ return (_ctx, _cache) => {
992
+ return vue.openBlock(), vue.createElementBlock("div", {
993
+ class: "f-tooltip",
994
+ ref_key: "triggerRef",
995
+ ref: triggerRef,
996
+ onMouseenter: show,
997
+ onMouseleave: hide
998
+ }, [
999
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
1000
+ (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
1001
+ vue.createVNode(vue.Transition, { name: "f-tooltip" }, {
1002
+ default: vue.withCtx(() => [
1003
+ vue.unref(visible) && (_ctx.content || _ctx.$slots.content) ? (vue.openBlock(), vue.createElementBlock("div", {
1004
+ key: 0,
1005
+ ref_key: "tooltipRef",
1006
+ ref: tooltipRef,
1007
+ class: vue.normalizeClass(["f-tooltip-wrapper", `is-${_ctx.placement.split("-")[0]}`]),
1008
+ style: vue.normalizeStyle({
1009
+ top: `${vue.unref(position).top}px`,
1010
+ left: `${vue.unref(position).left}px`,
1011
+ maxWidth: `${_ctx.maxWidth}px`
1012
+ })
1013
+ }, [
1014
+ vue.renderSlot(_ctx.$slots, "content", {}, () => [
1015
+ vue.createTextVNode(vue.toDisplayString(_ctx.content), 1)
1016
+ ], true),
1017
+ _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "f-tooltip-arrow" }, null, -1))
1018
+ ], 6)) : vue.createCommentVNode("", true)
1019
+ ]),
1020
+ _: 3
1021
+ })
1022
+ ]))
1023
+ ], 544);
1024
+ };
1025
+ }
1026
+ });
1027
+ const FTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-be9acca7"]]);
1028
+ const _hoisted_1$o = { class: "f-progress" };
1029
+ const _hoisted_2$k = {
1030
+ key: 0,
1031
+ class: "f-progress__text"
1032
+ };
1033
+ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
1034
+ __name: "FProgress",
1035
+ props: {
1036
+ percent: {},
1037
+ color: {},
1038
+ showText: { type: Boolean, default: false },
1039
+ height: { default: 5 }
1040
+ },
1041
+ setup(__props) {
1042
+ const props = __props;
1043
+ const clampedPercent = vue.computed(() => Math.min(100, Math.max(0, props.percent)));
1044
+ return (_ctx, _cache) => {
1045
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
1046
+ vue.createElementVNode("div", {
1047
+ class: "f-progress__track",
1048
+ style: vue.normalizeStyle({ height: `${_ctx.height}px` })
1049
+ }, [
1050
+ vue.createElementVNode("div", {
1051
+ class: "f-progress__fill",
1052
+ style: vue.normalizeStyle({
1053
+ width: `${vue.unref(clampedPercent)}%`,
1054
+ background: _ctx.color
1055
+ })
1056
+ }, null, 4)
1057
+ ], 4),
1058
+ _ctx.showText ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$k, vue.toDisplayString(vue.unref(clampedPercent)) + "%", 1)) : vue.createCommentVNode("", true)
1059
+ ]);
1060
+ };
1061
+ }
1062
+ });
1063
+ const FProgress = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-c2164d6e"]]);
1064
+ const _hoisted_1$n = { class: "f-tabs__nav-container" };
1065
+ const _hoisted_2$j = { class: "f-tabs__nav" };
1066
+ const _hoisted_3$i = ["onClick"];
1067
+ const _hoisted_4$7 = { class: "f-tabs__label" };
1068
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
1069
+ __name: "FTabs",
1070
+ props: {
1071
+ tabs: {},
1072
+ active: {},
1073
+ type: { default: "line" }
1074
+ },
1075
+ emits: ["update:active", "change"],
1076
+ setup(__props, { emit: __emit }) {
1077
+ const props = __props;
1078
+ const emit = __emit;
1079
+ const activeTab = vue.computed({
1080
+ get: () => {
1081
+ var _a;
1082
+ if (props.active && props.tabs.some((tab) => tab.name === props.active && !tab.disabled)) {
1083
+ return props.active;
1084
+ }
1085
+ const firstEnabled = props.tabs.find((tab) => !tab.disabled);
1086
+ return (_a = firstEnabled == null ? void 0 : firstEnabled.name) != null ? _a : "";
1087
+ },
1088
+ set: (val) => {
1089
+ emit("update:active", val);
1090
+ emit("change", val);
1091
+ }
1092
+ });
1093
+ const setActiveTab = (tabName, disabled) => {
1094
+ if (disabled) return;
1095
+ activeTab.value = tabName;
1096
+ };
1097
+ return (_ctx, _cache) => {
1098
+ return vue.openBlock(), vue.createElementBlock("div", {
1099
+ class: vue.normalizeClass(["f-tabs", [`f-tabs--${_ctx.type}`]])
1100
+ }, [
1101
+ vue.createElementVNode("div", _hoisted_1$n, [
1102
+ vue.createElementVNode("div", _hoisted_2$j, [
1103
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabs, (tab) => {
1104
+ return vue.openBlock(), vue.createElementBlock("div", {
1105
+ key: tab.name,
1106
+ class: vue.normalizeClass(["f-tabs__tab", {
1107
+ active: vue.unref(activeTab) === tab.name,
1108
+ disabled: tab.disabled
1109
+ }]),
1110
+ onClick: ($event) => setActiveTab(tab.name, tab.disabled)
1111
+ }, [
1112
+ vue.createElementVNode("span", _hoisted_4$7, vue.toDisplayString(tab.label), 1)
1113
+ ], 10, _hoisted_3$i);
1114
+ }), 128))
1115
+ ])
1116
+ ]),
1117
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabs, (tab) => {
1118
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
1119
+ key: tab.name,
1120
+ class: "f-tabs__panel"
1121
+ }, [
1122
+ vue.renderSlot(_ctx.$slots, tab.name, {}, void 0, true)
1123
+ ])), [
1124
+ [vue.vShow, vue.unref(activeTab) === tab.name]
1125
+ ]);
1126
+ }), 128))
1127
+ ], 2);
1128
+ };
1129
+ }
1130
+ });
1131
+ const FTabs = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-268fc654"]]);
1132
+ const _hoisted_1$m = {
1133
+ class: "f-breadcrumb__current",
1134
+ "aria-current": "page"
1135
+ };
1136
+ const _hoisted_2$i = ["href"];
1137
+ const _hoisted_3$h = {
1138
+ key: 3,
1139
+ class: "f-breadcrumb__text"
1140
+ };
1141
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
1142
+ __name: "FBreadcrumb",
1143
+ props: {
1144
+ items: { default: () => [] },
1145
+ separator: { default: "/" },
1146
+ animated: { type: Boolean, default: false }
1147
+ },
1148
+ setup(__props) {
1149
+ return (_ctx, _cache) => {
1150
+ return vue.openBlock(), vue.createElementBlock("nav", {
1151
+ class: vue.normalizeClass(["f-breadcrumb", { "f-breadcrumb--animated": _ctx.animated }]),
1152
+ "aria-label": "breadcrumb"
1153
+ }, [
1154
+ vue.createVNode(vue.TransitionGroup, { name: "breadcrumb" }, {
1155
+ default: vue.withCtx(() => [
1156
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.items, (item, index) => {
1157
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
1158
+ key: item.label
1159
+ }, [
1160
+ index > 0 ? (vue.openBlock(), vue.createElementBlock("span", {
1161
+ key: `sep-${item.label}`,
1162
+ class: "f-breadcrumb__sep",
1163
+ "aria-hidden": "true"
1164
+ }, vue.toDisplayString(_ctx.separator), 1)) : vue.createCommentVNode("", true),
1165
+ index === _ctx.items.length - 1 ? vue.renderSlot(_ctx.$slots, "default", {
1166
+ key: 1,
1167
+ item
1168
+ }, () => [
1169
+ vue.createElementVNode("span", _hoisted_1$m, vue.toDisplayString(item.label), 1)
1170
+ ], true) : item.href ? (vue.openBlock(), vue.createElementBlock("a", {
1171
+ key: 2,
1172
+ href: item.href,
1173
+ class: "f-breadcrumb__link"
1174
+ }, vue.toDisplayString(item.label), 9, _hoisted_2$i)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$h, vue.toDisplayString(item.label), 1))
1175
+ ], 64);
1176
+ }), 128))
1177
+ ]),
1178
+ _: 3
1179
+ })
1180
+ ], 2);
1181
+ };
1182
+ }
1183
+ });
1184
+ const FBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-bb787dcc"]]);
1185
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1186
+ __name: "FCol",
1187
+ props: {
1188
+ span: { default: 24 },
1189
+ offset: { default: 0 },
1190
+ order: { default: 0 },
1191
+ xs: {},
1192
+ sm: {},
1193
+ md: {},
1194
+ lg: {}
1195
+ },
1196
+ setup(__props) {
1197
+ const props = __props;
1198
+ const normalize = (size) => typeof size === "number" ? { span: size } : size;
1199
+ const colStyle = vue.computed(() => ({
1200
+ "--col-span": props.span,
1201
+ "--col-offset": props.offset,
1202
+ "--col-order": props.order
1203
+ }));
1204
+ const colClass = vue.computed(() => {
1205
+ const classes = [];
1206
+ const breakpoints = { xs: props.xs, sm: props.sm, md: props.md, lg: props.lg };
1207
+ for (const [bp, val] of Object.entries(breakpoints)) {
1208
+ if (val === void 0) continue;
1209
+ const { span, offset, order } = normalize(val);
1210
+ if (span !== void 0) classes.push(`f-col--${bp}-${span}`);
1211
+ if (offset !== void 0) classes.push(`f-col--${bp}-offset-${offset}`);
1212
+ if (order !== void 0) classes.push(`f-col--${bp}-order-${order}`);
1213
+ }
1214
+ return classes;
1215
+ });
1216
+ return (_ctx, _cache) => {
1217
+ return vue.openBlock(), vue.createElementBlock("div", {
1218
+ class: vue.normalizeClass(["f-col", vue.unref(colClass)]),
1219
+ style: vue.normalizeStyle(vue.unref(colStyle))
1220
+ }, [
1221
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1222
+ ], 6);
1223
+ };
1224
+ }
1225
+ });
1226
+ const FCol = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-5a8b0cb4"]]);
1227
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1228
+ __name: "FRow",
1229
+ props: {
1230
+ gutter: { default: 0 },
1231
+ justify: { default: "start" },
1232
+ align: { default: "top" },
1233
+ wrap: { default: "wrap" },
1234
+ tag: { default: "div" }
1235
+ },
1236
+ setup(__props) {
1237
+ const props = __props;
1238
+ const gutterH = vue.computed(
1239
+ () => Array.isArray(props.gutter) ? props.gutter[0] : props.gutter
1240
+ );
1241
+ const gutterV = vue.computed(
1242
+ () => Array.isArray(props.gutter) ? props.gutter[1] : 0
1243
+ );
1244
+ const justifyMap = {
1245
+ "start": "flex-start",
1246
+ "end": "flex-end",
1247
+ "center": "center",
1248
+ "space-between": "space-between",
1249
+ "space-around": "space-around",
1250
+ "space-evenly": "space-evenly"
1251
+ };
1252
+ const alignMap = {
1253
+ "top": "flex-start",
1254
+ "middle": "center",
1255
+ "bottom": "flex-end",
1256
+ "stretch": "stretch"
1257
+ };
1258
+ const rowStyle = vue.computed(() => ({
1259
+ marginLeft: gutterH.value ? `-${gutterH.value / 2}px` : void 0,
1260
+ marginRight: gutterH.value ? `-${gutterH.value / 2}px` : void 0,
1261
+ rowGap: gutterV.value ? `${gutterV.value}px` : void 0,
1262
+ justifyContent: justifyMap[props.justify],
1263
+ alignItems: alignMap[props.align],
1264
+ flexWrap: props.wrap,
1265
+ "--row-gutter-h": gutterH.value ? `${gutterH.value / 2}px` : "0px"
1266
+ }));
1267
+ return (_ctx, _cache) => {
1268
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
1269
+ class: "f-row",
1270
+ style: vue.normalizeStyle(vue.unref(rowStyle))
1271
+ }, {
1272
+ default: vue.withCtx(() => [
1273
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1274
+ ]),
1275
+ _: 3
1276
+ }, 8, ["style"]);
1277
+ };
1278
+ }
1279
+ });
1280
+ const FRow = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-72f62339"]]);
1281
+ const _hoisted_1$l = { class: "f-space__item" };
1282
+ const _hoisted_2$h = {
1283
+ key: 0,
1284
+ class: "f-space__split",
1285
+ "aria-hidden": "true"
1286
+ };
1287
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
1288
+ __name: "FSpace",
1289
+ props: {
1290
+ direction: { default: "horizontal" },
1291
+ size: { default: "normal" },
1292
+ align: { default: "center" },
1293
+ justify: { default: "start" },
1294
+ wrap: { type: Boolean, default: false },
1295
+ split: {}
1296
+ },
1297
+ setup(__props) {
1298
+ const props = __props;
1299
+ const sizeMap = {
1300
+ small: 6,
1301
+ normal: 12,
1302
+ large: 18
1303
+ };
1304
+ const resolveSize = (s) => typeof s === "number" ? s : sizeMap[s];
1305
+ const gapStyle = vue.computed(() => {
1306
+ const size = props.size;
1307
+ if (Array.isArray(size)) {
1308
+ return `${resolveSize(size[1])}px ${resolveSize(size[0])}px`;
1309
+ }
1310
+ return `${resolveSize(size)}px`;
1311
+ });
1312
+ const spaceStyle = vue.computed(() => ({
1313
+ flexDirection: props.direction === "vertical" ? "column" : "row",
1314
+ alignItems: props.align,
1315
+ justifyContent: props.justify,
1316
+ flexWrap: props.wrap ? "wrap" : "nowrap",
1317
+ gap: gapStyle.value
1318
+ }));
1319
+ const slots = vue.useSlots();
1320
+ const children = vue.computed(() => {
1321
+ var _a;
1322
+ const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots);
1323
+ if (!defaultSlot) return [];
1324
+ const result = [];
1325
+ for (const vnode of defaultSlot) {
1326
+ if (vnode.type === vue.Fragment) {
1327
+ result.push(...vnode.children);
1328
+ } else {
1329
+ result.push(vnode);
1330
+ }
1331
+ }
1332
+ return result.filter((v) => v.type !== Comment);
1333
+ });
1334
+ return (_ctx, _cache) => {
1335
+ return vue.openBlock(), vue.createElementBlock("div", {
1336
+ class: "f-space",
1337
+ style: vue.normalizeStyle(vue.unref(spaceStyle))
1338
+ }, [
1339
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(children), (child, index) => {
1340
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index }, [
1341
+ vue.createElementVNode("div", _hoisted_1$l, [
1342
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(child)))
1343
+ ]),
1344
+ _ctx.split && index < vue.unref(children).length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$h, vue.toDisplayString(_ctx.split), 1)) : vue.createCommentVNode("", true)
1345
+ ], 64);
1346
+ }), 128))
1347
+ ], 4);
1348
+ };
1349
+ }
1350
+ });
1351
+ const FSpace = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-5fb3b1a0"]]);
1352
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
1353
+ __name: "FContainer",
1354
+ props: {
1355
+ gap: { default: 12 }
1356
+ },
1357
+ setup(__props) {
1358
+ const props = __props;
1359
+ const ContainerStyle = vue.computed(() => ({
1360
+ gap: typeof props.gap === "number" ? `${props.gap}px` : props.gap
1361
+ }));
1362
+ return (_ctx, _cache) => {
1363
+ return vue.openBlock(), vue.createElementBlock("div", {
1364
+ class: "f-container",
1365
+ style: vue.normalizeStyle(vue.unref(ContainerStyle))
1366
+ }, [
1367
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1368
+ ], 4);
1369
+ };
1370
+ }
1371
+ });
1372
+ const FContainer = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-08450ddf"]]);
1373
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
1374
+ __name: "FDivider",
1375
+ props: {
1376
+ color: {},
1377
+ direction: { default: "horizontal" },
1378
+ line: { default: "solid" }
1379
+ },
1380
+ setup(__props) {
1381
+ const props = __props;
1382
+ const style = vue.computed(() => {
1383
+ const baseColor = props.color || "var(--el-color-primary)";
1384
+ const isHorizontal = props.direction === "horizontal";
1385
+ return {
1386
+ borderTop: isHorizontal ? `${props.line} ${baseColor}` : "none",
1387
+ borderLeft: !isHorizontal ? `${props.line} ${baseColor}` : "none",
1388
+ height: isHorizontal ? "0" : "100%",
1389
+ width: isHorizontal ? "100%" : "0",
1390
+ margin: isHorizontal ? "24px 0" : "0"
1391
+ };
1392
+ });
1393
+ return (_ctx, _cache) => {
1394
+ return vue.openBlock(), vue.createElementBlock("hr", {
1395
+ style: vue.normalizeStyle(style.value)
1396
+ }, null, 4);
1397
+ };
1398
+ }
1399
+ });
1400
+ const FDivider = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-512ee743"]]);
1401
+ const _hoisted_1$k = ["src", "alt"];
1402
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
1403
+ __name: "FAvatar",
1404
+ props: {
1405
+ src: {},
1406
+ alt: {},
1407
+ size: { default: "normal" },
1408
+ shape: { default: "circle" },
1409
+ icon: {}
1410
+ },
1411
+ setup(__props) {
1412
+ const props = __props;
1413
+ const sizeMap = {
1414
+ small: "32px",
1415
+ normal: "48px",
1416
+ large: "64px"
1417
+ };
1418
+ const AvatarStyle = vue.computed(() => {
1419
+ return {
1420
+ width: typeof props.size === "string" ? sizeMap[props.size] : `${props.size}px`,
1421
+ height: typeof props.size === "string" ? sizeMap[props.size] : `${props.size}px`,
1422
+ borderRadius: props.shape === "circle" ? "50%" : "8px"
1423
+ };
1424
+ });
1425
+ return (_ctx, _cache) => {
1426
+ return vue.openBlock(), vue.createElementBlock("div", {
1427
+ class: "f-avatar",
1428
+ style: vue.normalizeStyle(vue.unref(AvatarStyle))
1429
+ }, [
1430
+ _ctx.src ? (vue.openBlock(), vue.createElementBlock("img", {
1431
+ key: 0,
1432
+ src: _ctx.src,
1433
+ alt: _ctx.alt
1434
+ }, null, 8, _hoisted_1$k)) : (vue.openBlock(), vue.createBlock(FIcon, {
1435
+ key: 1,
1436
+ size: 24
1437
+ }, {
1438
+ default: vue.withCtx(() => [
1439
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon ? _ctx.icon : vue.unref(ionicons5.Person))))
1440
+ ]),
1441
+ _: 1
1442
+ }))
1443
+ ], 4);
1444
+ };
1445
+ }
1446
+ });
1447
+ const FAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-b3665268"]]);
1448
+ const _hoisted_1$j = ["type", "disabled"];
1449
+ const _hoisted_2$g = {
1450
+ key: 0,
1451
+ class: "f-loader"
1452
+ };
1453
+ const _hoisted_3$g = {
1454
+ key: 2,
1455
+ class: "f-button__content"
1456
+ };
1457
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
1458
+ __name: "FButton",
1459
+ props: {
1460
+ type: {},
1461
+ size: {},
1462
+ nativeType: { default: "button" },
1463
+ loading: { type: Boolean },
1464
+ disabled: { type: Boolean },
1465
+ round: { type: [Boolean, Number], default: false },
1466
+ circle: { type: Boolean },
1467
+ plain: { type: Boolean },
1468
+ block: { type: Boolean },
1469
+ icon: {},
1470
+ bgColor: {},
1471
+ color: {}
1472
+ },
1473
+ setup(__props) {
1474
+ const SIZE_MAP = {
1475
+ small: { h: "24px", p: "0 8px", f: "12px" },
1476
+ normal: { h: "32px", p: "0 15px", f: "14px" },
1477
+ large: { h: "40px", p: "0 20px", f: "16px" }
1478
+ };
1479
+ const props = __props;
1480
+ const groupContext = vue.inject("FButtonGroupContext", null);
1481
+ const mergedSize = vue.computed(() => {
1482
+ var _a, _b;
1483
+ return (_b = (_a = props.size) != null ? _a : groupContext == null ? void 0 : groupContext.size) != null ? _b : "normal";
1484
+ });
1485
+ const mergedType = vue.computed(() => {
1486
+ var _a, _b;
1487
+ return (_b = (_a = props.type) != null ? _a : groupContext == null ? void 0 : groupContext.type) != null ? _b : "default";
1488
+ });
1489
+ const isDisabled = vue.computed(() => props.disabled || props.loading || (groupContext == null ? void 0 : groupContext.disabled));
1490
+ const buttonStyle = vue.computed(() => {
1491
+ const s = SIZE_MAP[mergedSize.value] || SIZE_MAP.normal;
1492
+ const style = {
1493
+ height: s.h,
1494
+ padding: props.circle ? "0" : s.p,
1495
+ fontSize: s.f,
1496
+ minWidth: s.h,
1497
+ backgroundColor: props.bgColor,
1498
+ color: props.color
1499
+ };
1500
+ if (props.circle) {
1501
+ style.width = s.h;
1502
+ style.borderRadius = "50%";
1503
+ } else if (typeof props.round === "number") {
1504
+ style.borderRadius = `${props.round}px`;
1505
+ } else if (props.round) {
1506
+ style.borderRadius = "999px";
1507
+ }
1508
+ return style;
1509
+ });
1510
+ return (_ctx, _cache) => {
1511
+ return vue.openBlock(), vue.createElementBlock("button", {
1512
+ type: _ctx.nativeType,
1513
+ class: vue.normalizeClass(["f-button", [
1514
+ `f-button--${vue.unref(mergedType)}`,
1515
+ `f-button--${vue.unref(mergedSize)}`,
1516
+ {
1517
+ "is-disabled": vue.unref(isDisabled),
1518
+ "is-loading": _ctx.loading,
1519
+ "is-plain": _ctx.plain,
1520
+ "is-block": _ctx.block
1521
+ }
1522
+ ]]),
1523
+ disabled: vue.unref(isDisabled),
1524
+ style: vue.normalizeStyle(vue.unref(buttonStyle))
1525
+ }, [
1526
+ _ctx.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$g)) : _ctx.icon ? (vue.openBlock(), vue.createElementBlock("i", {
1527
+ key: 1,
1528
+ class: vue.normalizeClass(["f-icon", _ctx.icon])
1529
+ }, null, 2)) : vue.createCommentVNode("", true),
1530
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$g, [
1531
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1532
+ ])) : vue.createCommentVNode("", true)
1533
+ ], 14, _hoisted_1$j);
1534
+ };
1535
+ }
1536
+ });
1537
+ const FButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-04bddf31"]]);
1538
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
1539
+ __name: "FTypography",
1540
+ props: {
1541
+ color: { default: "" }
1542
+ },
1543
+ setup(__props) {
1544
+ const props = __props;
1545
+ const Style = vue.computed(() => {
1546
+ return {
1547
+ color: props.color
1548
+ };
1549
+ });
1550
+ return (_ctx, _cache) => {
1551
+ return vue.openBlock(), vue.createElementBlock("div", {
1552
+ class: "f-typography",
1553
+ style: vue.normalizeStyle(vue.unref(Style))
1554
+ }, [
1555
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1556
+ ], 4);
1557
+ };
1558
+ }
1559
+ });
1560
+ const FTypography = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-50e044db"]]);
1561
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
1562
+ __name: "FText",
1563
+ props: {
1564
+ tag: { default: "span" },
1565
+ heading: {},
1566
+ size: { default: "normal" },
1567
+ weight: { default: "normal" },
1568
+ color: {},
1569
+ truncate: { type: Boolean },
1570
+ italic: { type: Boolean }
1571
+ },
1572
+ setup(__props) {
1573
+ const props = __props;
1574
+ const headingSizeMap = {
1575
+ 1: "3xl",
1576
+ 2: "2xl",
1577
+ 3: "xl",
1578
+ 4: "lg",
1579
+ 5: "normal",
1580
+ 6: "sm"
1581
+ };
1582
+ const headingWeightMap = {
1583
+ 1: "bolder",
1584
+ 2: "bold",
1585
+ 3: "bold",
1586
+ 4: "medium",
1587
+ 5: "medium",
1588
+ 6: "normal"
1589
+ };
1590
+ const resolvedTag = vue.computed(() => {
1591
+ var _a;
1592
+ return props.heading ? `h${props.heading}` : (_a = props.tag) != null ? _a : "span";
1593
+ });
1594
+ const resolvedSize = vue.computed(() => {
1595
+ var _a;
1596
+ return (_a = props.size) != null ? _a : props.heading ? headingSizeMap[props.heading] : "normal";
1597
+ });
1598
+ const resolvedWeight = vue.computed(() => {
1599
+ var _a;
1600
+ return (_a = props.weight) != null ? _a : props.heading ? headingWeightMap[props.heading] : "normal";
1601
+ });
1602
+ return (_ctx, _cache) => {
1603
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(resolvedTag)), {
1604
+ class: vue.normalizeClass(["f-text", [
1605
+ `f-text--${vue.unref(resolvedSize)}`,
1606
+ `f-text--${vue.unref(resolvedWeight)}`,
1607
+ _ctx.color && `f-text--${_ctx.color}`,
1608
+ { "f-text--truncate": _ctx.truncate, "f-text--italic": _ctx.italic }
1609
+ ]])
1610
+ }, {
1611
+ default: vue.withCtx(() => [
1612
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1613
+ ]),
1614
+ _: 3
1615
+ }, 8, ["class"]);
1616
+ };
1617
+ }
1618
+ });
1619
+ const FText = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-8bcfc6b3"]]);
1620
+ const _hoisted_1$i = ["href", "target", "rel"];
1621
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
1622
+ __name: "FLink",
1623
+ props: {
1624
+ href: {},
1625
+ target: { default: "_self" },
1626
+ underline: { default: "hover" },
1627
+ color: {},
1628
+ disabled: { type: Boolean }
1629
+ },
1630
+ setup(__props) {
1631
+ const props = __props;
1632
+ return (_ctx, _cache) => {
1633
+ return vue.openBlock(), vue.createElementBlock("a", {
1634
+ class: vue.normalizeClass(["f-link", [
1635
+ props.color && `f-link--${props.color}`,
1636
+ `f-link--underline-${props.underline}`,
1637
+ { "f-link--disabled": props.disabled }
1638
+ ]]),
1639
+ href: props.disabled ? void 0 : props.href,
1640
+ target: props.target,
1641
+ rel: props.target === "_blank" ? "noopener noreferrer" : void 0
1642
+ }, [
1643
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1644
+ ], 10, _hoisted_1$i);
1645
+ };
1646
+ }
1647
+ });
1648
+ const FLink = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-daaa3e25"]]);
1649
+ const _hoisted_1$h = { class: "f-badge" };
1650
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
1651
+ __name: "FBadge",
1652
+ props: {
1653
+ value: {},
1654
+ max: { default: 99 },
1655
+ dot: { type: Boolean, default: false },
1656
+ type: { default: "danger" },
1657
+ placement: { default: "top-right" },
1658
+ offset: { default: () => [0, 0] }
1659
+ },
1660
+ setup(__props) {
1661
+ const props = __props;
1662
+ const displayValue = vue.computed(() => {
1663
+ var _a;
1664
+ if (props.dot) return "";
1665
+ if (typeof props.value === "number" && props.value > props.max) return `${props.max}+`;
1666
+ return (_a = props.value) != null ? _a : "";
1667
+ });
1668
+ const contentStyle = vue.computed(() => {
1669
+ const [x, y] = props.offset;
1670
+ const map = {
1671
+ "top-right": { top: 0, right: 0, transform: `translate(calc(50% + ${x}px), calc(-50% + ${y}px))` },
1672
+ "top-left": { top: 0, left: 0, transform: `translate(calc(-50% + ${x}px), calc(-50% + ${y}px))` },
1673
+ "bottom-right": { bottom: 0, right: 0, transform: `translate(calc(50% + ${x}px), calc(50% + ${y}px))` },
1674
+ "bottom-left": { bottom: 0, left: 0, transform: `translate(calc(-50% + ${x}px), calc(50% + ${y}px))` }
1675
+ };
1676
+ return map[props.placement];
1677
+ });
1678
+ return (_ctx, _cache) => {
1679
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
1680
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
1681
+ _ctx.dot || _ctx.value !== void 0 && _ctx.value !== "" ? (vue.openBlock(), vue.createElementBlock("span", {
1682
+ key: 0,
1683
+ class: vue.normalizeClass(["f-badge__content", [`f-badge--${_ctx.type}`, { "f-badge--dot": _ctx.dot }]]),
1684
+ style: vue.normalizeStyle(vue.unref(contentStyle))
1685
+ }, vue.toDisplayString(vue.unref(displayValue)), 7)) : vue.createCommentVNode("", true)
1686
+ ]);
1687
+ };
1688
+ }
1689
+ });
1690
+ const FBadge = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-be6947ff"]]);
1691
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
1692
+ __name: "FAffix",
1693
+ props: {
1694
+ placement: { default: "top-right" },
1695
+ offset: { default: () => [8, 8] }
1696
+ },
1697
+ setup(__props) {
1698
+ const props = __props;
1699
+ const style = vue.computed(() => {
1700
+ const [x, y] = props.offset;
1701
+ const map = {
1702
+ "top-left": { top: `${y}px`, left: `${x}px` },
1703
+ "top-right": { top: `${y}px`, right: `${x}px` },
1704
+ "bottom-left": { bottom: `${y}px`, left: `${x}px` },
1705
+ "bottom-right": { bottom: `${y}px`, right: `${x}px` }
1706
+ };
1707
+ return map[props.placement];
1708
+ });
1709
+ return (_ctx, _cache) => {
1710
+ return vue.openBlock(), vue.createElementBlock("div", {
1711
+ class: "f-affix",
1712
+ style: vue.normalizeStyle(vue.unref(style))
1713
+ }, [
1714
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1715
+ ], 4);
1716
+ };
1717
+ }
1718
+ });
1719
+ const FAffix = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-8506d679"]]);
1720
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
1721
+ __name: "FForm",
1722
+ props: {
1723
+ model: {},
1724
+ rules: { default: () => ({}) },
1725
+ labelWidth: { default: "80px" },
1726
+ labelPosition: { default: "right" },
1727
+ size: { default: "normal" }
1728
+ },
1729
+ setup(__props, { expose: __expose }) {
1730
+ const props = __props;
1731
+ const fields = vue.ref([]);
1732
+ const registerField = (field) => {
1733
+ fields.value.push(field);
1734
+ };
1735
+ const unregisterField = (prop) => {
1736
+ fields.value = fields.value.filter((f) => f.prop !== prop);
1737
+ };
1738
+ vue.provide("FFormContext", {
1739
+ model: props.model,
1740
+ rules: props.rules,
1741
+ labelWidth: props.labelWidth,
1742
+ labelPosition: vue.computed(() => props.labelPosition),
1743
+ size: vue.computed(() => props.size),
1744
+ registerField,
1745
+ unregisterField
1746
+ });
1747
+ const validate = () => __async(null, null, function* () {
1748
+ const validationPromises = fields.value.map((field) => field.validate());
1749
+ const results = yield Promise.all(validationPromises);
1750
+ const errors = results.filter((msg) => msg !== void 0);
1751
+ if (errors.length > 0) {
1752
+ throw new Error("表单校验失败");
1753
+ }
1754
+ return true;
1755
+ });
1756
+ const resetFields = () => {
1757
+ fields.value.forEach((field) => field.clearValidate());
1758
+ };
1759
+ __expose({
1760
+ validate,
1761
+ resetFields
1762
+ });
1763
+ return (_ctx, _cache) => {
1764
+ return vue.openBlock(), vue.createElementBlock("form", {
1765
+ class: vue.normalizeClass(["f-form", [
1766
+ `f-form--label-${_ctx.labelPosition}`,
1767
+ `f-form--size-${_ctx.size}`
1768
+ ]]),
1769
+ onSubmit: _cache[0] || (_cache[0] = vue.withModifiers(() => {
1770
+ }, ["prevent"]))
1771
+ }, [
1772
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1773
+ ], 34);
1774
+ };
1775
+ }
1776
+ });
1777
+ const FForm = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-21f7de9b"]]);
1778
+ const validateSingleField = (value, rules) => __async(null, null, function* () {
1779
+ const ruleArray = Array.isArray(rules) ? rules : [rules];
1780
+ for (let rule of ruleArray) {
1781
+ if (rule.transform) {
1782
+ value = rule.transform(value);
1783
+ }
1784
+ const isEmpty = value === void 0 || value === null || value === "";
1785
+ const isAllWhitespace = rule.whitespace && typeof value === "string" && value.trim() === "";
1786
+ if (rule.required && (isEmpty || isAllWhitespace)) {
1787
+ return rule.message || "此字段为必填项";
1788
+ }
1789
+ if (!rule.required && isEmpty) continue;
1790
+ if (rule.type) {
1791
+ const typeError = checkType(value, rule);
1792
+ if (typeError) return typeError;
1793
+ }
1794
+ const rangeError = checkRange(value, rule);
1795
+ if (rangeError) return rangeError;
1796
+ if (rule.pattern && !rule.pattern.test(String(value))) {
1797
+ return rule.message || "格式不匹配";
1798
+ }
1799
+ if (rule.enum && !rule.enum.includes(value)) {
1800
+ return rule.message || "不在指定的枚举范围内";
1801
+ }
1802
+ if (rule.validator) {
1803
+ const result = yield Promise.resolve(rule.validator(value, rule));
1804
+ if (typeof result === "string") return result;
1805
+ if (result === false) return rule.message || "校验失败";
1806
+ }
1807
+ }
1808
+ return void 0;
1809
+ });
1810
+ const checkType = (value, rule) => {
1811
+ const { type, message } = rule;
1812
+ switch (type) {
1813
+ case "string":
1814
+ if (typeof value !== "string") return message || "必须是字符串";
1815
+ break;
1816
+ case "number":
1817
+ if (typeof value !== "number" || isNaN(value)) return message || "必须是数字";
1818
+ break;
1819
+ case "integer":
1820
+ if (!Number.isInteger(value)) return message || "必须是整数";
1821
+ break;
1822
+ case "boolean":
1823
+ if (typeof value !== "boolean") return message || "必须是布尔值";
1824
+ break;
1825
+ case "array":
1826
+ if (!Array.isArray(value)) return message || "必须是数组";
1827
+ break;
1828
+ case "object":
1829
+ if (typeof value !== "object" || value === null) return message || "必须是对象";
1830
+ break;
1831
+ case "email":
1832
+ const emailRegex = /^[^\s@]+@([^\s@]+\.)+[^\s@]+$/;
1833
+ if (!emailRegex.test(value)) return message || "邮箱格式不正确";
1834
+ break;
1835
+ case "regexp":
1836
+ if (rule.pattern && !rule.pattern.test(String(value))) {
1837
+ return rule.message || "格式不匹配";
1838
+ }
1839
+ break;
1840
+ }
1841
+ return void 0;
1842
+ };
1843
+ const checkRange = (value, rule) => {
1844
+ const { min, max, len, message, type } = rule;
1845
+ const isNum = type === "number" || type === "integer" || type === "float";
1846
+ const valToMeasure = isNum && typeof value === "number" ? value : value == null ? void 0 : value.length;
1847
+ if (valToMeasure === void 0) return void 0;
1848
+ if (len !== void 0 && valToMeasure !== len) {
1849
+ return message || (isNum ? `值必须等于 ${len}` : `长度必须为 ${len}`);
1850
+ }
1851
+ if (min !== void 0 && valToMeasure < min) {
1852
+ return message || (isNum ? `最小值不能小于 ${min}` : `长度不能小于 ${min}`);
1853
+ }
1854
+ if (max !== void 0 && valToMeasure > max) {
1855
+ return message || (isNum ? `最大值不能大于 ${max}` : `长度不能大于 ${max}`);
1856
+ }
1857
+ return void 0;
1858
+ };
1859
+ const _hoisted_1$g = {
1860
+ key: 0,
1861
+ class: "star"
1862
+ };
1863
+ const _hoisted_2$f = { class: "f-form-item__content" };
1864
+ const _hoisted_3$f = {
1865
+ key: 0,
1866
+ class: "f-form-item__error"
1867
+ };
1868
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
1869
+ __name: "FFormItem",
1870
+ props: {
1871
+ label: {},
1872
+ prop: {}
1873
+ },
1874
+ setup(__props, { expose: __expose }) {
1875
+ const props = __props;
1876
+ const formContext = vue.inject("FFormContext");
1877
+ const errorMsg = vue.ref("");
1878
+ const labelPosition = vue.computed(() => {
1879
+ var _a;
1880
+ return ((_a = formContext == null ? void 0 : formContext.labelPosition) == null ? void 0 : _a.value) || "right";
1881
+ });
1882
+ const size = vue.computed(() => {
1883
+ var _a;
1884
+ return ((_a = formContext == null ? void 0 : formContext.size) == null ? void 0 : _a.value) || "default";
1885
+ });
1886
+ const activeRules = vue.computed(() => {
1887
+ if (!(formContext == null ? void 0 : formContext.rules) || !props.prop) return [];
1888
+ const rules = formContext.rules[props.prop] || [];
1889
+ return Array.isArray(rules) ? rules : [rules];
1890
+ });
1891
+ const isRequired = vue.computed(() => activeRules.value.some((r) => r.required));
1892
+ const validate = () => __async(null, null, function* () {
1893
+ if (!props.prop || !formContext) return void 0;
1894
+ const value = formContext.model[props.prop];
1895
+ const result = yield validateSingleField(value, activeRules.value);
1896
+ errorMsg.value = result || "";
1897
+ return result;
1898
+ });
1899
+ const clearValidate = () => {
1900
+ errorMsg.value = "";
1901
+ };
1902
+ vue.provide("FFormItemContext", { errorMsg, validate });
1903
+ vue.onMounted(() => {
1904
+ if (props.prop && (formContext == null ? void 0 : formContext.registerField)) {
1905
+ formContext.registerField({ prop: props.prop, validate, clearValidate });
1906
+ }
1907
+ });
1908
+ vue.onUnmounted(() => {
1909
+ if (props.prop && (formContext == null ? void 0 : formContext.unregisterField)) {
1910
+ formContext.unregisterField(props.prop);
1911
+ }
1912
+ });
1913
+ vue.watch(() => formContext == null ? void 0 : formContext.model[props.prop], () => {
1914
+ if (errorMsg.value) validate();
1915
+ });
1916
+ __expose({ validate, clearValidate });
1917
+ return (_ctx, _cache) => {
1918
+ var _a;
1919
+ return vue.openBlock(), vue.createElementBlock("div", {
1920
+ class: vue.normalizeClass(["f-form-item", [
1921
+ `is-label-${vue.unref(labelPosition)}`,
1922
+ `is-size-${vue.unref(size)}`,
1923
+ { "is-error": vue.unref(errorMsg) }
1924
+ ]])
1925
+ }, [
1926
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
1927
+ key: 0,
1928
+ class: "f-form-item__label",
1929
+ style: vue.normalizeStyle({
1930
+ width: vue.unref(labelPosition) === "top" ? "100%" : (_a = vue.unref(formContext)) == null ? void 0 : _a.labelWidth,
1931
+ textAlign: vue.unref(labelPosition) === "top" ? "left" : vue.unref(labelPosition)
1932
+ })
1933
+ }, [
1934
+ vue.unref(isRequired) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$g, "*")) : vue.createCommentVNode("", true),
1935
+ vue.createTextVNode(" " + vue.toDisplayString(_ctx.label) + ": ", 1)
1936
+ ], 4)) : vue.createCommentVNode("", true),
1937
+ vue.createElementVNode("div", _hoisted_2$f, [
1938
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
1939
+ vue.createVNode(vue.Transition, { name: "err-slide" }, {
1940
+ default: vue.withCtx(() => [
1941
+ vue.unref(errorMsg) ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$f, vue.toDisplayString(vue.unref(errorMsg)), 1)) : vue.createCommentVNode("", true)
1942
+ ]),
1943
+ _: 1
1944
+ })
1945
+ ])
1946
+ ], 2);
1947
+ };
1948
+ }
1949
+ });
1950
+ const FFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-c3d6ec01"]]);
1951
+ const _hoisted_1$f = { class: "f-checkbox__wrapper" };
1952
+ const _hoisted_2$e = ["checked", "disabled"];
1953
+ const _hoisted_3$e = {
1954
+ key: 0,
1955
+ class: "f-checkbox__label"
1956
+ };
1957
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
1958
+ __name: "FCheckbox",
1959
+ props: /* @__PURE__ */ vue.mergeModels({
1960
+ label: {},
1961
+ disabled: { type: Boolean }
1962
+ }, {
1963
+ "modelValue": __spreadValues({ type: Boolean }, { default: false }),
1964
+ "modelModifiers": {}
1965
+ }),
1966
+ emits: ["update:modelValue"],
1967
+ setup(__props) {
1968
+ const modelValue = vue.useModel(__props, "modelValue");
1969
+ const props = __props;
1970
+ const handleChange = (e) => {
1971
+ if (props.disabled) return;
1972
+ const target = e.target;
1973
+ modelValue.value = target.checked;
1974
+ };
1975
+ return (_ctx, _cache) => {
1976
+ return vue.openBlock(), vue.createElementBlock("label", {
1977
+ class: vue.normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
1978
+ }, [
1979
+ vue.createElementVNode("span", _hoisted_1$f, [
1980
+ vue.createElementVNode("input", {
1981
+ type: "checkbox",
1982
+ checked: modelValue.value,
1983
+ disabled: _ctx.disabled,
1984
+ onChange: handleChange
1985
+ }, null, 40, _hoisted_2$e),
1986
+ _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
1987
+ ]),
1988
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$e, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true)
1989
+ ], 2);
1990
+ };
1991
+ }
1992
+ });
1993
+ const FCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-633b283a"]]);
1994
+ const _hoisted_1$b = { class: "alert__body" };
1995
+ const _hoisted_2$a = { class: "alert__title" };
1996
+ const _hoisted_3$a = { class: "alert__content" };
1997
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
1998
+ __name: "FAlert",
1999
+ props: {
2000
+ type: { default: "info" },
2001
+ title: {},
2002
+ content: {}
2003
+ },
2004
+ setup(__props) {
2005
+ const props = __props;
2006
+ const config = vue.computed(() => ({
2007
+ success: { icon: ionicons5.CheckmarkCircleOutline, label: "Success" },
2008
+ error: { icon: ionicons5.AlertCircleOutline, label: "Error" },
2009
+ warning: { icon: ionicons5.WarningOutline, label: "Warning" },
2010
+ info: { icon: ionicons5.InformationCircleOutline, label: "Tips" }
2011
+ })[props.type]);
2012
+ return (_ctx, _cache) => {
2013
+ var _a;
2014
+ return vue.openBlock(), vue.createElementBlock("div", {
2015
+ class: vue.normalizeClass(["alert", `alert--${_ctx.type}`])
2016
+ }, [
2017
+ vue.createVNode(FIcon, { class: "alert__icon" }, {
2018
+ default: vue.withCtx(() => [
2019
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(config).icon)))
2020
+ ]),
2021
+ _: 1
2022
+ }),
2023
+ vue.createElementVNode("div", _hoisted_1$b, [
2024
+ vue.createElementVNode("h4", _hoisted_2$a, vue.toDisplayString((_a = _ctx.title) != null ? _a : vue.unref(config).label), 1),
2025
+ vue.createElementVNode("div", _hoisted_3$a, [
2026
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
2027
+ vue.createTextVNode(vue.toDisplayString(_ctx.content), 1)
2028
+ ], true)
2029
+ ])
2030
+ ])
2031
+ ], 2);
2032
+ };
2033
+ }
2034
+ });
2035
+ const FAlert = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-f16678ef"]]);
2036
+ const _hoisted_1$9 = { class: "f-editor__toolbar" };
2037
+ const _hoisted_2$8 = { class: "f-editor__status" };
2038
+ const _hoisted_3$8 = { class: "f-editor__lines" };
2039
+ const _hoisted_4$6 = { class: "f-editor__code-wrapper" };
2040
+ const _hoisted_5$6 = ["innerHTML"];
2041
+ const _hoisted_6$5 = ["rows", "readonly", "placeholder"];
2042
+ const LINE_HEIGHT_PX = 17.6;
2043
+ const PADDING_TOP_PX = 12;
2044
+ const MIN_BODY_HEIGHT = 180;
2045
+ const HEAVY_LINE_THRESHOLD = 1500;
2046
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
2047
+ __name: "FEditor",
2048
+ props: /* @__PURE__ */ vue.mergeModels({
2049
+ placeholder: {},
2050
+ rows: {},
2051
+ language: {},
2052
+ readonly: { type: Boolean },
2053
+ showLine: { type: Boolean },
2054
+ height: { default: 420 }
2055
+ }, {
2056
+ "modelValue": { default: "" },
2057
+ "modelModifiers": {}
2058
+ }),
2059
+ emits: /* @__PURE__ */ vue.mergeModels(["blur"], ["update:modelValue"]),
2060
+ setup(__props, { emit: __emit }) {
2061
+ const model = vue.useModel(__props, "modelValue");
2062
+ const props = __props;
2063
+ const emit = __emit;
2064
+ const textareaRef = vue.ref();
2065
+ const highlightRef = vue.ref();
2066
+ const gutterRef = vue.ref();
2067
+ const scrollTop = vue.ref(0);
2068
+ const currentLine = vue.ref(1);
2069
+ const cursorPos = vue.ref(0);
2070
+ const onKeydown = (e) => {
2071
+ if (e.key === "Tab") {
2072
+ e.preventDefault();
2073
+ const el = textareaRef.value;
2074
+ if (!el) return;
2075
+ const start = el.selectionStart;
2076
+ const end = el.selectionEnd;
2077
+ model.value = model.value.slice(0, start) + " " + model.value.slice(end);
2078
+ vue.nextTick(() => {
2079
+ el.selectionStart = el.selectionEnd = start + 2;
2080
+ });
2081
+ return;
2082
+ }
2083
+ if (e.key === "Enter") {
2084
+ const el = textareaRef.value;
2085
+ if (!el) return;
2086
+ const start = el.selectionStart;
2087
+ const lineStart = model.value.lastIndexOf("\n", start - 1) + 1;
2088
+ const currentLineText = model.value.slice(lineStart, start);
2089
+ const indentMatch = currentLineText.match(/^\s*/);
2090
+ const indent = indentMatch ? indentMatch[0] : "";
2091
+ const lastChar = currentLineText.trim().slice(-1);
2092
+ const extra = lastChar === "{" || lastChar === "[" ? " " : "";
2093
+ if (extra) {
2094
+ e.preventDefault();
2095
+ const insert = "\n" + indent + extra;
2096
+ model.value = model.value.slice(0, start) + insert + model.value.slice(start);
2097
+ vue.nextTick(() => {
2098
+ el.selectionStart = el.selectionEnd = start + insert.length;
2099
+ });
2100
+ }
2101
+ }
2102
+ };
2103
+ const MAX_BODY_HEIGHT = props.height;
2104
+ const bodyHeight = vue.computed(() => {
2105
+ const contentHeight = PADDING_TOP_PX * 2 + lineCount.value * LINE_HEIGHT_PX;
2106
+ return Math.min(MAX_BODY_HEIGHT, Math.max(MIN_BODY_HEIGHT, contentHeight));
2107
+ });
2108
+ const updateCursorInfo = () => {
2109
+ const el = textareaRef.value;
2110
+ if (!el) return;
2111
+ cursorPos.value = el.selectionStart;
2112
+ currentLine.value = model.value.slice(0, el.selectionStart).split("\n").length;
2113
+ };
2114
+ const lines = vue.computed(() => model.value.split("\n"));
2115
+ const lineCount = vue.computed(() => lines.value.length);
2116
+ const isHeavy = vue.computed(() => lineCount.value > HEAVY_LINE_THRESHOLD);
2117
+ let debounceTimer = null;
2118
+ const debouncedSource = vue.ref(model.value);
2119
+ vue.watch(model, (val) => {
2120
+ if (debounceTimer) clearTimeout(debounceTimer);
2121
+ const delay = val.length > 2e4 ? 120 : 0;
2122
+ debounceTimer = setTimeout(() => {
2123
+ debouncedSource.value = val;
2124
+ }, delay);
2125
+ }, { immediate: true });
2126
+ const errorPosition = vue.computed(() => {
2127
+ if (props.language !== "json" || !debouncedSource.value.trim()) return null;
2128
+ try {
2129
+ JSON.parse(debouncedSource.value);
2130
+ return null;
2131
+ } catch (err) {
2132
+ const msg = err.message || "";
2133
+ const posMatch = msg.match(/position (\d+)/);
2134
+ if (posMatch) return parseInt(posMatch[1], 10);
2135
+ const lineColMatch = msg.match(/line (\d+) column (\d+)/);
2136
+ if (lineColMatch) {
2137
+ const line = parseInt(lineColMatch[1], 10);
2138
+ const col = parseInt(lineColMatch[2], 10);
2139
+ const ls = debouncedSource.value.split("\n");
2140
+ let offset = 0;
2141
+ for (let i = 0; i < line - 1; i++) offset += ls[i].length + 1;
2142
+ return offset + col - 1;
2143
+ }
2144
+ return debouncedSource.value.length;
2145
+ }
2146
+ });
2147
+ const errorLine = vue.computed(() => {
2148
+ if (errorPosition.value === null) return null;
2149
+ return debouncedSource.value.slice(0, errorPosition.value).split("\n").length;
2150
+ });
2151
+ const isJsonValid = vue.computed(() => errorPosition.value === null);
2152
+ const formatJson = () => {
2153
+ if (props.language !== "json") return;
2154
+ try {
2155
+ model.value = JSON.stringify(JSON.parse(model.value), null, 2);
2156
+ } catch (e) {
2157
+ }
2158
+ };
2159
+ const escapeHtml = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2160
+ const tokenize = (text) => {
2161
+ const escaped = escapeHtml(text);
2162
+ return escaped.replace(/("(?:\\.|[^"\\])*")(\s*:)?/g, (_m, str, colon) => {
2163
+ const cls = colon ? "tok-key" : "tok-string";
2164
+ return `<span class="${cls}">${str}</span>${colon ? colon : ""}`;
2165
+ }).replace(/\b(true|false|null)\b/g, '<span class="tok-keyword">$1</span>').replace(/(-?\b\d+\.?\d*(?:[eE][+-]?\d+)?\b)/g, '<span class="tok-number">$1</span>').replace(/([{}[\],])/g, '<span class="tok-punct">$1</span>');
2166
+ };
2167
+ const renderedLines = vue.computed(() => {
2168
+ const src = debouncedSource.value;
2169
+ const ls = src.split("\n");
2170
+ const errPos = errorPosition.value;
2171
+ const errLn = errorLine.value;
2172
+ let runningOffset = 0;
2173
+ return ls.map((lineText, idx) => {
2174
+ const lineNo = idx + 1;
2175
+ const lineStart = runningOffset;
2176
+ runningOffset += lineText.length + 1;
2177
+ let html;
2178
+ if (errLn === lineNo && errPos !== null) {
2179
+ const localPos = errPos - lineStart;
2180
+ const before = lineText.slice(0, Math.max(0, localPos));
2181
+ const errChar = lineText.slice(localPos, localPos + 1) || " ";
2182
+ const after = lineText.slice(localPos + 1);
2183
+ html = (isHeavy.value ? escapeHtml(before) : tokenize(before)) + `<span class="tok-error">${escapeHtml(errChar)}</span>` + (isHeavy.value ? escapeHtml(after) : tokenize(after));
2184
+ } else if (props.language === "json" && !isHeavy.value) {
2185
+ html = tokenize(lineText);
2186
+ } else {
2187
+ html = escapeHtml(lineText);
2188
+ }
2189
+ return { lineNo, html: html || "&nbsp;" };
2190
+ });
2191
+ });
2192
+ const syncScroll = () => {
2193
+ if (!textareaRef.value) return;
2194
+ scrollTop.value = textareaRef.value.scrollTop;
2195
+ if (highlightRef.value) {
2196
+ highlightRef.value.scrollTop = textareaRef.value.scrollTop;
2197
+ highlightRef.value.scrollLeft = textareaRef.value.scrollLeft;
2198
+ }
2199
+ if (gutterRef.value) {
2200
+ gutterRef.value.scrollTop = textareaRef.value.scrollTop;
2201
+ }
2202
+ };
2203
+ const onInputOrScroll = () => {
2204
+ syncScroll();
2205
+ updateCursorInfo();
2206
+ };
2207
+ return (_ctx, _cache) => {
2208
+ var _a;
2209
+ return vue.openBlock(), vue.createElementBlock("div", {
2210
+ class: vue.normalizeClass(["f-editor", { "f-editor--invalid": !vue.unref(isJsonValid) }])
2211
+ }, [
2212
+ vue.createElementVNode("div", _hoisted_1$9, [
2213
+ vue.createElementVNode("span", _hoisted_2$8, [
2214
+ vue.createElementVNode("span", _hoisted_3$8, vue.toDisplayString(vue.unref(lineCount)) + " 行", 1),
2215
+ vue.unref(isHeavy) ? (vue.openBlock(), vue.createBlock(FTag, {
2216
+ key: 0,
2217
+ color: "orange",
2218
+ type: "square",
2219
+ effect: "plain"
2220
+ }, {
2221
+ default: vue.withCtx(() => _cache[2] || (_cache[2] = [
2222
+ vue.createTextVNode("大文件模式")
2223
+ ])),
2224
+ _: 1,
2225
+ __: [2]
2226
+ })) : vue.createCommentVNode("", true)
2227
+ ]),
2228
+ _ctx.language === "json" ? (vue.openBlock(), vue.createElementBlock("button", {
2229
+ key: 0,
2230
+ type: "button",
2231
+ class: "f-editor__format",
2232
+ onClick: formatJson
2233
+ }, " 格式化 ")) : vue.createCommentVNode("", true)
2234
+ ]),
2235
+ vue.createElementVNode("div", {
2236
+ class: "f-editor__body",
2237
+ style: vue.normalizeStyle({ height: `${vue.unref(bodyHeight)}px` })
2238
+ }, [
2239
+ _ctx.showLine ? (vue.openBlock(), vue.createElementBlock("div", {
2240
+ key: 0,
2241
+ ref_key: "gutterRef",
2242
+ ref: gutterRef,
2243
+ class: "f-editor__gutter"
2244
+ }, [
2245
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(lineCount), (ln) => {
2246
+ return vue.openBlock(), vue.createElementBlock("div", {
2247
+ key: ln,
2248
+ class: vue.normalizeClass(["f-editor__gutter-line", { "f-editor__gutter-line--active": ln === vue.unref(currentLine) }])
2249
+ }, vue.toDisplayString(ln), 3);
2250
+ }), 128))
2251
+ ], 512)) : vue.createCommentVNode("", true),
2252
+ vue.createElementVNode("div", _hoisted_4$6, [
2253
+ vue.createElementVNode("div", {
2254
+ class: "f-editor__active-line",
2255
+ style: vue.normalizeStyle({
2256
+ top: `${PADDING_TOP_PX + (vue.unref(currentLine) - 1) * LINE_HEIGHT_PX - vue.unref(scrollTop)}px`,
2257
+ height: `${LINE_HEIGHT_PX}px`
2258
+ })
2259
+ }, null, 4),
2260
+ vue.createElementVNode("pre", {
2261
+ ref_key: "highlightRef",
2262
+ ref: highlightRef,
2263
+ class: "f-editor__highlight"
2264
+ }, [
2265
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(renderedLines), (line) => {
2266
+ return vue.openBlock(), vue.createElementBlock("span", {
2267
+ key: line.lineNo,
2268
+ class: "f-editor__line",
2269
+ innerHTML: line.html + "\n"
2270
+ }, null, 8, _hoisted_5$6);
2271
+ }), 128))
2272
+ ], 512),
2273
+ vue.withDirectives(vue.createElementVNode("textarea", {
2274
+ ref_key: "textareaRef",
2275
+ ref: textareaRef,
2276
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
2277
+ rows: (_a = _ctx.rows) != null ? _a : 8,
2278
+ readonly: "readonly" in _ctx ? _ctx.readonly : vue.unref(vue.readonly),
2279
+ class: "f-editor__textarea",
2280
+ spellcheck: "false",
2281
+ placeholder: _ctx.placeholder,
2282
+ onKeydown,
2283
+ onScroll: syncScroll,
2284
+ onInput: onInputOrScroll,
2285
+ onClick: updateCursorInfo,
2286
+ onKeyup: updateCursorInfo,
2287
+ onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur"))
2288
+ }, null, 40, _hoisted_6$5), [
2289
+ [vue.vModelText, model.value]
2290
+ ])
2291
+ ])
2292
+ ], 4)
2293
+ ], 2);
2294
+ };
2295
+ }
2296
+ });
2297
+ const FEditor = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-6d590649"]]);
2298
+ const _hoisted_1$8 = { class: "f-table" };
2299
+ const _hoisted_2$7 = {
2300
+ key: 0,
2301
+ class: "f-table__loading"
2302
+ };
2303
+ const _hoisted_3$7 = { class: "f-table__inner" };
2304
+ const _hoisted_4$5 = {
2305
+ key: 0,
2306
+ class: "f-table__col--index"
2307
+ };
2308
+ const _hoisted_5$5 = { class: "f-table__head" };
2309
+ const _hoisted_6$4 = {
2310
+ key: 0,
2311
+ class: "f-table__th f-table__th--index"
2312
+ };
2313
+ const _hoisted_7$1 = { class: "f-table__th-inner" };
2314
+ const _hoisted_8 = { class: "f-table__body" };
2315
+ const _hoisted_9 = {
2316
+ key: 0,
2317
+ class: "f-table__spacer"
2318
+ };
2319
+ const _hoisted_10 = ["colspan"];
2320
+ const _hoisted_11 = {
2321
+ key: 0,
2322
+ class: "f-table__td f-table__td--index"
2323
+ };
2324
+ const _hoisted_12 = { key: 2 };
2325
+ const _hoisted_13 = ["colspan"];
2326
+ const _hoisted_14 = {
2327
+ key: 3,
2328
+ class: "f-table__spacer"
2329
+ };
2330
+ const _hoisted_15 = ["colspan"];
2331
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
2332
+ __name: "FTable",
2333
+ props: {
2334
+ data: {},
2335
+ columns: {},
2336
+ rowHeight: { default: 40 },
2337
+ overscan: { default: 5 },
2338
+ showIndex: { type: Boolean, default: true },
2339
+ loading: { type: Boolean, default: false },
2340
+ loadingText: { default: "加载中..." },
2341
+ emptyText: { default: "暂无数据" }
2342
+ },
2343
+ setup(__props) {
2344
+ const props = __props;
2345
+ const scrollEl = vue.ref(null);
2346
+ const scrollTop = vue.ref(0);
2347
+ const viewportHeight = vue.ref(0);
2348
+ const colSpan = vue.computed(() => props.columns.length + (props.showIndex ? 1 : 0));
2349
+ const startIndex = vue.computed(() => {
2350
+ const raw = Math.floor(scrollTop.value / props.rowHeight) - props.overscan;
2351
+ return Math.max(0, raw);
2352
+ });
2353
+ const endIndex = vue.computed(() => {
2354
+ const visible = Math.ceil(viewportHeight.value / props.rowHeight);
2355
+ const raw = startIndex.value + visible + props.overscan * 2;
2356
+ return Math.min(props.data.length - 1, raw);
2357
+ });
2358
+ const visibleRows = vue.computed(
2359
+ () => props.data.slice(startIndex.value, endIndex.value + 1).map((row, i) => ({
2360
+ row,
2361
+ index: startIndex.value + i
2362
+ }))
2363
+ );
2364
+ const offsetTop = vue.computed(() => startIndex.value * props.rowHeight);
2365
+ const offsetBottom = vue.computed(
2366
+ () => Math.max(0, (props.data.length - endIndex.value - 1) * props.rowHeight)
2367
+ );
2368
+ const onScroll = (e) => {
2369
+ scrollTop.value = e.target.scrollTop;
2370
+ };
2371
+ const formatCell = (val) => {
2372
+ if (val === null || val === void 0) return "-";
2373
+ if (typeof val === "object") return JSON.stringify(val);
2374
+ return String(val);
2375
+ };
2376
+ let ro = null;
2377
+ vue.onMounted(() => {
2378
+ if (scrollEl.value) {
2379
+ viewportHeight.value = scrollEl.value.clientHeight;
2380
+ ro = new ResizeObserver(([entry]) => {
2381
+ if (entry)
2382
+ viewportHeight.value = entry.contentRect.height;
2383
+ });
2384
+ ro.observe(scrollEl.value);
2385
+ }
2386
+ });
2387
+ vue.onBeforeUnmount(() => {
2388
+ ro == null ? void 0 : ro.disconnect();
2389
+ });
2390
+ vue.watch(() => props.data, () => {
2391
+ if (scrollEl.value) scrollEl.value.scrollTop = 0;
2392
+ scrollTop.value = 0;
2393
+ });
2394
+ return (_ctx, _cache) => {
2395
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
2396
+ _ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
2397
+ _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "spinner" }, null, -1)),
2398
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.loadingText), 1)
2399
+ ])) : vue.createCommentVNode("", true),
2400
+ vue.createElementVNode("div", {
2401
+ class: "f-table__scroll",
2402
+ ref_key: "scrollEl",
2403
+ ref: scrollEl,
2404
+ onScroll
2405
+ }, [
2406
+ vue.createElementVNode("table", _hoisted_3$7, [
2407
+ vue.createElementVNode("colgroup", null, [
2408
+ _ctx.showIndex ? (vue.openBlock(), vue.createElementBlock("col", _hoisted_4$5)) : vue.createCommentVNode("", true),
2409
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.columns, (col) => {
2410
+ var _a, _b;
2411
+ return vue.openBlock(), vue.createElementBlock("col", {
2412
+ key: col.key,
2413
+ style: vue.normalizeStyle({
2414
+ width: (_a = col.width) != null ? _a : "auto",
2415
+ minWidth: (_b = col.minWidth) != null ? _b : "120px"
2416
+ })
2417
+ }, null, 4);
2418
+ }), 128))
2419
+ ]),
2420
+ vue.createElementVNode("thead", _hoisted_5$5, [
2421
+ vue.createElementVNode("tr", null, [
2422
+ _ctx.showIndex ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$4, "#")) : vue.createCommentVNode("", true),
2423
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.columns, (col) => {
2424
+ return vue.openBlock(), vue.createElementBlock("th", {
2425
+ key: col.key,
2426
+ class: vue.normalizeClass(["f-table__th", col.thClass])
2427
+ }, [
2428
+ vue.renderSlot(_ctx.$slots, `header-${col.key}`, { column: col }, () => [
2429
+ vue.createElementVNode("div", _hoisted_7$1, [
2430
+ vue.createElementVNode("span", null, vue.toDisplayString(col.label), 1)
2431
+ ])
2432
+ ], true)
2433
+ ], 2);
2434
+ }), 128))
2435
+ ])
2436
+ ]),
2437
+ vue.createElementVNode("tbody", _hoisted_8, [
2438
+ vue.unref(offsetTop) > 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_9, [
2439
+ vue.createElementVNode("td", {
2440
+ colspan: vue.unref(colSpan),
2441
+ style: vue.normalizeStyle({ height: vue.unref(offsetTop) + "px" })
2442
+ }, null, 12, _hoisted_10)
2443
+ ])) : vue.createCommentVNode("", true),
2444
+ vue.unref(visibleRows).length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(vue.unref(visibleRows), ({ row, index }) => {
2445
+ return vue.openBlock(), vue.createElementBlock("tr", {
2446
+ key: index,
2447
+ class: "f-table__row"
2448
+ }, [
2449
+ _ctx.showIndex ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_11, vue.toDisplayString(index + 1), 1)) : vue.createCommentVNode("", true),
2450
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.columns, (col) => {
2451
+ return vue.openBlock(), vue.createElementBlock("td", {
2452
+ key: col.key,
2453
+ class: vue.normalizeClass(["f-table__td", col.tdClass])
2454
+ }, [
2455
+ _ctx.$slots[`cell-${col.key}`] ? vue.renderSlot(_ctx.$slots, `cell-${col.key}`, {
2456
+ key: 0,
2457
+ row,
2458
+ value: row[col.key],
2459
+ index,
2460
+ col
2461
+ }, void 0, true) : _ctx.$slots.cell ? vue.renderSlot(_ctx.$slots, "cell", {
2462
+ key: 1,
2463
+ row,
2464
+ value: row[col.key],
2465
+ index,
2466
+ col
2467
+ }, void 0, true) : (vue.openBlock(), vue.createBlock(FTooltip, {
2468
+ key: 2,
2469
+ content: formatCell(row[col.key])
2470
+ }, {
2471
+ default: vue.withCtx(() => [
2472
+ vue.createTextVNode(vue.toDisplayString(formatCell(row[col.key])), 1)
2473
+ ]),
2474
+ _: 2
2475
+ }, 1032, ["content"]))
2476
+ ], 2);
2477
+ }), 128))
2478
+ ]);
2479
+ }), 128)) : !_ctx.loading ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_12, [
2480
+ vue.createElementVNode("td", {
2481
+ colspan: vue.unref(colSpan),
2482
+ class: "f-table__empty"
2483
+ }, [
2484
+ vue.renderSlot(_ctx.$slots, "empty", {}, () => [
2485
+ vue.createTextVNode(vue.toDisplayString(_ctx.emptyText), 1)
2486
+ ], true)
2487
+ ], 8, _hoisted_13)
2488
+ ])) : vue.createCommentVNode("", true),
2489
+ vue.unref(offsetBottom) > 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_14, [
2490
+ vue.createElementVNode("td", {
2491
+ colspan: vue.unref(colSpan),
2492
+ style: vue.normalizeStyle({ height: vue.unref(offsetBottom) + "px" })
2493
+ }, null, 12, _hoisted_15)
2494
+ ])) : vue.createCommentVNode("", true)
2495
+ ])
2496
+ ])
2497
+ ], 544)
2498
+ ]);
2499
+ };
2500
+ }
2501
+ });
2502
+ const FTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-22daf8be"]]);
2503
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
2504
+ __name: "FDialog",
2505
+ props: /* @__PURE__ */ vue.mergeModels({
2506
+ maskClosable: { type: Boolean, default: true },
2507
+ maskColor: { default: "black" },
2508
+ showMask: { type: Boolean, default: true }
2509
+ }, {
2510
+ "modelValue": __spreadValues({ type: Boolean }, { default: false }),
2511
+ "modelModifiers": {}
2512
+ }),
2513
+ emits: ["update:modelValue"],
2514
+ setup(__props) {
2515
+ const props = __props;
2516
+ const visible = vue.useModel(__props, "modelValue");
2517
+ const handleMaskClick = () => {
2518
+ if (props.maskClosable) visible.value = false;
2519
+ };
2520
+ const maskBackgroundColor = vue.computed(() => {
2521
+ if (!props.showMask) return "transparent";
2522
+ switch (props.maskColor) {
2523
+ case "white":
2524
+ return "rgba(255, 255, 255, 0.5)";
2525
+ case "black":
2526
+ return "rgba(0, 0, 0, 0.5)";
2527
+ case "transparent":
2528
+ return "transparent";
2529
+ default:
2530
+ return "rgba(0, 0, 0, 0.5)";
2531
+ }
2532
+ });
2533
+ return (_ctx, _cache) => {
2534
+ return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
2535
+ vue.createVNode(vue.Transition, { name: "fade" }, {
2536
+ default: vue.withCtx(() => [
2537
+ visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
2538
+ key: 0,
2539
+ class: "f-dialog-mask",
2540
+ style: vue.normalizeStyle({ backgroundColor: vue.unref(maskBackgroundColor) }),
2541
+ onClick: handleMaskClick
2542
+ }, [
2543
+ vue.createElementVNode("div", {
2544
+ class: "f-dialog-container",
2545
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
2546
+ }, ["stop"]))
2547
+ }, [
2548
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
2549
+ ])
2550
+ ], 4)) : vue.createCommentVNode("", true)
2551
+ ]),
2552
+ _: 3
2553
+ })
2554
+ ]);
2555
+ };
2556
+ }
2557
+ });
2558
+ const FDialog = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-31496822"]]);
2559
+ const _hoisted_1$7 = { class: "f-upload" };
2560
+ const _hoisted_2$6 = { class: "f-upload__label" };
2561
+ const _hoisted_3$6 = ["accept"];
2562
+ const _hoisted_4$4 = {
2563
+ key: 0,
2564
+ class: "f-upload__file-item"
2565
+ };
2566
+ const _hoisted_5$4 = { class: "f-upload__file-info" };
2567
+ const _hoisted_6$3 = { class: "f-upload__file-name" };
2568
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
2569
+ __name: "FUpload",
2570
+ props: /* @__PURE__ */ vue.mergeModels({
2571
+ accept: {},
2572
+ limit: {},
2573
+ progress: {}
2574
+ }, {
2575
+ "file": { default: "" },
2576
+ "fileModifiers": {}
2577
+ }),
2578
+ emits: /* @__PURE__ */ vue.mergeModels(["change", "exceed"], ["update:file"]),
2579
+ setup(__props, { emit: __emit }) {
2580
+ const file = vue.useModel(__props, "file");
2581
+ const props = __props;
2582
+ const emit = __emit;
2583
+ const dragActive = vue.ref(false);
2584
+ const isCloseHover = vue.ref(false);
2585
+ const clearFile = () => {
2586
+ file.value = "";
2587
+ };
2588
+ const onDragOver = (e) => {
2589
+ e.preventDefault();
2590
+ dragActive.value = true;
2591
+ };
2592
+ const onDragLeave = (e) => {
2593
+ e.preventDefault();
2594
+ dragActive.value = false;
2595
+ };
2596
+ const onDrop = (e) => {
2597
+ var _a, _b;
2598
+ e.preventDefault();
2599
+ dragActive.value = false;
2600
+ const f = (_b = (_a = e.dataTransfer) == null ? void 0 : _a.files) == null ? void 0 : _b[0];
2601
+ if (!f) return;
2602
+ if (props.limit && f.size > props.limit) {
2603
+ emit("exceed", f);
2604
+ return;
2605
+ }
2606
+ emit("change", f);
2607
+ };
2608
+ const onFileChange = (e) => {
2609
+ var _a;
2610
+ const f = (_a = e.target.files) == null ? void 0 : _a[0];
2611
+ if (!f) return;
2612
+ if (props.limit && f.size > props.limit) {
2613
+ emit("exceed", f);
2614
+ return;
2615
+ }
2616
+ emit("change", f);
2617
+ };
2618
+ return (_ctx, _cache) => {
2619
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
2620
+ vue.createElementVNode("div", {
2621
+ class: vue.normalizeClass(["f-upload__zone", { "f-upload--drag": vue.unref(dragActive) }]),
2622
+ onDragover: onDragOver,
2623
+ onDragleave: onDragLeave,
2624
+ onDrop
2625
+ }, [
2626
+ vue.createElementVNode("label", _hoisted_2$6, [
2627
+ vue.createElementVNode("input", {
2628
+ type: "file",
2629
+ accept: _ctx.accept,
2630
+ class: "f-upload__input",
2631
+ onChange: onFileChange
2632
+ }, null, 40, _hoisted_3$6),
2633
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
2634
+ vue.createVNode(FIcon, { size: 40 }, {
2635
+ default: vue.withCtx(() => [
2636
+ vue.createVNode(vue.unref(ionicons5.CloudUpload))
2637
+ ]),
2638
+ _: 1
2639
+ }),
2640
+ _cache[2] || (_cache[2] = vue.createElementVNode("span", { class: "f-upload__title" }, "点击或拖拽文件至此处", -1)),
2641
+ _cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "f-upload__hint" }, "支持 .xlsx .xls .json .txt", -1))
2642
+ ], true)
2643
+ ])
2644
+ ], 34),
2645
+ file.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, [
2646
+ vue.createVNode(FIcon, null, {
2647
+ default: vue.withCtx(() => [
2648
+ vue.createVNode(vue.unref(ionicons5.DocumentOutline))
2649
+ ]),
2650
+ _: 1
2651
+ }),
2652
+ vue.createElementVNode("div", _hoisted_5$4, [
2653
+ vue.createElementVNode("span", _hoisted_6$3, vue.toDisplayString(file.value), 1),
2654
+ _ctx.progress != null ? (vue.openBlock(), vue.createBlock(FProgress, {
2655
+ key: 0,
2656
+ percent: _ctx.progress,
2657
+ "show-text": ""
2658
+ }, null, 8, ["percent"])) : vue.createCommentVNode("", true)
2659
+ ]),
2660
+ vue.createVNode(FIcon, {
2661
+ onClick: vue.withModifiers(clearFile, ["stop"]),
2662
+ onMouseenter: _cache[0] || (_cache[0] = ($event) => isCloseHover.value = true),
2663
+ onMouseleave: _cache[1] || (_cache[1] = ($event) => isCloseHover.value = false),
2664
+ style: { "cursor": "pointer", "transition": "color 0.2s" }
2665
+ }, {
2666
+ default: vue.withCtx(() => [
2667
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(isCloseHover) ? vue.unref(ionicons5.CloseCircle) : vue.unref(ionicons5.Close))))
2668
+ ]),
2669
+ _: 1
2670
+ })
2671
+ ])) : vue.createCommentVNode("", true)
2672
+ ]);
2673
+ };
2674
+ }
2675
+ });
2676
+ const FUpload = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-07b95a32"]]);
2677
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
2678
+ __name: "FButtonGroup",
2679
+ props: {
2680
+ size: { default: "normal" },
2681
+ type: { default: "default" },
2682
+ disabled: { type: Boolean, default: false },
2683
+ vertical: { type: Boolean, default: false }
2684
+ },
2685
+ setup(__props) {
2686
+ const props = __props;
2687
+ const { size, type, disabled } = vue.toRefs(props);
2688
+ vue.provide(
2689
+ "FButtonGroupContext",
2690
+ vue.reactive({
2691
+ size,
2692
+ type,
2693
+ disabled
2694
+ })
2695
+ );
2696
+ return (_ctx, _cache) => {
2697
+ return vue.openBlock(), vue.createElementBlock("div", {
2698
+ class: vue.normalizeClass(["f-button-group", { "f-button-group--vertical": _ctx.vertical }]),
2699
+ role: "group"
2700
+ }, [
2701
+ vue.renderSlot(_ctx.$slots, "default")
2702
+ ], 2);
2703
+ };
2704
+ }
2705
+ });
2706
+ const _hoisted_1$6 = { class: "f-collapse" };
2707
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
2708
+ __name: "FCollapse",
2709
+ props: /* @__PURE__ */ vue.mergeModels({
2710
+ accordion: { type: Boolean, default: false }
2711
+ }, {
2712
+ "modelValue": {
2713
+ default: () => []
2714
+ },
2715
+ "modelModifiers": {}
2716
+ }),
2717
+ emits: ["update:modelValue"],
2718
+ setup(__props) {
2719
+ const props = __props;
2720
+ const activeNames = vue.useModel(__props, "modelValue");
2721
+ const normalizedActiveNames = vue.computed(() => {
2722
+ if (Array.isArray(activeNames.value)) return activeNames.value;
2723
+ return activeNames.value === void 0 || activeNames.value === null || activeNames.value === "" ? [] : [activeNames.value];
2724
+ });
2725
+ function handleItemClick(name) {
2726
+ if (props.accordion) {
2727
+ activeNames.value = normalizedActiveNames.value.includes(name) ? "" : name;
2728
+ return;
2729
+ }
2730
+ const current = [...normalizedActiveNames.value];
2731
+ const idx = current.indexOf(name);
2732
+ if (idx > -1) {
2733
+ current.splice(idx, 1);
2734
+ } else {
2735
+ current.push(name);
2736
+ }
2737
+ activeNames.value = current;
2738
+ }
2739
+ vue.provide(
2740
+ "fCollapseContext",
2741
+ vue.reactive({
2742
+ activeNames: normalizedActiveNames,
2743
+ handleItemClick
2744
+ })
2745
+ );
2746
+ return (_ctx, _cache) => {
2747
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
2748
+ vue.renderSlot(_ctx.$slots, "default")
2749
+ ]);
2750
+ };
2751
+ }
2752
+ });
2753
+ const _hoisted_1$5 = { class: "f-collapse-item__header-title" };
2754
+ const _hoisted_2$5 = { class: "f-collapse-item__wrapper" };
2755
+ const _hoisted_3$5 = { class: "f-collapse-item__content" };
2756
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
2757
+ __name: "FCollapseItem",
2758
+ props: {
2759
+ name: {},
2760
+ title: { default: "" },
2761
+ disabled: { type: Boolean, default: false }
2762
+ },
2763
+ setup(__props) {
2764
+ const props = __props;
2765
+ const context = vue.inject("fCollapseContext");
2766
+ const isActive = vue.computed(() => !!(context == null ? void 0 : context.activeNames.includes(props.name)));
2767
+ function handleHeaderClick() {
2768
+ if (props.disabled) return;
2769
+ context == null ? void 0 : context.handleItemClick(props.name);
2770
+ }
2771
+ function onEnter(el) {
2772
+ const element = el;
2773
+ element.style.height = "0px";
2774
+ requestAnimationFrame(() => {
2775
+ element.style.height = `${element.scrollHeight}px`;
2776
+ });
2777
+ }
2778
+ function onAfterEnter(el) {
2779
+ el.style.height = "auto";
2780
+ }
2781
+ function onLeave(el) {
2782
+ const element = el;
2783
+ element.style.height = `${element.scrollHeight}px`;
2784
+ requestAnimationFrame(() => {
2785
+ element.style.height = "0px";
2786
+ });
2787
+ }
2788
+ return (_ctx, _cache) => {
2789
+ return vue.openBlock(), vue.createElementBlock("div", {
2790
+ class: vue.normalizeClass(["f-collapse-item", {
2791
+ "f-collapse-item--active": vue.unref(isActive),
2792
+ "f-collapse-item--disabled": _ctx.disabled
2793
+ }])
2794
+ }, [
2795
+ vue.createElementVNode("div", {
2796
+ class: "f-collapse-item__header",
2797
+ onClick: handleHeaderClick
2798
+ }, [
2799
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
2800
+ vue.createElementVNode("span", _hoisted_1$5, vue.toDisplayString(_ctx.title), 1)
2801
+ ]),
2802
+ _cache[0] || (_cache[0] = vue.createElementVNode("svg", {
2803
+ class: "f-collapse-item__icon",
2804
+ viewBox: "0 0 12 12",
2805
+ width: "12",
2806
+ height: "12"
2807
+ }, [
2808
+ vue.createElementVNode("path", {
2809
+ d: "M2 4l4 4 4-4",
2810
+ stroke: "currentColor",
2811
+ "stroke-width": "1.5",
2812
+ fill: "none",
2813
+ "stroke-linecap": "round",
2814
+ "stroke-linejoin": "round"
2815
+ })
2816
+ ], -1))
2817
+ ]),
2818
+ vue.createVNode(vue.Transition, {
2819
+ onEnter,
2820
+ onAfterEnter,
2821
+ onLeave
2822
+ }, {
2823
+ default: vue.withCtx(() => [
2824
+ vue.withDirectives(vue.createElementVNode("div", _hoisted_2$5, [
2825
+ vue.createElementVNode("div", _hoisted_3$5, [
2826
+ vue.renderSlot(_ctx.$slots, "default")
2827
+ ])
2828
+ ], 512), [
2829
+ [vue.vShow, vue.unref(isActive)]
2830
+ ])
2831
+ ]),
2832
+ _: 3
2833
+ })
2834
+ ], 2);
2835
+ };
2836
+ }
2837
+ });
2838
+ const _hoisted_1$4 = { class: "f-color-picker__swatch" };
2839
+ const _hoisted_2$4 = {
2840
+ key: 0,
2841
+ class: "f-color-picker__panel"
2842
+ };
2843
+ const _hoisted_3$4 = { class: "f-color-picker__sliders" };
2844
+ const _hoisted_4$3 = { class: "f-color-picker__slider-group" };
2845
+ const _hoisted_5$3 = ["value"];
2846
+ const _hoisted_6$2 = {
2847
+ key: 0,
2848
+ class: "f-color-picker__predefine"
2849
+ };
2850
+ const _hoisted_7 = ["onClick"];
2851
+ const hueBackground = "linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)";
2852
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
2853
+ __name: "FColorPicker",
2854
+ props: /* @__PURE__ */ vue.mergeModels({
2855
+ showAlpha: { type: Boolean, default: false },
2856
+ predefine: { default: () => [] },
2857
+ size: { default: "default" },
2858
+ disabled: { type: Boolean, default: false }
2859
+ }, {
2860
+ "modelValue": { default: "#409eff" },
2861
+ "modelModifiers": {}
2862
+ }),
2863
+ emits: ["update:modelValue"],
2864
+ setup(__props) {
2865
+ const props = __props;
2866
+ const modelValue = vue.useModel(__props, "modelValue");
2867
+ function hsvToRgb(h, s, v) {
2868
+ s /= 100;
2869
+ v /= 100;
2870
+ const c = v * s;
2871
+ const x = c * (1 - Math.abs(h / 60 % 2 - 1));
2872
+ const m = v - c;
2873
+ let r = 0;
2874
+ let g = 0;
2875
+ let b = 0;
2876
+ if (h < 60) [r, g, b] = [c, x, 0];
2877
+ else if (h < 120) [r, g, b] = [x, c, 0];
2878
+ else if (h < 180) [r, g, b] = [0, c, x];
2879
+ else if (h < 240) [r, g, b] = [0, x, c];
2880
+ else if (h < 300) [r, g, b] = [x, 0, c];
2881
+ else [r, g, b] = [c, 0, x];
2882
+ return {
2883
+ r: Math.round((r + m) * 255),
2884
+ g: Math.round((g + m) * 255),
2885
+ b: Math.round((b + m) * 255)
2886
+ };
2887
+ }
2888
+ function rgbToHsv(r, g, b) {
2889
+ r /= 255;
2890
+ g /= 255;
2891
+ b /= 255;
2892
+ const max = Math.max(r, g, b);
2893
+ const min = Math.min(r, g, b);
2894
+ const d = max - min;
2895
+ let h = 0;
2896
+ if (d !== 0) {
2897
+ if (max === r) h = 60 * ((g - b) / d % 6);
2898
+ else if (max === g) h = 60 * ((b - r) / d + 2);
2899
+ else h = 60 * ((r - g) / d + 4);
2900
+ }
2901
+ if (h < 0) h += 360;
2902
+ const s = max === 0 ? 0 : d / max;
2903
+ return { h, s: s * 100, v: max * 100 };
2904
+ }
2905
+ function rgbToHex(r, g, b) {
2906
+ return `#${[r, g, b].map((c) => c.toString(16).padStart(2, "0")).join("")}`;
2907
+ }
2908
+ function parseColor(input) {
2909
+ const str = input.trim();
2910
+ const hexMatch = str.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);
2911
+ if (hexMatch) {
2912
+ let hex = hexMatch[1];
2913
+ if (hex.length === 3) {
2914
+ hex = hex.split("").map((c) => c + c).join("");
2915
+ }
2916
+ const r = parseInt(hex.slice(0, 2), 16);
2917
+ const g = parseInt(hex.slice(2, 4), 16);
2918
+ const b = parseInt(hex.slice(4, 6), 16);
2919
+ const a = hex.length === 8 ? parseInt(hex.slice(6, 8), 16) / 255 : 1;
2920
+ return __spreadProps(__spreadValues({}, rgbToHsv(r, g, b)), { a });
2921
+ }
2922
+ const rgbMatch = str.match(/^rgba?\(([^)]+)\)$/i);
2923
+ if (rgbMatch) {
2924
+ const [r, g, b, a = 1] = rgbMatch[1].split(",").map((p) => parseFloat(p.trim()));
2925
+ return __spreadProps(__spreadValues({}, rgbToHsv(r, g, b)), { a });
2926
+ }
2927
+ return null;
2928
+ }
2929
+ const hsva = vue.reactive({ h: 0, s: 0, v: 100, a: 1 });
2930
+ let skipNextModelWatch = false;
2931
+ vue.watch(
2932
+ modelValue,
2933
+ (val) => {
2934
+ if (skipNextModelWatch) {
2935
+ skipNextModelWatch = false;
2936
+ return;
2937
+ }
2938
+ const parsed = parseColor(val);
2939
+ if (parsed) {
2940
+ hsva.h = parsed.h;
2941
+ hsva.s = parsed.s;
2942
+ hsva.v = parsed.v;
2943
+ hsva.a = parsed.a;
2944
+ }
2945
+ },
2946
+ { immediate: true }
2947
+ );
2948
+ function currentRgb() {
2949
+ return hsvToRgb(hsva.h, hsva.s, hsva.v);
2950
+ }
2951
+ function toColorString() {
2952
+ const { r, g, b } = currentRgb();
2953
+ if (props.showAlpha) {
2954
+ return `rgba(${r}, ${g}, ${b}, ${Math.round(hsva.a * 100) / 100})`;
2955
+ }
2956
+ return rgbToHex(r, g, b);
2957
+ }
2958
+ function emitColor() {
2959
+ skipNextModelWatch = true;
2960
+ modelValue.value = toColorString();
2961
+ }
2962
+ const previewRgb = vue.computed(() => currentRgb());
2963
+ const visible = vue.ref(false);
2964
+ const rootRef = vue.ref(null);
2965
+ function handleOutsideClick(e) {
2966
+ if (rootRef.value && !rootRef.value.contains(e.target)) {
2967
+ visible.value = false;
2968
+ }
2969
+ }
2970
+ vue.watch(visible, (val) => {
2971
+ if (val) {
2972
+ vue.nextTick(() => document.addEventListener("mousedown", handleOutsideClick));
2973
+ } else {
2974
+ document.removeEventListener("mousedown", handleOutsideClick);
2975
+ }
2976
+ });
2977
+ vue.onBeforeUnmount(() => document.removeEventListener("mousedown", handleOutsideClick));
2978
+ function togglePanel() {
2979
+ if (props.disabled) return;
2980
+ visible.value = !visible.value;
2981
+ }
2982
+ function startTrack(el, onMove, e) {
2983
+ const rect = el.getBoundingClientRect();
2984
+ onMove(e.clientX, e.clientY, rect);
2985
+ function handleMove(moveEvent) {
2986
+ onMove(moveEvent.clientX, moveEvent.clientY, rect);
2987
+ }
2988
+ function handleUp() {
2989
+ document.removeEventListener("mousemove", handleMove);
2990
+ document.removeEventListener("mouseup", handleUp);
2991
+ }
2992
+ document.addEventListener("mousemove", handleMove);
2993
+ document.addEventListener("mouseup", handleUp);
2994
+ }
2995
+ function clamp(value, min, max) {
2996
+ return Math.min(Math.max(value, min), max);
2997
+ }
2998
+ const panelRef = vue.ref(null);
2999
+ function handlePanelDrag(e) {
3000
+ if (!panelRef.value) return;
3001
+ startTrack(
3002
+ panelRef.value,
3003
+ (clientX, clientY, rect) => {
3004
+ const x = clamp(clientX - rect.left, 0, rect.width);
3005
+ const y = clamp(clientY - rect.top, 0, rect.height);
3006
+ hsva.s = x / rect.width * 100;
3007
+ hsva.v = 100 - y / rect.height * 100;
3008
+ emitColor();
3009
+ },
3010
+ e
3011
+ );
3012
+ }
3013
+ const hueRef = vue.ref(null);
3014
+ function handleHueDrag(e) {
3015
+ if (!hueRef.value) return;
3016
+ startTrack(
3017
+ hueRef.value,
3018
+ (clientX, _clientY, rect) => {
3019
+ const x = clamp(clientX - rect.left, 0, rect.width);
3020
+ hsva.h = x / rect.width * 360;
3021
+ emitColor();
3022
+ },
3023
+ e
3024
+ );
3025
+ }
3026
+ const alphaRef = vue.ref(null);
3027
+ function handleAlphaDrag(e) {
3028
+ if (!alphaRef.value) return;
3029
+ startTrack(
3030
+ alphaRef.value,
3031
+ (clientX, _clientY, rect) => {
3032
+ const x = clamp(clientX - rect.left, 0, rect.width);
3033
+ hsva.a = x / rect.width;
3034
+ emitColor();
3035
+ },
3036
+ e
3037
+ );
3038
+ }
3039
+ function tryParseColor(str) {
3040
+ const s = str.trim();
3041
+ if (/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(s) || /^rgba?\([^)]+\)$/i.test(s)) {
3042
+ return parseColor(s);
3043
+ }
3044
+ return null;
3045
+ }
3046
+ function handleInputChange(e) {
3047
+ const target = e.target;
3048
+ const parsed = tryParseColor(target.value);
3049
+ if (parsed) {
3050
+ hsva.h = parsed.h;
3051
+ hsva.s = parsed.s;
3052
+ hsva.v = parsed.v;
3053
+ hsva.a = parsed.a;
3054
+ emitColor();
3055
+ } else {
3056
+ target.value = toColorString();
3057
+ }
3058
+ }
3059
+ function selectPredefine(color) {
3060
+ const parsed = parseColor(color);
3061
+ if (!parsed) return;
3062
+ hsva.h = parsed.h;
3063
+ hsva.s = parsed.s;
3064
+ hsva.v = parsed.v;
3065
+ hsva.a = parsed.a;
3066
+ emitColor();
3067
+ }
3068
+ return (_ctx, _cache) => {
3069
+ return vue.openBlock(), vue.createElementBlock("div", {
3070
+ ref_key: "rootRef",
3071
+ ref: rootRef,
3072
+ class: vue.normalizeClass(["f-color-picker", [`f-color-picker--${_ctx.size}`, { "f-color-picker--disabled": _ctx.disabled }]])
3073
+ }, [
3074
+ vue.createElementVNode("div", {
3075
+ class: "f-color-picker__trigger",
3076
+ onClick: togglePanel
3077
+ }, [
3078
+ vue.createElementVNode("div", _hoisted_1$4, [
3079
+ vue.createElementVNode("span", {
3080
+ class: "f-color-picker__swatch-color",
3081
+ style: vue.normalizeStyle({ background: `rgba(${vue.unref(previewRgb).r}, ${vue.unref(previewRgb).g}, ${vue.unref(previewRgb).b}, ${vue.unref(hsva).a})` })
3082
+ }, null, 4)
3083
+ ])
3084
+ ]),
3085
+ vue.createVNode(vue.Transition, { name: "f-color-picker-fade" }, {
3086
+ default: vue.withCtx(() => [
3087
+ vue.unref(visible) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$4, [
3088
+ vue.createElementVNode("div", {
3089
+ ref_key: "panelRef",
3090
+ ref: panelRef,
3091
+ class: "f-color-picker__saturation",
3092
+ style: vue.normalizeStyle({ backgroundColor: `hsl(${vue.unref(hsva).h}, 100%, 50%)` }),
3093
+ onMousedown: handlePanelDrag
3094
+ }, [
3095
+ vue.createElementVNode("div", {
3096
+ class: "f-color-picker__saturation-thumb",
3097
+ style: vue.normalizeStyle({ left: `${vue.unref(hsva).s}%`, top: `${100 - vue.unref(hsva).v}%` })
3098
+ }, null, 4)
3099
+ ], 36),
3100
+ vue.createElementVNode("div", _hoisted_3$4, [
3101
+ vue.createElementVNode("div", _hoisted_4$3, [
3102
+ vue.createElementVNode("div", {
3103
+ ref_key: "hueRef",
3104
+ ref: hueRef,
3105
+ class: "f-color-picker__hue",
3106
+ style: vue.normalizeStyle({ backgroundImage: hueBackground }),
3107
+ onMousedown: handleHueDrag
3108
+ }, [
3109
+ vue.createElementVNode("div", {
3110
+ class: "f-color-picker__slider-thumb",
3111
+ style: vue.normalizeStyle({ left: `${vue.unref(hsva).h / 360 * 100}%` })
3112
+ }, null, 4)
3113
+ ], 36),
3114
+ _ctx.showAlpha ? (vue.openBlock(), vue.createElementBlock("div", {
3115
+ key: 0,
3116
+ ref_key: "alphaRef",
3117
+ ref: alphaRef,
3118
+ class: "f-color-picker__alpha",
3119
+ onMousedown: handleAlphaDrag
3120
+ }, [
3121
+ vue.createElementVNode("div", {
3122
+ class: "f-color-picker__alpha-gradient",
3123
+ style: vue.normalizeStyle({ backgroundImage: `linear-gradient(to right, transparent, rgb(${vue.unref(previewRgb).r}, ${vue.unref(previewRgb).g}, ${vue.unref(previewRgb).b}))` })
3124
+ }, null, 4),
3125
+ vue.createElementVNode("div", {
3126
+ class: "f-color-picker__slider-thumb",
3127
+ style: vue.normalizeStyle({ left: `${vue.unref(hsva).a * 100}%` })
3128
+ }, null, 4)
3129
+ ], 544)) : vue.createCommentVNode("", true)
3130
+ ]),
3131
+ vue.createElementVNode("div", {
3132
+ class: "f-color-picker__current",
3133
+ style: vue.normalizeStyle({ background: `rgba(${vue.unref(previewRgb).r}, ${vue.unref(previewRgb).g}, ${vue.unref(previewRgb).b}, ${vue.unref(hsva).a})` })
3134
+ }, null, 4)
3135
+ ]),
3136
+ vue.createElementVNode("input", {
3137
+ class: "f-color-picker__input",
3138
+ type: "text",
3139
+ value: toColorString(),
3140
+ onChange: handleInputChange,
3141
+ onKeydown: _cache[0] || (_cache[0] = vue.withKeys(($event) => $event.target.blur(), ["enter"]))
3142
+ }, null, 40, _hoisted_5$3),
3143
+ _ctx.predefine.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
3144
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.predefine, (color) => {
3145
+ return vue.openBlock(), vue.createElementBlock("span", {
3146
+ key: color,
3147
+ class: "f-color-picker__predefine-item",
3148
+ style: vue.normalizeStyle({ background: color }),
3149
+ onClick: ($event) => selectPredefine(color)
3150
+ }, null, 12, _hoisted_7);
3151
+ }), 128))
3152
+ ])) : vue.createCommentVNode("", true)
3153
+ ])) : vue.createCommentVNode("", true)
3154
+ ]),
3155
+ _: 1
3156
+ })
3157
+ ], 2);
3158
+ };
3159
+ }
3160
+ });
3161
+ const _hoisted_1$3 = { class: "f-empty" };
3162
+ const _hoisted_2$3 = ["src"];
3163
+ const _hoisted_3$3 = {
3164
+ key: 1,
3165
+ viewBox: "0 0 160 160",
3166
+ class: "f-empty__image-default"
3167
+ };
3168
+ const _hoisted_4$2 = { class: "f-empty__description" };
3169
+ const _hoisted_5$2 = {
3170
+ key: 0,
3171
+ class: "f-empty__extra"
3172
+ };
3173
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
3174
+ __name: "FEmpty",
3175
+ props: {
3176
+ description: { default: "暂无数据" },
3177
+ image: { default: "" },
3178
+ imageSize: { default: 120 }
3179
+ },
3180
+ setup(__props) {
3181
+ return (_ctx, _cache) => {
3182
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
3183
+ vue.createElementVNode("div", {
3184
+ class: "f-empty__image",
3185
+ style: vue.normalizeStyle({ width: `${_ctx.imageSize}px`, height: `${_ctx.imageSize}px` })
3186
+ }, [
3187
+ vue.renderSlot(_ctx.$slots, "image", {}, () => [
3188
+ _ctx.image ? (vue.openBlock(), vue.createElementBlock("img", {
3189
+ key: 0,
3190
+ src: _ctx.image,
3191
+ class: "f-empty__image-img",
3192
+ alt: ""
3193
+ }, null, 8, _hoisted_2$3)) : (vue.openBlock(), vue.createElementBlock("svg", _hoisted_3$3, _cache[0] || (_cache[0] = [
3194
+ vue.createStaticVNode('<ellipse cx="80" cy="132" rx="46" ry="8" fill="currentColor" opacity="0.08"></ellipse><path d="M40 60 L120 60 L128 128 L32 128 Z" fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round" opacity="0.35"></path><path d="M40 60 L58 32 L102 32 L120 60" fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round" opacity="0.35"></path><line x1="32" y1="88" x2="128" y2="88" stroke="currentColor" stroke-width="3" opacity="0.35"></line><path d="M64 88 Q80 106 96 88" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" opacity="0.5"></path>', 5)
3195
+ ])))
3196
+ ])
3197
+ ], 4),
3198
+ vue.createElementVNode("div", _hoisted_4$2, [
3199
+ vue.renderSlot(_ctx.$slots, "description", {}, () => [
3200
+ vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
3201
+ ])
3202
+ ]),
3203
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, [
3204
+ vue.renderSlot(_ctx.$slots, "default")
3205
+ ])) : vue.createCommentVNode("", true)
3206
+ ]);
3207
+ };
3208
+ }
3209
+ });
3210
+ const _hoisted_1$2 = { class: "f-slider__mark-label" };
3211
+ const _hoisted_2$2 = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "onMousedown", "onKeydown", "onMouseenter"];
3212
+ const _hoisted_3$2 = {
3213
+ key: 0,
3214
+ class: "f-slider__tooltip"
3215
+ };
3216
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
3217
+ __name: "FSlider",
3218
+ props: /* @__PURE__ */ vue.mergeModels({
3219
+ min: { default: 0 },
3220
+ max: { default: 100 },
3221
+ step: { default: 1 },
3222
+ range: { type: Boolean, default: false },
3223
+ vertical: { type: Boolean, default: false },
3224
+ disabled: { type: Boolean, default: false },
3225
+ showTooltip: { type: Boolean, default: true },
3226
+ marks: { default: () => ({}) },
3227
+ size: { default: "default" }
3228
+ }, {
3229
+ "modelValue": { default: 0 },
3230
+ "modelModifiers": {}
3231
+ }),
3232
+ emits: ["update:modelValue"],
3233
+ setup(__props) {
3234
+ const props = __props;
3235
+ const modelValue = vue.useModel(__props, "modelValue");
3236
+ const values = vue.reactive(props.range ? [props.min, props.max] : [props.min]);
3237
+ let skipNextWatch = false;
3238
+ vue.watch(
3239
+ modelValue,
3240
+ (val) => {
3241
+ if (skipNextWatch) {
3242
+ skipNextWatch = false;
3243
+ return;
3244
+ }
3245
+ if (props.range && Array.isArray(val)) {
3246
+ values[0] = val[0];
3247
+ values[1] = val[1];
3248
+ } else if (!props.range && typeof val === "number") {
3249
+ values[0] = val;
3250
+ }
3251
+ },
3252
+ { immediate: true }
3253
+ );
3254
+ function emitChange() {
3255
+ skipNextWatch = true;
3256
+ modelValue.value = props.range ? [values[0], values[1]] : values[0];
3257
+ }
3258
+ const decimalPlaces = vue.computed(() => {
3259
+ const str = String(props.step);
3260
+ const idx = str.indexOf(".");
3261
+ return idx === -1 ? 0 : str.length - idx - 1;
3262
+ });
3263
+ function clampValue(raw) {
3264
+ const clamped = Math.min(Math.max(raw, props.min), props.max);
3265
+ const stepped = Math.round((clamped - props.min) / props.step) * props.step + props.min;
3266
+ const fixed = Number(stepped.toFixed(decimalPlaces.value));
3267
+ return Math.min(Math.max(fixed, props.min), props.max);
3268
+ }
3269
+ function valueToPercent(v) {
3270
+ if (props.max === props.min) return 0;
3271
+ return (v - props.min) / (props.max - props.min) * 100;
3272
+ }
3273
+ function percentToValue(percent) {
3274
+ return clampValue(props.min + percent / 100 * (props.max - props.min));
3275
+ }
3276
+ const trackRef = vue.ref(null);
3277
+ const activeThumb = vue.ref(null);
3278
+ const hoveredThumb = vue.ref(null);
3279
+ function percentFromEvent(clientX, clientY, rect) {
3280
+ if (props.vertical) {
3281
+ const y = Math.min(Math.max(clientY - rect.top, 0), rect.height);
3282
+ return 100 - y / rect.height * 100;
3283
+ }
3284
+ const x = Math.min(Math.max(clientX - rect.left, 0), rect.width);
3285
+ return x / rect.width * 100;
3286
+ }
3287
+ function startDrag(index, e) {
3288
+ if (props.disabled) return;
3289
+ e.preventDefault();
3290
+ e.stopPropagation();
3291
+ const track = trackRef.value;
3292
+ if (!track) return;
3293
+ const rect = track.getBoundingClientRect();
3294
+ activeThumb.value = index;
3295
+ function apply(clientX, clientY) {
3296
+ const percent = percentFromEvent(clientX, clientY, rect);
3297
+ let next = percentToValue(percent);
3298
+ if (props.range) {
3299
+ if (index === 0) next = Math.min(next, values[1]);
3300
+ else next = Math.max(next, values[0]);
3301
+ }
3302
+ if (values[index] !== next) {
3303
+ values[index] = next;
3304
+ emitChange();
3305
+ }
3306
+ }
3307
+ apply(e.clientX, e.clientY);
3308
+ function onMove(moveEvent) {
3309
+ apply(moveEvent.clientX, moveEvent.clientY);
3310
+ }
3311
+ function onUp() {
3312
+ activeThumb.value = null;
3313
+ document.removeEventListener("mousemove", onMove);
3314
+ document.removeEventListener("mouseup", onUp);
3315
+ }
3316
+ document.addEventListener("mousemove", onMove);
3317
+ document.addEventListener("mouseup", onUp);
3318
+ }
3319
+ function handleTrackClick(e) {
3320
+ if (props.disabled || !trackRef.value) return;
3321
+ if (e.target.closest(".f-slider__thumb")) return;
3322
+ const rect = trackRef.value.getBoundingClientRect();
3323
+ const percent = percentFromEvent(e.clientX, e.clientY, rect);
3324
+ const clicked = percentToValue(percent);
3325
+ const targetIndex = props.range ? Math.abs(clicked - values[0]) <= Math.abs(clicked - values[1]) ? 0 : 1 : 0;
3326
+ values[targetIndex] = clicked;
3327
+ emitChange();
3328
+ }
3329
+ function handleKeydown(index, e) {
3330
+ if (props.disabled) return;
3331
+ const dir = props.vertical ? { inc: "ArrowUp", dec: "ArrowDown" } : { inc: "ArrowRight", dec: "ArrowLeft" };
3332
+ let next = values[index];
3333
+ if (e.key === dir.inc) next += props.step;
3334
+ else if (e.key === dir.dec) next -= props.step;
3335
+ else if (e.key === "Home") next = props.min;
3336
+ else if (e.key === "End") next = props.max;
3337
+ else return;
3338
+ e.preventDefault();
3339
+ next = clampValue(next);
3340
+ if (props.range) {
3341
+ next = index === 0 ? Math.min(next, values[1]) : Math.max(next, values[0]);
3342
+ }
3343
+ values[index] = next;
3344
+ emitChange();
3345
+ }
3346
+ const barStyle = vue.computed(() => {
3347
+ if (props.range) {
3348
+ const start = valueToPercent(values[0]);
3349
+ const end = valueToPercent(values[1]);
3350
+ return props.vertical ? { bottom: `${start}%`, height: `${end - start}%` } : { left: `${start}%`, width: `${end - start}%` };
3351
+ }
3352
+ const percent = valueToPercent(values[0]);
3353
+ return props.vertical ? { bottom: "0%", height: `${percent}%` } : { left: "0%", width: `${percent}%` };
3354
+ });
3355
+ function thumbStyle(index) {
3356
+ const percent = valueToPercent(values[index]);
3357
+ return props.vertical ? { bottom: `${percent}%` } : { left: `${percent}%` };
3358
+ }
3359
+ const markEntries = vue.computed(
3360
+ () => Object.entries(props.marks).map(([key, label]) => ({
3361
+ value: Number(key),
3362
+ label,
3363
+ percent: valueToPercent(Number(key))
3364
+ }))
3365
+ );
3366
+ function tooltipVisible(index) {
3367
+ return props.showTooltip && (activeThumb.value === index || hoveredThumb.value === index);
3368
+ }
3369
+ return (_ctx, _cache) => {
3370
+ return vue.openBlock(), vue.createElementBlock("div", {
3371
+ class: vue.normalizeClass(["f-slider", [`f-slider--${_ctx.size}`, { "f-slider--vertical": _ctx.vertical, "f-slider--disabled": _ctx.disabled, "f-slider--with-marks": vue.unref(markEntries).length }]])
3372
+ }, [
3373
+ vue.createElementVNode("div", {
3374
+ ref_key: "trackRef",
3375
+ ref: trackRef,
3376
+ class: "f-slider__track",
3377
+ onMousedown: handleTrackClick
3378
+ }, [
3379
+ vue.createElementVNode("div", {
3380
+ class: "f-slider__bar",
3381
+ style: vue.normalizeStyle(vue.unref(barStyle))
3382
+ }, null, 4),
3383
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(markEntries), (mark) => {
3384
+ return vue.openBlock(), vue.createElementBlock("span", {
3385
+ key: mark.value,
3386
+ class: "f-slider__mark",
3387
+ style: vue.normalizeStyle(_ctx.vertical ? { bottom: `${mark.percent}%` } : { left: `${mark.percent}%` })
3388
+ }, [
3389
+ _cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "f-slider__mark-dot" }, null, -1)),
3390
+ vue.createElementVNode("span", _hoisted_1$2, vue.toDisplayString(mark.label), 1)
3391
+ ], 4);
3392
+ }), 128)),
3393
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(values), (value, index) => {
3394
+ return vue.openBlock(), vue.createElementBlock("div", {
3395
+ key: index,
3396
+ class: vue.normalizeClass(["f-slider__thumb", { "f-slider__thumb--active": vue.unref(activeThumb) === index }]),
3397
+ style: vue.normalizeStyle(thumbStyle(index)),
3398
+ tabindex: "0",
3399
+ role: "slider",
3400
+ "aria-valuemin": _ctx.min,
3401
+ "aria-valuemax": _ctx.max,
3402
+ "aria-valuenow": value,
3403
+ onMousedown: ($event) => startDrag(index, $event),
3404
+ onKeydown: ($event) => handleKeydown(index, $event),
3405
+ onMouseenter: ($event) => hoveredThumb.value = index,
3406
+ onMouseleave: _cache[0] || (_cache[0] = ($event) => hoveredThumb.value = null)
3407
+ }, [
3408
+ vue.createVNode(vue.Transition, { name: "f-slider-tooltip-fade" }, {
3409
+ default: vue.withCtx(() => [
3410
+ tooltipVisible(index) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, vue.toDisplayString(value), 1)) : vue.createCommentVNode("", true)
3411
+ ]),
3412
+ _: 2
3413
+ }, 1024)
3414
+ ], 46, _hoisted_2$2);
3415
+ }), 128))
3416
+ ], 544)
3417
+ ], 2);
3418
+ };
3419
+ }
3420
+ });
3421
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
3422
+ __name: "FScrollbar",
3423
+ props: {
3424
+ height: { default: "" },
3425
+ maxHeight: { default: "" },
3426
+ native: { type: Boolean, default: false },
3427
+ always: { type: Boolean, default: false },
3428
+ minSize: { default: 20 },
3429
+ vertical: { type: Boolean, default: true },
3430
+ horizontal: { type: Boolean, default: true }
3431
+ },
3432
+ emits: ["scroll"],
3433
+ setup(__props, { expose: __expose, emit: __emit }) {
3434
+ const props = __props;
3435
+ const emit = __emit;
3436
+ const wrapRef = vue.ref(null);
3437
+ const resizeRef = vue.ref(null);
3438
+ const thumbYRef = vue.ref(null);
3439
+ const thumbXRef = vue.ref(null);
3440
+ const ratioY = vue.ref(1);
3441
+ const ratioX = vue.ref(1);
3442
+ const moveY = vue.ref(0);
3443
+ const moveX = vue.ref(0);
3444
+ const isDragging = vue.ref(false);
3445
+ const showBar = vue.ref(false);
3446
+ let wrapResizeObserver = null;
3447
+ let contentResizeObserver = null;
3448
+ const wrapStyle = vue.computed(() => ({
3449
+ height: props.height || void 0,
3450
+ maxHeight: props.maxHeight || void 0
3451
+ }));
3452
+ function update() {
3453
+ const wrap = wrapRef.value;
3454
+ if (!wrap) return;
3455
+ const { clientHeight, scrollHeight, clientWidth, scrollWidth, scrollTop, scrollLeft } = wrap;
3456
+ ratioY.value = scrollHeight > 0 ? Math.min(clientHeight / scrollHeight, 1) : 1;
3457
+ ratioX.value = scrollWidth > 0 ? Math.min(clientWidth / scrollWidth, 1) : 1;
3458
+ const maxScrollTop = scrollHeight - clientHeight;
3459
+ const maxScrollLeft = scrollWidth - clientWidth;
3460
+ moveY.value = maxScrollTop > 0 ? scrollTop / maxScrollTop * (1 - ratioY.value) * 100 : 0;
3461
+ moveX.value = maxScrollLeft > 0 ? scrollLeft / maxScrollLeft * (1 - ratioX.value) * 100 : 0;
3462
+ }
3463
+ function handleScroll() {
3464
+ update();
3465
+ if (!isDragging.value) {
3466
+ flashBar();
3467
+ }
3468
+ const wrap = wrapRef.value;
3469
+ if (wrap) {
3470
+ emit("scroll", { scrollTop: wrap.scrollTop, scrollLeft: wrap.scrollLeft });
3471
+ }
3472
+ }
3473
+ let flashTimer = null;
3474
+ function flashBar() {
3475
+ showBar.value = true;
3476
+ if (flashTimer) clearTimeout(flashTimer);
3477
+ flashTimer = setTimeout(() => {
3478
+ if (!isDragging.value) showBar.value = false;
3479
+ }, 800);
3480
+ }
3481
+ function startDrag(axis, e) {
3482
+ e.preventDefault();
3483
+ e.stopPropagation();
3484
+ const wrap = wrapRef.value;
3485
+ if (!wrap) return;
3486
+ isDragging.value = true;
3487
+ showBar.value = true;
3488
+ const startClientPos = axis === "y" ? e.clientY : e.clientX;
3489
+ const startScroll = axis === "y" ? wrap.scrollTop : wrap.scrollLeft;
3490
+ const trackSize = axis === "y" ? wrap.clientHeight : wrap.clientWidth;
3491
+ const scrollSize = axis === "y" ? wrap.scrollHeight : wrap.scrollWidth;
3492
+ const ratio = axis === "y" ? ratioY.value : ratioX.value;
3493
+ function onMouseMove(moveEvent) {
3494
+ const currentClientPos = axis === "y" ? moveEvent.clientY : moveEvent.clientX;
3495
+ const delta = currentClientPos - startClientPos;
3496
+ const scrollDelta = ratio > 0 ? delta / ratio : 0;
3497
+ const maxScroll = scrollSize - trackSize;
3498
+ const nextScroll = Math.min(Math.max(startScroll + scrollDelta, 0), maxScroll);
3499
+ if (axis === "y") {
3500
+ wrap.scrollTop = nextScroll;
3501
+ } else {
3502
+ wrap.scrollLeft = nextScroll;
3503
+ }
3504
+ }
3505
+ function onMouseUp() {
3506
+ isDragging.value = false;
3507
+ flashBar();
3508
+ document.removeEventListener("mousemove", onMouseMove);
3509
+ document.removeEventListener("mouseup", onMouseUp);
3510
+ }
3511
+ document.addEventListener("mousemove", onMouseMove);
3512
+ document.addEventListener("mouseup", onMouseUp);
3513
+ }
3514
+ function scrollTo(options, yCoord) {
3515
+ const wrap = wrapRef.value;
3516
+ if (!wrap) return;
3517
+ if (typeof options === "number") {
3518
+ wrap.scrollTo(options, yCoord != null ? yCoord : wrap.scrollTop);
3519
+ } else {
3520
+ wrap.scrollTo(options);
3521
+ }
3522
+ }
3523
+ function setScrollTop(value) {
3524
+ if (wrapRef.value) wrapRef.value.scrollTop = value;
3525
+ }
3526
+ function setScrollLeft(value) {
3527
+ if (wrapRef.value) wrapRef.value.scrollLeft = value;
3528
+ }
3529
+ __expose({
3530
+ scrollTo,
3531
+ setScrollTop,
3532
+ setScrollLeft,
3533
+ update,
3534
+ wrapRef
3535
+ });
3536
+ vue.onMounted(() => {
3537
+ if (props.native) return;
3538
+ vue.nextTick(() => {
3539
+ update();
3540
+ if (wrapRef.value) {
3541
+ wrapResizeObserver = new ResizeObserver(() => update());
3542
+ wrapResizeObserver.observe(wrapRef.value);
3543
+ }
3544
+ if (resizeRef.value) {
3545
+ contentResizeObserver = new ResizeObserver(() => update());
3546
+ contentResizeObserver.observe(resizeRef.value);
3547
+ }
3548
+ });
3549
+ });
3550
+ vue.onBeforeUnmount(() => {
3551
+ wrapResizeObserver == null ? void 0 : wrapResizeObserver.disconnect();
3552
+ contentResizeObserver == null ? void 0 : contentResizeObserver.disconnect();
3553
+ if (flashTimer) clearTimeout(flashTimer);
3554
+ });
3555
+ vue.watch(
3556
+ () => [props.height, props.maxHeight],
3557
+ () => vue.nextTick(update)
3558
+ );
3559
+ return (_ctx, _cache) => {
3560
+ return vue.openBlock(), vue.createElementBlock("div", {
3561
+ class: vue.normalizeClass(["f-scrollbar", { "f-scrollbar--native": _ctx.native }]),
3562
+ onMouseenter: _cache[2] || (_cache[2] = ($event) => !_ctx.native && flashBar())
3563
+ }, [
3564
+ vue.createElementVNode("div", {
3565
+ ref_key: "wrapRef",
3566
+ ref: wrapRef,
3567
+ class: vue.normalizeClass(["f-scrollbar__wrap", { "f-scrollbar__wrap--hidden-bar": !_ctx.native }]),
3568
+ style: vue.normalizeStyle(vue.unref(wrapStyle)),
3569
+ onScroll: handleScroll
3570
+ }, [
3571
+ vue.createElementVNode("div", {
3572
+ ref_key: "resizeRef",
3573
+ ref: resizeRef,
3574
+ class: "f-scrollbar__view"
3575
+ }, [
3576
+ vue.renderSlot(_ctx.$slots, "default")
3577
+ ], 512)
3578
+ ], 38),
3579
+ !_ctx.native ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3580
+ _ctx.vertical && vue.unref(ratioY) < 1 ? (vue.openBlock(), vue.createElementBlock("div", {
3581
+ key: 0,
3582
+ class: vue.normalizeClass(["f-scrollbar__bar f-scrollbar__bar--vertical", { "f-scrollbar__bar--visible": _ctx.always || vue.unref(showBar) || vue.unref(isDragging) }])
3583
+ }, [
3584
+ vue.createElementVNode("div", {
3585
+ ref_key: "thumbYRef",
3586
+ ref: thumbYRef,
3587
+ class: "f-scrollbar__thumb",
3588
+ style: vue.normalizeStyle({ height: `${vue.unref(ratioY) * 100}%`, top: `${vue.unref(moveY)}%` }),
3589
+ onMousedown: _cache[0] || (_cache[0] = ($event) => startDrag("y", $event))
3590
+ }, null, 36)
3591
+ ], 2)) : vue.createCommentVNode("", true),
3592
+ _ctx.horizontal && vue.unref(ratioX) < 1 ? (vue.openBlock(), vue.createElementBlock("div", {
3593
+ key: 1,
3594
+ class: vue.normalizeClass(["f-scrollbar__bar f-scrollbar__bar--horizontal", { "f-scrollbar__bar--visible": _ctx.always || vue.unref(showBar) || vue.unref(isDragging) }])
3595
+ }, [
3596
+ vue.createElementVNode("div", {
3597
+ ref_key: "thumbXRef",
3598
+ ref: thumbXRef,
3599
+ class: "f-scrollbar__thumb",
3600
+ style: vue.normalizeStyle({ width: `${vue.unref(ratioX) * 100}%`, left: `${vue.unref(moveX)}%` }),
3601
+ onMousedown: _cache[1] || (_cache[1] = ($event) => startDrag("x", $event))
3602
+ }, null, 36)
3603
+ ], 2)) : vue.createCommentVNode("", true)
3604
+ ], 64)) : vue.createCommentVNode("", true)
3605
+ ], 34);
3606
+ };
3607
+ }
3608
+ });
3609
+ const _hoisted_1$1 = ["disabled"];
3610
+ const _hoisted_2$1 = ["value", "disabled", "placeholder"];
3611
+ const _hoisted_3$1 = ["disabled"];
3612
+ const _hoisted_4$1 = {
3613
+ key: 2,
3614
+ class: "f-input-number__stack"
3615
+ };
3616
+ const _hoisted_5$1 = ["disabled"];
3617
+ const _hoisted_6$1 = ["disabled"];
3618
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
3619
+ __name: "FInputNumber",
3620
+ props: /* @__PURE__ */ vue.mergeModels({
3621
+ min: { default: -Infinity },
3622
+ max: { default: Infinity },
3623
+ step: { default: 1 },
3624
+ precision: { default: void 0 },
3625
+ disabled: { type: Boolean, default: false },
3626
+ size: { default: "default" },
3627
+ controls: { type: Boolean, default: true },
3628
+ controlsPosition: { default: "right" },
3629
+ placeholder: { default: "" }
3630
+ }, {
3631
+ "modelValue": {},
3632
+ "modelModifiers": {}
3633
+ }),
3634
+ emits: ["update:modelValue"],
3635
+ setup(__props) {
3636
+ const props = __props;
3637
+ const modelValue = vue.useModel(__props, "modelValue");
3638
+ const inputRef = vue.ref(null);
3639
+ const isFocused = vue.ref(false);
3640
+ const displayText = vue.ref("");
3641
+ function format(value) {
3642
+ return props.precision !== void 0 ? value.toFixed(props.precision) : String(value);
3643
+ }
3644
+ function clamp(value) {
3645
+ let result = Math.min(Math.max(value, props.min), props.max);
3646
+ if (props.precision !== void 0) {
3647
+ result = Number(result.toFixed(props.precision));
3648
+ }
3649
+ return result;
3650
+ }
3651
+ vue.watch(
3652
+ modelValue,
3653
+ (val) => {
3654
+ if (isFocused.value) return;
3655
+ displayText.value = val === void 0 || val === null || Number.isNaN(val) ? "" : format(val);
3656
+ },
3657
+ { immediate: true }
3658
+ );
3659
+ const canIncrease = vue.computed(() => modelValue.value === void 0 || modelValue.value < props.max);
3660
+ const canDecrease = vue.computed(() => modelValue.value === void 0 || modelValue.value > props.min);
3661
+ function commit(raw) {
3662
+ if (raw.trim() === "") {
3663
+ modelValue.value = void 0;
3664
+ displayText.value = "";
3665
+ return;
3666
+ }
3667
+ const parsed = Number(raw);
3668
+ if (Number.isNaN(parsed)) {
3669
+ displayText.value = modelValue.value === void 0 ? "" : format(modelValue.value);
3670
+ return;
3671
+ }
3672
+ const clamped = clamp(parsed);
3673
+ modelValue.value = clamped;
3674
+ displayText.value = format(clamped);
3675
+ }
3676
+ function handleInput(e) {
3677
+ const raw = e.target.value;
3678
+ if (raw === "" || raw === "-" || /^-?\d*\.?\d*$/.test(raw)) {
3679
+ displayText.value = raw;
3680
+ }
3681
+ }
3682
+ function handleFocus() {
3683
+ isFocused.value = true;
3684
+ }
3685
+ function handleBlur() {
3686
+ isFocused.value = false;
3687
+ commit(displayText.value);
3688
+ }
3689
+ function handleEnter() {
3690
+ var _a;
3691
+ (_a = inputRef.value) == null ? void 0 : _a.blur();
3692
+ }
3693
+ function step(direction) {
3694
+ var _a;
3695
+ if (props.disabled) return;
3696
+ const base = (_a = modelValue.value) != null ? _a : 0;
3697
+ const next = clamp(base + direction * props.step);
3698
+ modelValue.value = next;
3699
+ displayText.value = format(next);
3700
+ }
3701
+ let repeatTimer = null;
3702
+ let repeatInterval = null;
3703
+ function startRepeat(direction) {
3704
+ if (props.disabled) return;
3705
+ step(direction);
3706
+ repeatTimer = setTimeout(() => {
3707
+ repeatInterval = setInterval(() => step(direction), 80);
3708
+ }, 400);
3709
+ }
3710
+ function stopRepeat() {
3711
+ if (repeatTimer) clearTimeout(repeatTimer);
3712
+ if (repeatInterval) clearInterval(repeatInterval);
3713
+ repeatTimer = null;
3714
+ repeatInterval = null;
3715
+ }
3716
+ function handleKeydown(e) {
3717
+ if (e.key === "ArrowUp") {
3718
+ e.preventDefault();
3719
+ step(1);
3720
+ } else if (e.key === "ArrowDown") {
3721
+ e.preventDefault();
3722
+ step(-1);
3723
+ } else if (e.key === "Enter") {
3724
+ handleEnter();
3725
+ }
3726
+ }
3727
+ function handleWheel(e) {
3728
+ if (!isFocused.value || props.disabled) return;
3729
+ e.preventDefault();
3730
+ step(e.deltaY < 0 ? 1 : -1);
3731
+ }
3732
+ return (_ctx, _cache) => {
3733
+ return vue.openBlock(), vue.createElementBlock("div", {
3734
+ class: vue.normalizeClass(["f-input-number", [
3735
+ `f-input-number--${_ctx.size}`,
3736
+ `f-input-number--controls-${_ctx.controlsPosition}`,
3737
+ { "f-input-number--disabled": _ctx.disabled, "f-input-number--without-controls": !_ctx.controls }
3738
+ ]])
3739
+ }, [
3740
+ _ctx.controls && _ctx.controlsPosition === "both" ? (vue.openBlock(), vue.createElementBlock("button", {
3741
+ key: 0,
3742
+ type: "button",
3743
+ class: "f-input-number__control f-input-number__control--minus",
3744
+ tabindex: "-1",
3745
+ disabled: _ctx.disabled || !vue.unref(canDecrease),
3746
+ onMousedown: _cache[0] || (_cache[0] = vue.withModifiers(($event) => startRepeat(-1), ["prevent"])),
3747
+ onMouseup: stopRepeat,
3748
+ onMouseleave: stopRepeat
3749
+ }, _cache[4] || (_cache[4] = [
3750
+ vue.createElementVNode("svg", {
3751
+ viewBox: "0 0 12 12",
3752
+ width: "10",
3753
+ height: "10"
3754
+ }, [
3755
+ vue.createElementVNode("path", {
3756
+ d: "M2 6h8",
3757
+ stroke: "currentColor",
3758
+ "stroke-width": "1.5",
3759
+ "stroke-linecap": "round"
3760
+ })
3761
+ ], -1)
3762
+ ]), 40, _hoisted_1$1)) : vue.createCommentVNode("", true),
3763
+ vue.createElementVNode("input", {
3764
+ ref_key: "inputRef",
3765
+ ref: inputRef,
3766
+ class: "f-input-number__inner",
3767
+ type: "text",
3768
+ inputmode: "decimal",
3769
+ value: vue.unref(displayText),
3770
+ disabled: _ctx.disabled,
3771
+ placeholder: _ctx.placeholder,
3772
+ onInput: handleInput,
3773
+ onFocus: handleFocus,
3774
+ onBlur: handleBlur,
3775
+ onKeydown: handleKeydown,
3776
+ onWheel: handleWheel
3777
+ }, null, 40, _hoisted_2$1),
3778
+ _ctx.controls && _ctx.controlsPosition === "both" ? (vue.openBlock(), vue.createElementBlock("button", {
3779
+ key: 1,
3780
+ type: "button",
3781
+ class: "f-input-number__control f-input-number__control--plus",
3782
+ tabindex: "-1",
3783
+ disabled: _ctx.disabled || !vue.unref(canIncrease),
3784
+ onMousedown: _cache[1] || (_cache[1] = vue.withModifiers(($event) => startRepeat(1), ["prevent"])),
3785
+ onMouseup: stopRepeat,
3786
+ onMouseleave: stopRepeat
3787
+ }, _cache[5] || (_cache[5] = [
3788
+ vue.createElementVNode("svg", {
3789
+ viewBox: "0 0 12 12",
3790
+ width: "10",
3791
+ height: "10"
3792
+ }, [
3793
+ vue.createElementVNode("path", {
3794
+ d: "M2 6h8M6 2v8",
3795
+ stroke: "currentColor",
3796
+ "stroke-width": "1.5",
3797
+ "stroke-linecap": "round"
3798
+ })
3799
+ ], -1)
3800
+ ]), 40, _hoisted_3$1)) : vue.createCommentVNode("", true),
3801
+ _ctx.controls && _ctx.controlsPosition === "right" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [
3802
+ vue.createElementVNode("button", {
3803
+ type: "button",
3804
+ class: "f-input-number__stack-btn",
3805
+ tabindex: "-1",
3806
+ disabled: _ctx.disabled || !vue.unref(canIncrease),
3807
+ onMousedown: _cache[2] || (_cache[2] = vue.withModifiers(($event) => startRepeat(1), ["prevent"])),
3808
+ onMouseup: stopRepeat,
3809
+ onMouseleave: stopRepeat
3810
+ }, _cache[6] || (_cache[6] = [
3811
+ vue.createElementVNode("svg", {
3812
+ viewBox: "0 0 12 12",
3813
+ width: "8",
3814
+ height: "8"
3815
+ }, [
3816
+ vue.createElementVNode("path", {
3817
+ d: "M2 7l4-4 4 4",
3818
+ stroke: "currentColor",
3819
+ "stroke-width": "1.5",
3820
+ fill: "none",
3821
+ "stroke-linecap": "round",
3822
+ "stroke-linejoin": "round"
3823
+ })
3824
+ ], -1)
3825
+ ]), 40, _hoisted_5$1),
3826
+ vue.createElementVNode("button", {
3827
+ type: "button",
3828
+ class: "f-input-number__stack-btn",
3829
+ tabindex: "-1",
3830
+ disabled: _ctx.disabled || !vue.unref(canDecrease),
3831
+ onMousedown: _cache[3] || (_cache[3] = vue.withModifiers(($event) => startRepeat(-1), ["prevent"])),
3832
+ onMouseup: stopRepeat,
3833
+ onMouseleave: stopRepeat
3834
+ }, _cache[7] || (_cache[7] = [
3835
+ vue.createElementVNode("svg", {
3836
+ viewBox: "0 0 12 12",
3837
+ width: "8",
3838
+ height: "8"
3839
+ }, [
3840
+ vue.createElementVNode("path", {
3841
+ d: "M2 5l4 4 4-4",
3842
+ stroke: "currentColor",
3843
+ "stroke-width": "1.5",
3844
+ fill: "none",
3845
+ "stroke-linecap": "round",
3846
+ "stroke-linejoin": "round"
3847
+ })
3848
+ ], -1)
3849
+ ]), 40, _hoisted_6$1)
3850
+ ])) : vue.createCommentVNode("", true)
3851
+ ], 2);
3852
+ };
3853
+ }
3854
+ });
3855
+ var __defProp2 = Object.defineProperty;
3856
+ var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
3857
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
3858
+ var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
3859
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3860
+ var __spreadValues2 = (a, b) => {
3861
+ for (var prop in b || (b = {}))
3862
+ if (__hasOwnProp2.call(b, prop))
3863
+ __defNormalProp2(a, prop, b[prop]);
3864
+ if (__getOwnPropSymbols2)
3865
+ for (var prop of __getOwnPropSymbols2(b)) {
3866
+ if (__propIsEnum2.call(b, prop))
3867
+ __defNormalProp2(a, prop, b[prop]);
3868
+ }
3869
+ return a;
3870
+ };
3871
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
3872
+ __name: "FIcon",
3873
+ props: {
3874
+ color: {},
3875
+ size: { default: "1em" }
3876
+ },
3877
+ setup(__props) {
3878
+ const props = __props;
3879
+ const style = vue.computed(() => ({
3880
+ width: typeof props.size === "number" ? `${props.size}px` : props.size,
3881
+ height: typeof props.size === "number" ? `${props.size}px` : props.size,
3882
+ color: props.color
3883
+ }));
3884
+ return (_ctx, _cache) => {
3885
+ return vue.openBlock(), vue.createElementBlock("span", {
3886
+ role: "img",
3887
+ class: "f-icon",
3888
+ style: vue.normalizeStyle(vue.unref(style))
3889
+ }, [
3890
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
3891
+ ], 4);
3892
+ };
3893
+ }
3894
+ });
3895
+ const _export_sfc$1 = (sfc, props) => {
3896
+ const target = sfc.__vccOpts || sfc;
3897
+ for (const [key, val] of props) {
3898
+ target[key] = val;
3899
+ }
3900
+ return target;
3901
+ };
3902
+ const FIcon$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$H, [["__scopeId", "data-v-baf7de0c"]]);
3903
+ const _hoisted_1$e = { class: "f-checkbox__wrapper" };
3904
+ const _hoisted_2$d = ["checked", "disabled"];
3905
+ const _hoisted_3$d = {
3906
+ key: 0,
3907
+ class: "f-checkbox__label"
3908
+ };
3909
+ /* @__PURE__ */ vue.defineComponent({
3910
+ __name: "FCheckbox",
3911
+ props: /* @__PURE__ */ vue.mergeModels({
3912
+ label: {},
3913
+ disabled: { type: Boolean }
3914
+ }, {
3915
+ "modelValue": __spreadValues2({ type: Boolean }, { default: false }),
3916
+ "modelModifiers": {}
3917
+ }),
3918
+ emits: ["update:modelValue"],
3919
+ setup(__props) {
3920
+ const modelValue = vue.useModel(__props, "modelValue");
3921
+ const props = __props;
3922
+ const handleChange = (e) => {
3923
+ if (props.disabled) return;
3924
+ const target = e.target;
3925
+ modelValue.value = target.checked;
3926
+ };
3927
+ return (_ctx, _cache) => {
3928
+ return vue.openBlock(), vue.createElementBlock("label", {
3929
+ class: vue.normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
3930
+ }, [
3931
+ vue.createElementVNode("span", _hoisted_1$e, [
3932
+ vue.createElementVNode("input", {
3933
+ type: "checkbox",
3934
+ checked: modelValue.value,
3935
+ disabled: _ctx.disabled,
3936
+ onChange: handleChange
3937
+ }, null, 40, _hoisted_2$d),
3938
+ _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
3939
+ ]),
3940
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$d, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true)
3941
+ ], 2);
3942
+ };
3943
+ }
3944
+ });
3945
+ /* @__PURE__ */ vue.defineComponent({
3946
+ __name: "FDialog",
3947
+ props: /* @__PURE__ */ vue.mergeModels({
3948
+ maskClosable: { type: Boolean, default: true },
3949
+ maskColor: { default: "black" },
3950
+ showMask: { type: Boolean, default: true }
3951
+ }, {
3952
+ "modelValue": __spreadValues2({ type: Boolean }, { default: false }),
3953
+ "modelModifiers": {}
3954
+ }),
3955
+ emits: ["update:modelValue"],
3956
+ setup(__props) {
3957
+ const props = __props;
3958
+ const visible = vue.useModel(__props, "modelValue");
3959
+ const handleMaskClick = () => {
3960
+ if (props.maskClosable) visible.value = false;
3961
+ };
3962
+ const maskBackgroundColor = vue.computed(() => {
3963
+ if (!props.showMask) return "transparent";
3964
+ switch (props.maskColor) {
3965
+ case "white":
3966
+ return "rgba(255, 255, 255, 0.5)";
3967
+ case "black":
3968
+ return "rgba(0, 0, 0, 0.5)";
3969
+ case "transparent":
3970
+ return "transparent";
3971
+ default:
3972
+ return "rgba(0, 0, 0, 0.5)";
3973
+ }
3974
+ });
3975
+ return (_ctx, _cache) => {
3976
+ return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
3977
+ vue.createVNode(vue.Transition, { name: "fade" }, {
3978
+ default: vue.withCtx(() => [
3979
+ visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
3980
+ key: 0,
3981
+ class: "f-dialog-mask",
3982
+ style: vue.normalizeStyle({ backgroundColor: vue.unref(maskBackgroundColor) }),
3983
+ onClick: handleMaskClick
3984
+ }, [
3985
+ vue.createElementVNode("div", {
3986
+ class: "f-dialog-container",
3987
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
3988
+ }, ["stop"]))
3989
+ }, [
3990
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
3991
+ ])
3992
+ ], 4)) : vue.createCommentVNode("", true)
3993
+ ]),
3994
+ _: 3
3995
+ })
3996
+ ]);
3997
+ };
3998
+ }
3999
+ });
4000
+ var __defProp22 = Object.defineProperty;
4001
+ var __getOwnPropSymbols22 = Object.getOwnPropertySymbols;
4002
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
4003
+ var __propIsEnum22 = Object.prototype.propertyIsEnumerable;
4004
+ var __defNormalProp22 = (obj, key, value) => key in obj ? __defProp22(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4005
+ var __spreadValues22 = (a, b) => {
4006
+ for (var prop in b || (b = {}))
4007
+ if (__hasOwnProp22.call(b, prop))
4008
+ __defNormalProp22(a, prop, b[prop]);
4009
+ if (__getOwnPropSymbols22)
4010
+ for (var prop of __getOwnPropSymbols22(b)) {
4011
+ if (__propIsEnum22.call(b, prop))
4012
+ __defNormalProp22(a, prop, b[prop]);
4013
+ }
4014
+ return a;
4015
+ };
4016
+ const _hoisted_1$d = { class: "f-checkbox__wrapper" };
4017
+ const _hoisted_2$c = ["checked", "disabled"];
4018
+ const _hoisted_3$c = {
4019
+ key: 0,
4020
+ class: "f-checkbox__label"
4021
+ };
4022
+ /* @__PURE__ */ vue.defineComponent({
4023
+ __name: "FCheckbox",
4024
+ props: /* @__PURE__ */ vue.mergeModels({
4025
+ label: {},
4026
+ disabled: { type: Boolean }
4027
+ }, {
4028
+ "modelValue": __spreadValues22({ type: Boolean }, { default: false }),
4029
+ "modelModifiers": {}
4030
+ }),
4031
+ emits: ["update:modelValue"],
4032
+ setup(__props) {
4033
+ const modelValue = vue.useModel(__props, "modelValue");
4034
+ const props = __props;
4035
+ const handleChange = (e) => {
4036
+ if (props.disabled) return;
4037
+ const target = e.target;
4038
+ modelValue.value = target.checked;
4039
+ };
4040
+ return (_ctx, _cache) => {
4041
+ return vue.openBlock(), vue.createElementBlock("label", {
4042
+ class: vue.normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
4043
+ }, [
4044
+ vue.createElementVNode("span", _hoisted_1$d, [
4045
+ vue.createElementVNode("input", {
4046
+ type: "checkbox",
4047
+ checked: modelValue.value,
4048
+ disabled: _ctx.disabled,
4049
+ onChange: handleChange
4050
+ }, null, 40, _hoisted_2$c),
4051
+ _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
4052
+ ]),
4053
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$c, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true)
4054
+ ], 2);
4055
+ };
4056
+ }
4057
+ });
4058
+ /* @__PURE__ */ vue.defineComponent({
4059
+ __name: "FDialog",
4060
+ props: /* @__PURE__ */ vue.mergeModels({
4061
+ maskClosable: { type: Boolean, default: true },
4062
+ maskColor: { default: "black" },
4063
+ showMask: { type: Boolean, default: true }
4064
+ }, {
4065
+ "modelValue": __spreadValues22({ type: Boolean }, { default: false }),
4066
+ "modelModifiers": {}
4067
+ }),
4068
+ emits: ["update:modelValue"],
4069
+ setup(__props) {
4070
+ const props = __props;
4071
+ const visible = vue.useModel(__props, "modelValue");
4072
+ const handleMaskClick = () => {
4073
+ if (props.maskClosable) visible.value = false;
4074
+ };
4075
+ const maskBackgroundColor = vue.computed(() => {
4076
+ if (!props.showMask) return "transparent";
4077
+ switch (props.maskColor) {
4078
+ case "white":
4079
+ return "rgba(255, 255, 255, 0.5)";
4080
+ case "black":
4081
+ return "rgba(0, 0, 0, 0.5)";
4082
+ case "transparent":
4083
+ return "transparent";
4084
+ default:
4085
+ return "rgba(0, 0, 0, 0.5)";
4086
+ }
4087
+ });
4088
+ return (_ctx, _cache) => {
4089
+ return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
4090
+ vue.createVNode(vue.Transition, { name: "fade" }, {
4091
+ default: vue.withCtx(() => [
4092
+ visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4093
+ key: 0,
4094
+ class: "f-dialog-mask",
4095
+ style: vue.normalizeStyle({ backgroundColor: vue.unref(maskBackgroundColor) }),
4096
+ onClick: handleMaskClick
4097
+ }, [
4098
+ vue.createElementVNode("div", {
4099
+ class: "f-dialog-container",
4100
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
4101
+ }, ["stop"]))
4102
+ }, [
4103
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4104
+ ])
4105
+ ], 4)) : vue.createCommentVNode("", true)
4106
+ ]),
4107
+ _: 3
4108
+ })
4109
+ ]);
4110
+ };
4111
+ }
4112
+ });
4113
+ var __defProp222 = Object.defineProperty;
4114
+ var __getOwnPropSymbols222 = Object.getOwnPropertySymbols;
4115
+ var __hasOwnProp222 = Object.prototype.hasOwnProperty;
4116
+ var __propIsEnum222 = Object.prototype.propertyIsEnumerable;
4117
+ var __defNormalProp222 = (obj, key, value) => key in obj ? __defProp222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4118
+ var __spreadValues222 = (a, b) => {
4119
+ for (var prop in b || (b = {}))
4120
+ if (__hasOwnProp222.call(b, prop))
4121
+ __defNormalProp222(a, prop, b[prop]);
4122
+ if (__getOwnPropSymbols222)
4123
+ for (var prop of __getOwnPropSymbols222(b)) {
4124
+ if (__propIsEnum222.call(b, prop))
4125
+ __defNormalProp222(a, prop, b[prop]);
4126
+ }
4127
+ return a;
4128
+ };
4129
+ const _hoisted_1$c = { class: "f-checkbox__wrapper" };
4130
+ const _hoisted_2$b = ["checked", "disabled"];
4131
+ const _hoisted_3$b = {
4132
+ key: 0,
4133
+ class: "f-checkbox__label"
4134
+ };
4135
+ /* @__PURE__ */ vue.defineComponent({
4136
+ __name: "FCheckbox",
4137
+ props: /* @__PURE__ */ vue.mergeModels({
4138
+ label: {},
4139
+ disabled: { type: Boolean }
4140
+ }, {
4141
+ "modelValue": __spreadValues222({ type: Boolean }, { default: false }),
4142
+ "modelModifiers": {}
4143
+ }),
4144
+ emits: ["update:modelValue"],
4145
+ setup(__props) {
4146
+ const modelValue = vue.useModel(__props, "modelValue");
4147
+ const props = __props;
4148
+ const handleChange = (e) => {
4149
+ if (props.disabled) return;
4150
+ const target = e.target;
4151
+ modelValue.value = target.checked;
4152
+ };
4153
+ return (_ctx, _cache) => {
4154
+ return vue.openBlock(), vue.createElementBlock("label", {
4155
+ class: vue.normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
4156
+ }, [
4157
+ vue.createElementVNode("span", _hoisted_1$c, [
4158
+ vue.createElementVNode("input", {
4159
+ type: "checkbox",
4160
+ checked: modelValue.value,
4161
+ disabled: _ctx.disabled,
4162
+ onChange: handleChange
4163
+ }, null, 40, _hoisted_2$b),
4164
+ _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
4165
+ ]),
4166
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$b, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true)
4167
+ ], 2);
4168
+ };
4169
+ }
4170
+ });
4171
+ /* @__PURE__ */ vue.defineComponent({
4172
+ __name: "FDialog",
4173
+ props: /* @__PURE__ */ vue.mergeModels({
4174
+ maskClosable: { type: Boolean, default: true },
4175
+ maskColor: { default: "black" },
4176
+ showMask: { type: Boolean, default: true }
4177
+ }, {
4178
+ "modelValue": __spreadValues222({ type: Boolean }, { default: false }),
4179
+ "modelModifiers": {}
4180
+ }),
4181
+ emits: ["update:modelValue"],
4182
+ setup(__props) {
4183
+ const props = __props;
4184
+ const visible = vue.useModel(__props, "modelValue");
4185
+ const handleMaskClick = () => {
4186
+ if (props.maskClosable) visible.value = false;
4187
+ };
4188
+ const maskBackgroundColor = vue.computed(() => {
4189
+ if (!props.showMask) return "transparent";
4190
+ switch (props.maskColor) {
4191
+ case "white":
4192
+ return "rgba(255, 255, 255, 0.5)";
4193
+ case "black":
4194
+ return "rgba(0, 0, 0, 0.5)";
4195
+ case "transparent":
4196
+ return "transparent";
4197
+ default:
4198
+ return "rgba(0, 0, 0, 0.5)";
4199
+ }
4200
+ });
4201
+ return (_ctx, _cache) => {
4202
+ return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
4203
+ vue.createVNode(vue.Transition, { name: "fade" }, {
4204
+ default: vue.withCtx(() => [
4205
+ visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4206
+ key: 0,
4207
+ class: "f-dialog-mask",
4208
+ style: vue.normalizeStyle({ backgroundColor: vue.unref(maskBackgroundColor) }),
4209
+ onClick: handleMaskClick
4210
+ }, [
4211
+ vue.createElementVNode("div", {
4212
+ class: "f-dialog-container",
4213
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
4214
+ }, ["stop"]))
4215
+ }, [
4216
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4217
+ ])
4218
+ ], 4)) : vue.createCommentVNode("", true)
4219
+ ]),
4220
+ _: 3
4221
+ })
4222
+ ]);
4223
+ };
4224
+ }
4225
+ });
4226
+ var __defProp2222 = Object.defineProperty;
4227
+ var __getOwnPropSymbols2222 = Object.getOwnPropertySymbols;
4228
+ var __hasOwnProp2222 = Object.prototype.hasOwnProperty;
4229
+ var __propIsEnum2222 = Object.prototype.propertyIsEnumerable;
4230
+ var __defNormalProp2222 = (obj, key, value) => key in obj ? __defProp2222(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4231
+ var __spreadValues2222 = (a, b) => {
4232
+ for (var prop in b || (b = {}))
4233
+ if (__hasOwnProp2222.call(b, prop))
4234
+ __defNormalProp2222(a, prop, b[prop]);
4235
+ if (__getOwnPropSymbols2222)
4236
+ for (var prop of __getOwnPropSymbols2222(b)) {
4237
+ if (__propIsEnum2222.call(b, prop))
4238
+ __defNormalProp2222(a, prop, b[prop]);
4239
+ }
4240
+ return a;
4241
+ };
4242
+ const _hoisted_1$a = { class: "f-checkbox__wrapper" };
4243
+ const _hoisted_2$9 = ["checked", "disabled"];
4244
+ const _hoisted_3$9 = {
4245
+ key: 0,
4246
+ class: "f-checkbox__label"
4247
+ };
4248
+ /* @__PURE__ */ vue.defineComponent({
4249
+ __name: "FCheckbox",
4250
+ props: /* @__PURE__ */ vue.mergeModels({
4251
+ label: {},
4252
+ disabled: { type: Boolean }
4253
+ }, {
4254
+ "modelValue": __spreadValues2222({ type: Boolean }, { default: false }),
4255
+ "modelModifiers": {}
4256
+ }),
4257
+ emits: ["update:modelValue"],
4258
+ setup(__props) {
4259
+ const modelValue = vue.useModel(__props, "modelValue");
4260
+ const props = __props;
4261
+ const handleChange = (e) => {
4262
+ if (props.disabled) return;
4263
+ const target = e.target;
4264
+ modelValue.value = target.checked;
4265
+ };
4266
+ return (_ctx, _cache) => {
4267
+ return vue.openBlock(), vue.createElementBlock("label", {
4268
+ class: vue.normalizeClass(["f-checkbox", { "is-disabled": _ctx.disabled }])
4269
+ }, [
4270
+ vue.createElementVNode("span", _hoisted_1$a, [
4271
+ vue.createElementVNode("input", {
4272
+ type: "checkbox",
4273
+ checked: modelValue.value,
4274
+ disabled: _ctx.disabled,
4275
+ onChange: handleChange
4276
+ }, null, 40, _hoisted_2$9),
4277
+ _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "f-checkbox__checkmark" }, null, -1))
4278
+ ]),
4279
+ _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$9, vue.toDisplayString(_ctx.label), 1)) : vue.createCommentVNode("", true)
4280
+ ], 2);
4281
+ };
4282
+ }
4283
+ });
4284
+ /* @__PURE__ */ vue.defineComponent({
4285
+ __name: "FDialog",
4286
+ props: /* @__PURE__ */ vue.mergeModels({
4287
+ maskClosable: { type: Boolean, default: true },
4288
+ maskColor: { default: "black" },
4289
+ showMask: { type: Boolean, default: true }
4290
+ }, {
4291
+ "modelValue": __spreadValues2222({ type: Boolean }, { default: false }),
4292
+ "modelModifiers": {}
4293
+ }),
4294
+ emits: ["update:modelValue"],
4295
+ setup(__props) {
4296
+ const props = __props;
4297
+ const visible = vue.useModel(__props, "modelValue");
4298
+ const handleMaskClick = () => {
4299
+ if (props.maskClosable) visible.value = false;
4300
+ };
4301
+ const maskBackgroundColor = vue.computed(() => {
4302
+ if (!props.showMask) return "transparent";
4303
+ switch (props.maskColor) {
4304
+ case "white":
4305
+ return "rgba(255, 255, 255, 0.5)";
4306
+ case "black":
4307
+ return "rgba(0, 0, 0, 0.5)";
4308
+ case "transparent":
4309
+ return "transparent";
4310
+ default:
4311
+ return "rgba(0, 0, 0, 0.5)";
4312
+ }
4313
+ });
4314
+ return (_ctx, _cache) => {
4315
+ return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
4316
+ vue.createVNode(vue.Transition, { name: "fade" }, {
4317
+ default: vue.withCtx(() => [
4318
+ visible.value ? (vue.openBlock(), vue.createElementBlock("div", {
4319
+ key: 0,
4320
+ class: "f-dialog-mask",
4321
+ style: vue.normalizeStyle({ backgroundColor: vue.unref(maskBackgroundColor) }),
4322
+ onClick: handleMaskClick
4323
+ }, [
4324
+ vue.createElementVNode("div", {
4325
+ class: "f-dialog-container",
4326
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
4327
+ }, ["stop"]))
4328
+ }, [
4329
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4330
+ ])
4331
+ ], 4)) : vue.createCommentVNode("", true)
4332
+ ]),
4333
+ _: 3
4334
+ })
4335
+ ]);
4336
+ };
4337
+ }
4338
+ });
4339
+ const _hoisted_1 = { class: "f-result__icon" };
4340
+ const _hoisted_2 = {
4341
+ key: 0,
4342
+ class: "f-result__code"
4343
+ };
4344
+ const _hoisted_3 = {
4345
+ key: 0,
4346
+ class: "f-result__title"
4347
+ };
4348
+ const _hoisted_4 = {
4349
+ key: 1,
4350
+ class: "f-result__subtitle"
4351
+ };
4352
+ const _hoisted_5 = {
4353
+ key: 2,
4354
+ class: "f-result__extra"
4355
+ };
4356
+ const _hoisted_6 = {
4357
+ key: 3,
4358
+ class: "f-result__content"
4359
+ };
4360
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4361
+ __name: "FResult",
4362
+ props: {
4363
+ status: { default: "info" },
4364
+ title: {},
4365
+ subTitle: {},
4366
+ icon: {}
4367
+ },
4368
+ setup(__props) {
4369
+ const props = __props;
4370
+ const statusIconMap = {
4371
+ success: ionicons5.CheckmarkCircle,
4372
+ error: ionicons5.CloseCircle,
4373
+ warning: ionicons5.AlertCircle,
4374
+ info: ionicons5.InformationCircle
4375
+ };
4376
+ const isCodeStatus = vue.computed(() => ["403", "404", "500"].includes(props.status));
4377
+ const showCode = vue.computed(() => !props.icon && isCodeStatus.value);
4378
+ const resolvedIcon = vue.computed(() => {
4379
+ var _a;
4380
+ return (_a = props.icon) != null ? _a : statusIconMap[props.status];
4381
+ });
4382
+ return (_ctx, _cache) => {
4383
+ return vue.openBlock(), vue.createElementBlock("div", {
4384
+ class: vue.normalizeClass(["f-result", `f-result--${_ctx.status}`])
4385
+ }, [
4386
+ vue.createElementVNode("div", _hoisted_1, [
4387
+ vue.renderSlot(_ctx.$slots, "icon", {}, () => [
4388
+ vue.unref(showCode) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(_ctx.status), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(FIcon$1), {
4389
+ key: 1,
4390
+ size: 72
4391
+ }, {
4392
+ default: vue.withCtx(() => [
4393
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(resolvedIcon))))
4394
+ ]),
4395
+ _: 1
4396
+ }))
4397
+ ], true)
4398
+ ]),
4399
+ _ctx.$slots.title || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
4400
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
4401
+ vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
4402
+ ], true)
4403
+ ])) : vue.createCommentVNode("", true),
4404
+ _ctx.$slots.subtitle || _ctx.subTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
4405
+ vue.renderSlot(_ctx.$slots, "subtitle", {}, () => [
4406
+ vue.createTextVNode(vue.toDisplayString(_ctx.subTitle), 1)
4407
+ ], true)
4408
+ ])) : vue.createCommentVNode("", true),
4409
+ _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
4410
+ vue.renderSlot(_ctx.$slots, "extra", {}, void 0, true)
4411
+ ])) : vue.createCommentVNode("", true),
4412
+ _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
4413
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
4414
+ ])) : vue.createCommentVNode("", true)
4415
+ ], 2);
4416
+ };
4417
+ }
4418
+ });
4419
+ const FResult = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c8f97d09"]]);
4420
+ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4421
+ __proto__: null,
4422
+ FAffix,
4423
+ FAlert,
4424
+ FAvatar,
4425
+ FBadge,
4426
+ FBreadcrumb,
4427
+ FButton,
4428
+ FButtonGroup: _sfc_main$8,
4429
+ FCard,
4430
+ FCheckbox,
4431
+ FCol,
4432
+ FCollapse: _sfc_main$7,
4433
+ FCollapseItem: _sfc_main$6,
4434
+ FColorPicker: _sfc_main$5,
4435
+ FContainer,
4436
+ FDialog,
4437
+ FDivider,
4438
+ FDropdown,
4439
+ FEditor,
4440
+ FEmpty: _sfc_main$4,
4441
+ FForm,
4442
+ FFormItem,
4443
+ FIcon,
4444
+ FImage,
4445
+ FInput,
4446
+ FInputNumber: _sfc_main$1,
4447
+ FLink,
4448
+ FLoading,
4449
+ FPagination,
4450
+ FProgress,
4451
+ FRate,
4452
+ FResult,
4453
+ FRow,
4454
+ FScrollbar: _sfc_main$2,
4455
+ FSelect,
4456
+ FSlider: _sfc_main$3,
4457
+ FSpace,
4458
+ FTable,
4459
+ FTabs,
4460
+ FTag,
4461
+ FText,
4462
+ FTooltip,
4463
+ FTypography,
4464
+ FUpload
4465
+ }, Symbol.toStringTag, { value: "Module" }));
4466
+ const install = (app) => {
4467
+ Object.entries(components).forEach(([name, component]) => {
4468
+ app.component(name, component);
4469
+ });
4470
+ };
4471
+ exports2.FAffix = FAffix;
4472
+ exports2.FAlert = FAlert;
4473
+ exports2.FAvatar = FAvatar;
4474
+ exports2.FBadge = FBadge;
4475
+ exports2.FBreadcrumb = FBreadcrumb;
4476
+ exports2.FButton = FButton;
4477
+ exports2.FButtonGroup = _sfc_main$8;
4478
+ exports2.FCard = FCard;
4479
+ exports2.FCheckbox = FCheckbox;
4480
+ exports2.FCol = FCol;
4481
+ exports2.FCollapse = _sfc_main$7;
4482
+ exports2.FCollapseItem = _sfc_main$6;
4483
+ exports2.FColorPicker = _sfc_main$5;
4484
+ exports2.FContainer = FContainer;
4485
+ exports2.FDialog = FDialog;
4486
+ exports2.FDivider = FDivider;
4487
+ exports2.FDropdown = FDropdown;
4488
+ exports2.FEditor = FEditor;
4489
+ exports2.FEmpty = _sfc_main$4;
4490
+ exports2.FForm = FForm;
4491
+ exports2.FFormItem = FFormItem;
4492
+ exports2.FIcon = FIcon;
4493
+ exports2.FImage = FImage;
4494
+ exports2.FInput = FInput;
4495
+ exports2.FInputNumber = _sfc_main$1;
4496
+ exports2.FLink = FLink;
4497
+ exports2.FLoading = FLoading;
4498
+ exports2.FPagination = FPagination;
4499
+ exports2.FProgress = FProgress;
4500
+ exports2.FRate = FRate;
4501
+ exports2.FResult = FResult;
4502
+ exports2.FRow = FRow;
4503
+ exports2.FScrollbar = _sfc_main$2;
4504
+ exports2.FSelect = FSelect;
4505
+ exports2.FSlider = _sfc_main$3;
4506
+ exports2.FSpace = FSpace;
4507
+ exports2.FTable = FTable;
4508
+ exports2.FTabs = FTabs;
4509
+ exports2.FTag = FTag;
4510
+ exports2.FText = FText;
4511
+ exports2.FTooltip = FTooltip;
4512
+ exports2.FTypography = FTypography;
4513
+ exports2.FUpload = FUpload;
4514
+ exports2.default = install;
4515
+ Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
4516
+ });