1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c1093bea-ff83-412b-9a3c-6cbe7f0f6025",e._sentryDebugIdIdentifier="sentry-dbid-c1093bea-ff83-412b-9a3c-6cbe7f0f6025")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6495,6584],{74482:function(e,t,n){Promise.resolve().then(n.bind(n,76561)),Promise.resolve().then(n.bind(n,27046)),Promise.resolve().then(n.bind(n,90485)),Promise.resolve().then(n.bind(n,89847)),Promise.resolve().then(n.bind(n,81216)),Promise.resolve().then(n.bind(n,25171))},24974:function(e,t,n){"use strict";function s(e,t){var n={contents:void 0},s=function(e){var t,s;t=n.contents,s=function(e){clearTimeout(e)},void 0!==t&&s(function(e){if(!(null!==e&&void 0!==e.BS_PRIVATE_NESTED_SOME_NONE))return e;var t=e.BS_PRIVATE_NESTED_SOME_NONE;if(0!==t)return{BS_PRIVATE_NESTED_SOME_NONE:t-1|0}}(t)),n.contents=void 0},i={contents:t.leading};return{cancel:s,invoke:function(...t){return s(void 0),e(...t)},isScheduled:function(e){return void 0!==n.contents},schedule:function(...r){if(i.contents)return i.contents=!1,e(...r);s(void 0);var o=setTimeout(function(t){e(...r),n.contents=void 0},t.delay);n.contents=void 0===o?{BS_PRIVATE_NESTED_SOME_NONE:0}:null!==o&&void 0!==o.BS_PRIVATE_NESTED_SOME_NONE?{BS_PRIVATE_NESTED_SOME_NONE:o.BS_PRIVATE_NESTED_SOME_NONE+1|0}:o}}}function i(e,t){return function(){if(1==arguments.length){let e=arguments;return function(t){return s(t,e[0])}}return s(arguments[0],arguments[1])}(e,{delay:t,leading:!1}).schedule}function r(){if(1==arguments.length){let e=arguments;return function(t){return i(t,e[0])}}return i(arguments[0],arguments[1])}n.d(t,{Ds:function(){return r}})},62137:function(e,t,n){"use strict";n.d(t,{zD:function(){return y}});var s={logger:"undefined"!=typeof console?console:void 0,WebSocket:"undefined"!=typeof WebSocket?WebSocket:void 0},i={log(...e){this.enabled&&(e.push(Date.now()),s.logger.log("[ActionCable]",...e))}};let r=()=>(new Date).getTime(),o=e=>(r()-e)/1e3;class c{constructor(e){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=r(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),i.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=r(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),i.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordMessage(){this.pingedAt=r()}recordConnect(){this.reconnectAttempts=0,delete this.disconnectedAt,i.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=r(),i.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){let{staleThreshold:e,reconnectionBackoffRate:t}=this.constructor;return 1e3*e*Math.pow(1+t,Math.min(this.reconnectAttempts,10))*(1+(0===this.reconnectAttempts?1:t)*Math.random())}reconnectIfStale(){this.connectionIsStale()&&(i.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${o(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?i.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${o(this.disconnectedAt)} s`):(i.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return o(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&o(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){"visible"===document.visibilityState&&setTimeout(()=>{(this.connectionIsStale()||!this.connection.isOpen())&&(i.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())},200)}}c.staleThreshold=6,c.reconnectionBackoffRate=.15;var a={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"}
1,disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart",remote:"remote"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};let{message_types:l,protocols:d}=a,u=d.slice(0,d.length-1),h=[].indexOf;class p{constructor(e){this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new c(this),this.disconnected=!0}send(e){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(e)),!0)}open(){if(this.isActive())return i.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1;{let e=[...d,...this.consumer.subprotocols||[]];return i.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${e}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new s.WebSocket(this.consumer.url,e),this.installEventHandlers(),this.monitor.start(),!0}}close({allowReconnect:e}={allowReconnect:!0}){if(e||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(i.log(`Reopening WebSocket, current state is ${this.getState()}`),!this.isActive())return this.open();try{return this.close()}catch(e){i.log("Failed to reopen WebSocket",e)}finally{i.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}triedToReconnect(){return this.monitor.reconnectAttempts>0}isProtocolSupported(){return h.call(u,this.getProtocol())>=0}isState(...e){return h.call(e,this.getState())>=0}getState(){if(this.webSocket){for(let e in s.WebSocket)if(s.WebSocket[e]===this.webSocket.readyState)return e.toLowerCase()}return null}installEventHandlers(){for(let e in this.events){let t=this.events[e].bind(this);this.webSocket[`on${e}`]=t}}uninstallEventHandlers(){for(let e in this.events)this.webSocket[`on${e}`]=function(){}}}p.reopenDelay=500,p.prototype.events={message(e){if(!this.isProtocolSupported())return;let{identifier:t,message:n,reason:s,reconnect:r,type:o}=JSON.parse(e.data);switch(this.monitor.recordMessage(),o){case l.welcome:return this.triedToReconnect()&&(this.reconnectAttempted=!0),this.monitor.recordConnect(),this.subscriptions.reload();case l.disconnect:return i.log(`Disconnecting. Reason: ${s}`),this.close({allowReconnect:r});case l.ping:return null;case l.confirmation:if(this.subscriptions.confirmSubscription(t),this.reconnectAttempted)return this.reconnectAttempted=!1,this.subscriptions.notify(t,"connected",{reconnected:!0});return this.subscriptions.notify(t,"connected",{reconnected:!1});case l.rejection:return this.subscriptions.reject(t);default:return this.subscriptions.notify(t,"received",n)}},open(){if(i.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return i.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(e){if(i.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){i.log("WebSocket onerror event")}};let f=function(e,t){if(null!=t)for(let n in t){let s=t[n];e[n]=s}return e};class m{constructor(e,t={},n){this.consumer=e,this.identifier=JSON.stringify(t),f(this,n)}perform(e,t={}){return t.action=e,this.send(t)}send(e){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(e)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class g{constructor(e){this.subscriptions=e,this.pendingSubscriptions=[]}guarantee(e){-1==this.pendingSubscriptions.indexOf(e)?(i.log(`SubscriptionGuarantor guaranteeing ${e.identifier}`),this.pendingSubscriptions.push(e)):i.log(`SubscriptionGuarantor already guaranteeing ${e.identifier}`),this.startGuaranteeing()}forget(e){i.log(`SubscriptionGuarantor forgetting ${e.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter(t=>t!==e)}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout(()=>{this.subscriptions&&"function"==typeof this.subscriptions.subscribe&&this.pendingSubscriptions.map(e=>{i.log(`SubscriptionGuarantor resubscribing ${e.identifier}`),this.subscriptions.subscribe(e)})},500)}}class b{constructor(e){this.consumer=e,this.guarantor=new g(this),this.subscriptions=[]}create(e,t){let n=new m(this.consumer,"object"==typeof e?e:{channel:e},t);return this.add(n)}add(e){return this.subscriptions.push(e),this.consumer.ensureActiveConnection(),this.notify(e,"initialized"),this.subscribe(e),e}remove(e){return this.forget(e),this.findAll(e.identifier).length||this.sendCommand(e,"unsubscribe"),e}reject(e){return this.findAll(e).map(e=>(this.forget(e),this.notify(e,"rejected"),e))}forget(e){return this.guarantor.forget(e),this.subscriptions=this.subscriptions.filter(t=>t!==e),e}findAll(e){return this.subscriptions.filter(t=>t.identifier===e)}reload(){return this.subscriptions.map(e=>this.subscribe(e))}notifyAll(e,...t){return this.subscriptions.map(n=>this.notify(n,e,...t))}notify(e,t,...n){return("string"==typeof e?this.findAll(e):[e]).map(e=>"function"==typeof e[t]?e[t](...n):void 0)}subscribe(e){this.sendCommand(e,"subscribe")&&this.guarantor.guarantee(e)}confirmSubscription(e){i.log(`Subscription confirmed ${e}`),this.findAll(e).map(e=>this.guarantor.forget(e))}sendCommand(e,t){let{identifier:n}=e;return this.consumer.send({command:t,identifier:n})}}class v{constructor(e){this._url=e,this.subscriptions=new b(this),this.connection=new p(this),this.subprotocols=[]}get url(){return function(e){if("function"==typeof e&&(e=e()),!e||/^wss?:/i.test(e))return e;{let t=document.createElement("a");return t.href=e,t.href=t.href,t.protocol=t.protocol.replace("http","ws"),t.href}}(this._url)}send(e){return this.connection.send(e)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}addSubProtocol(e){this.subprotocols=[...this.subprotocols,e]}}function y(e=function(e){let t=document.head.querySelector("meta[name='action-cable-url']");if(t)return t.getAttribute("content")}(0)||a.default_mount_path){return new v(e)}},88396:function(e,t,n){"use strict";n.d(t,{ts:function(){return r},zB:function(){return i}}),n(69131);var s=n(67077);(0,s.$)("12ea158d5169afa759fb616487a26f0bb2921ab5");var i=(0,s.$)("3541233a103b51c2ef5f434c686186eb94ad6d00"),r=(0,s.$)("87181f66a867428478012468d0719bd7728f5d58")},27046:function(e,t,n){"use strict";n.d(t,{Section:function(){return w}});var s=n(94864),i=n(54728),r=n(86645),o=n(93851),c=n(47027),a=n(42406),l=n(54691),d=n(25171),u=n(74462),h=n(16379),p=n(74817),f=n(34776),m=n(53622),g=n(27325),b=n(87470),v=n(76561);let y=(0,o.j)("relative w-full ",{variants:{variant:{default:"mb-2 scroll-mt-14 border-viory-lighter-grey odd:border-b odd:bg-viory-light-grey even:bg-viory-white odd:md:mb-14 even:md:mb-[76px]",lightgrey:"mb-10 scroll-mt-14 border-b border-viory-lighter-grey bg-viory-light-grey sm2:mb-14","lightgrey-video-page":"mb-0 scroll-mt-14 border-b border-viory-lighter-grey bg-viory-light-grey !p-0 ",white:"mb-2 scroll-mt-14 border-viory-lighter-grey bg-viory-white sm2:mb-8 md:mb-[56px]",inherit:"bg-inherit"},size:{default:""}},defaultVariants:{variant:"default",size:"default"}}),x=(0,o.j)("",{variants:{columns:{default:"",two:"grid gap-[30px] sm:grid-cols-1 md:grid-cols-2 md:gap-5 md:gap-x-[30px] md:gap-y-[32px] lg:grid-cols-4 xl:grid-cols-5",three:"grid gap-[30px] sm:grid-cols-1 md:grid-cols-2 md:gap-4 lg:grid-cols-3 lg:gap-x-[30px] lg:gap-y-[32px] xl:grid-cols-5",four:"grid gap-[30px] sm:grid-cols-1 sm2:grid-cols-2 md2:grid-cols-3 lg:grid-cols-4",five:"grid gap-[30px] sm:grid-cols-1 sm2:grid-cols-2 md2:grid-cols-3 md4:grid-cols-4 lg:grid-cols-5"},rows:{default:"",startOneRow:"hidden sm:[&:nth-child(-n+2)]:flex md:[&:nth-child(-n+3)]:flex md4:[&:nth-child(-n+3)]:flex lg:[&:nth-child(-n+4)]:flex"}},defaultVariants:{columns:"default",rows:"default"}}),S={feed:{xs:1,sm:1,sm2:2,md:2,md2:3,md3:3,md4:4,lg:5,xl:5},trending:{xs:1,sm:1,sm2:6,md:6,md2:6,md3:6,md4:6,lg:8,xl:8}},w=e=>{let{id:t,itemId:n,className:o,variant:w,columns:N,rows:_,title:j,hasSubscribe:k,gotoAllLink:E,gotoAllText:A,showAllText:C,showMoreText:R,showLessText:T,hide
1ShowMore:O,items:D,isLiveSection:I,type:P,hideHeadersActions:$,oneRow:L,lang:M,isFollowing:V=!1,isLanding:z=!1,sendAnalyticGoToAll:G,sendAnalyticClickCard:U,sendAnalyticDownload:B}=e,[W,Z]=(0,i.useState)(0),[q,F]=(0,i.useState)(0),[J,K]=(0,i.useState)(V),{breakpoint:H}=(0,m.Z)(),X=(0,r.useRouter)(),{toast:Y}=(0,f.pm)(),{t:Q}=(0,c.$)(M,"page"),ee="feed"===P||"trending"===P,et=(0,i.useMemo)(()=>H?S[P||"feed"][H]:1,[H,P]),en=e=>{e.type===b.eG.download&&X.push("/download/".concat(e.data.id))};(0,i.useEffect)(()=>{F(et)},[et]);let es=e=>{let{data:t,isLiveSection:n}=e;return n?(0,s.jsx)(h.Uh,{event:t,className:(0,g.cn)(x({rows:L&&0===W?"startOneRow":_}),"mb-0")}):(0,s.jsx)(p.c,{onAction:en,video:t,className:"item",sendAnalyticClickCard:U,sendAnalyticDownload:B})},ei=(0,i.useCallback)(async()=>{if(void 0===n)return;let e=!J;K(e);try{(await fetch("/api/content/tags/".concat(n,"/subscriptions"),{method:e?"POST":"DELETE"})).ok?Y({title:"",description:e?Q("dashboard.tags.follow.success_toast"):Q("dashboard.tags.unfollow.success_toast"),variant:"default"}):(K(!e),Y({title:"",description:e?Q("dashboard.tags.follow.failed"):Q("dashboard.tags.unfollow.failed"),variant:"error"}))}catch(t){K(!e),Y({title:"",description:"A network error has occurred. Please check your connection and try again.",variant:"error"})}},[n,J,Y]),er=["xs","sm"].some(e=>e===H);return(0,s.jsx)("section",{id:t,className:(0,g.cn)(o,y({variant:w,className:o})),children:(0,s.jsxs)("div",{className:(0,g.cn)(o,z?"relative":"sm2:container relative"),children:[j&&(0,s.jsxs)("div",{className:"mb-5 mt-8 flex items-center justify-between gap-4 px-5 sm2:justify-center md:px-0",children:[(0,s.jsx)("h2",{className:"mb-0 text-bold-header font-bold last:mb-0 md:text-3xl",children:j}),(0,s.jsxs)("div",{className:"flex gap-x-2",children:[!$&&k&&void 0!==n&&(0,s.jsx)(u.default,{isFollowing:J,onClick:ei,className:(0,g.cn)(J?"type-secondary":"type-primary","size-sm sub-type-folded"),text:J?Q("dashboard.tags.unfollow.success"):Q("dashboard.tags.follow.success")}),!$&&E&&(0,s.jsx)(d.default,{className:(0,g.cn)(["type-secondary size-sm md:size-md sub-type-folded ",{"md:sub-type-unfolded":A}]),icon:"sideRight",text:A,onClick:()=>{G&&new a.a([new l.t]).dispatch([{senderType:l.t,trackData:{eventName:"reachGoal",params:G}}]),X.push(E)}})]})]}),!er&&(0,s.jsx)("div",{className:"hidden sm2:block",children:ee?(0,s.jsx)("div",{className:(0,g.cn)(x({columns:N})),children:(D.slice(0,q)||[]).map(e=>(0,s.jsx)(es,{data:e,isLiveSection:I},e.id))}):(0,s.jsx)("div",{className:(0,g.cn)(x({columns:N}),"items"),children:(D||[]).map(e=>(0,s.jsx)(es,{data:e,isLiveSection:I},e.id))})}),er&&(0,s.jsx)(v.Banner,{items:D.slice(0,5)||[],className:"mb-10 sm2:hidden",lang:M,withSlider:!0,showButton:!1,children:e=>(e||[]).map(e=>(0,s.jsx)(es,{data:e,isLiveSection:I},e.id))}),(0,s.jsxs)("div",{className:(0,g.cn)(I&&!z?"hidden sm2:block relative pb-0 sm2:pb-14":"hidden sm2:block relative pb-0 sm2:pb-14 after:absolute after:-bottom-px after:h-px after:w-full after:border-b after:left-0 after:border-viory-lighter-grey after:content-['']"),children:[!O&&ee&&0===W&&q<D.length&&(0,s.jsx)(d.default,{className:"type-secondary sub-type-dropdown sub-type-rtl absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2 md:text-regular-line",icon:"dropDown",text:R,onClick:()=>{F(e=>Math.min(e+4*("trending"===P?S.feed[H||"md"]-1:S.feed[H||"md"]),D.length)),Z(e=>e+1)}}),z&&W>0&&(0,s.jsx)(d.default,{className:"type-secondary sub-type-dropdown sub-type-rtl absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2 md:text-regular-line",icon:"up",text:T,onClick:()=>{F(et),Z(0)}}),"trending"===P&&W>0&&q<D.length&&(0,s.jsx)(d.default,{className:"type-secondary sub-type-dropdown sub-type-rtl absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2 md:text-regular-line",icon:"dropDown",text:C,onClick:()=>F(D.length)}),"feed"===P&&W>0&&E&&(0,s.jsx)(d.default,{className:"type-secondary sub-type-dropdown sub-type-rtl absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2 md:text-regular-line",icon:"sideRight",text:C,onClick:()=>X.push(E)})]})]})})};w.displayName="section"},90485:function(e,t,n){"use strict";n.d(t,{SearchBlock:function(){return x}});var s=n(94864),i=n(54728),r=n(80771),o=n(86645),c=n(24974),a=n(20222),l=n(6565),d=n(26302),u=n(47027),h=n(53156),p=n(30564),f=n(40787),m=n(62351);let g=e=>{let t=(0,o.useRouter)(),n=(0,o.usePathname)(),s=(0,o.useSearchParams)();return{params:(0,i.useMemo)(()=>Array.from(s.keys()).reduce((e,t)=>
1{let n=s.getAll(t);return{...e,[t]:1===n.length?n[0]:n}},{}),[s]),update:s=>{let i=new URLSearchParams(Object.keys(s).map(e=>[e,s[e]])).toString();t.push("".concat(e||n).concat(i?"?".concat(i):""))},remove:i=>{let r=new URLSearchParams(Array.from(s.entries()));r.delete(i);let o=r.toString();t.push("".concat(e||n).concat(o?"?".concat(o):""))}}};var b=n(27325),v=n(59963);async function y(e,t){let n=new URLSearchParams({locale:e,search:t,with_restricted_content:"true"}),s="".concat("".concat("https://api3.viory.video","/api/content/video_projects/suggests"),"?").concat(n),i=await fetch(s,{cache:"no-store"});if(!i.ok){let e=await i.text();throw Error("Failed to fetch video projects: ".concat(i.status," ").concat(e))}return{payload:await i.json(),error:null,isLoading:!1}}let x=i.memo(e=>{let{caption:t,language:n,className:x,classNameSearch:S,redirectTo:w,toListenIntersection:N,variant:_,additionalContent:j,isLanding:k,sectionClassName:E}=e,[A,C]=(0,i.useState)(),[R,T]=(0,i.useState)(!1),O=(0,o.usePathname)(),{params:D}=g(w),I=(0,h.oR)(e=>e.ui.setIsSearchVisible),P=(0,h.oR)(e=>e.ui.searchInputValue),$=(0,h.oR)(e=>e.ui.setSearchInputValue),[L,M]=(0,i.useTransition)(),V=(0,i.useDeferredValue)(P),z=(0,a.Z)(),G=(null==z?void 0:z.xs)?"0px 0px":"-70px 0px",U=(null==z?void 0:z.xs)?0:1,{t:B}=(0,u.$)(n,"common"),{handleSubmit:W,control:Z,resetField:q}=(0,l.cI)({values:{search:P},mode:"onChange"}),F=(0,o.useSearchParams)(),J=(0,o.useRouter)(),{ref:K,inView:H}=(0,d.YD)({rootMargin:G,threshold:U}),{field:X}=(0,l.bc)({control:Z,name:"search"});(0,i.useEffect)(()=>{N&&I(H)},[H,N,I]);let Y=(0,i.useCallback)(e=>{if(!w||!e)return!1;let t=new URLSearchParams(F);t.delete("page"),t.set("search",e);let s=w.replace(/^\/+/,"").replace(new RegExp("^".concat(n,"/?")),"");return J.push("/".concat(n,"/").concat(s,"?").concat(t.toString())),!0},[w,F,J,n]),Q=(0,i.useCallback)(e=>{let t=e.search||"";if(t!==P&&$(t),Y(t))return;let n=new URLSearchParams(F);t?n.set("search",t):n.delete("search"),n.delete("page"),J.push("".concat(O,"?").concat(n.toString()),{scroll:!1}),J.refresh()},[Y,F,J,O,$,P]),ee=(0,i.useCallback)(e=>{"Enter"===e.code?(e.preventDefault(),T(!1),C(void 0),Y(P)||W(Q)()):T(!0)},[P,Y,W,Q]),et=(0,i.useCallback)(()=>{q("search",{defaultValue:""}),$("");let e=new URLSearchParams(F);e.delete("search"),e.delete("page"),J.push("".concat(O,"?").concat(e.toString()),{scroll:!1})},[q,$,F,J,O]);(0,i.useCallback)(c.Ds(async(e,t)=>{C((await y(e,t)).payload)},500),[]);let en=(0,i.useCallback)(e=>{var t;if(null===(t=e.relatedTarget)||void 0===t?void 0:t.getAttribute("data-search-url")){e.preventDefault();return}C(void 0)},[]),es=(0,i.useCallback)(()=>{C(void 0)},[]);(0,i.useEffect)(()=>{if(!X.value){C(void 0);return}X.value&&R&&M(async()=>{var e;C((await y(n,null!==(e=X.value)&&void 0!==e?e:"")).payload)})},[X.value,R,n]);let ei=N&&!H;return(0,s.jsx)("article",{className:(0,b.cn)("w-full",x),children:(0,s.jsx)("form",{onSubmit:W(Q),className:"max-h-full w-full",children:(0,s.jsxs)("section",{className:(0,b.cn)("flex w-full items-center flex-col",ei?"invisible":"",k?"items-center md:items-start lg:items-center lg:flex-row":"",E),children:[t&&(0,s.jsx)(f.Z,{variant:"mainTitle",className:"mb-3.5 text-center text-[26px] leading-8 md:text-[2.5rem] md:leading-none",children:t}),(0,s.jsxs)("div",{ref:K,className:(0,b.cn)("group relative w-full",S),children:[(0,s.jsx)(v.default,{variant:_||"search",placeholder:B(k?"search.this_page":"search.title"),value:V,className:"w-full focus:placeholder:text-transparent",onChange:e=>{$(e.target.value)},onKeyDown:ee,postElement:(0,s.jsx)(p.Z,{}),onClear:et,onBlur:en}),!!(null==A?void 0:A.count)&&X.value&&(0,s.jsx)("div",{className:"absolute z-50 w-full border border-secondary-border bg-white",children:((null==A?void 0:A.videos)||[]).map(e=>(0,s.jsx)(r.default,{href:"/".concat(n,"/videos/").concat(e.external_name,"/").concat((0,m.k6)(e.title)),className:"block cursor-pointer p-4 md:hover:bg-viory-light-grey",replace:!0,passHref:!0,prefetch:!1,"data-search-url":!0,onClick:es,children:e.title},e.id))})]}),j]})})})});x.displayName="search-block"},89847:function(e,t,n){"use strict";n.d(t,{SignIn:function(){return k}});var s=n(94864),i=n(54728),r=n(80771),o=n(86645),c=n(63633),a=n(6565),l=n(99728),d=n(20892),u=n(88396),h=n(53156),p=n(25171),f=n(96989),m=n(59963),g=n(40787),b=n(37700),v=n(49748),y=n(92964),x=n(6010),S=n(87470);let w=async(e,t)=>{try{let{error:n}=await x.a.post("/api/admin/users/admins/token_verifications?locale=".concat(t),{token:e},{external:!0});return{success:!n,error:n}}catch(e){return}},N=async()=>await x.a.get("/api/current_user",{external:!0}),_=e=>{let{open:t,onClose:n,onConfirm:r}=e,[o,c]=(0,i.useState)(""),{setIsLoggedIn:a,setUser:d}=(0,h.oR)(e=>e),[u,b]=(0,i.useState)(""),{t:x,i18n:{language:_}}=(0,l.$G)("page"),[j,k]=(0,i.useTransition)(),E=()=>{let e=sessionStorage.getItem("returnUrl")||"/";sessionStorage.removeItem("returnUrl"),v.default.push(e)};return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(f.Vq,{open:t,onOpenChange:n,children:(0,s.jsxs)(f.cZ,{className:"w-full max-w-[490px] xs:bottom-0 xs:top-auto xs:!translate-y-0 xs:px-5 xs:
1py-7 md:bottom-auto md:top-[50%] md:!translate-y-[-50%] md:p-10",toShowClose:!1,children:[(0,s.jsx)(f.fK,{children:(0,s.jsx)(f.$N,{asChild:!0,children:(0,s.jsx)("h1",{className:"md:text-3xla text-2xla font-bold",children:x("signin.confirm")})})}),(0,s.jsx)(g.Z,{variant:"paragraph",className:"mb-2 text-left",children:x("signin.desc")}),(0,s.jsx)("div",{className:"group relative w-full ",children:(0,s.jsx)(m.default,{className:"w-full",id:"token",name:"token",placeholder:x("signin.code"),maxLength:4,value:o,onChange:e=>{b(""),c(e.target.value)},error:u})}),(0,s.jsxs)(f.cN,{className:"flex pt-2 sm:flex-col sm:justify-start sm:space-x-0",children:[(0,s.jsx)(p.default,{className:"type-primary",text:"Label",disabled:4!==o.length,busy:j,onClick:()=>{k(async()=>{let e=await w(o,_);if(null==e?void 0:e.success){let{payload:e}=await N();d(e.current_user),a((null==e?void 0:e.current_user.id)!==void 0),y.Z.set(S.qx.FAKE_SIGNED_IN,"true",{path:"/",expires:365,sameSite:"strict",secure:!0}),r(),n(),E()}else{let t=null==e?void 0:e.error,n=t.status;if(404===n&&b(x("signin.wrong_code")),403===n){let e=t.message.client_ip;b("".concat(x("signin.error")," ").concat(e))}}})},children:x("profile.form.pass.confirm")}),(0,s.jsx)(p.default,{className:"type-link justify-start xs:!p-0",text:"Label",onClick:n,children:x("video.list.cancel")})]})]})})})};_.displayName="Confirm";let j=d.z.object({email:d.z.string().email({message:"not_valid"}),password:d.z.string().min(1)}),k=e=>{var t;let{open:n,isOnClientOnly:d}=e,{t:v,i18n:{language:y}}=(0,l.$G)("page"),x=(0,o.useRouter)(),[S,w]=(0,i.useState)(!1),[N,k]=(0,i.useState)(!1),[E,A]=(0,i.useState)(!1),{setIsLoggedIn:C,setUser:R}=(0,h.oR)(e=>e),T=(0,h.oR)(e=>e.cookie.setRestrictedCookie),[O,D]=(0,i.useTransition)(),{handleSubmit:I,register:P,formState:{isValid:$,errors:L},trigger:M}=(0,a.cI)({resolver:(0,c.F)(j),mode:"onChange"}),V=()=>{let e=sessionStorage.getItem("returnUrl")||"/";sessionStorage.removeItem("returnUrl"),x.push(e)},z=async()=>{let e=await (0,u.ts)();null!==e.restricted_content_allowed&&(T(e.restricted_content_allowed),b._.saveRestrictedCookie(e.restricted_content_allowed)),R(e),C((null==e?void 0:e.id)!==void 0),d?w(!1):x.back()},G=I(e=>{let{email:t,password:n}=e;D(async()=>{let e=await (0,u.zB)({email:t,password:n});e.success?(await z(),V()):("user_need_2FA"===e.error&&k(!0),"Invalid credentials"===e.error&&A(!0))})}),U=async e=>{"Enter"===e.key&&(await M(),await G())};(0,i.useEffect)(()=>{w(n)},[n]);let B=()=>{w(!1),x.refresh()};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Vq,{open:S,onOpenChange:()=>d?B():x.back(),children:(0,s.jsx)("form",{id:"signin",onSubmit:G,children:(0,s.jsxs)(f.cZ,{className:"w-full max-w-[490px] p-10",children:[(0,s.jsx)(f.fK,{children:(0,s.jsx)(f.$N,{asChild:!0,children:(0,s.jsx)(g.Z,{variant:"title",className:"text-3xl ltr:text-left rtl:text-right",children:v("already_confirmed.link")})})}),(0,s.jsxs)(g.Z,{variant:"paragraph",className:"mb-2 text-left",children:[v("signin.or"),(0,s.jsx)(r.default,{href:"/".concat(y,"/signup"),replace:!0,children:v("signin.signup")})]}),(0,s.jsx)("div",{className:"group relative w-full ",children:(0,s.jsx)(m.default,{...P("email"),placeholder:v("profile.form.email"),id:"email",className:"w-full",onKeyDown:U,error:L.email?v("isEmailError.".concat(null===(t=L.email)||void 0===t?void 0:t.message)):void 0})}),(0,s.jsx)("div",{className:"group relative w-full ",children:(0,s.jsx)(m.default,{type:"password",...P("password"),placeholder:v("confirmation.password"),id:"password",className:"w-full",onKeyDown:U})}),E&&(0,s.jsx)("div",{children:(0,s.jsx)("span",{className:"text-xs text-input-error",children:v("user_email_or_password_not_valid")})}),(0,s.jsx)(f.cN,{className:"flex pt-2 sm:flex-col sm:justify-start sm:space-x-0",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(p.default,{className:"type-primary",text:"Label",form:"signin",disabled:!$,busy:O,children:v("already_confirmed.link")}),(0,s.jsx)("div",{className:"pt-4",children:(0,s.jsx)(r.default,{href:"/".concat(y,"/restore-password"),children:v("signin.forgot_password")})})]})})]})})}),N&&(0,s.jsx)(_,{open:N,onConfirm:B,onClose:()=>{k(!1)}})]})};
1k.displayName="SignIn"},81216:function(e,t,n){"use strict";var s=n(94864),i=n(54728),r=n(27046),o=n(13521),c=n(53156);t.default=e=>{let{initialEvents:t,lang:n,...a}=e,l=(0,c.oR)(e=>e.setLiveEvents),d=(0,c.oR)(e=>e.liveEvents);return(0,i.useEffect)(()=>{l(t)},[t,l]),(0,s.jsx)(o.LiveSocketWrapper,{children:(0,s.jsx)(r.Section,{items:d,lang:n,isLiveSection:!0,...a})})}},13521:function(e,t,n){"use strict";n.d(t,{LiveSocketWrapper:function(){return o}});var s=n(94864),i=n(53156),r=n(90451);function o(e){let{children:t,liveEvent:n,onStatusUpdate:o}=e,c=(0,i.oR)(e=>e.handleLiveEventUpdate);return(0,r.X)({channel:"Content::LiveEventsChannel",onReceived:e=>{e.data&&(c(e.data),o&&(!n||e.data.id===n.id)&&o(e))}}),(0,s.jsx)(s.Fragment,{children:t})}},74462:function(e,t,n){"use strict";var s=n(94864),i=n(54728),r=n(99728),o=n(13233),c=n(25171);let a=i.forwardRef((e,t)=>{let{isFollowing:n=!1,hideIcon:a,...l}=e,[d,u]=(0,i.useState)(!1),{t:h}=(0,r.$G)("page");return(0,s.jsx)(c.default,{ref:t,contentClassName:"pl-0.5",icon:a?null:n?d?(0,s.jsx)(o.mT,{}):(0,s.jsx)(o.$k,{}):(0,s.jsx)(o.w$,{}),text:h(n?"lives.view.unfollow":"lives.view.follow.button"),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),...l})});a.displayName="FollowButton",t.default=a},90451:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});var s=n(54728),i=n(64512);function r(e){let{channel:t,onReceived:n,onConnected:r,onDisconnected:o,onRejected:c,params:a={}}=e,l=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let e=(0,i.H)();if(e)return l.current=e.subscriptions.create({channel:t,...a},{received:n,connected:r,disconnected:o,rejected:c}),()=>{var e;null===(e=l.current)||void 0===e||e.unsubscribe()}},[t,n,r,o,c,a]),l.current}},37700:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});var s=n(92964),i=n(14849);let r={getAcceptedCookies:()=>{let e=s.Z.get(i.q.COOKIE_SETTINGS);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},getRestrictedCookie:()=>{let e=s.Z.get(i.q.UAE_REGULATED_CONTENT);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},saveRestrictedCookie:e=>{null===e?s.Z.remove(i.q.UAE_REGULATED_CONTENT):s.Z.set(i.q.UAE_REGULATED_CONTENT,JSON.stringify(e),{expires:365,sameSite:"strict"})},saveCookieSettings:e=>{s.Z.set(i.q.COOKIE_SETTINGS,JSON.stringify(e),{expires:365,sameSite:"strict"}),e.strictlyNecessary,e.performance,e.functional,e.marketing}}},64512:function(e,t,n){"use strict";n.d(t,{A:function(){return l},H:function(){return a}});var s=n(62137),i=n(92964),r=n(44588);let o="wss://api3.viory.video/cable";if(!o)throw Error("WebSocket URI is not defined in environment variables");let c=null,a=()=>{if(!c){let e=i.Z.get(r.wr),t=e?"".concat(o,"?token=").concat(e):o;c=(0,s.zD)(t)}return c},l=()=>{c&&(c.disconnect(),c=null)}},26302:function(e,t,n){"use strict";n.d(t,{YD:function(){return l}});var s=n(54728),i=Object.defineProperty,r=new Map,o=new WeakMap,c=0,a=void 0;function l(){var e;let{threshold:t,delay:n,trackVisibility:i,rootMargin:l,root:d,triggerOnce:u,skip:h,initialInView:p,fallbackInView:f,onChange:m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[g,b]=s.useState(null),v=s.useRef(),[y,x]=s.useState({inView:!!p,entry:void 0});v.current=m,s.useEffect(()=>{let e;if(!h&&g)return e=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a;if(void 0===window.IntersectionObserver&&void 0!==s){let i=e.getBoundingClientRect();return t(s,{isIntersecting:s,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}let{id:i,observer:l,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var n;return"".concat(t,"_").concat("root"===t?(n=e.root)?(o.has(n)||(c+=1,o.set(n,c.toString())),o.get(n)):"0":e[t])}).toString(),n=r.get(t);if(!n){let s;let i=new Map,o=new IntersectionObserver(t=>{t.forEach(t=>{var n;let r=t.isIntersecting&&s.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=r),null==(n=i.get(t.target))||n.forEac
1h(e=>{e(r,t)})})},e);s=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},r.set(t,n)}return n}(n),u=d.get(e)||[];return d.has(e)||d.set(e,u),u.push(t),l.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(d.delete(e),l.unobserve(e)),0===d.size&&(l.disconnect(),r.delete(i))}}(g,(t,n)=>{x({inView:t,entry:n}),v.current&&v.current(t,n),n.isIntersecting&&u&&e&&(e(),e=void 0)},{root:d,rootMargin:l,threshold:t,trackVisibility:i,delay:n},f),()=>{e&&e()}},[Array.isArray(t)?t.toString():t,g,d,l,u,h,i,f,n]);let S=null==(e=y.entry)?void 0:e.target,w=s.useRef();g||!S||u||h||w.current===S||(w.current=S,x({inView:!!p,entry:void 0}));let N=[b,y.inView,y.entry];return N.ref=N[0],N.inView=N[1],N.entry=N[2],N}s.Component}},function(e){e.O(0,[9063,9830,5156,8020,9728,4002,7406,2054,3832,2798,412,9809,5427,1592,6073,3971,4604,3496,6238,7521,771,1666,2021,6920,3818,312,4817,8725,2650,4101,5804,1744],function(){return e(e.s=74482)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.