@ussebastian/kitdigital
Version:
Kit Digital de la Universidad San Sebastián
3 lines (2 loc) • 20.6 kB
JavaScript
System.register([],(function(e){"use strict";return{execute:function(){function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function u(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,u=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,u=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var p=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&p?p.offsetLeft:0))/f,m=(a.top+(l&&p?p.offsetTop:0))/u,h=a.width/f,v=a.height/u;return{width:h,height:v,top:m,right:d+h,bottom:m+v,left:d,x:d,y:m}}function p(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function m(e){return u(d(e)).left+p(e).scrollLeft}function h(e){return t(e).getComputedStyle(e)}function v(e){var t=h(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),h=d(n),y=u(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(h))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:p(i)),r(n)?((b=u(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):h&&(b.x=m(h))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=u(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 b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function w(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:w(b(e))}function x(e,n){var r;void 0===n&&(n=[]);var o=w(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(x(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function E(e){return r(e)&&"fixed"!==h(e).position?e.offsetParent:null}function j(e){for(var n=t(e),i=E(e);i&&O(i)&&"static"===h(i).position;)i=E(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===h(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===h(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=h(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var A="top",D="bottom",L="right",k="left",M="auto",W=[A,D,L,k],P="start",B="end",H="clippingParents",R="viewport",S="popper",T="reference",q=W.reduce((function(e,t){return e.concat([t+"-"+P,t+"-"+B])}),[]),V=[].concat(W,[M]).reduce((function(e,t){return e.concat([t,t+"-"+P,t+"-"+B])}),[]),C=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function N(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function I(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function F(e,r,o){return r===R?I(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,u=0;if(i){a=i.width,s=i.height;var p=c();(p||!p&&"fixed"===n)&&(f=i.offsetLeft,u=i.offsetTop)}return{width:a,height:s,x:f+m(e),y:u}}(e,o)):n(r)?function(e,t){var n=u(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):I(function(e){var t,n=d(e),r=p(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+m(e),c=-r.scrollTop;return"rtl"===h(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function U(e,t,o,s){var f="clippingParents"===t?function(e){var t=x(b(e)),o=["absolute","fixed"].indexOf(h(e).position)>=0&&r(e)?j(e):e;return n(o)?t.filter((function(e){return n(e)&&N(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),u=c[0],p=c.reduce((function(t,n){var r=F(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),F(e,u,s));return p.width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p}function z(e){return e.split("-")[0]}function X(e){return e.split("-")[1]}function Y(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function $(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?z(o):null,a=o?X(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case A:t={x:s,y:n.y-r.height};break;case D:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case k:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?Y(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case P:t[c]=t[c]-(n[u]/2-r[u]/2);break;case B:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function G(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function J(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function K(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?H:f,p=r.rootBoundary,l=void 0===p?R:p,m=r.elementContext,h=void 0===m?S:m,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,w=G("number"!=typeof b?b:J(b,W)),x=h===S?T:S,O=e.rects.popper,E=e.elements[y?x:h],j=U(n(E)?E:E.contextElement||d(e.elements.popper),c,l,s),k=u(e.elements.reference),M=$({reference:k,element:O,strategy:"absolute",placement:i}),P=I(Object.assign({},O,M)),B=h===S?P:k,q={top:j.top-B.top+w.top,bottom:B.bottom-j.bottom+w.bottom,left:j.left-B.left+w.left,right:B.right-j.right+w.right},V=e.modifiersData.offset;if(h===S&&V){var C=V[i];Object.keys(q).forEach((function(e){var t=[L,D].indexOf(e)>=0?1:-1,n=[A,D].indexOf(e)>=0?"y":"x";q[e]+=C[n]*t}))}return q}var Q={placement:"bottom",modifiers:[],strategy:"absolute"};function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ee(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,a=void 0===i?Q:i;return function(e,t,r){void 0===r&&(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},Q,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,p={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParents={reference:n(e)?x(e):e.contextElement?x(e.contextElement):[],popper:x(t)};var s,u,d=function(e){var t=_(e);return C.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,f.options.modifiers),u=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(u).map((function(e){return u[e]}))));return f.orderedModifiers=d.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:f,name:t,instance:p,options:r}),a=function(){};c.push(i||a)}})),p.update()},forceUpdate:function(){if(!u){var e=f.elements,t=e.reference,n=e.popper;if(Z(t,n)){f.rects={reference:y(t,j(n),"fixed"===f.options.strategy),popper:g(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,c=o.name;"function"==typeof i&&(f=i({state:f,options:s,name:c,instance:p})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){p.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){l(),u=!0}};if(!Z(e,t))return p;function l(){c.forEach((function(e){return e()})),c=[]}return p.setOptions(r).then((function(e){!u&&r.onFirstUpdate&&r.onFirstUpdate(e)})),p}}var te={passive:!0};var ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,c=e.position,u=e.gpuAcceleration,p=e.adaptive,l=e.roundOffsets,m=e.isFixed,v=f.x,y=void 0===v?0:v,g=f.y,b=void 0===g?0:g,w="function"==typeof l?l({x:y,y:b}):{x:y,y:b};y=w.x,b=w.y;var x=f.hasOwnProperty("x"),O=f.hasOwnProperty("y"),E=k,M=A,W=window;if(p){var P=j(r),H="clientHeight",R="clientWidth";if(P===t(r)&&"static"!==h(P=d(r)).position&&"absolute"===c&&(H="scrollHeight",R="scrollWidth"),i===A||(i===k||i===L)&&a===B)M=D,b-=(m&&P===W&&W.visualViewport?W.visualViewport.height:P[H])-o.height,b*=u?1:-1;if(i===k||(i===A||i===D)&&a===B)E=L,y-=(m&&P===W&&W.visualViewport?W.visualViewport.width:P[R])-o.width,y*=u?1:-1}var S,T=Object.assign({position:c},p&&ne),q=!0===l?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:s(n*o)/o||0,y:s(r*o)/o||0}}({x:y,y:b},t(r)):{x:y,y:b};return y=q.x,b=q.y,u?Object.assign({},T,((S={})[M]=O?"0":"",S[E]=x?"0":"",S.transform=(W.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",S)):Object.assign({},T,((n={})[M]=O?b+"px":"",n[E]=x?y+"px":"",n.transform="",n))}var oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=V.reduce((function(e,n){return e[n]=function(e,t,n){var r=z(e),o=[k,A].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[k,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},ie={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?V:f,u=X(r),p=u?s?q:q.filter((function(e){return X(e)===u})):W,l=p.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=p);var d=l.reduce((function(t,n){return t[n]=K(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[z(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var ue={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,u=n.boundary,p=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,m=void 0===d||d,h=n.allowedAutoPlacements,v=t.options.placement,y=z(v),g=f||(y===v||!m?[ae(v)]:function(e){if(z(e)===M)return[];var t=ae(e);return[fe(e),t,fe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(z(n)===M?ce(t,{placement:n,boundary:u,rootBoundary:p,padding:c,flipVariations:m,allowedAutoPlacements:h}):n)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,E=!0,j=b[0],W=0;W<b.length;W++){var B=b[W],H=z(B),R=X(B)===P,S=[A,D].indexOf(H)>=0,T=S?"width":"height",q=K(t,{placement:B,boundary:u,rootBoundary:p,altBoundary:l,padding:c}),V=S?R?L:k:R?D:A;w[T]>x[T]&&(V=ae(V));var C=ae(V),_=[];if(i&&_.push(q[H]<=0),s&&_.push(q[V]<=0,q[C]<=0),_.every((function(e){return e}))){j=B,E=!1;break}O.set(B,_)}if(E)for(var N=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},I=m?3:1;I>0;I--){if("break"===N(I))break}t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function pe(e,t,n){return i(e,a(t,n))}var le={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,u=n.boundary,p=n.rootBoundary,l=n.altBoundary,d=n.padding,m=n.tether,h=void 0===m||m,v=n.tetherOffset,y=void 0===v?0:v,b=K(t,{boundary:u,rootBoundary:p,padding:d,altBoundary:l}),w=z(t.placement),x=X(t.placement),O=!x,E=Y(w),M="x"===E?"y":"x",W=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,R="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,S="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(W){if(s){var V,C="y"===E?A:k,_="y"===E?D:L,N="y"===E?"height":"width",I=W[E],F=I+b[C],U=I-b[_],$=h?-H[N]/2:0,G=x===P?B[N]:H[N],J=x===P?-H[N]:-B[N],Q=t.elements.arrow,Z=h&&Q?g(Q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[C],ne=ee[_],re=pe(0,B[N],Z[N]),oe=O?B[N]/2-$-re-te-S.mainAxis:G-re-te-S.mainAxis,ie=O?-B[N]/2+$+re+ne+S.mainAxis:J+re+ne+S.mainAxis,ae=t.elements.arrow&&j(t.elements.arrow),se=ae?"y"===E?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(V=null==T?void 0:T[E])?V:0,ce=I+ie-fe,ue=pe(h?a(F,I+oe-fe-se):F,I,h?i(U,ce):U);W[E]=ue,q[E]=ue-I}if(c){var le,de="x"===E?A:k,me="x"===E?D:L,he=W[M],ve="y"===M?"height":"width",ye=he+b[de],ge=he-b[me],be=-1!==[A,k].indexOf(w),we=null!=(le=null==T?void 0:T[M])?le:0,xe=be?ye:he-B[ve]-H[ve]-we+S.altAxis,Oe=be?he+B[ve]+H[ve]-we-S.altAxis:ge,Ee=h&&be?function(e,t,n){var r=pe(e,t,n);return r>n?n:r}(xe,he,Oe):pe(h?xe:ye,he,h?Oe:ge);W[M]=Ee,q[M]=Ee-he}t.modifiersData[r]=q}},requiresIfExists:["offset"]};var de={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=z(n.placement),f=Y(s),c=[k,L].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return G("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:J(e,W))}(o.padding,n),p=g(i),l="y"===f?A:k,d="y"===f?D:L,m=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],h=a[f]-n.rects.reference[f],v=j(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=m/2-h/2,w=u[l],x=y-p[c]-u[d],O=y/2-p[c]/2+b,E=pe(w,O,x),M=f;n.modifiersData[r]=((t={})[M]=E,t.centerOffset=E-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&N(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function me(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function he(e){return[A,L,D,k].some((function(t){return e[t]>=0}))}var ve=ee({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),u=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&u.forEach((function(e){e.addEventListener("scroll",r.update,te)})),f&&c.addEventListener("resize",r.update,te),function(){a&&u.forEach((function(e){e.removeEventListener("scroll",r.update,te)})),f&&c.removeEventListener("resize",r.update,te)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=$({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,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:z(t.placement),variation:X(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};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:a,roundOffsets:f})))),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:f})))),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 n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&l(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.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 o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&l(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]},oe,ue,le,de,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=K(t,{elementContext:"reference"}),s=K(t,{altBoundary:!0}),f=me(a,r),c=me(s,o,i),u=he(f),p=he(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}}]});e("default",class{constructor(e){this.mainMenu=e,this.boundary=document.querySelector(".uss-mainnav__wrap")}init(){const e=this.mainMenu.querySelectorAll(".uss-mainnav__item-link[data-subitem-ref]"),{boundary:t}=this;t&&!t.dataset.init&&(t.dataset.init=!0,e.forEach((e=>{const n=e,r=n.dataset.subitemRef,o=this.mainMenu.querySelector(`.uss-mainnav__subitems-wrapper[data-subitem-target="${r}"]`);let i=null;const a=()=>{o.setAttribute("data-show","true"),n.classList.add("active"),i=ve(n,o,{placement:"bottom",modifiers:[{name:"preventOverflow",options:{boundary:t}},{name:"flip",enabled:!1},{name:"offset",options:{offset:[0,15]}}]})},s=()=>{o.removeAttribute("data-show"),n.classList.remove("active"),i&&(i.destroy(),i=null)};o.addEventListener("focusout",(e=>{o.contains(e.relatedTarget)||s()})),document.addEventListener("keydown",(e=>{"Escape"===e.key&&s()})),document.addEventListener("click",(e=>{o.contains(e.target)||n.contains(e.target)||s()})),n.addEventListener("click",(e=>{e.preventDefault(),o.getAttribute("data-show")?s():a()}))})))}})}}}));
//# sourceMappingURL=ComponentMainNav.js.map