ScopeSentry/static/assets/el-popper-_HbrF1jO.js

2 lines
38 KiB
JavaScript
Raw Normal View History

2024-06-11 13:57:44 +00:00
import{c1 as e,a7 as t,aZ as n,B as r,a_ as o,a3 as a,Y as i,b2 as s,b6 as l,a as u,bc as p,r as f,P as c,c2 as d,c3 as v,a6 as g,c4 as m,ag as h,s as y,ab as b,ae as w,d as x,J as O,L as R,A,af as E,o as T,c as S,n as C,F as k,aw as j,W as B,c5 as M,ay as P,Q as F,c6 as L,c7 as D,e as I,c8 as _,c9 as H,bd as W,i as $,w as q,K as z,j as N,ca as U,bt as V,cb as K,M as Z,aT as Y,ad as X,bm as J,ak as Q,h as G,cc as ee,aD as te,aC as ne,bZ as re,cd as oe,t as ae}from"./index-CbsoNNgc.js";const ie=(e,t,{checkForDefaultPrevented:n=!0}={})=>r=>{const o=null==e?void 0:e(r);if(!1===n||!o)return null==t?void 0:t(r)},se=e=>t=>"mouse"===t.pointerType?e(t):void 0;function le(e){return void 0===e}const ue=e({type:t(Boolean),default:null}),pe=e({type:t(Function)}),fe=e=>{const t=`update:${e}`,u=`onUpdate:${e}`,p=[t];return{useModelToggle:({indicator:p,toggleReason:f,shouldHideWhenRouteChanges:c,shouldProceed:d,onShow:v,onHide:g})=>{const m=n(),{emit:h}=m,y=m.props,b=r((()=>o(y[u]))),w=r((()=>null===y[e])),x=e=>{!0!==p.value&&(p.value=!0,f&&(f.value=e),o(v)&&v(e))},O=e=>{!1!==p.value&&(p.value=!1,f&&(f.value=e),o(g)&&g(e))},R=e=>{if(!0===y.disabled||o(d)&&!d())return;const n=b.value&&s;n&&h(t,!0),!w.value&&n||x(e)},A=e=>{if(!0===y.disabled||!s)return;const n=b.value&&s;n&&h(t,!1),!w.value&&n||O(e)},E=e=>{l(e)&&(y.disabled&&e?b.value&&h(t,!1):p.value!==e&&(e?x():O()))};return a((()=>y[e]),E),c&&void 0!==m.appContext.config.globalProperties.$route&&a((()=>({...m.proxy.$route})),(()=>{c.value&&p.value&&A()})),i((()=>{E(y[e])})),{hide:A,show:R,toggle:()=>{p.value?A():R()},hasUpdateHandler:b}},useModelToggleProps:{[e]:ue,[u]:pe},useModelToggleEmits:p}};fe("modelValue");var ce="top",de="bottom",ve="right",ge="left",me="auto",he=[ce,de,ve,ge],ye="start",be="end",we="clippingParents",xe="viewport",Oe="popper",Re="reference",Ae=he.reduce((function(e,t){return e.concat([t+"-"+ye,t+"-"+be])}),[]),Ee=[].concat(he,[me]).reduce((function(e,t){return e.concat([t,t+"-"+ye,t+"-"+be])}),[]),Te=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Se(e){return e?(e.nodeName||"").toLowerCase():null}function Ce(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ke(e){return e instanceof Ce(e).Element||e instanceof Element}function je(e){return e instanceof Ce(e).HTMLElement||e instanceof HTMLElement}function Be(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Ce(e).ShadowRoot||e instanceof ShadowRoot)}var Me={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!je(o)||!Se(o)||(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});!je(r)||!Se(r)||(Object.assign(r.style,a),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function Pe(e){return e.split("-")[0]}var Fe=Math.max,Le=Math.min,De=Math.round;function Ie(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(je(e)&&t){var a=e.offsetHeight,i=e.offsetWidth;i>0&&(r=De(n.width)/i||1),a>0&&(o=De(n.height)/a||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function _e(e){var t=Ie(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function He(e,t