nixamp 0.78.4 → 0.78.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backtoschool/dist/assets/{ar-CYu0byMf.js → ar-BBh9pRWn.js} +1 -1
- package/backtoschool/dist/assets/{cs-BTTM7DeB.js → cs-DYDz-hZb.js} +1 -1
- package/backtoschool/dist/assets/{da-iixezQtd.js → da-DL0tbrTr.js} +1 -1
- package/backtoschool/dist/assets/{de-Sx3acevR.js → de-POU_MZN1.js} +1 -1
- package/backtoschool/dist/assets/{es-ByCnw8ja.js → es-VLEhXfMp.js} +1 -1
- package/backtoschool/dist/assets/{fi-BCeFoeH5.js → fi-B__GWwbQ.js} +1 -1
- package/backtoschool/dist/assets/{fr-Nz5hMzAE.js → fr-DDtDAMct.js} +1 -1
- package/backtoschool/dist/assets/{hi-x5-IG1rl.js → hi-C6MybeLD.js} +1 -1
- package/backtoschool/dist/assets/{hls-OR5FY6YP-O3qhTXm4.js → hls-OR5FY6YP-CL3tmveA.js} +1 -1
- package/backtoschool/dist/assets/{hu-QqIkGcMe.js → hu-CgiQxTUY.js} +1 -1
- package/backtoschool/dist/assets/{id-OVwO1Uoi.js → id-pzntv5iA.js} +1 -1
- package/backtoschool/dist/assets/{index-Dgqs6yM_.js → index-DeCDKrPz.js} +3 -3
- package/backtoschool/dist/assets/{it-CmssY5Ut.js → it-dKw8vCrE.js} +1 -1
- package/backtoschool/dist/assets/{mpegts-RQlLEU1A.js → mpegts-B6-Xba87.js} +1 -1
- package/backtoschool/dist/assets/{mpegts-Y2FARLFE-y49QH7a5.js → mpegts-Y2FARLFE-MgjbiVoD.js} +1 -1
- package/backtoschool/dist/assets/{nl-VkQxlPku.js → nl-DZ0o7967.js} +1 -1
- package/backtoschool/dist/assets/{ru-Dk8FAbDx.js → ru-s6C6TpM6.js} +1 -1
- package/backtoschool/dist/assets/{sv-CNs1UySx.js → sv-BHj0BZlD.js} +1 -1
- package/backtoschool/dist/assets/{uk-BDB1YayY.js → uk-BH7Y4zb1.js} +1 -1
- package/backtoschool/dist/assets/{vi-DnEIKzy7.js → vi-nf4HfTQk.js} +1 -1
- package/backtoschool/dist/assets/{zh-B_atHA4S.js → zh-CT2P8jxm.js} +1 -1
- package/backtoschool/dist/index.html +3 -3
- package/dist/discovery.d.ts +10 -0
- package/dist/discovery.js +50 -1
- package/dist/oauth-server.js +5 -1
- package/dist/oauth.js +4 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +0 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.js +27 -3
- package/package.json +4 -4
- package/src/discovery.ts +54 -1
- package/src/oauth-server.ts +5 -1
- package/src/oauth.ts +4 -1
- package/src/profiles.ts +0 -0
- package/src/server.ts +28 -3
- package/web/dist/assets/{ar-8AzodHGo.js → ar-7tVGBWgq.js} +1 -1
- package/web/dist/assets/{cs-pKSPaE7T.js → cs-hTmkOWFS.js} +1 -1
- package/web/dist/assets/{da-GxmUyF-u.js → da-218F21ho.js} +1 -1
- package/web/dist/assets/{de-Dq0OmkgE.js → de-DesLnw7U.js} +1 -1
- package/web/dist/assets/{es-ChhsrRIw.js → es-Bc9fW4qY.js} +1 -1
- package/web/dist/assets/{fi-BQoRY6MQ.js → fi-Df_rWRQA.js} +1 -1
- package/web/dist/assets/{fr-B4Y6IEE2.js → fr-D8xzxUiQ.js} +1 -1
- package/web/dist/assets/{hi-MyDymNt3.js → hi-Ddh5AA1z.js} +1 -1
- package/web/dist/assets/{hu-CRH9zkDq.js → hu-ChrJNlJD.js} +1 -1
- package/web/dist/assets/{id-wrUuMdfl.js → id-dNB_py4J.js} +1 -1
- package/web/dist/assets/{it-6FRJDnQB.js → it-DyHyXE3N.js} +1 -1
- package/web/dist/assets/{main-DQiGn1Eq.js → main-D9XA9svM.js} +2 -2
- package/web/dist/assets/{nl-CwZvlnoF.js → nl-DlwRNqNC.js} +1 -1
- package/web/dist/assets/{ru-DgyQwkLP.js → ru--N-8v6QS.js} +1 -1
- package/web/dist/assets/{sv-DpVuR9CV.js → sv-DbR0DO05.js} +1 -1
- package/web/dist/assets/{uk-D5AqY6n6.js → uk-Bi3fEoz1.js} +1 -1
- package/web/dist/assets/{vi-DJuYy8Dl.js → vi-DqrcyLEz.js} +1 -1
- package/web/dist/assets/{zh-CjOPzhF0.js → zh-_4uBqFzc.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/sw.js +19 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={"Nixamp Share link or HTTPS media URL":`Nixamp Share link or HTTPS media URL`,"For TV playback, use a Nixamp Share link or a direct HTTPS media URL. Pairux viewing opens separately.":`For TV playback, use a Nixamp Share link or a direct HTTPS media URL. Pairux viewing opens separately.`,Paused:`Paused`,"Broadcast ended":`Broadcast ended`,"Class broadcast":`Class broadcast`,Play:`Play`,Pause:`Pause`,"Retry playback":`Retry playback`,"Back 10 seconds":`Back 10 seconds`,"Forward 10 seconds":`Forward 10 seconds`,Mute:`Mute`,Unmute:`Unmute`,"Full screen":`Full screen`,"Exit full screen":`Exit full screen`,Playing:`Playing`,"Select Play to watch the broadcast.":`Select Play to watch the broadcast.`,"The broadcast could not be loaded. Try again.":`The broadcast could not be loaded. Try again.`,"This Pairux broadcast opens separately. For playback here on Fire TV, the host needs to share a Nixamp stream or direct media link.":`This Pairux broadcast opens separately. For playback here on Fire TV, the host needs to share a Nixamp stream or direct media link.`,"Open on Pairux":`Open on Pairux`,"Supported platforms":`Supported platforms`,"In review":`In review`,"Not available":`Not available`,"Install PWA":`Install PWA`,"PWA installed":`PWA installed`,"Web app":`Web app`,"Install the web app":`Install the web app`,"Keep BackToSchool on your home screen or desktop. No app store needed.":`Keep BackToSchool on your home screen or desktop. No app store needed.`,"iPhone or iPad: open this site in Safari, tap Share, then Add to Home Screen.":`iPhone or iPad: open this site in Safari, tap Share, then Add to Home Screen.`,"Android: open your browser menu and choose Install app or Add to Home screen.":`Android: open your browser menu and choose Install app or Add to Home screen.`,"Desktop: look for Install in the address bar or browser menu. The option depends on your browser.":`Desktop: look for Install in the address bar or browser menu. The option depends on your browser.`,"You can also keep using BackToSchool in this browser.":`You can also keep using BackToSchool in this browser.`,"The web app is installed. You can keep learning here.":`The web app is installed. You can keep learning here.`,"Continue learning":`Continue learning`,"The install prompt could not open. Select Web app again for installation instructions.":`The install prompt could not open. Select Web app again for installation instructions.`,"Follow host":`Follow host`,Following:`Following`,"You’ll get email and web notifications for this host.":`You’ll get email and web notifications for this host.`,"Notifications turned off for this host.":`Notifications turned off for this host.`,"Could not update notifications.":`Could not update notifications.`},t={...e,"No parties live right now.":`No parties live right now.`,"Could not refresh parties.":`Could not refresh parties.`,"Pick a server in the directory, or paste its link here.":`Pick a server in the directory, or paste its link here.`,"Interface language":`Interface language`,Language:`Language`,"Translation language":`Translation language`,"Original (auto-detect)":`Original (auto-detect)`,Play:`Play`,Pause:`Pause`,Stop:`Stop`,Next:`Next`,Previous:`Previous`,Select:`Select`,"Next/Prev":`Next/Prev`,Quit:`Quit`,"Now Playing":`Now Playing`,"Spectrum Analyser":`Spectrum Analyser`,Playlist:`Playlist`,Files:`Files`,"Open files":`Open files`,"Open folder":`Open folder`,"Add to library":`Add to library`,"Replace playlist":`Replace playlist`,Filter:`Filter`,Search:`Search`,"Nothing loaded.":`Nothing loaded.`,"Empty.":`Empty.`,"Loading…":`Loading…`,"Connecting…":`Connecting…`,Connected:`Connected`,"Not connected":`Not connected`,"No source":`No source`,Playing:`Playing`,Stopped:`Stopped`,Volume:`Volume`,Seek:`Seek`,"Full screen":`Full screen`,Download:`Download`,Share:`Share`,Copy:`Copy`,"Copy link":`Copy link`,Copied:`Copied`,Save:`Save`,Cancel:`Cancel`,Close:`Close`,Remove:`Remove`,Delete:`Delete`,Edit:`Edit`,Add:`Add`,Send:`Send`,Retry:`Retry`,Back:`Back`,"Next page":`Next page`,"Previous page":`Previous page`,"Show more":`Show more`,Panels:`Panels`,"Reset layout":`Reset layout`,Show:`Show`,Hide:`Hide`,Collapse:`Collapse`,Expand:`Expand`,"Move up":`Move up`,"Move down":`Move down`,Install:`Install`,"TV mode":`TV mode`,On:`On`,Off:`Off`,Account:`Account`,"Sign in":`Sign in`,"Sign out":`Sign out`,"Create account":`Create account`,Email:`Email`,Password:`Password`,"Forgot password?":`Forgot password?`,"Welcome back":`Welcome back`,Profile:`Profile`,Handle:`Handle`,"Your servers":`Your servers`,Server:`Server`,Connect:`Connect`,Disconnect:`Disconnect`,Directory:`Directory`,Favourites:`Favourites`,Follow:`Follow`,Unfollow:`Unfollow`,Notifications:`Notifications`,"Phone number":`Phone number`,"Save number":`Save number`,Transcript:`Transcript`,Captions:`Captions`,"Translate audio":`Translate audio`,"Audio language":`Audio language`,"Audio options":`Audio options`,"Keep background sound":`Keep background sound`,"Background level":`Background level`,"Speaker voices":`Speaker voices`,"Any voice":`Any voice`,"Male voice":`Male voice`,"Female voice":`Female voice`,"Original audio.":`Original audio.`,"Buy translated audio":`Buy translated audio`,"Audio credit":`Audio credit`,"Buy pass":`Buy pass`,Pass:`Pass`,"Pay with":`Pay with`,"Check payment":`Check payment`,"Open checkout":`Open checkout`,"Free sessions":`Free sessions`,"Usage rates and expiry":`Usage rates and expiry`,Catalogs:`Catalogs`,"Add catalog":`Add catalog`,"Catalog name":`Catalog name`,Link:`Link`,"Play link":`Play link`,"Go live":`Go live`,Publish:`Publish`,Listen:`Listen`,"Live now":`Live now`,Upcoming:`Upcoming`,Parties:`Parties`,"Join party":`Join party`,"Invite code":`Invite code`,Invite:`Invite`,Chat:`Chat`,"Chat message":`Chat message`,People:`People`,Speaker:`Speaker`,Speakers:`Speakers`,Listener:`Listener`,Moderator:`Moderator`,"Raise hand":`Raise hand`,"Hand raises":`Hand raises`,Questions:`Questions`,Resources:`Resources`,Replay:`Replay`,Schedule:`Schedule`,Event:`Event`,Host:`Host`,About:`About`,Stage:`Stage`,Title:`Title`,Description:`Description`,Topic:`Topic`,Public:`Public`,"Anyone with the link":`Anyone with the link`,"Invited people":`Invited people`,"Who can join":`Who can join`,"Date and time":`Date and time`,"Expected length":`Expected length`,Repeat:`Repeat`,"Does not repeat":`Does not repeat`,"Every day":`Every day`,"Every week":`Every week`,Homepage:`Homepage`,"Host name":`Host name`,"Profile photo URL":`Profile photo URL`,"Broadcast link":`Broadcast link`,"Edit event":`Edit event`,"Save changes":`Save changes`,"Create live":`Create live`,"Schedule class":`Schedule class`,"Start class":`Start class`,"End event":`End event`,"End session":`End session`,"Session ended":`Session ended`,"Event ended":`Event ended`,Cancelled:`Cancelled`,"Replay available":`Replay available`,Join:`Join`,"Create invite":`Create invite`,"Invite as":`Invite as`,"Watch now":`Watch now`,"Start a room":`Start a room`,"Recent replays":`Recent replays`,"Your account":`Your account`,"Write with AI":`Write with AI`,"Suggested title":`Suggested title`,"Suggested description":`Suggested description`,"Suggested topic":`Suggested topic`,"Use these details":`Use these details`,"Learn something live.":`Learn something live.`,"Screen share":`Screen share`,"Upload and broadcast":`Upload and broadcast`,Help:`Help`,"Reload Player":`Reload Player`,"Copy Bundled CLI Path":`Copy Bundled CLI Path`,"Developer tools":`Developer tools`,Undo:`Undo`,Redo:`Redo`,Cut:`Cut`,Paste:`Paste`,"Select all":`Select all`,Status:`Status`,"Activity log":`Activity log`,Admin:`Admin`,"Playback controls":`Playback controls`,"Tracks and folders":`Tracks and folders`,"Original-language captions.":`Original-language captions.`,"Skip to playback controls":`Skip to playback controls`,"Skip to playlist":`Skip to playlist`,"Skip to transcript and translated audio":`Skip to transcript and translated audio`},n={"■ STOPPED":`Stopped`,"▶ PLAYING":`Playing`,LOADING:`Loading…`,"no source":`No source`,"not connected":`Not connected`,"Now playing":`Now Playing`,"● GO LIVE":`Go live`,"● Go live":`Go live`,"⤓ Download":`Download`,"A man's voice":`Male voice`,"A woman's voice":`Female voice`,"Catalogs on this server":`Catalogs`,"Catalog folders":`Catalogs`,"Parties on this server":`Parties`,"Servers streaming now":`Directory`,"Playlist (0)":`Playlist`,"Playlist folders":`Playlist`,"Playlist pages":`Playlist`,"Filter these files":`Filter`,"Filter these entries":`Filter`,"Filter the entries":`Filter`,"Filter the playlist":`Filter`,"Create a free account":`Create account`,"Create one":`Create account`,"Create your account":`Create account`,"New here? Create an account":`Create account`,"Already have an account? Sign in":`Sign in`,"Your NixAmp account":`Your account`,"Your public handle":`Handle`,handle:`Handle`,password:`Password`,"Phone number for texts":`Phone number`,"Back to the player":`Back`,"Share what is playing":`Share`,"Share this stream":`Share`,"Link to this stream":`Link`,"Copy this stream's URL":`Copy link`,"A link to play":`Link`,"A server's link":`Server`,"Close translated audio purchase":`Close`,"Open secure checkout ↗ (new tab)":`Open checkout`,"Checking…":`Loading…`,"Browse the directory":`Directory`,"See what is live":`Live now`,"Join live":`Join`,"Raise Hand":`Raise hand`,"Hand Raises":`Hand raises`,"Hide this":`Hide`,Log:`Activity log`,"Status:":`Status`,"Nixamp player":`Playback controls`,"Nixamp audio and video player":`Playback controls`,"What is being said":`Transcript`,"The room's chat":`Chat`,Trollbox:`Chat`,"A line for the trollbox":`Chat message`,"Say something to the room…":`Chat message`,"Send it":`Send`,"Something to add":`Chat message`,"What to call it":`Catalog name`,"call it something":`Catalog name`,"An m3u catalog to add":`Catalogs`,"On this device":`Play`,"Play on this device":`Play`,"What this is":`About`,"Looking for servers…":`Loading…`,"Finding today’s conversations…":`Loading…`,"Coming up":`Upcoming`,"Listen after class":`Replay`,"Schedule live":`Schedule class`,"Schedule a class":`Schedule class`,"Plan a conversation":`Schedule class`,"Your classroom":`Event`,"Join in":`Join`,"Open a room →":`Start a room`,"Chat message":`Chat message`,"Add to the conversation":`Chat message`,"Create live":`Create live`,"Host stage":`Stage`,"Your host":`Host`,"Class host":`Host`,"Hand raised ✓":`Raise hand`,"Copied ✓":`Copied`,"Screen share with Pairux ↗":`Screen share`,"Upload & broadcast in Nixamp ↗":`Upload and broadcast`,"Open Music Folder…":`Open folder`,"Choose a music folder":`Open folder`,"Main navigation":`Panels`,"Skip to a section":`Panels`},r=[{code:`en`,label:`English`},{code:`de`,label:`Deutsch`},{code:`sv`,label:`Svenska`},{code:`es`,label:`Español`},{code:`fr`,label:`Français`},{code:`it`,label:`Italiano`},{code:`nl`,label:`Nederlands`},{code:`da`,label:`Dansk`},{code:`fi`,label:`Suomi`},{code:`ru`,label:`Русский`},{code:`uk`,label:`Українська`},{code:`cs`,label:`Čeština`},{code:`hu`,label:`Magyar`},{code:`zh`,label:`中文`},{code:`ar`,label:`العربية`},{code:`hi`,label:`हिन्दी`},{code:`vi`,label:`Tiếng Việt`},{code:`id`,label:`Bahasa Indonesia`}],i=`nixamp.ui.language`;function a(e){let t=typeof e==`string`?e.trim().toLowerCase().split(/[-_.@]/)[0]:``;return r.find(e=>e.code===t)?.code??`en`}function o(e,t=[]){let n=e=>{let t=typeof e==`string`?e.trim().toLowerCase().split(/[-_.@]/)[0]:``;return r.find(e=>e.code===t)?.code};return n(e)??t.map(n).find(Boolean)??`en`}var s=`modulepreload`,c=function(e){return`/`+e},l={},u=function(e){return e.pathname.endsWith(`.css`)},d=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},f=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function f(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=c(t,n);let r=f(t),i=u(r);return d(l,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:s,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},p={en:async()=>({default:t}),de:()=>f(()=>import(`./de-Sx3acevR.js`),[]),sv:()=>f(()=>import(`./sv-CNs1UySx.js`),[]),es:()=>f(()=>import(`./es-ByCnw8ja.js`),[]),fr:()=>f(()=>import(`./fr-Nz5hMzAE.js`),[]),it:()=>f(()=>import(`./it-CmssY5Ut.js`),[]),nl:()=>f(()=>import(`./nl-VkQxlPku.js`),[]),da:()=>f(()=>import(`./da-iixezQtd.js`),[]),fi:()=>f(()=>import(`./fi-BCeFoeH5.js`),[]),ru:()=>f(()=>import(`./ru-Dk8FAbDx.js`),[]),uk:()=>f(()=>import(`./uk-BDB1YayY.js`),[]),cs:()=>f(()=>import(`./cs-BTTM7DeB.js`),[]),hu:()=>f(()=>import(`./hu-QqIkGcMe.js`),[]),zh:()=>f(()=>import(`./zh-B_atHA4S.js`),[]),ar:()=>f(()=>import(`./ar-CYu0byMf.js`),[]),hi:()=>f(()=>import(`./hi-x5-IG1rl.js`),[]),vi:()=>f(()=>import(`./vi-DnEIKzy7.js`),[]),id:()=>f(()=>import(`./id-OVwO1Uoi.js`),[])},m=new class{load;code=`en`;get language(){return this.code}constructor(e=async e=>(await p[e]()).default){this.load=e}messages=t;revision=0;numberFormats=new Map;dateFormats=new Map;listeners=new Set;async setLanguage(e){let t=++this.revision,n=a(e),r=await this.load(n);if(t!==this.revision)return!1;this.code=n,this.messages=r,this.numberFormats.clear(),this.dateFormats.clear();for(let e of this.listeners)e();return!0}onChange(e){return this.listeners.add(e),()=>this.listeners.delete(e)}text(e,t={}){let r=this.language!==`en`&&Object.hasOwn(n,e)?n[e]:e,i=Object.hasOwn(this.messages,r)?this.messages[r]:e;return this.language!==`en`&&Object.hasOwn(n,e)&&(i=(e.match(/^[▶■●⤓]\s+/)?.[0]??``)+i+(e.endsWith(` ✓`)?` ✓`:``)),i.replace(/\{([\w]+)\}/g,(e,n)=>Object.hasOwn(t,n)?String(t[n]):e)}number(e,t){let n=JSON.stringify(t??{}),r=this.numberFormats.get(n);return r||(this.numberFormats.size>=64&&this.numberFormats.clear(),r=new Intl.NumberFormat(this.language,t),this.numberFormats.set(n,r)),r.format(e)}date(e,t){let n=JSON.stringify(t??{}),r=this.dateFormats.get(n);return r||(this.dateFormats.size>=64&&this.dateFormats.clear(),r=new Intl.DateTimeFormat(this.language,t),this.dateFormats.set(n,r)),r.format(e)}get direction(){return this.language===`ar`?`rtl`:`ltr`}},h=(e,t)=>m.text(e,t),g=new Map;function _(e,t,n){let r=g.get(e);r||(r=new Map,g.set(e,r)),r.set(t,n),n()}function v(e,t){e instanceof Element&&e.removeAttribute(`data-i18n`);let n=``,r;return _(e,`text`,()=>{r!==void 0&&e.textContent!==r?g.get(e)?.delete(`text`):(n=t()??``,r=n,e.textContent!==n&&(e.textContent=n))}),n}function ee(e,t,n){e.removeAttribute(`data-i18n-${t}`);let r=``,i;return _(e,t,()=>{i!==void 0&&e.getAttribute(t)!==i?g.get(e)?.delete(t):(r=n()??``,i=r,e.getAttribute(t)!==r&&e.setAttribute(t,r))}),r}var y=[`aria-label`,`title`,`placeholder`,`data-title`],b=[`[data-i18n]`,...y.map(e=>`[data-i18n-${e}]`)].join(`,`);function te(e){let t=[...e.querySelectorAll(b)];e instanceof HTMLElement&&e.matches(b)&&t.unshift(e);for(let e of t){if(e.closest(`[translate="no"], [contenteditable="true"]`))continue;let t=e.getAttribute(`data-i18n`);if(t){let n=e.textContent;_(e,`text`,()=>{e.textContent===n?(n=h(t),e.textContent!==n&&(e.textContent=n)):(g.get(e)?.delete(`text`),e.removeAttribute(`data-i18n`))})}for(let t of y){let n=e.getAttribute(`data-i18n-${t}`);if(n){let r=e.getAttribute(t);_(e,t,()=>{e.getAttribute(t)===r?(r=h(n),e.getAttribute(t)!==r&&e.setAttribute(t,r)):(g.get(e)?.delete(t),e.removeAttribute(`data-i18n-${t}`))})}}}}function x(){document.documentElement.lang=m.language,document.documentElement.dir=m.direction;for(let[e,t]of g)if(!e.isConnected)g.delete(e);else for(let e of t.values())e();for(let e of document.querySelectorAll(`[data-ui-language]`))e.value=m.language}var ne=0;async function re(e){let t=++ne;try{if(!await m.setLanguage(e)||t!==ne)return;try{localStorage.setItem(i,m.language)}catch{}window.nixampLanguage?.set(m.language).catch(()=>{})}catch{x()}}async function S(){let e=o(null,navigator.languages);try{e=o(await window.nixampLanguage?.get()??localStorage.getItem(`nixamp.ui.language`),navigator.languages)}catch{}for(let e of document.querySelectorAll(`[data-ui-language]`))e.replaceChildren(...r.map(e=>{let t=new Option(e.label,e.code);return t.lang=e.code,t.dir=`auto`,t})),e.addEventListener(`change`,()=>{re(e.value)});te(document),x(),m.onChange(x),new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&te(e);for(let e of g.keys())e.isConnected||g.delete(e)}).observe(document.body,{childList:!0,subtree:!0}),window.addEventListener(`storage`,e=>{e.key===`nixamp.ui.language`&&m.setLanguage(o(e.newValue,navigator.languages)).catch(()=>{})}),window.nixampLanguage?.subscribe(e=>{e!==m.language&&m.setLanguage(e).catch(()=>{})});try{await m.setLanguage(e)}catch{}}var C=null,w=!1,T=window.matchMedia(`(display-mode: standalone)`).matches||!!navigator.standalone;window.addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),C=e}),window.addEventListener(`appinstalled`,()=>{T=!0,C=null;let e=document.querySelector(`[data-pwa-label]`);e&&v(e,()=>h(`PWA installed`))});function ie(){let e=T?`PWA installed`:`Install PWA`;return`<div class="platforms" role="group" aria-label="Supported platforms" data-i18n-aria-label="Supported platforms">
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={"Nixamp Share link or HTTPS media URL":`Nixamp Share link or HTTPS media URL`,"For TV playback, use a Nixamp Share link or a direct HTTPS media URL. Pairux viewing opens separately.":`For TV playback, use a Nixamp Share link or a direct HTTPS media URL. Pairux viewing opens separately.`,Paused:`Paused`,"Broadcast ended":`Broadcast ended`,"Class broadcast":`Class broadcast`,Play:`Play`,Pause:`Pause`,"Retry playback":`Retry playback`,"Back 10 seconds":`Back 10 seconds`,"Forward 10 seconds":`Forward 10 seconds`,Mute:`Mute`,Unmute:`Unmute`,"Full screen":`Full screen`,"Exit full screen":`Exit full screen`,Playing:`Playing`,"Select Play to watch the broadcast.":`Select Play to watch the broadcast.`,"The broadcast could not be loaded. Try again.":`The broadcast could not be loaded. Try again.`,"This Pairux broadcast opens separately. For playback here on Fire TV, the host needs to share a Nixamp stream or direct media link.":`This Pairux broadcast opens separately. For playback here on Fire TV, the host needs to share a Nixamp stream or direct media link.`,"Open on Pairux":`Open on Pairux`,"Supported platforms":`Supported platforms`,"In review":`In review`,"Not available":`Not available`,"Install PWA":`Install PWA`,"PWA installed":`PWA installed`,"Web app":`Web app`,"Install the web app":`Install the web app`,"Keep BackToSchool on your home screen or desktop. No app store needed.":`Keep BackToSchool on your home screen or desktop. No app store needed.`,"iPhone or iPad: open this site in Safari, tap Share, then Add to Home Screen.":`iPhone or iPad: open this site in Safari, tap Share, then Add to Home Screen.`,"Android: open your browser menu and choose Install app or Add to Home screen.":`Android: open your browser menu and choose Install app or Add to Home screen.`,"Desktop: look for Install in the address bar or browser menu. The option depends on your browser.":`Desktop: look for Install in the address bar or browser menu. The option depends on your browser.`,"You can also keep using BackToSchool in this browser.":`You can also keep using BackToSchool in this browser.`,"The web app is installed. You can keep learning here.":`The web app is installed. You can keep learning here.`,"Continue learning":`Continue learning`,"The install prompt could not open. Select Web app again for installation instructions.":`The install prompt could not open. Select Web app again for installation instructions.`,"Follow host":`Follow host`,Following:`Following`,"You’ll get email and web notifications for this host.":`You’ll get email and web notifications for this host.`,"Notifications turned off for this host.":`Notifications turned off for this host.`,"Could not update notifications.":`Could not update notifications.`},t={...e,"No parties live right now.":`No parties live right now.`,"Could not refresh parties.":`Could not refresh parties.`,"Pick a server in the directory, or paste its link here.":`Pick a server in the directory, or paste its link here.`,"Interface language":`Interface language`,Language:`Language`,"Translation language":`Translation language`,"Original (auto-detect)":`Original (auto-detect)`,Play:`Play`,Pause:`Pause`,Stop:`Stop`,Next:`Next`,Previous:`Previous`,Select:`Select`,"Next/Prev":`Next/Prev`,Quit:`Quit`,"Now Playing":`Now Playing`,"Spectrum Analyser":`Spectrum Analyser`,Playlist:`Playlist`,Files:`Files`,"Open files":`Open files`,"Open folder":`Open folder`,"Add to library":`Add to library`,"Replace playlist":`Replace playlist`,Filter:`Filter`,Search:`Search`,"Nothing loaded.":`Nothing loaded.`,"Empty.":`Empty.`,"Loading…":`Loading…`,"Connecting…":`Connecting…`,Connected:`Connected`,"Not connected":`Not connected`,"No source":`No source`,Playing:`Playing`,Stopped:`Stopped`,Volume:`Volume`,Seek:`Seek`,"Full screen":`Full screen`,Download:`Download`,Share:`Share`,Copy:`Copy`,"Copy link":`Copy link`,Copied:`Copied`,Save:`Save`,Cancel:`Cancel`,Close:`Close`,Remove:`Remove`,Delete:`Delete`,Edit:`Edit`,Add:`Add`,Send:`Send`,Retry:`Retry`,Back:`Back`,"Next page":`Next page`,"Previous page":`Previous page`,"Show more":`Show more`,Panels:`Panels`,"Reset layout":`Reset layout`,Show:`Show`,Hide:`Hide`,Collapse:`Collapse`,Expand:`Expand`,"Move up":`Move up`,"Move down":`Move down`,Install:`Install`,"TV mode":`TV mode`,On:`On`,Off:`Off`,Account:`Account`,"Sign in":`Sign in`,"Sign out":`Sign out`,"Create account":`Create account`,Email:`Email`,Password:`Password`,"Forgot password?":`Forgot password?`,"Welcome back":`Welcome back`,Profile:`Profile`,Handle:`Handle`,"Your servers":`Your servers`,Server:`Server`,Connect:`Connect`,Disconnect:`Disconnect`,Directory:`Directory`,Favourites:`Favourites`,Follow:`Follow`,Unfollow:`Unfollow`,Notifications:`Notifications`,"Phone number":`Phone number`,"Save number":`Save number`,Transcript:`Transcript`,Captions:`Captions`,"Translate audio":`Translate audio`,"Audio language":`Audio language`,"Audio options":`Audio options`,"Keep background sound":`Keep background sound`,"Background level":`Background level`,"Speaker voices":`Speaker voices`,"Any voice":`Any voice`,"Male voice":`Male voice`,"Female voice":`Female voice`,"Original audio.":`Original audio.`,"Buy translated audio":`Buy translated audio`,"Audio credit":`Audio credit`,"Buy pass":`Buy pass`,Pass:`Pass`,"Pay with":`Pay with`,"Check payment":`Check payment`,"Open checkout":`Open checkout`,"Free sessions":`Free sessions`,"Usage rates and expiry":`Usage rates and expiry`,Catalogs:`Catalogs`,"Add catalog":`Add catalog`,"Catalog name":`Catalog name`,Link:`Link`,"Play link":`Play link`,"Go live":`Go live`,Publish:`Publish`,Listen:`Listen`,"Live now":`Live now`,Upcoming:`Upcoming`,Parties:`Parties`,"Join party":`Join party`,"Invite code":`Invite code`,Invite:`Invite`,Chat:`Chat`,"Chat message":`Chat message`,People:`People`,Speaker:`Speaker`,Speakers:`Speakers`,Listener:`Listener`,Moderator:`Moderator`,"Raise hand":`Raise hand`,"Hand raises":`Hand raises`,Questions:`Questions`,Resources:`Resources`,Replay:`Replay`,Schedule:`Schedule`,Event:`Event`,Host:`Host`,About:`About`,Stage:`Stage`,Title:`Title`,Description:`Description`,Topic:`Topic`,Public:`Public`,"Anyone with the link":`Anyone with the link`,"Invited people":`Invited people`,"Who can join":`Who can join`,"Date and time":`Date and time`,"Expected length":`Expected length`,Repeat:`Repeat`,"Does not repeat":`Does not repeat`,"Every day":`Every day`,"Every week":`Every week`,Homepage:`Homepage`,"Host name":`Host name`,"Profile photo URL":`Profile photo URL`,"Broadcast link":`Broadcast link`,"Edit event":`Edit event`,"Save changes":`Save changes`,"Create live":`Create live`,"Schedule class":`Schedule class`,"Start class":`Start class`,"End event":`End event`,"End session":`End session`,"Session ended":`Session ended`,"Event ended":`Event ended`,Cancelled:`Cancelled`,"Replay available":`Replay available`,Join:`Join`,"Create invite":`Create invite`,"Invite as":`Invite as`,"Watch now":`Watch now`,"Start a room":`Start a room`,"Recent replays":`Recent replays`,"Your account":`Your account`,"Write with AI":`Write with AI`,"Suggested title":`Suggested title`,"Suggested description":`Suggested description`,"Suggested topic":`Suggested topic`,"Use these details":`Use these details`,"Learn something live.":`Learn something live.`,"Screen share":`Screen share`,"Upload and broadcast":`Upload and broadcast`,Help:`Help`,"Reload Player":`Reload Player`,"Copy Bundled CLI Path":`Copy Bundled CLI Path`,"Developer tools":`Developer tools`,Undo:`Undo`,Redo:`Redo`,Cut:`Cut`,Paste:`Paste`,"Select all":`Select all`,Status:`Status`,"Activity log":`Activity log`,Admin:`Admin`,"Playback controls":`Playback controls`,"Tracks and folders":`Tracks and folders`,"Original-language captions.":`Original-language captions.`,"Skip to playback controls":`Skip to playback controls`,"Skip to playlist":`Skip to playlist`,"Skip to transcript and translated audio":`Skip to transcript and translated audio`},n={"■ STOPPED":`Stopped`,"▶ PLAYING":`Playing`,LOADING:`Loading…`,"no source":`No source`,"not connected":`Not connected`,"Now playing":`Now Playing`,"● GO LIVE":`Go live`,"● Go live":`Go live`,"⤓ Download":`Download`,"A man's voice":`Male voice`,"A woman's voice":`Female voice`,"Catalogs on this server":`Catalogs`,"Catalog folders":`Catalogs`,"Parties on this server":`Parties`,"Servers streaming now":`Directory`,"Playlist (0)":`Playlist`,"Playlist folders":`Playlist`,"Playlist pages":`Playlist`,"Filter these files":`Filter`,"Filter these entries":`Filter`,"Filter the entries":`Filter`,"Filter the playlist":`Filter`,"Create a free account":`Create account`,"Create one":`Create account`,"Create your account":`Create account`,"New here? Create an account":`Create account`,"Already have an account? Sign in":`Sign in`,"Your NixAmp account":`Your account`,"Your public handle":`Handle`,handle:`Handle`,password:`Password`,"Phone number for texts":`Phone number`,"Back to the player":`Back`,"Share what is playing":`Share`,"Share this stream":`Share`,"Link to this stream":`Link`,"Copy this stream's URL":`Copy link`,"A link to play":`Link`,"A server's link":`Server`,"Close translated audio purchase":`Close`,"Open secure checkout ↗ (new tab)":`Open checkout`,"Checking…":`Loading…`,"Browse the directory":`Directory`,"See what is live":`Live now`,"Join live":`Join`,"Raise Hand":`Raise hand`,"Hand Raises":`Hand raises`,"Hide this":`Hide`,Log:`Activity log`,"Status:":`Status`,"Nixamp player":`Playback controls`,"Nixamp audio and video player":`Playback controls`,"What is being said":`Transcript`,"The room's chat":`Chat`,Trollbox:`Chat`,"A line for the trollbox":`Chat message`,"Say something to the room…":`Chat message`,"Send it":`Send`,"Something to add":`Chat message`,"What to call it":`Catalog name`,"call it something":`Catalog name`,"An m3u catalog to add":`Catalogs`,"On this device":`Play`,"Play on this device":`Play`,"What this is":`About`,"Looking for servers…":`Loading…`,"Finding today’s conversations…":`Loading…`,"Coming up":`Upcoming`,"Listen after class":`Replay`,"Schedule live":`Schedule class`,"Schedule a class":`Schedule class`,"Plan a conversation":`Schedule class`,"Your classroom":`Event`,"Join in":`Join`,"Open a room →":`Start a room`,"Chat message":`Chat message`,"Add to the conversation":`Chat message`,"Create live":`Create live`,"Host stage":`Stage`,"Your host":`Host`,"Class host":`Host`,"Hand raised ✓":`Raise hand`,"Copied ✓":`Copied`,"Screen share with Pairux ↗":`Screen share`,"Upload & broadcast in Nixamp ↗":`Upload and broadcast`,"Open Music Folder…":`Open folder`,"Choose a music folder":`Open folder`,"Main navigation":`Panels`,"Skip to a section":`Panels`},r=[{code:`en`,label:`English`},{code:`de`,label:`Deutsch`},{code:`sv`,label:`Svenska`},{code:`es`,label:`Español`},{code:`fr`,label:`Français`},{code:`it`,label:`Italiano`},{code:`nl`,label:`Nederlands`},{code:`da`,label:`Dansk`},{code:`fi`,label:`Suomi`},{code:`ru`,label:`Русский`},{code:`uk`,label:`Українська`},{code:`cs`,label:`Čeština`},{code:`hu`,label:`Magyar`},{code:`zh`,label:`中文`},{code:`ar`,label:`العربية`},{code:`hi`,label:`हिन्दी`},{code:`vi`,label:`Tiếng Việt`},{code:`id`,label:`Bahasa Indonesia`}],i=`nixamp.ui.language`;function a(e){let t=typeof e==`string`?e.trim().toLowerCase().split(/[-_.@]/)[0]:``;return r.find(e=>e.code===t)?.code??`en`}function o(e,t=[]){let n=e=>{let t=typeof e==`string`?e.trim().toLowerCase().split(/[-_.@]/)[0]:``;return r.find(e=>e.code===t)?.code};return n(e)??t.map(n).find(Boolean)??`en`}var s=`modulepreload`,c=function(e){return`/`+e},l={},u=function(e){return e.pathname.endsWith(`.css`)},d=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},f=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function f(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=c(t,n);let r=f(t),i=u(r);return d(l,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:s,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},p={en:async()=>({default:t}),de:()=>f(()=>import(`./de-POU_MZN1.js`),[]),sv:()=>f(()=>import(`./sv-BHj0BZlD.js`),[]),es:()=>f(()=>import(`./es-VLEhXfMp.js`),[]),fr:()=>f(()=>import(`./fr-DDtDAMct.js`),[]),it:()=>f(()=>import(`./it-dKw8vCrE.js`),[]),nl:()=>f(()=>import(`./nl-DZ0o7967.js`),[]),da:()=>f(()=>import(`./da-DL0tbrTr.js`),[]),fi:()=>f(()=>import(`./fi-B__GWwbQ.js`),[]),ru:()=>f(()=>import(`./ru-s6C6TpM6.js`),[]),uk:()=>f(()=>import(`./uk-BH7Y4zb1.js`),[]),cs:()=>f(()=>import(`./cs-DYDz-hZb.js`),[]),hu:()=>f(()=>import(`./hu-CgiQxTUY.js`),[]),zh:()=>f(()=>import(`./zh-CT2P8jxm.js`),[]),ar:()=>f(()=>import(`./ar-BBh9pRWn.js`),[]),hi:()=>f(()=>import(`./hi-C6MybeLD.js`),[]),vi:()=>f(()=>import(`./vi-nf4HfTQk.js`),[]),id:()=>f(()=>import(`./id-pzntv5iA.js`),[])},m=new class{load;code=`en`;get language(){return this.code}constructor(e=async e=>(await p[e]()).default){this.load=e}messages=t;revision=0;numberFormats=new Map;dateFormats=new Map;listeners=new Set;async setLanguage(e){let t=++this.revision,n=a(e),r=await this.load(n);if(t!==this.revision)return!1;this.code=n,this.messages=r,this.numberFormats.clear(),this.dateFormats.clear();for(let e of this.listeners)e();return!0}onChange(e){return this.listeners.add(e),()=>this.listeners.delete(e)}text(e,t={}){let r=this.language!==`en`&&Object.hasOwn(n,e)?n[e]:e,i=Object.hasOwn(this.messages,r)?this.messages[r]:e;return this.language!==`en`&&Object.hasOwn(n,e)&&(i=(e.match(/^[▶■●⤓]\s+/)?.[0]??``)+i+(e.endsWith(` ✓`)?` ✓`:``)),i.replace(/\{([\w]+)\}/g,(e,n)=>Object.hasOwn(t,n)?String(t[n]):e)}number(e,t){let n=JSON.stringify(t??{}),r=this.numberFormats.get(n);return r||(this.numberFormats.size>=64&&this.numberFormats.clear(),r=new Intl.NumberFormat(this.language,t),this.numberFormats.set(n,r)),r.format(e)}date(e,t){let n=JSON.stringify(t??{}),r=this.dateFormats.get(n);return r||(this.dateFormats.size>=64&&this.dateFormats.clear(),r=new Intl.DateTimeFormat(this.language,t),this.dateFormats.set(n,r)),r.format(e)}get direction(){return this.language===`ar`?`rtl`:`ltr`}},h=(e,t)=>m.text(e,t),g=new Map;function _(e,t,n){let r=g.get(e);r||(r=new Map,g.set(e,r)),r.set(t,n),n()}function v(e,t){e instanceof Element&&e.removeAttribute(`data-i18n`);let n=``,r;return _(e,`text`,()=>{r!==void 0&&e.textContent!==r?g.get(e)?.delete(`text`):(n=t()??``,r=n,e.textContent!==n&&(e.textContent=n))}),n}function ee(e,t,n){e.removeAttribute(`data-i18n-${t}`);let r=``,i;return _(e,t,()=>{i!==void 0&&e.getAttribute(t)!==i?g.get(e)?.delete(t):(r=n()??``,i=r,e.getAttribute(t)!==r&&e.setAttribute(t,r))}),r}var y=[`aria-label`,`title`,`placeholder`,`data-title`],b=[`[data-i18n]`,...y.map(e=>`[data-i18n-${e}]`)].join(`,`);function te(e){let t=[...e.querySelectorAll(b)];e instanceof HTMLElement&&e.matches(b)&&t.unshift(e);for(let e of t){if(e.closest(`[translate="no"], [contenteditable="true"]`))continue;let t=e.getAttribute(`data-i18n`);if(t){let n=e.textContent;_(e,`text`,()=>{e.textContent===n?(n=h(t),e.textContent!==n&&(e.textContent=n)):(g.get(e)?.delete(`text`),e.removeAttribute(`data-i18n`))})}for(let t of y){let n=e.getAttribute(`data-i18n-${t}`);if(n){let r=e.getAttribute(t);_(e,t,()=>{e.getAttribute(t)===r?(r=h(n),e.getAttribute(t)!==r&&e.setAttribute(t,r)):(g.get(e)?.delete(t),e.removeAttribute(`data-i18n-${t}`))})}}}}function x(){document.documentElement.lang=m.language,document.documentElement.dir=m.direction;for(let[e,t]of g)if(!e.isConnected)g.delete(e);else for(let e of t.values())e();for(let e of document.querySelectorAll(`[data-ui-language]`))e.value=m.language}var ne=0;async function re(e){let t=++ne;try{if(!await m.setLanguage(e)||t!==ne)return;try{localStorage.setItem(i,m.language)}catch{}window.nixampLanguage?.set(m.language).catch(()=>{})}catch{x()}}async function S(){let e=o(null,navigator.languages);try{e=o(await window.nixampLanguage?.get()??localStorage.getItem(`nixamp.ui.language`),navigator.languages)}catch{}for(let e of document.querySelectorAll(`[data-ui-language]`))e.replaceChildren(...r.map(e=>{let t=new Option(e.label,e.code);return t.lang=e.code,t.dir=`auto`,t})),e.addEventListener(`change`,()=>{re(e.value)});te(document),x(),m.onChange(x),new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&te(e);for(let e of g.keys())e.isConnected||g.delete(e)}).observe(document.body,{childList:!0,subtree:!0}),window.addEventListener(`storage`,e=>{e.key===`nixamp.ui.language`&&m.setLanguage(o(e.newValue,navigator.languages)).catch(()=>{})}),window.nixampLanguage?.subscribe(e=>{e!==m.language&&m.setLanguage(e).catch(()=>{})});try{await m.setLanguage(e)}catch{}}var C=null,w=!1,T=window.matchMedia(`(display-mode: standalone)`).matches||!!navigator.standalone;window.addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),C=e}),window.addEventListener(`appinstalled`,()=>{T=!0,C=null;let e=document.querySelector(`[data-pwa-label]`);e&&v(e,()=>h(`PWA installed`))});function ie(){let e=T?`PWA installed`:`Install PWA`;return`<div class="platforms" role="group" aria-label="Supported platforms" data-i18n-aria-label="Supported platforms">
|
|
2
2
|
<div class="platform-badges">
|
|
3
3
|
<a class="platform-badge platform-fire-tv" href="https://amzn.to/4cGaS1m">
|
|
4
4
|
<img src="/platform-icons/amazon.svg" width="28" height="28" alt="" />
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<span><small data-i18n="Not available">Not available</small><strong>Google Play</strong></span>
|
|
18
18
|
</button>
|
|
19
19
|
</div>
|
|
20
|
-
</div>`}function ae(){let e=document.querySelector(`#pwa-dialog`);e.querySelector(`[data-pwa-instructions]`).hidden=T,e.querySelector(`[data-pwa-installed]`).hidden=!T,e.open||e.showModal()}document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-install-pwa]`);if(!t||w)return;if(T||!C){ae();return}let n=C;C=null,w=!0,t.setAttribute(`aria-busy`,`true`),n.prompt().catch(()=>{let e=document.querySelector(`#pwa-status`);e&&v(e,()=>h(`The install prompt could not open. Select Web app again for installation instructions.`))}).finally(()=>{w=!1,t.removeAttribute(`aria-busy`)})}),document.querySelector(`#pwa-dialog`).addEventListener(`close`,()=>{document.querySelector(`[data-install-pwa]`)?.focus({preventScroll:!0})});var oe=class extends Error{status;constructor(e,t){super(e),this.status=t}};async function E(e,t={}){let n=await fetch(e,{credentials:`same-origin`,...t,headers:{...t.body?{"content-type":`application/json`}:{},...t.headers}}),r={};try{r=await n.json()}catch{r={}}if(!n.ok)throw new oe(String((r&&typeof r==`object`?r:{}).error??`That did not work.`),n.status);return r}function se(e,t,n=`POST`){return E(e,{method:n,body:JSON.stringify(t)})}function ce(e,t,n){let r=e.querySelector(`#event-ai-write`),i=e.querySelector(`#event-ai-cancel`),a=e.querySelector(`#event-ai-apply`),o=e.querySelector(`#event-ai-preview`),s=e.querySelector(`#event-ai-status`),c={title:e.querySelector(`#event-ai-title`),description:e.querySelector(`#event-ai-description`),topic:e.querySelector(`#event-ai-topic`)},l=null,u=null,d=null,f=t=>e.elements.namedItem(t).value,p=()=>({title:f(`title`),description:f(`description`),topic:f(`topic`),hostName:f(`hostName`),startsAt:f(`startsAt`),timezone:n(),duration:f(`expectedDurationMinutes`),recurrence:f(`recurrence`)});function m(){l?.abort(),l=null,u=null,d=null,o.hidden=!0,o.removeAttribute(`aria-busy`),i.hidden=!0,v(r,()=>h(`Write with AI`)),r.removeAttribute(`aria-disabled`),v(a,()=>h(`Use these details`)),a.setAttribute(`aria-disabled`,`true`),s.textContent=``;for(let e of Object.values(c))e.value=``}return r.addEventListener(`click`,async()=>{if(l||e.getAttribute(`aria-busy`)===`true`)return;let n=p();if(![n.title,n.description,n.topic].some(e=>e.trim())){s.textContent=`Add a title, description, or topic first. Your words become the prompt.`;return}let f=new AbortController;l=f,d=n,u=null,r.setAttribute(`aria-disabled`,`true`),r.textContent=`Writing…`,i.hidden=!1,v(i,()=>h(`Cancel`)),o.hidden=!1,o.setAttribute(`aria-busy`,`true`),v(a,()=>h(`Use these details`)),a.setAttribute(`aria-disabled`,`true`);for(let e of Object.values(c))e.value=``;s.textContent=`Writing a draft from your event details… You can keep editing.`;try{let e=await E(`/api/v1/events/ai-draft`,{method:`POST`,body:JSON.stringify(n),signal:f.signal});if(l!==f||!t.open)return;u=e.draft;for(let e of[`title`,`description`,`topic`])c[e].value=u[e];a.removeAttribute(`aria-disabled`),s.textContent=`Draft ready. Review it below, then use these details if you like them.`}catch(e){if(l!==f||f.signal.aborted)return;s.textContent=e instanceof Error?e.message:`Could not write a draft. Your text is unchanged.`}finally{l===f&&(l=null,o.removeAttribute(`aria-busy`),r.removeAttribute(`aria-disabled`),r.textContent=`Write again`,i.textContent=`Discard draft`)}}),i.addEventListener(`click`,()=>{let e=!!l;m(),s.textContent=e?`Draft cancelled. Your text is unchanged.`:`Draft discarded. Your text is unchanged.`,i.hidden=!1,i.textContent=`Dismiss`}),a.addEventListener(`click`,()=>{if(u&&d&&!l&&a.getAttribute(`aria-disabled`)!==`true`){if(JSON.stringify(p())!==JSON.stringify(d))s.textContent=`Your inputs changed while this draft was being written. Click Write again to include those edits, or copy text from the preview.`;else{for(let t of[`title`,`description`,`topic`])e.elements.namedItem(t).value=u[t];a.setAttribute(`aria-disabled`,`true`),a.textContent=`Details applied`,s.textContent=`Draft applied to your form. Review your event and save when you’re ready.`}}}),t.addEventListener(`close`,m),e.addEventListener(`submit`,()=>{l&&m()}),{reset:m}}function le(e){if(typeof e!=`string`||e.length>2048)return null;try{let t=new URL(e);return t.protocol!==`https:`||t.username||t.password?null:t.href}catch{return null}}function ue(e){let t=le(e);if(!t)return null;let n=new URL(t);if(!n.port&&(n.hostname===`pairux.com`||n.hostname===`www.pairux.com`)){let e=/^\/(?:l|join|embed)\/([A-Za-z0-9_-]{1,64})\/?$/.exec(n.pathname)?.[1];return e?{provider:`pairux`,url:`https://pairux.com/l/${e}`,embed:`https://pairux.com/embed/${e}`,join:`https://pairux.com/join/${e}`}:null}if(!n.port&&(n.hostname===`nixamp.com`||n.hostname===`www.nixamp.com`)){if(n.pathname!==`/`)return null;let e=n.searchParams.get(`url`)||``,t=n.searchParams.get(`play`)||(e?`live`:``);if(/\/admin\//i.test(e)||/\/admin\//i.test(t)||n.searchParams.has(`key`)||e&&!le(e)||!/^(?:live|channel:[^\s]+|track:\d+)$/.test(t)&&!le(t))return null;let r=new URL(`https://nixamp.com/`);e&&r.searchParams.set(`url`,e),r.searchParams.set(`play`,t);let i=r.href;return r.searchParams.set(`embed`,`1`),{provider:`nixamp`,url:i,embed:r.href,join:i}}if(n.hostname.endsWith(`.nixamp.com`)){let e=/^\/station\/([a-z0-9]{10})\/?$/.exec(n.pathname)?.[1],t=n.searchParams.get(`t`)??``;if(e&&/^[A-Za-z0-9_-]{16,64}$/.test(t)&&[...n.searchParams.keys()].every(e=>e===`t`)){let r=`${n.origin}/station/${e}?t=${t}`;return{provider:`station`,url:r,embed:`${n.origin}/api/v1/stations/${e}/stream?t=${t}`,join:r}}}if(n.hostname.endsWith(`.nixamp.com`)&&/^\/view\/[A-Za-z0-9_-]+\/?$/.test(n.pathname)&&!n.search){let e=new URL(`https://nixamp.com/`);return e.searchParams.set(`url`,n.href),e.searchParams.set(`play`,`live`),ue(e.href)}return/\.(?:m3u8|mp4|webm|mp3|m4a|ogg|wav|ts)$/i.test(n.pathname)?{provider:`media`,url:t,embed:t,join:t}:null}var de=[[/\.m3u8$/i,`hls`],[/\.(ts|mts|m2ts|mpegts)$/i,`mpegts`],[/\.(mp3|m4a|aac|oga|ogg|opus|wav|flac)$/i,`audio`],[/\.(mp4|m4v|webm|mov|ogv)$/i,`mp4`]],fe=[[/mpegurl/i,`hls`],[/mp2t|mpeg-?ts/i,`mpegts`],[/^audio\//i,`audio`],[/^video\//i,`mp4`]];function pe(e){if(e.kind)return e.kind;if(e.mimeType){for(let[t,n]of fe)if(t.test(e.mimeType))return n}let t=me(e.src);for(let[e,n]of de)if(e.test(t))return n;return`unknown`}function me(e){try{return new URL(e,`https://placeholder.invalid`).pathname}catch{return e.split(/[?#]/)[0]??e}}function he(e=globalThis,t=null){let n=e.MediaSource!==void 0,r=e.ManagedMediaSource!==void 0,i=!1;try{let e=t??(typeof document>`u`?null:document.createElement(`video`));i=e?e.canPlayType(`application/vnd.apple.mpegurl`)!==``||e.canPlayType(`application/x-mpegURL`)!==``:!1}catch{i=!1}return r?{mediaSource:n,nativeHls:i,managedMediaSource:r}:{mediaSource:n,nativeHls:i}}function ge(e,t){let n=pe(e);switch(n){case`hls`:return t.mediaSource?{engine:`hls`,kind:n}:t.nativeHls?{engine:`native`,kind:n}:{engine:`native`,kind:n,unplayable:`This browser cannot play HLS streams.`};case`mpegts`:return!t.mediaSource&&!t.managedMediaSource?{engine:`mpegts`,kind:n,unplayable:`This browser cannot play transport streams.`}:{engine:`mpegts`,kind:n};default:return{engine:`native`,kind:n}}}async function _e(e,t){let n=t.capabilities??he(),r=ge({src:t.src,...t.kind?{kind:t.kind}:{},...t.mimeType?{mimeType:t.mimeType}:{}},n),i=()=>void 0,a={media:e,src:t.src,isTv:t.isTv??!1,live:t.live??r.kind===`mpegts`,onError:t.onError??i,onNotice:t.onNotice??i,...t.headers?{headers:t.headers}:{},...t.onReady?{onReady:t.onReady}:{}};if(r.unplayable)return t.onError?.(r.unplayable),{destroy:i,engine:r.engine,kind:r.kind,levels:()=>[],unplayable:r.unplayable};let o,s=t.engines?.[r.engine];if(s)o=await s(a);else if(r.engine===`hls`){let{createHlsEngine:e}=await f(async()=>{let{createHlsEngine:e}=await import(`./hls-OR5FY6YP-O3qhTXm4.js`);return{createHlsEngine:e}},[]);o=await e(a)}else if(r.engine===`mpegts`){let{createMpegtsEngine:e}=await f(async()=>{let{createMpegtsEngine:e}=await import(`./mpegts-Y2FARLFE-y49QH7a5.js`);return{createMpegtsEngine:e}},[]);o=await e(a,{withCredentials:t.withCredentials??!1,unplayableAdvice:t.unplayableAdvice??``,...t.unplayableSubject?{unplayableSubject:t.unplayableSubject}:{},...t.onStreamError?{onStreamError:t.onStreamError}:{}})}else{let{createNativeEngine:e}=await f(async()=>{let{createNativeEngine:e}=await import(`./native-C7JTKWJH-BUyIoj0P.js`);return{createNativeEngine:e}},[]);o=await e(a)}return{destroy:()=>{o.destroy()},engine:r.engine,kind:r.kind,levels:o.levels,...o.setLevel?{setLevel:o.setLevel}:{},...o.currentLevel?{currentLevel:o.currentLevel}:{}}}function ve(e){let t=e.trim();if(t===``)return``;/^https?:\/\//i.test(t)||(t=`http://${t}`);let n;try{n=new URL(t)}catch{return``}let r=n.pathname.replace(/\/+$/,``);return r=r.replace(/\/api(\/.*)?$/,``),`${n.origin}${r}`}function ye(e,t,n=``){let r=`${e===``?``:ve(e)}${t.startsWith(`/`)?t:`/${t}`}`;return n?`${r}${r.includes(`?`)?`&`:`?`}k=${encodeURIComponent(n)}`:r}function be(e){let t=e.trim();if(t===``)return{base:``,key:``};let n;try{n=new URL(/^https?:\/\//i.test(t)?t:`http://${t}`)}catch{return{base:``,key:``}}let r=/^\/(?:admin|view|a|v)\/([^/]+)\/?$/.exec(n.pathname),i=r?.[1]??n.searchParams.get(`k`)??``;return r&&(n.pathname=`/`),n.searchParams.delete(`k`),{base:ve(`${n.origin}${n.pathname}`),key:decodeURIComponent(i)}}async function xe(e,t,n=fetch){let r=ue(e);if(!r||r.provider===`pairux`)return null;if(r.provider===`media`)return{src:r.url,live:!1};if(r.provider===`station`){let e=await n(r.embed.replace(/\/stream\?/,`/state?`),{signal:t});if(!e.ok)throw Error(`The broadcast could not be loaded. Try again.`);let i=await e.json();return{src:r.embed,live:!0,kind:i.kind===`video`?`mp4`:`audio`}}let i=new URL(r.url),a=i.searchParams.get(`play`);if(a.startsWith(`https://`))return{src:a,live:!1};let{base:o,key:s}=be(i.searchParams.get(`url`)||`https://nixamp.com`),c=e=>ye(o,e,s);if(a.startsWith(`track:`))return{src:c(`/api/media/${a.slice(6)}`),live:!1};if(a===`live`)return{src:c(`/api/live`),live:!0};let l=await n(c(`/api/streams`),{signal:t});if(!l.ok)throw Error(`The broadcast could not be loaded. Try again.`);let u=await l.json(),d=a.slice(8),f=u.channels?.find(e=>e.id===d)??u.channels?.find(e=>e.name===d);if(!f)throw Error(`The host has not started this broadcast yet. Try again shortly.`);let p=`/api/channels/${encodeURIComponent(f.id)}`;return f.kind===`audio`?{src:c(p),live:!0,kind:`audio`}:{src:c(`${p}/hls/index.m3u8`),live:!0,kind:`hls`}}var Se=/\bAFT\w*\b.*\bSilk\b|\bSilk\b.*\bAFT\w*\b|Android ?TV|Google ?TV|SMART-?TV|Tizen|Web0S|WebOS|BRAVIA|CrKey|Roku|Xbox|PlayStation|HbbTV|NetCast|VIDAA|Viera|AppleTV/i;function Ce(e,t=``,n=1,r=null){let i=new URLSearchParams(t).get(`tv`);return i===null?r!==null&&r!==``?we(r):/\bSilk\b/.test(e)&&n===0?!0:Se.test(e):we(i)}function we(e){return e!==`0`&&e!==`no`&&e!==`off`&&e!==`false`}function Te(){return/BackToSchoolFireTV/i.test(navigator.userAgent)||Ce(navigator.userAgent,location.search,navigator.maxTouchPoints)}function Ee(){Te()&&(document.documentElement.classList.add(`tv`),document.addEventListener(`keydown`,e=>{if(!e.key.startsWith(`Arrow`)||e.altKey||e.ctrlKey||e.metaKey)return;let t=document.activeElement;if(t?.matches(`input, textarea, select, [contenteditable=true]`))return;let n=[...(document.querySelector(`dialog[open]`)??document.querySelector(`.classroom-player.is-expanded`)??document).querySelectorAll(`button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex='0']`)].filter(e=>e.getClientRects().length&&!e.closest(`[hidden], [inert]`)&&getComputedStyle(e).visibility!==`hidden`),r=t?.getBoundingClientRect(),i;if(!r||!n.includes(t))i=n[0];else{let a=e.key===`ArrowLeft`||e.key===`ArrowRight`,o=e.key===`ArrowLeft`||e.key===`ArrowUp`?-1:1,s=1/0;for(let e of n){if(e===t)continue;let n=e.getBoundingClientRect(),c=(n.left+n.right-r.left-r.right)/2,l=(n.top+n.bottom-r.top-r.bottom)/2,u=o*(a?c:l),d=Math.abs(a?l:c);if(u<=1)continue;let f=u+d*3;f<s&&(s=f,i=e)}}e.preventDefault(),i&&(i.focus({preventScroll:!0}),i.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`instant`}))}))}function De(e,t){let n=new AbortController,{signal:r}=n,i=ue(t),a=document.createElement(`p`);a.setAttribute(`role`,`status`),a.className=`player-status`;let o=e=>{r.aborted||v(a,()=>h(e))};if(i?.provider===`pairux`){if(e.append(a),o(`This Pairux broadcast opens separately. For playback here on Fire TV, the host needs to share a Nixamp stream or direct media link.`),!Te()){let t=document.createElement(`a`);t.className=`button button-secondary`,t.href=i.join,t.target=`_blank`,t.rel=`noopener noreferrer`,v(t,()=>h(`Open on Pairux`)),e.append(t)}return()=>n.abort()}let s=document.createElement(`video`);s.playsInline=!0,s.preload=`none`,ee(s,`aria-label`,()=>h(`Class broadcast`));let c=document.createElement(`div`);c.className=`classroom-controls`,e.append(s,c,a);let l=null,u=!1,d=!1,f=!1,p=!1,m=!1,g=(e,t)=>{let n=document.createElement(`button`);return n.type=`button`,n.className=`button button-secondary`,v(n,()=>h(e)),n.addEventListener(`click`,t,{signal:r}),c.append(n),n},_=()=>{r.aborted||(f=!0,o(`The broadcast could not be loaded. Try again.`),v(te,()=>h(`Retry playback`)))},y=()=>v(te,()=>h(f?`Retry playback`:s.paused?`Play`:`Pause`));async function b(){if(!(u||r.aborted)){if(d&&!f&&!s.paused)s.pause();else{u=!0;try{if(!d||f){d=!1,f=!1,l?.destroy(),l=null,o(`Connecting…`);let e=await xe(t,r);if(r.aborted)return;if(!e)throw Error(`No playable source`);p=e.live;let n=await _e(s,{...e,isTv:Te(),onError:_,onReady:e=>{p=e.live,S()}});if(r.aborted){n.destroy();return}if(l=n,n.unplayable)throw Error(n.unplayable);d=!0}await s.play(),o(`Playing`)}catch{r.aborted||_()}finally{u=!1,r.aborted||y()}}}}let te=g(`Play`,()=>{b()});function x(e){!p&&Number.isFinite(s.duration)&&(s.currentTime=Math.max(0,Math.min(s.duration,s.currentTime+e)))}let ne=g(`Back 10 seconds`,()=>x(-10)),re=g(`Forward 10 seconds`,()=>x(10));function S(){let e=p||!Number.isFinite(s.duration)||s.duration<=0;ne.disabled=e,re.disabled=e}S();let C=g(`Mute`,()=>{s.muted=!s.muted});function w(t){m=t,e.classList.toggle(`is-expanded`,t),T.setAttribute(`aria-pressed`,String(t)),v(T,()=>h(t?`Exit full screen`:`Full screen`))}let T=g(`Full screen`,()=>w(!m));T.setAttribute(`aria-pressed`,`false`),s.addEventListener(`play`,y,{signal:r}),s.addEventListener(`pause`,()=>{y(),f||o(`Paused`)},{signal:r}),s.addEventListener(`ended`,()=>{y(),f||o(`Broadcast ended`)},{signal:r}),s.addEventListener(`error`,_,{signal:r}),s.addEventListener(`loadedmetadata`,S,{signal:r}),s.addEventListener(`durationchange`,S,{signal:r}),s.addEventListener(`volumechange`,()=>v(C,()=>h(s.muted?`Unmute`:`Mute`)),{signal:r});let ie=e=>document.querySelector(`dialog[open]`)||document.activeElement?.matches(`input, textarea, select, [contenteditable=true]`)?!1:[`Escape`,`BrowserBack`,`Back`].includes(e)&&m?(w(!1),T.focus({preventScroll:!0}),!0):e===`MediaPlayPause`?(b(),!0):e===`MediaPlay`?(s.paused&&b(),!0):e===`MediaPause`?(s.pause(),!0):e===`MediaRewind`?(x(-10),!0):e===`MediaFastForward`&&(x(10),!0);return document.addEventListener(`keydown`,e=>{if(ie(e.key)&&e.preventDefault(),m&&e.key===`Tab`){let t=[...c.querySelectorAll(`button:not(:disabled)`)],n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus({preventScroll:!0})):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus({preventScroll:!0}))}},{signal:r}),document.addEventListener(`backtoschool-remote`,e=>{ie(e.detail)&&e.preventDefault()},{signal:r}),o(`Select Play to watch the broadcast.`),()=>{n.abort(),l?.destroy(),s.pause(),s.removeAttribute(`src`),s.load(),e.classList.remove(`is-expanded`)}}S(),Ee();var Oe=document.querySelector(`#main`),ke=document.querySelector(`#account-button`),Ae=document.querySelector(`#account-dialog`),D=document.querySelector(`#account-form`),je=document.querySelector(`#account-title`),Me=document.querySelector(`#account-copy`),O=document.querySelector(`#account-error`),Ne=document.querySelector(`#account-mode`),k=document.querySelector(`#event-dialog`),A=document.querySelector(`#event-form`),Pe=document.querySelector(`#event-form-title`),Fe=document.querySelector(`#event-kicker`),Ie=document.querySelector(`#event-submit`),j=document.querySelector(`#event-error`),Le=document.querySelector(`#schedule-fields`),Re=document.querySelector(`#settings-dialog`),M=document.querySelector(`#settings-status`),N=document.querySelector(`#profile-form`),P=document.querySelector(`#profile-error`),ze=document.querySelector(`#profile-photo`),Be=document.querySelector(`#profile-initial`),Ve=document.querySelector(`#profile-photo-file`),He=document.querySelector(`#profile-photo-remove`),Ue=document.querySelector(`#openprofile-form`),We=document.querySelector(`#profile-openprofile`),Ge=document.querySelector(`#openprofile-error`),Ke=document.querySelector(`#nixamp-connection`),qe=document.querySelector(`#nixamp-connect`),F=document.querySelector(`#nixamp-disconnect`),Je=document.querySelector(`#nixamp-streams-field`),I=document.querySelector(`#nixamp-streams`),L=document.querySelector(`#nixamp-streams-note`),Ye=document.querySelector(`#event-host-card`),R=null,z=null,B=null,V=!1,H=!1,Xe=null,Ze=!1,Qe=null,U=null,W=null,$e=ce(A,k,()=>Xe?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone??`UTC`),et=new WeakMap;`serviceWorker`in navigator&&location.protocol===`https:`&&navigator.serviceWorker.register(`/sw.js`).catch(()=>{});function tt(e){let t=atob((e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`)),n=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}async function nt(){if(`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window&&(Notification.permission!=="default"||await Notification.requestPermission()===`granted`)&&Notification.permission===`granted`)try{let e=await navigator.serviceWorker.ready,{publicKey:t}=await(await fetch(`/api/v1/notify/key`)).json();if(!t)return;let n=await e.pushManager.getSubscription()??await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:tt(t)});await fetch(`/api/v1/notify/subscribe`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n.toJSON())})}catch{}}function rt(e,t){et.get(e)===t||e.contains(document.activeElement)||(e.innerHTML=t,et.set(e,t))}function G(e){return String(e??``).replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`)}function it(e){let t=document.querySelector(`#event-update`);t&&t.textContent!==e&&(t.textContent=e),document.querySelector(`.class-update`)?.removeAttribute(`hidden`)}function K(e){return`/live/${encodeURIComponent(e.slug)}`}function q(){let e=new URLSearchParams(location.search).get(`invite`);return e?`?invite=${encodeURIComponent(e)}`:``}function at(e,t={}){return e?new Intl.DateTimeFormat(m.language,{weekday:`short`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,...t}).format(new Date(e)):`Time to be announced`}function J(e){return e.status===`live`?h(`Live now`):e.status===`ended`?e.recordingId?h(`Replay available`):h(`Event ended`):e.status===`cancelled`?h(`Cancelled`):at(e.startsAt)}function ot(e){return W?.permissions.includes(e)??!1}function Y(){v(ke,()=>R?z?.name||R.email.split(`@`)[0]||h(`Account`):h(`Sign in`)),ke.classList.toggle(`signed-in`,!!R)}async function st(){try{R=(await E(`/api/v1/auth/me`)).account}catch{R=null}Y(),await ct()}async function ct(){if(!R){z=null,B=null;return}let[e,t]=await Promise.all([E(`/api/v1/me/profile`).catch(()=>null),E(`/api/v1/nixamp/connection`).catch(()=>null)]);z=e,B=t,Y()}function X(e){R?Q():(Qe=e??null,D.hidden=!1,O.textContent=``,pt(),Ae.showModal())}function Z(){let e=z??{name:``,homepage:``,avatarUrl:``,bio:``,photo:``,card:{hostName:``,homepageUrl:``,avatarUrl:``},openProfile:``,handle:``};for(let t of[`name`,`homepage`,`bio`,`avatarUrl`])N.elements.namedItem(t).value=e[t];let t=e.card.avatarUrl;ze.hidden=t===``,Be.hidden=t!==``,t!==``&&(ze.src=t),Be.textContent=(e.name||R?.email||`?`).slice(0,1).toUpperCase(),He.hidden=e.photo===``,(We.value===``||document.activeElement!==We)&&(We.value=e.openProfile),document.querySelector(`#settings-email`).textContent=R?`Signed in as ${R.email}`:``,lt()}function lt(){let e=B;!e||!e.available?(Ke.textContent=e?`Connecting is not available on this site.`:``,qe.hidden=!0,F.hidden=!0):(qe.hidden=e.connected,F.hidden=!e.connected,Ke.textContent=e.connected?`Connected as @${e.handle||e.nixampUserId} on nixamp.com. Your live streams appear when you go live.`:`Not connected.`)}function Q(e=``){R?(M.textContent=e,P.textContent=``,Ge.textContent=``,Z(),Re.showModal(),ct().then(Z)):X(()=>Q(e))}async function ut(e){P.textContent=``;try{return z=await E(`/api/v1/me/profile`,{method:`PUT`,body:JSON.stringify(e)}),Z(),Y(),!0}catch(e){return P.textContent=e instanceof Error?e.message:`Could not save your profile.`,!1}}function dt(){let e=z?.card;Ye.innerHTML=e&&(e.hostName!==``||e.avatarUrl!==``)?`${e.avatarUrl?`<img class="avatar host-avatar" src="${G(e.avatarUrl)}" alt="" referrerpolicy="no-referrer" />`:`<span class="avatar">${G((e.hostName||`?`).slice(0,1))}</span>`}<div><small data-i18n="Your host card">Your host card</small><strong>${G(e.hostName||h(`Class host`))}</strong>${e.homepageUrl?`<a href="${G(e.homepageUrl)}" target="_blank" rel="noopener noreferrer">${G(new URL(e.homepageUrl).hostname)}</a>`:``}</div><button class="text-button" type="button" data-open-settings data-i18n="Edit in settings">Edit in settings</button>`:`<span class="avatar">?</span><div><strong data-i18n="No host card yet">No host card yet</strong><small>Your name and photo go on every class you host.</small></div><button class="text-button" type="button" data-open-settings data-i18n="Add them in settings">Add them in settings</button>`}async function ft(){let e=B;if(Je.hidden=!0,L.textContent=``,e?.available){if(!e.connected)L.innerHTML=`<button class="text-button" type="button" data-open-settings data-i18n="Connect nixamp to pick one of your streams">Connect nixamp to pick one of your streams</button>`;else{L.textContent=`Looking at your nixamp servers…`;try{let{servers:e}=await E(`/api/v1/nixamp/streams`);for(;I.options.length>1;)I.remove(1);let t=0;for(let n of e){let e=document.createElement(`optgroup`);if(e.label=n.reachable?n.name:`${n.name} (not reachable)`,n.live){let r=new Option(`What ${n.name} is playing now${n.nowPlaying?`: ${n.nowPlaying}`:``}`,n.live);e.append(r),t+=1}for(let r of n.channels)e.append(new Option(`${r.name} (${r.kind}${r.listeners?`, ${r.listeners} listening`:``})`,r.link)),t+=1;e.childElementCount&&I.append(e)}Je.hidden=t===0,L.textContent=t===0?e.length===0?`Your nixamp account remembers no servers yet. Start one, then come back.`:`Nothing is live on your servers right now. Start a channel in nixamp, then pick it here.`:`Picking one fills in the broadcast link below.`}catch(e){L.textContent=e instanceof Error?e.message:`Your nixamp streams could not be read.`}}}}function pt(){v(je,()=>h(V?`Create your account`:`Welcome back`)),Me.textContent=V?`One account for every class on BackToSchool.help. Nothing else to sign up for.`:`Sign in to host, chat, or raise your hand.`,v(Ne,()=>h(V?`Already have an account? Sign in`:`New here? Create an account`)),document.querySelector(`#account-forgot`).hidden=V;let e=D.elements.namedItem(`password`);e.autocomplete=V?`new-password`:`current-password`,v(D.querySelector(`button[type="submit"]`),()=>h(V?`Create account`:`Sign in`))}function mt(e){let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}T${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function ht(e,t=null){if(!R){X(()=>ht(e,t));return}if(Ze)return;Xe=t,$e.reset(),A.reset(),H=e===`scheduled`,Le.hidden=!H,v(Pe,()=>h(t?`Edit event`:H?`Schedule a class`:`Go live`)),v(Fe,()=>t?h(`Your classroom`):`Teach something live`),v(Ie,()=>h(t?`Save changes`:H?`Schedule class`:`Create live`)),j.textContent=``;let n=A.elements.namedItem(`startsAt`);if(n.required=H&&(!t||!!t.startsAt),dt(),ft(),t){for(let e of[`title`,`description`,`topic`,`visibility`,`broadcastUrl`,`recurrence`])A.elements.namedItem(e).value=t[e]??(e===`recurrence`?`none`:``);for(let e of[`chatEnabled`,`handRaiseEnabled`])A.elements.namedItem(e).checked=t[e];t.startsAt&&(n.value=mt(t.startsAt));let e=A.elements.namedItem(`expectedDurationMinutes`),r=String(t.expectedDurationMinutes??60);[...e.options].some(e=>e.value===r)||e.add(new Option(`${r} minutes`,r)),e.value=r}else if(H){let e=new Date(Date.now()+36e5);e.setMinutes(Math.ceil(e.getMinutes()/15)*15,0,0),n.value=mt(e.toISOString())}let r=Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`;document.querySelector(`#schedule-timezone`).textContent=`Date and time are shown in ${r}.`+(t?.recurrence?` This class repeats in ${t.timezone}.`:``),k.showModal()}function gt(e){history.pushState(null,``,e),$()}function _t(e){let t=e.status===`live`||e.status===`starting`;return`
|
|
20
|
+
</div>`}function ae(){let e=document.querySelector(`#pwa-dialog`);e.querySelector(`[data-pwa-instructions]`).hidden=T,e.querySelector(`[data-pwa-installed]`).hidden=!T,e.open||e.showModal()}document.addEventListener(`click`,e=>{let t=e.target.closest(`[data-install-pwa]`);if(!t||w)return;if(T||!C){ae();return}let n=C;C=null,w=!0,t.setAttribute(`aria-busy`,`true`),n.prompt().catch(()=>{let e=document.querySelector(`#pwa-status`);e&&v(e,()=>h(`The install prompt could not open. Select Web app again for installation instructions.`))}).finally(()=>{w=!1,t.removeAttribute(`aria-busy`)})}),document.querySelector(`#pwa-dialog`).addEventListener(`close`,()=>{document.querySelector(`[data-install-pwa]`)?.focus({preventScroll:!0})});var oe=class extends Error{status;constructor(e,t){super(e),this.status=t}};async function E(e,t={}){let n=await fetch(e,{credentials:`same-origin`,...t,headers:{...t.body?{"content-type":`application/json`}:{},...t.headers}}),r={};try{r=await n.json()}catch{r={}}if(!n.ok)throw new oe(String((r&&typeof r==`object`?r:{}).error??`That did not work.`),n.status);return r}function se(e,t,n=`POST`){return E(e,{method:n,body:JSON.stringify(t)})}function ce(e,t,n){let r=e.querySelector(`#event-ai-write`),i=e.querySelector(`#event-ai-cancel`),a=e.querySelector(`#event-ai-apply`),o=e.querySelector(`#event-ai-preview`),s=e.querySelector(`#event-ai-status`),c={title:e.querySelector(`#event-ai-title`),description:e.querySelector(`#event-ai-description`),topic:e.querySelector(`#event-ai-topic`)},l=null,u=null,d=null,f=t=>e.elements.namedItem(t).value,p=()=>({title:f(`title`),description:f(`description`),topic:f(`topic`),hostName:f(`hostName`),startsAt:f(`startsAt`),timezone:n(),duration:f(`expectedDurationMinutes`),recurrence:f(`recurrence`)});function m(){l?.abort(),l=null,u=null,d=null,o.hidden=!0,o.removeAttribute(`aria-busy`),i.hidden=!0,v(r,()=>h(`Write with AI`)),r.removeAttribute(`aria-disabled`),v(a,()=>h(`Use these details`)),a.setAttribute(`aria-disabled`,`true`),s.textContent=``;for(let e of Object.values(c))e.value=``}return r.addEventListener(`click`,async()=>{if(l||e.getAttribute(`aria-busy`)===`true`)return;let n=p();if(![n.title,n.description,n.topic].some(e=>e.trim())){s.textContent=`Add a title, description, or topic first. Your words become the prompt.`;return}let f=new AbortController;l=f,d=n,u=null,r.setAttribute(`aria-disabled`,`true`),r.textContent=`Writing…`,i.hidden=!1,v(i,()=>h(`Cancel`)),o.hidden=!1,o.setAttribute(`aria-busy`,`true`),v(a,()=>h(`Use these details`)),a.setAttribute(`aria-disabled`,`true`);for(let e of Object.values(c))e.value=``;s.textContent=`Writing a draft from your event details… You can keep editing.`;try{let e=await E(`/api/v1/events/ai-draft`,{method:`POST`,body:JSON.stringify(n),signal:f.signal});if(l!==f||!t.open)return;u=e.draft;for(let e of[`title`,`description`,`topic`])c[e].value=u[e];a.removeAttribute(`aria-disabled`),s.textContent=`Draft ready. Review it below, then use these details if you like them.`}catch(e){if(l!==f||f.signal.aborted)return;s.textContent=e instanceof Error?e.message:`Could not write a draft. Your text is unchanged.`}finally{l===f&&(l=null,o.removeAttribute(`aria-busy`),r.removeAttribute(`aria-disabled`),r.textContent=`Write again`,i.textContent=`Discard draft`)}}),i.addEventListener(`click`,()=>{let e=!!l;m(),s.textContent=e?`Draft cancelled. Your text is unchanged.`:`Draft discarded. Your text is unchanged.`,i.hidden=!1,i.textContent=`Dismiss`}),a.addEventListener(`click`,()=>{if(u&&d&&!l&&a.getAttribute(`aria-disabled`)!==`true`){if(JSON.stringify(p())!==JSON.stringify(d))s.textContent=`Your inputs changed while this draft was being written. Click Write again to include those edits, or copy text from the preview.`;else{for(let t of[`title`,`description`,`topic`])e.elements.namedItem(t).value=u[t];a.setAttribute(`aria-disabled`,`true`),a.textContent=`Details applied`,s.textContent=`Draft applied to your form. Review your event and save when you’re ready.`}}}),t.addEventListener(`close`,m),e.addEventListener(`submit`,()=>{l&&m()}),{reset:m}}function le(e){if(typeof e!=`string`||e.length>2048)return null;try{let t=new URL(e);return t.protocol!==`https:`||t.username||t.password?null:t.href}catch{return null}}function ue(e){let t=le(e);if(!t)return null;let n=new URL(t);if(!n.port&&(n.hostname===`pairux.com`||n.hostname===`www.pairux.com`)){let e=/^\/(?:l|join|embed)\/([A-Za-z0-9_-]{1,64})\/?$/.exec(n.pathname)?.[1];return e?{provider:`pairux`,url:`https://pairux.com/l/${e}`,embed:`https://pairux.com/embed/${e}`,join:`https://pairux.com/join/${e}`}:null}if(!n.port&&(n.hostname===`nixamp.com`||n.hostname===`www.nixamp.com`)){if(n.pathname!==`/`)return null;let e=n.searchParams.get(`url`)||``,t=n.searchParams.get(`play`)||(e?`live`:``);if(/\/admin\//i.test(e)||/\/admin\//i.test(t)||n.searchParams.has(`key`)||e&&!le(e)||!/^(?:live|channel:[^\s]+|track:\d+)$/.test(t)&&!le(t))return null;let r=new URL(`https://nixamp.com/`);e&&r.searchParams.set(`url`,e),r.searchParams.set(`play`,t);let i=r.href;return r.searchParams.set(`embed`,`1`),{provider:`nixamp`,url:i,embed:r.href,join:i}}if(n.hostname.endsWith(`.nixamp.com`)){let e=/^\/station\/([a-z0-9]{10})\/?$/.exec(n.pathname)?.[1],t=n.searchParams.get(`t`)??``;if(e&&/^[A-Za-z0-9_-]{16,64}$/.test(t)&&[...n.searchParams.keys()].every(e=>e===`t`)){let r=`${n.origin}/station/${e}?t=${t}`;return{provider:`station`,url:r,embed:`${n.origin}/api/v1/stations/${e}/stream?t=${t}`,join:r}}}if(n.hostname.endsWith(`.nixamp.com`)&&/^\/view\/[A-Za-z0-9_-]+\/?$/.test(n.pathname)&&!n.search){let e=new URL(`https://nixamp.com/`);return e.searchParams.set(`url`,n.href),e.searchParams.set(`play`,`live`),ue(e.href)}return/\.(?:m3u8|mp4|webm|mp3|m4a|ogg|wav|ts)$/i.test(n.pathname)?{provider:`media`,url:t,embed:t,join:t}:null}var de=[[/\.m3u8$/i,`hls`],[/\.(ts|mts|m2ts|mpegts)$/i,`mpegts`],[/\.(mp3|m4a|aac|oga|ogg|opus|wav|flac)$/i,`audio`],[/\.(mp4|m4v|webm|mov|ogv)$/i,`mp4`]],fe=[[/mpegurl/i,`hls`],[/mp2t|mpeg-?ts/i,`mpegts`],[/^audio\//i,`audio`],[/^video\//i,`mp4`]];function pe(e){if(e.kind)return e.kind;if(e.mimeType){for(let[t,n]of fe)if(t.test(e.mimeType))return n}let t=me(e.src);for(let[e,n]of de)if(e.test(t))return n;return`unknown`}function me(e){try{return new URL(e,`https://placeholder.invalid`).pathname}catch{return e.split(/[?#]/)[0]??e}}function he(e=globalThis,t=null){let n=e.MediaSource!==void 0,r=e.ManagedMediaSource!==void 0,i=!1;try{let e=t??(typeof document>`u`?null:document.createElement(`video`));i=e?e.canPlayType(`application/vnd.apple.mpegurl`)!==``||e.canPlayType(`application/x-mpegURL`)!==``:!1}catch{i=!1}return r?{mediaSource:n,nativeHls:i,managedMediaSource:r}:{mediaSource:n,nativeHls:i}}function ge(e,t){let n=pe(e);switch(n){case`hls`:return t.mediaSource?{engine:`hls`,kind:n}:t.nativeHls?{engine:`native`,kind:n}:{engine:`native`,kind:n,unplayable:`This browser cannot play HLS streams.`};case`mpegts`:return!t.mediaSource&&!t.managedMediaSource?{engine:`mpegts`,kind:n,unplayable:`This browser cannot play transport streams.`}:{engine:`mpegts`,kind:n};default:return{engine:`native`,kind:n}}}async function _e(e,t){let n=t.capabilities??he(),r=ge({src:t.src,...t.kind?{kind:t.kind}:{},...t.mimeType?{mimeType:t.mimeType}:{}},n),i=()=>void 0,a={media:e,src:t.src,isTv:t.isTv??!1,live:t.live??r.kind===`mpegts`,onError:t.onError??i,onNotice:t.onNotice??i,...t.headers?{headers:t.headers}:{},...t.onReady?{onReady:t.onReady}:{}};if(r.unplayable)return t.onError?.(r.unplayable),{destroy:i,engine:r.engine,kind:r.kind,levels:()=>[],unplayable:r.unplayable};let o,s=t.engines?.[r.engine];if(s)o=await s(a);else if(r.engine===`hls`){let{createHlsEngine:e}=await f(async()=>{let{createHlsEngine:e}=await import(`./hls-OR5FY6YP-CL3tmveA.js`);return{createHlsEngine:e}},[]);o=await e(a)}else if(r.engine===`mpegts`){let{createMpegtsEngine:e}=await f(async()=>{let{createMpegtsEngine:e}=await import(`./mpegts-Y2FARLFE-MgjbiVoD.js`);return{createMpegtsEngine:e}},[]);o=await e(a,{withCredentials:t.withCredentials??!1,unplayableAdvice:t.unplayableAdvice??``,...t.unplayableSubject?{unplayableSubject:t.unplayableSubject}:{},...t.onStreamError?{onStreamError:t.onStreamError}:{}})}else{let{createNativeEngine:e}=await f(async()=>{let{createNativeEngine:e}=await import(`./native-C7JTKWJH-BUyIoj0P.js`);return{createNativeEngine:e}},[]);o=await e(a)}return{destroy:()=>{o.destroy()},engine:r.engine,kind:r.kind,levels:o.levels,...o.setLevel?{setLevel:o.setLevel}:{},...o.currentLevel?{currentLevel:o.currentLevel}:{}}}function ve(e){let t=e.trim();if(t===``)return``;/^https?:\/\//i.test(t)||(t=`http://${t}`);let n;try{n=new URL(t)}catch{return``}let r=n.pathname.replace(/\/+$/,``);return r=r.replace(/\/api(\/.*)?$/,``),`${n.origin}${r}`}function ye(e,t,n=``){let r=`${e===``?``:ve(e)}${t.startsWith(`/`)?t:`/${t}`}`;return n?`${r}${r.includes(`?`)?`&`:`?`}k=${encodeURIComponent(n)}`:r}function be(e){let t=e.trim();if(t===``)return{base:``,key:``};let n;try{n=new URL(/^https?:\/\//i.test(t)?t:`http://${t}`)}catch{return{base:``,key:``}}let r=/^\/(?:admin|view|a|v)\/([^/]+)\/?$/.exec(n.pathname),i=r?.[1]??n.searchParams.get(`k`)??``;return r&&(n.pathname=`/`),n.searchParams.delete(`k`),{base:ve(`${n.origin}${n.pathname}`),key:decodeURIComponent(i)}}async function xe(e,t,n=fetch){let r=ue(e);if(!r||r.provider===`pairux`)return null;if(r.provider===`media`)return{src:r.url,live:!1};if(r.provider===`station`){let e=await n(r.embed.replace(/\/stream\?/,`/state?`),{signal:t});if(!e.ok)throw Error(`The broadcast could not be loaded. Try again.`);let i=await e.json();return{src:r.embed,live:!0,kind:i.kind===`video`?`mp4`:`audio`}}let i=new URL(r.url),a=i.searchParams.get(`play`);if(a.startsWith(`https://`))return{src:a,live:!1};let{base:o,key:s}=be(i.searchParams.get(`url`)||`https://nixamp.com`),c=e=>ye(o,e,s);if(a.startsWith(`track:`))return{src:c(`/api/media/${a.slice(6)}`),live:!1};if(a===`live`)return{src:c(`/api/live`),live:!0};let l=await n(c(`/api/streams`),{signal:t});if(!l.ok)throw Error(`The broadcast could not be loaded. Try again.`);let u=await l.json(),d=a.slice(8),f=u.channels?.find(e=>e.id===d)??u.channels?.find(e=>e.name===d);if(!f)throw Error(`The host has not started this broadcast yet. Try again shortly.`);let p=`/api/channels/${encodeURIComponent(f.id)}`;return f.kind===`audio`?{src:c(p),live:!0,kind:`audio`}:{src:c(`${p}/hls/index.m3u8`),live:!0,kind:`hls`}}var Se=/\bAFT\w*\b.*\bSilk\b|\bSilk\b.*\bAFT\w*\b|Android ?TV|Google ?TV|SMART-?TV|Tizen|Web0S|WebOS|BRAVIA|CrKey|Roku|Xbox|PlayStation|HbbTV|NetCast|VIDAA|Viera|AppleTV/i;function Ce(e,t=``,n=1,r=null){let i=new URLSearchParams(t).get(`tv`);return i===null?r!==null&&r!==``?we(r):/\bSilk\b/.test(e)&&n===0?!0:Se.test(e):we(i)}function we(e){return e!==`0`&&e!==`no`&&e!==`off`&&e!==`false`}function Te(){return/BackToSchoolFireTV/i.test(navigator.userAgent)||Ce(navigator.userAgent,location.search,navigator.maxTouchPoints)}function Ee(){Te()&&(document.documentElement.classList.add(`tv`),document.addEventListener(`keydown`,e=>{if(!e.key.startsWith(`Arrow`)||e.altKey||e.ctrlKey||e.metaKey)return;let t=document.activeElement;if(t?.matches(`input, textarea, select, [contenteditable=true]`))return;let n=[...(document.querySelector(`dialog[open]`)??document.querySelector(`.classroom-player.is-expanded`)??document).querySelectorAll(`button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex='0']`)].filter(e=>e.getClientRects().length&&!e.closest(`[hidden], [inert]`)&&getComputedStyle(e).visibility!==`hidden`),r=t?.getBoundingClientRect(),i;if(!r||!n.includes(t))i=n[0];else{let a=e.key===`ArrowLeft`||e.key===`ArrowRight`,o=e.key===`ArrowLeft`||e.key===`ArrowUp`?-1:1,s=1/0;for(let e of n){if(e===t)continue;let n=e.getBoundingClientRect(),c=(n.left+n.right-r.left-r.right)/2,l=(n.top+n.bottom-r.top-r.bottom)/2,u=o*(a?c:l),d=Math.abs(a?l:c);if(u<=1)continue;let f=u+d*3;f<s&&(s=f,i=e)}}e.preventDefault(),i&&(i.focus({preventScroll:!0}),i.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`instant`}))}))}function De(e,t){let n=new AbortController,{signal:r}=n,i=ue(t),a=document.createElement(`p`);a.setAttribute(`role`,`status`),a.className=`player-status`;let o=e=>{r.aborted||v(a,()=>h(e))};if(i?.provider===`pairux`){if(e.append(a),o(`This Pairux broadcast opens separately. For playback here on Fire TV, the host needs to share a Nixamp stream or direct media link.`),!Te()){let t=document.createElement(`a`);t.className=`button button-secondary`,t.href=i.join,t.target=`_blank`,t.rel=`noopener noreferrer`,v(t,()=>h(`Open on Pairux`)),e.append(t)}return()=>n.abort()}let s=document.createElement(`video`);s.playsInline=!0,s.preload=`none`,ee(s,`aria-label`,()=>h(`Class broadcast`));let c=document.createElement(`div`);c.className=`classroom-controls`,e.append(s,c,a);let l=null,u=!1,d=!1,f=!1,p=!1,m=!1,g=(e,t)=>{let n=document.createElement(`button`);return n.type=`button`,n.className=`button button-secondary`,v(n,()=>h(e)),n.addEventListener(`click`,t,{signal:r}),c.append(n),n},_=()=>{r.aborted||(f=!0,o(`The broadcast could not be loaded. Try again.`),v(te,()=>h(`Retry playback`)))},y=()=>v(te,()=>h(f?`Retry playback`:s.paused?`Play`:`Pause`));async function b(){if(!(u||r.aborted)){if(d&&!f&&!s.paused)s.pause();else{u=!0;try{if(!d||f){d=!1,f=!1,l?.destroy(),l=null,o(`Connecting…`);let e=await xe(t,r);if(r.aborted)return;if(!e)throw Error(`No playable source`);p=e.live;let n=await _e(s,{...e,isTv:Te(),onError:_,onReady:e=>{p=e.live,S()}});if(r.aborted){n.destroy();return}if(l=n,n.unplayable)throw Error(n.unplayable);d=!0}await s.play(),o(`Playing`)}catch{r.aborted||_()}finally{u=!1,r.aborted||y()}}}}let te=g(`Play`,()=>{b()});function x(e){!p&&Number.isFinite(s.duration)&&(s.currentTime=Math.max(0,Math.min(s.duration,s.currentTime+e)))}let ne=g(`Back 10 seconds`,()=>x(-10)),re=g(`Forward 10 seconds`,()=>x(10));function S(){let e=p||!Number.isFinite(s.duration)||s.duration<=0;ne.disabled=e,re.disabled=e}S();let C=g(`Mute`,()=>{s.muted=!s.muted});function w(t){m=t,e.classList.toggle(`is-expanded`,t),T.setAttribute(`aria-pressed`,String(t)),v(T,()=>h(t?`Exit full screen`:`Full screen`))}let T=g(`Full screen`,()=>w(!m));T.setAttribute(`aria-pressed`,`false`),s.addEventListener(`play`,y,{signal:r}),s.addEventListener(`pause`,()=>{y(),f||o(`Paused`)},{signal:r}),s.addEventListener(`ended`,()=>{y(),f||o(`Broadcast ended`)},{signal:r}),s.addEventListener(`error`,_,{signal:r}),s.addEventListener(`loadedmetadata`,S,{signal:r}),s.addEventListener(`durationchange`,S,{signal:r}),s.addEventListener(`volumechange`,()=>v(C,()=>h(s.muted?`Unmute`:`Mute`)),{signal:r});let ie=e=>document.querySelector(`dialog[open]`)||document.activeElement?.matches(`input, textarea, select, [contenteditable=true]`)?!1:[`Escape`,`BrowserBack`,`Back`].includes(e)&&m?(w(!1),T.focus({preventScroll:!0}),!0):e===`MediaPlayPause`?(b(),!0):e===`MediaPlay`?(s.paused&&b(),!0):e===`MediaPause`?(s.pause(),!0):e===`MediaRewind`?(x(-10),!0):e===`MediaFastForward`&&(x(10),!0);return document.addEventListener(`keydown`,e=>{if(ie(e.key)&&e.preventDefault(),m&&e.key===`Tab`){let t=[...c.querySelectorAll(`button:not(:disabled)`)],n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus({preventScroll:!0})):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus({preventScroll:!0}))}},{signal:r}),document.addEventListener(`backtoschool-remote`,e=>{ie(e.detail)&&e.preventDefault()},{signal:r}),o(`Select Play to watch the broadcast.`),()=>{n.abort(),l?.destroy(),s.pause(),s.removeAttribute(`src`),s.load(),e.classList.remove(`is-expanded`)}}S(),Ee();var Oe=document.querySelector(`#main`),ke=document.querySelector(`#account-button`),Ae=document.querySelector(`#account-dialog`),D=document.querySelector(`#account-form`),je=document.querySelector(`#account-title`),Me=document.querySelector(`#account-copy`),O=document.querySelector(`#account-error`),Ne=document.querySelector(`#account-mode`),k=document.querySelector(`#event-dialog`),A=document.querySelector(`#event-form`),Pe=document.querySelector(`#event-form-title`),Fe=document.querySelector(`#event-kicker`),Ie=document.querySelector(`#event-submit`),j=document.querySelector(`#event-error`),Le=document.querySelector(`#schedule-fields`),Re=document.querySelector(`#settings-dialog`),M=document.querySelector(`#settings-status`),N=document.querySelector(`#profile-form`),P=document.querySelector(`#profile-error`),ze=document.querySelector(`#profile-photo`),Be=document.querySelector(`#profile-initial`),Ve=document.querySelector(`#profile-photo-file`),He=document.querySelector(`#profile-photo-remove`),Ue=document.querySelector(`#openprofile-form`),We=document.querySelector(`#profile-openprofile`),Ge=document.querySelector(`#openprofile-error`),Ke=document.querySelector(`#nixamp-connection`),qe=document.querySelector(`#nixamp-connect`),F=document.querySelector(`#nixamp-disconnect`),Je=document.querySelector(`#nixamp-streams-field`),I=document.querySelector(`#nixamp-streams`),L=document.querySelector(`#nixamp-streams-note`),Ye=document.querySelector(`#event-host-card`),R=null,z=null,B=null,V=!1,H=!1,Xe=null,Ze=!1,Qe=null,U=null,W=null,$e=ce(A,k,()=>Xe?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone??`UTC`),et=new WeakMap;`serviceWorker`in navigator&&location.protocol===`https:`&&navigator.serviceWorker.register(`/sw.js`).catch(()=>{});function tt(e){let t=atob((e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`)),n=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}async function nt(){if(`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window&&(Notification.permission!=="default"||await Notification.requestPermission()===`granted`)&&Notification.permission===`granted`)try{let e=await navigator.serviceWorker.ready,{publicKey:t}=await(await fetch(`/api/v1/notify/key`)).json();if(!t)return;let n=await e.pushManager.getSubscription()??await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:tt(t)});await fetch(`/api/v1/notify/subscribe`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n.toJSON())})}catch{}}function rt(e,t){et.get(e)===t||e.contains(document.activeElement)||(e.innerHTML=t,et.set(e,t))}function G(e){return String(e??``).replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`)}function it(e){let t=document.querySelector(`#event-update`);t&&t.textContent!==e&&(t.textContent=e),document.querySelector(`.class-update`)?.removeAttribute(`hidden`)}function K(e){return`/live/${encodeURIComponent(e.slug)}`}function q(){let e=new URLSearchParams(location.search).get(`invite`);return e?`?invite=${encodeURIComponent(e)}`:``}function at(e,t={}){return e?new Intl.DateTimeFormat(m.language,{weekday:`short`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,...t}).format(new Date(e)):`Time to be announced`}function J(e){return e.status===`live`?h(`Live now`):e.status===`ended`?e.recordingId?h(`Replay available`):h(`Event ended`):e.status===`cancelled`?h(`Cancelled`):at(e.startsAt)}function ot(e){return W?.permissions.includes(e)??!1}function Y(){v(ke,()=>R?z?.name||R.email.split(`@`)[0]||h(`Account`):h(`Sign in`)),ke.classList.toggle(`signed-in`,!!R)}async function st(){try{R=(await E(`/api/v1/auth/me`)).account}catch{R=null}Y(),await ct()}async function ct(){if(!R){z=null,B=null;return}let[e,t]=await Promise.all([E(`/api/v1/me/profile`).catch(()=>null),E(`/api/v1/nixamp/connection`).catch(()=>null)]);z=e,B=t,Y()}function X(e){R?Q():(Qe=e??null,D.hidden=!1,O.textContent=``,pt(),Ae.showModal())}function Z(){let e=z??{name:``,homepage:``,avatarUrl:``,bio:``,photo:``,card:{hostName:``,homepageUrl:``,avatarUrl:``},openProfile:``,handle:``};for(let t of[`name`,`homepage`,`bio`,`avatarUrl`])N.elements.namedItem(t).value=e[t];let t=e.card.avatarUrl;ze.hidden=t===``,Be.hidden=t!==``,t!==``&&(ze.src=t),Be.textContent=(e.name||R?.email||`?`).slice(0,1).toUpperCase(),He.hidden=e.photo===``,(We.value===``||document.activeElement!==We)&&(We.value=e.openProfile),document.querySelector(`#settings-email`).textContent=R?`Signed in as ${R.email}`:``,lt()}function lt(){let e=B;!e||!e.available?(Ke.textContent=e?`Connecting is not available on this site.`:``,qe.hidden=!0,F.hidden=!0):(qe.hidden=e.connected,F.hidden=!e.connected,Ke.textContent=e.connected?`Connected as @${e.handle||e.nixampUserId} on nixamp.com. Your live streams appear when you go live.`:`Not connected.`)}function Q(e=``){R?(M.textContent=e,P.textContent=``,Ge.textContent=``,Z(),Re.showModal(),ct().then(Z)):X(()=>Q(e))}async function ut(e){P.textContent=``;try{return z=await E(`/api/v1/me/profile`,{method:`PUT`,body:JSON.stringify(e)}),Z(),Y(),!0}catch(e){return P.textContent=e instanceof Error?e.message:`Could not save your profile.`,!1}}function dt(){let e=z?.card;Ye.innerHTML=e&&(e.hostName!==``||e.avatarUrl!==``)?`${e.avatarUrl?`<img class="avatar host-avatar" src="${G(e.avatarUrl)}" alt="" referrerpolicy="no-referrer" />`:`<span class="avatar">${G((e.hostName||`?`).slice(0,1))}</span>`}<div><small data-i18n="Your host card">Your host card</small><strong>${G(e.hostName||h(`Class host`))}</strong>${e.homepageUrl?`<a href="${G(e.homepageUrl)}" target="_blank" rel="noopener noreferrer">${G(new URL(e.homepageUrl).hostname)}</a>`:``}</div><button class="text-button" type="button" data-open-settings data-i18n="Edit in settings">Edit in settings</button>`:`<span class="avatar">?</span><div><strong data-i18n="No host card yet">No host card yet</strong><small>Your name and photo go on every class you host.</small></div><button class="text-button" type="button" data-open-settings data-i18n="Add them in settings">Add them in settings</button>`}async function ft(){let e=B;if(Je.hidden=!0,L.textContent=``,e?.available){if(!e.connected)L.innerHTML=`<button class="text-button" type="button" data-open-settings data-i18n="Connect nixamp to pick one of your streams">Connect nixamp to pick one of your streams</button>`;else{L.textContent=`Looking at your nixamp servers…`;try{let{servers:e}=await E(`/api/v1/nixamp/streams`);for(;I.options.length>1;)I.remove(1);let t=0;for(let n of e){let e=document.createElement(`optgroup`);if(e.label=n.reachable?n.name:`${n.name} (not reachable)`,n.live){let r=new Option(`What ${n.name} is playing now${n.nowPlaying?`: ${n.nowPlaying}`:``}`,n.live);e.append(r),t+=1}for(let r of n.channels)e.append(new Option(`${r.name} (${r.kind}${r.listeners?`, ${r.listeners} listening`:``})`,r.link)),t+=1;e.childElementCount&&I.append(e)}Je.hidden=t===0,L.textContent=t===0?e.length===0?`Your nixamp account remembers no servers yet. Start one, then come back.`:`Nothing is live on your servers right now. Start a channel in nixamp, then pick it here.`:`Picking one fills in the broadcast link below.`}catch(e){L.textContent=e instanceof Error?e.message:`Your nixamp streams could not be read.`}}}}function pt(){v(je,()=>h(V?`Create your account`:`Welcome back`)),Me.textContent=V?`One account for every class on BackToSchool.help. Nothing else to sign up for.`:`Sign in to host, chat, or raise your hand.`,v(Ne,()=>h(V?`Already have an account? Sign in`:`New here? Create an account`)),document.querySelector(`#account-forgot`).hidden=V;let e=D.elements.namedItem(`password`);e.autocomplete=V?`new-password`:`current-password`,v(D.querySelector(`button[type="submit"]`),()=>h(V?`Create account`:`Sign in`))}function mt(e){let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}T${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function ht(e,t=null){if(!R){X(()=>ht(e,t));return}if(Ze)return;Xe=t,$e.reset(),A.reset(),H=e===`scheduled`,Le.hidden=!H,v(Pe,()=>h(t?`Edit event`:H?`Schedule a class`:`Go live`)),v(Fe,()=>t?h(`Your classroom`):`Teach something live`),v(Ie,()=>h(t?`Save changes`:H?`Schedule class`:`Create live`)),j.textContent=``;let n=A.elements.namedItem(`startsAt`);if(n.required=H&&(!t||!!t.startsAt),dt(),ft(),t){for(let e of[`title`,`description`,`topic`,`visibility`,`broadcastUrl`,`recurrence`])A.elements.namedItem(e).value=t[e]??(e===`recurrence`?`none`:``);for(let e of[`chatEnabled`,`handRaiseEnabled`])A.elements.namedItem(e).checked=t[e];t.startsAt&&(n.value=mt(t.startsAt));let e=A.elements.namedItem(`expectedDurationMinutes`),r=String(t.expectedDurationMinutes??60);[...e.options].some(e=>e.value===r)||e.add(new Option(`${r} minutes`,r)),e.value=r}else if(H){let e=new Date(Date.now()+36e5);e.setMinutes(Math.ceil(e.getMinutes()/15)*15,0,0),n.value=mt(e.toISOString())}let r=Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`;document.querySelector(`#schedule-timezone`).textContent=`Date and time are shown in ${r}.`+(t?.recurrence?` This class repeats in ${t.timezone}.`:``),k.showModal()}function gt(e){history.pushState(null,``,e),$()}function _t(e){let t=e.status===`live`||e.status===`starting`;return`
|
|
21
21
|
<article class="event-card ${t?`is-live`:``}">
|
|
22
22
|
<a href="${K(e)}" data-link>
|
|
23
23
|
<div class="event-card-top">
|
|
@@ -109,4 +109,4 @@
|
|
|
109
109
|
<div class="region region-primary">${r(`event-header`,`Live classroom`)}${r(`player`,`Watch class`)}${r(`chat`,`Class chat`)}</div>
|
|
110
110
|
<aside class="region region-secondary">${r(`host`,`Meet your host`)}${r(`schedule`,h(`Schedule`))}${R?.id===n.ownerId?r(`event-controls`,`Host controls`):r(`join`,`Join the class`)}${R?.id===n.ownerId&&n.visibility===`private`?`<details class="event-panel"><summary>Invite students</summary>${xt(`invite`,n)}</details>`:``}${r(`share`,`Share class`)}${R?.id===n.ownerId&&n.handRaiseEnabled?r(`hand-raises`,`Raised hands`):n.handRaiseEnabled?r(`raise-hand`,`Ask a question`):``}</aside>
|
|
111
111
|
</div>
|
|
112
|
-
</div>`,Ct(n)}function Ct(e){let t=document.querySelector(`[data-classroom-player]`),n=t?De(t,e.broadcastUrl):()=>{},r=document.querySelector(`#event-audio`),i=r?.dataset.src?_e(r,{src:r.dataset.src,kind:`audio`}):null;document.querySelector(`[data-listen]`)?.addEventListener(`click`,async e=>{let t=e.currentTarget,n=document.querySelector(`#event-audio`);if(n){t.disabled=!0,v(t,()=>h(`Connecting…`));try{await i,await n.play(),t.textContent=`You’re listening`,document.querySelector(`#player-note`).textContent=`Live audio from this NixAmp room.`}catch{t.disabled=!1,t.textContent=`Try listening again`,document.querySelector(`#player-note`).textContent=`The host may still be getting ready. Try again in a moment.`}}});let a=document.querySelector(`#chat-form`);a?.addEventListener(`submit`,t=>{t.preventDefault();let n=a.elements.namedItem(`body`),r=n.value.trim();r&&(n.value=``,se(`/api/v1/events/${encodeURIComponent(e.id)}/chat`,{body:r}).then(()=>wt(e)).catch(e=>{n.placeholder=e instanceof Error?e.message:`Could not send`}))});let o=document.querySelector(`#invite-form`);o?.addEventListener(`submit`,t=>{t.preventDefault();let n=new FormData(o),r=document.querySelector(`#invite-note`);r.textContent=`Creating invite…`,E(`/api/v1/events/${encodeURIComponent(e.id)}/invitations`,{method:`POST`,body:JSON.stringify({email:n.get(`email`),role:n.get(`role`)})}).then(async({inviteUrl:e,sent:t})=>{await navigator.clipboard?.writeText(e).catch(()=>void 0),r.textContent=t?`Invite sent. The link is copied too.`:`Invite link copied: ${e}`,o.reset()}).catch(e=>{r.textContent=e instanceof Error?e.message:`Could not invite`})}),document.querySelector(`[data-raise-hand]`)?.addEventListener(`click`,t=>{let n=t.currentTarget;n.disabled=!0,se(`/api/v1/events/${encodeURIComponent(e.id)}/hand-raises`,{}).then(()=>{v(n,()=>h(`Hand raised ✓`))}).catch(e=>{n.disabled=!1,n.textContent=e instanceof oe&&e.status===401?`Sign in to raise hand`:`Try again`})}),document.querySelector(`[data-edit-event]`)?.addEventListener(`click`,()=>ht(`scheduled`,W.event));let s=document.querySelector(`[data-follow-owner]`);if(s){let e=s.dataset.followOwner??``;E(`/api/v1/follows/${encodeURIComponent(e)}`).then(({following:e})=>{s.dataset.following=e?`yes`:`no`,v(s,()=>h(e?`Following`:`Follow host`))}).catch(()=>void 0),s.addEventListener(`click`,()=>{if(!R){X(()=>void $());return}let t=s.dataset.following===`yes`;s.disabled=!0,E(`/api/v1/follows/${encodeURIComponent(e)}`,{method:t?`DELETE`:`PUT`,body:t?void 0:`{}`}).then(({following:e})=>{s.dataset.following=e?`yes`:`no`,v(s,()=>h(e?`Following`:`Follow host`));let t=document.querySelector(`#follow-note`);t&&v(t,()=>h(e?`You’ll get email and web notifications for this host.`:`Notifications turned off for this host.`)),e&&nt()}).catch(e=>{let t=document.querySelector(`#follow-note`);t&&(t.textContent=e instanceof Error?e.message:`Could not update notifications.`)}).finally(()=>{s.disabled=!1})})}document.querySelector(`[data-start-event]`)?.addEventListener(`click`,()=>void Dt()),document.querySelector(`[data-dismiss-update]`)?.addEventListener(`click`,()=>document.querySelector(`.class-update`).hidden=!0),document.querySelector(`[data-refresh-event]`)?.addEventListener(`click`,()=>gt(K(e)+q())),document.querySelector(`[data-end-event]`)?.addEventListener(`click`,()=>void Ot()),document.querySelector(`[data-copy]`)?.addEventListener(`click`,async e=>{await navigator.clipboard.writeText(location.href),v(e.currentTarget,()=>h(`Copied ✓`))});let c=0,l=0;e.chatEnabled&&(wt(e),c=window.setInterval(()=>void wt(e),4e3),l=ot(`event.moderate`)?window.setInterval(()=>void Tt(e),3e3):0,Tt(e));let u=e.version,d=window.setInterval(()=>void E(`/api/v1/events/${encodeURIComponent(e.id)}${q()}`).then(e=>{if(e.event.version===W?.event.version||e.event.version===u)return;u=e.event.version;let t=document.querySelector(`.event-heading .status-pill`),n=J(e.event);t&&t.textContent!==n&&(t.textContent=n,t.classList.toggle(`status-live`,e.event.status===`live`)),it(`The host updated this class. Refresh the details when you’re ready.`)}).catch(()=>void 0),5e3);U=()=>{n(),i?.then(e=>e.destroy()),clearInterval(c),clearInterval(l),clearInterval(d)},Et(e)}async function wt(e){let t=document.querySelector(`#chat-messages`);if(t)try{let{messages:n}=await E(`/api/v1/events/${encodeURIComponent(e.id)}/chat${q()}`);rt(t,n.length?n.map(e=>`<div class="chat-message"><span class="avatar avatar-small">${G(e.authorName.slice(0,1).toUpperCase())}</span><p><strong>${G(e.authorName)}</strong><span>${G(e.body)}</span></p></div>`).join(``):`<p class="muted">No messages yet. Say hello when you’re ready.</p>`)}catch{t.innerHTML=`<p class="muted">Chat is taking a break. You can still watch the class.</p>`}}async function Tt(e){let t=document.querySelector(`#hand-raises`);if(t&&ot(`event.moderate`))try{let{handRaises:n}=await E(`/api/v1/events/${encodeURIComponent(e.id)}/hand-raises`);if(t.contains(document.activeElement))return;rt(t,n.length?n.map(e=>`<div class="raise-row"><span><strong>${G(e.displayName)}</strong><small>${G(e.state)}</small></span><div><button class="text-button" data-hand="${G(e.accountId)}" data-state="invited"><span data-i18n="Invite">Invite</span></button><button class="text-button" data-hand="${G(e.accountId)}" data-state="dismissed">Dismiss</button></div></div>`).join(``):`<p class="muted">No hands raised.</p>`)}catch{t.contains(document.activeElement)||(t.innerHTML=`<p class="muted">Could not refresh hand raises.</p>`)}}async function Et(e){let t=document.querySelector(`#listener-count`);if(t)try{let{channels:n}=await E(`/api/channels`);t.textContent=String(n.find(t=>t.id===e.roomId)?.listeners??0)}catch{t.textContent=`0`}}async function Dt(){if(!W)return;let e=document.querySelector(`#broadcast-note`),t=document.querySelector(`[data-start-event]`);if(!W.event.broadcastUrl)e&&(e.textContent=`Add a Pairux or Nixamp broadcast link with Edit event first.`);else if(t?.getAttribute(`aria-disabled`)!==`true`){t?.setAttribute(`aria-disabled`,`true`);try{W=await E(`/api/v1/events/${encodeURIComponent(W.event.id)}/start`,{method:`POST`,body:JSON.stringify({version:W.event.version})}),t&&(t.textContent=`Class is live`),document.querySelector(`[data-end-event]`)?.removeAttribute(`hidden`);let n=document.querySelector(`.event-heading .status-pill`);n&&(v(n,()=>h(`Live now`)),n.classList.add(`status-live`)),e&&(e.textContent=`Your class is live. Viewers can join using this page.`)}catch(n){t?.removeAttribute(`aria-disabled`),e&&(e.textContent=n instanceof Error?n.message:`Could not start the class.`)}}}async function Ot(){let e=document.querySelector(`[data-end-event]`);if(!W||e?.getAttribute(`aria-disabled`)===`true`)return;e?.setAttribute(`aria-disabled`,`true`);let t=W.event;try{let e=await E(`/api/v1/events/${encodeURIComponent(t.id)}/end`,{method:`POST`,body:JSON.stringify({version:t.version})});W=e;let n=document.querySelector(`.event-heading .status-pill`);n&&(n.textContent=J(e.event),n.classList.remove(`status-live`)),await fetch(`/api/channels/${encodeURIComponent(t.roomId)}`,{method:`DELETE`,credentials:`same-origin`});let r=document.querySelector(`#broadcast-note`);r&&(r.textContent=e.event.recurrence?`Session ended. Next class: ${at(e.event.startsAt)}. End the broadcast in Pairux or Nixamp too.`:`Event ended. End the broadcast in Pairux or Nixamp too.`);let i=document.querySelector(`[data-end-event]`);i&&(v(i,()=>h(`Session ended`)),i.setAttribute(`aria-disabled`,`true`)),it(`This session has ended. Refresh to see the latest schedule.`)}catch(t){e?.removeAttribute(`aria-disabled`);let n=document.querySelector(`#broadcast-note`);n&&(n.textContent=t instanceof Error?t.message:`Could not end the event.`)}}async function $(){U?.(),U=null,W=null;let e=/^\/live\/([^/]+)\/?$/.exec(location.pathname);try{e?await St(decodeURIComponent(e[1])):await vt()}catch(e){Oe.innerHTML=`<section class="error-page"><span class="eyebrow">Class dismissed?</span><h1>${G(e instanceof oe&&e.status===404?`That live event isn’t available.`:`We couldn’t open this page.`)}</h1><p>${G(e instanceof Error?e.message:`Try again in a moment.`)}</p><a href="/" data-link class="button button-primary">Back to live events</a></section>`}}ke.addEventListener(`click`,()=>{R?Q():X()}),document.querySelector(`#settings-signout`).addEventListener(`click`,()=>{R&&E(`/api/v1/auth/logout`,{method:`POST`}).finally(()=>{R=null,z=null,B=null,Y(),Re.close(),$()})}),N.addEventListener(`submit`,e=>{e.preventDefault();let t=new FormData(N),n=N.querySelector(`button[type="submit"]`);n.disabled=!0,ut({name:t.get(`name`),homepage:t.get(`homepage`),bio:t.get(`bio`),avatarUrl:t.get(`avatarUrl`)}).then(e=>{e&&(M.textContent=`Saved. Every class you host shows this.`)}).finally(()=>{n.disabled=!1})}),Ve.addEventListener(`change`,()=>{let e=Ve.files?.[0];e&&(P.textContent=``,e.size>1048576?(P.textContent=`A photo may be up to 1 MB.`,Ve.value=``):fetch(`/api/v1/me/profile/photo`,{method:`PUT`,credentials:`same-origin`,body:e}).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error??`That photo could not be kept.`);z=t,Z(),M.textContent=`Photo saved.`}).catch(e=>{P.textContent=e instanceof Error?e.message:`That photo could not be kept.`}).finally(()=>{Ve.value=``}))}),He.addEventListener(`click`,()=>{E(`/api/v1/me/profile/photo`,{method:`DELETE`}).then(e=>{z=e,Z(),M.textContent=`Photo removed.`}).catch(e=>{P.textContent=e instanceof Error?e.message:`Could not remove the photo.`})}),Ue.addEventListener(`submit`,e=>{e.preventDefault(),Ge.textContent=``;let t=Ue.querySelector(`button[type="submit"]`);t.disabled=!0,E(`/api/v1/me/profile/import`,{method:`POST`,body:JSON.stringify({url:We.value.trim()})}).then(e=>{z=e,Z(),Y(),M.textContent=`Filled from your OpenProfile.`}).catch(e=>{Ge.textContent=e instanceof Error?e.message:`That profile could not be read.`}).finally(()=>{t.disabled=!1})}),F.addEventListener(`click`,()=>{F.disabled=!0,E(`/api/v1/nixamp/connection`,{method:`DELETE`}).then(()=>ct()).then(()=>{Z(),M.textContent=`nixamp disconnected. Your classes here are untouched.`}).finally(()=>{F.disabled=!1})}),I.addEventListener(`change`,()=>{I.value!==``&&(A.elements.namedItem(`broadcastUrl`).value=I.value)}),Ne.addEventListener(`click`,()=>{V=!V,O.textContent=``,pt()}),D.addEventListener(`submit`,e=>{e.preventDefault();let t=new FormData(D),n=D.querySelector(`button[type="submit"]`);n.disabled=!0,O.textContent=``,E(`/api/v1/auth/${V?`signup`:`login`}`,{method:`POST`,body:JSON.stringify({email:t.get(`email`),password:t.get(`password`)})}).then(e=>{R=e.account,Y(),ct(),D.reset(),Ae.close();let t=Qe;Qe=null,t?t():$()}).catch(e=>{O.textContent=e instanceof Error?e.message:`That did not work.`}).finally(()=>{n.disabled=!1})}),A.querySelector(`[name="recurrence"]`)?.addEventListener(`change`,()=>{A.elements.namedItem(`recurrence`).value!==`none`&&(H=!0,Le.hidden=!1,A.elements.namedItem(`startsAt`).required=!0)}),A.addEventListener(`submit`,e=>{if(e.preventDefault(),Ze)return;let t=new FormData(A),n=Xe,r=String(t.get(`startsAt`)??``),i=!n?.startsAt||r!==mt(n.startsAt),a=String(t.get(`recurrence`));if(a!==`none`&&!r&&!H){H=!0,Le.hidden=!1,A.elements.namedItem(`startsAt`).required=!0,j.textContent=`Choose the first class date and time for this recurring schedule.`;return}Ze=!0,Ie.setAttribute(`aria-disabled`,`true`),A.setAttribute(`aria-busy`,`true`),j.textContent=``;let o={title:t.get(`title`),description:t.get(`description`),topic:t.get(`topic`),visibility:t.get(`visibility`),broadcastUrl:t.get(`broadcastUrl`),recurrence:a,chatEnabled:t.get(`chatEnabled`)===`on`,handRaiseEnabled:t.get(`handRaiseEnabled`)===`on`,...n?{version:n.version}:{kind:`class`},...H?{startsAt:r?i?new Date(r).toISOString():n.startsAt:null,timezone:i?Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`:n.timezone,expectedDurationMinutes:Number(t.get(`expectedDurationMinutes`))}:{}};E(n?`/api/v1/events/${encodeURIComponent(n.id)}`:`/api/v1/events`,{method:n?`PATCH`:`POST`,body:JSON.stringify(o)}).then(async e=>{n?(await St(e.event.slug),k.close(),document.querySelector(`[data-edit-event]`)?.focus({preventScroll:!0})):(k.close(),gt(K(e.event))),A.reset(),Xe=null}).catch(e=>{j.textContent=e instanceof Error?e.message:`Could not save the event.`}).finally(()=>{Ze=!1,Ie.removeAttribute(`aria-disabled`),A.removeAttribute(`aria-busy`)})}),document.addEventListener(`click`,e=>{let t=e.target,n=t.closest(`a[data-link]`);if(n&&n.origin===location.origin){e.preventDefault(),gt(`${n.pathname}${n.search}`);return}let r=t.closest(`[data-event-mode]`)?.dataset.eventMode;(r===`live`||r===`scheduled`)&&ht(r),t.closest(`[data-sign-in]`)&&X(()=>void $()),t.closest(`[data-open-settings]`)&&(k.close(),Q());let i=t.closest(`[data-close]`);i&&i.closest(`dialog`)?.close();let a=t.closest(`[data-hand]`);a&&W&&(a.disabled=!0,se(`/api/v1/events/${encodeURIComponent(W.event.id)}/hand-raises/${encodeURIComponent(a.dataset.hand??``)}`,{state:a.dataset.state},`PATCH`).then(()=>Tt(W.event)).finally(()=>{a.disabled=!1}))}),window.addEventListener(`popstate`,()=>void $());function kt(){let e=new URLSearchParams(location.search),t=e.get(`nixamp`);if(!t)return``;let n=e.get(`reason`)??``;return history.replaceState(null,``,`${location.pathname}${location.hash}`),t===`connected`?`nixamp connected. Your live streams appear when you go live.`:t===`denied`?`You said not now on nixamp.com. Nothing was connected.`:`nixamp could not be connected${n?`: ${n}`:`.`}`}st().then(()=>{let e=kt();return(e!==``||location.hash===`#settings`)&&(location.hash===`#settings`&&history.replaceState(null,``,location.pathname),Q(e)),$()});export{e as n,f as t};
|
|
112
|
+
</div>`,Ct(n)}function Ct(e){let t=document.querySelector(`[data-classroom-player]`),n=t?De(t,e.broadcastUrl):()=>{},r=document.querySelector(`#event-audio`),i=r?.dataset.src?_e(r,{src:r.dataset.src,kind:`audio`}):null;document.querySelector(`[data-listen]`)?.addEventListener(`click`,async e=>{let t=e.currentTarget,n=document.querySelector(`#event-audio`);if(n){t.disabled=!0,v(t,()=>h(`Connecting…`));try{await i,await n.play(),t.textContent=`You’re listening`,document.querySelector(`#player-note`).textContent=`Live audio from this NixAmp room.`}catch{t.disabled=!1,t.textContent=`Try listening again`,document.querySelector(`#player-note`).textContent=`The host may still be getting ready. Try again in a moment.`}}});let a=document.querySelector(`#chat-form`);a?.addEventListener(`submit`,t=>{t.preventDefault();let n=a.elements.namedItem(`body`),r=n.value.trim();r&&(n.value=``,se(`/api/v1/events/${encodeURIComponent(e.id)}/chat`,{body:r}).then(()=>wt(e)).catch(e=>{n.placeholder=e instanceof Error?e.message:`Could not send`}))});let o=document.querySelector(`#invite-form`);o?.addEventListener(`submit`,t=>{t.preventDefault();let n=new FormData(o),r=document.querySelector(`#invite-note`);r.textContent=`Creating invite…`,E(`/api/v1/events/${encodeURIComponent(e.id)}/invitations`,{method:`POST`,body:JSON.stringify({email:n.get(`email`),role:n.get(`role`)})}).then(async({inviteUrl:e,sent:t})=>{await navigator.clipboard?.writeText(e).catch(()=>void 0),r.textContent=t?`Invite sent. The link is copied too.`:`Invite link copied: ${e}`,o.reset()}).catch(e=>{r.textContent=e instanceof Error?e.message:`Could not invite`})}),document.querySelector(`[data-raise-hand]`)?.addEventListener(`click`,t=>{let n=t.currentTarget;n.disabled=!0,se(`/api/v1/events/${encodeURIComponent(e.id)}/hand-raises`,{}).then(()=>{v(n,()=>h(`Hand raised ✓`))}).catch(e=>{n.disabled=!1,n.textContent=e instanceof oe&&e.status===401?`Sign in to raise hand`:`Try again`})}),document.querySelector(`[data-edit-event]`)?.addEventListener(`click`,()=>ht(`scheduled`,W.event));let s=document.querySelector(`[data-follow-owner]`);if(s){let e=s.dataset.followOwner??``;E(`/api/v1/follows/${encodeURIComponent(e)}`).then(({following:e})=>{s.dataset.following=e?`yes`:`no`,v(s,()=>h(e?`Following`:`Follow host`))}).catch(()=>void 0),s.addEventListener(`click`,()=>{if(!R){X(()=>void $());return}let t=s.dataset.following===`yes`;s.disabled=!0,E(`/api/v1/follows/${encodeURIComponent(e)}`,{method:t?`DELETE`:`PUT`,body:t?void 0:`{}`}).then(({following:e})=>{s.dataset.following=e?`yes`:`no`,v(s,()=>h(e?`Following`:`Follow host`));let t=document.querySelector(`#follow-note`);t&&v(t,()=>h(e?`You’ll get email and web notifications for this host.`:`Notifications turned off for this host.`)),e&&nt()}).catch(e=>{let t=document.querySelector(`#follow-note`);t&&(t.textContent=e instanceof Error?e.message:`Could not update notifications.`)}).finally(()=>{s.disabled=!1})})}document.querySelector(`[data-start-event]`)?.addEventListener(`click`,()=>void Dt()),document.querySelector(`[data-dismiss-update]`)?.addEventListener(`click`,()=>document.querySelector(`.class-update`).hidden=!0),document.querySelector(`[data-refresh-event]`)?.addEventListener(`click`,()=>gt(K(e)+q())),document.querySelector(`[data-end-event]`)?.addEventListener(`click`,()=>void Ot()),document.querySelector(`[data-copy]`)?.addEventListener(`click`,async e=>{await navigator.clipboard.writeText(location.href),v(e.currentTarget,()=>h(`Copied ✓`))});let c=0,l=0;e.chatEnabled&&(wt(e),c=window.setInterval(()=>void wt(e),4e3),l=ot(`event.moderate`)?window.setInterval(()=>void Tt(e),3e3):0,Tt(e));let u=e.version,d=window.setInterval(()=>void E(`/api/v1/events/${encodeURIComponent(e.id)}${q()}`).then(e=>{if(e.event.version===W?.event.version||e.event.version===u)return;u=e.event.version;let t=document.querySelector(`.event-heading .status-pill`),n=J(e.event);t&&t.textContent!==n&&(t.textContent=n,t.classList.toggle(`status-live`,e.event.status===`live`)),it(`The host updated this class. Refresh the details when you’re ready.`)}).catch(()=>void 0),5e3);U=()=>{n(),i?.then(e=>e.destroy()),clearInterval(c),clearInterval(l),clearInterval(d)},Et(e)}async function wt(e){let t=document.querySelector(`#chat-messages`);if(t)try{let{messages:n}=await E(`/api/v1/events/${encodeURIComponent(e.id)}/chat${q()}`);rt(t,n.length?n.map(e=>`<div class="chat-message"><span class="avatar avatar-small">${G(e.authorName.slice(0,1).toUpperCase())}</span><p><strong>${G(e.authorName)}</strong><span>${G(e.body)}</span></p></div>`).join(``):`<p class="muted">No messages yet. Say hello when you’re ready.</p>`)}catch{t.innerHTML=`<p class="muted">Chat is taking a break. You can still watch the class.</p>`}}async function Tt(e){let t=document.querySelector(`#hand-raises`);if(t&&ot(`event.moderate`))try{let{handRaises:n}=await E(`/api/v1/events/${encodeURIComponent(e.id)}/hand-raises`);if(t.contains(document.activeElement))return;rt(t,n.length?n.map(e=>`<div class="raise-row"><span><strong>${G(e.displayName)}</strong><small>${G(e.state)}</small></span><div><button class="text-button" data-hand="${G(e.accountId)}" data-state="invited"><span data-i18n="Invite">Invite</span></button><button class="text-button" data-hand="${G(e.accountId)}" data-state="dismissed">Dismiss</button></div></div>`).join(``):`<p class="muted">No hands raised.</p>`)}catch{t.contains(document.activeElement)||(t.innerHTML=`<p class="muted">Could not refresh hand raises.</p>`)}}async function Et(e){let t=document.querySelector(`#listener-count`);if(t)try{let{channels:n}=await E(`/api/channels`);t.textContent=String(n.find(t=>t.id===e.roomId)?.listeners??0)}catch{t.textContent=`0`}}async function Dt(){if(!W)return;let e=document.querySelector(`#broadcast-note`),t=document.querySelector(`[data-start-event]`);if(!W.event.broadcastUrl)e&&(e.textContent=`Add a Pairux or Nixamp broadcast link with Edit event first.`);else if(t?.getAttribute(`aria-disabled`)!==`true`){t?.setAttribute(`aria-disabled`,`true`);try{W=await E(`/api/v1/events/${encodeURIComponent(W.event.id)}/start`,{method:`POST`,body:JSON.stringify({version:W.event.version})}),t&&(t.textContent=`Class is live`),document.querySelector(`[data-end-event]`)?.removeAttribute(`hidden`);let n=document.querySelector(`.event-heading .status-pill`);n&&(v(n,()=>h(`Live now`)),n.classList.add(`status-live`)),e&&(e.textContent=`Your class is live. Viewers can join using this page.`)}catch(n){t?.removeAttribute(`aria-disabled`),e&&(e.textContent=n instanceof Error?n.message:`Could not start the class.`)}}}async function Ot(){let e=document.querySelector(`[data-end-event]`);if(!W||e?.getAttribute(`aria-disabled`)===`true`)return;e?.setAttribute(`aria-disabled`,`true`);let t=W.event;try{let e=await E(`/api/v1/events/${encodeURIComponent(t.id)}/end`,{method:`POST`,body:JSON.stringify({version:t.version})});W=e;let n=document.querySelector(`.event-heading .status-pill`);n&&(n.textContent=J(e.event),n.classList.remove(`status-live`)),await fetch(`/api/channels/${encodeURIComponent(t.roomId)}`,{method:`DELETE`,credentials:`same-origin`});let r=document.querySelector(`#broadcast-note`);r&&(r.textContent=e.event.recurrence?`Session ended. Next class: ${at(e.event.startsAt)}. End the broadcast in Pairux or Nixamp too.`:`Event ended. End the broadcast in Pairux or Nixamp too.`);let i=document.querySelector(`[data-end-event]`);i&&(v(i,()=>h(`Session ended`)),i.setAttribute(`aria-disabled`,`true`)),it(`This session has ended. Refresh to see the latest schedule.`)}catch(t){e?.removeAttribute(`aria-disabled`);let n=document.querySelector(`#broadcast-note`);n&&(n.textContent=t instanceof Error?t.message:`Could not end the event.`)}}async function $(){U?.(),U=null,W=null;let e=/^\/live\/([^/]+)\/?$/.exec(location.pathname);try{e?await St(decodeURIComponent(e[1])):await vt()}catch(e){Oe.innerHTML=`<section class="error-page"><span class="eyebrow">Class dismissed?</span><h1>${G(e instanceof oe&&e.status===404?`That live event isn’t available.`:`We couldn’t open this page.`)}</h1><p>${G(e instanceof Error?e.message:`Try again in a moment.`)}</p><a href="/" data-link class="button button-primary">Back to live events</a></section>`}}ke.addEventListener(`click`,()=>{R?Q():X()}),document.querySelector(`#settings-signout`).addEventListener(`click`,()=>{R&&E(`/api/v1/auth/logout`,{method:`POST`}).finally(()=>{R=null,z=null,B=null,Y(),Re.close(),$()})}),N.addEventListener(`submit`,e=>{e.preventDefault();let t=new FormData(N),n=N.querySelector(`button[type="submit"]`);n.disabled=!0,ut({name:t.get(`name`),homepage:t.get(`homepage`),bio:t.get(`bio`),avatarUrl:t.get(`avatarUrl`)}).then(e=>{e&&(M.textContent=`Saved. Every class you host shows this.`)}).finally(()=>{n.disabled=!1})}),Ve.addEventListener(`change`,()=>{let e=Ve.files?.[0];e&&(P.textContent=``,e.size>10485760?(P.textContent=`A photo may be up to 10 MB.`,Ve.value=``):fetch(`/api/v1/me/profile/photo`,{method:`PUT`,credentials:`same-origin`,body:e}).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error??`That photo could not be kept.`);z=t,Z(),M.textContent=`Photo saved.`}).catch(e=>{P.textContent=e instanceof Error?e.message:`That photo could not be kept.`}).finally(()=>{Ve.value=``}))}),He.addEventListener(`click`,()=>{E(`/api/v1/me/profile/photo`,{method:`DELETE`}).then(e=>{z=e,Z(),M.textContent=`Photo removed.`}).catch(e=>{P.textContent=e instanceof Error?e.message:`Could not remove the photo.`})}),Ue.addEventListener(`submit`,e=>{e.preventDefault(),Ge.textContent=``;let t=Ue.querySelector(`button[type="submit"]`);t.disabled=!0,E(`/api/v1/me/profile/import`,{method:`POST`,body:JSON.stringify({url:We.value.trim()})}).then(e=>{z=e,Z(),Y(),M.textContent=`Filled from your OpenProfile.`}).catch(e=>{Ge.textContent=e instanceof Error?e.message:`That profile could not be read.`}).finally(()=>{t.disabled=!1})}),F.addEventListener(`click`,()=>{F.disabled=!0,E(`/api/v1/nixamp/connection`,{method:`DELETE`}).then(()=>ct()).then(()=>{Z(),M.textContent=`nixamp disconnected. Your classes here are untouched.`}).finally(()=>{F.disabled=!1})}),I.addEventListener(`change`,()=>{I.value!==``&&(A.elements.namedItem(`broadcastUrl`).value=I.value)}),Ne.addEventListener(`click`,()=>{V=!V,O.textContent=``,pt()}),D.addEventListener(`submit`,e=>{e.preventDefault();let t=new FormData(D),n=D.querySelector(`button[type="submit"]`);n.disabled=!0,O.textContent=``,E(`/api/v1/auth/${V?`signup`:`login`}`,{method:`POST`,body:JSON.stringify({email:t.get(`email`),password:t.get(`password`)})}).then(e=>{R=e.account,Y(),ct(),D.reset(),Ae.close();let t=Qe;Qe=null,t?t():$()}).catch(e=>{O.textContent=e instanceof Error?e.message:`That did not work.`}).finally(()=>{n.disabled=!1})}),A.querySelector(`[name="recurrence"]`)?.addEventListener(`change`,()=>{A.elements.namedItem(`recurrence`).value!==`none`&&(H=!0,Le.hidden=!1,A.elements.namedItem(`startsAt`).required=!0)}),A.addEventListener(`submit`,e=>{if(e.preventDefault(),Ze)return;let t=new FormData(A),n=Xe,r=String(t.get(`startsAt`)??``),i=!n?.startsAt||r!==mt(n.startsAt),a=String(t.get(`recurrence`));if(a!==`none`&&!r&&!H){H=!0,Le.hidden=!1,A.elements.namedItem(`startsAt`).required=!0,j.textContent=`Choose the first class date and time for this recurring schedule.`;return}Ze=!0,Ie.setAttribute(`aria-disabled`,`true`),A.setAttribute(`aria-busy`,`true`),j.textContent=``;let o={title:t.get(`title`),description:t.get(`description`),topic:t.get(`topic`),visibility:t.get(`visibility`),broadcastUrl:t.get(`broadcastUrl`),recurrence:a,chatEnabled:t.get(`chatEnabled`)===`on`,handRaiseEnabled:t.get(`handRaiseEnabled`)===`on`,...n?{version:n.version}:{kind:`class`},...H?{startsAt:r?i?new Date(r).toISOString():n.startsAt:null,timezone:i?Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`:n.timezone,expectedDurationMinutes:Number(t.get(`expectedDurationMinutes`))}:{}};E(n?`/api/v1/events/${encodeURIComponent(n.id)}`:`/api/v1/events`,{method:n?`PATCH`:`POST`,body:JSON.stringify(o)}).then(async e=>{n?(await St(e.event.slug),k.close(),document.querySelector(`[data-edit-event]`)?.focus({preventScroll:!0})):(k.close(),gt(K(e.event))),A.reset(),Xe=null}).catch(e=>{j.textContent=e instanceof Error?e.message:`Could not save the event.`}).finally(()=>{Ze=!1,Ie.removeAttribute(`aria-disabled`),A.removeAttribute(`aria-busy`)})}),document.addEventListener(`click`,e=>{let t=e.target,n=t.closest(`a[data-link]`);if(n&&n.origin===location.origin){e.preventDefault(),gt(`${n.pathname}${n.search}`);return}let r=t.closest(`[data-event-mode]`)?.dataset.eventMode;(r===`live`||r===`scheduled`)&&ht(r),t.closest(`[data-sign-in]`)&&X(()=>void $()),t.closest(`[data-open-settings]`)&&(k.close(),Q());let i=t.closest(`[data-close]`);i&&i.closest(`dialog`)?.close();let a=t.closest(`[data-hand]`);a&&W&&(a.disabled=!0,se(`/api/v1/events/${encodeURIComponent(W.event.id)}/hand-raises/${encodeURIComponent(a.dataset.hand??``)}`,{state:a.dataset.state},`PATCH`).then(()=>Tt(W.event)).finally(()=>{a.disabled=!1}))}),window.addEventListener(`popstate`,()=>void $());function kt(){let e=new URLSearchParams(location.search),t=e.get(`nixamp`);if(!t)return``;let n=e.get(`reason`)??``;return history.replaceState(null,``,`${location.pathname}${location.hash}`),t===`connected`?`nixamp connected. Your live streams appear when you go live.`:t===`denied`?`You said not now on nixamp.com. Nothing was connected.`:`nixamp could not be connected${n?`: ${n}`:`.`}`}st().then(()=>{let e=kt();return(e!==``||location.hash===`#settings`)&&(location.hash===`#settings`&&history.replaceState(null,``,location.pathname),Q(e)),$()});export{e as n,f as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./index-
|
|
1
|
+
import{n as e}from"./index-DeCDKrPz.js";var t={...e,"No parties live right now.":`Nessun party in diretta al momento.`,"Could not refresh parties.":`Impossibile aggiornare i party.`,"Pick a server in the directory, or paste its link here.":`Scegli un server dalla directory o incolla qui il suo link.`,"Interface language":`Lingua dell’interfaccia`,Language:`Lingua`,"Translation language":`Lingua di traduzione`,"Original (auto-detect)":`Originale (rilevamento automatico)`,Play:`Riproduci`,Pause:`Pausa`,Stop:`Interrompi`,Next:`Successivo`,Previous:`Precedente`,Select:`Seleziona`,"Next/Prev":`Successivo/Precedente`,Quit:`Esci`,"Now Playing":`In riproduzione`,"Spectrum Analyser":`Analizzatore di spettro`,Playlist:`Playlist`,Files:`File`,"Open files":`Apri file`,"Open folder":`Apri cartella`,"Add to library":`Aggiungi alla libreria`,"Replace playlist":`Sostituisci playlist`,Filter:`Filtra`,Search:`Cerca`,"Nothing loaded.":`Nessun contenuto caricato.`,"Empty.":`Vuoto.`,"Loading…":`Caricamento…`,"Connecting…":`Connessione…`,Connected:`Connesso`,"Not connected":`Non connesso`,"No source":`Nessuna sorgente`,Playing:`In riproduzione`,Stopped:`Interrotto`,Volume:`Volume`,Seek:`Posizione di riproduzione`,"Full screen":`Schermo intero`,Download:`Scarica`,Share:`Condividi`,Copy:`Copia`,"Copy link":`Copia link`,Copied:`Copiato`,Save:`Salva`,Cancel:`Annulla`,Close:`Chiudi`,Remove:`Rimuovi`,Delete:`Elimina`,Edit:`Modifica`,Add:`Aggiungi`,Send:`Invia`,Retry:`Riprova`,Back:`Indietro`,"Next page":`Pagina successiva`,"Previous page":`Pagina precedente`,"Show more":`Mostra altro`,Panels:`Pannelli`,"Reset layout":`Ripristina disposizione`,Show:`Mostra`,Hide:`Nascondi`,Collapse:`Comprimi`,Expand:`Espandi`,"Move up":`Sposta su`,"Move down":`Sposta giù`,Install:`Installa`,"TV mode":`Modalità TV`,On:`Attivo`,Off:`Disattivo`,Account:`Account`,"Sign in":`Accedi`,"Sign out":`Esci dall’account`,"Create account":`Crea account`,Email:`E-mail`,Password:`Password`,"Forgot password?":`Password dimenticata?`,"Welcome back":`Bentornato`,Profile:`Profilo`,Handle:`Nome utente`,"Your servers":`I tuoi server`,Server:`Server`,Connect:`Connetti`,Disconnect:`Disconnetti`,Directory:`Elenco`,Favourites:`Preferiti`,Follow:`Segui`,Unfollow:`Non seguire più`,Notifications:`Notifiche`,"Phone number":`Numero di telefono`,"Save number":`Salva numero`,Transcript:`Trascrizione`,Captions:`Sottotitoli`,"Translate audio":`Traduci audio`,"Audio language":`Lingua audio`,"Audio options":`Opzioni audio`,"Keep background sound":`Mantieni suoni di sottofondo`,"Background level":`Volume di sottofondo`,"Speaker voices":`Voci dei parlanti`,"Any voice":`Qualsiasi voce`,"Male voice":`Voce maschile`,"Female voice":`Voce femminile`,"Original audio.":`Audio originale.`,"Buy translated audio":`Acquista audio tradotto`,"Audio credit":`Credito audio`,"Buy pass":`Acquista pass`,Pass:`Pass`,"Pay with":`Paga con`,"Check payment":`Verifica pagamento`,"Open checkout":`Vai al pagamento`,"Free sessions":`Sessioni gratuite`,"Usage rates and expiry":`Tariffe e scadenza`,Catalogs:`Cataloghi`,"Add catalog":`Aggiungi catalogo`,"Catalog name":`Nome del catalogo`,Link:`Link`,"Play link":`Riproduci link`,"Go live":`Vai in diretta`,Publish:`Pubblica`,Listen:`Ascolta`,"Live now":`In diretta`,Upcoming:`In programma`,Parties:`Feste`,"Join party":`Partecipa alla festa`,"Invite code":`Codice d’invito`,Invite:`Invita`,Chat:`Chat`,"Chat message":`Messaggio in chat`,People:`Persone`,Speaker:`Parlante`,Speakers:`Parlanti`,Listener:`Ascoltatore`,Moderator:`Moderatore`,"Raise hand":`Alza la mano`,"Hand raises":`Mani alzate`,Questions:`Domande`,Resources:`Risorse`,Replay:`Replica`,Schedule:`Programma`,Event:`Evento`,Host:`Presentatore`,About:`Informazioni`,Stage:`Palco`,Title:`Titolo`,Description:`Descrizione`,Topic:`Argomento`,Public:`Pubblico`,"Anyone with the link":`Chiunque abbia il link`,"Invited people":`Persone invitate`,"Who can join":`Chi può partecipare`,"Date and time":`Data e ora`,"Expected length":`Durata prevista`,Repeat:`Ripeti`,"Does not repeat":`Non si ripete`,"Every day":`Ogni giorno`,"Every week":`Ogni settimana`,Homepage:`Sito web`,"Host name":`Nome del presentatore`,"Profile photo URL":`URL della foto del profilo`,"Broadcast link":`Link della trasmissione`,"Edit event":`Modifica evento`,"Save changes":`Salva modifiche`,"Create live":`Crea diretta`,"Schedule class":`Programma lezione`,"Start class":`Inizia lezione`,"End event":`Termina evento`,"End session":`Termina sessione`,"Session ended":`Sessione terminata`,"Event ended":`Evento terminato`,Cancelled:`Annullato`,"Replay available":`Replica disponibile`,Join:`Partecipa`,"Create invite":`Crea invito`,"Invite as":`Invita come`,"Watch now":`Guarda ora`,"Start a room":`Crea una stanza`,"Recent replays":`Repliche recenti`,"Your account":`Il tuo account`,"Write with AI":`Scrivi con l’IA`,"Suggested title":`Titolo suggerito`,"Suggested description":`Descrizione suggerita`,"Suggested topic":`Argomento suggerito`,"Use these details":`Usa questi dettagli`,"Learn something live.":`Impara qualcosa in diretta.`,"Screen share":`Condividi schermo`,"Upload and broadcast":`Carica e trasmetti`,Help:`Aiuto`,"Reload Player":`Ricarica lettore`,"Copy Bundled CLI Path":`Copia percorso della CLI inclusa`,"Developer tools":`Strumenti per sviluppatori`,Undo:`Annulla`,Redo:`Ripeti`,Cut:`Taglia`,Paste:`Incolla`,"Select all":`Seleziona tutto`,Status:`Stato`,"Activity log":`Registro attività`,Admin:`Amministrazione`,"Playback controls":`Controlli di riproduzione`,"Tracks and folders":`Tracce e cartelle`,"Original-language captions.":`Sottotitoli in lingua originale.`,"Skip to playback controls":`Vai ai controlli di riproduzione`,"Skip to playlist":`Vai alla playlist`,"Skip to transcript and translated audio":`Vai alla trascrizione e all’audio tradotto`};export{t as default};
|