youtuber-blog-frontend/build/client/_app/immutable/chunks/x.CyGqtVn5.js

13 lines
48 KiB
JavaScript
Raw Permalink Normal View History

2024-08-25 16:39:31 +00:00
import{d as Je,w as Be,a as $e}from"./index.BksXECXn.js";import{d as dn,n as J,a as Nt,i as $,w as Ft,c as hn,e as Qe,u as Ye,f as ke,g as de,o as vn,m as he,h as Ae,s as et,j as Te,p as bn,k as _n,l as Re}from"./index.C-lF7DSK.js";import{O as mn,K as St,ac as gn,ad as pn,s as ge,c as V,u as j,g as U,a as q,o as le,F as ne,k as K,i as w,E as ie,y as P,z as _e,I as X,e as z,d as Y,f as H,D as A,v as Z,w as E,x as Q,S as F,V as Ee,n as He,ae as tt,X as yn}from"./scheduler.DhJS7lTB.js";import{u as wt,a as Tn,b as nt,g as Cn,o as kn,c as En,d as On,r as Nn,e as Fn,f as It}from"./Toaster.svelte_svelte_type_style_lang.DBrjgtAI.js";import{S as pe,i as ye,t as R,a as L,g as we,e as Ie,h as Ge,j as We,k as Ke,c as Sn,b as wn,m as In,d as Dn}from"./index.CsLdTWKk.js";import{g as W,a as Pn}from"./spread.CgU5AtxT.js";import{a as Dt,I as An}from"./button.C_FZXt9d.js";function Io(t,e,n,i=!0){const o=e-n;return o<=0?i?t[t.length-1]:t[0]:t[o]}function Do(t,e,n,i=!0){const o=e+n;return o>t.length-1?i?t[0]:t[t.length-1]:t[o]}function Po(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function Ao(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function Rn(t){return t[t.length-1]}function Ln(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function Ro(t,e,n=dn){const i=e.findIndex(o=>n(o,t));return i!==-1?e.splice(i,1):e.push(t),e}function Lo(t){t.setAttribute("data-highlighted","")}function Mo(t){t.removeAttribute("data-highlighted")}function xe(t){return new Promise(e=>setTimeout(e,t))}function Mn(t,e=500){let n=null;return function(...i){const o=()=>{n=null,t(...i)};n&&clearTimeout(n),n=setTimeout(o,e)}}const Pt=()=>typeof window<"u";function Bn(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const At=t=>Pt()&&t.test(Bn().toLowerCase()),Kn=()=>Pt()&&!!navigator.maxTouchPoints,Vn=()=>At(/^mac/)&&!Kn(),jn=()=>At(/mac|iphone|ipad|ipod/i),Un=()=>jn()&&!Vn(),Xe="data-melt-scroll-lock";function it(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function qn(t,e,n){if(!t)return;const i=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{i?t.style.setProperty(e,i):t.style.removeProperty(e)}}function Gn(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function Wn(t){const e=t??document,n=e.defaultView??window,{documentElement:i,body:o}=e;if(o.hasAttribute(Xe))return J;o.setAttribute(Xe,"");const r=n.innerWidth-i.clientWidth,c=()=>qn(i,"--scrollbar-width",`${r}px`),a=Gn(i),s=n.getComputedStyle(o)[a],u=()=>it(o,{overflow:"hidden",[a]:`calc(${s} + ${r}px)`}),v=()=>{const{scrollX:C,scrollY:k,visualViewport:p}=n,_=(p==null?void 0:p.offsetLeft)??0,O=(p==null?void 0:p.offsetTop)??0,S=it(o,{position:"fixed",overflow:"hidden",top:`${-(k-Math.floor(O))}px`,left:`${-(C-Math.floor(_))}px`,right:"0",[a]:`calc(${s} + ${r}px)`});return()=>{S==null||S(),n.scrollTo(C,k)}},y=[c(),Un()?v():u()];return()=>{y.forEach(C=>C==null?void 0:C()),o.removeAttribute(Xe)}}function Bo(t){const{open:e,forceVisible:n,activeTrigger:i}=t;return Je([e,n,i],([o,l,r])=>(o||l)&&r!==null)}function Xn(t){Nt&&xe(1).then(()=>{const e=document.activeElement;!$(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Rt(){return Array.from(document.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}function Ko(t){const e=Rt(),i=e.indexOf(t)+1,o=e[i];return i<e.length&&$(o)?o:null}function Vo(t){const e=Rt(),i=e.indexOf(t)-1,o=e[i];return i>=0&&$(o)?o:null}const zn=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Yn={onMatch:Xn,getCurrentItem:()=>document.activeElement};function jo(t={}){const e={...Yn,...t},n=Ft(Be([])),i=Mn(()=>{n.update(()=>[])});return{typed:n,resetTyped:i,handleTypeaheadSearch:(l,r)=>{if(zn.has(l))return;const c=e.getCurrentItem(),a=mn(n);if(!Array.isArray(a))return;a.push(l.toLowerC
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var Lt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ve=Lt.join(","),Mt=typeof Element>"u",me=Mt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,je=!Mt&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ue=function t(e,n){var i;n===void 0&&(n=!0);var o=e==null||(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"inert"),l=o===""||o==="true",r=l||n&&e&&t(e.parentNode);return r},Hn=function(e){var n,i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return i===""||i==="true"},Bt=function(e,n,i){if(Ue(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Ve));return n&&me.call(e,Ve)&&o.unshift(e),o=o.filter(i),o},Kt=function t(e,n,i){for(var o=[],l=Array.from(e);l.length;){var r=l.shift();if(!Ue(r,!1))if(r.tagName==="SLOT"){var c=r.assignedElements(),a=c.length?c:r.children,s=t(a,!0,i);i.flatten?o.push.apply(o,s):o.push({scopeParent:r,candidates:s})}else{var u=me.call(r,Ve);u&&i.filter(r)&&(n||!e.includes(r))&&o.push(r);var v=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),y=!Ue(v,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(v&&y){var C=t(v===!0?r.children:v.children,!0,i);i.flatten?o.push.apply(o,C):o.push({scopeParent:r,candidates:C})}else l.unshift.apply(l,r.children)}}return o},Vt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},be=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Hn(e))&&!Vt(e)?0:e.tabIndex},Zn=function(e,n){var i=be(e);return i<0&&n&&!Vt(e)?0:i},Jn=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},jt=function(e){return e.tagName==="INPUT"},Qn=function(e){return jt(e)&&e.type==="hidden"},xn=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(i){return i.tagName==="SUMMARY"});return n},$n=function(e,n){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===n)return e[i]},ei=function(e){if(!e.name)return!0;var n=e.form||je(e),i=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(e.name));else try{o=i(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var l=$n(o,e.form);return!l||l===e},ti=function(e){return jt(e)&&e.type==="radio"},ni=function(e){return ti(e)&&!ei(e)},ii=function(e){var n,i=e&&je(e),o=(n=i)===null||n===void 0?void 0:n.host,l=!1;if(i&&i!==e){var r,c,a;for(l=!!((r=o)!==null&&r!==void 0&&(c=r.ownerDocument)!==null&&c!==void 0&&c.contains(o)||e!=null&&(a=e.ownerDocument)!==null&&a!==void 0&&a.contains(e));!l&&o;){var s,u,v;i=je(o),o=(s=i)===null||s===void 0?void 0:s.host,l=!!((u=o)!==null&&u!==void 0&&(v=u.ownerDocument)!==null&&v!==void 0&&v.contains(o))}}return l},rt=function(e){var n=e.getBoundingClientRect(),i=n.width,o=n.height;return i===0&&o===0},oi=function(e,n){var i=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var l=me.call(e,"details>summary:first-of-type"),r=l?e.parentElement:e;if(me.call(r,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof o=="function"){for(var c=e;e;){var a=e.parentElement,s=je(e);if(a&&!a.shadowRoot&&o(a)===!0)return rt(e);e.assignedSlot?e=e.assignedSlot:!a&&s!==e.ownerDocument?e=s.host:e=a}e=c}if(ii(e))return!e.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-are
* focus-trap 7.5.4
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/function at(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function st(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?at(Object(n),!0).forEach(function(i){fi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):at(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function fi(t,e,n){return e=hi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function di(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function hi(t){var e=di(t,"string");return typeof e=="symbol"?e:String(e)}var lt={activateTrap:function(e,n){if(e.length>0){var i=e[e.length-1];i!==n&&i.pause()}var o=e.indexOf(n);o===-1||e.splice(o,1),e.push(n)},deactivateTrap:function(e,n){var i=e.indexOf(n);i!==-1&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}},vi=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},bi=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},Se=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},_i=function(e){return Se(e)&&!e.shiftKey},mi=function(e){return Se(e)&&e.shiftKey},ut=function(e){return setTimeout(e,0)},ct=function(e,n){var i=-1;return e.every(function(o,l){return n(o)?(i=l,!1):!0}),i},Fe=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return typeof e=="function"?e.apply(void 0,i):e},Le=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},gi=[],pi=function(e,n){var i=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||gi,l=st({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:_i,isKeyBackward:mi},n),r={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},c,a=function(d,f,g){return d&&d[f]!==void 0?d[f]:l[g||f]},s=function(d,f){var g=typeof(f==null?void 0:f.composedPath)=="function"?f.composedPath():void 0;return r.containerGroups.findIndex(function(N){var b=N.container,I=N.tabbableNodes;return b.contains(d)||(g==null?void 0:g.includes(b))||I.find(function(D){return D===d})})},u=function(d){var f=l[d];if(typeof f=="function"){for(var g=arguments.length,N=new Array(g>1?g-1:0),b=1;b<g;b++)N[b-1]=arguments[b];f=f.apply(void 0,N)}if(f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(d,"` was specified but was not a node, or did not return a node"))}var I=f;if(typeof f=="string"&&(I=i.querySelector(f),!I))throw new Error("`".concat(d,"` as selector refers to no known node"));return I},v=function(){var d=u("initialFocus");if(d===!1)return!1;if(d===void 0||!ze(d,l.tabbableOptions))if(s(i.activeElement)>=0)d=i.activeElement;else{var f=r.tabbableGroups[0],g=f&&f.firstTabbableNode;d=g||u("fallbackFocus")}if(!d)throw new Error("Your focus-trap needs to have at least one focusable element");return d},y=function(){if(r.containerGroups=r.containers.map(function(d){var f=li(d,l.tabbableOptions),g=ui(d,l.tabbableOptions),N=f.length>0?f[0]:void 0,b=f.length>0?f[f.length-1]:void 0,I=g.find(function(B){return Ce(B)}),D=g.slice().reverse().find(function(B){return Ce(B)}),M=!!f.find(function(B){return be(B)>0});return{container:d,tabbableNodes:f,focusableNodes:g,posTabIndexesFound:M,firstTabbableNode:N,lastTabbableNode:b,firstDomTabbableNode:I,lastDomTabbableNode:D,nextTabbableNode:function(re){var ce=arguments.length>1&&arguments[1]!==void 0?arguments
transform: ${s} translate(${(1-p)*v}${y}, ${(1-p)*C}${k});
opacity: ${a-u*_}`}}function Qo(t,{delay:e=0,duration:n=400,easing:i=Dt,start:o=0,opacity:l=0}={}){const r=getComputedStyle(t),c=+r.opacity,a=r.transform==="none"?"":r.transform,s=1-o,u=c*(1-l);return{delay:e,duration:n,easing:i,css:(v,y)=>`
transform: ${a} scale(${1-s*y});
opacity: ${c-u*y}
`}}function yo(t){let e;const n=t[2].default,i=V(n,t,t[3],null);return{c(){i&&i.c()},l(o){i&&i.l(o)},m(o,l){i&&i.m(o,l),e=!0},p(o,l){i&&i.p&&(!e||l&8)&&j(i,n,o,o[3],e?q(n,o[3],l,null):U(o[3]),null)},i(o){e||(R(i,o),e=!0)},o(o){L(i,o),e=!1},d(o){i&&i.d(o)}}}function To(t){let e,n;const i=[{name:"x"},t[1],{iconNode:t[0]}];let o={$$slots:{default:[yo]},$$scope:{ctx:t}};for(let l=0;l<i.length;l+=1)o=P(o,i[l]);return e=new An({props:o}),{c(){Sn(e.$$.fragment)},l(l){wn(e.$$.fragment,l)},m(l,r){In(e,l,r),n=!0},p(l,[r]){const c=r&3?W(i,[i[0],r&2&&Pn(l[1]),r&1&&{iconNode:l[0]}]):{};r&8&&(c.$$scope={dirty:r,ctx:l}),e.$set(c)},i(l){n||(R(e.$$.fragment,l),n=!0)},o(l){L(e.$$.fragment,l),n=!1},d(l){Dn(e,l)}}}function Co(t,e,n){let{$$slots:i={},$$scope:o}=e;const l=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];return t.$$set=r=>{n(1,e=P(P({},e),_e(r))),"$$scope"in r&&n(3,o=r.$$scope)},e=_e(e),[l,e,i,o]}class xo extends pe{constructor(e){super(),ye(this,e,Co,To,ge,{})}}export{Qo as A,Xo as D,xo as X,ot as a,Wn as b,jo as c,Bo as d,Vo as e,Lo as f,Ko as g,Xn as h,qo as i,Yo as j,Zo as k,zo as l,Jo as m,Wo as n,Go as o,Ho as p,Rn as q,Mo as r,xe as s,Io as t,Uo as u,Do as v,Ao as w,Po as x,Ro as y,De as z};