mirror of
https://github.com/owncast/owncast.git
synced 2025-01-09 10:07:34 +03:00
1 line
No EOL
5.8 KiB
JavaScript
Vendored
1 line
No EOL
5.8 KiB
JavaScript
Vendored
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{97937:function(e,t,o){"use strict";o.d(t,{Z:function(){return f}});var n=o(1413),r=o(67294),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"},u=o(42135),a=function(e,t){return r.createElement(u.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:l}))};a.displayName="CloseOutlined";var f=r.forwardRef(a)},10227:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainLocale=function(e,t,o,n){return!1},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},31551:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(92648).Z,r=o(17273).Z,l=n(o(67294)),u=o(1978),a=o(62139),f=o(67795),c=o(670),i=o(54465),s=o(72692),d=o(48245),p=o(69246),h=o(10227),v=o(33468);let y=new Set;function b(e,t,o,n,r){if(r||a.isLocalURL(t)){if(!n.bypassPrefetchedCheck){let r=void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0,l=t+"%"+o+"%"+r;if(y.has(l))return;y.add(l)}Promise.resolve(e.prefetch(t,o,n)).catch(e=>{})}}function g(e){return"string"==typeof e?e:f.formatUrl(e)}let m=l.default.forwardRef(function(e,t){let o,n;let{href:f,as:y,children:m,prefetch:_,passHref:C,replace:M,shallow:k,scroll:E,locale:j,onClick:O,onMouseEnter:L,onTouchStart:P,legacyBehavior:w=!1}=e,x=r(e,["href","as","children","prefetch","passHref","replace","shallow","scroll","locale","onClick","onMouseEnter","onTouchStart","legacyBehavior"]);o=m,w&&("string"==typeof o||"number"==typeof o)&&(o=l.default.createElement("a",null,o));let R=!1!==_,I=l.default.useContext(s.RouterContext),S=l.default.useContext(d.AppRouterContext),T=null!=I?I:S,Z=!I,{href:A,as:N}=l.default.useMemo(()=>{if(!I){let e=g(f);return{href:e,as:y?g(y):e}}let[e,t]=u.resolveHref(I,f,!0);return{href:e,as:y?u.resolveHref(I,y):t||e}},[I,f,y]),U=l.default.useRef(A),D=l.default.useRef(N);w&&(n=l.default.Children.only(o));let H=w?n&&"object"==typeof n&&n.ref:t,[K,B,z]=p.useIntersection({rootMargin:"200px"}),q=l.default.useCallback(e=>{(D.current!==N||U.current!==A)&&(z(),D.current=N,U.current=A),K(e),H&&("function"==typeof H?H(e):"object"==typeof H&&(H.current=e))},[N,H,A,z,K]);l.default.useEffect(()=>{T&&B&&R&&b(T,A,N,{locale:j},Z)},[N,A,B,j,R,null==I?void 0:I.locale,T,Z]);let F={ref:q,onClick(e){w||"function"!=typeof O||O(e),w&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,o,n,r,u,f,c,i,s){let{nodeName:d}=e.currentTarget,p="A"===d.toUpperCase();if(p&&(function(e){let t=e.currentTarget,o=t.getAttribute("target");return o&&"_self"!==o||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!i&&!a.isLocalURL(o)))return;e.preventDefault();let h=()=>{"beforePopState"in t?t[r?"replace":"push"](o,n,{shallow:u,locale:c,scroll:f}):t[r?"replace":"push"](n||o,{forceOptimisticNavigation:!s})};i?l.default.startTransition(h):h()}(e,T,A,N,M,k,E,j,Z,R)},onMouseEnter(e){w||"function"!=typeof L||L(e),w&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),T&&(R||!Z)&&b(T,A,N,{locale:j,priority:!0,bypassPrefetchedCheck:!0},Z)},onTouchStart(e){w||"function"!=typeof P||P(e),w&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),T&&(R||!Z)&&b(T,A,N,{locale:j,priority:!0,bypassPrefetchedCheck:!0},Z)}};if(c.isAbsoluteUrl(N))F.href=N;else if(!w||C||"a"===n.type&&!("href"in n.props)){let e=void 0!==j?j:null==I?void 0:I.locale,t=(null==I?void 0:I.isLocaleDomain)&&h.getDomainLocale(N,e,null==I?void 0:I.locales,null==I?void 0:I.domainLocales);F.href=t||v.addBasePath(i.addLocale(N,e,null==I?void 0:I.defaultLocale))}return w?l.default.cloneElement(n,F):l.default.createElement("a",Object.assign({},x,F),o)});t.default=m,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},69246:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersection=function(e){let{rootRef:t,rootMargin:o,disabled:f}=e,c=f||!l,[i,s]=n.useState(!1),d=n.useRef(null),p=n.useCallback(e=>{d.current=e},[]);n.useEffect(()=>{if(l){if(c||i)return;let e=d.current;if(e&&e.tagName){let n=function(e,t,o){let{id:n,observer:r,elements:l}=function(e){let t;let o={root:e.root||null,margin:e.rootMargin||""},n=a.find(e=>e.root===o.root&&e.margin===o.margin);if(n&&(t=u.get(n)))return t;let r=new Map,l=new IntersectionObserver(e=>{e.forEach(e=>{let t=r.get(e.target),o=e.isIntersecting||e.intersectionRatio>0;t&&o&&t(o)})},e);return t={id:o,observer:l,elements:r},a.push(o),u.set(o,t),t}(o);return l.set(e,t),r.observe(e),function(){if(l.delete(e),r.unobserve(e),0===l.size){r.disconnect(),u.delete(n);let e=a.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&s(e),{root:null==t?void 0:t.current,rootMargin:o});return n}}else if(!i){let e=r.requestIdleCallback(()=>s(!0));return()=>r.cancelIdleCallback(e)}},[c,o,t,i,d.current]);let h=n.useCallback(()=>{s(!1)},[]);return[p,i,h]};var n=o(67294),r=o(44686);let l="function"==typeof IntersectionObserver,u=new Map,a=[];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41664:function(e,t,o){e.exports=o(31551)}}]); |