@freshworks/crayons
Version:
Crayons Web Components library
1 lines • 20.2 kB
JavaScript
System.register([],(function(e){"use strict";return{execute:function(){var t="top";var r="bottom";var n="right";var a="left";var o="auto";var i=[t,r,n,a];var f="start";var s="end";var c="clippingParents";var u="viewport";var v="popper";var p="reference";var l=i.reduce((function(e,t){return e.concat([t+"-"+f,t+"-"+s])}),[]);var d=[].concat(i,[o]).reduce((function(e,t){return e.concat([t,t+"-"+f,t+"-"+s])}),[]);var m="beforeRead";var h="read";var g="afterRead";var y="beforeMain";var b="main";var w="afterMain";var x="beforeWrite";var O="write";var j="afterWrite";var E=[m,h,g,y,b,w,x,O,j];function D(e){return e?(e.nodeName||"").toLowerCase():null}function k(e){if(e==null){return window}if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView||window:window}return e}function L(e){var t=k(e).Element;return e instanceof t||e instanceof Element}function M(e){var t=k(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function P(e){if(typeof ShadowRoot==="undefined"){return false}var t=k(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function W(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{};var n=t.attributes[e]||{};var a=t.elements[e];if(!M(a)||!D(a)){return}Object.assign(a.style,r);Object.keys(n).forEach((function(e){var t=n[e];if(t===false){a.removeAttribute(e)}else{a.setAttribute(e,t===true?"":t)}}))}))}function A(e){var t=e.state;var r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper);t.styles=r;if(t.elements.arrow){Object.assign(t.elements.arrow.style,r.arrow)}return function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e];var a=t.attributes[e]||{};var o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]);var i=o.reduce((function(e,t){e[t]="";return e}),{});if(!M(n)||!D(n)){return}Object.assign(n.style,i);Object.keys(a).forEach((function(e){n.removeAttribute(e)}))}))}}var B={name:"applyStyles",enabled:true,phase:"write",fn:W,effect:A,requires:["computeStyles"]};function H(e){return e.split("-")[0]}function R(e,t){var r=e.getBoundingClientRect();var n=1;var a=1;return{width:r.width/n,height:r.height/a,top:r.top/a,right:r.right/n,bottom:r.bottom/a,left:r.left/n,x:r.left/n,y:r.top/a}}function T(e){var t=R(e);var r=e.offsetWidth;var n=e.offsetHeight;if(Math.abs(t.width-r)<=1){r=t.width}if(Math.abs(t.height-n)<=1){n=t.height}return{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function S(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t)){return true}else if(r&&P(r)){var n=t;do{if(n&&e.isSameNode(n)){return true}n=n.parentNode||n.host}while(n)}return false}function C(e){return k(e).getComputedStyle(e)}function q(e){return["table","td","th"].indexOf(D(e))>=0}function N(e){return((L(e)?e.ownerDocument:e.document)||window.document).documentElement}function V(e){if(D(e)==="html"){return e}return e.assignedSlot||e.parentNode||(P(e)?e.host:null)||N(e)}function I(e){if(!M(e)||C(e).position==="fixed"){return null}return e.offsetParent}function U(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;var r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&M(e)){var n=C(e);if(n.position==="fixed"){return null}}var a=V(e);while(M(a)&&["html","body"].indexOf(D(a))<0){var o=C(a);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none"){return a}else{a=a.parentNode}}return null}function z(e){var t=k(e);var r=I(e);while(r&&q(r)&&C(r).position==="static"){r=I(r)}if(r&&(D(r)==="html"||D(r)==="body"&&C(r).position==="static")){return t}return r||U(e)||t}function _(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var F=Math.max;var X=Math.min;var Y=Math.round;function G(e,t,r){return F(e,X(t,r))}function J(){return{top:0,right:0,bottom:0,left:0}}function K(e){return Object.assign({},J(),e)}function Q(e,t){return t.reduce((function(t,r){t[r]=e;return t}),{})}var Z=function e(t,r){t=typeof t==="function"?t(Object.assign({},r.rects,{placement:r.placement})):t;return K(typeof t!=="number"?t:Q(t,i))};function $(e){var o;var i=e.state,f=e.name,s=e.options;var c=i.elements.arrow;var u=i.modifiersData.popperOffsets;var v=H(i.placement);var p=_(v);var l=[a,n].indexOf(v)>=0;var d=l?"height":"width";if(!c||!u){return}var m=Z(s.padding,i);var h=T(c);var g=p==="y"?t:a;var y=p==="y"?r:n;var b=i.rects.reference[d]+i.rects.reference[p]-u[p]-i.rects.popper[d];var w=u[p]-i.rects.reference[p];var x=z(c);var O=x?p==="y"?x.clientHeight||0:x.clientWidth||0:0;var j=b/2-w/2;var E=m[g];var D=O-h[d]-m[y];var k=O/2-h[d]/2+j;var L=G(E,k,D);var M=p;i.modifiersData[f]=(o={},o[M]=L,o.centerOffset=L-k,o)}function ee(e){var t=e.state,r=e.options;var n=r.element,a=n===void 0?"[data-popper-arrow]":n;if(a==null){return}if(typeof a==="string"){a=t.elements.popper.querySelector(a);if(!a){return}}if(!S(t.elements.popper,a)){return}t.elements.arrow=a}var te={name:"arrow",enabled:true,phase:"main",fn:$,effect:ee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function re(e){return e.split("-")[1]}var ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ae(e){var t=e.x,r=e.y;var n=window;var a=n.devicePixelRatio||1;return{x:Y(Y(t*a)/a)||0,y:Y(Y(r*a)/a)||0}}function oe(e){var o;var i=e.popper,f=e.popperRect,c=e.placement,u=e.variation,v=e.offsets,p=e.position,l=e.gpuAcceleration,d=e.adaptive,m=e.roundOffsets;var h=m===true?ae(v):typeof m==="function"?m(v):v,g=h.x,y=g===void 0?0:g,b=h.y,w=b===void 0?0:b;var x=v.hasOwnProperty("x");var O=v.hasOwnProperty("y");var j=a;var E=t;var D=window;if(d){var L=z(i);var M="clientHeight";var P="clientWidth";if(L===k(i)){L=N(i);if(C(L).position!=="static"&&p==="absolute"){M="scrollHeight";P="scrollWidth"}}L=L;if(c===t||(c===a||c===n)&&u===s){E=r;w-=L[M]-f.height;w*=l?1:-1}if(c===a||(c===t||c===r)&&u===s){j=n;y-=L[P]-f.width;y*=l?1:-1}}var W=Object.assign({position:p},d&&ne);if(l){var A;return Object.assign({},W,(A={},A[E]=O?"0":"",A[j]=x?"0":"",A.transform=(D.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",A))}return Object.assign({},W,(o={},o[E]=O?w+"px":"",o[j]=x?y+"px":"",o.transform="",o))}function ie(e){var t=e.state,r=e.options;var n=r.gpuAcceleration,a=n===void 0?true:n,o=r.adaptive,i=o===void 0?true:o,f=r.roundOffsets,s=f===void 0?true:f;var c={placement:H(t.placement),variation:re(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a};if(t.modifiersData.popperOffsets!=null){t.styles.popper=Object.assign({},t.styles.popper,oe(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))}if(t.modifiersData.arrow!=null){t.styles.arrow=Object.assign({},t.styles.arrow,oe(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:s})))}t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var fe={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:ie,data:{}};var se={passive:true};function ce(e){var t=e.state,r=e.instance,n=e.options;var a=n.scroll,o=a===void 0?true:a,i=n.resize,f=i===void 0?true:i;var s=k(t.elements.popper);var c=[].concat(t.scrollParents.reference,t.scrollParents.popper);if(o){c.forEach((function(e){e.addEventListener("scroll",r.update,se)}))}if(f){s.addEventListener("resize",r.update,se)}return function(){if(o){c.forEach((function(e){e.removeEventListener("scroll",r.update,se)}))}if(f){s.removeEventListener("resize",r.update,se)}}}var ue={name:"eventListeners",enabled:true,phase:"write",fn:function e(){},effect:ce,data:{}};var ve={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(e){return e.replace(/left|right|bottom|top/g,(function(e){return ve[e]}))}var le={start:"end",end:"start"};function de(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function me(e){var t=k(e);var r=t.pageXOffset;var n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function he(e){return R(N(e)).left+me(e).scrollLeft}function ge(e){var t=k(e);var r=N(e);var n=t.visualViewport;var a=r.clientWidth;var o=r.clientHeight;var i=0;var f=0;if(n){a=n.width;o=n.height;if(!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){i=n.offsetLeft;f=n.offsetTop}}return{width:a,height:o,x:i+he(e),y:f}}function ye(e){var t;var r=N(e);var n=me(e);var a=(t=e.ownerDocument)==null?void 0:t.body;var o=F(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0);var i=F(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);var f=-n.scrollLeft+he(e);var s=-n.scrollTop;if(C(a||r).direction==="rtl"){f+=F(r.clientWidth,a?a.clientWidth:0)-o}return{width:o,height:i,x:f,y:s}}function be(e){var t=C(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function we(e){if(["html","body","#document"].indexOf(D(e))>=0){return e.ownerDocument.body}if(M(e)&&be(e)){return e}return we(V(e))}function xe(e,t){var r;if(t===void 0){t=[]}var n=we(e);var a=n===((r=e.ownerDocument)==null?void 0:r.body);var o=k(n);var i=a?[o].concat(o.visualViewport||[],be(n)?n:[]):n;var f=t.concat(i);return a?f:f.concat(xe(V(i)))}function Oe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function je(e){var t=R(e);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;return t}function Ee(e,t){return t===u?Oe(ge(e)):M(t)?je(t):Oe(ye(N(e)))}function De(e){var t=xe(V(e));var r=["absolute","fixed"].indexOf(C(e).position)>=0;var n=r&&M(e)?z(e):e;if(!L(n)){return[]}return t.filter((function(e){return L(e)&&S(e,n)&&D(e)!=="body"}))}function ke(e,t,r){var n=t==="clippingParents"?De(e):[].concat(t);var a=[].concat(n,[r]);var o=a[0];var i=a.reduce((function(t,r){var n=Ee(e,r);t.top=F(n.top,t.top);t.right=X(n.right,t.right);t.bottom=X(n.bottom,t.bottom);t.left=F(n.left,t.left);return t}),Ee(e,o));i.width=i.right-i.left;i.height=i.bottom-i.top;i.x=i.left;i.y=i.top;return i}function Le(e){var o=e.reference,i=e.element,c=e.placement;var u=c?H(c):null;var v=c?re(c):null;var p=o.x+o.width/2-i.width/2;var l=o.y+o.height/2-i.height/2;var d;switch(u){case t:d={x:p,y:o.y-i.height};break;case r:d={x:p,y:o.y+o.height};break;case n:d={x:o.x+o.width,y:l};break;case a:d={x:o.x-i.width,y:l};break;default:d={x:o.x,y:o.y}}var m=u?_(u):null;if(m!=null){var h=m==="y"?"height":"width";switch(v){case f:d[m]=d[m]-(o[h]/2-i[h]/2);break;case s:d[m]=d[m]+(o[h]/2-i[h]/2);break}}return d}function Me(e,a){if(a===void 0){a={}}var o=a,f=o.placement,s=f===void 0?e.placement:f,l=o.boundary,d=l===void 0?c:l,m=o.rootBoundary,h=m===void 0?u:m,g=o.elementContext,y=g===void 0?v:g,b=o.altBoundary,w=b===void 0?false:b,x=o.padding,O=x===void 0?0:x;var j=K(typeof O!=="number"?O:Q(O,i));var E=y===v?p:v;var D=e.rects.popper;var k=e.elements[w?E:y];var M=ke(L(k)?k:k.contextElement||N(e.elements.popper),d,h);var P=R(e.elements.reference);var W=Le({reference:P,element:D,strategy:"absolute",placement:s});var A=Oe(Object.assign({},D,W));var B=y===v?A:P;var H={top:M.top-B.top+j.top,bottom:B.bottom-M.bottom+j.bottom,left:M.left-B.left+j.left,right:B.right-M.right+j.right};var T=e.modifiersData.offset;if(y===v&&T){var S=T[s];Object.keys(H).forEach((function(e){var a=[n,r].indexOf(e)>=0?1:-1;var o=[t,r].indexOf(e)>=0?"y":"x";H[e]+=S[o]*a}))}return H}function Pe(e,t){if(t===void 0){t={}}var r=t,n=r.placement,a=r.boundary,o=r.rootBoundary,f=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?d:c;var v=re(n);var p=v?s?l:l.filter((function(e){return re(e)===v})):i;var m=p.filter((function(e){return u.indexOf(e)>=0}));if(m.length===0){m=p}var h=m.reduce((function(t,r){t[r]=Me(e,{placement:r,boundary:a,rootBoundary:o,padding:f})[H(r)];return t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}function We(e){if(H(e)===o){return[]}var t=pe(e);return[de(e),t,de(t)]}function Ae(e){var i=e.state,s=e.options,c=e.name;if(i.modifiersData[c]._skip){return}var u=s.mainAxis,v=u===void 0?true:u,p=s.altAxis,l=p===void 0?true:p,d=s.fallbackPlacements,m=s.padding,h=s.boundary,g=s.rootBoundary,y=s.altBoundary,b=s.flipVariations,w=b===void 0?true:b,x=s.allowedAutoPlacements;var O=i.options.placement;var j=H(O);var E=j===O;var D=d||(E||!w?[pe(O)]:We(O));var k=[O].concat(D).reduce((function(e,t){return e.concat(H(t)===o?Pe(i,{placement:t,boundary:h,rootBoundary:g,padding:m,flipVariations:w,allowedAutoPlacements:x}):t)}),[]);var L=i.rects.reference;var M=i.rects.popper;var P=new Map;var W=true;var A=k[0];for(var B=0;B<k.length;B++){var R=k[B];var T=H(R);var S=re(R)===f;var C=[t,r].indexOf(T)>=0;var q=C?"width":"height";var N=Me(i,{placement:R,boundary:h,rootBoundary:g,altBoundary:y,padding:m});var V=C?S?n:a:S?r:t;if(L[q]>M[q]){V=pe(V)}var I=pe(V);var U=[];if(v){U.push(N[T]<=0)}if(l){U.push(N[V]<=0,N[I]<=0)}if(U.every((function(e){return e}))){A=R;W=false;break}P.set(R,U)}if(W){var z=w?3:1;var _=function e(t){var r=k.find((function(e){var r=P.get(e);if(r){return r.slice(0,t).every((function(e){return e}))}}));if(r){A=r;return"break"}};for(var F=z;F>0;F--){var X=_(F);if(X==="break")break}}if(i.placement!==A){i.modifiersData[c]._skip=true;i.placement=A;i.reset=true}}var Be={name:"flip",enabled:true,phase:"main",fn:Ae,requiresIfExists:["offset"],data:{_skip:false}};function He(e,t,r){if(r===void 0){r={x:0,y:0}}return{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Re(e){return[t,n,r,a].some((function(t){return e[t]>=0}))}function Te(e){var t=e.state,r=e.name;var n=t.rects.reference;var a=t.rects.popper;var o=t.modifiersData.preventOverflow;var i=Me(t,{elementContext:"reference"});var f=Me(t,{altBoundary:true});var s=He(i,n);var c=He(f,a,o);var u=Re(s);var v=Re(c);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:v};t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":v})}var Se={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:Te};function Ce(e,r,o){var i=H(e);var f=[a,t].indexOf(i)>=0?-1:1;var s=typeof o==="function"?o(Object.assign({},r,{placement:e})):o,c=s[0],u=s[1];c=c||0;u=(u||0)*f;return[a,n].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}function qe(e){var t=e.state,r=e.options,n=e.name;var a=r.offset,o=a===void 0?[0,0]:a;var i=d.reduce((function(e,r){e[r]=Ce(r,t.rects,o);return e}),{});var f=i[t.placement],s=f.x,c=f.y;if(t.modifiersData.popperOffsets!=null){t.modifiersData.popperOffsets.x+=s;t.modifiersData.popperOffsets.y+=c}t.modifiersData[n]=i}var Ne={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:qe};function Ve(e){var t=e.state,r=e.name;t.modifiersData[r]=Le({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Ie={name:"popperOffsets",enabled:true,phase:"read",fn:Ve,data:{}};function Ue(e){return e==="x"?"y":"x"}function ze(e){var o=e.state,i=e.options,s=e.name;var c=i.mainAxis,u=c===void 0?true:c,v=i.altAxis,p=v===void 0?false:v,l=i.boundary,d=i.rootBoundary,m=i.altBoundary,h=i.padding,g=i.tether,y=g===void 0?true:g,b=i.tetherOffset,w=b===void 0?0:b;var x=Me(o,{boundary:l,rootBoundary:d,padding:h,altBoundary:m});var O=H(o.placement);var j=re(o.placement);var E=!j;var D=_(O);var k=Ue(D);var L=o.modifiersData.popperOffsets;var M=o.rects.reference;var P=o.rects.popper;var W=typeof w==="function"?w(Object.assign({},o.rects,{placement:o.placement})):w;var A={x:0,y:0};if(!L){return}if(u||p){var B=D==="y"?t:a;var R=D==="y"?r:n;var S=D==="y"?"height":"width";var C=L[D];var q=L[D]+x[B];var N=L[D]-x[R];var V=y?-P[S]/2:0;var I=j===f?M[S]:P[S];var U=j===f?-P[S]:-M[S];var Y=o.elements.arrow;var K=y&&Y?T(Y):{width:0,height:0};var Q=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:J();var Z=Q[B];var $=Q[R];var ee=G(0,M[S],K[S]);var te=E?M[S]/2-V-ee-Z-W:I-ee-Z-W;var ne=E?-M[S]/2+V+ee+$+W:U+ee+$+W;var ae=o.elements.arrow&&z(o.elements.arrow);var oe=ae?D==="y"?ae.clientTop||0:ae.clientLeft||0:0;var ie=o.modifiersData.offset?o.modifiersData.offset[o.placement][D]:0;var fe=L[D]+te-ie-oe;var se=L[D]+ne-ie;if(u){var ce=G(y?X(q,fe):q,C,y?F(N,se):N);L[D]=ce;A[D]=ce-C}if(p){var ue=D==="x"?t:a;var ve=D==="x"?r:n;var pe=L[k];var le=pe+x[ue];var de=pe-x[ve];var me=G(y?X(le,fe):le,pe,y?F(de,se):de);L[k]=me;A[k]=me-pe}}o.modifiersData[s]=A}var _e={name:"preventOverflow",enabled:true,phase:"main",fn:ze,requiresIfExists:["offset"]};function Fe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Xe(e){if(e===k(e)||!M(e)){return me(e)}else{return Fe(e)}}function Ye(e){var t=e.getBoundingClientRect();var r=t.width/e.offsetWidth||1;var n=t.height/e.offsetHeight||1;return r!==1||n!==1}function Ge(e,t,r){if(r===void 0){r=false}var n=M(t);M(t)&&Ye(t);var a=N(t);var o=R(e);var i={scrollLeft:0,scrollTop:0};var f={x:0,y:0};if(n||!n&&!r){if(D(t)!=="body"||be(a)){i=Xe(t)}if(M(t)){f=R(t);f.x+=t.clientLeft;f.y+=t.clientTop}else if(a){f.x=he(a)}}return{x:o.left+i.scrollLeft-f.x,y:o.top+i.scrollTop-f.y,width:o.width,height:o.height}}function Je(e){var t=new Map;var r=new Set;var n=[];e.forEach((function(e){t.set(e.name,e)}));function a(e){r.add(e.name);var o=[].concat(e.requires||[],e.requiresIfExists||[]);o.forEach((function(e){if(!r.has(e)){var n=t.get(e);if(n){a(n)}}}));n.push(e)}e.forEach((function(e){if(!r.has(e.name)){a(e)}}));return n}function Ke(e){var t=Je(e);return E.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}function Qe(e){var t;return function(){if(!t){t=new Promise((function(r){Promise.resolve().then((function(){t=undefined;r(e())}))}))}return t}}function Ze(e){var t=e.reduce((function(e,t){var r=e[t.name];e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t;return e}),{});return Object.keys(t).map((function(e){return t[e]}))}var $e={placement:"bottom",modifiers:[],strategy:"absolute"};function et(){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&&typeof e.getBoundingClientRect==="function")}))}function tt(e){if(e===void 0){e={}}var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,a=t.defaultOptions,o=a===void 0?$e:a;return function e(t,r,a){if(a===void 0){a=o}var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},$e,o),modifiersData:{},elements:{reference:t,popper:r},attributes:{},styles:{}};var f=[];var s=false;var c={state:i,setOptions:function e(a){var f=typeof a==="function"?a(i.options):a;v();i.options=Object.assign({},o,i.options,f);i.scrollParents={reference:L(t)?xe(t):t.contextElement?xe(t.contextElement):[],popper:xe(r)};var s=Ke(Ze([].concat(n,i.options.modifiers)));i.orderedModifiers=s.filter((function(e){return e.enabled}));u();return c.update()},forceUpdate:function e(){if(s){return}var t=i.elements,r=t.reference,n=t.popper;if(!et(r,n)){return}i.rects={reference:Ge(r,z(n),i.options.strategy==="fixed"),popper:T(n)};i.reset=false;i.placement=i.options.placement;i.orderedModifiers.forEach((function(e){return i.modifiersData[e.name]=Object.assign({},e.data)}));for(var a=0;a<i.orderedModifiers.length;a++){if(i.reset===true){i.reset=false;a=-1;continue}var o=i.orderedModifiers[a],f=o.fn,u=o.options,v=u===void 0?{}:u,p=o.name;if(typeof f==="function"){i=f({state:i,options:v,name:p,instance:c})||i}}},update:Qe((function(){return new Promise((function(e){c.forceUpdate();e(i)}))})),destroy:function e(){v();s=true}};if(!et(t,r)){return c}c.setOptions(a).then((function(e){if(!s&&a.onFirstUpdate){a.onFirstUpdate(e)}}));function u(){i.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=r===void 0?{}:r,a=e.effect;if(typeof a==="function"){var o=a({state:i,name:t,instance:c,options:n});var s=function e(){};f.push(o||s)}}))}function v(){f.forEach((function(e){return e()}));f=[]}return c}}var rt=[ue,Ie,fe,B,Ne,Be,_e,te,Se];var nt=e("c",tt({defaultModifiers:rt}))}}}));