vue3-popper
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -1,1 +0,1 @@ | ||
var Popper=function(e){"use strict";function t(e,t,r,n,o,a,i){try{var p=e[a](i),s=p.value}catch(e){return void r(e)}p.done?t(s):Promise.resolve(s).then(n,o)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,o,a=[],i=!0,p=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){p=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(p)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(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.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function a(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){var t=a(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function p(e){return e instanceof a(e).Element||e instanceof Element}function s(e){return e instanceof a(e).HTMLElement||e instanceof HTMLElement}function c(e){return"undefined"!=typeof ShadowRoot&&(e instanceof a(e).ShadowRoot||e instanceof ShadowRoot)}function f(e){return e?(e.nodeName||"").toLowerCase():null}function l(e){return((p(e)?e.ownerDocument:e.document)||window.document).documentElement}function d(e){return o(l(e)).left+i(e).scrollLeft}function u(e){return a(e).getComputedStyle(e)}function m(e){var t=u(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function v(e,t,r){void 0===r&&(r=!1);var n,p,c=l(t),u=o(e),v=s(t),h={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(v||!v&&!r)&&(("body"!==f(t)||m(c))&&(h=(n=t)!==a(n)&&s(n)?{scrollLeft:(p=n).scrollLeft,scrollTop:p.scrollTop}:i(n)),s(t)?((b=o(t)).x+=t.clientLeft,b.y+=t.clientTop):c&&(b.x=d(c))),{x:u.left+h.scrollLeft-b.x,y:u.top+h.scrollTop-b.y,width:u.width,height:u.height}}function h(e){var t=o(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function b(e){return"html"===f(e)?e:e.assignedSlot||e.parentNode||(c(e)?e.host:null)||l(e)}function g(e){return["html","body","#document"].indexOf(f(e))>=0?e.ownerDocument.body:s(e)&&m(e)?e:g(b(e))}function y(e,t){var r;void 0===t&&(t=[]);var n=g(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=a(n),p=o?[i].concat(i.visualViewport||[],m(n)?n:[]):n,s=t.concat(p);return o?s:s.concat(y(b(p)))}function w(e){return["table","td","th"].indexOf(f(e))>=0}function x(e){return s(e)&&"fixed"!==u(e).position?e.offsetParent:null}function O(e){for(var t=a(e),r=x(e);r&&w(r)&&"static"===u(r).position;)r=x(r);return r&&("html"===f(r)||"body"===f(r)&&"static"===u(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(e)&&"fixed"===u(e).position)return null;for(var r=b(e);s(r)&&["html","body"].indexOf(f(r))<0;){var n=u(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var k="top",j="bottom",E="right",A="left",B="auto",D=[k,j,E,A],P="start",S="end",L="viewport",M="popper",T=D.reduce((function(e,t){return e.concat([t+"-"+P,t+"-"+S])}),[]),N=[].concat(D,[B]).reduce((function(e,t){return e.concat([t,t+"-"+P,t+"-"+S])}),[]),C=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}function W(e){return e.split("-")[0]}var H=Math.max,I=Math.min,V=Math.round;function _(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&c(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function q(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Y(e,t){return t===L?q(function(e){var t=a(e),r=l(e),n=t.visualViewport,o=r.clientWidth,i=r.clientHeight,p=0,s=0;return n&&(o=n.width,i=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(p=n.offsetLeft,s=n.offsetTop)),{width:o,height:i,x:p+d(e),y:s}}(e)):s(t)?function(e){var t=o(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):q(function(e){var t,r=l(e),n=i(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=H(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),p=H(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+d(e),c=-n.scrollTop;return"rtl"===u(o||r).direction&&(s+=H(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:p,x:s,y:c}}(l(e)))}function U(e,t,r){var n="clippingParents"===t?function(e){var t=y(b(e)),r=["absolute","fixed"].indexOf(u(e).position)>=0&&s(e)?O(e):e;return p(r)?t.filter((function(e){return p(e)&&_(e,r)&&"body"!==f(e)})):[]}(e):[].concat(t),o=[].concat(n,[r]),a=o[0],i=o.reduce((function(t,r){var n=Y(e,r);return t.top=H(n.top,t.top),t.right=I(n.right,t.right),t.bottom=I(n.bottom,t.bottom),t.left=H(n.left,t.left),t}),Y(e,a));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function X(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function F(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?W(o):null,i=o?X(o):null,p=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2;switch(a){case k:t={x:p,y:r.y-n.height};break;case j:t={x:p,y:r.y+r.height};break;case E:t={x:r.x+r.width,y:s};break;case A:t={x:r.x-n.width,y:s};break;default:t={x:r.x,y:r.y}}var c=a?z(a):null;if(null!=c){var f="y"===c?"height":"width";switch(i){case P:t[c]=t[c]-(r[f]/2-n[f]/2);break;case S:t[c]=t[c]+(r[f]/2-n[f]/2)}}return t}function $(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function K(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function G(e,t){void 0===t&&(t={});var r=t,n=r.placement,a=void 0===n?e.placement:n,i=r.boundary,s=void 0===i?"clippingParents":i,c=r.rootBoundary,f=void 0===c?L:c,d=r.elementContext,u=void 0===d?M:d,m=r.altBoundary,v=void 0!==m&&m,h=r.padding,b=void 0===h?0:h,g=$("number"!=typeof b?b:K(b,D)),y=u===M?"reference":M,w=e.elements.reference,x=e.rects.popper,O=e.elements[v?y:u],A=U(p(O)?O:O.contextElement||l(e.elements.popper),s,f),B=o(w),P=F({reference:B,element:x,strategy:"absolute",placement:a}),S=q(Object.assign({},x,P)),T=u===M?S:B,N={top:A.top-T.top+g.top,bottom:T.bottom-A.bottom+g.bottom,left:A.left-T.left+g.left,right:T.right-A.right+g.right},C=e.modifiersData.offset;if(u===M&&C){var R=C[a];Object.keys(N).forEach((function(e){var t=[E,j].indexOf(e)>=0?1:-1,r=[k,j].indexOf(e)>=0?"y":"x";N[e]+=R[r]*t}))}return N}var J={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Z(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,a=void 0===o?J:o;return function(e,t,r){void 0===r&&(r=a);var o,i,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},J,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],f=!1,l={state:s,setOptions:function(r){d(),s.options=Object.assign({},a,s.options,r),s.scrollParents={reference:p(e)?y(e):e.contextElement?y(e.contextElement):[],popper:y(t)};var o,i,f=function(e){var t=R(e);return C.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((o=[].concat(n,s.options.modifiers),i=o.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(i).map((function(e){return i[e]}))));return s.orderedModifiers=f.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var a=o({state:s,name:t,instance:l,options:n}),i=function(){};c.push(a||i)}})),l.update()},forceUpdate:function(){if(!f){var e=s.elements,t=e.reference,r=e.popper;if(Q(t,r)){s.rects={reference:v(t,O(r),"fixed"===s.options.strategy),popper:h(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var o=s.orderedModifiers[n],a=o.fn,i=o.options,p=void 0===i?{}:i,c=o.name;"function"==typeof a&&(s=a({state:s,options:p,name:c,instance:l})||s)}else s.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(e){l.forceUpdate(),e(s)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(o())}))}))),i}),destroy:function(){d(),f=!0}};if(!Q(e,t))return l;function d(){c.forEach((function(e){return e()})),c=[]}return l.setOptions(r).then((function(e){!f&&r.onFirstUpdate&&r.onFirstUpdate(e)})),l}}var ee={passive:!0};var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.offsets,p=e.position,s=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,d=!0===f?function(e){var t=e.x,r=e.y,n=window.devicePixelRatio||1;return{x:V(V(t*n)/n)||0,y:V(V(r*n)/n)||0}}(i):"function"==typeof f?f(i):i,m=d.x,v=void 0===m?0:m,h=d.y,b=void 0===h?0:h,g=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),w=A,x=k,B=window;if(c){var D=O(r),P="clientHeight",S="clientWidth";D===a(r)&&"static"!==u(D=l(r)).position&&(P="scrollHeight",S="scrollWidth"),D=D,o===k&&(x=j,b-=D[P]-n.height,b*=s?1:-1),o===A&&(w=E,v-=D[S]-n.width,v*=s?1:-1)}var L,M=Object.assign({position:p},c&&te);return s?Object.assign({},M,((L={})[x]=y?"0":"",L[w]=g?"0":"",L.transform=(B.devicePixelRatio||1)<2?"translate("+v+"px, "+b+"px)":"translate3d("+v+"px, "+b+"px, 0)",L)):Object.assign({},M,((t={})[x]=y?b+"px":"",t[w]=g?v+"px":"",t.transform="",t))}var ne=Z({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,p=n.resize,s=void 0===p||p,c=a(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",r.update,ee)})),s&&c.addEventListener("resize",r.update,ee),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,ee)})),s&&c.removeEventListener("resize",r.update,ee)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=F({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,p=r.roundOffsets,s=void 0===p||p,c={placement:W(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];s(o)&&f(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});s(n)&&f(n)&&(Object.assign(n.style,a),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}]});function oe(e,t,r){return H(e,I(t,r))}var ae={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,p=void 0!==i&&i,s=r.boundary,c=r.rootBoundary,f=r.altBoundary,l=r.padding,d=r.tether,u=void 0===d||d,m=r.tetherOffset,v=void 0===m?0:m,b=G(t,{boundary:s,rootBoundary:c,padding:l,altBoundary:f}),g=W(t.placement),y=X(t.placement),w=!y,x=z(g),B="x"===x?"y":"x",D=t.modifiersData.popperOffsets,S=t.rects.reference,L=t.rects.popper,M="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,T={x:0,y:0};if(D){if(a||p){var N="y"===x?k:A,C="y"===x?j:E,R="y"===x?"height":"width",V=D[x],_=D[x]+b[N],q=D[x]-b[C],Y=u?-L[R]/2:0,U=y===P?S[R]:L[R],F=y===P?-L[R]:-S[R],$=t.elements.arrow,K=u&&$?h($):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=J[N],Z=J[C],ee=oe(0,S[R],K[R]),te=w?S[R]/2-Y-ee-Q-M:U-ee-Q-M,re=w?-S[R]/2+Y+ee+Z+M:F+ee+Z+M,ne=t.elements.arrow&&O(t.elements.arrow),ae=ne?"y"===x?ne.clientTop||0:ne.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][x]:0,pe=D[x]+te-ie-ae,se=D[x]+re-ie;if(a){var ce=oe(u?I(_,pe):_,V,u?H(q,se):q);D[x]=ce,T[x]=ce-V}if(p){var fe="x"===x?k:A,le="x"===x?j:E,de=D[B],ue=de+b[fe],me=de-b[le],ve=oe(u?I(ue,pe):ue,de,u?H(me,se):me);D[B]=ve,T[B]=ve-de}}t.modifiersData[n]=T}},requiresIfExists:["offset"]},ie={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function fe(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,p=r.flipVariations,s=r.allowedAutoPlacements,c=void 0===s?N:s,f=X(n),l=f?p?T:T.filter((function(e){return X(e)===f})):D,d=l.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=l);var u=d.reduce((function(t,r){return t[r]=G(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[W(r)],t}),{});return Object.keys(u).sort((function(e,t){return u[e]-u[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,p=void 0===i||i,s=r.fallbackPlacements,c=r.padding,f=r.boundary,l=r.rootBoundary,d=r.altBoundary,u=r.flipVariations,m=void 0===u||u,v=r.allowedAutoPlacements,h=t.options.placement,b=W(h),g=s||(b===h||!m?[pe(h)]:function(e){if(W(e)===B)return[];var t=pe(e);return[ce(e),t,ce(t)]}(h)),y=[h].concat(g).reduce((function(e,r){return e.concat(W(r)===B?fe(t,{placement:r,boundary:f,rootBoundary:l,padding:c,flipVariations:m,allowedAutoPlacements:v}):r)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,D=!0,S=y[0],L=0;L<y.length;L++){var M=y[L],T=W(M),N=X(M)===P,C=[k,j].indexOf(T)>=0,R=C?"width":"height",H=G(t,{placement:M,boundary:f,rootBoundary:l,altBoundary:d,padding:c}),I=C?N?E:A:N?j:k;w[R]>x[R]&&(I=pe(I));var V=pe(I),_=[];if(a&&_.push(H[T]<=0),p&&_.push(H[I]<=0,H[V]<=0),_.every((function(e){return e}))){S=M,D=!1;break}O.set(M,_)}if(D)for(var q=function(e){var t=y.find((function(t){var r=O.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},Y=m?3:1;Y>0;Y--){if("break"===q(Y))break}t.placement!==S&&(t.modifiersData[n]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};var de={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=N.reduce((function(e,r){return e[r]=function(e,t,r){var n=W(e),o=[A,k].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],p=a[1];return i=i||0,p=(p||0)*o,[A,E].indexOf(n)>=0?{x:p,y:i}:{x:i,y:p}}(r,t.rects,a),e}),{}),p=i[t.placement],s=p.x,c=p.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};var ue={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,p=W(r.placement),s=z(p),c=[A,E].indexOf(p)>=0?"height":"width";if(a&&i){var f=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:K(e,D))}(o.padding,r),l=h(a),d="y"===s?k:A,u="y"===s?j:E,m=r.rects.reference[c]+r.rects.reference[s]-i[s]-r.rects.popper[c],v=i[s]-r.rects.reference[s],b=O(a),g=b?"y"===s?b.clientHeight||0:b.clientWidth||0:0,y=m/2-v/2,w=f[d],x=g-l[c]-f[u],B=g/2-l[c]/2+y,P=oe(w,B,x),S=s;r.modifiersData[n]=((t={})[S]=P,t.centerOffset=P-B,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&_(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},me=function(e){return parseInt(e,10)};function ve(n){var o=n.placement,a=n.arrowPadding,i=n.offsetX,p=n.offsetY,s=n.emit,c=e.ref(!1),f=e.ref(null),l=e.ref(null),d=e.ref(null),u=function(){c.value&&(c.value=!1,s("close:popper"))},m=function(){c.value||(c.value=!0,s("open:popper"))};e.watch([c,o],function(){var n,o=(n=regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r(n,1)[0]){t.next=5;break}return t.next=4,e.nextTick();case 4:v();case 5:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(o,a){var i=n.apply(e,r);function p(e){t(i,o,a,p,s,"next",e)}function s(e){t(i,o,a,p,s,"throw",e)}p(void 0)}))});return function(e){return o.apply(this,arguments)}}());var v=function(){f.value=ne(d.value,l.value,{placement:o.value,modifiers:[ae,le,ue,{name:"arrow",options:{padding:me(a.value)}},de,{name:"offset",options:{offset:[me(i.value),me(p.value)]}}]}),f.value.update()};return e.onBeforeUnmount((function(){f.value&&f.value.destroy()})),{popperNode:l,triggerNode:d,isOpen:c,toggle:function(){c.value?u():m()},open:m,close:u}}var he={beforeMount:function(e,t){e.clickAwayEvent=function(r){e!=r.target&&!e.contains(r.target)&&t.value.enabled&&t.value.handler()},document.addEventListener("click",e.clickAwayEvent)},unmounted:function(e){document.removeEventListener("click",e.clickAwayEvent)}},be=e.defineComponent({name:"Popper",emits:["open:popper","close:popper"],directives:{clickAway:he},props:{placement:{type:String,default:"bottom",validator:function(e){return["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"].includes(e)}},disableClickAway:{type:Boolean,default:!1},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"12"},hover:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},arrowPadding:{type:String,default:"0"}},setup:function(t,r){var n=r.slots,o=r.emit,a=n.default();if(a&&a.length>1)return console.error("[Popper]: The <Popper> component expects only one child element at its root. You passed ".concat(a.length," child nodes."));var i=e.toRefs(t),p=ve({offsetX:i.offsetX,offsetY:i.offsetY,arrowPadding:i.arrowPadding,placement:i.placement,emit:o});return{popperNode:p.popperNode,triggerNode:p.triggerNode,isOpen:p.isOpen,toggle:p.toggle,open:p.open,close:p.close}}}),ge=e.withScopeId("data-v-2e7b3708");e.pushScopeId("data-v-2e7b3708");var ye={key:0,id:"arrow","data-popper-arrow":""};e.popScopeId();var we=ge((function(t,r,n,o,a,i){var p=e.resolveDirective("click-away");return e.withDirectives((e.openBlock(),e.createBlock("div",null,[e.createVNode("div",{ref:"triggerNode",onMouseover:r[1]||(r[1]=function(e){return t.hover&&t.open()}),onMouseleave:r[2]||(r[2]=function(e){return t.hover&&t.close()}),onClick:r[3]||(r[3]=function(){return t.toggle&&t.toggle.apply(t,arguments)}),onFocus:r[4]||(r[4]=function(){return t.open&&t.open.apply(t,arguments)}),onBlur:r[5]||(r[5]=function(){return t.close&&t.close.apply(t,arguments)}),onKeyup:r[6]||(r[6]=e.withKeys((function(){return t.close&&t.close.apply(t,arguments)}),["esc"])),class:"inline-block"},[e.renderSlot(t.$slots,"default")],544),e.createVNode(e.Transition,{name:"fade"},{default:ge((function(){return[t.isOpen?(e.openBlock(),e.createBlock("div",{key:0,class:["popper",t.isOpen?"inline-block":null],ref:"popperNode"},[e.renderSlot(t.$slots,"content",{close:t.close}),t.arrow?(e.openBlock(),e.createBlock("div",ye)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]})),_:3})],512)),[[p,{handler:t.close,enabled:!t.disableClickAway}]])}));!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('\n#arrow[data-v-2e7b3708],\n #arrow[data-v-2e7b3708]::before {\n position: absolute;\n width: calc(10px - var(--popper-theme-border-width, 0px));\n height: calc(10px - var(--popper-theme-border-width, 0px));\n box-sizing: border-box;\n background: var(--popper-theme-background-color);\n}\n#arrow[data-v-2e7b3708] {\n visibility: hidden;\n}\n#arrow[data-v-2e7b3708]::before {\n visibility: visible;\n content: "";\n transform: rotate(45deg);\n}\n\n /* Top arrow */\n.popper[data-popper-placement^="top"] > #arrow[data-v-2e7b3708] {\n bottom: -5px;\n}\n.popper[data-popper-placement^="top"] > #arrow[data-v-2e7b3708]::before {\n border-right: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-bottom: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Bottom arrow */\n.popper[data-popper-placement^="bottom"] > #arrow[data-v-2e7b3708] {\n top: -5px;\n}\n.popper[data-popper-placement^="bottom"] > #arrow[data-v-2e7b3708]::before {\n border-left: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-top: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Left arrow */\n.popper[data-popper-placement^="left"] > #arrow[data-v-2e7b3708] {\n right: -5px;\n}\n.popper[data-popper-placement^="left"] > #arrow[data-v-2e7b3708]::before {\n border-right: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-top: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Right arrow */\n.popper[data-popper-placement^="right"] > #arrow[data-v-2e7b3708] {\n left: -5px;\n}\n.popper[data-popper-placement^="right"] > #arrow[data-v-2e7b3708]::before {\n border-left: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-bottom: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n.popper[data-v-2e7b3708] {\n background: var(--popper-theme-background-color);\n padding: var(--popper-theme-padding);\n color: var(--popper-theme-text-color);\n border-radius: var(--popper-theme-border-radius);\n border-width: var(--popper-theme-border-width);\n border-style: var(--popper-theme-border-style);\n border-color: var(--popper-theme-border-color);\n box-shadow: var(--popper-theme-box-shadow);\n}\n.popper[data-v-2e7b3708]:hover,\n .popper:hover > #arrow[data-v-2e7b3708]::before {\n background: var(--popper-theme-background-color-hover);\n}\n.inline-block[data-v-2e7b3708] {\n display: inline-block;\n}\n.fade-enter-active[data-v-2e7b3708],\n .fade-leave-active[data-v-2e7b3708] {\n transition: opacity 0.2s ease;\n}\n.fade-enter-from[data-v-2e7b3708],\n .fade-leave-to[data-v-2e7b3708] {\n opacity: 0;\n}\n'),be.render=we,be.__scopeId="data-v-2e7b3708";var xe=function(){var e=be;return e.install=function(t){t.component("Popper",e)},e}(),Oe=Object.freeze({__proto__:null,default:xe});return Object.entries(Oe).forEach((function(e){var t=r(e,2),n=t[0],o=t[1];"default"!==n&&(xe[n]=o)})),xe}(Vue); | ||
var Popper=function(e){"use strict";function t(e,t,r,n,o,a,i){try{var p=e[a](i),s=p.value}catch(e){return void r(e)}p.done?t(s):Promise.resolve(s).then(n,o)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==r)return;var n,o,a=[],i=!0,p=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){p=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(p)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(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.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function a(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function i(e){var t=a(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function p(e){return e instanceof a(e).Element||e instanceof Element}function s(e){return e instanceof a(e).HTMLElement||e instanceof HTMLElement}function c(e){return"undefined"!=typeof ShadowRoot&&(e instanceof a(e).ShadowRoot||e instanceof ShadowRoot)}function f(e){return e?(e.nodeName||"").toLowerCase():null}function l(e){return((p(e)?e.ownerDocument:e.document)||window.document).documentElement}function d(e){return o(l(e)).left+i(e).scrollLeft}function u(e){return a(e).getComputedStyle(e)}function v(e){var t=u(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function m(e,t,r){void 0===r&&(r=!1);var n,p,c=l(t),u=o(e),m=s(t),h={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(m||!m&&!r)&&(("body"!==f(t)||v(c))&&(h=(n=t)!==a(n)&&s(n)?{scrollLeft:(p=n).scrollLeft,scrollTop:p.scrollTop}:i(n)),s(t)?((b=o(t)).x+=t.clientLeft,b.y+=t.clientTop):c&&(b.x=d(c))),{x:u.left+h.scrollLeft-b.x,y:u.top+h.scrollTop-b.y,width:u.width,height:u.height}}function h(e){var t=o(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function b(e){return"html"===f(e)?e:e.assignedSlot||e.parentNode||(c(e)?e.host:null)||l(e)}function g(e){return["html","body","#document"].indexOf(f(e))>=0?e.ownerDocument.body:s(e)&&v(e)?e:g(b(e))}function y(e,t){var r;void 0===t&&(t=[]);var n=g(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=a(n),p=o?[i].concat(i.visualViewport||[],v(n)?n:[]):n,s=t.concat(p);return o?s:s.concat(y(b(p)))}function w(e){return["table","td","th"].indexOf(f(e))>=0}function x(e){return s(e)&&"fixed"!==u(e).position?e.offsetParent:null}function O(e){for(var t=a(e),r=x(e);r&&w(r)&&"static"===u(r).position;)r=x(r);return r&&("html"===f(r)||"body"===f(r)&&"static"===u(r).position)?t:r||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(e)&&"fixed"===u(e).position)return null;for(var r=b(e);s(r)&&["html","body"].indexOf(f(r))<0;){var n=u(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var k="top",j="bottom",E="right",P="left",A="auto",D=[k,j,E,P],S="start",B="end",L="viewport",M="popper",T=D.reduce((function(e,t){return e.concat([t+"-"+S,t+"-"+B])}),[]),N=[].concat(D,[A]).reduce((function(e,t){return e.concat([t,t+"-"+S,t+"-"+B])}),[]),C=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}function W(e){return e.split("-")[0]}var H=Math.max,I=Math.min,V=Math.round;function _(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&c(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function q(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Y(e,t){return t===L?q(function(e){var t=a(e),r=l(e),n=t.visualViewport,o=r.clientWidth,i=r.clientHeight,p=0,s=0;return n&&(o=n.width,i=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(p=n.offsetLeft,s=n.offsetTop)),{width:o,height:i,x:p+d(e),y:s}}(e)):s(t)?function(e){var t=o(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):q(function(e){var t,r=l(e),n=i(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=H(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),p=H(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+d(e),c=-n.scrollTop;return"rtl"===u(o||r).direction&&(s+=H(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:p,x:s,y:c}}(l(e)))}function U(e,t,r){var n="clippingParents"===t?function(e){var t=y(b(e)),r=["absolute","fixed"].indexOf(u(e).position)>=0&&s(e)?O(e):e;return p(r)?t.filter((function(e){return p(e)&&_(e,r)&&"body"!==f(e)})):[]}(e):[].concat(t),o=[].concat(n,[r]),a=o[0],i=o.reduce((function(t,r){var n=Y(e,r);return t.top=H(n.top,t.top),t.right=I(n.right,t.right),t.bottom=I(n.bottom,t.bottom),t.left=H(n.left,t.left),t}),Y(e,a));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function X(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function F(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?W(o):null,i=o?X(o):null,p=r.x+r.width/2-n.width/2,s=r.y+r.height/2-n.height/2;switch(a){case k:t={x:p,y:r.y-n.height};break;case j:t={x:p,y:r.y+r.height};break;case E:t={x:r.x+r.width,y:s};break;case P:t={x:r.x-n.width,y:s};break;default:t={x:r.x,y:r.y}}var c=a?z(a):null;if(null!=c){var f="y"===c?"height":"width";switch(i){case S:t[c]=t[c]-(r[f]/2-n[f]/2);break;case B:t[c]=t[c]+(r[f]/2-n[f]/2)}}return t}function $(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function K(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function G(e,t){void 0===t&&(t={});var r=t,n=r.placement,a=void 0===n?e.placement:n,i=r.boundary,s=void 0===i?"clippingParents":i,c=r.rootBoundary,f=void 0===c?L:c,d=r.elementContext,u=void 0===d?M:d,v=r.altBoundary,m=void 0!==v&&v,h=r.padding,b=void 0===h?0:h,g=$("number"!=typeof b?b:K(b,D)),y=u===M?"reference":M,w=e.elements.reference,x=e.rects.popper,O=e.elements[m?y:u],P=U(p(O)?O:O.contextElement||l(e.elements.popper),s,f),A=o(w),S=F({reference:A,element:x,strategy:"absolute",placement:a}),B=q(Object.assign({},x,S)),T=u===M?B:A,N={top:P.top-T.top+g.top,bottom:T.bottom-P.bottom+g.bottom,left:P.left-T.left+g.left,right:T.right-P.right+g.right},C=e.modifiersData.offset;if(u===M&&C){var R=C[a];Object.keys(N).forEach((function(e){var t=[E,j].indexOf(e)>=0?1:-1,r=[k,j].indexOf(e)>=0?"y":"x";N[e]+=R[r]*t}))}return N}var J={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Z(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,a=void 0===o?J:o;return function(e,t,r){void 0===r&&(r=a);var o,i,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},J,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],f=!1,l={state:s,setOptions:function(r){d(),s.options=Object.assign({},a,s.options,r),s.scrollParents={reference:p(e)?y(e):e.contextElement?y(e.contextElement):[],popper:y(t)};var o,i,f=function(e){var t=R(e);return C.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}((o=[].concat(n,s.options.modifiers),i=o.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e}),{}),Object.keys(i).map((function(e){return i[e]}))));return s.orderedModifiers=f.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var a=o({state:s,name:t,instance:l,options:n}),i=function(){};c.push(a||i)}})),l.update()},forceUpdate:function(){if(!f){var e=s.elements,t=e.reference,r=e.popper;if(Q(t,r)){s.rects={reference:m(t,O(r),"fixed"===s.options.strategy),popper:h(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var o=s.orderedModifiers[n],a=o.fn,i=o.options,p=void 0===i?{}:i,c=o.name;"function"==typeof a&&(s=a({state:s,options:p,name:c,instance:l})||s)}else s.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(e){l.forceUpdate(),e(s)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(o())}))}))),i}),destroy:function(){d(),f=!0}};if(!Q(e,t))return l;function d(){c.forEach((function(e){return e()})),c=[]}return l.setOptions(r).then((function(e){!f&&r.onFirstUpdate&&r.onFirstUpdate(e)})),l}}var ee={passive:!0};var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.offsets,p=e.position,s=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,d=!0===f?function(e){var t=e.x,r=e.y,n=window.devicePixelRatio||1;return{x:V(V(t*n)/n)||0,y:V(V(r*n)/n)||0}}(i):"function"==typeof f?f(i):i,v=d.x,m=void 0===v?0:v,h=d.y,b=void 0===h?0:h,g=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),w=P,x=k,A=window;if(c){var D=O(r),S="clientHeight",B="clientWidth";D===a(r)&&"static"!==u(D=l(r)).position&&(S="scrollHeight",B="scrollWidth"),D=D,o===k&&(x=j,b-=D[S]-n.height,b*=s?1:-1),o===P&&(w=E,m-=D[B]-n.width,m*=s?1:-1)}var L,M=Object.assign({position:p},c&&te);return s?Object.assign({},M,((L={})[x]=y?"0":"",L[w]=g?"0":"",L.transform=(A.devicePixelRatio||1)<2?"translate("+m+"px, "+b+"px)":"translate3d("+m+"px, "+b+"px, 0)",L)):Object.assign({},M,((t={})[x]=y?b+"px":"",t[w]=g?m+"px":"",t.transform="",t))}var ne=Z({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,p=n.resize,s=void 0===p||p,c=a(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",r.update,ee)})),s&&c.addEventListener("resize",r.update,ee),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,ee)})),s&&c.removeEventListener("resize",r.update,ee)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=F({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,p=r.roundOffsets,s=void 0===p||p,c={placement:W(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];s(o)&&f(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});s(n)&&f(n)&&(Object.assign(n.style,a),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}]});function oe(e,t,r){return H(e,I(t,r))}var ae={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,p=void 0!==i&&i,s=r.boundary,c=r.rootBoundary,f=r.altBoundary,l=r.padding,d=r.tether,u=void 0===d||d,v=r.tetherOffset,m=void 0===v?0:v,b=G(t,{boundary:s,rootBoundary:c,padding:l,altBoundary:f}),g=W(t.placement),y=X(t.placement),w=!y,x=z(g),A="x"===x?"y":"x",D=t.modifiersData.popperOffsets,B=t.rects.reference,L=t.rects.popper,M="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T={x:0,y:0};if(D){if(a||p){var N="y"===x?k:P,C="y"===x?j:E,R="y"===x?"height":"width",V=D[x],_=D[x]+b[N],q=D[x]-b[C],Y=u?-L[R]/2:0,U=y===S?B[R]:L[R],F=y===S?-L[R]:-B[R],$=t.elements.arrow,K=u&&$?h($):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=J[N],Z=J[C],ee=oe(0,B[R],K[R]),te=w?B[R]/2-Y-ee-Q-M:U-ee-Q-M,re=w?-B[R]/2+Y+ee+Z+M:F+ee+Z+M,ne=t.elements.arrow&&O(t.elements.arrow),ae=ne?"y"===x?ne.clientTop||0:ne.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][x]:0,pe=D[x]+te-ie-ae,se=D[x]+re-ie;if(a){var ce=oe(u?I(_,pe):_,V,u?H(q,se):q);D[x]=ce,T[x]=ce-V}if(p){var fe="x"===x?k:P,le="x"===x?j:E,de=D[A],ue=de+b[fe],ve=de-b[le],me=oe(u?I(ue,pe):ue,de,u?H(ve,se):ve);D[A]=me,T[A]=me-de}}t.modifiersData[n]=T}},requiresIfExists:["offset"]},ie={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function fe(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,p=r.flipVariations,s=r.allowedAutoPlacements,c=void 0===s?N:s,f=X(n),l=f?p?T:T.filter((function(e){return X(e)===f})):D,d=l.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=l);var u=d.reduce((function(t,r){return t[r]=G(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[W(r)],t}),{});return Object.keys(u).sort((function(e,t){return u[e]-u[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,p=void 0===i||i,s=r.fallbackPlacements,c=r.padding,f=r.boundary,l=r.rootBoundary,d=r.altBoundary,u=r.flipVariations,v=void 0===u||u,m=r.allowedAutoPlacements,h=t.options.placement,b=W(h),g=s||(b===h||!v?[pe(h)]:function(e){if(W(e)===A)return[];var t=pe(e);return[ce(e),t,ce(t)]}(h)),y=[h].concat(g).reduce((function(e,r){return e.concat(W(r)===A?fe(t,{placement:r,boundary:f,rootBoundary:l,padding:c,flipVariations:v,allowedAutoPlacements:m}):r)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,D=!0,B=y[0],L=0;L<y.length;L++){var M=y[L],T=W(M),N=X(M)===S,C=[k,j].indexOf(T)>=0,R=C?"width":"height",H=G(t,{placement:M,boundary:f,rootBoundary:l,altBoundary:d,padding:c}),I=C?N?E:P:N?j:k;w[R]>x[R]&&(I=pe(I));var V=pe(I),_=[];if(a&&_.push(H[T]<=0),p&&_.push(H[I]<=0,H[V]<=0),_.every((function(e){return e}))){B=M,D=!1;break}O.set(M,_)}if(D)for(var q=function(e){var t=y.find((function(t){var r=O.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return B=t,"break"},Y=v?3:1;Y>0;Y--){if("break"===q(Y))break}t.placement!==B&&(t.modifiersData[n]._skip=!0,t.placement=B,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};var de={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=N.reduce((function(e,r){return e[r]=function(e,t,r){var n=W(e),o=[P,k].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],p=a[1];return i=i||0,p=(p||0)*o,[P,E].indexOf(n)>=0?{x:p,y:i}:{x:i,y:p}}(r,t.rects,a),e}),{}),p=i[t.placement],s=p.x,c=p.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};var ue={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,p=W(r.placement),s=z(p),c=[P,E].indexOf(p)>=0?"height":"width";if(a&&i){var f=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:K(e,D))}(o.padding,r),l=h(a),d="y"===s?k:P,u="y"===s?j:E,v=r.rects.reference[c]+r.rects.reference[s]-i[s]-r.rects.popper[c],m=i[s]-r.rects.reference[s],b=O(a),g=b?"y"===s?b.clientHeight||0:b.clientWidth||0:0,y=v/2-m/2,w=f[d],x=g-l[c]-f[u],A=g/2-l[c]/2+y,S=oe(w,A,x),B=s;r.modifiersData[n]=((t={})[B]=S,t.centerOffset=S-A,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&_(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},ve=function(e){return parseInt(e,10)};function me(n){var o=n.placement,a=n.arrowPadding,i=n.offsetX,p=n.offsetY,s=n.emit,c=e.ref(!1),f=e.ref(null),l=e.ref(null),d=e.ref(null),u=function(){c.value&&(c.value=!1,s("close:popper"))},v=function(){c.value||(c.value=!0,s("open:popper"))};e.watch([c,o],function(){var n,o=(n=regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r(n,1)[0]){t.next=5;break}return t.next=4,e.nextTick();case 4:m();case 5:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(o,a){var i=n.apply(e,r);function p(e){t(i,o,a,p,s,"next",e)}function s(e){t(i,o,a,p,s,"throw",e)}p(void 0)}))});return function(e){return o.apply(this,arguments)}}());var m=function(){f.value=ne(d.value,l.value,{placement:o.value,modifiers:[ae,le,ue,{name:"arrow",options:{padding:ve(a.value)}},de,{name:"offset",options:{offset:[ve(i.value),ve(p.value)]}}]}),f.value.update()};return e.onBeforeUnmount((function(){f.value&&f.value.destroy()})),{popperNode:l,triggerNode:d,isOpen:c,toggle:function(){c.value?u():v()},open:v,close:u}}var he={beforeMount:function(e,t){e.clickAwayEvent=function(r){e!=r.target&&!e.contains(r.target)&&t.value.enabled&&t.value.handler()},document.addEventListener("click",e.clickAwayEvent)},unmounted:function(e){document.removeEventListener("click",e.clickAwayEvent)}},be=e.defineComponent({name:"Popper",emits:["open:popper","close:popper"],directives:{clickAway:he},props:{placement:{type:String,default:"bottom",validator:function(e){return["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"].includes(e)}},disableClickAway:{type:Boolean,default:!1},offsetX:{type:String,default:"0"},offsetY:{type:String,default:"12"},hover:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},arrowPadding:{type:String,default:"0"}},setup:function(t,r){var n=r.slots,o=r.emit,a=n.default();if(a&&a.length>1)return console.error("[Popper]: The <Popper> component expects only one child element at its root. You passed ".concat(a.length," child nodes."));var i=e.toRefs(t),p=me({offsetX:i.offsetX,offsetY:i.offsetY,arrowPadding:i.arrowPadding,placement:i.placement,emit:o}),s=p.popperNode,c=p.triggerNode,f=p.isOpen,l=p.toggle,d=p.open,u=p.close,v=e.computed((function(){var e;return f.value&&(null===(e=n.content)||void 0===e?void 0:e.call(n).length)}));return{popperNode:s,triggerNode:c,isOpen:f,toggle:l,open:d,close:u,showPopper:v}}}),ge=e.withScopeId("data-v-520a9638");e.pushScopeId("data-v-520a9638");var ye={key:0,id:"arrow","data-popper-arrow":""};e.popScopeId();var we=ge((function(t,r,n,o,a,i){var p=e.resolveDirective("click-away");return e.withDirectives((e.openBlock(),e.createBlock("div",null,[e.createVNode("div",{ref:"triggerNode",onMouseover:r[1]||(r[1]=function(e){return t.hover&&t.open()}),onMouseleave:r[2]||(r[2]=function(e){return t.hover&&t.close()}),onClick:r[3]||(r[3]=function(){return t.toggle&&t.toggle.apply(t,arguments)}),onFocus:r[4]||(r[4]=function(){return t.open&&t.open.apply(t,arguments)}),onBlur:r[5]||(r[5]=function(){return t.close&&t.close.apply(t,arguments)}),onKeyup:r[6]||(r[6]=e.withKeys((function(){return t.close&&t.close.apply(t,arguments)}),["esc"])),class:"inline-block"},[e.renderSlot(t.$slots,"default")],544),e.createVNode(e.Transition,{name:"fade"},{default:ge((function(){return[e.withDirectives(e.createVNode("div",{class:["popper",t.showPopper?"inline-block":null],ref:"popperNode"},[e.renderSlot(t.$slots,"content",{close:t.close}),t.arrow?(e.openBlock(),e.createBlock("div",ye)):e.createCommentVNode("",!0)],2),[[e.vShow,t.showPopper]])]})),_:3})],512)),[[p,{handler:t.close,enabled:!t.disableClickAway}]])}));!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('\n#arrow[data-v-520a9638],\n #arrow[data-v-520a9638]::before {\n position: absolute;\n width: calc(10px - var(--popper-theme-border-width, 0px));\n height: calc(10px - var(--popper-theme-border-width, 0px));\n box-sizing: border-box;\n background: var(--popper-theme-background-color);\n}\n#arrow[data-v-520a9638] {\n visibility: hidden;\n}\n#arrow[data-v-520a9638]::before {\n visibility: visible;\n content: "";\n transform: rotate(45deg);\n}\n\n /* Top arrow */\n.popper[data-popper-placement^="top"] > #arrow[data-v-520a9638] {\n bottom: -5px;\n}\n.popper[data-popper-placement^="top"] > #arrow[data-v-520a9638]::before {\n border-right: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-bottom: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Bottom arrow */\n.popper[data-popper-placement^="bottom"] > #arrow[data-v-520a9638] {\n top: -5px;\n}\n.popper[data-popper-placement^="bottom"] > #arrow[data-v-520a9638]::before {\n border-left: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-top: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Left arrow */\n.popper[data-popper-placement^="left"] > #arrow[data-v-520a9638] {\n right: -5px;\n}\n.popper[data-popper-placement^="left"] > #arrow[data-v-520a9638]::before {\n border-right: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-top: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n\n /* Right arrow */\n.popper[data-popper-placement^="right"] > #arrow[data-v-520a9638] {\n left: -5px;\n}\n.popper[data-popper-placement^="right"] > #arrow[data-v-520a9638]::before {\n border-left: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n border-bottom: var(--popper-theme-border-width)\n var(--popper-theme-border-style) var(--popper-theme-border-color);\n}\n.popper[data-v-520a9638] {\n background: var(--popper-theme-background-color);\n padding: var(--popper-theme-padding);\n color: var(--popper-theme-text-color);\n border-radius: var(--popper-theme-border-radius);\n border-width: var(--popper-theme-border-width);\n border-style: var(--popper-theme-border-style);\n border-color: var(--popper-theme-border-color);\n box-shadow: var(--popper-theme-box-shadow);\n}\n.popper[data-v-520a9638]:hover,\n .popper:hover > #arrow[data-v-520a9638]::before {\n background: var(--popper-theme-background-color-hover);\n}\n.inline-block[data-v-520a9638] {\n display: inline-block;\n}\n.fade-enter-active[data-v-520a9638],\n .fade-leave-active[data-v-520a9638] {\n transition: opacity 0.2s ease;\n}\n.fade-enter-from[data-v-520a9638],\n .fade-leave-to[data-v-520a9638] {\n opacity: 0;\n}\n'),be.render=we,be.__scopeId="data-v-520a9638";var xe=function(){var e=be;return e.install=function(t){t.component("Popper",e)},e}(),Oe=Object.freeze({__proto__:null,default:xe});return Object.entries(Oe).forEach((function(e){var t=r(e,2),n=t[0],o=t[1];"default"!==n&&(xe[n]=o)})),xe}(Vue); |
{ | ||
"name": "vue3-popper", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Valgeir Björnsson", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
171130
3346