1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Whiteboard-CSDDBo_p.js","assets/vendor-react-D9Dz-G1t.js","assets/vendor-vue-compiler-dom-BjqiHA0M.js","assets/vendor-vue-compiler-core-B_m9pfJg.js","assets/vendor-vue-shared-C_oE6NXO.js","assets/vendor-react-dom-DYpyXUDN.js","assets/vendor-scheduler-CWG1rEj-.js","assets/vendor-tldraw-C_6rvbX3.js","assets/vendor-tldraw-editor-8aOJg5Y_.js","assets/vendor-classnames-tzDEH5JP.js","assets/vendor-tldraw-utils-C6sGvKJh.js","assets/vendor-lodash-isequalwith-sbLJuI-0.js","assets/vendor-jittered-fractional-indexing-C87As2he.js","assets/vendor-fractional-indexing-BXwWeYfz.js","assets/vendor-lodash-isequal-VwaAZBv6.js","assets/vendor-lodash-throttle-Btg28We0.js","assets/vendor-lodash-uniq-THB-hfHq.js","assets/vendor-tldraw-state-CQOJPT16.js","assets/vendor-tldraw-store-Qfq226so.js","assets/vendor-tldraw-tlschema-CD-4oJQA.js","assets/vendor-tldraw-validate-C0bL30OC.js","assets/vendor-tldraw-state-react-z4xaVgF3.js","assets/vendor-tiptap-core-DRzb-nMC.js","assets/vendor-prosemirror-transform-DuYq9J48.js","assets/vendor-prosemirror-model-QCakCvyr.js","assets/vendor-orderedmap-C4TimWWB.js","assets/vendor-prosemirror-commands-CJ5jbS8z.js","assets/vendor-prosemirror-state-MmEaMYnP.js","assets/vendor-prosemirror-schema-list-B5jPIne7.js","assets/vendor-prosemirror-view-CupNMWRc.js","assets/vendor-prosemirror-keymap-DlZp-1J_.js","assets/vendor-w3c-keyname-DEtA-KhA.js","assets/vendor-idb-Bn1DMRyg.js","assets/vendor-eventemitter3-B7pzNBTt.js","assets/vendor-rbush-DVdjBHOl.js","assets/vendor-quickselect-cI_fw6Fh.js","assets/vendor-radix-ui-react-slot-DD4FWo_F.js","assets/vendor-radix-ui-react-compose-refs-hWaPD8wE.js","assets/vendor-babel-runtime-CF3RwP-h.js","assets/vendor-radix-ui-react-tooltip-COtyvLk3.js","assets/vendor-radix-ui-primitive-DydAgR9W.js","assets/vendor-radix-ui-react-context-3XANpwt4.js","assets/vendor-radix-ui-react-dismissable-layer-DJyIswhh.js","assets/vendor-radix-ui-react-primitive-BQbI0I5k.js","assets/vendor-radix-ui-react-use-callback-ref-BmfkOu5i.js","assets/vendor-radix-ui-react-use-escape-keydown-B5V5FMED.js","assets/vendor-radix-ui-react-id-_3GibCXd.js","assets/vendor-radix-ui-react-use-layout-effect-Bzdyr9Zs.js","assets/vendor-radix-ui-react-popper-DVwTRcuW.js","assets/vendor-floating-ui-react-dom-CJ5UJkbl.js","assets/vendor-floating-ui-dom-B05hC6ee.js","assets/vendor-floating-ui-core-X4vNhrfm.js","assets/vendor-floating-ui-utils-C1Ez6IfT.js","assets/vendor-radix-ui-react-arrow-y9K-mBY_.js","assets/vendor-radix-ui-react-use-size-CR1NGBN0.js","assets/vendor-radix-ui-react-presence-BT0NJFS1.js","assets/vendor-radix-ui-react-use-controllable-state-D9UUkpzP.js","assets/vendor-radix-ui-react-visually-hidden-BGoVrZgP.js","assets/vendor-ionic-core-DDVmzL1A.js","assets/vendor-tiptap-extension-code-TrHIGfUE.js","assets/vendor-tiptap-extension-highlight-LX9Xp7GQ.js","assets/vendor-tiptap-starter-kit-xzaAA7Wv.js","assets/vendor-tiptap-extension-blockquote-BeJvoVvx.js","assets/vendor-tiptap-extension-bold-DFPYNxHr.js","assets/vendor-tiptap-extension-code-block-DR1c5LcJ.js","assets/vendor-tiptap-extension-document-DHKHHLxX.js","assets/vendor-tiptap-extension-hard-break-CZShTeLF.js","assets/vendor-tiptap-extension-heading-4YnWKe8q.js","assets/vendor-tiptap-extension-horizontal-rule-BGC7YB2_.js","assets/vendor-tiptap-extension-italic-DYkeaUVa.js","assets/vendor-tiptap-extension-link-DTKq5WTu.js","assets/vendor-linkifyjs-DVrXeg1a.js","assets/vendor-tiptap-extension-list-XkVfOQyg.js","assets/vendor-tiptap-extension-paragraph-ChkHz42c.js","assets/vendor-tiptap-extension-strike-C9HxXyBu.js","assets/vendor-tiptap-extension-text-vUZbW3fu.js","assets/vendor-tiptap-extension-underline-DJZPvfHv.js","assets/vendor-tiptap-extensions-B44y-TM0.js","assets/vendor-prosemirror-dropcursor-BYi93Y_5.js","assets/vendor-prosemirror-gapcursor-BbMVeQ_R.js","assets/vendor-prosemirror-history-BNEcPYd-.js","assets/vendor-rope-sequence-nfUW61tr.js","assets/vendor-radix-ui-react-dialog-NIbXMnr7.js","assets/vendor-radix-ui-react-focus-scope-CW5NTSUa.js","assets/vendor-radix-ui-react-portal-DGJxTIF4.js","assets/vendor-radix-ui-react-focus-guards-7vcF9gJS.js","assets/vendor-react-remove-scroll-DMs9Lxup.js","assets/vendor-tslib-Bv2u68Vp.js","assets/vendor-react-remove-scroll-bar-sy4_OAm7.js","assets/vendor-react-style-singleton-Dcnyf3oT.js","assets/vendor-get-nonce-C-Z93AgS.js","assets/vendor-use-sidecar-VNroF6RN.js","assets/vendor-use-callback-ref-CZ6W34ul.js","assets/vendor-aria-hidden-DvXkyWUv.js","assets/vendor-radix-ui-react-dropdown-menu-BiQAb_XJ.js","assets/vendor-radix-ui-react-menu-pG3FSu9H.js","assets/vendor-radix-ui-react-collection-4S9E2FJS.js","assets/vendor-radix-ui-react-direction-K442YDlE.js","assets/vendor-radix-ui-react-roving-focus-C4GqGNuI.js","assets/vendor-radix-ui-react-toolbar-Be7GWknV.js","assets/vendor-radix-ui-react-separator-CCLqhfQt.js","assets/vendor-radix-ui-react-toggle-group-CVJEgZPP.js","assets/vendor-radix-ui-react-toggle-jrGY8Kqz.js","assets/vendor-radix-ui-react-context-menu-C4UrNm71.js","assets/vendor-radix-ui-react-toast-C-4h4JtK.js","assets/vendor-lz-string-BFkg0h2y.js","assets/vendor-radix-ui-react-popover-ByaKsECt.js","assets/vendor-radix-ui-react-slider-CefY8BHf.js","assets/vendor-radix-ui-number-BdQq_4o_.js","assets/vendor-radix-ui-react-use-previous-B_HBaLhi.js","assets/vendor-radix-ui-react-select-DTld0Guj.js","assets/vendor-tldraw-C3oGDqHs.css","assets/vendor-tldraw-sync-BZfc82X
1B.js","assets/vendor-tldraw-sync-core-fynYTREG.js","assets/index-D6gxZzcs.js","assets/vendor-vue-runtime-dom-ngu7FkgX.js","assets/vendor-vue-runtime-core-O0r61XkH.js","assets/vendor-vue-reactivity-_PYbVOMb.js","assets/vendor-vue-select-Cn2oH4dd.js","assets/vendor-vue-star-rating-D42Atl4Q.js","assets/vendor-vue-BfDmC2hc.js","assets/vendor-vuex-DawOPd79.js","assets/vendor-vue-devtools-api-Cow_pXkh.js","assets/vendor-ionic-vue-Cp6ESLlK.js","assets/vendor-ionicons-CnTsVUQ5.js","assets/vendor-gleap-C_nLUrYA.js","assets/vendor-posthog-js-BcP-dMRa.js","assets/vendor-vue-router-BrjMN5S_.js","assets/vendor-axios-D8dNGRK6.js","assets/vendor-err-code-Btjngwyv.js","assets/vendor-promise-retry-CvXhdAiW.js","assets/vendor-retry-Drt1HQ7J.js","assets/vendor-case-DCoxfN6b.js","assets/vendor-dayjs-CMAHqsIS.js","assets/vendor-lodash-es-Dr2nHDXK.js","assets/vendor-exponential-backoff-CTCpx--5.js","assets/vendor-xstate-gZzxgXGH.js","assets/vendor-socket-io-client-DrXE8q1S.js","assets/vendor-engine-io-client-C-_nnA9b.js","assets/vendor-engine-io-parser-DPmA-eyr.js","assets/vendor-socket-io-component-emitter-Dkula2eQ.js","assets/vendor-socket-io-parser-SgV_gTLD.js","assets/vendor-validator-CzLPc2u2.js","assets/vendor-vueuse-core-C1QNX1u6.js","assets/vendor-vueuse-shared-DO1b_29_.js","assets/vendor-vuelidate-validators-H9iLFjxf.js","assets/vendor-vuelidate-core-Bd16nddI.js","assets/vendor-neoconfetti-vue-CCbt6K7L.js","assets/vendor-vue-draggable-resizable-X1h3rUy6.js","assets/vendor-vuetify-DDTyW1fq.js","assets/vendor-vuetify-mT0kcUR1.css","assets/index-BT-fVt6L.css","assets/Whiteboard-DZHZIBRi.css","assets/DocumentEditor-B3wJCwRN.js","assets/vendor-quill-R6h-0CNL.js","assets/vendor-parchment-DI0xVRB_.js","assets/vendor-quill-delta-DlIeog1T.js","assets/vendor-fast-diff-BGhgD5-Y.js","assets/vendor-lodash-clonedeep-DdlLsrcQ.js","assets/vendor-quill-cursors-CXfoYaV7.js","assets/Separator-CWdRNO8a.js","assets/Separator-kAwLOwNP.css","assets/image-Dd_LKTxG.js","assets/DocumentEditor-CJwnJkLy.css","assets/DocumentEditorV2-D0cbuYa6.js","assets/vendor-y-quill-CfElB1WM.js","assets/vendor-yjs-equyLQKF.js","assets/vendor-lib0-BYKKiKmZ.js","assets/exclamation-Drsgy8Ui.js","assets/vendor-maz-ui-CcIfur3Z.js","assets/vendor-libphonenumber-js-CDO7CG9b.js","assets/vendor-maz-ui-C39zemmE.css","assets/DocumentEditorV2-CZa0aJNX.css"])))=>i.map(i=>d[i]); 2import{_ as ve}from"./vendor-ionic-core-DDVmzL1A.js";import{m as le,a as fe,u as G}from"./vendor-vuex-DawOPd79.js";import{_ as W,q as Z,h as J,N as j,s as y,E as M,af as ae,ag as Ce,ah as Ie,ai as je,a5 as Ee,x as Ge,a6 as ke,b as Te,V as Re,aj as oe,ak as Ke,t as ue,al as ye,am as Qe,K as Xe,v as ze,an as F,ao as Ze,n as x,ap as $e,M as be,aq as et,ar as tt,as as it,f as st,w as nt,T as ot,P as at}from"./index-D6gxZzcs.js";import{S as Oe}from"./Separator-CWdRNO8a.js";import{ak as d,G as g,aN as D,J as a,i as p,O as R,ar as S,I as u,at as rt,H as _,l as N,F as De,ap as Le,A as k,w as Pe,a as me,b as _e,n as se,aP as ee,N as Ve,ae as dt,P as Me}from"./vendor-vue-runtime-core-O0r61XkH.js";import{q as O,Q as T,s as lt}from"./vendor-vue-shared-C_oE6NXO.js";import{S as We,a as ct}from"./index-7BP0wRfH.js";import{B as ut}from"./BotChat-BjCpj_5A.js";import{y as v,o as mt,r as V,m as ht}from"./vendor-vue-reactivity-_PYbVOMb.js";import{C as gt}from"./caret-wF3g3oG9.js";import{L as pt,W as St}from"./WebNotificationsModal-CzUmLoHK.js";import{a as vt,A as ft}from"./blue-alert-ByuUIh91.js";import{e as _t,w as Mt,v as yt}from"./vendor-vue-runtime-dom-ngu7FkgX.js";import{T as bt}from"./GenerationFeedback-C52iO-1s.js";import wt from"./StudentAssignmentView-D1HzCpBc.js";import ie from"./vendor-gleap-C_nLUrYA.js";import{b as At}from"./vendor-exponential-backoff-CTCpx--5.js";import{i as de}from"./vendor-maz-ui-CcIfur3Z.js";import{I as Ct,a as It}from"./image-collapse-wq_JLBff.js";import{u as Ue}from"./vendor-xstate-vue-COo3ABIk.js";import{d as Be,a as E,f as re,e as K,r as we}from"./vendor-xstate-gZzxgXGH.js";import{b as ne}from"./vendor-amazon-chime-sdk-js-BKoASW12.js";import{Q as Et,H as Ne}from"./vendor-lodash-es-Dr2nHDXK.js";import{p as kt}from"./vendor-pixelmatch-4GR3gF1A.js";import{t as Tt,k as Rt}from"./vendor-ionic-vue-Cp6ESLlK.js";import{b as zt,e as Ot}from"./vendor-ionicons-CnTsVUQ5.js";import"./vendor-vue-devtools-api-Cow_pXkh.js";import"./vendor-vue-select-Cn2oH4dd.js";import"./vendor-vue-star-rating-D42Atl4Q.js";import"./vendor-vue-compiler-dom-BjqiHA0M.js";import"./vendor-vue-compiler-core-B_m9pfJg.js";import"./vendor-vue-BfDmC2hc.js";import"./vendor-posthog-js-BcP-dMRa.js";import"./vendor-vue-router-BrjMN5S_.js";import"./vendor-axios-D8dNGRK6.js";import"./vendor-err-code-Btjngwyv.js";import"./vendor-promise-retry-CvXhdAiW.js";import"./vendor-retry-Drt1HQ7J.js";import"./vendor-case-DCoxfN6b.js";import"./vendor-dayjs-CMAHqsIS.js";import"./vendor-socket-io-client-DrXE8q1S.js";import"./vendor-engine-io-client-C-_nnA9b.js";import"./vendor-engine-io-parser-DPmA-eyr.js";import"./vendor-socket-io-component-emitter-Dkula2eQ.js";import"./vendor-socket-io-parser-SgV_gTLD.js";import"./vendor-validator-CzLPc2u2.js";import"./vendor-vueuse-core-C1QNX1u6.js";import"./vendor-vueuse-shared-DO1b_29_.js";import"./vendor-vuelidate-validators-H9iLFjxf.js";import"./vendor-vuelidate-core-Bd16nddI.js";import"./vendor-neoconfetti-vue-CCbt6K7L.js";import"./vendor-vue-draggable-resizable-X1h3rUy6.js";import"./vendor-vuetify-DDTyW1fq.js";
2import"./trash-CFilyKrl.js";import"./ScrollToLatestButton-C6NQMvEj.js";import"./chatbot-utils-DwcliyVj.js";import"./vendor-katex-Dcbx6b07.js";import"./vendor-mathlive-BPwT3Usp.js";import"./vendor-tiptap-extension-mathematics-CDfnBu6I.js";import"./vendor-tiptap-core-DRzb-nMC.js";import"./vendor-prosemirror-transform-DuYq9J48.js";import"./vendor-prosemirror-model-QCakCvyr.js";import"./vendor-orderedmap-C4TimWWB.js";import"./vendor-prosemirror-commands-CJ5jbS8z.js";import"./vendor-prosemirror-state-MmEaMYnP.js";import"./vendor-prosemirror-schema-list-B5jPIne7.js";import"./vendor-prosemirror-view-CupNMWRc.js";import"./vendor-prosemirror-keymap-DlZp-1J_.js";import"./vendor-w3c-keyname-DEtA-KhA.js";import"./vendor-tiptap-starter-kit-xzaAA7Wv.js";import"./vendor-tiptap-extension-blockquote-BeJvoVvx.js";import"./vendor-tiptap-extension-bold-DFPYNxHr.js";import"./vendor-tiptap-extension-code-TrHIGfUE.js";import"./vendor-tiptap-extension-code-block-DR1c5LcJ.js";import"./vendor-tiptap-extension-document-DHKHHLxX.js";import"./vendor-tiptap-extension-hard-break-CZShTeLF.js";import"./vendor-tiptap-extension-heading-4YnWKe8q.js";import"./vendor-tiptap-extension-horizontal-rule-BGC7YB2_.js";import"./vendor-tiptap-extension-italic-DYkeaUVa.js";import"./vendor-tiptap-extension-link-DTKq5WTu.js";import"./vendor-linkifyjs-DVrXeg1a.js";import"./vendor-tiptap-extension-list-XkVfOQyg.js";import"./vendor-tiptap-extension-paragraph-ChkHz42c.js";import"./vendor-tiptap-extension-strike-C9HxXyBu.js";import"./vendor-tiptap-extension-text-vUZbW3fu.js";import"./vendor-tiptap-extension-underline-DJZPvfHv.js";import"./vendor-tiptap-extensions-B44y-TM0.js";import"./vendor-prosemirror-dropcursor-BYi93Y_5.js";import"./vendor-prosemirror-gapcursor-BbMVeQ_R.js";import"./vendor-prosemirror-history-BNEcPYd-.js";import"./vendor-rope-sequence-nfUW61tr.js";import"./vendor-tiptap-vue-3-BtdkOfFO.js";import"./vendor-tiptap-extension-placeholder-DGv69bWB.js";import"./set-notification-permission-DGI4W0i-.js";import"./vendor-langfuse-YfGQ8d3x.js";import"./vendor-langfuse-core-C4uyVY5e.js";import"./vendor-mustache-Bi8vT-BR.js";import"./task-badge-BEg1xEpH.js";import"./updog-crying-D_nHdxH2.js";import"./vendor-libphonenumber-js-CDO7CG9b.js";import"./vendor-detect-browser-CUT0teVH.js";import"./vendor-ua-parser-js-CzBF4es-.js";import"./vendor-protobufjs-CeL-eBnJ.js";import"./vendor-protobufjs-aspromise-Ru9PLLxp.js";import"./vendor-protobufjs-base64-CVXwQ6jU.js";import"./vendor-protobufjs-eventemitter-BXkjjA-J.js";import"./vendor-protobufjs-float-B8zNOgUq.js";import"./vendor-protobufjs-inquire-D2Zskc5n.js";import"./vendor-protobufjs-utf8-Di2JTVxg.js";import"./vendor-protobufjs-pool-DX9akOh2.js";import"./vendor-pako-CITNF03Y.js";import"./vendor-aws-sdk-client-chime-sdk-messaging-DYCnMwfX.js";import"./vendor-aws-sdk-middleware-host-header-Bz6bJTgO.js";import"./vendor-smithy-protocol-http-kO0VW0io.js";import"./vendor-smithy-middleware-content-length-C7t31QlG.js";import"./vendor-aws-sdk-core-DvJyiQtS.js";import"./vendor-smithy-core-Ds26bLP9.js";import"./vendor-smithy-util-middleware-DONquGu8.js";import"./vendor-smithy-types-B8D-UI94.js";import"./vendor-smithy-url-parser-Co7Oates.js";import"./vendor-smithy-querystring-parser-DP-JkRZV.js";import"./vendor-smithy-util-stream-DhKeyySv.js";import"./vendor-smithy-util-base64-DT7Qo5n_.js";import"./vendor-smithy-util-utf8-BCUyL5r-.js";import"./vendor-smithy-util-hex-encoding-DUvhvBMH.js";import"./vendor-smithy-fetch-http-handler-miByJCJB.js";import"./vendor-smithy-querystring-builder-CU2YLz3F.js";import"./vendor-smithy-util-uri-escape-DMsqRGNs.js";import"./vendor-smithy-uuid-smnBL3J2.js";import"./vendor-smithy-signature-v4-D-n5vgTo.js";import"./vendor-smithy-is-array-buffer-B2FEPiEg.js";import"./vendor-smithy-smithy-client-yGrurCyW.js";import"./vendor-smithy-middleware-stack-iO90Dj6j.js";import"./vendor-aws-crypto-sha256-browser-C4lkkR-b.js";import"./vendor-aws-crypto-util-_gGDG6Ou.js";import"./vendor-aws-sdk-util-utf8-browser-CXu8Vtb7.js";import"./vendor-aws-sdk-util-locate-window-ClynhQo-.js";
2import"./vendor-aws-crypto-sha256-js-5v5zYhHW.js";import"./vendor-tslib-Bv2u68Vp.js";import"./vendor-aws-crypto-supports-web-crypto-Tl5CXXwv.js";import"./vendor-aws-sdk-util-user-agent-browser-BQHiGww9.js";import"./vendor-aws-sdk-util-endpoints-BB1y6mCD.js";import"./vendor-smithy-util-endpoints-P2cB-KIO.js";import"./vendor-smithy-util-defaults-mode-browser-BgSvJgqR.js";import"./vendor-smithy-property-provider-LKaK_Mle.js";import"./vendor-smithy-util-retry-D-DLno2p.js";import"./vendor-smithy-service-error-classification-DMTiWnfs.js";import"./vendor-smithy-util-body-length-browser-CKCqzcB_.js";import"./vendor-smithy-config-resolver-B-cKkOme.js";import"./vendor-smithy-invalid-dependency-CZrL88QP.js";import"./vendor-aws-sdk-region-config-resolver-ClWfwlZt.js";import"./vendor-aws-sdk-middleware-user-agent-DDZblXSk.js";import"./vendor-smithy-middleware-retry-jTZV-jLz.js";import"./vendor-smithy-middleware-endpoint-BbVY9-dA.js";import"./vendor-smithy-middleware-serde-uGqvsUM0.js";import"./vendor-aws-sdk-middleware-logger-DxIl4YsV.js";import"./vendor-aws-sdk-middleware-recursion-detection-Bftl-SU6.js";import"./vendor-aws-sdk-util-hex-encoding-CQDs5MX1.js";const Dt={name:"TroubleMatchingModal",components:{LargeButton:J,Modal:Z,Separator:Oe},props:{sessionId:{type:String,required:!0},closeModal:{type:Function,required:!0}},computed:{...le({mobileMode:"app/mobileMode"})},mounted(){this.mobileMode&&this.displaySessionToggleButtons(!1)},beforeUnmount(){this.mobileMode&&this.displaySessionToggleButtons(!0)},methods:{displaySessionToggleButtons(e){const t=Array.from(document.querySelectorAll(".toggleButton"));for(const i of t)i.style.position=e?"fixed":"static"},async end(){const e={timeout:15};await j.timedOutSession(this.sessionId,e),y.captureEvent(M.SESSION_TIMED_OUT_15_MINS,{event:M.SESSION_TIMED_OUT_15_MINS}),await ae.endAndExitSession()}}},Lt={class:"trouble-matching-modal"},Pt={class:"trouble-matching-modal__footer"},Vt={class:"trouble-matching-modal__buttons"};function Wt(e,t,i,r,n,s){const c=S("separator"),l=S("large-button"),h=S("modal");return d(),g(h,{closeModal:()=>!1,backText:""},{default:D(()=>[a("div",Lt,[t[2]||(t[2]=a("header",null,[a("h1",{class:"trouble-matching-modal__title"}," Weâre having trouble matching you with a coach ð ")],-1)),t[3]||(t[3]=a("h2",{class:"trouble-matching-modal__subtitle"}," We recommend ending your session and trying again later. ",-1)),p(c),a("div",Pt,[a("div",Vt,[p(l,{onClick:i.closeModal,class:"trouble-matching-modal__buttons--cancel"},{default:D(()=>[...t[0]||(t[0]=[R("Keep Waiting",-1)])]),_:1},8,["onClick"]),p(l,{primary:"",onClick:s.end},{default:D(()=>[...t[1]||(t[1]=[R("End Session",-1)])]),_:1},8,["onClick"])])])])]),_:1})}const Ut=W(Dt,[["render",Wt],["__scopeId","data-v-0f7be59d"]]),Bt={name:"UnmatchedModal",components:{LargeButton:J,Modal:Z,Separator:Oe},props:{sessionId:{type:String,required:!0}},computed:{...le({mobileMode:"app/mobileMode"})},mounted(){if(this.mobileMode){const e=Array.from(document.querySelectorAll(".toggleButton"));for(const t of e)t.style.position="static"}},methods:{async end(){const e={timeout:45};await j.timedOutSession(this.sessionId,e),y.captureEvent(M.SESSION_TIMED_OUT_45_MINS,{event:M.SESSION_TIMED_OUT_45_MINS}),await ae.endAndExitSession()}}},Nt={class:"unmatched-modal"},xt={class:"unmatched-modal__footer"},Ht={class:"unmatched-modal__buttons"};function Ft(e,t,i,r,n,s){const c=S("separator"),l=S("large-button"),h=S("modal");return d(),g(h,{closeModal:()=>!1,backText:""},{default:D(()=>[a("div",Nt,[t[1]||(t[1]=a("header",null,[a("h1",{class:"unmatched-modal__title"}," Sorry! We couldnât match your request this time. ")],-1)),t[2]||(t[2]=a("h2",{class:"unmatched-modal__subtitle"}," Please try again between 12 pm -12 am ET. More coaches will be around to help you then ð ",-1)),p(c),a("footer",xt,[a("div",Ht,[p(l,{primary:"",onClick:s.end},{default:D(()=>[...t[0]||(t[0]=[R("Back to dashboard",-1)])]),_:1},8,["onClick"])])])])]),_:1})}const qt=W(Bt,[["render",Ft],["__scopeId","data-v-77f9f4ef"]]),Jt={data(){return{showTroubleMatchingModal:!1,showUnmatchedModal:!1,hasSeenTroubleMatchingModal:!1,isWaitingIntervalId:null,volunteerJoinedAudio:new Audio(Ke)}},components:{LoadingMessage:Ee,TroubleMatchingModal:Ut,UnmatchedModal:qt,ActivityDot:je,ReportSessionButton:Ie,EndSessionButton:Ce},mounted(){this.isStudent&&(setTimeout(()=>{this.isWaitingTooLong()},500),this.isWaitingIntervalId=setInterval(()=>{this.isWaitingTooLong()},1e3*60))},beforeUnmount(){oe.emit("sessions/partner:online",!1)},computed:{...fe({user:e=>e.user.user,session:e=>e.user.session,isPartnerOnline:e=>e.session.isPartnerOnline}),...le({isVolunteer:"user/isVolunteer",isStudent:"user/isStudent",sessionPartner:"user/sessionPartner",isSessionAlive:"user/isSessionAlive",isSessionWaitingForVolunteer:"user/isSessionWaitingForVolunteer",isSessionEnding:"user/isSessionEnding",isSessionInProgress:"user/isSessionInProgress",isSessionOver:"user/isSessionOver",isSessionPresenceActive:"featureFlags/isSessionPresenceActive",mobileMode:"app/mobileMode"}),canReport(){return this.isVolunteer},partnerAvatar(){return this.isSessionWaitingForVolunteer?ke:this.isVolunteer?Te:this.isStudent?Re:""}},methods:{endAndExitSession(){ae.endAndExitSession()},isWaitingTooLong(){if(this.session.volunteer){clearInterval(this.isWaitingIntervalId),this.showTroubleMatchingModal=!1,this.showUnmatchedModal=!1;return}const e=1e3*60*15,t=new Date(this.session.createdAt).getTime()+e,i=t+e*2;Date.now()>=i?(this.showUnmatchedModal=!0,clearInterval(this.isWaitingIntervalId)):Date.now()>=t&&!this.hasSeenTroubleMatchingModal&&(this.showTroubleMatchingModal=!0,this.hasSeenTroubleMatchingModal=!0)}},watch:{async isSessionWaitingForVolunteer(e,t){if(!e&&t&&Object.keys(this.session).length&&!this.session.endedAt){this.showTroubleMatchingModal=!1,this.showUnmatchedModal=!1,clearInterval(this.isWaitingIntervalId);try{await this.volunteerJoinedAudio.play()}catch(i){console.log("Unable to play audio",i)}Ge("We found a coach!",{body:`Start chatting with ${this.sessionPartner.firstname} now.`})}}}},Yt={class:"session-header-wrapper"},jt={class:"avatar-info-container"},Gt={class:"info"},Kt={key:2,class:"volunteer-info"},Qt={class:"volunteer-name"},Xt={key:0,class:"partner-status"},Zt={class:"partner-status__text"},$t={key:1,class:"in-session-label"},ei={key:3,class:"session-ended"},ti={key:0,class:"session-control-buttons"};function ii(e,t,i,r,n,s){const c=S("loading-message"),l=S("activity-dot"),h=S("report-session-button"),m=S("end-session-button"),o=S("trouble-matching-modal"),C=S("unmatched-modal");return d(),u("div",Yt,[a("div",{class:O([{inactive:!e.isSessionInProgress},"session-header"])},[a("div",jt,[e.isSessionOver?_("",!0):(d(),g(rt(s.partnerAvatar),{key:0,class:O(["avatar",!e.isSessionAlive&&"avatar--hidden"])},null,8,["class"])),a("div",Gt,[e.isSessionEnding?(d(),g(c,{key:0,message:"Ending session"})):e.isSessionWaitingForVolunteer?(d(),g(c,{key:1,message:"Contacting coaches"})):e.isSessionInProgress?(d(),u("div",Kt,[a("span",Qt,T(e.sessionPartner.firstname),1),e.isSessionPresenceActive?(d(),u("div",Xt,[p(l,{class:O({"partner-status__icon--online":e.isPartnerOnline,"partner-status__icon--offline":!e.isPartnerOnline})},null,8,["class"]),a("p",Zt,T(e.isPartnerOnline?"In session":"Away"),1)])):(d(),u("span",$t,"In Session"))])):e.isSessionOver?(d(),u("div",ei," Session ended ")):(d(),g(c,{key:4,message:"Loading"}))])]),e.mobileMode?(d(),u("div",ti,[s.canReport?(d(),g(h,{key:0,variant:"tertiary",class:"report-button"})):_("",!0),p(m,{class:"end-button",variant:"secondary","end-text":"End"})])):_("",!0)],2),n.showTroubleMatchingModal?(d(),g(o,{key:0,closeModal:()=>n.showTroubleMatchingModal=!1,sessionId:e.session.id},null,8,["closeModal","sessionId"])):_("",!0),n.showUnmatchedModal?(d(),g(C,{key:1,sessionId:e.session.id},null,8,["sessionId"])):_("",!0)])}const si=W(Jt,[["render",ii],["__scopeId","data-v-27c89240"]]),ni={key:0},oi={type:"button",class:"close-button"},ai=N({__name:"Errors",setup(e){const t=G(),i=k(()=>t.state.botConversations.errors),r=()=>t.dispatch("botConversations/clearErrors");return(n,s)=>i.value.length?(d(),u("div",ni,[(d(!0),u(De,null,Le(i.value,c=>(d(),u("div",{class:"errors",key:c},[R(T(c)+" ",1),a("button",oi,[p(v(ue),{class:"cross-icon-svg",onClick:r})])]))),128))])):_("",!0)}}),ri=W(ai,[["__scopeId","data-v-9ec52b90"]]),di={class:"header-title"},li={class:"body"},ci={class:"resize-handle-container"},ui=N({__name:"index",emits:["minimize","dragging","resizing"],setup(e,{emit:t}){const i=t,r=G(),n=k(()=>r.getters["app/mobileMode"]),s=k(()=>r.getters["user/isVolunteer"]),c={width:320,height:410},l={top:88,left:10},h={width:400,height:770},m=V(),o=mt({startingLeft:null,startingTop:null,top:n.value?l.top:70,left:n.value?l.left:70,width:h.width,height:h.height,isDragging:!1,isResizing:!1,touchstartX:null,touchstartY:null,offsetY:null,offsetX:null});Pe(n,b=>{b&&(o.top=l.top,o.left=l.left)});const C=V(!1),w=V(!1);function P(b){requestAnimationFrame(()=>{if(b.stopPropagation(),b.stopImmediatePropagation(),b.preventDefault(),b.which===1&&o.isDragging&&o.startingTop&&o.startingLeft&&(o.left=b.movementX+o.left,o.top=b.movementY+o.top,C.value||(C.value=!0,i("dragging",!0))),b.which===1&&o.isResizing){const f=b.movementX+o.width,A=b.movementY+o.height;o.width=f<c.width?c.width:f,o.height=A<c.height?c.height:A,w.value||(w.value=!0,i("resizing",!0))}})}function H(b){for(const f of b.targetTouches)requestAnimationFrame(()=>{if(o.isDragging&&o.startingTop&&o.startingLeft&&o.touchstartY&&o.touchstartX&&o.offsetX&&o.offsetY){C.value||(C.value=!0,i("dragging",!0));const A=f.clientX-o.touchstartX;o.left=A+o.left;const L=f.clientY-o.touchstartY;o.top=L+o.top,o.touchstartX=o.left+o.offsetX,o.touchstartY=o.top+o.offsetY}if(o.isResizing){w.value||(w.value=!0,i("resizing",!0));const L=f.clientX-o.touchstartX+o.width,Q=f.clientY-o.touchstartY;o.touchstartX=f.clientX,o.touchstartY=f.clientY;const X=Q+o.height;o.width=L<c.width?c.width:L,o.height=X<c.height?c.height:X}})}async function z(b){return r.dispatch("botConversations/sendMessage",{message:b,displayContext:ye.SESSION,source:""})}return me(()=>{addEventListener("mousemove",P);const b=r.getters["botConversations/currentConversation"];if("messages"in b&&!b.messages.some(f=>f.senderUserType==="system")){const L=s.value?"<b>Heads up!</b> Your student can see our chat and ask me questions too. Feel free to ask me questions, even while chatting with your student.":"<b>Heads up!</b> Your tutor can now see our chat and ask me questions too. Feel free to keep asking me questions, even while chatting with your tutor.";r.commit("botConversations/addToCurrentConversation",{senderUserType:"system",message:L})}y.captureEvent(M.AI_TUTOR_WIDGET_SEEN)}),_e(()=>{removeEventListener("mousemove",P)}),(b,f)=>
2(d(),u("div",{ref_key:"containerRef",ref:m,class:O(["widget-container",{"is-dragging":o.isDragging}]),style:lt({left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:`${o.height}px`})},[a("div",{class:"header",onTouchstart:f[1]||(f[1]=A=>{if(!m.value||n.value)return;m.value.addEventListener("touchmove",H);const{left:L,top:Q}=m.value.getBoundingClientRect(),{x:X,y:te,width:U,height:I}=m.value.getBoundingClientRect(),{offsetHeight:$,offsetWidth:q}=m.value;o.startingLeft=L,o.startingTop=Q,o.touchstartY=A.touches[0].clientY,o.touchstartX=A.touches[0].clientX,o.offsetX=(A.touches[0].clientX-X)/U*q,o.offsetY=(A.touches[0].clientY-te)/I*$+A.target.getBoundingClientRect().height,o.isDragging=!0,o.isResizing=!1}),onTouchend:f[2]||(f[2]=()=>{!m.value||n.value||(m.value.removeEventListener("touchmove",H),o.startingLeft=null,o.startingTop=null,o.touchstartY=null,o.touchstartX=null,o.offsetX=null,o.offsetY=null,o.isDragging=!1,o.isResizing=!1,C.value=!1,w.value=!1,i("dragging",!1))}),onMousedown:f[3]||(f[3]=()=>{if(!m.value||n.value)return;const A=m.value.getBoundingClientRect();o.startingLeft=A.left,o.startingTop=A.top,o.isDragging=!0,o.isResizing=!1}),onMouseup:f[4]||(f[4]=()=>{!m.value||n.value||(o.startingLeft=null,o.startingTop=null,o.isDragging=!1,o.isResizing=!1,C.value=!1,w.value=!1,i("dragging",!1))})},[a("span",di,[p(v(ke),{class:"header-icon"}),f[9]||(f[9]=R(" UPBot",-1))]),a("button",{type:"button",onClick:f[0]||(f[0]=()=>i("minimize")),class:"minimize"}," - ")],32),a("div",li,[p(ri),p(ut,{class:"overrides",displayContext:v(ye).SESSION,sendMessage:z},null,8,["displayContext"]),a("div",ci,[a("div",{class:O(["resize-handle",{"is-resizing":o.isResizing}]),onMousedown:f[5]||(f[5]=()=>{o.isDragging=!1,o.isResizing=!0}),onMouseup:f[6]||(f[6]=()=>{o.isDragging=!1,o.isResizing=!1,C.value=!1,w.value=!1,i("resizing",!1)}),onTouchstart:f[7]||(f[7]=A=>{n.value||(A.target.addEventListener("touchmove",H),o.touchstartY=A.touches[0].clientY,o.touchstartX=A.touches[0].clientX,o.isDragging=!1,o.isResizing=!0)}),onTouchend:f[8]||(f[8]=A=>{n.value||(o.touchstartY=null,o.touchstartX=null,A.target.removeEventListener("touchmove",H),o.isResizing=!1,o.isDragging=!1,C.value=!1,w.value=!1,i("resizing",!1))})},null,34)])])],6))}}),mi=W(ui,[["__scopeId","data-v-469bec8f"]]),hi={name:"about-this-session-survey",components:{ThumbsUpDownButtons:bt,LargeButton:J},async mounted(){y.captureEvent(M.USER_SHOWN_ABOUT_THIS_SESSION_SURVEY,{...this.generalEventProperties})},data(){return{comments:null,complete:!1,question1Complete:!1,rating:0}},methods:{async submitRating(e){this.rating=e,y.captureEvent(M.SELECTED_ABOUT_THIS_SESSION_RATING,{...this.generalEventProperties,rating:e}),this.question1Complete=!0,await se(),this.$refs.question2.scrollIntoView({behavior:"smooth"}),this.$refs.commentsTextArea.focus()},submitComments(){y.captureEvent(M.SUBMITTED_ABOUT_THIS_SESSION_COMMENTS,{...this.generalEventProperties,comments:this.comments}),this.complete=!0}},computed:{sessionId(){return this.$route.params.sessionId},generalEventProperties(){return{sessionId:this.sessionId}},ratingEmoji(){return this.rating===0?"that response":this.rating===1?"ð":"ð"}}},gi={class:"about-this-session-survey"},pi={key:0,"data-testid":"completed-message"},Si={key:1,"data-testid":"feedback-prompt"},vi={key:0},fi={class:"question-1","data-testid":"question-1"},_i={class:"question-1"},Mi={class:"question-1--options"},yi={key:0,class:"question-2",ref:"question2","data-testid":"question-2"},bi={class:"question-text"};function wi(e,t,i,r,n,s){const c=S("ThumbsUpDownButtons"),l=S("large-button");return d(),u("div",gi,[a("div",{class:O({"alert alert-info":!n.complete,"alert alert-success":n.complete})},[n.complete?(d(),u("span",pi,"Thank you for your feedback!")):(d(),u("span",Si,"Please help us improve this page by answering a few questions:"))],2),n.complete?_("",!0):(d(),u("div",vi,[a("div",fi,[t[1]||(t[1]=a("span",{class:"question-text"},"Is this information helpful?",-1)),a("div",_i,[a("div",Mi,[p(c,{onClickThumbsUp:()=>s.submitRating(1),onClickThumbsDown:()=>s.submitRating(-1)},null,8,["onClickThumbsUp","onClickThumbsDown"])])])]),n.question1Complete?(d(),u("div",yi,[a("span",bi,"What made you choose "+T(s.ratingEmoji)+"?",1),ee(a("textarea",{autocomplete:"off",class:"comments-textarea","onUpdate:modelValue":t[0]||(t[0]=h=>n.comments=h),ref:"commentsTextArea","data-testid":"comments-textarea"},null,512),[[_t,n.comments]]),p(l,{primary:"",onClick:s.submitComments,"data-testid":"submit-feedback-btn"},{default:D(()=>[...t[2]||(t[2]=[R("Submit",-1)])]),_:1},8,["onClick"])],512)):_("",!0)]))])}const Ai=W(hi,[["render",wi],["__scopeId","data-v-9cf7076f"]]);function Ci(e){const t=e%10,i=e%100;if(i>=11&&i<=13)return e+"th";switch(t){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd";default:return e+"th"}}const Ii=2,Ei={name:"about-session-modal",components:{AboutThisSessionSurvey:Ai,Modal:Z,Stepper:Qe,AlertIcon:vt,CrossIcon:ue,LargeButton:J},props:{closeModal:{type:Function,required:!0},responses:{type:Array,required:!0},totalStudentSessions:{type:Number,required:!0}},computed:{...le({isAboutThisSessionSurveyEnabled:"featureFlags/isAboutThisSessionSurveyActive",isVolunteer:"user/isVolunteer"}),...fe({session:e=>e.user.session}),isNewStudent(){return this.totalStudentSessions<3},totalSessionsTextTitle(){let e="";return this.totalStudentSessions===1&&(e="first"),this.totalStudentSessions===2&&(e="second"),this.totalStudentSessions===3&&(e="third"),`This is ${this.studentsFirstName}'s ${e||Ci(this.totalStudentSessions)} session!`},studentsFirstName(){return this.session.student.firstname},studentsGrade(){return this.session.student.gradeLevel}
2,getLowConfidenceResponseIfExists(){return this.responses.find(e=>e.displayLabel.startsWith("How they feel about")&&e.score<=Ii)}},methods:{showImageWithResponse(e){return!e.startsWith("How well they understand the topic")}}},ki={class:"about-session-modal"},Ti={class:"header-info"},Ri={class:"header"},zi={class:"alert-container"},Oi={class:"alert"},Di={class:"subheading","data-testid":"total-sessions"},Li={key:0},Pi={key:1,class:"subtitle"},Vi={key:0,class:"session-info"},Wi={class:"session-info-stepper-container"},Ui={class:"session-info-responses"},Bi={class:"session-info-title"},Ni={class:"session-info-response"},xi={key:0},Hi=["src"],Fi={key:1},qi={key:0,class:"tip"},Ji={class:"tip-text"},Yi={key:1,class:"session-info"};function ji(e,t,i,r,n,s){const c=S("cross-icon"),l=S("large-button"),h=S("alert-icon"),m=S("stepper"),o=S("about-this-session-survey"),C=S("modal");return d(),g(C,{closeModal:i.closeModal,class:"about-session-modal-wrapper"},{default:D(()=>[a("div",ki,[a("div",Ti,[a("div",Ri,[t[0]||(t[0]=R(" About the session ",-1)),p(l,{class:"cross-icon",variant:"tertiary",onClick:i.closeModal},{default:D(()=>[p(c)]),_:1},8,["onClick"])]),a("div",zi,[a("div",Oi,[p(h,{class:"alert-icon"}),a("div",Di,T(s.totalSessionsTextTitle),1)]),s.studentsGrade?(d(),u("div",Li,T(s.studentsFirstName)+" is in "+T(s.studentsGrade)+" grade. ",1)):_("",!0),i.totalStudentSessions<=3?(d(),u("div",Pi," Be sure to be welcoming and extra patient as they get used to our platform. ")):_("",!0)])]),i.responses&&i.responses.length?(d(),u("div",Vi,[a("div",Wi,[p(m,{totalSteps:3,class:"session-info-stepper"}),a("div",Ui,[(d(!0),u(De,null,Le(i.responses,w=>(d(),u("div",{key:w.displayLabel},[a("div",Bi,T(w.displayLabel),1),a("div",Ni,[w.displayImage&&s.showImageWithResponse(w.displayLabel)?(d(),u("span",xi,[a("img",{class:"response-image",src:w.displayImage,alt:"image representing student's response"},null,8,Hi),R(" "+T(w.response.toLowerCase()),1)])):(d(),u("span",Fi,T(w.response),1))])]))),128))])]),!s.isNewStudent&&s.getLowConfidenceResponseIfExists?(d(),u("div",qi,[t[1]||(t[1]=a("div",{class:"tip-title","data-testid":"upchieves-tip"}," UPchieve's tip ",-1)),a("div",Ji,T(s.studentsFirstName)+" is feeling "+T(s.getLowConfidenceResponseIfExists.response.toLowerCase())+". Praise their effort and start with easy questions so that they can experience small wins! ",1)])):_("",!0)])):(d(),u("div",Yi,"No goal found for this session")),e.isAboutThisSessionSurveyEnabled?(d(),g(o,{key:2,"data-testid":"about-this-session-survey"})):_("",!0)])]),_:1},8,["closeModal"])}const Gi=W(Ei,[["render",ji],["__scopeId","data-v-9feda973"]]),Ki={class:"assignment-title"},Qi={class:"uc-row justify-between title-close-icon"},Xi={class:"assignment-header"},Zi={key:0,class:"assignment-text"},$i={class:"text-start"},es={class:"assignment-modal-text"},ts=N({__name:"AssignmentDetailModal",props:{assignment:{type:Object,required:!0},closeModal:{type:Function,required:!0},isStudent:{type:Boolean,required:!0}},setup(e){const t=e;return(i,r)=>(d(),g(Z,null,{default:D(()=>[a("div",Ki,[a("div",Qi,[a("div",Xi,[p(v(ft)),a("h1",null,T(t.isStudent?"Your Assignment":"Student's Assignment"),1)]),p(v(ue),{class:"cross-icon",onClick:e.closeModal,role:"button","aria-label":"Close"},null,8,["onClick"])]),t.isStudent?_("",!0):(d(),u("div",Zi,[...r[0]||(r[0]=[a("p",null," This student has an assignment assigned by their teacher. View the details to guide your session effectively. ",-1)])]))]),a("div",$i,[a("p",es,T(e.isStudent?t.assignment.className:"Assignment"),1),p(wt,{"assignment-id":t.assignment.id,assignment:t.assignment,isStudent:t.isStudent},null,8,["assignment-id","assignment","isStudent"])])]),_:1}))}}),is=W(ts,[["__scopeId","data-v-4a6c6ae5"]]),ss={class:"review-warning-modal"},ns={class:"header-info"},os=N({__name:"FallIncentiveReviewWarningModal",props:{closeModal:{type:Function}},setup(e){const t=G(),i=k(()=>t.getters["app/mobileMode"]);return(r,n)=>(d(),g(Z,{closeModal:e.closeModal,class:"review-warning-modal-wrapper"},{default:D(()=>[a("div",ss,[a("div",ns,[i.value?_("",!0):(d(),g(v(ue),{key:0,class:"cross-icon",onClick:e.closeModal},null,8,["onClick"])),n[0]||(n[0]=a("div",{class:"header"},"Have a productive session!",-1)),n[1]||(n[1]=a("div",{class:"subtitle"}," We'll be reviewing this session to ensure that you have a great learning experience & qualify to earn and learn this week! ",-1))])])]),_:1},8,["closeModal"]))}}),as=W(os,[["__scopeId","data-v-a5734ddf"]]),rs={class:"name-container"},ds={class:"name"},ls={class:"status"},cs=N({__name:"PartnerInfo",props:{partnerPresence:{},isFavoriteVolunteer:{type:Boolean}},setup(e){const t=G(),i=e,r=k(()=>t.getters["user/sessionPartner"]);return(n,s)=>(d(),u("div",rs,[a("div",null,[a("div",ds,[R(T(r.value.firstname)+" ",1),i.isFavoriteVolunteer?(d(),g(v(Xe),{key:0,class:"star-icon"})):_("",!0)]),a("div",ls,T(i.partnerPresence),1)])]))}}),us=W(cs,[["__scopeId","data-v-3f585ab1"]]),ms={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"};function hs(e,t){return d(),u("svg",ms,[...t[0]||(t[0]=[a("path",{fill:"#abb2bd","fill-rule":"evenodd",d:"M12.25 5a2.5 2.5 0 0 0-2.5 2.5v4a2.5 2.5 0 0 0 5 0v-4a2.5 2.5 0 0 0-2.5-2.5M8.5 12A.75.75 0 0 0 7 12c0 .74.27 1.91 1.062 2.91.715.902 1.826 1.628 3.438 1.801v1.539H9.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5H13v-1.539c1.612-.172 2.723-.9 3.438-1.8.792-1 1.062-2.17 1.062-2.911a.75.75 0 0 0-1.5 0c0 .444-.18 1.275-.738 1.979-.53.668-1.436 1.271-3.012 1.271s-2.482-.603-3.012-1.271C8.68 13.275 8.5 12.444 8.5 12","clip-rule":"evenodd"},null,-1)])])}const gs={render:hs},ps=["disabled"],Ss=N({__name:"TalkButton",props:{isSpeaking:{type:Boolean},isMicMuted:{type:Boolean},micState:{},hasSpeakingPrivileges:{type:Boolean}
2,hasConnectedToMediaRoom:{type:Boolean},isLoading:{type:Boolean}},emits:["toggleMuteMic"],setup(e,{emit:t}){const i=e,r=t,n=k(()=>i.micState==="denied"||!i.hasSpeakingPrivileges||!i.hasConnectedToMediaRoom||i.isLoading),s=k(()=>i.hasConnectedToMediaRoom?i.micState==="denied"?"Mic permission denied":i.hasSpeakingPrivileges?i.isMicMuted?"Click to speak":"Click to mute mic":"You have been banned from audio":"Unable to join call"),c=()=>{y.captureEvent(M.VOICE_CHAT_USER_CLICKED_MICROPHONE_BUTTON),r("toggleMuteMic")},l=()=>{y.captureEvent(M.VOICE_CHAT_USER_MOUSED_OVER_MICROPHONE_BUTTON)};return(h,m)=>(d(),u("div",{class:O(["start-call-container",{muted:i.isMicMuted}])},[i.isLoading?ee((d(),g(ze,{key:0,class:"spinner","container-height":48,"container-width":48,width:36,height:36,thickness:3},null,512)),[[v(de),{text:"Joining audio...",color:"black",position:"bottom"}]]):ee((d(),u("button",{key:1,disabled:n.value,class:O(["speak-button",{muted:i.isMicMuted,speaking:i.isSpeaking}]),onClick:c,onMouseenter:l,type:"button"},[p(v(gs),{class:"icon"})],42,ps)),[[v(de),{text:s.value,color:"black",position:"bottom"}]])],2))}}),vs=W(Ss,[["__scopeId","data-v-e998fccb"]]),fs={xmlns:"http://www.w3.org/2000/svg",width:"27",height:"19",fill:"none",viewBox:"0 0 27 19"};function _s(e,t){return d(),u("svg",fs,[...t[0]||(t[0]=[a("path",{fill:"#fff","fill-rule":"evenodd",d:"M20.877 6.703a1 1 0 1 0-1.414 1.414l2.027 2.027-2.027 2.027a1 1 0 0 0 1.414 1.414l2.027-2.027 2.027 2.027a1 1 0 0 0 1.414-1.414l-2.027-2.027 2.027-2.027a1 1 0 0 0-1.414-1.414L22.904 8.73zM15.535.144a1 1 0 0 1 .483.856v16.56a1 1 0 0 1-1.465.885l-9.346-4.907a1 1 0 0 1-.535-.885V5.906a1 1 0 0 1 .535-.885L14.553.115a1 1 0 0 1 .982.03M6.672 6.511v5.537l7.346 3.857V2.655z","clip-rule":"evenodd"},null,-1),a("rect",{width:"4.673",height:"7.009",x:"1",y:"5.628",stroke:"#fff","stroke-width":"2",rx:"1"},null,-1)])])}const Ms={render:_s},ys=["disabled"],bs=N({__name:"SpeakerButton",props:{isPartnerSpeaking:{type:Boolean},isSpeakerMuted:{type:Boolean},hasConnectedToMediaRoom:{type:Boolean},partnerMicStatus:{},partnerCanUseMic:{type:Boolean},isLoading:{type:Boolean}},emits:["toggleMuteSpeaker"],setup(e,{emit:t}){const i=e,r=t,n=k(()=>!i.hasConnectedToMediaRoom||!i.partnerCanUseMic),s=k(()=>{if(i.hasConnectedToMediaRoom)if(i.partnerCanUseMic){if(i.isSpeakerMuted)return"Click to listen"}else return i.partnerMicStatus;else return"Unable to join call";return"Click to mute speaker"}),c=()=>{y.captureEvent(M.VOICE_CHAT_USER_CLICKED_PARTNER_AVATAR_BUTTON),r("toggleMuteSpeaker")};return(l,h)=>(d(),u("div",{class:O(["start-call-container",{muted:i.isSpeakerMuted}])},[i.isLoading?ee((d(),g(ze,{key:0,class:"spinner","container-height":48,"container-width":48,width:36,height:36,thickness:3},null,512)),[[v(de),{text:"Connecting audio...",color:"black",position:"bottom"}]]):ee((d(),u("button",{key:1,disabled:n.value,class:O(["speaker-button",{muted:i.isSpeakerMuted,"partner-speaking":i.isPartnerSpeaking}]),onClick:c,type:"button"},[i.isSpeakerMuted?(d(),g(v(Ms),{key:0,class:O({disabled:n.value})},null,8,["class"])):(d(),g(v(We),{key:1}))],10,ys)),[[v(de),{text:s.value,color:"black",position:"bottom"}]])],2))}}),ws=W(bs,[["__scopeId","data-v-ff5c5042"]]),As={xmlns:"http://www.w3.org/2000/svg",width:"19",height:"19",fill:"none",viewBox:"0 0 19 20"};function Cs(e,t){return d(),u("svg",As,[...t[0]||(t[0]=[a("g",{fill:"#f44747"},[a("path",{"fill-rule":"evenodd",d:"M3.39 1.862q-.021 0-.043.002a1.53 1.53 0 0 0-1.11.59 1.78 1.78 0 0 0-.374 1.155v11.782c-.012.41.114.824.374 1.153a1.53 1.53 0 0 0 1.153.593h7.037a1.53 1.53 0 0 0 1.11-.592c.26-.33.387-.744.374-1.154V13.4a.75.75 0 0 0-1.5 0v2.002l.001.03a.3.3 0 0 1-.051.182.1.1 0 0 1-.023.022H3.437a.1.1 0 0 1-.023-.022.3.3 0 0 1-.051-.182V3.566a.3.3 0 0 1 .05-.182.1.1 0 0 1 .023-.022h6.902q.008.004.023.023c.027.035.054.1.051.182v2.031a.75.75 0 0 0 1.5 0V3.609a1.78 1.78 0 0 0-.374-1.154 1.53 1.53 0 0 0-1.154-.593zM13.593 6.69a.75.75 0 0 1 1.06 0l2.532 2.842a.75.75 0 0 1-.222.532l-2.31 2.31a.75.75 0 1 1-1.06-1.06l1.031-1.032H6.726a.75.75 0 1 1 0-1.5h7.898l-1.031-1.03a.75.75 0 0 1 0-1.062","clip-rule":"evenodd"}),a("path",{d:"m3.347 1.864-.014-.25zm-1.11.59.196.156zM1.862 3.61h.25v-.007zm0 11.782.25.007v-.007zm.374 1.153.196-.154zm1.11.592-.015.25zm7.08 0-.014-.25zm1.11-.591-.195-.155zm.374-1.154h-.25v.007zm-1.499.042-.25.01zm-.051.182-.196-.155zm-.023.022v.25a.25.25 0 0 0 .14-.043zm-6.901 0-.14.207a.25.25 0 0 0 .14.043zm-.023-.022-.196.155zm-.051-.182-.25-.01zm0-11.867-.25.01zm.05-.182.197.155zm.023-.022v-.25a.25.25 0 0 0-.14.044zm6.902 0 .14-.207a.25.25 0 0 0-.14-.043zm.023.023-.196.154zm.051.182-.25-.01zm1.5.042-.25-.008v.008zm-.374-1.154-.196.155zm-1.11-.591.013-.25zm4.226 4.825.186-.166-.01-.01zm-1.061 0-.177-.176zm3.592 2.842h.25a.25.25 0 0 0-.064-.166zm-.222.532-.176-.177zm-2.31 2.31.177.177zm-1.06 0-.177.177zm1.031-2.092.177.177a.25.25 0 0 0-.177-.427zm0-1.5v.25a.25.25 0 0 0 .177-.426zm-1.031-1.03-.177.176zM3.361 2.112h.029v-.5h-.057zm-.928.497a1.28 1.28 0 0 1 .928-.497l-.028-.5A1.78 1.78 0 0 0 2.04 2.3zm-.32.992a1.53 1.53 0 0 1 .32-.992L2.04 2.3a2.03 2.03 0 0 0-.427 1.317zm0 11.789V3.609h-.5v11.782zm.32.999a1.53 1.53 0 0 1-.32-.992l-.5-.015A2.03 2.03 0 0 0 2.04 16.7zm.928.496a1.28 1.28 0 0 1-.928-.496l-.393.31a1.78 1.78 0 0 0 1.292.686zm.029.001h-.03l-.028.499.058.001zm6.994 0H3.39v.5h6.994zm.029 0h-.029v.5l.057-.001zm.929-.497a1.28 1.28 0 0 1-.93.496l.03.5a1.78 1.78 0 0 0 1.292-.686zm.32-.992a1.53 1.53 0 0 1-.32.992l.392.31a2.03 2.03 0 0 0 .427-1.317zm0-1.996v1.989h.5V13.4zm-.5-.5a.5.5 0 0 1 .5.5h.5a1 1 0 0 0-1-1zm-.5.5a.5.5 0 0 1 .5-.5v-.5a1 1 0 0 0-1 1zm0 2.001v-2.001h-.5v2.001zm0 .02v-.02h-.5v.04zm-.105.347a.53.53 0 0 0 .105-.347l-.5.02-.002.023-.001.003.006-.009zm-.079.074a.4.4 0 0 0 .079-.074l-.392-.31a.2.2 0 0 1 .033-.03zm-7.041.043h6.901v-.5H3.437zm-.22-.117a.4.4 0 0 0 .08.074l.28-.414a.2.2 0 0 1 .033.03zm-.104-.347a.53.53 0 0 0 .105.347l.392-.31.006.009-.001-.003-.003-.023zm0-.02v.02l.5.02v-.04zm0-11.807v11.807h.5V3.596zm0-.02v.02h.5v-.04zm.104-.347a.53.53 0 0 0-.104.347l.5-.02.002-.023V3.53l-.005.008zm.078-.073a.4.4 0 0 0-.078.073l.393.31a.2.2 0 0 1-.033.03zm7.043-.044H3.436v.5h6.902zm.219.118a.4.4 0 0 0-.079-.075l-.28.414a.2.2 0 0 1-.033-.03zm.105.347a.53.53 0 0 0-.105-.347l-.392.31-.006-.01v.003a.1.1 0 0 1 .003.024zm0 .02v-.02l-.5-.02v.04zm0 2.001V3.596h-.5v2.002zm.5.5a.5.5 0 0 1-.5-.5h-.5a1 1 0 0 0 1 1zm.5-.5a.5.5 0 0 1-.5.5v.5a1 1 0 0 0 1-1zm0-1.989v1.989h.5V3.609zm-.32-1c.22.28.33.637.32.992l.5.016a2.03 2.03 0 0 0-.428-1.317zm-.93-.496c.373.021.704.21.93.497l.392-.31a1.78 1.78 0 0 0-1.293-.686zm-.028 0h.029l.028-.5h-.057zm-6.994 0h6.994v-.5H3.39zm11.44 4.4a1 1 0 0 0-1.414 0l.354.353a.5.5 0 0 1 .707 0zm2.541 2.852-2.53-2.842-.374.333 2.531 2.842zm-.231.876a1 1 0 0 0 .295-.71h-.5a.5.5 0 0 1-.148.355zm-2.31 2.309 2.31-2.31-.353-.353-2.31 2.31zm-1.414 0a1 1 0 0 0 1.414 0l-.353-.354a.5.5 0 0 1-.707 0zm0-1.414a1 1 0 0 0 0 1.414l.354-.354a.5.5 0 0 1 0-.707zm1.031-1.032-1.
203 1.032.353.353 1.03-1.03zm-7.72.427h7.897v-.5H6.726zm-1-1a1 1 0 0 0 1 1v-.5a.5.5 0 0 1-.5-.5zm1-1a1 1 0 0 0-1 1h.5a.5.5 0 0 1 .5-.5zm7.897 0H6.726v.5h7.898zm-1.208-.604 1.031 1.031.354-.353-1.031-1.032zm0-1.414a1 1 0 0 0 0 1.414l.354-.354a.5.5 0 0 1 0-.707z"})],-1)])])}const Is={render:Cs},Es={xmlns:"http://www.w3.org/2000/svg",width:"19",height:"19",fill:"none",viewBox:"0 0 19 20"};function ks(e,t){return d(),u("svg",Es,[...t[0]||(t[0]=[a("g",{stroke:"#abb2bd","stroke-linecap":"round"},[a("path",{"stroke-width":"2.2",d:"M4 2.475V17"}),a("path",{fill:"#abb2bd","stroke-width":"1.5",d:"M14.509 2.976H4v7.012h10.509l-2.285-3.506z"})],-1)])])}const Ts={render:ks},Rs={class:"menu"},zs={key:0,class:"menu-open"},Os=N({__name:"Menu",setup(e){const t=V(!1);function i(){t.value&&(t.value=!1)}return me(()=>{document.addEventListener("click",i)}),_e(()=>{document.removeEventListener("click",i)}),(r,n)=>(d(),u("div",Rs,[t.value?(d(),u("div",zs,[p(Ce,{class:"end-button",variant:"tertiary",icon:v(Is),"end-text":"End session"},null,8,["icon"]),p(Ie,{variant:"tertiary",class:"report-button",icon:v(Ts)},null,8,["icon"])])):_("",!0),p(J,{class:"toggle",onClick:n[0]||(n[0]=Mt(s=>t.value=!t.value,["stop"]))},{default:D(()=>[...n[1]||(n[1]=[a("div",{class:"dot"},null,-1),a("div",{class:"dot"},null,-1),a("div",{class:"dot"},null,-1)])]),_:1})]))}}),Ds=W(Os,[["__scopeId","data-v-021d5a10"]]),Ls={xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",fill:"none",viewBox:"0 0 25 25"};function Ps(e,t){return d(),u("svg",Ls,[...t[0]||(t[0]=[a("clipPath",{id:"22a"},[a("path",{d:"M0 0h25v25H0z"})],-1),a("g",{stroke:"#000","clip-path":"url(#22a)"},[a("path",{d:"M.5 6.771a1.24 1.24 0 0 1 1.236-1.236H16.14a1.24 1.24 0 0 1 1.236 1.236v11.424c0 .683-.554 1.236-1.236 1.237H1.737A1.24 1.24 0 0 1 .5 18.196zM24.501 7.728v9.548l-4.966-2.711V10.44z"})],-1)])])}const Vs={render:Ps},Ws={class:"live-media-header"},Us=["muted"],Bs=["disabled"],Ns=N({__name:"LiveMediaChatHeader",props:{isMyMicMuted:{type:Boolean},isSpeakerMuted:{type:Boolean},isPartnerSpeaking:{type:Boolean},partnerPresence:{},partnerMicStatus:{},partnerCanUseMic:{type:Boolean},unableToJoinMediaRoom:{type:Boolean},isLoadingMicControl:{type:Boolean},isLoadingSpeakerControl:{type:Boolean},isLoadingCameraControl:{type:Boolean},isBanned:{type:Boolean},isSpeaking:{type:Boolean},isFavoriteVolunteer:{type:Boolean},micState:{},cameraState:{},isCameraOn:{type:Boolean},isPartnerCameraOn:{type:Boolean}},emits:["toggleMuteSelf","toggleMutePartner","toggleCamera","audioUiLoaded","localVideoUiLoaded","remoteVideoUiLoaded"],setup(e,{emit:t}){const i=t,r=e,n=G(),s=k(()=>n.getters["user/userType"]),c=V(),l=V(),h=V();me(async()=>{i("audioUiLoaded",c.value),i("localVideoUiLoaded",l.value),i("remoteVideoUiLoaded",h.value),y.captureEvent(M.VOICE_CHAT_USER_SAW_ZOOM_CHAT_HEADER)});const m=async()=>{i("toggleMutePartner")},o=async()=>{i("toggleMuteSelf")},C=async()=>{i("toggleCamera")},w=k(()=>r.cameraState==="denied"||r.isLoadingCameraControl),P=k(()=>!r.unableToJoinMediaRoom),H=k(()=>n.getters["app/mobileMode"]);return(z,b)=>(d(),u("div",Ws,[a("audio",{ref_key:"meetingAudio",ref:c,muted:r.isSpeakerMuted},null,8,Us),s.value==="student"?(d(),g(v(Re),{key:0,class:"avatar"})):(d(),g(v(Te),{key:1,class:"avatar"})),p(us,{class:"grow",partnerPresence:r.partnerPresence,isFavoriteVolunteer:r.isFavoriteVolunteer},null,8,["partnerPresence","isFavoriteVolunteer"]),a("div",{class:O(["session-buttons",s.value])},[p(ws,{partnerMicStatus:r.partnerMicStatus,isPartnerSpeaking:r.isPartnerSpeaking,isSpeakerMuted:r.isSpeakerMuted,partnerCanUseMic:e.partnerCanUseMic,onToggleMuteSpeaker:m,hasConnectedToMediaRoom:P.value,isLoading:e.isLoadingSpeakerControl},null,8,["partnerMicStatus","isPartnerSpeaking","isSpeakerMuted","partnerCanUseMic","hasConnectedToMediaRoom","isLoading"]),p(vs,{isMicMuted:r.isMyMicMuted,isSpeaking:r.isSpeaking,micState:r.micState,hasSpeakingPrivileges:!r.isBanned,hasConnectedToMediaRoom:P.value,isLoading:r.isLoadingMicControl,onToggleMuteMic:o},null,8,["isMicMuted","isSpeaking","micState","hasSpeakingPrivileges","hasConnectedToMediaR
2oom","isLoading"]),ee((d(),u("button",{class:O(["camera-button",{"camera-button--off":!r.isCameraOn}]),type:"button",disabled:w.value,onClick:C},[p(v(Vs),{class:"icon"})],10,Bs)),[[v(de),{text:e.isCameraOn?"Turn off camera":"Turn on camera",color:"black",position:"bottom"}]]),H.value?(d(),g(Ds,{key:0})):_("",!0)],2),a("div",{class:O(["video-tiles",{"video-tiles--hidden":!r.isCameraOn&&!r.isPartnerCameraOn}])},[a("video",{ref_key:"remoteVideo",ref:h,class:O(["video-tile video-tile--remote",{"video-tile--hidden":!r.isPartnerCameraOn}]),autoplay:"",playsinline:""},null,2),a("video",{ref_key:"localVideo",ref:l,class:O(["video-tile video-tile--local",{"video-tile--hidden":!r.isCameraOn}]),autoplay:"",muted:"",playsinline:""},null,2)],2)]))}}),xs=W(Ns,[["__scopeId","data-v-6c271984"]]),Hs=re(({sendBack:e,input:t})=>{if(t.previousState==="UserSized"){const{width:i,height:r,x:n,y:s}=t;t.resize({width:i,height:r,x:n,y:s}),e({type:"resized",width:i,height:r,x:n,y:s})}else e({type:"maximized"})}),Fs=re(({sendBack:e,input:t})=>{e({type:"resized",width:t.width,height:t.height,x:t.x,y:t.y})}),qs=re(({sendBack:e,input:t})=>{t.maximize({previousWidth:t.previousWidth,previousHeight:t.previousHeight}),e({type:"maximized"})}),Js=re(({input:e})=>{e.minimize()}),Ys=Be({guards:{isVolunteer:({context:e})=>e.isVolunteer},actors:{"unminimize actor":Hs,"resize actor":Fs,"maximize actor":qs,"minimize actor":Js}}).createMachine({context:({input:e})=>({isVolunteer:e.isVolunteer,previousState:"UserSized",width:e.width,height:e.height,x:e.x,y:e.y,maximize:e.maximize,minimize:e.minimize,resize:e.resize}),id:"window",initial:"UserSized",description:`This machine tracks and manages the state of the screen share window and ensures that 3 transitions between states are predictable.`,states:{UserSized:{description:"The window is in a user-sized state, where the user has and can manually resize the window.",on:{moved:{target:"UserSized",actions:E({x:({event:e})=>e.x,y:({event:e})=>e.y})},resized:{target:"UserSized",actions:E({width:({event:e})=>e.width,height:({event:e})=>e.height,x:({event:e})=>e.x,y:({event:e})=>e.y})},toggleMaximize:{target:"Maximized"},toggleMinimize:{target:"Minimized",actions:E({previousState:()=>"UserSized"})}}},Maximized:{description:"The window is maximized, filling the entire parent container.",invoke:{src:"maximize actor",input:({context:e})=>({maximize:e.maximize,previousWidth:e.width,previousHeight:e.height})},on:{toggleMaximize:{target:"UserSized",actions:({context:e})=>e.resize({width:e.width,height:e.height,x:e.x,y:e.y})},toggleMinimize:{target:"Minimized",actions:E({previousState:()=>"Maximized"})},resized:{target:"UserSized",actions:E({width:({event:e})=>e.width,height:({event:e})=>e.height})}}},Minimized:{description:"The window is minimized, and is shown as just the window header. The user can maximize from this state or uniminimze from to the previous state",invoke:{src:"minimize actor",input:({context:e})=>({minimize:e.minimize})},on:{toggleMaximize:{target:"Maximized"},toggleMinimize:{target:"Unminimizing"},moved:{target:"Minimized",actions:E({x:({event:e})=>e.x,y:({event:e})=>e.y})}}},Unminimizing:{description:"This state is entered from the `Minimized` state and then issues the appropriate transition based on the previous state.",invoke:{src:"unminimize actor",input:({context:e})=>({previousState:e.previousState,resize:e.resize,width:e.width,height:e.height,x:e.x,y:e.y})},on:{maximized:{target:"Maximized"},resized:{target:"UserSized",actions:E({width:({event:e})=>e.width,height:({event:e})=>e.height,x:({event:e})=>e.x,y:({event:e})=>e.y})}}}}}),he=5242880;function js(e,t){const i=e.toDataURL("image/jpeg",1).split(";base64,")[1],r=atob(i),n=new Uint8Array(r.length);for(let s=0;s<r.length;s++)n[s]=r.charCodeAt(s);return{binary:new Blob([n],{type:"image/jpeg"}),width:e.width,height:e.height,imageData:t}}const Gs=.05,xe=V(null);function Ks(e){const t=xe.value;if(t===null)return!0;const i=e.imageData.height*e.imageData.width*Gs;try{return kt(t,e.imageData.data,null,e.imageData.width,e.imageData.height)>i}catch(r){return r instanceof Error&&r.message!=="Image sizes do not match."&&x.noticeError(r,"Error c
3omparing previous frame and current frame"),!0}}async function Ae(e){try{if(Ks(e)){xe.value=e.imageData.data;const t=new FormData;t.append("frame",e.binary),t.append("sessionId",F.state.user.session.id),await Ze.checkIfVideoFrameIsClean(t)}}catch(t){x.noticeError(t,"Error moderating screen share frame")}}function Qs(e,t){const i=e.getContext("2d");if(!i)throw new Error("Could not get 2d context");const r=e.width,n=e.height;return i.drawImage(t,0,0,r,n),i.getImageData(0,0,r,n)}function ge({canvas:e,targetElement:t}){const i=Qs(e,t);return js(e,i)}function pe({targetElement:e,sampleInterval:t}){const i=document.createElement("canvas");e instanceof HTMLVideoElement?(i.width=e.videoWidth,i.height=e.videoHeight):(i.width=e.width,i.height=e.height);const r=i.width,n=i.height;function s(l){const h=he*.7,m=Math.sqrt(h/l.binary.size);return i.width=Math.max(80,Math.floor(r*m)),i.height=Math.max(80,Math.floor(n*m)),ge({canvas:i,targetElement:e})}let c=ge({canvas:i,targetElement:e});return c.binary.size>=he&&(c=s(c)),Ae(c),setInterval(()=>{if(e&&i){let l=ge({canvas:i,targetElement:e});l.binary.size>=he&&(l=s(l)),Ae(l)}},t)}function Xs(e={sampleInterval:F.getters["featureFlags/videoModerationSampleInterval"]}){const t=V(null);async function i(n){if(n instanceof HTMLVideoElement)n.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?t.value=pe({targetElement:n,sampleInterval:e.sampleInterval}):n.addEventListener("loadeddata",()=>{n.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(t.value=pe({targetElement:n,sampleInterval:e.sampleInterval}))});else if(n instanceof HTMLCanvasElement)t.value=pe({targetElement:n,sampleInterval:e.sampleInterval});else throw new Error(`Can not start moderation: Target element is not a video or canvas: ${n}`)}function r(){t.value&&(clearInterval(t.value),t.value=null)}return{beginScreenShareModeration:i,endScreenShareModeration:r}}class Zs{calculateScore(t,i,r){return r||i===0?0:i??0}prioritizeVideoSendBandwidthForActiveSpeaker(){return!1}}const $s=K(async({input:e})=>{if(!e.sessionId)throw new Error("Session ID is required");const{data:t}=await j.getOrCreateSessionMeeting(e.sessionId);return t}),en=K(async({input:e})=>{const t=new ne.ConsoleLogger("chimeMeetingLogger",ne.LogLevel.WARN),i=new ne.DefaultDeviceController(t),r=new ne.MeetingSessionConfiguration(e.context.meeting,e.context.attendee);return{meetingSession:new ne.DefaultMeetingSession(r,t,i)}});function tn({audioVideo:e,videoElement:t,attendee:i,parent:r}){const n=c=>r.send(c),s={videoTileDidUpdate:c=>{if(n({type:"set_screen_share_dimensions",width:c.videoStreamContentWidth??0,height:c.videoStreamContentHeight??0}),!c.boundAttendeeId)return;const l=i?.AttendeeId;if(c.isContent&&l){const h=c.boundAttendeeId,m=new ne.DefaultModality(h).base();if(!t)throw"No video element is available";l===m&&e.bindVideoElement(c.tileId,t),l!==m&&(e.bindVideoElement(c.tileId,t),n({type:"partner_shared_screen"}))}},contentShareDidStop:()=>{n({type:"stop_share_screen"})},videoTileWasRemoved:()=>{n({type:"partner_stopped_sharing_screen"})}};return e.addContentShareObserver(s),e.addObserver(s),()=>{e.removeContentShareObserver(s),e.removeObserver(s)}}function sn({audioVideo:e,localVideoElement:t,remoteVideoElement:i,parent:r}){const n=l=>r.send(l);let s=null;const c={videoTileDidUpdate:l=>{!l.boundAttendeeId||l.isContent||!l.tileId||(l.localTile?t&&e.bindVideoElement(l.tileId,t):(s=l.tileId,i&&e.bindVideoElement(l.tileId,i),n({type:"partner_camera_changed",isOn:!0})))},videoTileWasRemoved:l=>{l===s&&(s=null,n({type:"partner_camera_changed",isOn:!1}))}};return e.addObserver(c),()=>{e.removeObserver(c)}}const nn=re(({input:e,sendBack:t})=>{const i=z=>e.parent.send(z),{meetingSession:r,partnerAttendeeId:n,attendee:s}=e.context,c=z=>{r.audioVideo.realtimeSubscribeToVolumeIndicator(z,(b,f,A)=>{A!==null&&i({type:"partner_mute_change",muted:A}),i({type:"received_partner_audio_info"})})},l=(z,b,f)=>{f===F.getters["user/sessionPartner"].id&&(c(z),i({type:"new_partner_attendee",partnerAttendeeId:z}))};r.audioVideo.realtimeSubscribeToAttendeeIdPresence(l);const h={eventDidReceive(z){z==="meetingStartSucceeded"&&i({type:"meeting_started"}),z==="meetingEnded"&&i({type:"meeting_ended"})}};r.eventController.addObserver(h);const m=tn({audioVideo:r.audioVideo,videoElement:e.context.videoOutputElement,attendee:s||void 0,parent:e.parent}),o=sn({audioVideo:r.audioVideo,localVideoElement:e.context.localVideoElement,remoteVideoElement:e.context.remoteVideoElement,parent:e.parent});n&&c(n);let C=null;const w=z=>{C&&clearTimeout(C),z.length===0?C=setTimeout(()=>{i({type:"active_speakers_changed",speakerIds:z})},1e3):i({type:"active_speakers_changed",speakerIds:z})};r.audioVideo.subscribeToActiveSpeakerDetector(new Zs,w);const P=z=>{if(z.type==="started"&&i({type:"transcription_status_changed",status:"started"}),z.type==="stopped"&&i({type:"transcription_status_changed",status:"stopped"}),!!z.results)for(const b of z.results)b.isPartial?F.dispatch("liveMedia/audio/inProgressCaptionMessage",b):F.dispatch("liveMedia/audio/setCaptionMessage",b)};F.getters["featureFlags/isNewSpeechToTextEnabled"]||r.audioVideo.transcriptionController?.subscribeToTranscriptEvent(P),t({type:"set_unsubscribe_all",unsubscribeAllFn:dn,observers:{transcriptionObserver:P,partnerAddedObserver:l,meetingStartedObserver:h,activeSpeakerCallback:w,unsubscribeScreenShareHandler:m,unsubscribeVideoTileHandler:o},partnerAttendeeId:n}
3),r.audioVideo.start(),r.audioVideo.realtimeMuteLocalAudio()}),on=re(({sendBack:e})=>{const t=F.getters["liveMedia/isBannedFromLiveMedia"];e(t?{type:"banned"}:{type:"not_banned"})}),an=typeof CaptureController<"u";async function rn(e){if(an){const t=new CaptureController;t.setFocusBehavior("no-focus-change");const i=await navigator.mediaDevices.getDisplayMedia({controller:t});await e.meetingSession.audioVideo.startContentShare(i)}else await e.meetingSession.audioVideo.startContentShareFromScreenCapture()}async function He(e){await j.startSessionRecording(e)}async function dn(e,t,i){e.meetingSession.audioVideo.transcriptionController?.unsubscribeFromTranscriptEvent(t.transcriptionObserver),e.meetingSession.audioVideo.realtimeUnsubscribeToAttendeeIdPresence(t.partnerAddedObserver),e.meetingSession.eventController.removeObserver(t.meetingStartedObserver),e.meetingSession.audioVideo.unbindAudioElement(),e.meetingSession.audioVideo.realtimeUnsubscribeFromVolumeIndicator(i??""),e.meetingSession.audioVideo.unsubscribeFromActiveSpeakerDetector(t.activeSpeakerCallback),t.unsubscribeScreenShareHandler(),t.unsubscribeVideoTileHandler(),e.endScreenShareModeration(),e.meetingSession.audioVideo.stopLocalVideoTile(),e.meetingSession.audioVideo.stop(),await e.meetingSession.audioVideo.stopContentShare(),await e.meetingSession.audioVideo.stopAudioInput(),await e.meetingSession.audioVideo.stopVideoInput(),F.dispatch("liveMedia/reset")}const ln=K(async({input:e})=>{e.sessionRecordingStarted||await He(e.sessionId);const{beginScreenShareModeration:t,endScreenShareModeration:i}=Xs();return t(e.videoOutputElement),await rn({meetingSession:e.meetingSession}),{endScreenShareModeration:i}}),cn=async({input:e})=>{await e.context.meetingSession.audioVideo.stopAudioInput()},Fe=async({input:e})=>{e.context.isSharingMyScreen&&(await e.context.meetingSession.audioVideo.stopContentShare(),e.context.endScreenShareModeration())},un=K(Fe),mn=K(async({input:e})=>{await Fe({input:e}),await cn({input:e})}),hn=K(async({input:{transcriptionStarted:e,sessionId:t,sessionRecordingStarted:i,parent:r}})=>{e||(r.send({type:"transcription_status_changed",status:"started"}),await j.startSessionMeetingTranscription(t)),i||await He(t)}),gn=K(async({input:{meetingSession:e}})=>{e.audioVideo.setDeviceLabelTrigger(async()=>await navigator.mediaDevices.getUserMedia({audio:!0}));const t=await e.audioVideo.listAudioInputDevices();if(!t)throw new Error("No audio input devices available");await e.audioVideo.startAudioInput(t[0])}),pn=K(async({input:{meetingSession:e}})=>{e.audioVideo.setDeviceLabelTrigger(async()=>await navigator.mediaDevices.getUserMedia({audio:!0,video:!0}));const t=await e.audioVideo.listVideoInputDevices();if(!t?.length)throw new Error("No video input devices available");await e.audioVideo.startVideoInput(t[0].deviceId),e.audioVideo.startLocalVideoTile()}),Sn=K(async({input:{meetingSession:e}})=>{e.audioVideo.stopLocalVideoTile(),await e.audioVideo.stopVideoInput()}),vn=K(async({input:{meetingSession:e,audioOutputElement:t}})=>{await e.audioVideo.bindAudioElement(t),e.audioVideo.setDeviceLabelTrigger(()=>Promise.resolve(new MediaStream)),await e.audioVideo.listAudioInputDevices(),e.audioVideo.start()}),fn=3,_n=1e3,Mn=2;function yn(){return Be({delays:{timeout:({context:e})=>_n*Mn**e.retryCount},actors:{fetchChimeMeeting:$s,createMeetingSession:en,joinMeeting:nn,isBannedFromLiveMedia:on,startingShareMyScreen:ln,stopShareMyScreen:un,stopShareMyScreenAndMic:mn,requestMicAccess:gn,requestCameraAccess:pn,stopCamera:Sn,requestSpeakerAccess:vn,maybeStartTranscription:hn},actions:{entry:({self:e})=>{F.commit("liveMedia/setScreenShareActor",e)},incrementRetryCount:E({retryCount:({context:e})=>e.retryCount+1}),setupOnStop:({self:e},t)=>{const i=e.subscribe({complete:async()=>{await t.unsubscribeAllFn(e.getSnapshot().context,t.observers,t.partnerAttendeeId),i.unsubscribe()},error:async()=>{await t.unsubscribeAllFn(e.getSnapshot().context,t.observers,t.partnerAttendeeId),i.unsubscribe()}})},fetchMediaRoom:we({type:"fetch_media_room"}),notifyMediaRoomReady:we({type:"media_room_is_ready"}),setMeetingJoined:E({isMeetingJoined:()=>!0})},guards:{maxRetriesReached:({context:e})=>e.retryCount>
3e.maxRetries,hasJoinedMediaRoom:({context:e})=>e?.isMeetingJoined,hasNotJoinedMediaRoom:({context:e})=>!e?.isMeetingJoined}}).createMachine({id:"MeetingMachine",context:()=>({sessionId:null,audioOutputElement:null,videoOutputElement:null,localVideoElement:null,remoteVideoElement:null,isPartnerCameraOn:!1,retryCount:0,maxRetries:fn,meeting:null,attendee:null,partnerAttendeeId:null,meetingSession:null,showPartnerScreenShare:!1,isSharingMyScreen:!1,endScreenShareModeration:()=>{},isPartnerMicMuted:!0,activeSpeakerIds:[],isPartnerSpeaking:!1,hasReceivedPartnerAudio:!1,transcriptionStarted:!1,screenShareWidth:void 0,screenShareHeight:void 0,sessionRecordingStarted:!1,isMeetingJoined:!1}),initial:"Initializing",entry:{type:"entry"},on:{meeting_ended:{target:"#MeetingMachine.Ended"},ban_user_from_live_media:{target:"#MeetingMachine.ViewOnly"},stop_stream:{target:"#MeetingMachine.ViewOnly"},new_partner_attendee:{actions:E({partnerAttendeeId:({event:e})=>e.partnerAttendeeId})},set_unsubscribe_all:{actions:{type:"setupOnStop",params:({event:e})=>({unsubscribeAllFn:e.unsubscribeAllFn,observers:e.observers,partnerAttendeeId:e.partnerAttendeeId})}},set_screen_share_dimensions:{actions:E({screenShareWidth:({event:e})=>e.width,screenShareHeight:({event:e})=>e.height})},transcription_status_changed:{actions:E({transcriptionStarted:({event:e})=>e.status==="started"})},partner_camera_changed:{actions:E({isPartnerCameraOn:({event:e})=>e.isOn})}},states:{Initializing:{type:"parallel",onDone:{target:"Active"},states:{LoadingAudioUI:{initial:"Waiting",states:{Waiting:{on:{audio_ui_loaded:{target:"Loaded",actions:E({audioOutputElement:({context:e,event:t})=>e.audioOutputElement=t.audioOutputElement})}}},Loaded:{type:"final"}}},LoadingVideoUI:{initial:"Waiting",description:`this state waits for the <video> element to be 4 loaded and is triggered in the onMount of the component`,states:{Waiting:{on:{video_ui_loaded:{target:"Loaded",actions:E({videoOutputElement:({context:e,event:t})=>e.videoOutputElement=t.videoOutputElement})}}},Loaded:{type:"final"}}},LoadingLocalVideoUI:{initial:"Waiting",description:`this state waits for the local camera <video> element to be 5 loaded and is triggered in the onMount of the component`,states:{Waiting:{on:{local_video_ui_loaded:{target:"Loaded",actions:E({localVideoElement:({event:e})=>e.localVideoElement})}}},Loaded:{type:"final"}}},LoadingRemoteVideoUI:{initial:"Waiting",description:`this state waits for the partner's camera <video> element to be 6 loaded and is triggered in the onMount of the component`,states:{Waiting:{on:{remote_video_ui_loaded:{target:"Loaded",actions:E({remoteVideoElement:({event:e})=>e.remoteVideoElement})}}},Loaded:{type:"final"}}},LoadingSessionId:{initial:"Waiting",states:{Waiting:{on:{set_session_id:{target:"Loaded",actions:E({sessionId:({event:e})=>e.sessionId})}}},Loaded:{type:"final"}}},WaitingForSessionStart:{initial:"Waiting",description:"this state waits for the UPChieve session to be matched (e.g. volunteer joins)",states:{Waiting:{on:{session_started:{target:"Loaded"}}},Loaded:{type:"final"}}}}},Active:{type:"parallel",states:{ScreenShareControl:{initial:"CheckingEligibility",states:{Idle:{on:{share_screen:{target:"FetchMediaRoom"},partner_shared_screen:[{guard:"hasNotJoinedMediaRoom",target:"ViewingPartnerScreenShare",actions:["fetchMediaRoom",E({showPartnerScreenShare:()=>!0})]},{target:"ViewingPartnerScreenShare",actions:E({showPartnerScreenShare:()=>!0})}]}},FetchMediaRoom:{tags:["loadingScreenShare"],entry:"fetchMediaRoom",always:[{target:"StartingShareMyScreen",guard:"hasJoinedMediaRoom"}],on:{media_room_is_ready:{target:"StartingShareMyScreen"}}},ViewOnly:{on:{partner_shared_screen:{target:"ViewingPartnerScreenShare",actions:[E({showPartnerScreenShare:()=>!0}),()=>{y.captureEvent(M.SCREENSHARE_USER_VIEWED_SCREENSHARE)}]},not_banned:{target:"CheckingEligibility"}}},CheckingEligibility:{on:{banned:[{target:"ViewingPartnerScreenShare",guard:({context:e})=>e.showPartnerScreenShare},{target:"ViewOnly"}],not_banned:{target:"Idle"}},invoke:{id:"ScreenShareControl.CheckingEligibility:checkEligibility",src:"isBannedFromLiveMedia"}},StartingShareMyScreen:{invoke:{id:"ScreenShareControl.StartingShareMyScreen:startingShareMyScreen",src:"startingShareMyScreen",input:({context:e})=>({sessionId:e.sessionId,sessionRecordingStarted:e.sessionRecordingStarted,videoOutputElement:e.videoOutputElement,meetingSession:e.meetingSession}),onDone:{target:"SharingMyScreen",actions:[E({isSharingMyScreen:()=>!0,endScreenShareModeration:({event:e})=>e.output.endScreenShareModeration,sessionRecordingStarted:()=>!0}),()=>y.captureEvent(M.SCREENSHARE_USER_SHARED_SCREEN),({self:e,event:t})=>{e.subscribe({complete:()=>{t.output.endScreenShareModeration()},error:()=>{t.output.endScreenShareModeration()}})},({context:e})=>{oe.emit("joinedLiveMedia",{sessionId:e.sessionId})}]},onError:{target:"Idle",actions:({event:e})=>{x.noticeError("Error starting share my screen",e.error)}}}},SharingMyScreen:{on:{stop_share_screen:{target:"StoppingShareMyScreen"}}},StoppingShareMyScreen:{invoke:{id:"ScreenShareControl.StoppingShareMyScreen:stopShareMyScreen",src:"stopShareMyScreen",input:({context:e})=>({context:e}),onDone:{target:"Idle",actions:()=>y.captureEvent(M.SCREENSHARE_USER_STOPPED_SCREENSHARE)}}},ViewingPartnerScreenShare:{on:{partner_stopped_sharing_screen:[{guard:()=>F.getters["liveMedia/isBannedFromLiveMedia"],target:"ViewOnly"},{target:"Idle",actions:[E({showPartnerScreenShare:()=>!1}),()=>{y.captureEvent(M.SCREENSHARE_USER_STOPPED_VIEWING_SCREENSHARE)}]}]}}}},MicControl:{description:"State machine that manages the user's microphone",initial:"CheckingEligibility",states:{AudioCallUnavailable:{type:"final",tags:["unableToJoinAudio"]},ViewOnly:{on:{not_banned:{target:"CheckingEligibility"}}},CheckingEligibility:{invoke:{id:"MicControl.CheckingEligibility:checkEligibility",src:"isBannedFromLiveMedia"},on:{banned:{target:"ViewOnly"},not_banned:{target:"Waiting"}}},Waiting:{description:"Waiting for the user to request to use their mic",on:{toggle_mute_self:{target:"FetchMediaRoom"}}},FetchMediaRoom:{tags:["loadingAudioCall"],entry:"fetchMediaRoom",always:[{target:"RequestingMicAccess",guard:"hasJoinedMediaR
6oom"}],on:{media_room_is_ready:{target:"RequestingMicAccess"}}},RequestingMicAccess:{tags:["loadingAudioCall"],description:`Request mic permissions and start the user's audio input, or move them to an ineligible 7 state if no audio input device is available or they deny permissions.`,invoke:{id:"MicControl.RequestingMicAccess:requestMicAccess",src:"requestMicAccess",input:({context:e})=>({meetingSession:e.meetingSession}),onDone:{target:"WaitingForTranscription"},onError:{target:"MicPermissionsDenied"}}},MicUnmuted:{entry:[({context:e})=>{e.meetingSession?.audioVideo.realtimeUnmuteLocalAudio()}],on:{toggle_mute_self:{target:"MicMuted"}}},MicMuted:{entry:[({context:e})=>{e.meetingSession?.audioVideo.realtimeMuteLocalAudio()}],on:{toggle_mute_self:{target:"WaitingForTranscription"}}},WaitingForTranscription:{tags:["loadingAudioCall"],on:{transcription_not_started:{target:"MicMuted"},transcription_started:{target:"MicUnmuted"}},invoke:{id:"MicControl.WaitingForTranscription:maybeStartTranscription",src:"maybeStartTranscription",input:({context:e,self:t})=>({transcriptionStarted:e.transcriptionStarted,sessionId:e.sessionId,sessionRecordingStarted:e.sessionRecordingStarted,parent:t}),onDone:{target:"MicUnmuted",actions:E({sessionRecordingStarted:()=>!0})},onError:{target:"MicMuted",actions:()=>y.captureEvent(M.GENERAL_TRANSCRIPTION_ERROR,{isFeatureFlagEnabled:F.getters["featureFlags/isNewSpeechToTextEnabled"]})}}},MicPermissionsDenied:{description:"Failed to get mic permissions",on:{toggle_mute_self:{target:"RequestingMicAccess"}}}}},CameraControl:{description:"State machine that manages the user's camera",initial:"CheckingEligibility",states:{CameraUnavailable:{type:"final",tags:["unableToJoinAudio"]},ViewOnly:{on:{not_banned:{target:"CheckingEligibility"}}},CheckingEligibility:{invoke:{id:"CameraControl.CheckingEligibility:checkEligibility",src:"isBannedFromLiveMedia"},on:{banned:{target:"ViewOnly"},not_banned:{target:"Waiting"}}},Waiting:{description:"Waiting for the user to request to use their camera",on:{toggle_camera:{target:"FetchMediaRoom"}}},FetchMediaRoom:{tags:["loadingCameraControl"],entry:"fetchMediaRoom",always:[{target:"RequestingCameraAccess",guard:"hasJoinedMediaRoom"}],on:{media_room_is_ready:{target:"RequestingCameraAccess"}}},RequestingCameraAccess:{tags:["loadingCameraControl"],description:`Request camera permissions and start the user's local video tile, or move them to an 8 ineligible state if no video input device is available or they deny permissions.`,invoke:{id:"CameraControl.RequestingCameraAccess:requestCameraAccess",src:"requestCameraAccess",input:({context:e})=>({meetingSession:e.meetingSession}),onDone:{target:"CameraOn"},onError:{target:"CameraPermissionsDenied"}}},CameraOn:{on:{toggle_camera:{target:"StoppingCamera"}}},StoppingCamera:{tags:["loadingCameraControl"],invoke:{id:"CameraControl.StoppingCamera:stopCamera",src:"stopCamera",input:({context:e})=>({meetingSession:e.meetingSession}),onDone:{target:"Waiting"},onError:{target:"Waiting"}}},CameraPermissionsDenied:{description:"Failed to get camera permissions",on:{toggle_camera:{target:"RequestingCameraAccess"}}}}},SpeakerControl:{description:"State machine that manages the user's speaker controls (muting/unmuting the other person)",initial:"PreviousState",states:{PreviousState:{type:"history",target:"Waiting"},Waiting:{description:"Waiting for the user to attempt to interact with the speaker.",on:{toggle_mute_partner:{target:"FetchMediaRoom"}}},FetchMediaRoom:{tags:["loadingSpeakerControl"],entry:"fetchMediaRoom",always:[{target:"RequestSpeakerAccess",guard:"hasJoinedMediaRoom"}],on:{media_room_is_ready:{target:"RequestSpeakerAccess"}}},RequestSpeakerAccess:{tags:["loadingSpeakerControl"],invoke:{id:"SpeakerControl.RequestSpeakerAccess#requestSpeakerAccess",src:"requestSpeakerAccess",input:({context:e})=>({meetingSession:e.meetingSession,audioOutputElement:e.audioOutputElement}),onDone:{target:"SpeakerUnmuted"},onError:{target:"SpeakerPermissionsDenied"}}},SpeakerUnmuted:{entry:[()=>{F.dispatch("liveMedia/audio/dismissDisplayCallStatus")}],on:{toggle_mute_partner:{target:"SpeakerMuted"}}},SpeakerMuted:{on:{toggle_mute_partner:{target:"SpeakerUnmuted"}}},SpeakerPermissionsDenied:{description:"Failed to get speaker permissions",on:{toggle_mute_partner:{target:"RequestSpeakerAccess"}}}}},MediaRouter:{initial:"Idle",states:{Idle:{on:{fetch_media_room:{target:"FetchingChimeMeeting",guard:"hasNotJoinedMediaR
8oom"}}},FetchingChimeMeeting:{initial:"Loading",states:{Loading:{invoke:{id:"FetchingChimeMeeting.Loading:fetchChimeMeeting",src:"fetchChimeMeeting",input:({context:e})=>({sessionId:e.sessionId}),onDone:{target:"#MeetingMachine.Active.MediaRouter.CreatingMeetingSession",actions:E({meeting:({event:e})=>e.output.meeting,attendee:({event:e})=>e.output.attendee,partnerAttendeeId:({event:e})=>e.output.partnerAttendee?.AttendeeId??null,retryCount:0})},onError:{target:"RetryFetchingChimeMeeting",actions:[({event:e})=>{x.noticeError("Error fetching chime meeting",e.error)},()=>y.captureEvent(M.CHIME_CONNECTION_ERROR)]}}},RetryFetchingChimeMeeting:{after:{timeout:[{target:"#MeetingMachine.FailedToConnect",guard:{type:"maxRetriesReached"}},{target:"Loading",actions:{type:"incrementRetryCount"}}]}}}},CreatingMeetingSession:{invoke:{id:"CreatingMeetingSession:createMeetingSession",src:"createMeetingSession",input:({context:e})=>({context:e}),onDone:{target:"JoiningMeeting",actions:E({meetingSession:({event:e})=>e.output.meetingSession})},onError:{target:"#MeetingMachine.FailedToConnect",actions:({event:e})=>{x.noticeError("Error creating meeting session",e.error)}}}},JoiningMeeting:{invoke:{id:"JoiningMeeting:joinMeeting",src:"joinMeeting",input:({context:e,self:t})=>({context:e,parent:t})},on:{meeting_started:{actions:["setMeetingJoined","notifyMediaRoomReady"],target:"Ready"}},description:`This is where we add the chime observers and call audioVideo.start() 9 TODO: add retry for when we get an unhandled exception, and 'sendBack' 10 to retry when we get an error from AWS`},Ready:{}},on:{active_speakers_changed:{actions:[E({isPartnerSpeaking:e=>e.event.speakerIds.includes(e.context.partnerAttendeeId??""),activeSpeakerIds:e=>e.event.speakerIds,isPartnerMicMuted:e=>e.context.partnerAttendeeId&&e.event.speakerIds.includes(e.context.partnerAttendeeId)?!1:e.context.
10isPartnerMicMuted})]},partner_mute_change:{actions:[E({isPartnerMicMuted:e=>e.event.muted})]},received_partner_audio_info:{actions:[E({hasReceivedPartnerAudio:()=>!0})]}}}}},ViewOnly:{invoke:{id:"ViewOnly:stopShareMyScreenAndMic",src:"stopShareMyScreenAndMic",input:({context:e})=>({context:e}),onDone:{target:"#MeetingMachine.Active.MediaRouter.Ready"}}},FailedToConnect:{type:"final",tags:["unableToJoinMediaRoom"]},Ended:{type:"final"}}})}const bn={class:"resize-buttons"},wn=["height","width"],Se=300,An=300,Y=10,Cn=N({__name:"ScreenShare",props:{firstName:{},isViewingPartnerScreenShare:{type:Boolean},meetingActor:{},screenShareWidth:{},screenShareHeight:{},screenShareActive:{type:Boolean}},emits:["dragging","resizing"],setup(e,{emit:t}){const i=t,r=e,n=V(),s=V(),c=V(Y),l=V(Y),h=V(),m=V(),o=V(null),C=V(null),w=k(()=>o.value?o.value:n.value?Math.max(r.screenShareWidth??0,n.value?.offsetWidth??0):r.screenShareWidth?r.screenShareWidth:Se),P=k(()=>C.value?C.value:n.value?Math.max(r.screenShareHeight??0,n.value?.offsetHeight??0):r.screenShareHeight?r.screenShareHeight:An);function H(U,I){h.value=U-Y*2,m.value=I-Y*2,window.dispatchEvent(new Event("resize"))}const z=Et(()=>{const[U,I]=s.value.getParentSize();(U-Y*2!==h.value||I-Y*2!==m.value)&&H(U,I)},500);me(()=>{r.meetingActor.send({type:"video_ui_loaded",videoOutputElement:n.value});const[U,I]=s.value.getParentSize();H(U,I),window.addEventListener("resize",z)});const b=V(),f=V(),A={input:{isViewingPartnerScreenShare:r.isViewingPartnerScreenShare,width:w.value,height:P.value,x:c.value,y:l.value,maximize:()=>{const[U,I]=s.value.getParentSize();c.value=Y,l.value=Y,C.value=I-Y*2,o.value=U-Y*2,se(()=>{s.value.changeWidth(w.value),s.value.changeHeight(P.value)})},minimize:()=>{o.value=Se,C.value=b.value.offsetHeight,se(()=>{s.value.changeWidth(w.value),s.value.changeHeight(P.value)}),y.captureEvent(M.SCREENSHARE_USER_MINIMIZED_SCREENSHARE)},resize:({width:U,height:I,x:$,y:q})=>{o.value=U,C.value=I,c.value=$,l.value=q,se(()=>{s.value.changeWidth(w.value),s.value.changeHeight(P.value)})}}},L=Ue(Ys,A),Q=V(!1),X=()=>{Q.value=!1},te=document.querySelector("#auxiliary-container");return te?.addEventListener("click",X),_e(()=>{window.removeEventListener("resize",z),te?.removeEventListener("click",X)}),Pe(()=>r.screenShareActive,U=>{U&&se(()=>{L.send({type:"toggleMaximize"}),r.isViewingPartnerScreenShare||se(()=>{L.send({type:"toggleMaximize"})})})}),(U,I)=>{const $=S("vue-draggable-resizable");return d(),g($,{ref_key:"screenShareWindow",ref:s,active:Q.value,onMousedown:I[2]||(I[2]=q=>Q.value=!0),y:l.value,x:c.value,class:O(["window",{closed:v(L).snapshot.value.matches("Minimized")}]),"lock-aspect-ratio":!1,parent:!0,z:10,onResizing:I[3]||(I[3]=()=>{i("resizing",!0)}),onResizeStop:I[4]||(I[4]=(q,B,Je,Ye)=>{i("resizing",!1),o.value=Je,C.value=Ye,v(L).send({type:"resized",width:w.value,height:P.value,x:q,y:B})}),onDragging:I[5]||(I[5]=()=>{i("dragging",!0)}),onDragStop:I[6]||(I[6]=(q,B)=>{i("dragging",!1),c.value=q,l.value=B,v(L).send({type:"moved",x:q,y:B})}),"class-name-active":"active","class-name-dragging":"dragging","min-width":Se,h:P.value,w:w.value,"max-width":h.value,"max-height":m.value},{default:D(()=>[a("div",{class:"window-header",ref_key:"windowHeader",ref:b},[R(T(r.firstName)+"'s screen ",1),a("div",bn,[a("button",{type:"button",onClick:I[0]||(I[0]=()=>v(L).send({type:"toggleMaximize"})),class:"resize-button"},[v(L).snapshot.value.matches("Maximized")?(d(),g(v(Ct),{key:0})):(d(),g(v(It),{key:1}))]),a("button",{type:"button",onClick:I[1]||(I[1]=()=>v(L).send({type:"toggleMinimize"})),class:O(["resize-button",v(L).snapshot.value.matches("Minimized")?"plus":"minus"])},T(v(L).snapshot.value.matches("Minimized")?"+":"-"),3)])],512),ee(a("div",{class:"window-content",ref_key:"windowContent",ref:f},[a("video",{height:s.value?.height?s.value.height-(b.value?.offsetHeight??0):"auto",width:s.value?.width?s.value.width:"auto",ref_key:"meetingVideo",ref:n},null,8,wn)],512),[[yt,!v(L).snapshot.value.matches("Minimized")]])]),_:1},8,["active","y","x","class","h","w","max-width","max-height"])}}}),In=W(Cn,[["__scopeId","data-v-fac36cdf"]]),En={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2048 2048"};function kn(e,t){return d(),u("svg",En,[...t[0]||(t[0]=[Ve('<path fill="#e
106c86b" d="M409.654 1709.607c-27.971 0-55.305-7.542-79.049-21.809-22.244-13.367-40.898-32.376-53.945-54.974s-20.183-48.257-20.637-74.205c-.485-27.696 6.651-55.14 20.636-79.363l614.347-1064.08c13.985-24.223 34.183-44.125 58.411-57.553 22.698-12.581 48.489-19.231 74.582-19.231 26.094 0 51.883 6.65 74.581 19.23 24.228 13.429 44.426 33.33 58.412 57.553l614.346 1064.08c13.985 24.222 21.121 51.665 20.638 79.362-.454 25.948-7.59 51.608-20.637 74.206-13.047 22.597-31.701 41.608-53.946 54.976-23.743 14.268-51.078 21.809-79.049 21.809z"></path><path fill="#f7e07f" d="M972.038 466.784 361.87 1523.627c-23.094 40 5.774 90 51.962 90h1220.337c46.188 0 75.056-50 51.961-90L1075.962 466.784c-23.094-40-80.829-40-103.924 0"></path><g fill="#fc636e"><path d="M1024 1302.971c-25.039 0-45.337-20.298-45.337-45.337V780.563c0-25.039 20.298-45.337 45.337-45.337s45.337 20.298 45.337 45.337v477.071c0 25.039-20.298 45.337-45.337 45.337"></path><circle cx="1024" cy="1438.027" r="51.143"></circle></g>',3)])])}const qe={render:kn},Tn={class:"header"},Rn={class:"infraction-modal-body"},zn={key:0,"data-testid":"potential-policy-violations"},On={key:1,"data-testid":"infraction-detail"},Dn="Please check the content of your screen for any potentially problematic content, and remove it before sharing your screen again. ",Ln=N({__name:"ModerationInfractionModal",props:{moderationInfraction:{}},emits:["close"],setup(e,{emit:t}){const i=e,r=k(()=>{const h=new Set(i.moderationInfraction.stopStreamImmediatelyReasons?.length?i.moderationInfraction.stopStreamImmediatelyReasons:i.moderationInfraction.infraction);return Array.from(h).join(", ")}),n=k(()=>{let h="For everyone's safety, your screen share and microphone have been disabled. ";return i.moderationInfraction.stopStreamImmediatelyReasons?.length&&!i.moderationInfraction.isBanned&&i.moderationInfraction.source==="screenshare"&&(h+=Dn),h}),s=G(),c=t,l=k(()=>s.getters["liveMedia/moderationInfractionSource"]);return(h,m)=>(d(),g(Z,{class:"moderation-infraction-info-modal upc-modal"},{default:D(()=>[a("div",Tn,[p(v(qe),{class:"warning-icon",src:"@/assets/warning_icon.svg"}),a("h1",null," We detected a potential policy violation with your "+T(l.value),1)]),m[5]||(m[5]=a("br",null,null,-1)),a("div",Rn,[i.moderationInfraction?.stopStreamImmediatelyReasons?.length||i.moderationInfraction.infraction?(d(),u("p",zn,[m[1]||(m[1]=R(" Potential policy violations: ",-1)),a("b",null,T(r.value),1)])):_("",!0),n.value?(d(),u("p",On,T(n.value),1)):_("",!0),m[3]||(m[3]=a("p",null," Don't worry, we'll manually review to confirm if this was a mistake. If you need support, send us a message or email us at [email protected]. ",-1)),m[4]||(m[4]=a("p",null,"Thanks for your patience!",-1)),p(J,{onClick:m[0]||(m[0]=o=>c("close")),"show-arrow":!1,variant:"primary"},{default:D(()=>[...m[2]||(m[2]=[R("Close",-1)])]),_:1})])]),_:1}))}}),Pn=W(Ln,[["__scopeId","data-v-a1b135c8"]]),Vn={class:"header"},Wn={class:"infraction-modal-body"},Un={class:"confirmation-buttons"},Bn=N({__name:"PartnerAckScreenShareInfractionModal",setup(e){const t=G(),i=t.getters["user/isStudent"]?"coach":"student",r=t.getters["user/isStudent"]?"https://help.upchieve.org/en/articles/24-coach-community-guidelines":"https://help.upchieve.org/en/articles/25-student-community-guidelines",n=Ne(i),s=k(()=>t.state.liveMedia.potentialPartnerInfraction!=null),c=()=>{h("addPartnerLiveMediaBan",{})},l=()=>{h("removePartnerLiveMediaBan",{banType:null})},h=async(m,o)=>{try{const P=t.state.session?.latestSession?t.state.session.latestSession:(await ae.getLatestSession()).sessionData;oe.emit(m,{...o,sessionId:P.id})}catch(P){x.noticeError(P,"Could not update session and user after potential moderation violation")}const C=o.banType!==void 0?`Thanks letting us know! Let the ${i} know they can screen share again.`:`Thanks for lettings us know! The ${i} is banned from screen sharing. `;await(await Tt.create({message:C,color:"dark",position:"middle",animated:!0,duration:5e3,swipeGesture:"vertical",buttons:[{icon:zt,role:"cancel"}]})).present(),t.commit("liveMedia/setPotentialPartnerInfraction",null)};return(m,o)=>s.value?(d(),g(Z,{key:0,class:"moderation-infraction-info-modal upc-modal"},{default:D(()=>[a("div",Vn,[p(v(qe),{class:"warning-icon",src:"@/assets/warning_icon.svg"}),a("h1",null," Potential "+T(v(n))+" Moderation Violation ",1)]),o[5]||(o[5]=a("br",null,null,-1)),a("div",Wn,[a("p",null," For everyone's safety, we've banned the "+T(v(i))+" from using their microphone and screen share features because a person appeared in the screen share. ",1),a("p",null,[R(" Do you think the "+T(v(i))+" shared anything that might go against ",1),o[0]||(o[0]=a("b",null,"Upchieveâs",-1)),o[1]||(o[1]=R(" Personally Identifiable Information (PII)Â ",-1)),p(pt,{url:v(r),text:"policies",target:"_blank"},null,8,["url"]),o[2]||(o[2]=R("? ",-1))]),a("div",Un,[p(J,{onClick:l,"show-arrow":!1,variant:"secondary"},{default:D(()=>[...o[3]||(o[3]=[R("Remove Ban",-1)])]),_:1}),p(J,{onClick:c,"show-arrow":!1,variant:"primary"},{default:D(()=>[...o[4]||(o[4]=[R("Report Concern",-1)])]),_:1})])])]),_:1})):_("",!0)}}),Nn=W(Bn,[["__scopeId","data-v-cde0ce27"]]),xn={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2048 2048"};function Hn(e,t){return d(),u("svg",xn,[...t[0]||(t[0]=[a("path",{fill:"#cfd8dd",d:"M1158.258 1032.62V690.272c0-142.441 116.537-260.838 258.978-260.647 142.446.191 258.275 116.136 258.275 258.625v76.077c0 32.167 26.077 58.244 58.244 58.244s58.244-26.077 58.244-58.244V688.25c0-50.614-9.926-99.746-29.502-146.029-18.896-44.675-45.935-84.785-80.366-119.217-34.432-34.431-74.542-61.471-119.217-80.366-46.283-19.577-95.415-29.503-146.029-29.503-50.615 0-99.746 9.926-146.03 29.503-44.675 18.896-84.786 45.935-119.217 80.366s-61.469 74.541-80.366 119.217c-19.576 46.283-29.503 95.414-29.503 146.029v344.371h116.489z"},null,-1),a("path",{fill:"#f7e07f",d:"M1270.286 1734.865H296c-22.091 0-40-17.909-40-40v-725.47c0-22.091 17.909-40 40-40h974.286c22.091 0 40 17.909 40 40v725.47c0 22.092-17.909 40-40 40"},null,-1),a("path",{fill:"#ebcd6d",d:"M832.62 1351.039v159.303h-98.955v-159.303c-32.911-17.655-55.285-52.398-55.285-92.36 0-57.861 46.902-104.762 104.762-104.762s104.762 46.901 104.762 104.762c.001 39.962-22.373 74.706-55.284 92.36"},null,-1)])])}const Fn={render:Hn},qn={class:"header"},Jn={class:"infraction-modal-body"},Yn={class:"confirmation-buttons"},jn=N({__name:"AckPartnerIntiatedPotentialBan",setup(e){const t=G(),i=t.getters["user/isStudent"]?"coach":"student",r=Ne(i),n=k(()=>t.state.liveMedia.partnerAckLiveMediaBan!=null),s=function(){t.commit("liveMedia/setPartnerAckLiveMediaBan",null)};return(c,l)=>n.value?(d(),g(Z,{key:0,class:"moderation-infraction-info-modal upc-modal"},{default:D(()=>[a("div",qn,[p(v(Fn),{class:"unlock-icon"}),a("h1",null,T(`${v(r)} Removed Live Media Ban`),1)]),l[2]||(l[2]=a("br",null,null,-1)),a("div",Jn,[l[1]||(l[1]=a("p",null,"You're good to go! Start your screen share again when you're ready.",-1)),a("div",Yn,[p(J,{onClick:s,"show-arrow":!1,variant:"primary"},{default:D(()=>[...l[0]||(l[0]=[R("Close",-1)])]),_:1})])])]),_:1})):_("",!0)}}),Gn=W(jn,[["__scopeId","data-v-82972d88"]]),Kn=N({__name:"ModerationInfractionToast",props:{show:{type:Boolean},onDismiss:{type:Function},onClickMoreInfo:{type:Function}},setup(e){const t=e,i=G(),r=k(()=>i.getters["app/mobileMode"]),n=k(()=>i.state.liveMedia.moderationInfraction),s=k(()=>`Our automated moderation system detected a potential policy issue with your ${l.value}.`),c=k(()=>
10{if(!n.value)return;const m=n.value?.infraction??[];return`Potential ${m.length>1?"violations":"violation"}: ${m.join(", ")}`}),l=k(()=>i.getters["liveMedia/moderationInfractionSource"]),h=k(()=>{const o=[{text:"Dismiss",role:"cancel",handler:t.onDismiss}];return n.value?.source?.includes("image_upload")||o.push({text:"More info",handler:t.onClickMoreInfo,role:"button"}),o});return(m,o)=>(d(),g(v(Rt),{isOpen:t.show,message:c.value,header:s.value,icon:v(Ot),animated:!0,position:"middle",buttons:h.value,onDidDismiss:t.onDismiss,layout:r.value?"stacked":"baseline",swipeGesture:"vertical"},null,8,["isOpen","message","header","icon","buttons","onDidDismiss","layout"]))}}),Qn={xmlns:"http://www.w3.org/2000/svg",width:"535",height:"621",fill:"none",viewBox:"0 0 535 621"};function Xn(e,t){return d(),u("svg",Qn,[...t[0]||(t[0]=[Ve('<filter id="24a" width="112.339" height="112.339" x="82.452" y="105.509" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_608_1702" stdDeviation="2"></feGaussianBlur></filter><ellipse cx="287.787" cy="567.351" fill="#e1e1e1" rx="246.371" ry="53.105"></ellipse><path fill="#e4b652" d="m123.482 466.338-14.336-43.007s-18.218-26.37-24.9-113.333l-2.251-21.001S28.049 93.024 171.899 76.761c94.544-10.678 156.152 25.204 187.292 51.06 16.823 13.974 20.535 33.218 24.84 54.653 3.752 18.652-14.178 54.416-6.654 73.818 32.383 83.45 37.754 88.858 46.482 99.773 4.976 6.237 22.59 20.034 33.924 40.896 22.728 41.824 17.436 105.675 17.436 105.675l-227.317 40.698s-71.402 10.224-98.79-10.441l-2.073-22.974"></path><path fill="#e4b652" d="M472.455 471.213s11.24-10.687 19.228-29.754 22.639-7.394 24.641 2.149c1.963 9.366 11.022 32.831-41.947 58.247l-7.85-16.701z"></path><path fill="#544b43" d="M169.141 73.737s-61.321 9.847-83.925 10.935-36.282-3.105-41.785 32.39 8.927 63.911 16.172 66.877c7.521 3.085 18.27 4.509 27.374-18.41 9.105-22.918 18.982-51.472 40.34-65.077 18.052-11.49 34.659-18.114 39.389-19.893a13.6 13.6 0 0 0 3.088-1.642c2.573-1.819 6.334-5.18-.653-5.18M306.067 100.087s-4.463-12.532 18.228-.473 41.239 21.077 62.72 26.742 33.324 8.901 35.347 28.143c2.043 19.243-16.285 48.452-32.808 65.227-9.084 9.237-14.995 6.414-18.466 2.013-2.698-3.414-3.928-7.776-3.849-12.118.139-7.164-.813-23.387-10.136-40.675-6.982-12.927-31.141-55.952-51.036-68.859"></path><path stroke="#544b43" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.6" d="M201.227 173.605c41.784 6.723 70.805 46.279 70.805 46.279"></path><path fill="#544b43" d="M208.101 190.346s-25.794-8.02-27.335 13.918c-.178 2.608.988 5.256 3.3 6.521 2.807 1.518 7.827 2.141 16.722-1.499 0 0 3.3-1.947 6.048 1.324 2.767 3.27 5.277 8.389 13.736 7.552 3.479-.35 5.811-2.277 7.353-4.438 3.142-4.399 3.043-10.453-.494-14.541-2.965-3.445-8.618-7.085-19.33-8.837"></path><path fill="#16d2aa" d="M81.877 288.988s126.924 44.47 294.873-36.506l14.261 30.111s-166.606 82.286-308.72 31.659z"></path><path fill="#fff" d="M207.404 391.061c15.134 0 27.402-13.077 27.402-29.208s-12.268-29.208-27.402-29.208-27.403 13.077-27.403 29.208 12.269 29.208 27.403 29.208"></path><path fill="#16d2aa" d="M207.399 331.999c-16.892 0-30.603 13.686-30.603 30.59 0 16.885 13.691 30.591 30.603 30.591 16.892 0 30.603-13.686 30.603-30.591 0-16.904-13.711-30.59-30.603-30.59m0 56.935c-14.561 0-26.375-11.81-26.375-26.364s11.795-26.365 26.375-26.365c14.561 0 26.375 11.79 26.375 26.365s-11.814 26.364-26.375 26.364"></path><path fill="#fff" d="M207.407 388.952c14.566 0 26.375-11.804 26.375-26.364s-11.809-26.365-26.375-26.365-26.376 11.804-26.376 26.365 11.809 26.364 26.376 26.364"></path><path fill="#16d2aa" d="M194.185 368.942c.849 1.047 1.976 1.58 3.398 1.58s2.549-.533 3.378-1.58 1.245-2.488 1.245-4.285v-9.48l5.058-3.041v12.679c0 3.278-.909 5.806-2.727 7.563-1.817 1.758-4.129 2.646-6.974 2.646q-4.237 0-6.994-2.666c-1.817-1.777-2.746-4.285-2.746-7.543v-9.638l5.058-3.041v12.501c.039 1.836.454 3.258 1.304 4.305M224.561 354.17c1.581 1.343 2.391 3.417 2.391 6.221s-.81 4.838-2.45 6.142c-1.64 1.303-4.129 1.935-7.468 1.935h-3.023v3.278l-5.058 3.041v
10-22.651h8.002c3.477.02 6.006.691 7.606 2.034m-3.714 8.907c.612-.672.909-1.679.909-2.982q0-1.956-1.186-2.785c-1.186-.829-2.015-.829-3.675-.829h-2.884v7.623h3.398c1.679 0 2.825-.336 3.438-1.027"></path><path fill="#b5dfd5" d="M207.164 327.861s3.106 5.389.137 8.302c-2.988 2.932 1.553.97 1.553.97s2.772-5.349 0-9.272c0 0-.589-2.14-1.69 0M203.575 330.339l1.087-.17v2.06l-1.087.113z"></path><path stroke="#544b43" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.6" d="m204.118 209.013-3.267 16.253s2.263 8.546 16.062 11.745c.965.215 1.949.293 2.933.235M200.86 224.775s-6.545 10.976-17.048 8.26"></path><path fill="#1d1c1a" d="M152.038 184.038c11.525 0 20.867-9.343 20.867-20.868s-9.342-20.868-20.867-20.868-20.868 9.343-20.868 20.868 9.343 20.868 20.868 20.868M270.4 194.349c4.801 0 8.692-3.892 8.692-8.693s-3.891-8.693-8.692-8.693a8.693 8.693 0 0 0 0 17.386"></path><path fill="#e4b652" d="m103.815 323.503-62.643-38.039c-9.523-7.322-23.885-5.299-30.448 4.945-7.328 11.442 4.186 58.38 89.148 98.625"></path><path fill="#c58f2c" d="m103.816 323.494-15.374-9.94c-5.127-3.319-10.322-6.542-15.488-9.801l-15.527-9.739-15.614-9.591.104.083c-4.602-3.582-10.711-5.256-16.628-4.521-5.912.648-11.57 3.937-15.008 8.816-1.819 2.441-2.674 5.527-2.87 8.398-.18 2.908.154 5.774.747 8.522 1.228 5.542 3.555 10.666 6.264 15.507 5.601 9.642 12.968 18.039 20.973 25.644 8.042 7.589 16.887 14.308 26.093 20.407-8.841-6.613-17.368-13.61-25.104-21.404-7.755-7.741-14.775-16.254-20.013-25.736-2.615-4.732-4.795-9.729-5.901-14.957-1.084-5.13-1.248-10.877 1.85-14.992 3.051-4.266 8.019-7.022 13.248-7.704 5.24-.707 10.675.711 14.826 3.891l.061.037.062.037 15.72 9.434 15.808 9.284c5.283 3.075 10.526 6.211 15.847 9.224z"></path><path fill="#e4b652" d="M475.222 502.938s-19.481 66.051-87.054 76.366c-67.592 10.315-85.121 0-85.121 0s-12.383-7.218 9.8-20.649c22.182-13.432 36.122-19.605 36.122-19.605s-94.92 5.68-126.922 4.635"></path><path fill="#e4b652" d="M273.655 542.467s-57.529 8.261-124.686 21.235c-34.545 6.664-51.197 6.014-58.851 4.574-5.17-.986-9.47-4.968-10.28-10.154-.749-4.89 1.263-11.455 12.351-18.159 22.195-13.408 23.32-10.292 23.32-10.292-27.246-29.398 8.128-63.134 8.128-63.134s38.589 58.697 94.304 67.333"></path><path fill="#e4b652" d="M232.564 466.466s3.26 79.112-11.953 82.805-8.179 42.44 41.154 19.117c49.332-23.323 47.614-115.213 47.614-115.213"></path><path fill="#c58f2c" d="M232.566 466.467c.691 11.987.829 24.034.553 36.061-.198 6.003-.514 12.026-1.126 18.03-.613 6.004-1.423 12.007-3.023 17.892-.83 2.943-1.838 5.885-3.675 8.571-.948 1.284-2.193 2.607-3.971 3.179l-1.067.356c-.316.099-.632.197-.909.375-.612.257-1.126.672-1.64 1.067-1.955 1.757-3.042 4.463-3.062 7.208-.099 2.765.83 5.51 2.351 7.82 1.581 2.291 3.793 4.108 6.342 5.352s5.374 1.876 8.258 2.093c5.769.455 11.657-.651 17.288-2.369 1.402-.474 2.805-.889 4.208-1.403 1.383-.553 2.766-1.046 4.129-1.619l4.07-1.797 3.892-2.054c5.077-2.962 9.661-6.754 13.652-11.099 3.991-4.344 7.428-9.222 10.392-14.357 2.924-5.174 5.394-10.605 7.547-16.154 4.287-11.138 7.152-22.81 9.147-34.619a244 244 0 0 0 3.497-35.784c.297 12.026-.612 24.053-2.252 35.981-1.738 11.909-4.406 23.738-8.535 35.113-4.07 11.375-9.839 22.336-18.058 31.4-4.109 4.523-8.851 8.512-14.145 11.632l-4.07 2.172-4.149 1.877c-1.403.592-2.825 1.125-4.248 1.698-1.422.533-2.884.987-4.327 1.481-5.848 1.738-12.012 2.864-18.235 2.35-3.102-.257-6.224-.968-9.088-2.389-2.865-1.403-5.414-3.516-7.231-6.201-1.759-2.706-2.806-5.905-2.687-9.183.039-3.239 1.324-6.596 3.892-8.848.672-.513 1.363-1.027 2.134-1.362.375-.218.77-.336 1.165-.474l1.087-.356c1.126-.316 2.094-1.284 2.924-2.37 1.62-2.251 2.667-5.055 3.517-7.86 1.679-5.667 2.588-11.592 3.319-17.536.711-5.945 1.146-11.928 1.482-17.912.652-11.928.77-23.935.652-35.962"></path><path fill="#e4b652" d="M122.617 466.537c16.057 33.042 70.721 55.457 105.942 69.542z"></path><path stroke="#c58f2c" stroke-miterlimit="10" stroke-width="1.302" d="M122.617 466.537c16.057 33.042 70.721 55.457 105.942 69.542"></path><path fill="#c48f2c" d="M348.937 539.009c-8.594-4.522-16.003-11.691-20.29-20.657-2.114-4.483-3.221-9.459-3.339-14.416-.119-4.977.75-9.934 2.272-14.653 1.58-4.72 3.912-9.065 6.421-13.311 2.687-4.108 5.512-8.136 8.811-11.77 6.441-7.386 13.692-13.943 21.377-19.907l-5.315 4.977c-1.797 1.619-3.437 3.436-
105.176 5.135-1.758 1.678-3.359 3.495-4.998 5.273-1.68 1.737-3.181 3.633-4.722 5.509a117 117 0 0 0-8.436 11.731c-2.391 4.167-4.623 8.433-6.085 12.975-1.502 4.522-2.411 9.242-2.332 13.982.04 4.739 1.107 9.439 2.924 13.843 1.877 4.385 4.604 8.393 7.844 11.968a51.2 51.2 0 0 0 11.044 9.321"></path><path fill="#c58f2c" d="M101.707 551.296c4.05 0 7.334-1.703 7.334-3.803 0-2.101-3.284-3.803-7.334-3.803-4.051 0-7.335 1.702-7.335 3.803s3.284 3.803 7.335 3.803M94.1 559.986c3.15 0 5.705-1.338 5.705-2.988s-2.554-2.988-5.705-2.988c-3.15 0-5.704 1.338-5.704 2.988s2.553 2.988 5.704 2.988M101.161 566.508c3.451 0 6.248-.973 6.248-2.173s-2.797-2.174-6.248-2.174-6.248.973-6.248 2.174c0 1.2 2.797 2.173 6.248 2.173M116.645 563.784c7.202 0 13.04-3.04 13.04-6.791 0-3.75-5.838-6.791-13.04-6.791s-13.039 3.041-13.039 6.791 5.838 6.791 13.039 6.791"></path><path fill="#e4b652" d="M147.893 524.787s-33.607 2.745-35.326 4.957z"></path><g fill="#c58f2c"><path d="M147.893 524.786c-2.944.553-5.908.967-8.852 1.362-2.943.415-5.907.751-8.87 1.106l-8.871.968c-1.482.138-2.964.316-4.426.533s-3.003.296-4.307.988c.534-.553 1.304-.771 1.996-1.047a40 40 0 0 1 2.173-.652c1.462-.355 2.924-.651 4.406-.948 2.944-.572 5.907-.948 8.871-1.303 2.963-.316 5.946-.612 8.93-.77s5.966-.277 8.95-.237M34.548 301.449c3.327 3.332 7.425 4.634 9.153 2.909 1.727-1.726.43-5.825-2.897-9.157s-7.426-4.634-9.154-2.908c-1.727 1.725-.43 5.825 2.898 9.156M20.363 303.127c2.588 2.592 5.964 3.416 7.541 1.841s.757-4.953-1.831-7.544-5.965-3.415-7.541-1.84-.758 4.952 1.83 7.543M20.038 315.059c2.835 2.838 6.281 3.992 7.698 2.577s.267-4.863-2.567-7.701-6.281-3.992-7.698-2.577-.267 4.863 2.567 7.701M34.85 322.294c4.975 4.981 11.51 6.521 14.594 3.44 3.085-3.081 1.553-9.616-3.422-14.597s-11.51-6.522-14.594-3.44c-3.085 3.081-1.553 9.616 3.422 14.597"></path></g><rect width="29.811" height="74.528" x="60.903" y="246.5" fill="#343440" rx="3" transform="rotate(35.252 60.903 246.5)"></rect><path fill="#565961" d="m101.206 197.662 10.092 6.352-35.413 56.26-10.091-6.353z"></path><path fill="#565961" fill-rule="evenodd" d="M133.458 227.143c36.129 2.589 67.516-24.601 70.104-60.729 2.589-36.129-24.601-67.516-60.729-70.104-36.129-2.589-67.515 24.601-70.104 60.729s24.6 67.516 60.729 70.104m1.066-14.867c27.917 2.001 52.171-19.009 54.171-46.927s-19.01-52.171-46.927-54.171c-27.918-2.001-52.171 19.009-54.172 46.927s19.01 52.171 46.928 54.171" clip-rule="evenodd"></path><g filter="url(#24a)"><circle cx="138.622" cy="161.678" r="52.169" fill="#fff" fill-opacity=".2"></circle></g><path stroke="#fff" stroke-linecap="round" stroke-width="2" d="M101.353 134.849c-6.956 5.962-16.695 25.637 0 56.641" opacity=".7"></path><path stroke="#fff" stroke-linecap="round" d="M180.358 182.546c-3.478 5.466-12.223 16.695-19.378 17.887" opacity=".7"></path><path fill="#754922" d="M224.934.085c-25.965-2.027-53.163 32.792-64.094 53.66 34.581 40.54 136.634 35.774 183.338 28.324C324.801.088 290.275 5.825 283.205 8.18c-8.943 2.981-16.536 15.756-25.479 14.265S251.903 2.19 224.934.085"></path><path fill="#6b3f19" d="M102.703 78.208c11.924 0 44.716-16.893 59.622-25.34 36.961 19.08 136.636 27.824 181.853 29.811l22.353 31.302C198.098 111 87.797 78.208 102.703 78.208"></path><path stroke="#4c2d2d" stroke-linecap="round" stroke-width="3" d="M160.387 57.037c15.282 7.745 72.688 22.88 180.059 21.467"></path>',36)])])}const Zn={render:Xn},$n=N({__name:"ModerationDisclaimerModal",props:{isOpen:{type:Boolean}},emits:["cancel","accept"],setup(e,{emit:t}){const i=e,r=t,n=G(),s=k(()=>n.getters["app/mobileMode"]),c=k(()=>n.getters["app/isMobileLandscape"]);return(l,h)=>(d(),g(Z,{class:"modal-container",isOpen:i.isOpen},{default:D(()=>[c.value?_("",!0):(d(),g(v(Zn),{key:0,class:"updog-illustration"})),h[4]||(h[4]=a("div",{class:"message"},[R(" Before you screenshare, remember that "),a("strong",null,"UPchieve monitors sessions for the safety of all participants."),a("br"),a("br"),R(" When screensharing, all of our usual platform policies apply. Remember to also refrain from screensharing "),a("strong",null,"potentially sensitive personal information"),R(", like phone numbers and email addresses. ")],-1)),a("div",{class:O(["buttons-container",{mobile:s.value}])},[p(J,{class:"modal-button",variant:"secondary",onClick:h[0]||(h[0]=m=>r("cancel"))},{default:D(()=>[...h[2]||(h[2]=[R("Go back",-1)])]),_:1}),p(J,{class:"modal-button",variant:"primary",showArrow:!1,onClick:h[1]||(h[1]=m=>r("accept"))},{default:D(()=>[...h[3]||(h[3]=[R("I accept",-1)])]),_:1})],2)]),_:1},8,["isOpen"]))}}),eo=W($n,[["__scopeId","data-v-e617f23a"]]),to="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAArCAMAAAAJzfvtAAAASFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////neHiwAAAAF3RSTlMAIBDfn+9Av2CAcFDPkDB/r49foLAfbyS/6W8AAAGMSURBVHhejZTtruMgDEQNxkA+m/Zu97z/m67a0ku6Cg3nl6XM2MSMkP/xcQyzGmBzuk5OvuJzMj
107RsLblFwPmJUfnH+51GjYFNDfkQBq9fBJ/9NgyGYQoR2SF4OSTKyQnLbKiH818wkb5gttgJ/Azusp3hr1jQ53IuSOW8lL0pw57yRxk6SGRnkUgSBfOiK8BTvoYSGVAJ964iyir9PLDKCu2a+EaRSHzRyaSvPlr6DN8NyubjqUoOFRy3ZEHGB6VAqEUJKnA3uAoOs9bBzA3DZKA/FFsZWbBg0y7Dm4J0+vDEsrlj6+isDKLx7ycU7ckiSi9JHK57y5Kirz1jKgx7R5RY+qVS5de3xuOcJNzZrTm/Nzhwz5VA2encnPRV0dw0qamdv+2+Wb7dPAuOuPe6B44fBfhUH1JYMPB8LhLbR7zFHMeQzIacpHAUl/yii6N3Ezgfv/QQthSCMsYm3tYjaE4DV3ljJuVA8UEycsJ/spD76YxlQV+JyqgBmUj56Eq6LZMXk5Z4xPnpI9/qzgZfEjwHgUAAAAASUVORK5CYII=",io="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAuCAQAAAD9sOO8AAAA2ElEQVR42u3QQRGDMBhE4ZUQB0VCJVRCJSChDoqD4qA4QAISkICESHid9sA/DNxY2kPzLjlk8mVm9eW4A/fjaIL300PwbrqRaII301LwdnrJW+mINng3XTFB8H662zkOAMM2vXP7eLxN2/g1beWXtJt/ELSfX9H+cQpf+MIX/n/42yE8iQyMkp0nMQKQJScf9EQGTk4+6OpzniUbH7REB9SSiQ96vmklC7+kJWrgKXn4Keh3nIFRcvEAIz0NVy5UQJYjagYy605yReLClYZ+/irpmEgklX7YC+i+gM+OrjmkAAAAAElFTkSuQmCC",so="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAACdklEQVR42u3YTUhUURiH8f+U5kfNlEGYiRU0tQgigiAKo0Wr2kRgClm7NhEKSgVGC1ukTBSRoPZJIpQVRVpGlLVpN7QIKoIgDKJFGZJJg1+TTzA06MxJODZnLhL39y7v4j4czrlcjnw+n2/OopAKbvOdzMSJEmGppqGAbgZpoEAzIUCY+0CcEWIZzhgwTA0LlMAibkHCSfL1d4T5CkSpplQZYhNdTADtBCRCdDLlBHkykcs94K6cYSsDfGM/BVwh1XGZ2AJ8kFPsAl5yh3RjMtFDnDo5RTE3AVOfTHwkRkhOUUoXpqcEZQKG5RRFRDA9pkjyIIAlRDD1skzyIIAgEUwPKJE8CKCQM5h6KJOsAwjoH5HHWUzdrJasApLYTSvnLOYi66UkcjiPqYc10mwDWrFVqT+YRwuTpHvIWmn2ARuoptJiDrJiWnTcPPfG67O1B2hnHFOzZBuQEdoZJdUkI8BpDwIo5DojpOujwaMAiQvG5otSTIV3AfO5zHSvKJOo8iCAHTRQLElcI+ktpZJXAfWM0sFiSaIDgPeUSN4FtAFwlaAk0Uk/JZKDAJqZyRspieU8h4RLLJQkQpKbgEYghjmjRFN+PV+T1EKuEowAV19C8yk1DDPOTz7zhDpyHAXY4ygvOEa5DJ4EmOvk+Qr4AQYPToFXK8BmDnPIYo6wMjsBbdiqzE7ATppotJgI67KyB/xj+H8E7LP/LR8kRpkcoxaolw1uMMEBOcUqnjFElWywF4jKKfYAvYRkg3zn13TbGGCQatkizBegn1qCyhDlNDEEtBGQLQKE6XZ4Vftj6qrWGrls5xGfyMwv3nGKjf7lv8/nm8N+AwZXlgtUD7G4AAAAAElFTkSuQmCC",no=Me(()=>ve(()=>import("./Whiteboard-CSDDBo_p.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152]))),oo=Me(()=>ve(()=>import("./DocumentEditor-B3wJCwRN.js"),__vite__mapDeps([153,115,2,3,4,116,117,121,122,154,155,156,157,158,14,33,134,159,114,118,119,120,123,58,124,125,126,127,128,129,130,131,132,133,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,160,161,162,163]))),ao=Me(()=>ve(()=>import("./DocumentEditorV2-D0cbuYa6.js"),__vite__mapDeps([164,115,2,3,4,116,117,121,122,154,155,156,157,158,14,33,134,159,165,166,167,114,118,119,120,123,58,124,125,126,127,128,129,130,131,132,133,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,162,168,169,170,171,172]))),ce=V(null),ro={name:"session-view",components:{ModerationDisclaimerModal:eo,ModerationInfractionToast:Kn,ModerationInfractionModal:Pn,ScreenShare:In,AiWidgetTool:mi,SessionChatHeader:si,SessionChat:ct,Whiteboard:no,DocumentEditor:oo,DocumentEditorV2:ao,WebNotificationsModal:St,CaretIcon:gt,AboutSessionModal:Gi,LoadingMessage:Ee,QuestionMarkIcon:$e,FallIncentiveReviewWarningModal:as,AssignmentDetailModal:is,LiveMediaChatHeader:xs,PartnerAckScreenShareInfractionModal:Nn,AckPartnerIntiatedPotentialBan:Gn},setup(){dt(()=>{ce.value.actorRef.send({type:"meeting_ended"})}),ce.value=Ue(yn())},beforeRouteEnter(e,t,i){i(r=>{r.prevRoute=t})},async created(){try{const{session:e,isZwibserveSession:t}=await ae.createOrJoinSession(this.$route.params.topic,this.$route.params.subTopic,this.$route.params.sessionId,this.$route.query?.assignmentId,this.prevRoute?.name??"");this.sessionId=e.id,this.isZwibserveSession=t,await this.linkTransferredTutorBotConversation(e.id),this.journeySessionData&&(y.captureEvent(M.GUIDED_JOURNEY_SESSION_REQUESTED,{...this.journeySessionData,sessionId:this.sessionId}),await this.$store.commit("session/setJourneySessionData",void 0)),this.isStudentVolunteer&&(this.isVolunteer?y.captureEvent(M.ROLE_SWITCHING_USER_JOINED_SESSION_AS_VOLUNTEER):this.isStudent&&y.captureEvent(M.ROLE_SWITCHING_USER_JOINED_SESSION_AS_STUDENT)),this.joinSocketSession(),ie.setCustomData("sessionId",this.sessionId),await this.get
10SessionContext(),nt()==="default"&&(this.showNotificationModal=!0),this.meetingActor.actorRef.start(),this.meetingActor.actorRef.send({type:"set_session_id",sessionId:this.sessionId}),this.meetingActor.actorRef.send({type:"session_started"}),ot.isFeatureEnabledForUser(at.AI_TUTOR,this.session.studentId).then(i=>{this.aiWidgetEnabled=i.isEnabled&&i.isEnabled.includes("in-session")}).catch(i=>{x.noticeError(`Failed to check if AI tutor is enabled for user=${e.studentId}`,i)})}catch(e){be.showSessionError(e.message),x.noticeError(e)}},async mounted(){if(this.isSocketConnected||oe.connect(),this.mobileMode)try{ie.showFeedbackButton(!1)}catch{x.noticeError("Failed when hiding Gleap feedback button")}window.addEventListener("resize",this.handleResize)},beforeUnmount(){this.joinSocketSessionAbortController&&this.joinSocketSessionAbortController.abort(),oe.emit("sessions:leave",{sessionId:this.sessionId}),ie.removeCustomData("sessionId"),ie.showFeedbackButton(!0),window.removeEventListener("resize",this.handleResize)},data(){return{auxiliaryOpen:!1,sessionId:null,hasSeenNewMessage:!0,showNotificationModal:!1,showAboutSessionModal:!1,showAssignmentDetailModal:!1,studentAssignment:null,studentPresessionResponses:[],totalStudentSessions:0,isLoadingSessionMetadata:!1,isFetchingIsSessionRecapEligible:!1,sessionHasEnded:!1,showFallIncentiveReviewWarningModal:!1,aiWidgetHidden:!0,aiWidgetEnabled:!1,hasUnreadAiTutorMessage:!1,aiWidgetDragging:!1,aiWidgetResizing:!1,didAutoOpen:!1,draggingScreenShare:!1,resizingScreenShare:!1,getDisplayMediaSupported:typeof navigator.mediaDevices.getDisplayMedia<"u",previousSessionCountWithStudent:0,meetingActor:ce,showModerationInfractionModal:!1,showModerationInfractionToast:!1,showScreenShareDisclaimer:!1,joinSocketSessionAbortController:null,isSocketSessionRoomConnected:!1,isZwibserveSession:!1}},computed:{...fe({moderationInfraction:e=>e.liveMedia.moderationInfraction,potentialPartnerInfraction:e=>e.liveMedia.potentialPartnerInfraction,user:e=>e.user.user,session:e=>e.user.session,docEditorVersion:e=>e.user.session.docEditorVersion,auxiliaryType:e=>e.user.session.toolType,isSocketConnected:e=>e.socket.isConnected,productFlags:e=>e.productFlags.flags,isFetchingConversation:e=>e.botConversations.isFetchingConversation,isPartnerOnline:e=>e.session.isPartnerOnline,everShownDisplayCallStatus:e=>e.liveMedia.audio.everShownDisplayCallStatus,journeySessionData:e=>e.session.journeySessionData}),...le({mobileMode:"app/mobileMode",isMobileLandscape:"app/isMobileLandscape",isAuthenticated:"user/isAuthenticated",isVolunteer:"user/isVolunteer",isStudent:"user/isStudent",isStudentVolunteer:"user/isStudentVolunteer",isSessionOver:"user/isSessionOver",isSessionAlive:"user/isSessionAlive",isTutorBotChatEnabled:"featureFlags/isTutorBotChatEnabled",isFallIncentiveProgramEnabled:"featureFlags/isFallIncentiveProgramEnabled",currentTutorBotConversation:"botConversations/currentConversation",isSessionInProgress:"user/isSessionInProgress",sessionPartner:"user/sessionPartner",isLiveMediaBanned:"liveMedia/isBannedFromLiveMedia",isPartnerLiveMediaBanned:"liveMedia/isPartnerBannedFromLiveMedia"}),micState(){return this.meetingActor.snapshot.matches("Active.MicControl.MicPermissionsDenied")?"denied":this.meetingActor.snapshot.matches("Active.MicControl.MicUnmuted")||this.meetingActor.snapshot.matches("Active.MicControl.MicMuted")?"granted":"prompt"},cameraState(){return this.meetingActor.snapshot.matches("Active.CameraControl.CameraPermissionsDenied")?"denied":this.meetingActor.snapshot.matches("Active.CameraControl.CameraOn")||this.meetingActor.snapshot.matches("Active.CameraControl.Waiting")?"granted":"prompt"},isCameraOn(){return this.meetingActor.snapshot.matches("Active.CameraControl.CameraOn")},isPartnerCameraOn(){return this.meetingActor.snapshot.context.isPartnerCameraOn},isScreenSharing(){return this.meetingActor.snapshot.matches("Active.ScreenShareControl.SharingMyScreen")},isViewingPartnerScreenShare(){return this.meetingActor.snapshot.matches("Active.ScreenShareControl.ViewingPartnerScreenShare")},isLoadingMicControl(){return this.meetingActor?.snapshot?.hasTag("loadingAudioCall")},isLoadingCameraControl(){return this.meetingActor?.snapshot?.hasTag("loadingCameraControl")},isLoadingScreenShareControl(){return this.meetingActor?.snapshot?.hasTag("loadingScreenShare")},isLoadingSpeakerControl(){return this.meetingActor?.snapshot?.hasTag("loadingSpeakerControl")},meetingHasNotEnded(){return!this.meetingActor?.snapshot?.matches("Ended")}
10,unableToJoinMediaRoom(){return this.meetingActor?.snapshot?.hasTag("unableToJoinMediaRoom")},unableToJoinAudio(){return this.meetingActor?.snapshot?.hasTag("unableToJoinAudio")},screenShareActive(){return this.meetingActor.snapshot.matches("Active.ScreenShareControl.SharingMyScreen")||this.meetingActor.snapshot.matches("Active.ScreenShareControl.ViewingPartnerScreenShare")&&this.meetingActor.snapshot.context.showPartnerScreenShare},snapshot(){return ce?.value.snapshot},isMyMicMuted(){return!this.snapshot.matches("Active.MicControl.MicUnmuted")},isSpeakerMuted(){return!this.snapshot.matches("Active.SpeakerControl.SpeakerUnmuted")},isPartnerSpeaking(){return this.snapshot.context.isPartnerSpeaking},isSpeaking(){const e=this.snapshot.context.activeSpeakerIds,t=this.snapshot.context.attendee?.AttendeeId??"",i=e.includes(t);return i&&y.captureEvent(M.VOICE_CHAT_USER_SPOKE_IN_AUDIO_CHANNEL),i},partnerPresence(){return this.isPartnerOnline?this.snapshot.context.isPartnerMicMuted?"has their mic off":this.isPartnerSpeaking?"is speaking":"is in session":"is away"},partnerCanUseMic(){return!this.isPartnerLiveMediaBanned},partnerMicStatus(){const e=this.sessionPartner.firstname,t=this.snapshot.context.isPartnerMicMuted;return this.isPartnerLiveMediaBanned?`${e}'s mic is censored`:t?`${e} has muted their mic`:""},aiTutorSetupProps(){return{currentTutorBotConversationSessionId:this.currentTutorBotConversation?.sessionId,aiWidgetEnabled:this.aiWidgetEnabled,sessionId:this.sessionId,isFetchingConversation:this.isFetchingConversation}},sessionToolTypes(){return st},shouldHideAuxiliarySection(){return this.mobileMode?!this.auxiliaryOpen:!1},shouldHideChatSection(){return this.mobileMode?this.auxiliaryOpen:!1},showAiWidget(){return this.currentTutorBotConversation.conversationId&&this.aiWidgetEnabled&&!this.aiWidgetHidden},showReviewWarning(){return this.isFallIncentiveProgramEnabled&&this.productFlags.fallIncentiveEnrollmentAt},showSessionMetadataContainer(){return this.isLoadingSessionMetadata||this.isStudent&&this.showReviewWarning||this.studentAssignment||this.isVolunteer||this.mobileMode},maybeShowNewAiTutorIndicator(){return{aiWidgetHidden:this.aiWidgetHidden,messagesLength:this.currentTutorBotConversation?.messages?.length??0}},isFavoriteVolunteer(){return this.user.favoriteVolunteers.includes(this.session?.volunteer?.id)}},watch:{moderationInfraction(e){e?.stopStreamImmediatelyReasons?.length?(this.showModerationInfractionModal=!0,this.showModerationInfractionToast=!1):e&&(this.showModerationInfractionToast=!0)},isPartnerSpeaking(e){e&&!this.everShownDisplayCallStatus&&this.isSpeakerMuted&&this.$store.dispatch("liveMedia/audio/setDisplayCallStatus",{type:"partner-speaking",icon:ht(We),main:`${this.sessionPartner.firstName} is speaking`,secondary:"Click the speaker icon to listen",fadeOutAfterMs:6e3})},async aiTutorSetupProps({currentTutorBotConversationSessionId:e,aiWidgetEnabled:t,sessionId:i,isFetchingConversation:r}){if((!e||e!==i)&&t&&!r&&i){this.$store.commit("botConversations/setIsFetchingConversation",!0);try{const{data:n}=await j.getOrCreateTutorBotConversationWithMessagesBySessionId(i);await this.$store.dispatch("botConversations/setConversation",n.conversationId)}catch(n){x.noticeError(`Failed to get or created tutor bot conversation for session ${i}`,n)}finally{this.$store.commit("botConversations/setIsFetchingConversation",!1)}!this.mobileMode&&this.aiWidgetEnabled&&this.currentTutorBotConversation?.messages?.length>0&&!this.didAutoOpen&&(this.aiWidgetHidden=!1,this.didAutoOpen=!0)}},aiWidgetDragging(e){e||y.captureEvent(M.AI_TUTOR_WIDGET_DRAGGED)},aiWidgetResizing(e){e||y.captureEvent(M.AI_TUTOR_WIDGET_RESIZED)},auxiliaryOpen(e){e||(this.aiWidgetHidden=!0)},maybeShowNewAiTutorIndicator(e,t){e.aiWidgetHidden&&e.messagesLength>t.messagesLength?this.hasUnreadAiTutorMessage=!0:this.hasUnreadAiTutorMessage=!1},isSocketConnected(e,t){e&&!t&&(this.sessionId&&this.joinSocketSession(),y.captureEvent(M.USER_SOCKET_IS_CONNECTED_IN_SESSION,{event:M.USER_SOCKET_IS_CONNECTED_IN_SESSION,sessionId:this.sessionId})),!e&&t&&(this.isSocketSessionRoomConnected=!1,y.captureEvent(M.USER_SOCKET_IS_DISCONNECTED_IN_SESSION,{event:M.USER_SOCKET_IS_DISCONNECTED_IN_SESSION,sessionId:this.sessionId}))},mobileMode(e){ie.showFeedbackButton(!e)},async"session.endedAt"(e,t){e&&!t&&(this.sessionHasEnded=!0,this.meetingActor.actorRef.send({type:"meeting_ended"}))},async sessionPartner(e,t){e?.id!==t?.id&&e?.id&&this.meetingActor.actorRef.send({type:"session_started"})}},methods:{startScreenShare(){this.meetingActor.send({type:"share_screen"})},stopScreenShare(){this.meetingActor.send({type:"stop_share_screen"})},onAcceptScreenShareTerms(){this.showScreenShareDisclaimer=!1,it(),this.startScreenShare()},onDeclineScreenShareTerms(){this.showScreenShareDisclaimer=!1},toggleModerationInfractionModal(){this.auxiliaryOpen&&this.isMobileLandscape&&this.toggleAuxiliary(),this.showModerationInfractionModal=!this.showModerationInfractionModal},dismissModerationInfraction(){this.showModerationInfractionToast=!1},toggleMuteSelf(){this.meetingActor?.send({type:"toggle_mute_self"})},toggleMutePartner(){this.meetingActor?.send({type:"toggle_mute_partner"})},onAudioUiLoaded(e){this.meetingActor?.send({type:"audio_ui_loaded",audioOutputElement:e})},toggleCamera(){this.meetingActor?.send({type:"toggle_camera"})},onLocalVideoUiLoaded(e){this.meetingActor?.send({type:"local_video_ui_loaded",localVideoElement:e})},onRemoteVideoUiLoaded(e){this.meetingActor?.send({type:"remote_video_ui_loaded",remoteVideoElement:e})},toggleScreenShareWindow(){this.screenShareActive?this.stopScreenShare():tt()?this.startScreenShare():this.showScreenShareDisclaimer=!0},toggleAiWidget(){const e=this.aiWidgetHidden?M.AI_TUTOR_WIDGET_TOOLBAR_BUTTON_OPEN:M.AI_TUTOR_WIDGET_TOOLBAR_BUTTON_CLOSE;y.captureEvent(e),this.aiWidgetHidden=!this.aiWidgetHidden},minimizeAiWidget(){y.captureEvent(M.AI_TUTOR_WIDGET_MINIMIZE),this.aiWidgetHidden=!0},draggingAiWidget(e){this.aiWidgetDragging=e},resizingAiWidget(e){this.aiWidgetResizing=e},handleResize(){this.mobileMode&&(this.auxiliaryOpen||(this.aiWidgetHidden=!0))},toggleAuxiliary(){this.auxiliaryOpen?(document.getElementById("toggleButton").classList.remove("back"),this.auxiliaryOpen=!1):(document.getElementById("toggleButton").classList.add("back"),this.auxiliaryOpen=!0),this.shouldHideAuxiliarySection&&(this.hasSeenNewMessage=!0)},async joinSocketSession(){this.joinSocketSessionAbortController=new AbortController;try{await At.backOff(async()=>{const{success:e,retry:t}=await oe.timeout(2e3).emitWithAck("sessions:join",{sessionId:this.sessionId});if(t){y.captureEvent(M.SOCKET_SESSION_JOIN_RETRY,{sessionId:this.session.id});const i="Received retry signal, try joining socket session room again.";throw x.log(i,{sessionId:this.session.id}),new Error(i)}e&&(this.isSocketSessionRoomConnected=!0)},{retry:()=>!this.joinSocketSessionAbortController.signal.aborted})}catch(e){if(this.joinSocketSessionAbortController.signal.aborted)return;be.showSessionError(et.SESSION_CHAT_ERROR,()=>this.$router.go(0)),y.captureEvent(M.SOCKET_SESSION_JOIN_FAILED,{sessionId:this.session.id}),x.noticeError(e)}},setHasSeenNewMessage(e){this.hasSeenNewMessage=e},setShowNotificationModal(e){this.showNotificationModal=e},showAssignmentDetail(){y.captureEvent(M.USER_CLICKED_TO_VIEW_SESSION_ASSIGNMENT_DETAILS,{userType:this.user.userType}),this.toggleAssignmentDetailModal()},handleAboutSessionClick(){y.captureEvent(M.VOLUNTEER_CLICKED_ABOUT_SESSION),this.toggleAboutSessionModal()},handleReviewWarningClick(){y.captureEvent(M.STUDENT_FALL_INCENTIVE_REVIEW_SESSION_INFORMATION_CLICKED),this.toggleFallIncentiveReviewWarningModal()},toggleAssignmentDetailModal(){this.showAssignmentDetailModal=!this.showAssignmentDetailModal},toggleAboutSessionModal(){this.showAboutSessionModal=!this.showAboutSessionModal}
10,toggleFallIncentiveReviewWarningModal(){this.showFallIncentiveReviewWarningModal=!this.showFallIncentiveReviewWarningModal},async getSessionContext(){try{if(this.isLoadingSessionMetadata=!0,this.isVolunteer){this.previousSessionCountWithStudent=await ae.getTotalSessionsForPair({volunteerId:this.session.volunteerId,studentId:this.session.studentId});const t=await j.getPresessionSurveyResponse(this.session.id);this.totalStudentSessions=t.data.totalStudentSessions,this.studentPresessionResponses=t.data.responses}const{data:{assignment:e}}=await j.getAssignmentForSession(this.session.id);if(e){const{data:{assignmentDocuments:t}}=await j.getAssignmentDocuments(e.id);e.docs=t}this.studentAssignment=e}catch{this.isLoadingSessionMetadata=!1}finally{this.isLoadingSessionMetadata=!1}},openHelp(){ie.open(),y.captureEvent(M.USER_CLICKED_IN_SESSION_HELP)},async linkTransferredTutorBotConversation(e){const t=this.$store.state.botConversations.pendingTransferredConversationId;if(t)try{await j.updateTutorBotConversationWithSessionId(t,e),await this.$store.dispatch("botConversations/setConversation",t)}catch(i){x.noticeError(`Failed to link tutor bot conversation ${t} to session ${e}`,i)}finally{this.$store.commit("botConversations/setPendingTransferredConversationId",null)}}}},lo={class:"session-header-container"},co={key:0,class:"about-session-container"},uo={key:1},mo={key:3,class:"about-session-no-responses"},ho={class:"toggleButton__wrapper"},go={key:0,class:"toggleButton__message-indicator"},po={key:1,id:"toggleIcon",src:to,alt:"toggle icon"},So={key:2,id:"toggleIcon",src:io,alt:"toggle icon"},vo={key:3,id:"toggleIcon",src:so,alt:"toggle icon"};function fo(e,t,i,r,n,s){const c=S("ai-widget-tool"),l=S("screen-share"),h=S("ModerationInfractionToast"),m=S("ModerationInfractionModal"),o=S("PartnerAckScreenShareInfractionModal"),C=S("AckPartnerIntiatedPotentialBan"),w=S("whiteboard"),P=S("document-editor-v2"),H=S("document-editor"),z=S("session-chat-header"),b=S("LiveMediaChatHeader"),f=S("loading-message"),A=S("caret-icon"),L=S("router-link"),Q=S("question-mark-icon"),X=S("session-chat"),te=S("ModerationDisclaimerModal"),U=S("web-notifications-modal"),I=S("about-session-modal"),$=S("assignment-detail-modal"),q=S("fall-incentive-review-warning-modal");return d(),u("div",{class:O(["session",{"session--whiteboard":e.auxiliaryType==="WHITEBOARD"}])},[n.sessionId?(d(),u("div",{key:0,class:O(["session-contents-container",{"session-contents-container--mobile":e.mobileMode}]),ref:"sessionContentsContainerMobile"},[s.showAiWidget?(d(),g(c,{key:0,onMinimize:s.minimizeAiWidget,onDragging:s.draggingAiWidget,onResizing:s.resizingAiWidget},null,8,["onMinimize","onDragging","onResizing"])):_("",!0),(n.meetingActor.snapshot.context.sessionId&&e.mobileMode?this.$refs.sessionContentsContainerMobile:this.$refs.auxiliaryContainer)?(d(),g(l,{key:1,class:O({"display-none":!s.screenShareActive}),isViewingPartnerScreenShare:s.isViewingPartnerScreenShare,firstName:s.isViewingPartnerScreenShare?e.sessionPartner.firstName:e.user?.firstName,meetingActor:n.meetingActor,onDragging:t[0]||(t[0]=B=>n.draggingScreenShare=B),onResizing:t[1]||(t[1]=B=>n.resizingScreenShare=B),screenShareWidth:n.meetingActor.snapshot.context.screenShareWidth,screenShareHeight:n.meetingActor.snapshot.context.screenShareHeight,screenShareActive:s.screenShareActive},null,8,["class","isViewingPartnerScreenShare","firstName","meetingActor","screenShareWidth","screenShareHeight","screenShareActive"])):_("",!0),p(h,{show:n.showModerationInfractionToast,"on-dismiss":s.dismissModerationInfraction,"on-click-more-info":s.toggleModerationInfractionModal},null,8,["show","on-dismiss","on-click-more-info"]),n.showModerationInfractionModal?(d(),g(m,{key:2,onClose:s.toggleModerationInfractionModal,"moderation-infraction":e.moderationInfraction},null,8,["onClose","moderation-infraction"])):_("",!0),p(o),p(C),a("div",{class:O(["auxiliary-container",{"auxiliary-container--hidden":s.shouldHideAuxiliarySection,"no-pointer-events":n.draggingScreenShare||n.resizingScreenShare||n.aiWidgetDragging||n.aiWidgetResizing}]),ref:"auxiliaryContainer",id:"auxiliary-container"},[e.auxiliaryType===s.sessionToolTypes.WHITEBOARD?(d(),g(w,{key:0,ref:"whiteboard",sessionId:n.sessionId,isWhiteboardOpen:n.auxiliaryOpen,toggleWhiteboard:s.toggleAuxiliary,isSessionOver:e.isSessionOver,aiWidgetHidden:n.aiWidgetHidden,onToggleAiWidget:s.toggleAiWidget,aiWidgetEnabled:n.aiWidgetEnabled,showHasAiMessageIndicator:n.hasUnreadAiTutorMessage,aiWidgetMoving:n.aiWidgetDragging||n.aiWidgetResizing,onClickedShareScreen:s.toggleScreenShareWindow,isScreenSharing:s.isScreenSharing,isViewingPartnerScreenShare:s.isViewingPartnerScreenShare,isLoadingScreenShareControl:s.isLoadingScreenShareControl,unableToJoinMediaR
10oom:s.unableToJoinMediaRoom,meetingHasNotEnded:s.meetingHasNotEnded,isZwibserveSession:n.isZwibserveSession},null,8,["sessionId","isWhiteboardOpen","toggleWhiteboard","isSessionOver","aiWidgetHidden","onToggleAiWidget","aiWidgetEnabled","showHasAiMessageIndicator","aiWidgetMoving","onClickedShareScreen","isScreenSharing","isViewingPartnerScreenShare","isLoadingScreenShareControl","unableToJoinMediaRoom","meetingHasNotEnded","isZwibserveSession"])):e.auxiliaryType===s.sessionToolTypes.DOCUMENT_EDITOR&&e.docEditorVersion===2?(d(),g(P,{key:1,sessionId:this.sessionId,isAiWidgetEnabled:n.aiWidgetEnabled,onWidgetClicked:s.toggleAiWidget,showHasAiMessageIndicator:n.hasUnreadAiTutorMessage,onClickedShareScreen:s.toggleScreenShareWindow,isScreenSharing:s.isScreenSharing,isViewingPartnerScreenShare:s.isViewingPartnerScreenShare,isLoadingScreenShareControl:s.isLoadingScreenShareControl,unableToJoinMediaRoom:s.unableToJoinMediaRoom,hasMeetingEnded:s.meetingHasNotEnded},null,8,["sessionId","isAiWidgetEnabled","onWidgetClicked","showHasAiMessageIndicator","onClickedShareScreen","isScreenSharing","isViewingPartnerScreenShare","isLoadingScreenShareControl","unableToJoinMediaRoom","hasMeetingEnded"])):e.auxiliaryType===s.sessionToolTypes.DOCUMENT_EDITOR?(d(),g(H,{key:2,sessionId:this.sessionId},null,8,["sessionId"])):_("",!0)],2),a("div",lo,[e.isSessionInProgress?e.isSessionInProgress?(d(),g(b,{key:1,class:"live-media-header-container",isMyMicMuted:s.isMyMicMuted,isSpeakerMuted:s.isSpeakerMuted,isPartnerSpeaking:s.isPartnerSpeaking,partnerPresence:s.partnerPresence,partnerMicStatus:s.partnerMicStatus,partnerCanUseMic:s.partnerCanUseMic,unableToJoinMediaRoom:s.unableToJoinMediaRoom,isBanned:e.isLiveMediaBanned,isLoadingMicControl:s.isLoadingMicControl,isLoadingSpeakerControl:s.isLoadingSpeakerControl,isLoadingCameraControl:s.isLoadingCameraControl,unableToJoinAudio:s.unableToJoinAudio,isSpeaking:s.isSpeaking,micState:s.micState,cameraState:s.cameraState,isCameraOn:s.isCameraOn,isPartnerCameraOn:s.isPartnerCameraOn,onToggleMuteSelf:s.toggleMuteSelf,onToggleMutePartner:s.toggleMutePartner,onToggleCamera:s.toggleCamera,onAudioUiLoaded:s.onAudioUiLoaded,onLocalVideoUiLoaded:s.onLocalVideoUiLoaded,onRemoteVideoUiLoaded:s.onRemoteVideoUiLoaded,isFavoriteVolunteer:s.isFavoriteVolunteer},null,8,["isMyMicMuted","isSpeakerMuted","isPartnerSpeaking","partnerPresence","partnerMicStatus","partnerCanUseMic","unableToJoinMediaRoom","isBanned","isLoadingMicControl","isLoadingSpeakerControl","isLoadingCameraControl","unableToJoinAudio","isSpeaking","micState","cameraState","isCameraOn","isPartnerCameraOn","onToggleMuteSelf","onToggleMutePartner","onToggleCamera","onAudioUiLoaded","onLocalVideoUiLoaded","onRemoteVideoUiLoaded","isFavoriteVolunteer"])):_("",!0):(d(),g(z,{key:0}))]),a("div",{class:O(["chat-container",{"chat-container--hidden":s.shouldHideChatSection}]),id:"chat-container"},[s.showSessionMetadataContainer?(d(),u("div",co,[n.isLoadingSessionMetadata?(d(),g(f,{key:0,message:"Loading",class:"about-session-loader"})):(d(),u("div",uo,[e.isStudent&&s.showReviewWarning?(d(),u("div",{key:0,class:"about-session-button",onClick:t[2]||(t[2]=(...B)=>s.handleReviewWarningClick&&s.handleReviewWarningClick(...B)),role:"button"},[t[6]||(t[6]=R(" Session will be reviewed ",-1)),p(A,{class:"caret"})])):_("",!0),n.studentAssignment?(d(),u("div",{key:1,class:"about-session-button",onClick:t[3]||(t[3]=(...B)=>s.showAssignmentDetail&&s.showAssignmentDetail(...B)),role:"button"},[R(T(e.isStudent?"Your assignment":"About the session")+" ",1),p(A,{class:"caret"})])):e.isVolunteer&&(n.studentPresessionResponses.length||n.totalStudentSessions||e.session.student.gradeLevel)?(d(),u("div",{key:2,class:"about-session-button",onClick:t[4]||(t[4]=(...B)=>s.handleAboutSessionClick&&s.handleAboutSessionClick(...B))},[t[7]||(t[7]=R(" About the session ",-1)),p(A,{class:"caret"})])):e.isVolunteer&&n.studentPresessionResponses.length===0?(d(),u("div",mo," No goal found for this session ")):_("",!0)])),e.isVolunteer&&n.previousSessionCountWithStudent>0&&e.session.student?.firstName?(d(),g(L,{key:2,class:"session-history-link",to:`/sessions/history?studentId=${e.session.studentId}&volunteerId=${e.session.volunteerId}`},{default:D(()=>[R("History with "+T(e.session.student.firstName),1)]),_:1},8,["to"])):_("",!0),e.mobileMode?(d(),g(Q,{key:3,onClick:s.openHelp,class:"help-icon"},null,8,["onClick"])):_("",!0)])):_("",!0),p(X,{aiWidgetPresent:n.aiWidgetEnabled,currentSession:e.session,shouldHideChatSection:s.shouldHideChatSection,setHasSeenNewMessage:s.setHasSeenNewMessage,isSocketSessionRoomConnected:n.isSocketSessionRoomConnected,isSessionAlive:e.isSessionAlive,sessionHasEnded:n.sessionHasEnded},null,8,["aiWidgetPresent","currentSession","shouldHideChatSection","setHasSeenNewMessage","isSocketSessionRoomConnected","isSessionAlive","sessionHasEnded"])],2)],2)):_("",!0),e.mobileMode?(d(),u("div",{key:1,class:"toggleButton",id:"toggleButton",onClick:t[5]||(t[5]=(...B)=>s.toggleAuxiliary&&s.toggleAuxiliary(...B))},[a("div",ho,[n.hasSeenNewMessage?_("",!0):(d(),u("span",go)),n.auxiliaryOpen?(d(),u("img",po)):e.auxiliaryType===s.sessionToolTypes.WHITEBOARD?(d(),u("img",So)):(d(),u("img",vo))])])):_("",!0),n.showScreenShareDisclaimer?(d(),g(te,{key:2,isOpen:n.showScreenShareDisclaimer,onAccept:s.onAcceptScreenShareTerms,onCancel:s.onDeclineScreenShareTerms},null,8,["isOpen","onAccept","onCancel"])):_("",!0),n.showNotificationModal?(d(),g(U,{key:3,closeModal:()=>s.setShowNotificationModal(!1)},null,8,["closeModal"])):_("",!0),n.showAboutSessionModal?(d(),g(I,{key:4,closeModal:s.toggleAboutSessionModal,responses:n.studentPresessionResponses,totalStudentSessions:n.totalStudentSessions},null,8,["closeModal","responses","totalStudentSessions"])):_("",!0),n.showAssignmentDetailModal?(d(),g($,{key:5,closeModal:s.toggleAssignmentDetailModal,assignment:n.studentAssignment,isStudent:e.isStudent},null,8,["closeModal","assignment","isStudent"])):_("",!0),n.showFallIncentiveReviewWarningModal?(d(),g(q,{key:6,closeModal:s.toggleFallIncentiveReviewWarningModal},null,8,["closeModal"])):_("",!0)],2)}const pd=W(ro,[["render",fo],["__scopeId","data-v-22d4531d"]]);export{pd as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.