bkui-vue 0.0.1-beta.465 → 0.0.1-beta.467
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.
- package/dist/index.cjs.js +20 -20
- package/dist/index.esm.js +2950 -2949
- package/dist/index.umd.js +20 -20
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/plugin-popover/index.js +1 -1
- package/lib/popover/index.d.ts +12 -12
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +6 -6
- package/lib/popover/props.d.ts +2 -2
- package/lib/popover/root.d.ts +11 -0
- package/lib/select/index.d.ts +12 -12
- package/lib/select/select.d.ts +6 -6
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/index.js +1 -1
- package/lib/slider/slider.d.ts +2 -2
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +3 -0
- package/lib/table/table.less +4 -0
- package/lib/table/table.variable.css +3 -0
- package/lib/table-column/index.js +1 -1
- package/lib/tag-input/index.d.ts +6 -6
- package/lib/tag-input/tag-input.d.ts +4 -4
- package/lib/tag-input/tag-input.less +11 -11
- package/lib/tag-input/tag-props.d.ts +2 -2
- package/lib/tree/constant.d.ts +2 -1
- package/lib/tree/index.js +1 -1
- package/lib/virtual-render/index.js +1 -1
- package/package.json +1 -1
package/lib/popover/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types")):t(e["../shared"],e.vue,e["vue-types"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n)=>(()=>{var o={8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),l=n(8725),a=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,s=t||[],f=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==d){var p=i();null==f&&(f=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,y=v-a+(m-c)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||v>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,c=m,r=d;var h=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;s[u++]=h>>>24&255,s[u++]=h>>>16&255,s[u++]=h>>>8&255,s[u++]=255&h;var g=v/4294967296*1e4&268435455;s[u++]=g>>>8&255,s[u++]=255&g,s[u++]=g>>>24&15|16,s[u++]=g>>>16&255,s[u++]=d>>>8|128,s[u++]=255&d;for(var b=0;b<6;++b)s[u+b]=f[b];return t||l(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=n}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";i.r(l),i.d(l,{$bkPopover:()=>tt,PopoverProps:()=>M,default:()=>nt});var e=i(4212),t=i(748);function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,l=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var r,a=new Map;function c(e,t){var n,o=[];return Array.isArray(t.arg)?o=t.arg:(n=t.arg,"undefined"!=typeof Element&&n instanceof Element&&o.push(t.arg)),function(n,r){var i=t.instance.popperRef,l=n.target,a=null==r?void 0:r.target,c=!t||!t.instance,u=!l||!a,s=e.contains(l)||e.contains(a),f=e===l,d=o.length&&o.some((function(e){return null==e?void 0:e.contains(l)}))||o.length&&o.includes(a),p=i&&(i.contains(l)||i.contains(a));c||u||s||f||d||p||t.value(n,r)}}document.addEventListener("mousedown",(function(e){return r=e})),document.addEventListener("mouseup",(function(e){var t,o=n(a.values());try{for(o.s();!(t=o.n()).done;){var i,l=n(t.value);try{for(l.s();!(i=l.n()).done;)(0,i.value.documentHandler)(e,r)}catch(e){l.e(e)}finally{l.f()}}}catch(e){o.e(e)}finally{o.f()}}));var u={beforeMount:function(e,t){a.has(e)||a.set(e,[]),a.get(e).push({documentHandler:c(e,t),bindingFn:t.value})},updated:function(e,t){a.has(e)||a.set(e,[]);var n=a.get(e),o=n.findIndex((function(e){return e.bindingFn===t.oldValue})),r={documentHandler:c(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted:function(e){a.delete(e)},install:function(e){e.directive("bkTooltips",u)}};const s=u,f=(0,t.defineComponent)({name:"PopArrow",render:function(){var n=(0,e.resolveClassName)("pop2-arrow");return(0,t.createVNode)("div",{class:n},null)}});function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v,m,y=function(){return!0};!function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"}(m||(m={}));var h=(p(v={},m.SHOW,y),p(v,m.HIDE,y),p(v,m.CLICK_OUTSIDE,y),p(v,m.CONTENT_MOUSEENTER,y),p(v,m.CONTENT_MOUSELEAVE,y),p(v,m.STOP_HIDE,y),v);const g=(0,t.defineComponent)({name:"PopContent",props:{width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),extCls:e.PropTypes.string.def("")},setup:function(e){var n=function(e){return/^\d+\.?\d*$/.test("".concat(e))?"".concat(e,"px"):e};return{style:(0,t.computed)((function(){return{width:n(e.width),height:n(e.height),maxHeight:n(e.maxHeight)}}))}},render:function(){var n,o,r,i,l,a,c=[(0,e.resolveClassName)("popover"),(0,e.resolveClassName)("pop2-content"),this.extCls];return(0,t.createVNode)("div",{class:c,tabindex:"-1",style:this.style},[null!==(r=null===(o=(n=this.$slots).arrow)||void 0===o?void 0:o.call(n))&&void 0!==r?r:"",null!==(a=null===(l=(i=this.$slots).default)||void 0===l?void 0:l.call(i))&&void 0!==a?a:""])}});var b,w,T,x,E,P,R,O,A,C,S,N,L,I,H=i(210);(0,H.createTypes)({}),function(e){e.SMALL="small",e.LARGE="large",e.DEFAULT="default"}(b||(b={})),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}(w||(w={})),function(e){e.IF="if",e.SHOW="show"}(T||(T={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(x||(x={})),function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.DANGER="danger"}(E||(E={})),function(e){e.AUTO="auto",e.AUTO_START="auto-start",e.AUTO_END="auto-end",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_START="top-start",e.TOP_END="top-end",e.BOTTOM_START="bottom-start",e.BOTTOM_END="bottom-end",e.RIGHT_START="right-start",e.RIGHT_END="right-end",e.LEFT_START="left-start",e.LEFT_END="left-end"}(P||(P={})),function(e){e.HOVER="hover",e.CLICK="click",e.MANUAL="manual"}(R||(R={})),function(e){e.AUTO="auto",e.SHOWN="shown"}(O||(O={})),function(e){e.SHOW="show",e.OPERATION="operation",e.CONFIRM="confirm",e.PROCESS="process"}(A||(A={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(C||(C={})),function(e){e.DASHED="dashed",e.SOLID="solid"}(S||(S={})),function(e){e.SUCCESS="success",e.INFO="info",e.WARNING="warning",e.DANGER="danger"}(N||(N={})),function(e){e.SIMPLICITY="simplicity",e.NORMAL="normal"}(L||(L={})),function(e){e.CHECKBOX="checkbox",e.CHECK="check"}(I||(I={}));var D={onAfterHidden:Function,onAfterShow:Function},M=Object.assign({isShow:e.PropTypes.bool.def(!1),always:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),content:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number,e.PropTypes.any]).def(""),allowHtml:e.PropTypes.bool.def(!1),placement:(0,e.placementType)().def(P.TOP_START),theme:e.PropTypes.string.def("dark"),trigger:(0,H.string)().def(R.HOVER),renderType:(0,H.toType)("popRenderType",{}).def(O.SHOWN),arrow:e.PropTypes.bool.def(!0),padding:e.PropTypes.number.def(5),offset:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.shape({})]).def(6),boundary:e.PropTypes.oneOfType([e.PropTypes.string.def("parent"),e.PropTypes.instanceOf(HTMLElement)]),zIndex:e.PropTypes.number.def(void 0),disableTeleport:e.PropTypes.bool.def(!1),autoPlacement:e.PropTypes.bool.def(!1),autoVisibility:e.PropTypes.bool.def(!0),disableOutsideClick:e.PropTypes.bool.def(!1),disableTransform:e.PropTypes.bool.def(!1),reference:e.PropTypes.any.def(null),modifiers:e.PropTypes.array.def([]),popoverDelay:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.arrayOf(e.PropTypes.number)]).def(100),extCls:e.PropTypes.string.def("")},D);const F=(0,t.defineComponent)({name:"PopReference",render:function(){var e,t,n;return null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""}}),j=(0,t.defineComponent)({props:{class:e.PropTypes.string.def("")},render:function(){var e,n;return(0,t.createVNode)(t.Fragment,null,[null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e)])}});function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,l,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const _=["top","right","bottom","left"],$=["start","end"],B=_.reduce(((e,t)=>e.concat(t,t+"-"+$[0],t+"-"+$[1])),[]),U=Math.min,W=Math.max,q=Math.round,z=Math.floor,G=e=>({x:e,y:e}),K={left:"right",right:"left",bottom:"top",top:"bottom"},Y={start:"end",end:"start"};function X(e,t,n){return W(e,U(t,n))}function Z(e,t){return"function"==typeof e?e(t):e}function J(e){return e.split("-")[0]}function Q(e){return e.split("-")[1]}function ee(e){return"x"===e?"y":"x"}function te(e){return"y"===e?"height":"width"}function ne(e){return["top","bottom"].includes(J(e))?"y":"x"}function oe(e){return ee(ne(e))}function re(e,t,n){void 0===n&&(n=!1);const o=Q(e),r=oe(e),i=te(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=le(l)),[l,le(l)]}function ie(e){return e.replace(/start|end/g,(e=>Y[e]))}function le(e){return e.replace(/left|right|bottom|top/g,(e=>K[e]))}function ae(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ce(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ue(e,t,n){let{reference:o,floating:r}=e;const i=ne(t),l=oe(t),a=te(l),c=J(t),u="y"===i,s=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let p;switch(c){case"top":p={x:s,y:o.y-r.height};break;case"bottom":p={x:s,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(Q(t)){case"start":p[l]-=d*(n&&u?-1:1);break;case"end":p[l]+=d*(n&&u?-1:1)}return p}async function se(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Z(t,e),v=ae(p),m=a[d?"floating"===f?"reference":"floating":f],y=ce(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:s,strategy:c})),h="floating"===f?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=ce(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h,offsetParent:g,strategy:c}):h);return{top:(y.top-w.top+v.top)/b.y,bottom:(w.bottom-y.bottom+v.bottom)/b.y,left:(y.left-w.left+v.left)/b.x,right:(w.right-y.right+v.right)/b.x}}function fe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function de(e){return _.some((t=>e[t]>=0))}function pe(e){const t=U(...e.map((e=>e.left))),n=U(...e.map((e=>e.top)));return{x:t,y:n,width:W(...e.map((e=>e.right)))-t,height:W(...e.map((e=>e.bottom)))-n}}const ve=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=J(n),a=Q(n),c="y"===ne(n),u=["left","top"].includes(l)?-1:1,s=i&&c?-1:1,f=Z(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),c?{x:p*s,y:d*u}:{x:d*u,y:p*s}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},me=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Z(e,t),u={x:n,y:o},s=await se(t,c),f=ne(J(r)),d=ee(f);let p=u[d],v=u[f];if(i){const e="y"===d?"bottom":"right";p=X(p+s["y"===d?"top":"left"],p,p-s[e])}if(l){const e="y"===f?"bottom":"right";v=X(v+s["y"===f?"top":"left"],v,v-s[e])}const m=a.fn({...t,[d]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function ye(e){return be(e)?(e.nodeName||"").toLowerCase():"#document"}function he(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ge(e){var t;return null==(t=(be(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function be(e){return e instanceof Node||e instanceof he(e).Node}function we(e){return e instanceof Element||e instanceof he(e).Element}function Te(e){return e instanceof HTMLElement||e instanceof he(e).HTMLElement}function xe(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof he(e).ShadowRoot)}function Ee(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Pe(e){return["table","td","th"].includes(ye(e))}function Re(e){const t=Oe(),n=Ce(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Oe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(ye(e))}function Ce(e){return he(e).getComputedStyle(e)}function Se(e){return we(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ne(e){if("html"===ye(e))return e;const t=e.assignedSlot||e.parentNode||xe(e)&&e.host||ge(e);return xe(t)?t.host:t}function Le(e){const t=Ne(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&Ee(t)?t:Le(t)}function Ie(e,t){var n;void 0===t&&(t=[]);const o=Le(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=he(o);return r?t.concat(i,i.visualViewport||[],Ee(o)?o:[]):t.concat(o,Ie(o))}function He(e){const t=Ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Te(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=q(n)!==i||q(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function De(e){return we(e)?e:e.contextElement}function Me(e){const t=De(e);if(!Te(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=He(t);let l=(i?q(n.width):n.width)/o,a=(i?q(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Fe=G(0);function je(e){const t=he(e);return Oe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Fe}function ke(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=De(e);let l=G(1);t&&(o?we(o)&&(l=Me(o)):l=Me(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==he(e))&&t}(i,n,o)?je(i):G(0);let c=(r.left+a.x)/l.x,u=(r.top+a.y)/l.y,s=r.width/l.x,f=r.height/l.y;if(i){const e=he(i),t=o&&we(o)?he(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Me(n),t=n.getBoundingClientRect(),o=Ce(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,u*=e.y,s*=e.x,f*=e.y,c+=r,u+=i,n=he(n).frameElement}}return ce({width:s,height:f,x:c,y:u})}function Ve(e){return ke(ge(e)).left+Se(e).scrollLeft}function _e(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=he(e),o=ge(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const e=Oe();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}(e,n);else if("document"===t)o=function(e){const t=ge(e),n=Se(e),o=e.ownerDocument.body,r=W(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=W(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Ve(e);const a=-n.scrollTop;return"rtl"===Ce(o).direction&&(l+=W(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(ge(e));else if(we(t))o=function(e,t){const n=ke(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Te(e)?Me(e):G(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=je(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return ce(o)}function $e(e,t){const n=Ne(e);return!(n===t||!we(n)||Ae(n))&&("fixed"===Ce(n).position||$e(n,t))}function Be(e,t,n){const o=Te(t),r=ge(t),i="fixed"===n,l=ke(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=G(0);if(o||!o&&!i)if(("body"!==ye(t)||Ee(r))&&(a=Se(t)),o){const e=ke(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=Ve(r));return{x:l.left+a.scrollLeft-c.x,y:l.top+a.scrollTop-c.y,width:l.width,height:l.height}}function Ue(e,t){return Te(e)&&"fixed"!==Ce(e).position?t?t(e):e.offsetParent:null}function We(e,t){const n=he(e);if(!Te(e))return n;let o=Ue(e,t);for(;o&&Pe(o)&&"static"===Ce(o).position;)o=Ue(o,t);return o&&("html"===ye(o)||"body"===ye(o)&&"static"===Ce(o).position&&!Re(o))?n:o||function(e){let t=Ne(e);for(;Te(t)&&!Ae(t);){if(Re(t))return t;t=Ne(t)}return null}(e)||n}const qe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=Te(n),i=ge(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=G(1);const c=G(0);if((r||!r&&"fixed"!==o)&&(("body"!==ye(n)||Ee(i))&&(l=Se(n)),Te(n))){const e=ke(n);a=Me(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+c.x,y:t.y*a.y-l.scrollTop*a.y+c.y}},getDocumentElement:ge,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Ie(e).filter((e=>we(e)&&"body"!==ye(e))),r=null;const i="fixed"===Ce(e).position;let l=i?Ne(e):e;for(;we(l)&&!Ae(l);){const t=Ce(l),n=Re(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Ee(l)&&!n&&$e(e,l))?o=o.filter((e=>e!==l)):r=t,l=Ne(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=_e(t,n,r);return e.top=W(o.top,e.top),e.right=U(o.right,e.right),e.bottom=U(o.bottom,e.bottom),e.left=W(o.left,e.left),e}),_e(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:We,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||We,i=this.getDimensions;return{reference:Be(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return He(e)},getScale:Me,isElement:we,isRTL:function(e){return"rtl"===Ce(e).direction}};var ze=i(8022),Ge={},Ke=function(e){return document.querySelector(e)instanceof HTMLElement},Ye=function(e){return e instanceof Element||e instanceof HTMLDocument},Xe=function(e){if(Ye(e))return{isElement:!0,content:e,vNode:void 0};if(/^(#|\.)/.test(e)){var t=document.querySelector(e),n=Ye(t);return{isElement:n,content:n?t:e,vNode:n?void 0:e}}return{isElement:!1,content:e,vNode:e}};const Ze=function(n,o,r){var i=r.refReference,l=r.refContent,a=r.refArrow,c=r.refRoot,u=(0,t.ref)(!1),s=(0,t.ref)(),f=function(){var e,t,n,o=T(null===(e=i.value)||void 0===e?void 0:e.$el);return(null===(t=document.fullscreenElement)||void 0===t?void 0:t.shadowRoot)?document.fullscreenElement.shadowRoot.contains(o):null===(n=document.fullscreenElement)||void 0===n?void 0:n.contains(o)},d=["dark","light"],v=(0,t.computed)((function(){var e,t,o=null!==(t=null===(e=n.theme)||void 0===e?void 0:e.split(/\s+/))&&void 0!==t?t:[];return o.sort((function(e,t){return Number(d.includes(t))-Number(d.includes(e))})),{systemThemes:o,customThemes:o.filter((function(e){return!d.includes(e)}))}})),y=function(){return n.autoVisibility},h=function(){return n.autoPlacement},g=function(){var e,t,o,r,u=T(null===(e=i.value)||void 0===e?void 0:e.$el),s=T(null===(t=l.value)||void 0===t?void 0:t.$el),f=n.arrow?T(null===(o=a.value)||void 0===o?void 0:o.$el):null,d=T(null===(r=c.value)||void 0===r?void 0:r.$el),p=Xe(n.content),v=p.isElement,m=p.content;return s&&v&&!(null==s?void 0:s.contains(m))&&s.append(m),{elReference:u,elContent:s,elArrow:f,root:d}},b=function(){var e={};return Array.isArray(n.modifiers)&&n.modifiers.forEach((function(t){var n,o,r,i,l;if("offset"===t.name){if("number"==typeof(null===(n=t.options)||void 0===n?void 0:n.offset)&&(l=null===(o=t.options)||void 0===o?void 0:o.offset),Array.isArray(null===(r=t.options)||void 0===r?void 0:r.offset)){var a=V(null===(i=t.options)||void 0===i?void 0:i.offset,2);l={mainAxis:a[0],crossAxis:a[1]}}Object.assign(e,{offset:l})}})),e},w=function(e,t){var n,o,r=b(),i=[ve(r.offset||t.offset),me({padding:t.padding})],l={placement:t.placement,middleware:i};if(t.arrow&&i.push((e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:a}=t,{element:c,padding:u=0}=Z(e,t)||{};if(null==c)return{};const s=ae(u),f={x:n,y:o},d=oe(r),p=te(d),v=await l.getDimensions(c),m="y"===d,y=m?"top":"left",h=m?"bottom":"right",g=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[d]-f[d]-i.floating[p],w=f[d]-i.reference[d],T=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let x=T?T[g]:0;x&&await(null==l.isElement?void 0:l.isElement(T))||(x=a.floating[g]||i.floating[p]);const E=b/2-w/2,P=x/2-v[p]/2-1,R=U(s[y],P),O=U(s[h],P),A=R,C=x-v[p]-O,S=x/2-v[p]/2+E,N=X(A,S,C),L=null!=Q(r)&&S!=N&&i.reference[p]/2-(S<A?R:O)-v[p]/2<0?S<A?A-S:C-S:0;return{[d]:f[d]-L,data:{[d]:N,centerOffset:S-N+L}}}}))({element:e})),h()?i.push(function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:l,placement:a,platform:c,elements:u}=t,{crossAxis:s=!1,alignment:f,allowedPlacements:d=B,autoAlignment:p=!0,...v}=Z(e,t),m=void 0!==f||d===B?function(e,t,n){return(e?[...n.filter((t=>Q(t)===e)),...n.filter((t=>Q(t)!==e))]:n.filter((e=>J(e)===e))).filter((n=>!e||Q(n)===e||!!t&&ie(n)!==n))}(f||null,p,d):d,y=await se(t,v),h=(null==(n=l.autoPlacement)?void 0:n.index)||0,g=m[h];if(null==g)return{};const b=re(g,i,await(null==c.isRTL?void 0:c.isRTL(u.floating)));if(a!==g)return{reset:{placement:m[0]}};const w=[y[J(g)],y[b[0]],y[b[1]]],T=[...(null==(o=l.autoPlacement)?void 0:o.overflows)||[],{placement:g,overflows:w}],x=m[h+1];if(x)return{data:{index:h+1,overflows:T},reset:{placement:x}};const E=T.map((e=>{const t=Q(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),P=(null==(r=E.filter((e=>e[2].slice(0,Q(e[0])?2:3).every((e=>e<=0))))[0])?void 0:r[0])||E[0][0];return P!==a?{data:{index:h+1,overflows:T},reset:{placement:P}}:{}}}}()):(i.unshift(function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:r,platform:i,strategy:l}=t,{padding:a=2,x:c,y:u}=Z(e,t),s=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),f=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;e<t.length;e++){const r=t[e];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((e=>ce(pe(e))))}(s),d=ce(pe(s)),p=ae(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=c&&null!=u)return f.find((e=>c>e.left-p.left&&c<e.right+p.right&&u>e.top-p.top&&u<e.bottom+p.bottom))||d;if(f.length>=2){if("y"===ne(n)){const e=f[0],t=f[f.length-1],o="top"===J(n),r=e.top,i=t.bottom,l=o?e.left:t.left,a=o?e.right:t.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const e="left"===J(n),t=W(...f.map((e=>e.right))),o=U(...f.map((e=>e.left))),r=f.filter((n=>e?n.left===o:n.right===t)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:o,right:t,width:t-o,height:l-i,x:o,y:i}}return d}},floating:o.floating,strategy:l});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}}()),i.push(function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:s=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=Z(e,t),y=J(o),h=J(l)===l,g=await(null==a.isRTL?void 0:a.isRTL(c.floating)),b=f||(h||!v?[le(l)]:function(e){const t=le(e);return[ie(e),t,ie(t)]}(l));f||"none"===p||b.push(...function(e,t,n,o){const r=Q(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(J(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(ie)))),i}(l,v,p,g));const w=[l,...b],T=await se(t,m),x=[];let E=(null==(n=r.flip)?void 0:n.overflows)||[];if(u&&x.push(T[y]),s){const e=re(o,i,g);x.push(T[e[0]],T[e[1]])}if(E=[...E,{placement:o,overflows:x}],!x.every((e=>e<=0))){var P,R;const e=((null==(P=r.flip)?void 0:P.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(R=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(d){case"bestFit":{var O;const e=null==(O=E.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}}())),y()&&l.middleware.push(function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Z(e,t);switch(o){case"referenceHidden":{const e=fe(await se(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:de(e)}}}case"escaped":{const e=fe(await se(t,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:de(e)}}}default:return{}}}}}()),f()||t.isVirtualEl){var a=(o=s.value,{getElementRects:function(e){var t=e.reference,n=e.floating,o=t.getBoundingClientRect(),r=n.getBoundingClientRect();return{reference:{width:o.width,height:o.height,x:o.x,y:o.y},floating:{width:r.width,height:r.height,x:r.x,y:r.y}}},getDimensions:function(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}},getClippingRect:function(e){var t;!function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e);var n=null!==(t=null==o?void 0:o.getBoundingClientRect())&&void 0!==t?t:{},r=n.width,i=void 0===r?0:r,l=n.height;return{width:i,height:void 0===l?0:l,x:0,y:0}}}),c=a.getElementRects,u=a.getDimensions,d=a.getClippingRect;Object.assign(l,{platform:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.platform)&&void 0!==n?n:{}),{getElementRects:c,getDimensions:u,getClippingRect:d})})}return l},T=function e(t){return t instanceof HTMLElement?t:t instanceof Text?e(t.nextElementSibling):"function"==typeof(null==t?void 0:t.getBoundingClientRect)?t:null},x=v.value.customThemes.join(" "),E=v.value.customThemes.reduce((function(e,t){return Object.assign(p({},"data-".concat(t,"-theme"),!0),e)}),{}),P="".concat(x),R=null,O=function(e){var t=window.devicePixelRatio||1;return Math.round(e*t)/t||0},A=function(e,t,o,r){var i;n.disableTransform?Object.assign(e.style,{left:"".concat(O(t),"px"),top:"".concat(O(o),"px")}):Object.assign(e.style,{left:"0",top:"0",transform:"translate3d(".concat(O(t),"px,").concat(O(o),"px,0)")});var l=!!y()&&(null===(i=r.hide)||void 0===i?void 0:i.referenceHidden);Object.assign(e.style,{visibility:l?"hidden":"visible"})},C=function(e,t,o){var r;if(n.arrow){var i=null!==(r=o.arrow)&&void 0!==r?r:{},l=i.x,a=i.y;e.setAttribute("data-arrow",t),Object.assign(e.style,{left:"",top:"",bottom:"",right:""});var c={top:"bottom",right:"left",bottom:"top",left:"right"}[t];Object.assign(e.style,p({left:null!==l?"".concat(l,"px"):"",top:null!==a?"".concat(a,"px"):""},c,"-4px"))}},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=g(),o=n.elReference,r=n.elContent,i=n.elArrow,l=e||o;if(l&&r){var a=w(i,t);((e,t,n)=>{const o=new Map,r={platform:qe,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:s,y:f}=ue(u,o,c),d=o,p={},v=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:y,y:h,data:g,reset:b}=await m({x:s,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:p,rects:u,platform:l,elements:{reference:e,floating:t}});s=null!=y?y:s,f=null!=h?h:f,p={...p,[i]:{...p[i],...g}},b&&v<=50&&(v++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:s,y:f}=ue(u,d,c))),n=-1)}return{x:s,y:f,placement:d,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})})(l,r,a).then((function(e){var t=e.x,n=e.y,o=e.placement,l=e.middlewareData,a=r.className;r.className="".concat(a.replace(P,"")," ").concat(P).replace(/\s+/gm," ").replace(/^\s+|\s+$/g,""),Object.keys(E).forEach((function(e){r.setAttribute(e,E[e])}));var c=o.split("-")[0],u=c;["left","right","top","bottom"].includes(c)||(u="top"),A(r,t,n,l),C(i,u,l)}))}},N=void 0,L=void 0,I=!1,H=function(){return Array.isArray(n.popoverDelay)?[n.popoverDelay[0],n.popoverDelay.slice(-1)[0]]:[n.popoverDelay,n.popoverDelay]},D=function(){var e=H()[0];L=setTimeout((function(){N&&clearTimeout(N),n.disabled||(u.value=!0)}),e)},M=function(){var e=H()[1];N=setTimeout((function(){L&&clearTimeout(L),u.value=!1}),e)},F=function(){u.value?M():D()},j=function(){F()},k=function(){"hover"===n.trigger&&(N&&(I=!0,clearTimeout(N),N=void 0),$())},_=function(){I&&(M(),I=!1,q())},$=function(){o.emit(m.CONTENT_MOUSEENTER)},q=function(){o.emit(m.CONTENT_MOUSELEAVE)};return(0,t.watch)((function(){return n.isShow}),(function(e){u.value=e})),(0,t.watch)(u,(function(t){var r,i;t?((i=T(null===(r=l.value)||void 0===r?void 0:r.$el)).style.setProperty("display","block"),i.style.setProperty("z-index","".concat(n.zIndex?n.zIndex:e.bkZIndexManager.getPopperIndex())),S(),o.emit("afterShow",{isShow:!0})):function(){var e;T(null===(e=l.value)||void 0===e?void 0:e.$el).style.setProperty("display","none"),o.emit("afterHidden",{isShow:!1})}()})),{showPopover:D,hidePopover:M,resolveTriggerEvents:function(){var e;return null!==(e={hover:{content:[["mouseenter",k],["mouseleave",_]],reference:[["mouseenter",D],["mouseleave",M],["focus",D],["blur",M]]},click:[["click",j]],manual:{content:[["mouseenter",$],["mouseleave",q]],reference:[[]]}}[n.trigger])&&void 0!==e?e:[]},updatePopover:S,triggerPopover:F,resolvePopElements:g,isElementFullScreen:f,resolveTargetElement:T,createPopInstance:function(){var e=g(),t=e.elReference,o=e.elContent;R=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,u=De(e),s=r||i?[...u?Ie(u):[],...Ie(t)]:[];s.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=u&&a?function(e,t){let n,o=null;const r=ge(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const{left:u,top:s,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const p={rootMargin:-z(s)+"px "+-z(r.clientWidth-(u+f))+"px "+-z(r.clientHeight-(s+d))+"px "+-z(u)+"px",threshold:W(0,U(1,c))||1};let v=!0;function m(e){const t=e[0].intersectionRatio;if(t!==c){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(m,{...p,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,p)}o.observe(e)}(!0),i}(u,n):null;let d,p=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),u&&!c&&v.observe(u),v.observe(t));let m=c?ke(e):null;return c&&function t(){const o=ke(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,d=requestAnimationFrame(t)}(),n(),()=>{s.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),v&&v.disconnect(),v=null,c&&cancelAnimationFrame(d)}}(t,o,(function(){u.value&&S(null,n)}))},updateFullscreenTarget:function(e){s.value=e},getFullscreenRoot:function(e){return f()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(e):document.fullscreenElement.querySelector(e):document.body},stopHide:function(){N&&(I=!0,clearTimeout(N),N=void 0)},localIsShow:u,cleanup:R}};var Je=null,Qe=null;const et=(0,t.defineComponent)({name:"Popover",components:{Content:g,Arrow:f,Root:j},directives:{clickoutside:s},props:M,emits:h,setup:function(n,o){var r=n.content,i=n.theme,l=n.disableTeleport,a=(0,t.toRefs)(n).reference,c=(0,t.ref)(),u=(0,t.ref)(),s=(0,t.ref)(),f=(0,t.ref)(),d=(0,t.computed)((function(){return a.value||c.value})),p=function(e,n,o){var r=o.refReference,i=o.refContent,l=o.refArrow,a=o.refRoot,c=null,u=(0,t.ref)(!1),s=(Ge.fullscreenReferId||(Ge.fullscreenReferId="id_".concat((0,ze.v4)())),Ge.fullscreenReferId),f=(0,t.ref)(),d=Ze(e,n,{refReference:r,refContent:i,refArrow:l,refRoot:a}),p=d.localIsShow,v=d.showPopover,y=d.hidePopover,h=d.updatePopover,g=d.resolveTriggerEvents,b=d.resolvePopElements,w=d.isElementFullScreen,T=d.updateFullscreenTarget,x=d.createPopInstance,E=d.getFullscreenRoot,P=d.stopHide,R=function(){y()},O=function(){x(),e.always?v():A()},A=function(){var e=b(),t=e.elReference,n=e.elContent;if(c=g(),Array.isArray(c))C(t,c);else{var o=c,r=o.content,i=o.reference;C(t,i),C(n,r)}},C=function(e,t){t.forEach((function(t){var n=V(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.addEventListener(o,r)}))},S=function(){var e=b(),t=e.elReference,n=e.root;u.value?I.value=null==f?void 0:f.value:I.value=L(n||t)},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=function(n){var o=null,r=function(e){null===o&&e()};return r((function(){if(/^parent$/i.test(e.boundary)){o="".concat(t).concat(Je);var r=(n||{}).parentNode;(null==r?void 0:r.parentNode)&&(r.parentNode.setAttribute("data-pnode-id",Qe),o="[data-pnode-id=".concat(Qe,"]"))}})),r((function(){if(!/^body$/i.test(e.boundary)){if("string"==typeof e.boundary)return Ke(e.boundary)?void(o=e.boundary):(console.error("props.boundary is not available selector"),void(o="body"));if(Ye(e.boundary))return void(o=e.boundary)}})),r((function(){o="string"==typeof e.boundary?e.boundary:"".concat(t).concat(Je)})),o};if(null===Je||!Ke("#".concat(Je))){Je="id_".concat((0,ze.v4)());var o=document.createElement("div");o.setAttribute("id",Je),o.setAttribute("data-popper-id",Je),document.body.append(o)}return null===Qe&&(Qe="id_".concat((0,ze.v4)())),{popContainerId:Je,prefixId:n(),getPrefixId:n}}(e,"#"),L=N.getPrefixId,I=(0,t.ref)(),H=function(){!function(){if(null==c?void 0:c.length){var e=b().elReference;e&&c.forEach((function(t){var n=V(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.removeEventListener(o,r)})),c=null}}()},D=function(e){var t;f.value=e,T(e),u.value=w(),null===(t=null==f?void 0:f.value)||void 0===t||t.setAttribute("data-fllsrn-id",s)},M=function(t){var n,o,r;document.fullscreenElement||(r="[data-fllsrn-id=".concat(s,"]"),(null!==(o=null===(n=null==f?void 0:f.value)||void 0===n?void 0:n.querySelectorAll(r))&&void 0!==o?o:[]).forEach((function(e){null==e||e.removeAttribute("data-fllsrn-id")}))),D(t.target),S(),h(null,e)};return{onMountedFn:function(){if(!e.disabled){if(O(),w()){var t="[data-fllsrn-id=".concat(s,"]"),n=E(t);D(n)}S(),document.body.addEventListener("fullscreenchange",M)}},onUnmountedFn:function(){H(),document.body.removeEventListener("fullscreenchange",M)},handleClickOutside:function(t){n.emit(m.CLICK_OUTSIDE,{isShow:p.value,event:t}),e.disableOutsideClick||e.always||e.disabled||"manual"===e.trigger||p.value&&R()},beforeInstanceUnmount:H,updateBoundary:S,initPopInstance:O,updatePopover:h,showPopover:v,hidePopover:y,showFn:function(){v()},hideFn:R,stopHide:P,isFullscreen:u,boundary:I,localIsShow:p}}(n,o,{refReference:d,refContent:u,refArrow:s,refRoot:f}),v=p.onMountedFn,y=p.onUnmountedFn,h=p.handleClickOutside,g=p.beforeInstanceUnmount,b=p.updateBoundary,w=p.initPopInstance,T=p.showFn,x=p.hideFn,E=p.showPopover,P=p.hidePopover,R=p.updatePopover,O=p.stopHide,A=p.localIsShow,C=p.boundary;n.always||n.disabled||(0,t.watch)((function(){return n.isShow}),(function(){n.isShow?E():P()}),{immediate:!0}),(0,t.watch)((function(){return[n.disabled]}),(function(e){e[0]?g():w()})),b(),(0,t.onMounted)(v),(0,t.onBeforeUnmount)(y);var S=(0,t.computed)((function(){return!l})),N=(0,t.computed)((function(){return n.renderType===e.RenderType.AUTO||A.value}));return{boundary:C,arrow:n.arrow,refDefaultReference:c,refContent:u,refArrow:s,content:r,theme:i,transBoundary:S,handleClickOutside:h,updatePopover:R,hide:function(){x()},show:function(){T()},stopHide:O,contentIsShow:N,renderContent:function(){return n.allowHtml?Xe(n.content).vNode:r}}},render:function(){var e,n,o,r,i,l,a=this;return(0,t.createVNode)(j,{ref:"refRoot"},{default:function(){return[(0,t.createVNode)(F,{ref:"refDefaultReference"},{default:function(){return[null!==(o=null===(n=(e=a.$slots).default)||void 0===n?void 0:n.call(e))&&void 0!==o?o:(0,t.createVNode)("span",null,null)]}}),(0,t.createVNode)(t.Teleport,{to:a.boundary,disabled:!a.transBoundary},{default:function(){return[(0,t.withDirectives)((0,t.createVNode)(g,{ref:"refContent","data-theme":a.theme,extCls:a.extCls,width:a.width,height:a.height,maxHeight:a.maxHeight},{default:function(){return[a.contentIsShow?null!==(l=null===(i=(r=a.$slots).content)||void 0===i?void 0:i.call(r))&&void 0!==l?l:a.renderContent():""]},arrow:function(){var e,n;return a.arrow?(0,t.createVNode)(f,{ref:"refArrow"},{default:function(){return[null===(n=(e=a.$slots).arrow)||void 0===n?void 0:n.call(e)]}}):""}}),[[(0,t.resolveDirective)("clickoutside"),a.handleClickOutside]])]}})]}})}});function tt(e){var n,o=null,r=null,i=null,l=Object.assign(Object.assign({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),a={name:"$popover",setup:function(e,n){var o=n.expose,r=(0,t.ref)(l),i=(0,t.ref)(),a=(0,t.ref)({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),c=function(e){if(Ye(e)){var t=e.getBoundingClientRect(),n=t.x,o=t.y,r=t.width,i=t.height;Object.assign(a.value,{width:"".concat(r,"px"),height:"".concat(i,"px"),transform:"translate3d(".concat(n,"px,").concat(o,"px,0)")})}else{var l=e.clientX,c=e.clientY;Object.assign(a.value,{transform:"translate3d(".concat(l,"px,").concat(c,"px,0)"),width:"10px",height:"10px"})}};c(r.value.target);var u=(0,t.computed)((function(){var e=["target"];return Object.keys(r.value).filter((function(t){return!e.includes(t)})).reduce((function(e,t){return Object.assign(Object.assign({},e),p({},t,r.value[t]))}),{})})),s=function(){var e;null===(e=l.onContentMouseenter)||void 0===e||e.call(l)},f=function(){var e;null===(e=l.onContentMouseleave)||void 0===e||e.call(l)};return o({show:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.show)||void 0===t||t.call(e)},hide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)},updateTarget:function(e){var n,o;r.value.target=e,c(e),null===(o=null===(n=i.value)||void 0===n?void 0:n.updatePopover)||void 0===o||o.call(n),(0,t.nextTick)((function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.updatePopover)||void 0===t||t.call(e)}))},stopHide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.stopHide)||void 0===t||t.call(e)}}),function(){return(0,t.createVNode)(et,(0,t.mergeProps)(u.value,{ref:i,onContentMouseenter:s,onContentMouseleave:f}),{default:function(){return[(0,t.createVNode)("span",{style:a.value},null)]}})}}};return null===o&&(i=document.createElement("div"),(n=l.boundary,/^body$/i.test(n)?document.body:/^parent$/i.test(n)?Ye(l.target)?l.target.parentNode:l.target.target.parentNode:"string"==typeof n&&Ke(n)?document.querySelector(n):document.body).append(i),o=(0,t.createApp)(a),r=o.mount(i)),{close:function(){o&&(o.unmount(),r=null,o=null,i.remove())},show:function(){null==r||r.show()},hide:function(){null==r||r.hide()},update:function(e){null==r||r.updateTarget(e)},get vm(){return r},get $el(){return r.$el}}}const nt=(0,e.withInstall)(et)})(),l})()));
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types")):t(e["../shared"],e.vue,e["vue-types"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n)=>(()=>{var o={8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),l=n(8725),a=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,s=t||[],f=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:r;if(null==f||null==d){var p=i();null==f&&(f=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,y=v-a+(m-c)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||v>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,c=m,r=d;var h=(1e4*(268435455&(v+=122192928e5))+m)%4294967296;s[u++]=h>>>24&255,s[u++]=h>>>16&255,s[u++]=h>>>8&255,s[u++]=255&h;var g=v/4294967296*1e4&268435455;s[u++]=g>>>8&255,s[u++]=255&g,s[u++]=g>>>24&15|16,s[u++]=g>>>16&255,s[u++]=d>>>8|128,s[u++]=255&d;for(var b=0;b<6;++b)s[u+b]=f[b];return t||l(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=n}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";i.r(l),i.d(l,{$bkPopover:()=>tt,PopoverProps:()=>M,default:()=>nt});var e=i(4212),t=i(748);function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,l=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var r,a=new Map;function c(e,t){var n,o=[];return Array.isArray(t.arg)?o=t.arg:(n=t.arg,"undefined"!=typeof Element&&n instanceof Element&&o.push(t.arg)),function(n,r){var i=t.instance.popperRef,l=n.target,a=null==r?void 0:r.target,c=!t||!t.instance,u=!l||!a,s=e.contains(l)||e.contains(a),f=e===l,d=o.length&&o.some((function(e){return null==e?void 0:e.contains(l)}))||o.length&&o.includes(a),p=i&&(i.contains(l)||i.contains(a));c||u||s||f||d||p||t.value(n,r)}}document.addEventListener("mousedown",(function(e){return r=e})),document.addEventListener("mouseup",(function(e){var t,o=n(a.values());try{for(o.s();!(t=o.n()).done;){var i,l=n(t.value);try{for(l.s();!(i=l.n()).done;)(0,i.value.documentHandler)(e,r)}catch(e){l.e(e)}finally{l.f()}}}catch(e){o.e(e)}finally{o.f()}}));var u={beforeMount:function(e,t){a.has(e)||a.set(e,[]),a.get(e).push({documentHandler:c(e,t),bindingFn:t.value})},updated:function(e,t){a.has(e)||a.set(e,[]);var n=a.get(e),o=n.findIndex((function(e){return e.bindingFn===t.oldValue})),r={documentHandler:c(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted:function(e){a.delete(e)},install:function(e){e.directive("bkTooltips",u)}};const s=u,f=(0,t.defineComponent)({name:"PopArrow",render:function(){var n=(0,e.resolveClassName)("pop2-arrow");return(0,t.createVNode)("div",{class:n},null)}});function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v,m,y=function(){return!0};!function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"}(m||(m={}));var h=(p(v={},m.SHOW,y),p(v,m.HIDE,y),p(v,m.CLICK_OUTSIDE,y),p(v,m.CONTENT_MOUSEENTER,y),p(v,m.CONTENT_MOUSELEAVE,y),p(v,m.STOP_HIDE,y),v);const g=(0,t.defineComponent)({name:"PopContent",props:{width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),extCls:e.PropTypes.string.def("")},setup:function(e){var n=function(e){return/^\d+\.?\d*$/.test("".concat(e))?"".concat(e,"px"):e};return{style:(0,t.computed)((function(){return{width:n(e.width),height:n(e.height),maxHeight:n(e.maxHeight)}}))}},render:function(){var n,o,r,i,l,a,c=[(0,e.resolveClassName)("popover"),(0,e.resolveClassName)("pop2-content"),this.extCls];return(0,t.createVNode)("div",{class:c,tabindex:"-1",style:this.style},[null!==(r=null===(o=(n=this.$slots).arrow)||void 0===o?void 0:o.call(n))&&void 0!==r?r:"",null!==(a=null===(l=(i=this.$slots).default)||void 0===l?void 0:l.call(i))&&void 0!==a?a:""])}});var b,w,T,x,E,P,R,O,A,C,S,N,L,I,H=i(210);(0,H.createTypes)({}),function(e){e.SMALL="small",e.LARGE="large",e.DEFAULT="default"}(b||(b={})),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}(w||(w={})),function(e){e.IF="if",e.SHOW="show"}(T||(T={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(x||(x={})),function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.DANGER="danger"}(E||(E={})),function(e){e.AUTO="auto",e.AUTO_START="auto-start",e.AUTO_END="auto-end",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_START="top-start",e.TOP_END="top-end",e.BOTTOM_START="bottom-start",e.BOTTOM_END="bottom-end",e.RIGHT_START="right-start",e.RIGHT_END="right-end",e.LEFT_START="left-start",e.LEFT_END="left-end"}(P||(P={})),function(e){e.HOVER="hover",e.CLICK="click",e.MANUAL="manual"}(R||(R={})),function(e){e.AUTO="auto",e.SHOWN="shown"}(O||(O={})),function(e){e.SHOW="show",e.OPERATION="operation",e.CONFIRM="confirm",e.PROCESS="process"}(A||(A={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(C||(C={})),function(e){e.DASHED="dashed",e.SOLID="solid"}(S||(S={})),function(e){e.SUCCESS="success",e.INFO="info",e.WARNING="warning",e.DANGER="danger"}(N||(N={})),function(e){e.SIMPLICITY="simplicity",e.NORMAL="normal"}(L||(L={})),function(e){e.CHECKBOX="checkbox",e.CHECK="check"}(I||(I={}));var D={onAfterHidden:Function,onAfterShow:Function},M=Object.assign({isShow:e.PropTypes.bool.def(!1),always:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),maxHeight:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),content:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def(""),allowHtml:e.PropTypes.bool.def(!1),placement:(0,e.placementType)().def(P.TOP_START),theme:e.PropTypes.string.def("dark"),trigger:(0,H.string)().def(R.HOVER),renderType:(0,H.toType)("popRenderType",{}).def(O.SHOWN),arrow:e.PropTypes.bool.def(!0),padding:e.PropTypes.number.def(5),offset:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.shape({})]).def(6),boundary:e.PropTypes.oneOfType([e.PropTypes.string.def("parent"),e.PropTypes.instanceOf(HTMLElement)]),zIndex:e.PropTypes.number.def(void 0),disableTeleport:e.PropTypes.bool.def(!1),autoPlacement:e.PropTypes.bool.def(!1),autoVisibility:e.PropTypes.bool.def(!0),disableOutsideClick:e.PropTypes.bool.def(!1),disableTransform:e.PropTypes.bool.def(!1),reference:e.PropTypes.any.def(null),modifiers:e.PropTypes.array.def([]),popoverDelay:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.arrayOf(e.PropTypes.number)]).def(100),extCls:e.PropTypes.string.def("")},D);const F=(0,t.defineComponent)({name:"PopReference",render:function(){var e,t,n;return null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""}}),j=(0,t.defineComponent)({props:{class:e.PropTypes.string.def(""),mode:e.PropTypes.string.def("")},render:function(){var e,n;return(0,t.createVNode)(t.Fragment,null,[null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e)])}});function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,l,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const _=["top","right","bottom","left"],$=["start","end"],B=_.reduce(((e,t)=>e.concat(t,t+"-"+$[0],t+"-"+$[1])),[]),U=Math.min,W=Math.max,q=Math.round,z=Math.floor,G=e=>({x:e,y:e}),K={left:"right",right:"left",bottom:"top",top:"bottom"},Y={start:"end",end:"start"};function X(e,t,n){return W(e,U(t,n))}function Z(e,t){return"function"==typeof e?e(t):e}function J(e){return e.split("-")[0]}function Q(e){return e.split("-")[1]}function ee(e){return"x"===e?"y":"x"}function te(e){return"y"===e?"height":"width"}function ne(e){return["top","bottom"].includes(J(e))?"y":"x"}function oe(e){return ee(ne(e))}function re(e,t,n){void 0===n&&(n=!1);const o=Q(e),r=oe(e),i=te(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=le(l)),[l,le(l)]}function ie(e){return e.replace(/start|end/g,(e=>Y[e]))}function le(e){return e.replace(/left|right|bottom|top/g,(e=>K[e]))}function ae(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ce(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ue(e,t,n){let{reference:o,floating:r}=e;const i=ne(t),l=oe(t),a=te(l),c=J(t),u="y"===i,s=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let p;switch(c){case"top":p={x:s,y:o.y-r.height};break;case"bottom":p={x:s,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(Q(t)){case"start":p[l]-=d*(n&&u?-1:1);break;case"end":p[l]+=d*(n&&u?-1:1)}return p}async function se(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Z(t,e),v=ae(p),m=a[d?"floating"===f?"reference":"floating":f],y=ce(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:s,strategy:c})),h="floating"===f?{...l.floating,x:o,y:r}:l.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=ce(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:h,offsetParent:g,strategy:c}):h);return{top:(y.top-w.top+v.top)/b.y,bottom:(w.bottom-y.bottom+v.bottom)/b.y,left:(y.left-w.left+v.left)/b.x,right:(w.right-y.right+v.right)/b.x}}function fe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function de(e){return _.some((t=>e[t]>=0))}function pe(e){const t=U(...e.map((e=>e.left))),n=U(...e.map((e=>e.top)));return{x:t,y:n,width:W(...e.map((e=>e.right)))-t,height:W(...e.map((e=>e.bottom)))-n}}const ve=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=J(n),a=Q(n),c="y"===ne(n),u=["left","top"].includes(l)?-1:1,s=i&&c?-1:1,f=Z(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof v&&(p="end"===a?-1*v:v),c?{x:p*s,y:d*u}:{x:d*u,y:p*s}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},me=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Z(e,t),u={x:n,y:o},s=await se(t,c),f=ne(J(r)),d=ee(f);let p=u[d],v=u[f];if(i){const e="y"===d?"bottom":"right";p=X(p+s["y"===d?"top":"left"],p,p-s[e])}if(l){const e="y"===f?"bottom":"right";v=X(v+s["y"===f?"top":"left"],v,v-s[e])}const m=a.fn({...t,[d]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-o}}}}};function ye(e){return be(e)?(e.nodeName||"").toLowerCase():"#document"}function he(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ge(e){var t;return null==(t=(be(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function be(e){return e instanceof Node||e instanceof he(e).Node}function we(e){return e instanceof Element||e instanceof he(e).Element}function Te(e){return e instanceof HTMLElement||e instanceof he(e).HTMLElement}function xe(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof he(e).ShadowRoot)}function Ee(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Pe(e){return["table","td","th"].includes(ye(e))}function Re(e){const t=Oe(),n=Ce(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Oe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(ye(e))}function Ce(e){return he(e).getComputedStyle(e)}function Se(e){return we(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ne(e){if("html"===ye(e))return e;const t=e.assignedSlot||e.parentNode||xe(e)&&e.host||ge(e);return xe(t)?t.host:t}function Le(e){const t=Ne(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&Ee(t)?t:Le(t)}function Ie(e,t){var n;void 0===t&&(t=[]);const o=Le(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=he(o);return r?t.concat(i,i.visualViewport||[],Ee(o)?o:[]):t.concat(o,Ie(o))}function He(e){const t=Ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Te(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=q(n)!==i||q(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function De(e){return we(e)?e:e.contextElement}function Me(e){const t=De(e);if(!Te(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=He(t);let l=(i?q(n.width):n.width)/o,a=(i?q(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const Fe=G(0);function je(e){const t=he(e);return Oe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Fe}function ke(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=De(e);let l=G(1);t&&(o?we(o)&&(l=Me(o)):l=Me(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==he(e))&&t}(i,n,o)?je(i):G(0);let c=(r.left+a.x)/l.x,u=(r.top+a.y)/l.y,s=r.width/l.x,f=r.height/l.y;if(i){const e=he(i),t=o&&we(o)?he(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=Me(n),t=n.getBoundingClientRect(),o=Ce(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,u*=e.y,s*=e.x,f*=e.y,c+=r,u+=i,n=he(n).frameElement}}return ce({width:s,height:f,x:c,y:u})}function Ve(e){return ke(ge(e)).left+Se(e).scrollLeft}function _e(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=he(e),o=ge(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const e=Oe();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}(e,n);else if("document"===t)o=function(e){const t=ge(e),n=Se(e),o=e.ownerDocument.body,r=W(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=W(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Ve(e);const a=-n.scrollTop;return"rtl"===Ce(o).direction&&(l+=W(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(ge(e));else if(we(t))o=function(e,t){const n=ke(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Te(e)?Me(e):G(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=je(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return ce(o)}function $e(e,t){const n=Ne(e);return!(n===t||!we(n)||Ae(n))&&("fixed"===Ce(n).position||$e(n,t))}function Be(e,t,n){const o=Te(t),r=ge(t),i="fixed"===n,l=ke(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=G(0);if(o||!o&&!i)if(("body"!==ye(t)||Ee(r))&&(a=Se(t)),o){const e=ke(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=Ve(r));return{x:l.left+a.scrollLeft-c.x,y:l.top+a.scrollTop-c.y,width:l.width,height:l.height}}function Ue(e,t){return Te(e)&&"fixed"!==Ce(e).position?t?t(e):e.offsetParent:null}function We(e,t){const n=he(e);if(!Te(e))return n;let o=Ue(e,t);for(;o&&Pe(o)&&"static"===Ce(o).position;)o=Ue(o,t);return o&&("html"===ye(o)||"body"===ye(o)&&"static"===Ce(o).position&&!Re(o))?n:o||function(e){let t=Ne(e);for(;Te(t)&&!Ae(t);){if(Re(t))return t;t=Ne(t)}return null}(e)||n}const qe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=Te(n),i=ge(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=G(1);const c=G(0);if((r||!r&&"fixed"!==o)&&(("body"!==ye(n)||Ee(i))&&(l=Se(n)),Te(n))){const e=ke(n);a=Me(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+c.x,y:t.y*a.y-l.scrollTop*a.y+c.y}},getDocumentElement:ge,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Ie(e).filter((e=>we(e)&&"body"!==ye(e))),r=null;const i="fixed"===Ce(e).position;let l=i?Ne(e):e;for(;we(l)&&!Ae(l);){const t=Ce(l),n=Re(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Ee(l)&&!n&&$e(e,l))?o=o.filter((e=>e!==l)):r=t,l=Ne(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=_e(t,n,r);return e.top=W(o.top,e.top),e.right=U(o.right,e.right),e.bottom=U(o.bottom,e.bottom),e.left=W(o.left,e.left),e}),_e(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:We,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||We,i=this.getDimensions;return{reference:Be(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return He(e)},getScale:Me,isElement:we,isRTL:function(e){return"rtl"===Ce(e).direction}};var ze=i(8022),Ge={},Ke=function(e){return document.querySelector(e)instanceof HTMLElement},Ye=function(e){return e instanceof Element||e instanceof HTMLDocument},Xe=function(e){if(Ye(e))return{isElement:!0,content:e,vNode:void 0};if(/^(#|\.)/.test(e)){var t=document.querySelector(e),n=Ye(t);return{isElement:n,content:n?t:e,vNode:n?void 0:e}}return{isElement:!1,content:e,vNode:e}};const Ze=function(n,o,r){var i=r.refReference,l=r.refContent,a=r.refArrow,c=r.refRoot,u=(0,t.ref)(!1),s=(0,t.ref)(),f=function(){var e,t,n,o=T(null===(e=i.value)||void 0===e?void 0:e.$el);return(null===(t=document.fullscreenElement)||void 0===t?void 0:t.shadowRoot)?document.fullscreenElement.shadowRoot.contains(o):null===(n=document.fullscreenElement)||void 0===n?void 0:n.contains(o)},d=["dark","light"],v=(0,t.computed)((function(){var e,t,o=null!==(t=null===(e=n.theme)||void 0===e?void 0:e.split(/\s+/))&&void 0!==t?t:[];return o.sort((function(e,t){return Number(d.includes(t))-Number(d.includes(e))})),{systemThemes:o,customThemes:o.filter((function(e){return!d.includes(e)}))}})),y=function(){return n.autoVisibility},h=function(){return n.autoPlacement},g=function(){var e,t,o,r,u=T(null===(e=i.value)||void 0===e?void 0:e.$el),s=T(null===(t=l.value)||void 0===t?void 0:t.$el),f=n.arrow?T(null===(o=a.value)||void 0===o?void 0:o.$el):null,d=T(null===(r=c.value)||void 0===r?void 0:r.$el),p=Xe(n.content),v=p.isElement,m=p.content;return s&&v&&!(null==s?void 0:s.contains(m))&&s.append(m),{elReference:u,elContent:s,elArrow:f,root:d}},b=function(){var e={};return Array.isArray(n.modifiers)&&n.modifiers.forEach((function(t){var n,o,r,i,l;if("offset"===t.name){if("number"==typeof(null===(n=t.options)||void 0===n?void 0:n.offset)&&(l=null===(o=t.options)||void 0===o?void 0:o.offset),Array.isArray(null===(r=t.options)||void 0===r?void 0:r.offset)){var a=V(null===(i=t.options)||void 0===i?void 0:i.offset,2);l={mainAxis:a[0],crossAxis:a[1]}}Object.assign(e,{offset:l})}})),e},w=function(e,t){var n,o,r=b(),i=[ve(r.offset||t.offset),me({padding:t.padding})],l={placement:t.placement,middleware:i};if(t.arrow&&i.push((e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:a}=t,{element:c,padding:u=0}=Z(e,t)||{};if(null==c)return{};const s=ae(u),f={x:n,y:o},d=oe(r),p=te(d),v=await l.getDimensions(c),m="y"===d,y=m?"top":"left",h=m?"bottom":"right",g=m?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[d]-f[d]-i.floating[p],w=f[d]-i.reference[d],T=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let x=T?T[g]:0;x&&await(null==l.isElement?void 0:l.isElement(T))||(x=a.floating[g]||i.floating[p]);const E=b/2-w/2,P=x/2-v[p]/2-1,R=U(s[y],P),O=U(s[h],P),A=R,C=x-v[p]-O,S=x/2-v[p]/2+E,N=X(A,S,C),L=null!=Q(r)&&S!=N&&i.reference[p]/2-(S<A?R:O)-v[p]/2<0?S<A?A-S:C-S:0;return{[d]:f[d]-L,data:{[d]:N,centerOffset:S-N+L}}}}))({element:e})),h()?i.push(function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r;const{rects:i,middlewareData:l,placement:a,platform:c,elements:u}=t,{crossAxis:s=!1,alignment:f,allowedPlacements:d=B,autoAlignment:p=!0,...v}=Z(e,t),m=void 0!==f||d===B?function(e,t,n){return(e?[...n.filter((t=>Q(t)===e)),...n.filter((t=>Q(t)!==e))]:n.filter((e=>J(e)===e))).filter((n=>!e||Q(n)===e||!!t&&ie(n)!==n))}(f||null,p,d):d,y=await se(t,v),h=(null==(n=l.autoPlacement)?void 0:n.index)||0,g=m[h];if(null==g)return{};const b=re(g,i,await(null==c.isRTL?void 0:c.isRTL(u.floating)));if(a!==g)return{reset:{placement:m[0]}};const w=[y[J(g)],y[b[0]],y[b[1]]],T=[...(null==(o=l.autoPlacement)?void 0:o.overflows)||[],{placement:g,overflows:w}],x=m[h+1];if(x)return{data:{index:h+1,overflows:T},reset:{placement:x}};const E=T.map((e=>{const t=Q(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),P=(null==(r=E.filter((e=>e[2].slice(0,Q(e[0])?2:3).every((e=>e<=0))))[0])?void 0:r[0])||E[0][0];return P!==a?{data:{index:h+1,overflows:T},reset:{placement:P}}:{}}}}()):(i.unshift(function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:r,platform:i,strategy:l}=t,{padding:a=2,x:c,y:u}=Z(e,t),s=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),f=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;e<t.length;e++){const r=t[e];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((e=>ce(pe(e))))}(s),d=ce(pe(s)),p=ae(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=c&&null!=u)return f.find((e=>c>e.left-p.left&&c<e.right+p.right&&u>e.top-p.top&&u<e.bottom+p.bottom))||d;if(f.length>=2){if("y"===ne(n)){const e=f[0],t=f[f.length-1],o="top"===J(n),r=e.top,i=t.bottom,l=o?e.left:t.left,a=o?e.right:t.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const e="left"===J(n),t=W(...f.map((e=>e.right))),o=U(...f.map((e=>e.left))),r=f.filter((n=>e?n.left===o:n.right===t)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:o,right:t,width:t-o,height:l-i,x:o,y:i}}return d}},floating:o.floating,strategy:l});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}}()),i.push(function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:s=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=Z(e,t),y=J(o),h=J(l)===l,g=await(null==a.isRTL?void 0:a.isRTL(c.floating)),b=f||(h||!v?[le(l)]:function(e){const t=le(e);return[ie(e),t,ie(t)]}(l));f||"none"===p||b.push(...function(e,t,n,o){const r=Q(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(J(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(ie)))),i}(l,v,p,g));const w=[l,...b],T=await se(t,m),x=[];let E=(null==(n=r.flip)?void 0:n.overflows)||[];if(u&&x.push(T[y]),s){const e=re(o,i,g);x.push(T[e[0]],T[e[1]])}if(E=[...E,{placement:o,overflows:x}],!x.every((e=>e<=0))){var P,R;const e=((null==(P=r.flip)?void 0:P.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(R=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(d){case"bestFit":{var O;const e=null==(O=E.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}}())),y()&&l.middleware.push(function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Z(e,t);switch(o){case"referenceHidden":{const e=fe(await se(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:de(e)}}}case"escaped":{const e=fe(await se(t,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:de(e)}}}default:return{}}}}}()),f()||t.isVirtualEl){var a=(o=s.value,{getElementRects:function(e){var t=e.reference,n=e.floating,o=t.getBoundingClientRect(),r=n.getBoundingClientRect();return{reference:{width:o.width,height:o.height,x:o.x,y:o.y},floating:{width:r.width,height:r.height,x:r.x,y:r.y}}},getDimensions:function(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}},getClippingRect:function(e){var t;!function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e);var n=null!==(t=null==o?void 0:o.getBoundingClientRect())&&void 0!==t?t:{},r=n.width,i=void 0===r?0:r,l=n.height;return{width:i,height:void 0===l?0:l,x:0,y:0}}}),c=a.getElementRects,u=a.getDimensions,d=a.getClippingRect;Object.assign(l,{platform:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.platform)&&void 0!==n?n:{}),{getElementRects:c,getDimensions:u,getClippingRect:d})})}return l},T=function e(t){return t instanceof HTMLElement?t:t instanceof Text?e(t.nextElementSibling):"function"==typeof(null==t?void 0:t.getBoundingClientRect)?t:null},x=v.value.customThemes.join(" "),E=v.value.customThemes.reduce((function(e,t){return Object.assign(p({},"data-".concat(t,"-theme"),!0),e)}),{}),P="".concat(x),R=null,O=function(e){var t=window.devicePixelRatio||1;return Math.round(e*t)/t||0},A=function(e,t,o,r){var i;n.disableTransform?Object.assign(e.style,{left:"".concat(O(t),"px"),top:"".concat(O(o),"px")}):Object.assign(e.style,{left:"0",top:"0",transform:"translate3d(".concat(O(t),"px,").concat(O(o),"px,0)")});var l=!!y()&&(null===(i=r.hide)||void 0===i?void 0:i.referenceHidden);Object.assign(e.style,{visibility:l?"hidden":"visible"})},C=function(e,t,o){var r;if(n.arrow){var i=null!==(r=o.arrow)&&void 0!==r?r:{},l=i.x,a=i.y;e.setAttribute("data-arrow",t),Object.assign(e.style,{left:"",top:"",bottom:"",right:""});var c={top:"bottom",right:"left",bottom:"top",left:"right"}[t];Object.assign(e.style,p({left:null!==l?"".concat(l,"px"):"",top:null!==a?"".concat(a,"px"):""},c,"-4px"))}},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=g(),o=n.elReference,r=n.elContent,i=n.elArrow,l=e||o;if(l&&r){var a=w(i,t);((e,t,n)=>{const o=new Map,r={platform:qe,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:s,y:f}=ue(u,o,c),d=o,p={},v=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:y,y:h,data:g,reset:b}=await m({x:s,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:p,rects:u,platform:l,elements:{reference:e,floating:t}});s=null!=y?y:s,f=null!=h?h:f,p={...p,[i]:{...p[i],...g}},b&&v<=50&&(v++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:s,y:f}=ue(u,d,c))),n=-1)}return{x:s,y:f,placement:d,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})})(l,r,a).then((function(e){var t=e.x,n=e.y,o=e.placement,l=e.middlewareData,a=r.className;r.className="".concat(a.replace(P,"")," ").concat(P).replace(/\s+/gm," ").replace(/^\s+|\s+$/g,""),Object.keys(E).forEach((function(e){r.setAttribute(e,E[e])}));var c=o.split("-")[0],u=c;["left","right","top","bottom"].includes(c)||(u="top"),A(r,t,n,l),C(i,u,l)}))}},N=void 0,L=void 0,I=!1,H=function(){return Array.isArray(n.popoverDelay)?[n.popoverDelay[0],n.popoverDelay.slice(-1)[0]]:[n.popoverDelay,n.popoverDelay]},D=function(){var e=H()[0];L=setTimeout((function(){N&&clearTimeout(N),n.disabled||(u.value=!0)}),e)},M=function(){var e=H()[1];N=setTimeout((function(){L&&clearTimeout(L),u.value=!1}),e)},F=function(){u.value?M():D()},j=function(){F()},k=function(){"hover"===n.trigger&&(N&&(I=!0,clearTimeout(N),N=void 0),$())},_=function(){I&&(M(),I=!1,q())},$=function(){o.emit(m.CONTENT_MOUSEENTER)},q=function(){o.emit(m.CONTENT_MOUSELEAVE)};return(0,t.watch)((function(){return n.isShow}),(function(e){u.value=e})),(0,t.watch)(u,(function(t){var r,i;t?((i=T(null===(r=l.value)||void 0===r?void 0:r.$el)).style.setProperty("display","block"),i.style.setProperty("z-index","".concat(n.zIndex?n.zIndex:e.bkZIndexManager.getPopperIndex())),S(),o.emit("afterShow",{isShow:!0})):function(){var e;T(null===(e=l.value)||void 0===e?void 0:e.$el).style.setProperty("display","none"),o.emit("afterHidden",{isShow:!1})}()})),{showPopover:D,hidePopover:M,resolveTriggerEvents:function(){var e;return null!==(e={hover:{content:[["mouseenter",k],["mouseleave",_]],reference:[["mouseenter",D],["mouseleave",M],["focus",D],["blur",M]]},click:[["click",j]],manual:{content:[["mouseenter",$],["mouseleave",q]],reference:[[]]}}[n.trigger])&&void 0!==e?e:[]},updatePopover:S,triggerPopover:F,resolvePopElements:g,isElementFullScreen:f,resolveTargetElement:T,createPopInstance:function(){var e=g(),t=e.elReference,o=e.elContent;R=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,u=De(e),s=r||i?[...u?Ie(u):[],...Ie(t)]:[];s.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=u&&a?function(e,t){let n,o=null;const r=ge(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function l(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const{left:u,top:s,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const p={rootMargin:-z(s)+"px "+-z(r.clientWidth-(u+f))+"px "+-z(r.clientHeight-(s+d))+"px "+-z(u)+"px",threshold:W(0,U(1,c))||1};let v=!0;function m(e){const t=e[0].intersectionRatio;if(t!==c){if(!v)return l();t?l(!1,t):n=setTimeout((()=>{l(!1,1e-7)}),100)}v=!1}try{o=new IntersectionObserver(m,{...p,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(m,p)}o.observe(e)}(!0),i}(u,n):null;let d,p=-1,v=null;l&&(v=new ResizeObserver((e=>{let[o]=e;o&&o.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),u&&!c&&v.observe(u),v.observe(t));let m=c?ke(e):null;return c&&function t(){const o=ke(e);!m||o.x===m.x&&o.y===m.y&&o.width===m.width&&o.height===m.height||n(),m=o,d=requestAnimationFrame(t)}(),n(),()=>{s.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),f&&f(),v&&v.disconnect(),v=null,c&&cancelAnimationFrame(d)}}(t,o,(function(){u.value&&S(null,n)}))},updateFullscreenTarget:function(e){s.value=e},getFullscreenRoot:function(e){return f()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(e):document.fullscreenElement.querySelector(e):document.body},stopHide:function(){N&&(I=!0,clearTimeout(N),N=void 0)},localIsShow:u,cleanup:R}};var Je=null,Qe=null;const et=(0,t.defineComponent)({name:"Popover",components:{Content:g,Arrow:f,Root:j},directives:{clickoutside:s},props:M,emits:h,setup:function(n,o){var r=n.content,i=n.theme,l=n.disableTeleport,a=(0,t.toRefs)(n).reference,c=(0,t.ref)(),u=(0,t.ref)(),s=(0,t.ref)(),f=(0,t.ref)(),d=(0,t.computed)((function(){return a.value||c.value})),p=function(e,n,o){var r=o.refReference,i=o.refContent,l=o.refArrow,a=o.refRoot,c=null,u=(0,t.ref)(!1),s=(Ge.fullscreenReferId||(Ge.fullscreenReferId="id_".concat((0,ze.v4)())),Ge.fullscreenReferId),f=(0,t.ref)(),d=Ze(e,n,{refReference:r,refContent:i,refArrow:l,refRoot:a}),p=d.localIsShow,v=d.showPopover,y=d.hidePopover,h=d.updatePopover,g=d.resolveTriggerEvents,b=d.resolvePopElements,w=d.isElementFullScreen,T=d.updateFullscreenTarget,x=d.createPopInstance,E=d.getFullscreenRoot,P=d.stopHide,R=function(){y()},O=function(){x(),e.always?v():A()},A=function(){var e=b(),t=e.elReference,n=e.elContent;if(c=g(),Array.isArray(c))C(t,c);else{var o=c,r=o.content,i=o.reference;C(t,i),C(n,r)}},C=function(e,t){t.forEach((function(t){var n=V(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.addEventListener(o,r)}))},S=function(){var e=b(),t=e.elReference,n=e.root;u.value?I.value=null==f?void 0:f.value:I.value=L(n||t)},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=function(n){var o=null,r=function(e){null===o&&e()};return r((function(){if(/^parent$/i.test(e.boundary)){o="".concat(t).concat(Je);var r=(n||{}).parentNode;(null==r?void 0:r.parentNode)&&(r.parentNode.setAttribute("data-pnode-id",Qe),o="[data-pnode-id=".concat(Qe,"]"))}})),r((function(){if(!/^body$/i.test(e.boundary)){if("string"==typeof e.boundary)return Ke(e.boundary)?void(o=e.boundary):(console.error("props.boundary is not available selector"),void(o="body"));if(Ye(e.boundary))return void(o=e.boundary)}})),r((function(){o="string"==typeof e.boundary?e.boundary:"".concat(t).concat(Je)})),o};if(null===Je||!Ke("#".concat(Je))){Je="id_".concat((0,ze.v4)());var o=document.createElement("div");o.setAttribute("id",Je),o.setAttribute("data-popper-id",Je),document.body.append(o)}return null===Qe&&(Qe="id_".concat((0,ze.v4)())),{popContainerId:Je,prefixId:n(),getPrefixId:n}}(e,"#"),L=N.getPrefixId,I=(0,t.ref)(),H=function(){!function(){if(null==c?void 0:c.length){var e=b().elReference;e&&c.forEach((function(t){var n=V(t,2),o=n[0],r=n[1];o&&"function"==typeof r&&e.removeEventListener(o,r)})),c=null}}()},D=function(e){var t;f.value=e,T(e),u.value=w(),null===(t=null==f?void 0:f.value)||void 0===t||t.setAttribute("data-fllsrn-id",s)},M=function(t){var n,o,r;document.fullscreenElement||(r="[data-fllsrn-id=".concat(s,"]"),(null!==(o=null===(n=null==f?void 0:f.value)||void 0===n?void 0:n.querySelectorAll(r))&&void 0!==o?o:[]).forEach((function(e){null==e||e.removeAttribute("data-fllsrn-id")}))),D(t.target),S(),h(null,e)};return{onMountedFn:function(){if(!e.disabled){if(O(),w()){var t="[data-fllsrn-id=".concat(s,"]"),n=E(t);D(n)}S(),document.body.addEventListener("fullscreenchange",M)}},onUnmountedFn:function(){H(),document.body.removeEventListener("fullscreenchange",M)},handleClickOutside:function(t){n.emit(m.CLICK_OUTSIDE,{isShow:p.value,event:t}),e.disableOutsideClick||e.always||e.disabled||"manual"===e.trigger||p.value&&R()},beforeInstanceUnmount:H,updateBoundary:S,initPopInstance:O,updatePopover:h,showPopover:v,hidePopover:y,showFn:function(){v()},hideFn:R,stopHide:P,isFullscreen:u,boundary:I,localIsShow:p}}(n,o,{refReference:d,refContent:u,refArrow:s,refRoot:f}),v=p.onMountedFn,y=p.onUnmountedFn,h=p.handleClickOutside,g=p.beforeInstanceUnmount,b=p.updateBoundary,w=p.initPopInstance,T=p.showFn,x=p.hideFn,E=p.showPopover,P=p.hidePopover,R=p.updatePopover,O=p.stopHide,A=p.localIsShow,C=p.boundary;n.always||n.disabled||(0,t.watch)((function(){return n.isShow}),(function(){n.isShow?E():P()}),{immediate:!0}),(0,t.watch)((function(){return[n.disabled]}),(function(e){e[0]?g():w()})),b(),(0,t.onMounted)(v),(0,t.onBeforeUnmount)(y);var S=(0,t.computed)((function(){return!l})),N=(0,t.computed)((function(){return n.renderType===e.RenderType.AUTO||A.value}));return{boundary:C,arrow:n.arrow,refDefaultReference:c,refContent:u,refArrow:s,content:r,theme:i,transBoundary:S,handleClickOutside:h,updatePopover:R,hide:function(){x()},show:function(){T()},stopHide:O,contentIsShow:N,renderContent:function(){return n.allowHtml?Xe(n.content).vNode:r}}},render:function(){var e,n,o,r,i,l,a=this;return(0,t.createVNode)(j,{ref:"refRoot"},{default:function(){return[(0,t.createVNode)(F,{ref:"refDefaultReference"},{default:function(){return[null!==(o=null===(n=(e=a.$slots).default)||void 0===n?void 0:n.call(e))&&void 0!==o?o:(0,t.createVNode)("span",null,null)]}}),(0,t.createVNode)(t.Teleport,{to:a.boundary,disabled:!a.transBoundary},{default:function(){return[(0,t.withDirectives)((0,t.createVNode)(g,{ref:"refContent","data-theme":a.theme,extCls:a.extCls,width:a.width,height:a.height,maxHeight:a.maxHeight},{default:function(){return[a.contentIsShow?null!==(l=null===(i=(r=a.$slots).content)||void 0===i?void 0:i.call(r))&&void 0!==l?l:a.renderContent():""]},arrow:function(){var e,n;return a.arrow?(0,t.createVNode)(f,{ref:"refArrow"},{default:function(){return[null===(n=(e=a.$slots).arrow)||void 0===n?void 0:n.call(e)]}}):""}}),[[(0,t.resolveDirective)("clickoutside"),a.handleClickOutside]])]}})]}})}});function tt(e){var n,o=null,r=null,i=null,l=Object.assign(Object.assign({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),a={name:"$popover",setup:function(e,n){var o=n.expose,r=(0,t.ref)(l),i=(0,t.ref)(),a=(0,t.ref)({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),c=function(e){if(Ye(e)){var t=e.getBoundingClientRect(),n=t.x,o=t.y,r=t.width,i=t.height;Object.assign(a.value,{width:"".concat(r,"px"),height:"".concat(i,"px"),transform:"translate3d(".concat(n,"px,").concat(o,"px,0)")})}else{var l=e.clientX,c=e.clientY;Object.assign(a.value,{transform:"translate3d(".concat(l,"px,").concat(c,"px,0)"),width:"10px",height:"10px"})}};c(r.value.target);var u=(0,t.computed)((function(){var e=["target"];return Object.keys(r.value).filter((function(t){return!e.includes(t)})).reduce((function(e,t){return Object.assign(Object.assign({},e),p({},t,r.value[t]))}),{})})),s=function(){var e;null===(e=l.onContentMouseenter)||void 0===e||e.call(l)},f=function(){var e;null===(e=l.onContentMouseleave)||void 0===e||e.call(l)};return o({show:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.show)||void 0===t||t.call(e)},hide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)},updateTarget:function(e){var n,o;r.value.target=e,c(e),null===(o=null===(n=i.value)||void 0===n?void 0:n.updatePopover)||void 0===o||o.call(n),(0,t.nextTick)((function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.updatePopover)||void 0===t||t.call(e)}))},stopHide:function(){var e,t;null===(t=null===(e=i.value)||void 0===e?void 0:e.stopHide)||void 0===t||t.call(e)}}),function(){return(0,t.createVNode)(et,(0,t.mergeProps)(u.value,{ref:i,onContentMouseenter:s,onContentMouseleave:f}),{default:function(){return[(0,t.createVNode)("span",{style:a.value},null)]}})}}};return null===o&&(i=document.createElement("div"),(n=l.boundary,/^body$/i.test(n)?document.body:/^parent$/i.test(n)?Ye(l.target)?l.target.parentNode:l.target.target.parentNode:"string"==typeof n&&Ke(n)?document.querySelector(n):document.body).append(i),o=(0,t.createApp)(a),r=o.mount(i)),{close:function(){o&&(o.unmount(),r=null,o=null,i.remove())},show:function(){null==r||r.show()},hide:function(){null==r||r.hide()},update:function(e){null==r||r.updateTarget(e)},get vm(){return r},get $el(){return r.$el}}}const nt=(0,e.withInstall)(et)})(),l})()));
|
package/lib/popover/popover.d.ts
CHANGED
@@ -25,8 +25,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
25
25
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
26
26
|
default: string | number;
|
27
27
|
};
|
28
|
-
content: import("vue-types").VueTypeDef<
|
29
|
-
default:
|
28
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
29
|
+
default: string | number;
|
30
30
|
};
|
31
31
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
32
32
|
default: boolean;
|
@@ -121,7 +121,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
121
121
|
refDefaultReference: import("vue").Ref<any>;
|
122
122
|
refContent: import("vue").Ref<any>;
|
123
123
|
refArrow: import("vue").Ref<any>;
|
124
|
-
content:
|
124
|
+
content: string | number;
|
125
125
|
theme: string;
|
126
126
|
transBoundary: import("vue").ComputedRef<boolean>;
|
127
127
|
handleClickOutside: (_e: MouseEvent) => void;
|
@@ -165,8 +165,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
165
165
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
166
166
|
default: string | number;
|
167
167
|
};
|
168
|
-
content: import("vue-types").VueTypeDef<
|
169
|
-
default:
|
168
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
169
|
+
default: string | number;
|
170
170
|
};
|
171
171
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
172
172
|
default: boolean;
|
@@ -271,7 +271,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
271
271
|
isShow: boolean;
|
272
272
|
always: boolean;
|
273
273
|
disabled: boolean;
|
274
|
-
content:
|
274
|
+
content: string | number;
|
275
275
|
allowHtml: boolean;
|
276
276
|
placement: "auto" | "left" | "right" | "auto-start" | "auto-end" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end";
|
277
277
|
theme: string;
|
package/lib/popover/props.d.ts
CHANGED
@@ -31,8 +31,8 @@ export declare const PopoverProps: {
|
|
31
31
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
32
32
|
default: string | number;
|
33
33
|
};
|
34
|
-
content: import("vue-types").VueTypeDef<
|
35
|
-
default:
|
34
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
35
|
+
default: string | number;
|
36
36
|
};
|
37
37
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
38
38
|
default: boolean;
|
package/lib/popover/root.d.ts
CHANGED
@@ -4,13 +4,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
} & {
|
5
5
|
default: string;
|
6
6
|
};
|
7
|
+
mode: import("vue-types").VueTypeValidableDef<string> & {
|
8
|
+
default: string;
|
9
|
+
} & {
|
10
|
+
default: string;
|
11
|
+
};
|
7
12
|
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
8
13
|
class: import("vue-types").VueTypeValidableDef<string> & {
|
9
14
|
default: string;
|
10
15
|
} & {
|
11
16
|
default: string;
|
12
17
|
};
|
18
|
+
mode: import("vue-types").VueTypeValidableDef<string> & {
|
19
|
+
default: string;
|
20
|
+
} & {
|
21
|
+
default: string;
|
22
|
+
};
|
13
23
|
}>>, {
|
14
24
|
class: string;
|
25
|
+
mode: string;
|
15
26
|
}, {}>;
|
16
27
|
export default _default;
|
package/lib/select/index.d.ts
CHANGED
@@ -236,8 +236,8 @@ declare const BkSelect: {
|
|
236
236
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
237
237
|
default: string | number;
|
238
238
|
};
|
239
|
-
content: import("vue-types").VueTypeDef<
|
240
|
-
default:
|
239
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
240
|
+
default: string | number;
|
241
241
|
};
|
242
242
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
243
243
|
default: boolean;
|
@@ -652,8 +652,8 @@ declare const BkSelect: {
|
|
652
652
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
653
653
|
default: string | number;
|
654
654
|
};
|
655
|
-
content: import("vue-types").VueTypeDef<
|
656
|
-
default:
|
655
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
656
|
+
default: string | number;
|
657
657
|
};
|
658
658
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
659
659
|
default: boolean;
|
@@ -953,8 +953,8 @@ declare const BkSelect: {
|
|
953
953
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
954
954
|
default: string | number;
|
955
955
|
};
|
956
|
-
content: import("vue-types").VueTypeDef<
|
957
|
-
default:
|
956
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
957
|
+
default: string | number;
|
958
958
|
};
|
959
959
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
960
960
|
default: boolean;
|
@@ -1369,8 +1369,8 @@ declare const BkSelect: {
|
|
1369
1369
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
1370
1370
|
default: string | number;
|
1371
1371
|
};
|
1372
|
-
content: import("vue-types").VueTypeDef<
|
1373
|
-
default:
|
1372
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
1373
|
+
default: string | number;
|
1374
1374
|
};
|
1375
1375
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
1376
1376
|
default: boolean;
|
@@ -1616,8 +1616,8 @@ declare const BkSelect: {
|
|
1616
1616
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
1617
1617
|
default: string | number;
|
1618
1618
|
};
|
1619
|
-
content: import("vue-types").VueTypeDef<
|
1620
|
-
default:
|
1619
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
1620
|
+
default: string | number;
|
1621
1621
|
};
|
1622
1622
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
1623
1623
|
default: boolean;
|
@@ -2032,8 +2032,8 @@ declare const BkSelect: {
|
|
2032
2032
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
2033
2033
|
default: string | number;
|
2034
2034
|
};
|
2035
|
-
content: import("vue-types").VueTypeDef<
|
2036
|
-
default:
|
2035
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
2036
|
+
default: string | number;
|
2037
2037
|
};
|
2038
2038
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
2039
2039
|
default: boolean;
|
package/lib/select/select.d.ts
CHANGED
@@ -127,8 +127,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
127
127
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
128
128
|
default: string | number;
|
129
129
|
};
|
130
|
-
content: import("vue-types").VueTypeDef<
|
131
|
-
default:
|
130
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
131
|
+
default: string | number;
|
132
132
|
};
|
133
133
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
134
134
|
default: boolean;
|
@@ -535,8 +535,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
535
535
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
536
536
|
default: string | number;
|
537
537
|
};
|
538
|
-
content: import("vue-types").VueTypeDef<
|
539
|
-
default:
|
538
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
539
|
+
default: string | number;
|
540
540
|
};
|
541
541
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
542
542
|
default: boolean;
|
@@ -778,8 +778,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
778
778
|
maxHeight: import("vue-types").VueTypeDef<string | number> & {
|
779
779
|
default: string | number;
|
780
780
|
};
|
781
|
-
content: import("vue-types").VueTypeDef<
|
782
|
-
default:
|
781
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
782
|
+
default: string | number;
|
783
783
|
};
|
784
784
|
allowHtml: import("vue-types").VueTypeValidableDef<boolean> & {
|
785
785
|
default: boolean;
|
package/lib/slider/index.d.ts
CHANGED
@@ -91,7 +91,7 @@ declare const Slider: {
|
|
91
91
|
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
92
92
|
[key: string]: any;
|
93
93
|
}>) => void)[];
|
94
|
-
readonly modelValue?: number |
|
94
|
+
readonly modelValue?: number | number[];
|
95
95
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
96
96
|
};
|
97
97
|
$attrs: {
|
@@ -108,7 +108,7 @@ declare const Slider: {
|
|
108
108
|
$emit: (event: "change" | "update:modelValue", ...args: any[]) => void;
|
109
109
|
$el: any;
|
110
110
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
111
|
-
modelValue: import("vue-types").VueTypeDef<number |
|
111
|
+
modelValue: import("vue-types").VueTypeDef<number | number[]>;
|
112
112
|
extCls: {
|
113
113
|
type: StringConstructor;
|
114
114
|
default: string;
|
@@ -226,7 +226,7 @@ declare const Slider: {
|
|
226
226
|
$nextTick: typeof import("vue").nextTick;
|
227
227
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
228
228
|
} & Readonly<import("vue").ExtractPropTypes<{
|
229
|
-
modelValue: import("vue-types").VueTypeDef<number |
|
229
|
+
modelValue: import("vue-types").VueTypeDef<number | number[]>;
|
230
230
|
extCls: {
|
231
231
|
type: StringConstructor;
|
232
232
|
default: string;
|
@@ -309,7 +309,7 @@ declare const Slider: {
|
|
309
309
|
__isTeleport?: never;
|
310
310
|
__isSuspense?: never;
|
311
311
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
312
|
-
modelValue: import("vue-types").VueTypeDef<number |
|
312
|
+
modelValue: import("vue-types").VueTypeDef<number | number[]>;
|
313
313
|
extCls: {
|
314
314
|
type: StringConstructor;
|
315
315
|
default: string;
|
package/lib/slider/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r)=>(()=>{var n={8133:e=>{"use strict";e.exports=a},5537:e=>{"use strict";e.exports=r},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,a)=>{var r=a(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,u=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function v(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),l=new j(r||[]);return u(o,"_invoke",{value:N(e,a,l)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f={};function p(){}function h(){}function y(){}var V={};v(V,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(_([])));x&&x!==a&&o.call(x,i)&&(V=x);var g=y.prototype=p.prototype=Object.create(V);function w(e){["next","throw","return"].forEach((function(t){v(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function a(n,u,l,i){var c=d(e[n],e,u);if("throw"!==c.type){var s=c.arg,v=s.value;return v&&"object"==r(v)&&o.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,l,i)}),(function(e){a("throw",e,l,i)})):t.resolve(v).then((function(e){s.value=e,l(s)}),(function(e){return a("throw",e,l,i)}))}i(c.arg)}var n;u(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}})}function N(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=E(u,a);if(l){if(l===f)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function E(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function _(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=y,u(g,"constructor",{value:y,configurable:!0}),u(y,"constructor",{value:h,configurable:!0}),h.displayName=v(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,v(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(L.prototype),v(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var u=new L(m(e,a,r,n),o);return t.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},w(g),v(g,s,"Generator"),v(g,i,(function(){return this})),v(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=_,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return u.type="throw",u.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],u=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var l=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(l&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var u=n?n.completion:{};return u.type=e,u.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),k(a),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;k(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:_(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";u.r(l),u.d(l,{default:()=>f});var e=u(4212),t=u(748),a=u(2841),r=u.n(a);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=u(8133),o=u.n(n),i=u(5537),c=u.n(i);const s=(0,t.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(a,r){var n=r.emit,o=(0,t.ref)(!1),u=(0,t.ref)(!1),l=(0,t.ref)(0),i=(0,t.ref)(0),s=(0,t.ref)(0),d=(0,t.ref)(null),f=(0,t.ref)(a.modelValue),p=(0,t.ref)(0),h=(0,t.ref)(0),y=(0,t.ref)(!1),V=(0,t.ref)(null),b=(0,t.computed)((function(){var t,r,n="";if(null===(t=a.params.customContent)||void 0===t?void 0:t[a.modelValue]){var o=a.params.customContent[a.modelValue];n=o.tip||o.label||""}var u=a.params.vertical?e.PlacementEnum.RIGHT:e.PlacementEnum.TOP;return(null===(r=a.params)||void 0===r?void 0:r.showTip)?{content:a.params.formatterTipLabel("".concat(n||(null==a?void 0:a.modelValue)||"0")),placement:u}:{content:"",placement:u}})),x=(0,t.computed)((function(){return"".concat((a.modelValue-a.params.minValue)/(a.params.maxValue-a.params.minValue)*100,"%")})),g=(0,t.computed)((function(){return a.params.vertical?{bottom:x.value}:{left:x.value}})),w=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),L=function(e){a.params.disable||(e.preventDefault(),N(e),v(window,"mousemove",E),v(window,"touchmove",E),v(window,"mouseup",S),v(window,"touchend",S))},N=function(e){o.value=!0,u.value=!0,a.params.vertical?l.value=e.clientY:i.value=e.clientX,s.value=parseFloat(x.value),d.value=s.value},E=function(e){if(o.value){u.value=!1,n("resetSize");var t=0;a.params.vertical?(p.value=e.clientY,t=(l.value-p.value)/a.params.sliderSize*100):(h.value=e.clientX,t=(h.value-i.value)/a.params.sliderSize*100),d.value=s.value+t,k(d.value)}},S=function e(){y.value=!1,o.value&&(setTimeout((function(){o.value=!1,u.value||(k(d.value),n("emitChange"))}),0),m(window,"mousemove",E),m(window,"touchmove",E),m(window,"mouseup",e),m(window,"touchend",e))},k=function(e){if(null!==e&&!isNaN(e)){e<0?d.value=0:e>100&&(d.value=100);var t=100/((a.params.maxValue-a.params.minValue)/a.params.step),r=Math.round(e/t)*t*(a.params.maxValue-a.params.minValue)*.01+a.params.minValue;r=parseFloat(r.toFixed(a.params.precision)),n("update:modelValue",r),o.value||a.modelValue===f.value||(f.value=a.modelValue)}};return{renderDom:function(){return(0,t.createVNode)("div",{class:["bk-slider-button",a.params.vertical?"vertical":"horizontal",{grabbing:o.value}],ref:V,tabindex:"0",style:g.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(b.value.content)?(0,t.createVNode)(c(),{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:function(){return[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]}}):(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null),a.params.showButtonLabel&&!a.params.showIntervalLabel?(0,t.createVNode)("div",{class:["slider-button-label",a.params.vertical?"vertical":"horizontal"]},[w.value]):void 0])},setPosition:k,tip:b}},render:function(){return this.renderDom()}});var v=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},m=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const d=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,a){var n=this,u=a.slots,l=a.emit,i=(0,t.ref)(1),c=(0,t.ref)(null),m=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(0),p=(0,t.ref)(0),h=(0,t.ref)(null),y=(0,t.ref)(null),V=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),g=(0,t.computed)((function(){return Math.min(c.value,m.value)})),w=(0,t.computed)((function(){return Math.max(c.value,m.value)})),L=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-g.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(c.value-e.minValue)/(e.maxValue-e.minValue),"%")})),N=(0,t.computed)((function(){return e.range?"".concat(100*(g.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),E=(0,t.computed)((function(){return e.vertical?{height:L.value,bottom:N.value}:{width:L.value,left:N.value}})),S=(0,t.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(w.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(c.value-e.minValue)/(e.maxValue-e.minValue)}))})),k=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),j=(0,t.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),_=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),C=(0,t.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),O=(0,t.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:x.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){I()})),(0,t.watch)((function(){return c.value}),(function(t){e.range?l("update:modelValue",[g.value,w.value]):l("update:modelValue",t),f.value=t})),(0,t.watch)((function(){return m.value}),(function(e){l("update:modelValue",[g.value,w.value]),p.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(c.value=Math.max(e.minValue,Number(e.modelValue[0])),m.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(c.value=e.minValue,m.value=e.maxValue),d.value=[c.value,m.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?c.value=e.minValue:c.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),d.value=c.value),T(),v(window,"resize",T())}));var T=function(){h.value&&(i.value=h.value["client".concat(e.vertical?"Height":"Width")])},B=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(T(),e.vertical){var n=null===(a=h.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;F((n-t.clientY)/i.value*100)}else{var o=null===(r=h.value)||void 0===r?void 0:r.getBoundingClientRect().left;F((t.clientX-o)/i.value*100)}M()}},P=function(){return e.range?![g.value,w.value].every((function(e,t){return e===d.value[t]})):e.modelValue!==d.value},I=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?l("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?l("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?l("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?l("update:modelValue",[t[0],e.maxValue]):(c.value=Number(t[0]),m.value=Number(t[1]),P()&&(d.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?l("update:modelValue",e.minValue):t>e.maxValue?l("update:modelValue",e.maxValue):(c.value=t,P()&&(d.value=t)))}},M=function(){return a=n,o=void 0,u=void 0,i=r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,t.nextTick)();case 2:l("change",e.range?[g.value,w.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{l(i.next(e))}catch(e){t(e)}}function n(e){try{l(i.throw(e))}catch(e){t(e)}}function l(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,n)}l((i=i.apply(a,o||[])).next())}));var a,o,u,i},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},F=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(g.value-a)<Math.abs(w.value-a)?b.value=c.value<m.value?y.value:V.value:b.value=c.value>m.value?y.value:V.value,b.value.setPosition(t)}else y.value.setPosition(t)},G=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(f.value=e.minValue,c.value=e.minValue):a>e.maxValue?(f.value=e.maxValue,c.value=e.maxValue):c.value=a}},A=function(t){if(""!==t&&"number"!=typeof t){var a=parseFloat(t);a<e.minValue?(p.value=e.minValue,m.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,m.value=e.maxValue):m.value=a}},R=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[c.value,m.value].includes(a)?"0":"1"};return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["bk-slider",e.extCls]},[null===(a=u.start)||void 0===a?void 0:a.call(u),(0,t.createVNode)("div",{class:"bk-slider-runway",ref:h,style:k.value,onClick:B},[(0,t.createVNode)("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:E.value},null),e.showInterval?S.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a)},null)})):void 0,e.customContent?C.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,t.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[e.formatterLabel(e.minValue)]),(0,t.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?j.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.stepWidth)},[a.stepLabel])})):e.customContent?C.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(s,{modelValue:c.value,"onUpdate:modelValue":function(e){return c.value=e},ref:y,params:O.value,onEmitChange:M,onResetSize:T},null),e.range?(0,t.createVNode)(s,{modelValue:m.value,"onUpdate:modelValue":function(e){return m.value=e},ref:V,params:O.value,onEmitChange:M,onResetSize:T},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"bk-slider-input"},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:G},null)]),_.value&&m.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=u.end)||void 0===r?void 0:r.call(u)])}}},render:function(){return this.renderDom()}}),f=(0,e.withInstall)(d)})(),l})()));
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r)=>(()=>{var n={8133:e=>{"use strict";e.exports=a},5537:e=>{"use strict";e.exports=r},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,a)=>{var r=a(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,u=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function v(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),l=new j(r||[]);return u(o,"_invoke",{value:N(e,a,l)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f={};function p(){}function h(){}function y(){}var V={};v(V,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(O([])));x&&x!==a&&o.call(x,i)&&(V=x);var g=y.prototype=p.prototype=Object.create(V);function w(e){["next","throw","return"].forEach((function(t){v(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function a(n,u,l,i){var c=d(e[n],e,u);if("throw"!==c.type){var s=c.arg,v=s.value;return v&&"object"==r(v)&&o.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,l,i)}),(function(e){a("throw",e,l,i)})):t.resolve(v).then((function(e){s.value=e,l(s)}),(function(e){return a("throw",e,l,i)}))}i(c.arg)}var n;u(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}})}function N(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=S(u,a);if(l){if(l===f)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function S(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=y,u(g,"constructor",{value:y,configurable:!0}),u(y,"constructor",{value:h,configurable:!0}),h.displayName=v(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,v(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(L.prototype),v(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var u=new L(m(e,a,r,n),o);return t.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},w(g),v(g,s,"Generator"),v(g,i,(function(){return this})),v(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return u.type="throw",u.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],u=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var l=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(l&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var u=n?n.completion:{};return u.type=e,u.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),k(a),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;k(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:O(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";u.r(l),u.d(l,{default:()=>f});var e=u(4212),t=u(748),a=u(2841),r=u.n(a);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=u(8133),o=u.n(n),i=u(5537),c=u.n(i);const s=(0,t.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(a,r){var n=r.emit,o=(0,t.ref)(!1),u=(0,t.ref)(!1),l=(0,t.ref)(0),i=(0,t.ref)(0),s=(0,t.ref)(0),d=(0,t.ref)(null),f=(0,t.ref)(a.modelValue),p=(0,t.ref)(0),h=(0,t.ref)(0),y=(0,t.ref)(!1),V=(0,t.ref)(null),b=(0,t.computed)((function(){var t,r,n="";if(null===(t=a.params.customContent)||void 0===t?void 0:t[a.modelValue]){var o=a.params.customContent[a.modelValue];n=o.tip||o.label||""}var u=a.params.vertical?e.PlacementEnum.RIGHT:e.PlacementEnum.TOP;return(null===(r=a.params)||void 0===r?void 0:r.showTip)?{content:a.params.formatterTipLabel("".concat(n||(null==a?void 0:a.modelValue)||"0")),placement:u}:{content:"",placement:u}})),x=(0,t.computed)((function(){return"".concat((a.modelValue-a.params.minValue)/(a.params.maxValue-a.params.minValue)*100,"%")})),g=(0,t.computed)((function(){return a.params.vertical?{bottom:x.value}:{left:x.value}})),w=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),L=function(e){a.params.disable||(e.preventDefault(),N(e),v(window,"mousemove",S),v(window,"touchmove",S),v(window,"mouseup",E),v(window,"touchend",E))},N=function(e){o.value=!0,u.value=!0,a.params.vertical?l.value=e.clientY:i.value=e.clientX,s.value=parseFloat(x.value),d.value=s.value},S=function(e){if(o.value){u.value=!1,n("resetSize");var t=0;a.params.vertical?(p.value=e.clientY,t=(l.value-p.value)/a.params.sliderSize*100):(h.value=e.clientX,t=(h.value-i.value)/a.params.sliderSize*100),d.value=s.value+t,k(d.value)}},E=function e(){y.value=!1,o.value&&(setTimeout((function(){o.value=!1,u.value||(k(d.value),n("emitChange"))}),0),m(window,"mousemove",S),m(window,"touchmove",S),m(window,"mouseup",e),m(window,"touchend",e))},k=function(e){if(null!==e&&!isNaN(e)){e<0?d.value=0:e>100&&(d.value=100);var t=100/((a.params.maxValue-a.params.minValue)/a.params.step),r=Math.round(e/t)*t*(a.params.maxValue-a.params.minValue)*.01+a.params.minValue;r=parseFloat(r.toFixed(a.params.precision)),n("update:modelValue",r),o.value||a.modelValue===f.value||(f.value=a.modelValue)}};return{renderDom:function(){return(0,t.createVNode)("div",{class:["bk-slider-button",a.params.vertical?"vertical":"horizontal",{grabbing:o.value}],ref:V,tabindex:"0",style:g.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(b.value.content)?(0,t.createVNode)(c(),{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:function(){return[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]}}):(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null),a.params.showButtonLabel&&!a.params.showIntervalLabel?(0,t.createVNode)("div",{class:["slider-button-label",a.params.vertical?"vertical":"horizontal"]},[w.value]):void 0])},setPosition:k,tip:b}},render:function(){return this.renderDom()}});var v=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},m=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const d=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number),e.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,a){var n=this,u=a.slots,l=a.emit,i=(0,t.ref)(1),c=(0,t.ref)(null),m=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(0),p=(0,t.ref)(0),h=(0,t.ref)(null),y=(0,t.ref)(null),V=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),g=(0,t.computed)((function(){return Math.min(c.value,m.value)})),w=(0,t.computed)((function(){return Math.max(c.value,m.value)})),L=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-g.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(c.value-e.minValue)/(e.maxValue-e.minValue),"%")})),N=(0,t.computed)((function(){return e.range?"".concat(100*(g.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),S=(0,t.computed)((function(){return e.vertical?{height:L.value,bottom:N.value}:{width:L.value,left:N.value}})),E=(0,t.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(w.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(c.value-e.minValue)/(e.maxValue-e.minValue)}))})),k=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),j=(0,t.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),O=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),T=(0,t.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),_=(0,t.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:x.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){I()})),(0,t.watch)((function(){return c.value}),(function(t){e.range?l("update:modelValue",[g.value,w.value]):l("update:modelValue",t),f.value=t})),(0,t.watch)((function(){return m.value}),(function(e){l("update:modelValue",[g.value,w.value]),p.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(c.value=Math.max(e.minValue,Number(e.modelValue[0])),m.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(c.value=e.minValue,m.value=e.maxValue),d.value=[c.value,m.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?c.value=e.minValue:c.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),d.value=c.value),C(),v(window,"resize",C())}));var C=function(){h.value&&(i.value=h.value["client".concat(e.vertical?"Height":"Width")])},B=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(C(),e.vertical){var n=null===(a=h.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;F((n-t.clientY)/i.value*100)}else{var o=null===(r=h.value)||void 0===r?void 0:r.getBoundingClientRect().left;F((t.clientX-o)/i.value*100)}M()}},P=function(){return e.range?![g.value,w.value].every((function(e,t){return e===d.value[t]})):e.modelValue!==d.value},I=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?l("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?l("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?l("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?l("update:modelValue",[t[0],e.maxValue]):(c.value=Number(t[0]),m.value=Number(t[1]),P()&&(d.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?l("update:modelValue",e.minValue):t>e.maxValue?l("update:modelValue",e.maxValue):(c.value=t,P()&&(d.value=t)))}},M=function(){return a=n,o=void 0,u=void 0,i=r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,t.nextTick)();case 2:l("change",e.range?[g.value,w.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{l(i.next(e))}catch(e){t(e)}}function n(e){try{l(i.throw(e))}catch(e){t(e)}}function l(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,n)}l((i=i.apply(a,o||[])).next())}));var a,o,u,i},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},F=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(g.value-a)<Math.abs(w.value-a)?b.value=c.value<m.value?y.value:V.value:b.value=c.value>m.value?y.value:V.value,b.value.setPosition(t)}else y.value.setPosition(t)},G=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(f.value=e.minValue,c.value=e.minValue):a>e.maxValue?(f.value=e.maxValue,c.value=e.maxValue):c.value=a}},A=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(p.value=e.minValue,m.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,m.value=e.maxValue):m.value=a}},R=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[c.value,m.value].includes(a)?"0":"1"};return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["bk-slider",e.extCls]},[null===(a=u.start)||void 0===a?void 0:a.call(u),(0,t.createVNode)("div",{class:"bk-slider-runway",ref:h,style:k.value,onClick:B},[(0,t.createVNode)("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:S.value},null),e.showInterval?E.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a)},null)})):void 0,e.customContent?T.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,t.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[e.formatterLabel(e.minValue)]),(0,t.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?j.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.stepWidth)},[a.stepLabel])})):e.customContent?T.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(s,{modelValue:c.value,"onUpdate:modelValue":function(e){return c.value=e},ref:y,params:_.value,onEmitChange:M,onResetSize:C},null),e.range?(0,t.createVNode)(s,{modelValue:m.value,"onUpdate:modelValue":function(e){return m.value=e},ref:V,params:_.value,onEmitChange:M,onResetSize:C},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"bk-slider-input"},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:G},null)]),O.value&&m.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=u.end)||void 0===r?void 0:r.call(u)])}}},render:function(){return this.renderDom()}}),f=(0,e.withInstall)(d)})(),l})()));
|
package/lib/slider/slider.d.ts
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
export declare const on: (element: Element | Window, event: string, handler: any) => void;
|
27
27
|
export declare const off: (element: Element | Window, event: string, handler: any) => void;
|
28
28
|
declare const _default: import("vue").DefineComponent<{
|
29
|
-
modelValue: import("vue-types").VueTypeDef<number |
|
29
|
+
modelValue: import("vue-types").VueTypeDef<number | number[]>;
|
30
30
|
extCls: {
|
31
31
|
type: StringConstructor;
|
32
32
|
default: string;
|
@@ -102,7 +102,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
102
102
|
}, {
|
103
103
|
renderDom: () => JSX.Element;
|
104
104
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
105
|
-
modelValue: import("vue-types").VueTypeDef<number |
|
105
|
+
modelValue: import("vue-types").VueTypeDef<number | number[]>;
|
106
106
|
extCls: {
|
107
107
|
type: StringConstructor;
|
108
108
|
default: string;
|