mirror of
https://github.com/weyne85/chaturbate-dvr.git
synced 2025-10-29 16:58:56 +00:00
1 line
34 KiB
JavaScript
1 line
34 KiB
JavaScript
window.tocas={config:{strict_responsive:!1,attributes:{tab:"data-tab",tab_name:"data-name",toggle:"data-toggle",toggle_name:"data-name",input:"data-input",dropdown:"data-dropdown",dropdown_name:"data-name",dropdown_position:"data-position",tooltip:"data-tooltip",tooltip_position:"data-position",tooltip_delay:"data-delay",tooltip_html:"data-html",tooltip_trigger:"data-trigger",fileplace:"data-fileplace",fileplace_name:"data-name"},scopes:{tab:"@scope",toggle:"@scope",tab:"@scope",fileplace:"@scope",dropdown:"@scope",container:"@container"},classes:{hidden:"has-hidden",tab_active:"is-active",tooltip_visible:"is-visible",tab:"ts-tab"}}},window.tocas_modules=[],function(){var k=Math.round,q=Math.max,z=Math.min;!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):b((a="undefined"==typeof globalThis?a||self:globalThis).TocasFloatingUICore={})}(this,function(j){"use strict";function D(a){return a.split("-")[1]}function e(a){return"y"===a?"height":"width"}function F(a){return a.split("-")[0]}function G(a){return["top","bottom"].includes(F(a))?"x":"y"}function k(b,h,i){let{reference:a,floating:j}=b;const k=a.x+a.width/2-j.width/2,f=a.y+a.height/2-j.height/2,c=G(h),l=e(c),m=a[l]/2-j[l]/2,d="x"===c;let g;switch(F(h)){case"top":g={x:k,y:a.y-j.height};break;case"bottom":g={x:k,y:a.y+a.height};break;case"right":g={x:a.x+a.width,y:f};break;case"left":g={x:a.x-j.width,y:f};break;default:g={x:a.x,y:a.y}}switch(D(h)){case"start":g[c]-=m*(i&&d?-1:1);break;case"end":g[c]+=m*(i&&d?-1:1)}return g}function I(a){return"number"==typeof a?{top:a,right:a,bottom:a,left:a}:function(a){return{top:0,right:0,bottom:0,left:0,...a}}(a)}function a(a){return{...a,top:a.y,left:a.x,right:a.x+a.width,bottom:a.y+a.height}}async function H(j,k){var l;void 0===k&&(k={});const{x:q,y:i,platform:o,rects:r,elements:s,strategy:f}=j,{boundary:c="clippingAncestors",rootBoundary:t="viewport",elementContext:m="floating",altBoundary:d=!1,padding:g=0}=k,p=I(g),h=s[d?"floating"===m?"reference":"floating":m],u=a(await o.getClippingRect({element:null==(l=await(null==o.isElement?void 0:o.isElement(h)))||l?h:h.contextElement||(await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating))),boundary:c,rootBoundary:t,strategy:f})),x="floating"===m?{...r.floating,x:q,y:i}:r.reference,w=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=(await(null==o.isElement?void 0:o.isElement(w)))&&(await(null==o.getScale?void 0:o.getScale(w)))||{x:1,y:1},b=a(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:x,offsetParent:w,strategy:f}):x);return{top:(u.top-b.top+p.top)/v.y,bottom:(b.bottom-u.bottom+p.bottom)/v.y,left:(u.left-b.left+p.left)/v.x,right:(b.right-u.right+p.right)/v.x}}function n(a,c,d){return b(a,B(c,d))}function J(a){return a.replace(/left|right|bottom|top/g,a=>d[a])}function i(b,c,d){void 0===d&&(d=!1);const g=D(b),a=G(b),h=e(a);let i="x"===a?g===(d?"end":"start")?"right":"left":"start"===g?"bottom":"top";return c.reference[h]>c.floating[h]&&(i=J(i)),{main:i,cross:J(i)}}function h(a){return a.replace(/start|end/g,a=>f[a])}function l(a,b){return{top:a.top-b.height,right:a.right-b.width,bottom:a.bottom-b.height,left:a.left-b.width}}function p(a){return c.some(b=>0<=a[b])}function o(a){return"x"===a?"y":"x"}const B=z,b=q,c=["top","right","bottom","left"],s=c.reduce((a,b)=>a.concat(b,b+"-start",b+"-end"),[]),d={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};j.arrow=a=>({name:"arrow",options:a,async fn(j){const{element:i,padding:o=0}=a||{},{x:l,y:q,placement:f,rects:c,platform:m,elements:d}=j;if(null==i)return{};const g=I(o),p={x:l,y:q},h=G(f),r=e(h),s=await m.getDimensions(i),t="y"===h,u=t?"top":"left",b=t?"bottom":"right",v=t?"clientHeight":"clientWidth",w=c.reference[r]+c.reference[h]-p[h]-c.floating[r],x=p[h]-c.reference[h],y=await(null==m.getOffsetParent?void 0:m.getOffsetParent(i));let z=y?y[v]:0;z&&(await(null==m.isElement?void 0:m.isElement(y)))||(z=d.floating[v]||c.floating[r]);const A=g[u],F=z-s[r]-g[b],k=z/2-s[r]/2+(w/2-x/2),C=n(A,k,F),B=null!=D(f)&&k!=C&&0>c.reference[r]/2-(k<A?g[u]:g[b])-s[r]/2;return{[h]:p[h]-(B?k<A?A-k:F-k:0),data:{[h]:C,centerOffset:k-C}}}}),j.autoPlacement=function(d){return void 0===d&&(d={}),{name:"autoPlacement",options:d,async fn(e){var j,n,q;const{rects:t,middlewareData:l,placement:f,platform:c,elements:u}=e,{crossAxis:v=!1,alignment:m,allowedPlacements:g=s,autoAlignment:x=!0,...p}=d,w=void 0!==m||g===s?function(a,b,c){return(a?[...c.filter(b=>D(b)===a),...c.filter(b=>D(b)!==a)]:c.filter(a=>F(a)===a)).filter(c=>!a||D(c)===a||!!b&&h(c)!==c)}(m||null,x,g):g,b=await H(e,p),y=(null==(j=l.autoPlacement)?void 0:j.index)||0,z=w[y];if(null==z)return{};const{main:A,cross:B}=i(z,t,await(null==c.isRTL?void 0:c.isRTL(u.floating)));if(f!==z)return{reset:{placement:w[0]}};const G=[b[F(z)],b[A],b[B]],E=[...((null==(n=l.autoPlacement)?void 0:n.overflows)||[]),{placement:z,overflows:G}],I=w[y+1];if(I)return{data:{index:y+1,overflows:E},reset:{placement:I}};const J=E.map(a=>{const b=D(a.placement);return[a.placement,b&&v?a.overflows.slice(0,2).reduce((a,b)=>a+b,0):a.overflows[0],a.overflows]}).sort((a,b)=>a[1]-b[1]),k=(null==(q=J.filter(a=>a[2].slice(0,D(a[0])?2:3).every(a=>0>=a))[0])?void 0:q[0])||J[0][0];return k===f?{}:{data:{index:y+1,overflows:E},reset:{placement:k}}}}},j.computePosition=async(b,j,e)=>{const{placement:l="bottom",strategy:i="absolute",middleware:h=[],platform:q}=e,o=h.filter(Boolean),r=await(null==q.isRTL?void 0:q.isRTL(j));let f=await q.getElementRects({reference:b,floating:j,strategy:i}),{x:s,y:t}=k(f,l,r),z=l,A={},B=0;for(let c=0;c<o.length;c++){const{name:d,fn:a}=o[c],{x:e,y:g,data:h,reset:m}=await a({x:s,y:t,initialPlacement:l,placement:z,strategy:i,middlewareData:A,rects:f,platform:q,elements:{reference:b,floating:j}});s=null==e?s:e,t=null==g?t:g,A={...A,[d]:{...A[d],...h}},m&&50>=B&&(B++,"object"==typeof m&&(m.placement&&(z=m.placement),m.rects&&(f=!0===m.rects?await q.getElementRects({reference:b,floating:j,strategy:i}):m.rects),({x:s,y:t}=k(f,z,r))),c=-1)}return{x:s,y:t,placement:z,strategy:i,middlewareData:A}},j.detectOverflow=H,j.flip=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(j){var n;const{placement:p,middlewareData:q,rects:a,initialPlacement:l,platform:f,elements:c}=j,{mainAxis:b=!0,crossAxis:m=!0,fallbackPlacements:r,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:s="none",flipAlignment:t=!0,...g}=e,u=F(p),v=F(l)===l,w=await(null==f.isRTL?void 0:f.isRTL(c.floating)),x=r||(v||!t?[J(l)]:function(a){const b=J(a);return[h(a),b,h(b)]}(l));r||"none"===s||x.push(...function(b,c,d,e){const f=D(b);let a=function(a,b,c){const d=["left","right"],e=["right","left"];return"top"===a||"bottom"===a?c?b?e:d:b?d:e:"left"===a||"right"===a?b?["top","bottom"]:["bottom","top"]:[]}(F(b),"start"===d,e);return f&&(a=a.map(a=>a+"-"+f),c&&(a=a.concat(a.map(h)))),a}(l,t,s,w));const y=[l,...x],z=await H(j,g),A=[];let E=(null==(n=q.flip)?void 0:n.overflows)||[];if(b&&A.push(z[u]),m){const{main:b,cross:c}=i(p,a,w);A.push(z[b],z[c])}if(E=[...E,{placement:p,overflows:A}],!A.every(a=>0>=a)){var G,I;const a=((null==(G=q.flip)?void 0:G.index)||0)+1,b=y[a];if(b)return{data:{index:a,overflows:E},reset:{placement:b}};let c=null==(I=E.filter(a=>0>=a.overflows[0]).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])?void 0:I.placement;if(!c)switch(d){case"bestFit":{var K;const a=null==(K=E.map(a=>[a.placement,a.overflows.filter(a=>0<a).reduce((a,b)=>a+b,0)]).sort((a,b)=>a[1]-b[1])[0])?void 0:K[0];a&&(c=a);break}case"initialPlacement":c=l}if(p!==c)return{reset:{placement:c}}}return{}}}},j.hide=function(a){return void 0===a&&(a={}),{name:"hide",options:a,async fn(b){const{strategy:d="referenceHidden",...c}=a,{rects:e}=b;switch(d){case"referenceHidden":{const a=l(await H(b,{...c,elementContext:"reference"}),e.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:p(a)}}}case"escaped":{const a=l(await H(b,{...c,altBoundary:!0}),e.floating);return{data:{escapedOffsets:a,escaped:p(a)}}}default:return{}}}}},j.inline=function(c){return void 0===c&&(c={}),{name:"inline",options:c,async fn(f){const{placement:i,elements:e,rects:j,platform:k,strategy:l}=f,{padding:n=2,x:m,y:g}=c,d=a(k.convertOffsetParentRelativeRectToViewportRelativeRect?await k.convertOffsetParentRelativeRectToViewportRelativeRect({rect:j.reference,offsetParent:await(null==k.getOffsetParent?void 0:k.getOffsetParent(e.floating)),strategy:l}):j.reference),h=(await(null==k.getClientRects?void 0:k.getClientRects(e.reference)))||[],o=I(n),p=await k.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=m&&null!=g)return h.find(a=>m>a.left-o.left&&m<a.right+o.right&&g>a.top-o.top&&g<a.bottom+o.bottom)||d;if(2<=h.length){if("x"===G(i)){const b=h[0],c=h[h.length-1],d="top"===F(i),e=b.top,f=c.bottom,a=d?b.left:c.left,g=d?b.right:c.right;return{top:e,bottom:f,left:a,right:g,width:g-a,height:f-e,x:a,y:e}}const c="left"===F(i),d=b(...h.map(a=>a.right)),e=B(...h.map(a=>a.left)),f=h.filter(a=>c?a.left===e:a.right===d),a=f[0].top,g=f[f.length-1].bottom;return{top:a,bottom:g,left:e,right:d,width:d-e,height:g-a,x:e,y:a}}return d}},floating:e.floating,strategy:l});return j.reference.x!==p.reference.x||j.reference.y!==p.reference.y||j.reference.width!==p.reference.width||j.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}},j.limitShift=function(b){return void 0===b&&(b={}),{options:b,fn(i){const{x:e,y:j,placement:k,rects:a,middlewareData:l}=i,{offset:n=0,mainAxis:f=!0,crossAxis:c=!0}=b,q={x:e,y:j},m=G(k),d=o(m);let g=q[m],r=q[d];const s="function"==typeof n?n(i):n,u="number"==typeof s?{mainAxis:s,crossAxis:0}:{mainAxis:0,crossAxis:0,...s};if(f){const b="y"===m?"height":"width",c=a.reference[m]-a.floating[b]+u.mainAxis,d=a.reference[m]+a.reference[b]-u.mainAxis;g<c?g=c:g>d&&(g=d)}if(c){var x,y;const b="y"===m?"width":"height",c=["top","left"].includes(F(k)),e=a.reference[d]-a.floating[b]+(c&&(null==(x=l.offset)?void 0:x[d])||0)+(c?0:u.crossAxis),f=a.reference[d]+a.reference[b]+(c?0:(null==(y=l.offset)?void 0:y[d])||0)-(c?u.crossAxis:0);r<e?r=e:r>f&&(r=f)}return{[m]:g,[d]:r}}}},j.offset=function(b){return void 0===b&&(b=0),{name:"offset",options:b,async fn(c){const{x:d,y:e}=c,a=await async function(b,e){const{placement:i,platform:j,elements:a}=b,k=await(null==j.isRTL?void 0:j.isRTL(a.floating)),l=F(i),f=D(i),c="x"===G(i),n=["left","top"].includes(l)?-1:1,m=k&&c?-1:1,d="function"==typeof e?e(b):e;let{mainAxis:g,crossAxis:o,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof p&&(o="end"===f?-1*p:p),c?{x:o*m,y:g*n}:{x:g*n,y:o*m}}(c,b);return{x:d+a.x,y:e+a.y,data:a}}}},j.rectToClientRect=a,j.shift=function(b){return void 0===b&&(b={}),{name:"shift",options:b,async fn(i){const{x:e,y:j,placement:k}=i,{mainAxis:m=!0,crossAxis:l=!1,limiter:f={fn:a=>{let{x:b,y:c}=a;return{x:b,y:c}}},...a}=b,c={x:e,y:j},d=await H(i,a),g=G(F(k)),p=o(g);let h=c[g],q=c[p];if(m){const a="y"===g?"bottom":"right";h=n(h+d["y"===g?"top":"left"],h,h-d[a])}if(l){const a="y"===p?"bottom":"right";q=n(q+d["y"===p?"top":"left"],q,q-d[a])}const r=f.fn({...i,[g]:h,[p]:q});return{...r,data:{x:r.x-e,y:r.y-j}}}}},j.size=function(c){return void 0===c&&(c={}),{name:"size",options:c,async fn(e){const{placement:f,rects:i,platform:a,elements:j}=e,{apply:d=()=>{},...k}=c,l=await H(e,k),g=F(f),m=D(f),h="x"===G(f),{width:o,height:p}=i.floating;let n,q;"top"===g||"bottom"===g?(n=g,q=m===((await(null==a.isRTL?void 0:a.isRTL(j.floating)))?"start":"end")?"left":"right"):(q=g,n="end"===m?"top":"bottom");const r=p-l[n],s=o-l[q];let u=r,w=s;if(h?w=B(o-l.right-l.left,s):u=B(p-l.bottom-l.top,r),!e.middlewareData.shift&&!m){const a=b(l.left,0),c=b(l.right,0),d=b(l.top,0),e=b(l.bottom,0);h?w=o-2*(0!==a||0!==c?a+c:b(l.left,l.right)):u=p-2*(0!==d||0!==e?d+e:b(l.top,l.bottom))}await d({...e,availableWidth:w,availableHeight:u});const t=await a.getDimensions(j.floating);return o!==t.width||p!==t.height?{reset:{rects:!0}}:{}}}},Object.defineProperty(j,"__esModule",{value:!0})}),!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("@floating-ui/core")):"function"==typeof define&&define.amd?define(["exports","@floating-ui/core"],b):b((a="undefined"==typeof globalThis?a||self:globalThis).TocasFloatingUIDOM={},a.TocasFloatingUICore)}(this,function(B,G){"use strict";function H(a){var b;return(null==(b=a.ownerDocument)?void 0:b.defaultView)||window}function I(a){return H(a).getComputedStyle(a)}function J(a){const b=I(a);let d=parseFloat(b.width),e=parseFloat(b.height);const g=a.offsetWidth,h=a.offsetHeight,c=Q(d)!==g||Q(e)!==h;return c&&(d=g,e=h),{width:d,height:e,fallback:c}}function K(b){return a(b)?(b.nodeName||"").toLowerCase():""}function c(){if(e)return e;const a=navigator.userAgentData;return a&&Array.isArray(a.brands)?(e=a.brands.map(a=>a.brand+"/"+a.version).join(" "),e):navigator.userAgent}function u(a){return a instanceof H(a).HTMLElement}function M(a){return a instanceof H(a).Element}function a(a){return a instanceof H(a).Node}function d(a){return"undefined"!=typeof ShadowRoot&&(a instanceof H(a).ShadowRoot||a instanceof ShadowRoot)}function f(a){const{overflow:b,overflowX:c,overflowY:d,display:e}=I(a);return /auto|scroll|overlay|hidden|clip/.test(b+d+c)&&!["inline","contents"].includes(e)}function g(a){return["table","td","th"].includes(K(a))}function h(a){const b=/firefox/i.test(c()),d=I(a),e=d.backdropFilter||d.WebkitBackdropFilter;return"none"!==d.transform||"none"!==d.perspective||!!e&&"none"!==e||b&&"filter"===d.willChange||b&&!!d.filter&&"none"!==d.filter||["transform","perspective"].some(a=>d.willChange.includes(a))||["paint","layout","strict","content"].some(a=>{const b=d.contain;return null!=b&&b.includes(a)})}function n(){return /^((?!chrome|android).)*safari/i.test(c())}function m(a){return["html","body","#document"].includes(K(a))}function w(a){return M(a)?a:a.contextElement}function b(a){var b=Number.isFinite;const c=w(a);if(!u(c))return R;const d=c.getBoundingClientRect(),{width:e,height:g,fallback:h}=J(c);let i=(h?Q(d.width):d.width)/e,j=(h?Q(d.height):d.height)/g;return i&&b(i)||(i=1),j&&b(j)||(j=1),{x:i,y:j}}function p(d,e,j,k){var q,r;void 0===e&&(e=!1),void 0===j&&(j=!1);const t=d.getBoundingClientRect(),f=w(d);let s=R;e&&(k?M(k)&&(s=b(k)):s=b(d));const v=f?H(f):window,a=n()&&j;let h=(t.left+(a&&(null==(q=v.visualViewport)?void 0:q.offsetLeft)||0))/s.x,x=(t.top+(a&&(null==(r=v.visualViewport)?void 0:r.offsetTop)||0))/s.y,z=t.width/s.x,A=t.height/s.y;if(f){const a=H(f),c=k&&M(k)?H(k):k;for(let d=a.frameElement;d&&k&&c!==a;){const a=b(d),c=d.getBoundingClientRect(),e=getComputedStyle(d);c.x+=(d.clientLeft+parseFloat(e.paddingLeft))*a.x,c.y+=(d.clientTop+parseFloat(e.paddingTop))*a.y,h*=a.x,x*=a.y,z*=a.x,A*=a.y,h+=c.x,x+=c.y,d=H(d).frameElement}}return G.rectToClientRect({width:z,height:A,x:h,y:x})}function x(b){return((a(b)?b.ownerDocument:b.document)||window.document).documentElement}function y(a){return M(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.pageXOffset,scrollTop:a.pageYOffset}}function L(a){return p(x(a)).left+y(a).scrollLeft}function o(a){if("html"===K(a))return a;const b=a.assignedSlot||a.parentNode||d(a)&&a.host||x(a);return d(b)?b.host:b}function E(a){const b=o(a);return m(b)?b.ownerDocument.body:u(b)&&f(b)?b:E(b)}function C(a,b){var c;void 0===b&&(b=[]);const d=E(a),g=d===(null==(c=a.ownerDocument)?void 0:c.body),h=H(d);return g?b.concat(h,h.visualViewport||[],f(d)?d:[]):b.concat(d,C(d))}function j(a,d,e){let g;if("viewport"===d)g=function(a,b){const d=H(a),e=x(a),g=d.visualViewport;let h=e.clientWidth,i=e.clientHeight,j=0,k=0;if(g){h=g.width,i=g.height;const a=n();(!a||a&&"fixed"===b)&&(j=g.offsetLeft,k=g.offsetTop)}return{width:h,height:i,x:j,y:k}}(a,e);else if("document"===d)g=function(a){const b=x(a),d=y(a),e=a.ownerDocument.body,g=P(b.scrollWidth,b.clientWidth,e.scrollWidth,e.clientWidth),h=P(b.scrollHeight,b.clientHeight,e.scrollHeight,e.clientHeight);let c=-d.scrollLeft+L(a);const i=-d.scrollTop;return"rtl"===I(e).direction&&(c+=P(b.clientWidth,e.clientWidth)-g),{width:g,height:h,x:c,y:i}}(x(a));else if(M(d))g=function(a,c){const d=p(a,!0,"fixed"===c),e=d.top+a.clientTop,f=d.left+a.clientLeft,g=u(a)?b(a):{x:1,y:1};return{width:a.clientWidth*g.x,height:a.clientHeight*g.y,x:f*g.x,y:e*g.y}}(d,e);else{const b={...d};if(n()){var h,i;const c=H(a);b.x-=(null==(h=c.visualViewport)?void 0:h.offsetLeft)||0,b.y-=(null==(i=c.visualViewport)?void 0:i.offsetTop)||0}g=b}return G.rectToClientRect(g)}function F(a,b){return u(a)&&"fixed"!==I(a).position?b?b(a):a.offsetParent:null}function D(a,b){const c=H(a);let d=F(a,b);for(;d&&g(d)&&"static"===I(d).position;)d=F(d,b);return d&&("html"===K(d)||"body"===K(d)&&"static"===I(d).position&&!h(d))?c:d||function(a){for(let b=o(a);u(b)&&!m(b);){if(h(b))return b;b=o(b)}return null}(a)||c}function N(a,b,d){const e=u(b),g=x(b),h=p(a,!0,"fixed"===d,b);let i={scrollLeft:0,scrollTop:0};const j={x:0,y:0};if(e||!e&&"fixed"!==d)if(("body"!==K(b)||f(g))&&(i=y(b)),u(b)){const a=p(b,!0);j.x=a.x+b.clientLeft,j.y=a.y+b.clientTop}else g&&(j.x=L(g));return{x:h.left+i.scrollLeft-j.x,y:h.top+i.scrollTop-j.y,width:h.width,height:h.height}}const O=z,P=q,Q=k;let e;const R={x:1,y:1},v={getClippingRect:function(b){let{element:d,boundary:e,rootBoundary:f,strategy:g}=b;const c="clippingAncestors"===e?function(a,b){const c=b.get(a);if(c)return c;let d=C(a).filter(a=>M(a)&&"body"!==K(a)),f=null;const g="fixed"===I(a).position;for(let i=g?o(a):a;M(i)&&!m(i);){const a=I(i),b=h(i);"fixed"===a.position?f=null:(g?b||f:b||"static"!==a.position||!f||!["absolute","fixed"].includes(f.position))?f=a:d=d.filter(a=>a!==i),i=o(i)}return b.set(a,d),d}(d,this._c):[].concat(e),i=[...c,f],k=i[0],a=i.reduce((a,b)=>{const c=j(d,b,g);return a.top=P(c.top,a.top),a.right=O(c.right,a.right),a.bottom=O(c.bottom,a.bottom),a.left=P(c.left,a.left),a},j(d,k,g));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(a){let{rect:d,offsetParent:e,strategy:g}=a;const h=u(e),i=x(e);if(e===i)return d;let j={scrollLeft:0,scrollTop:0},k={x:1,y:1};const m={x:0,y:0};if((h||!h&&"fixed"!==g)&&(("body"!==K(e)||f(i))&&(j=y(e)),u(e))){const a=p(e);k=b(e),m.x=a.x+e.clientLeft,m.y=a.y+e.clientTop}return{width:d.width*k.x,height:d.height*k.y,x:d.x*k.x-j.scrollLeft*k.x+m.x,y:d.y*k.y-j.scrollTop*k.y+m.y}},isElement:M,getDimensions:function(a){return u(a)?J(a):a.getBoundingClientRect()},getOffsetParent:D,getDocumentElement:x,getScale:b,async getElementRects(a){let{reference:b,floating:c,strategy:d}=a;const e=this.getOffsetParent||D,f=this.getDimensions;return{reference:N(b,await e(c),d),floating:{x:0,y:0,...(await f(c))}}},getClientRects:a=>Array.from(a.getClientRects()),isRTL:a=>"rtl"===I(a).direction};Object.defineProperty(B,"arrow",{enumerable:!0,get:function(){return G.arrow}}),Object.defineProperty(B,"autoPlacement",{enumerable:!0,get:function(){return G.autoPlacement}}),Object.defineProperty(B,"detectOverflow",{enumerable:!0,get:function(){return G.detectOverflow}}),Object.defineProperty(B,"flip",{enumerable:!0,get:function(){return G.flip}}),Object.defineProperty(B,"hide",{enumerable:!0,get:function(){return G.hide}}),Object.defineProperty(B,"inline",{enumerable:!0,get:function(){return G.inline}}),Object.defineProperty(B,"limitShift",{enumerable:!0,get:function(){return G.limitShift}}),Object.defineProperty(B,"offset",{enumerable:!0,get:function(){return G.offset}}),Object.defineProperty(B,"shift",{enumerable:!0,get:function(){return G.shift}}),Object.defineProperty(B,"size",{enumerable:!0,get:function(){return G.size}}),B.autoUpdate=function(b,d,g,e){void 0===e&&(e={});const{ancestorScroll:j=!0,ancestorResize:i=!0,elementResize:k=!0,animationFrame:l=!1}=e,c=j&&!l,f=c||i?[...(M(b)?C(b):b.contextElement?C(b.contextElement):[]),...C(d)]:[];f.forEach(a=>{c&&a.addEventListener("scroll",g,{passive:!0}),i&&a.addEventListener("resize",g)});let m,n=null;if(k){let a=!0;n=new ResizeObserver(()=>{a||g(),a=!1}),M(b)&&!l&&n.observe(b),M(b)||!b.contextElement||l||n.observe(b.contextElement),n.observe(d)}let q=l?p(b):null;return l&&function a(){const c=p(b);q&&(c.x!==q.x||c.y!==q.y||c.width!==q.width||c.height!==q.height)&&g(),q=c,m=requestAnimationFrame(a)}(),g(),()=>{var a;f.forEach(a=>{c&&a.removeEventListener("scroll",g),i&&a.removeEventListener("resize",g)}),null==(a=n)||a.disconnect(),n=null,l&&cancelAnimationFrame(m)}},B.computePosition=(a,b,c)=>{const d=new Map,e={platform:v,...c},f={...e.platform,_c:d};return G.computePosition(a,b,{...e,platform:f})},B.getOverflowAncestors=C,B.platform=v,Object.defineProperty(B,"__esModule",{value:!0})});window.tocas_modules=[...window.tocas_modules,new class a{constructor(){this.resize_observer=new ResizeObserver(a=>{a.forEach(a=>{this.getAllContaineredElements(a.target).forEach(a=>{this.check(a)})})})}attributeMutation=a=>{this.isContainer(a.target)?this.resize_observer.observe(a.target):this.resize_observer.unobserve(a.target)};addedNodeMutation=a=>{this.isResponsiveElement(a)&&this.check(a),this.isContainer(a)&&this.resize_observer.observe(a)};getAllContaineredElements=a=>a.querySelectorAll(tocas.config.strict_responsive?`[class^="@"]:is([class*=":is-"],[class*=":has-"])`:`[class^="@"][class*=":"]`);getAllResponsiveElements=a=>a.querySelectorAll(tocas.config.strict_responsive?`[class*=":is-"],[class*=":has-"]`:`[class*=":"]`);isContainer=a=>a.matches(`[class~="${tocas.config.scopes.container}"]`);isResponsiveElement=a=>a.matches(tocas.config.strict_responsive?`[class*=":is-"],[class*=":has-"]`:`[class*=":"]`);hasResponsiveClass=a=>tocas.config.strict_responsive?a.includes(":is-")||a.includes(":has-"):a.includes(":");windowResize=()=>{this.getAllResponsiveElements(document).forEach(a=>{this.check(a)})};unit=a=>parseInt(a,10)||0;breakpointSize=(a,b)=>{var c=window.getComputedStyle(b);return{min:this.unit(c.getPropertyValue(`--ts-breakpoint-${a}-min`)),max:this.unit(c.getPropertyValue(`--ts-breakpoint-${a}-max`))}};rule=(a,b)=>{var c=a.startsWith("@"),d=a.endsWith("+"),e=a.endsWith("-"),f=a.includes("[");c&&(a=a.substring(1)),(d||e)&&(a=a.substring(0,a.length-1)),f&&(a=a.substring(1).substring(0,a.length-1));var[g,h]=a.split("-");if(f)return d?[this.unit(g),99999]:e?[0,this.unit(g)]:[this.unit(g),this.unit(h)];var i=this.breakpointSize(g,b);return void 0===h?d?[i.min,99999]:e?[0,i.max]:[i.min,i.max]:[i.min,this.breakpointSize(h,b).max]};compile=a=>Array.from(a.classList).filter(a=>this.hasResponsiveClass(a)).map(b=>{var[c,d]=b.split(":"),[e,f]=this.rule(c,a),g=c.startsWith("@")?k(a.closest(`[class~="${tocas.config.scopes.container}"]`).getBoundingClientRect().width):k(window.innerWidth);return{min:e,max:f,width:g,target_class:d}});check=a=>{var b=[],c=this.compile(a);c.forEach(({width:c,min:d,max:e,target_class:f})=>{c>=d&&c<=e&&(a.classList.add(f),b=[...b,f])}),c.forEach(({width:c,min:d,max:e,target_class:f})=>{(c<d||c>e)&&!b.includes(f)&&a.classList.remove(f)})}}];window.tocas_modules=[...window.tocas_modules,new class a{attributeMutation=a=>{};addedNodeMutation=a=>{this.isTab(a)&&(this.bindEventListener(a),this.initialTab(a))};isTab=a=>a.matches("[data-tab]");isActiveTab=a=>a.classList.contains("is-active");initialTab=a=>{this.isActiveTab(a)||document.getElementById(a.dataset.tab).classList.add("has-hidden")};toggle=a=>{var b=a.target.closest("[data-tab]"),c=b.dataset.tab,d=b.closest(".ts-tab"),e=[];d.querySelectorAll("[data-tab]").forEach(a=>{a.dataset.tab===c?a.classList.add("is-active"):(e=[...e,a.dataset.tab],a.classList.remove("is-active"))}),e.forEach(a=>{document.getElementById(a).classList.add("has-hidden")}),document.getElementById(c).classList.remove("has-hidden")};bindEventListener=a=>{a.removeEventListener("click",this.toggle),a.addEventListener("click",this.toggle)}}];window.tocas_modules=[...window.tocas_modules,new class a{attributeMutation=a=>{};addedNodeMutation=a=>{this.isToggle(a)&&this.bindEventListener(a)};isToggle=a=>a.matches("[data-toggle]");toggle=a=>{var b=a.target.closest("[data-toggle]"),[c,d]=b.dataset.toggle.split(":");document.getElementById(c).classList.toggle(d)};bindEventListener=a=>{a.removeEventListener("click",this.toggle),a.addEventListener("click",this.toggle)}}];window.tocas_modules=[...window.tocas_modules,new class a{#dropdowns=new Set;attributeMutation=a=>{};addedNodeMutation=a=>{this.updateDropdowns(),this.isDropdownTrigger(a)&&this.bindEventListener(a),this.isDropdown(a)&&this.bindItemEventListener(a)};isDropdownTrigger=a=>a.matches("[data-dropdown]");isDropdown=a=>a.matches(`.ts-dropdown`)&&this.#dropdowns.has(a.id);updateDropdowns=()=>{document.querySelectorAll("[data-dropdown]").forEach(a=>{this.#dropdowns.add(a.dataset.dropdown)})};position=a=>a.dataset.position||"bottom-start";windowMousedown=a=>{var b=a.target.closest("[data-dropdown]"),c=a.target.closest(".ts-dropdown");if(null===b&&null===c&&document.querySelectorAll(".ts-dropdown").forEach(a=>{this.closeDropdown(a)}),null!==b){if(document.activeElement===a.target&&"INPUT"===document.activeElement.tagName)return void console.log("wow");var d=b.dataset.dropdown,e=document.getElementById(d);this.closeDropdownsExcept(e)}null!==c&&this.closeDropdownsExcept(c)};closeDropdownsExcept=a=>{document.querySelectorAll(".ts-dropdown").forEach(b=>{b!==a&&this.closeDropdown(b)})};bindEventListener=a=>{a.removeEventListener("click",this.clickEventListener),a.addEventListener("click",this.clickEventListener)};bindItemEventListener=a=>{a.removeEventListener("click",this.itemClickEventListener),a.addEventListener("click",this.itemClickEventListener)};closeDropdown=a=>{(a.classList.contains(".ts-dropdown")||a.classList.contains("is-visible"))&&this.#dropdowns.has(a.id)&&(a.classList.remove("is-visible"),a.tocas_dropdown!==void 0&&(a.tocas_dropdown(),a.tocas_dropdown=void 0,a.style.removeProperty("--ts-dropdown-min-width"),a.style.removeProperty("--ts-dropdown-position")))};itemClickEventListener=a=>{var b=a.target.closest(".ts-dropdown");null===a.target.closest(".item")||this.closeDropdown(b)};clickEventListener=a=>{var b=a.target.closest("[data-dropdown]"),c=b.dataset.dropdown,d=document.getElementById(c),e=this.position(d);(void 0!==d.tocas_dropdown&&(d.tocas_dropdown(),d.tocas_dropdown=void 0,d.style.removeProperty("--ts-dropdown-min-width"),d.style.removeProperty("--ts-dropdown-position")),!(document.activeElement.closest("[data-dropdown]")===b&&"INPUT"===document.activeElement.tagName&&d.classList.contains("is-visible")))&&(d.classList.toggle("is-visible"),d.classList.contains("is-visible")&&(d.style.setProperty("--ts-dropdown-min-width",`${b.getBoundingClientRect().width}px`),d.style.setProperty("--ts-dropdown-position","fixed"),d.tocas_dropdown=TocasFloatingUIDOM.autoUpdate(b,d,()=>{TocasFloatingUIDOM.computePosition(b,d,{strategy:"fixed",placement:e,middleware:[TocasFloatingUIDOM.offset(8),TocasFloatingUIDOM.flip({crossAxis:!1}),TocasFloatingUIDOM.shift(),TocasFloatingUIDOM.size({apply({availableWidth:a,availableHeight:b,elements:c}){Object.assign(c.floating.style,{maxWidth:`${a}px`,maxHeight:`${b}px`})}})]}).then(({x:a,y:b})=>{Object.assign(d.style,{left:`${a}px`,top:`${b}px`})})})))}}];window.tocas_modules=[...window.tocas_modules,new class a{#touch_start_y=0;#touch_start_x=0;attributeMutation=a=>{};addedNodeMutation=a=>{this.isPopover(a)&&this.bindEventListener(a)};isPopover=a=>a.matches(`[data-popover][popover]`);position=a=>a.dataset.position||"bottom";bindEventListener=a=>{a.removeEventListener("beforetoggle",this.beforetoggleEventListener),a.addEventListener("beforetoggle",this.beforetoggleEventListener),a.removeEventListener("toggle",this.toggleEventListener),a.addEventListener("toggle",this.toggleEventListener),a.removeEventListener("wheel",this.wheelEventListener),a.removeEventListener("touchstart",this.touchstartEventListener),a.removeEventListener("touchmove",this.touchmoveEventListener),a.addEventListener("wheel",this.wheelEventListener),a.addEventListener("touchstart",this.touchstartEventListener),a.addEventListener("touchmove",this.touchmoveEventListener)};wheelEventListener=a=>{this.universalWheelHandler(a.deltaX,a.deltaY,a)};touchstartEventListener=a=>{this.#touch_start_x=a.touches[0].clientX,this.#touch_start_y=a.touches[0].clientY};touchmoveEventListener=a=>{var b=a.touches[0].clientX,c=a.touches[0].clientY,d=this.#touch_start_x-b,e=this.#touch_start_y-c;this.#touch_start_x=b,this.#touch_start_y=c,this.universalWheelHandler(d,e,a)};universalWheelHandler=(a,b,c)=>{var d=c.target.scrollHeight>c.target.clientHeight||c.target.scrollWidth>c.target.clientWidth;if(!d){var e=this.findScrollableParent(c.target)||document.documentElement;e.scrollTop+=b,e.scrollLeft+=a}};findScrollableParent=a=>{for(var b=a.parentElement;b;){const a=b.scrollHeight>b.clientHeight||b.scrollWidth>b.clientWidth||"auto"===getComputedStyle(b).overflow||"scroll"===getComputedStyle(b).overflow;if(a)return b;b=b.parentElement}return null};beforetoggleEventListener=a=>{"open"===a.newState&&(a.target.style.visibility="hidden")};toggleEventListener=a=>{var b=a.target,c=b.dataset.popover,d=document.getElementById(c);if("closed"===a.newState)return void(void 0!==b.tocas_popover&&(b.tocas_popover(),b.tocas_popover=void 0));var e=this.position(b);b.style.setProperty("--ts-popover-position",`fixed`),b.style.visibility="visible",b.tocas_popover=TocasFloatingUIDOM.autoUpdate(d,b,()=>{TocasFloatingUIDOM.computePosition(d,b,{strategy:"fixed",placement:e,middleware:[TocasFloatingUIDOM.flip({crossAxis:!1}),TocasFloatingUIDOM.offset(8),TocasFloatingUIDOM.shift()]}).then(({x:a,y:c})=>{Object.assign(b.style,{left:`${a}px`,top:`${c}px`})})})}}];window.tocas_modules=[...window.tocas_modules,new class a{attributeMutation=a=>{this.isTooltip(a.target)&&this.bindEventListener(a.target)};addedNodeMutation=a=>{this.isTooltip(a)&&this.bindEventListener(a)};isTooltip=a=>a.matches("[data-tooltip]");bindEventListener=a=>{a.tocas_tooltip_timer=null,a.removeEventListener("mouseover",this.enterEventListener),a.removeEventListener("mouseleave",this.leaveEventListener),a.removeEventListener("focusin",this.enterEventListener),a.removeEventListener("focusout",this.leaveEventListener),a.addEventListener("mouseover",this.enterEventListener),a.addEventListener("mouseleave",this.leaveEventListener),a.addEventListener("focusin",this.enterEventListener),a.addEventListener("focusout",this.leaveEventListener)};delay=a=>{var b=a.dataset.delay;return"0"===b?0:parseInt(b,10)||200};position=a=>a.dataset.position||"bottom";triggers=a=>a.dataset.trigger?.split(" ").filter(a=>a)||["hover"];hasTrigger=(a,b)=>this.triggers(a).includes(b);enterEventListener=a=>{var b=a.type,c=a.target.closest("[data-tooltip]");("mouseover"!==b||!window.matchMedia("(pointer: coarse)").matches)&&("mouseover"!==b||this.hasTrigger(c,"hover"))&&("focusin"!==b||this.hasTrigger(c,"focus"))&&null===c.tocas_tooltip_timer&&void 0===c.tocas_tooltip&&(c.tocas_tooltip_timer=setTimeout(()=>{this.showTooltip(c)},this.delay(c)+1))};leaveEventListener=a=>{var b=a.type,c=a.target.closest("[data-tooltip]");if("mouseleave"!==b||a.target===c){var d=this.hasTrigger(c,"focus"),e=document.activeElement.closest("[data-tooltip]");if(!("mouseleave"===b&&d&&e===c)){void 0!==c.tocas_tooltip&&(c.tocas_tooltip(),c.tocas_tooltip=void 0),null!==c.tocas_tooltip_timer&&(clearTimeout(c.tocas_tooltip_timer),c.tocas_tooltip_timer=null);var f=c.getAttribute("aria-describedby");document.getElementById(f)?.remove(),c.removeAttribute("aria-describedby")}}};createTooltip=(a,b)=>{var c=document.createElement("div");return"true"===a.dataset.html?c.innerHTML=a.dataset.tooltip:c.innerText=a.dataset.tooltip,c.id=getID(),c.classList.add("ts-tooltip","is-visible"),c.setAttribute("popover","manual"),c.append(b),c};createArrow=()=>{var a=document.createElement("div");return a.classList.add("arrow"),a};showTooltip=a=>{var b=this.position(a),c=this.createArrow(),d=this.createTooltip(a,c);document.body.append(d),d.showPopover(),a.setAttribute("aria-describedby",d.id),a.tocas_tooltip=TocasFloatingUIDOM.autoUpdate(a,d,()=>{TocasFloatingUIDOM.computePosition(a,d,{strategy:"fixed",placement:b,middleware:[TocasFloatingUIDOM.flip({crossAxis:!1}),TocasFloatingUIDOM.offset({mainAxis:10}),TocasFloatingUIDOM.shift({padding:20}),TocasFloatingUIDOM.arrow({element:c})]}).then(({middlewareData:a,x:b,y:e,placement:f})=>{if(Object.assign(d.style,{left:`${b}px`,top:`${e}px`}),a.arrow){const{x:b}=a.arrow;c.style.setProperty("--ts-tooltip-x",null==b?"0":`${b}px`)}f&&(d.classList.remove("is-top","is-top-start","is-top-end","is-bottom","is-bottom-start","is-bottom-end"),d.classList.add(`is-${f}`))})})}}];window.tocas_modules=[...window.tocas_modules,new class a{attributeMutation=a=>{};addedNodeMutation=a=>{this.isClickAway(a)&&this.bindEventListener(a)};isClickAway=a=>a.matches("[data-clickaway]");toggle=a=>{a.target.closest("[data-clickaway]")===a.target&&a.target.close()};bindEventListener=a=>{a.removeEventListener("mousedown",this.toggle),a.addEventListener("mousedown",this.toggle)}}],getID=()=>(Math.random().toString(36)+"00000000000000000").slice(2,12),createElement=a=>{var b=document.createElement("template");return b.innerHTML=a.trim(),b.content.firstChild},addedNodeMutation=a=>{window.tocas_modules.forEach(b=>{"function"==typeof b.addedNodeMutation&&b.addedNodeMutation(a)})},attributeMutation=a=>{window.tocas_modules.forEach(b=>{"function"==typeof b.attributeMutation&&b.attributeMutation(a)})};var A=new Set([]),B=new MutationObserver(a=>{a.forEach(a=>{"attributes"===a.type?attributeMutation(a):a.addedNodes&&a.addedNodes.length?a.addedNodes.forEach(a=>{if(a.nodeType===Node.ELEMENT_NODE&&a instanceof HTMLElement){for(var b=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT),c=[],d=b.currentNode;d;)c=[...c,d],d=b.nextNode();c.forEach(a=>{A.has(a)||(A.add(a),B.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),addedNodeMutation(a))})}}):a.removedNodes&&a.removedNodes.length&&a.removedNodes.forEach(a=>{a.nodeType===Node.ELEMENT_NODE&&a instanceof HTMLElement&&A.delete(a)})})});B.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),window.addEventListener("resize",a=>{window.tocas_modules.forEach(b=>{"function"==typeof b.windowResize&&b.windowResize(a)})}),window.addEventListener("click",a=>{window.tocas_modules.forEach(b=>{"function"==typeof b.windowClick&&b.windowClick(a)})}),window.addEventListener("mousedown",a=>{window.tocas_modules.forEach(b=>{"function"==typeof b.windowMousedown&&b.windowMousedown(a)})})}(); |