@clickview/lite 0.71.0-rc.2 → 0.71.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundles.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "appBundle": "bundle-59b72c13db.min.js",
2
+ "appBundle": "bundle-5997477f16.min.js",
3
3
  "cssBundle": "lite-app-a4b6efcfff.css",
4
4
  "polyfillBundle": "polyfills-bac1abc89b.min.js"
5
5
  }
@@ -1,3 +1,3 @@
1
1
  .ShZvf{vertical-align:top;width:3.5rem;height:1.5rem}.ShZvf.FHzDr{visibility:hidden}.JDp5N{vertical-align:top;display:inline-block;width:3.5rem}.AzIWg{vertical-align:top;width:8rem;display:inline-block}.UhEYq{vertical-align:top;width:calc(100% - 20.5625rem);display:inline-block}.UhEYq:hover{text-decoration:underline}.wBqoo{width:1.75rem;margin-left:4.25rem;display:inline-block}.wBqoo:focus .OAQQu{visibility:visible}.W5sR9{width:6rem;display:inline-block}.OAQQu{visibility:hidden;width:1.75rem;display:inline-block}.OAQQu:focus{visibility:visible}.tfrDf .OAQQu{visibility:visible}.sGk59{min-height:2.75rem}.sGk59:focus .OAQQu{visibility:visible}
2
- .Bv47P{width:16cm;margin:0 auto;font-size:14px;line-height:1}.efkgi{break-inside:avoid !important}.efkgi .ffoDR,.efkgi .rKBEu{padding-bottom:28px}.efkgi .ffoDR{width:1.5cm}.efkgi .rKBEu{width:14.5cm}.ilhe4{width:32px;height:32px;margin-right:10px;margin-bottom:10px;border-color:#000 !important}.TqhFx{padding-top:8px}.voJCM{height:120px;border-color:#000 !important}.go2dV{max-height:250px;max-width:100%}.Z4GOw,.petLf{height:23px;position:fixed;bottom:0}.Z4GOw{width:120px;left:2.5cm}.petLf{right:2.5cm}.iA_Dl{height:350px;border-color:#000 !important}
2
+ .Bv47P{width:16cm;margin:0 auto;font-size:14px;line-height:1}.efkgi{break-inside:avoid !important}.efkgi .ffoDR,.efkgi .rKBEu{padding-bottom:28px}.efkgi .ffoDR{width:1.5cm}.efkgi .rKBEu{width:14.5cm}.ilhe4{width:32px;height:32px;margin-right:10px;margin-bottom:10px;border-color:#000 !important}.Fwn9S{width:calc(100% - 42px);display:inline-block;vertical-align:top}.TqhFx{padding-top:8px}.voJCM{height:120px;border-color:#000 !important}.go2dV{max-height:250px;max-width:100%}.Yky48{max-height:150px;max-width:100%}.Z4GOw,.petLf{height:23px;position:fixed;bottom:0}.Z4GOw{width:120px;left:2.5cm}.petLf{right:2.5cm}.iA_Dl{height:350px;border-color:#000 !important}
3
3
  .VWlur{min-width:10.05625rem}
@@ -0,0 +1 @@
1
+ .Bv47P{width:16cm;margin:0 auto;font-size:14px;line-height:1}.efkgi{break-inside:avoid !important}.efkgi .ffoDR,.efkgi .rKBEu{padding-bottom:28px}.efkgi .ffoDR{width:1.5cm}.efkgi .rKBEu{width:14.5cm}.ilhe4{width:32px;height:32px;margin-right:10px;margin-bottom:10px;border-color:#000 !important}.Fwn9S{width:calc(100% - 42px);display:inline-block;vertical-align:top}.TqhFx{padding-top:8px}.voJCM{height:120px;border-color:#000 !important}.go2dV{max-height:250px;max-width:100%}.Yky48{max-height:150px;max-width:100%}.Z4GOw,.petLf{height:23px;position:fixed;bottom:0}.Z4GOw{width:120px;left:2.5cm}.petLf{right:2.5cm}.iA_Dl{height:350px;border-color:#000 !important}
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7309],{8484:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(32735),r=n(42648),i=n(11607),c=n(83914),l=n(83345),o=n(28972),s=n(38129),m=n(93264),u=n(35223),d=n(86572);const p={timeTag:"ShZvf",hide:"FHzDr",time:"JDp5N",type:"AzIWg",question:"UhEYq",deleteContainer:"wBqoo",delete:"OAQQu",correctness:"W5sR9",selected:"tfrDf",row:"sGk59"};var v="shared.interactiveQuestions";function g(e){var t=e.interaction;switch((0,e.getCorrectness)(t)){case o.w.Correct:return a.createElement("span",{className:"text-success"},a.createElement(c.x,{size:c.S.Medium,svgName:u.vn.Check}));case o.w.Incorrect:return a.createElement("span",{className:"text-danger"},a.createElement(c.x,{size:c.S.Medium,svgName:u.vn.Close}));case o.w.AwaitingMarking:return a.createElement("span",{className:"text-secondary italic"},a.createElement("i",null,a.createElement(l.x,{namespace:v,phrase:"pending"})));case o.w.UnAnswered:return a.createElement("button",{className:"btn btn-outline-dark"},a.createElement(l.x,{namespace:v,phrase:"answer"}));case o.w.Answered:return a.createElement("span",{className:"text-secondary italic"},a.createElement("i",null,a.createElement(l.x,{namespace:v,phrase:"answered"})));case o.w.NotApplicable:return a.createElement(a.Fragment,null)}}function f(e){var t=e.interaction,n=e.visibleAt,r=e.selectedInteractionId,l=e.goToTimepoint,o=e.scrollTo,s=e.isFirstInteraction,v=t.id.toString()===(null==r?void 0:r.toString()),f=a.useRef(null);a.useEffect((function(){if(v&&f.current){var e=f.current,t=e.getBoundingClientRect(),n=t.top-e.offsetParent.getBoundingClientRect().top;o(n,t.height)}}),[v]);var E=l?"cursor-pointer":"cursor-default";return a.createElement("div",{ref:f},a.createElement(i.L,{className:"py-2 ".concat(E," ").concat(p.row," ").concat(v?p.selected:""),onClick:v?function(){}:function(){l&&l(t.id)}},a.createElement("div",{className:"me-3 d-inline-flex rounded-pill justify-content-center align-items-center text-info fw-semibold bg-light-blue ".concat(p.timeTag," ").concat(s?"":p.hide)},s?m.T.ToDisplayDuration(n):""),a.createElement(d.y,{interaction:t,showTypeName:!0,typeNameClassName:p.type,questionClassName:p.question}),e.onClickDelete&&a.createElement(i.L,{onClick:function(n){n.stopPropagation(),e.onClickDelete(t.id)},className:"".concat(p.deleteContainer)},a.createElement("span",{className:"text-end ".concat(p.delete)},a.createElement(c.x,{size:c.S.Medium,svgName:u.vn.Delete}))),e.getCorrectness&&a.createElement("span",{className:"text-end ".concat(p.correctness)},a.createElement(g,{interaction:t,getCorrectness:e.getCorrectness}))))}function E(e){var t=e.timepoint,n=e.scrollTo,r=e.onClickDelete,i=e.selectedInteractionId,c=e.getCorrectness;function l(n){e.goToTimepoint(t.id,n,t.visibleAt)}return t.interactions?a.createElement(a.Fragment,null,t.interactions.map((function(o,m){return!e.experimentalInteractiveQuestions&&s.IL[o.typeId]?a.createElement(a.Fragment,{key:m}):a.createElement(f,{interaction:o,visibleAt:t.visibleAt,goToTimepoint:e.goToTimepoint&&l,onClickDelete:r,scrollTo:n,selectedInteractionId:i,isFirstInteraction:0===m,getCorrectness:c,key:m})}))):a.createElement(a.Fragment,null)}function y(e){var t=e.interactive,n=e.goToTimepoint,i=e.selectedInteractionId,c=e.maxHeight,l=e.onClickDelete,o=e.getCorrectness,s=a.useRef(null);function m(e,t){if(s.current){var n=s.current.getClientHeight(),a=s.current.getScrollTop(),r=e+a;(r<a||r+t>a+n)&&s.current.scrollTop(r-n/2+t/2)}}var u=n?"border rounded":"";return a.createElement(r.$B,{autoHeight:!0,autoHeightMax:c,className:u,hideTracksWhenNotNeeded:!0,ref:s},a.createElement("div",{className:"px-3 py-2"},t.timepoints.map((function(t,r){return a.createElement(E,{key:r,timepoint:t,goToTimepoint:n,selectedInteractionId:i,scrollTo:m,onClickDelete:l,getCorrectness:o,experimentalInteractiveQuestions:e.experimentalInteractiveQuestions})}))))}},28972:(e,t,n)=>{var a;n.d(t,{w:()=>a}),function(e){e[e.Correct=0]="Correct",e[e.Incorrect=1]="Incorrect",e[e.AwaitingMarking=2]="AwaitingMarking",e[e.Answered=3]="Answered",e[e.UnAnswered=4]="UnAnswered",e[e.NotApplicable=5]="NotApplicable"}(a||(a={}))},71241:(e,t,n)=>{n.d(t,{X:()=>T});var a=n(32735),r=n(44645),i=n(17327),c=n.n(i),l=n(56050),o=n(23481),s=n(81886),m=n(2786),u=n(93264),d=n(38129);const p={worksheet:"Bv47P",interaction:"efkgi",timepointCell:"ffoDR",interactionCell:"rKBEu",checkbox:"ilhe4",imageMultipleChoiceText:"Fwn9S",multipleChoiceAnswer:"TqhFx",shortAnswerTextArea:"voJCM",image:"go2dV",smallImage:"Yky48",cvLogo:"Z4GOw",copyright:"petLf",illustrationDrawingArea:"iA_Dl"};function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t,n){return(t=function(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=/{([^{}]*)}/g,E=["A","B","C","D"];function y(e){return a.createElement("div",{className:"mb-2"},e.interaction.name)}function b(e){var t=e.actionableItem,n=e.index;return a.createElement("td",{className:"align-top"},a.createElement("div",{className:p.multipleChoiceAnswer},a.createElement("div",{className:"border d-inline-block ".concat(p.checkbox)}),a.createElement("div",{className:p.imageMultipleChoiceText},t.name||E[n])),a.createElement("div",{className:"my-3 me-3"},a.createElement("img",{className:p.smallImage,src:t.data.imageUrl})))}function w(e){return e.interaction.actionableItems.find((function(e){var t;return!!(null===(t=e.data)||void 0===t?void 0:t.imageUrl)}))?a.createElement(a.Fragment,null,a.createElement(y,{interaction:e.interaction}),a.createElement("table",null,a.createElement("tbody",null,e.interaction.actionableItems.map((function(t,n){if(n%2!=0)return a.createElement(a.Fragment,{key:n});var r=e.interaction.actionableItems[n+1];return a.createElement("tr",{key:n},a.createElement(b,{actionableItem:t,index:n}),r?a.createElement(b,{actionableItem:r,index:n+1}):a.createElement("td",null))}))))):a.createElement(a.Fragment,null,a.createElement(y,{interaction:e.interaction}),a.createElement("table",null,a.createElement("tbody",null,e.interaction.actionableItems.map((function(e){return a.createElement("tr",{key:e.id},a.createElement("td",null,a.createElement("div",{className:"border ".concat(p.checkbox)})),a.createElement("td",{className:"break-word align-top"},a.createElement("div",{className:p.multipleChoiceAnswer},e.name)))})))))}var _=g(g(g(g(g(g(g({},d.Z9.Annotation,(function(e){return a.createElement("div",{dangerouslySetInnerHTML:{__html:e.interaction.data.annotation}})})),d.Z9.Image,(function(e){return a.createElement(a.Fragment,null,a.createElement(y,{interaction:e.interaction}),a.createElement("img",{className:p.image,src:e.interaction.data.url}))})),d.Z9.MissingWord,(function(e){var t=("string"==typeof e.interaction.data?JSON.parse(e.interaction.data).sentence:e.interaction.data.sentence).replace(f,(function(t,n){var a=2*e.interaction.actionableItems.find((function(e){return e.order.toString()===n})).name.length;return Array(a+1).join("_")}));return a.createElement("div",null,t)})),d.Z9.MultipleChoice,w),d.Z9.TrueOrFalse,w),d.Z9.ShortAnswer,(function(e){return a.createElement(a.Fragment,null,a.createElement(y,{interaction:e.interaction}),a.createElement("div",{className:"border w-100 ".concat(p.shortAnswerTextArea)}))})),d.Z9.Illustration,(function(e){return a.createElement(a.Fragment,null,a.createElement(y,{interaction:e.interaction}),a.createElement("div",{className:"w-100 border ".concat(p.illustrationDrawingArea)}))})),h=o.T.encloseNamespace("interactives.printableInteractiveWorksheet");function I(e){var t=_[e.interaction.typeId];return t?a.createElement("tr",{className:p.interaction},a.createElement("td",{className:"align-top ".concat(p.timepointCell)},u.T.ToDisplayDuration(e.visibleAt)),a.createElement("td",{className:"break-word ".concat(p.interactionCell)},a.createElement(t,{interaction:e.interaction}))):a.createElement(a.Fragment,null)}function C(e){return a.createElement(a.Fragment,null,e.interactive.timepoints.map((function(e,t){return e.interactions.map((function(n,r){return a.createElement(I,{key:"".concat(t,":").concat(r),interaction:n,visibleAt:e.visibleAt})}))})))}function N(e){var t=(new Date).getFullYear();return a.createElement("div",{id:e.worksheetElementId,className:p.worksheet},a.createElement("div",{className:"row pb-2"},a.createElement("div",{className:"col-6"},h("name")," ______________________________"),a.createElement("div",{className:"col-6"},h("date")," ______________________________")),a.createElement("h1",null,a.createElement("strong",null,h("questionSheet"),":")," ",e.interactive.name),a.createElement("table",null,a.createElement("tbody",null,a.createElement(C,{interactive:e.interactive}))),a.createElement("div",{className:p.cvLogo},a.createElement(m.$S,null)),e.isClickViewContent&&a.createElement("span",{className:p.copyright},h("copyright",{year:t})))}var k=o.T.encloseNamespace("interactives.utils");function T(e,t,n){var i=document.getElementById("print-region");if(i||s.Q.Ry.throw(new l.H("Could not find print region in layout")),e){var o="printable-interactive-".concat(e.id),m=(0,r.s)(i);m.render(a.createElement("div",{className:"d-none"},a.createElement(N,{worksheetElementId:o,interactive:e,isClickViewContent:t}))),window.setTimeout((function(){c()({printable:o,type:"html",documentTitle:k("worksheetTitle",{interactiveName:e.name}),targetStyles:["*"],style:"@page { size: A4; margin: 1.5cm 0; }",onLoadingEnd:function(){n&&n(),m.unmount()},font_size:"14px"})}),200)}}},47309:(e,t,n)=>{n.r(t),n.d(t,{PreviewQuestionsView:()=>k});var a=n(32735),r=n(23481),i=n(81886),c=n(20354),l=n(28400),o=n(65858),s=n(83657),m=n(8484),u=n(9111),d=n(13876),p=n(40178),v=n(4594),g=n(20768),f=n(37802),E=n(35223),y=n(31908),b=n(14070),w=n(97291),_=n(22490),h=n(71241);const I={printBtn:"VWlur"};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var N=r.T.encloseNamespace("interactives.previewQuestions");function k(e){var t,n,r,k,T,A,x,S=(A=a.useState(!1),x=2,function(e){if(Array.isArray(e))return e}(A)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,c,l=[],o=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;o=!1}else for(;!(o=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw r}}return l}}(A,x)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(A,x)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),D=S[0],F=S[1],V=(0,f.r)(null).experimentalInteractiveQuestions,P=c.a.useBasicFetch(g.b.interactiveMetadata(e.id)),M=c.a.useBasicFetch(P.data?g.b.interactive(P.data.interactiveId):null),B=null;P.data&&(B={id:P.data.id,interactiveId:P.data.interactiveId,name:P.data.name},(null===(t=P.data._parentVideo)||void 0===t?void 0:t.id)&&(B.video={id:P.data._parentVideo.id}),(null===(n=P.data._parentClip)||void 0===n?void 0:n.id)&&(B.clip={id:P.data._parentClip.id}));var L=[{label:N("watchInteractive"),className:"btn btn-outline-dark me-2",svgName:E.vn.Play,button:!0,appLink:{application:w.O.INTERACTIVES,action:b.e.Interactives.VIEW_INTERACTIVE,args:[e.id,l.m.slugify(null===(r=M.data)||void 0===r?void 0:r.name)]},onClick:e.closePopup,analyticsData:B,analyticsOptions:{entity:o.py.Interactive,actionType:o.Vw.Click,location:o.LZ.PreviewInteractiveQuestions,descriptor:o._S.Button}},{label:N("printAsWorksheet"),className:"btn btn-outline-dark ".concat(I.printBtn),svgName:E.vn.Print,button:!0,onClick:function(){var e;F(!0),(0,h.X)(M.data,null===(e=P.data._isClickViewCurated)||void 0===e?void 0:e.value,(function(){return F(!1)}))},showSpinner:D,analyticsData:B,analyticsOptions:{entity:o.py.Interactive,actionType:o.Vw.Print,location:o.LZ.PreviewInteractiveQuestions,workflowPhase:o.eu.Start,eventVersion:o.eq.V2}}];if(e.showBackButton){var Q=(null===(k=P.data)||void 0===k?void 0:k._parentClip)||(null===(T=P.data)||void 0===T?void 0:T._parentVideo);L.unshift({label:N("back"),appLink:_.W.getInteractiveGuidanceAppLink(null==Q?void 0:Q.id,y.M.isClip(Q)?v.E.Clip:v.E.Video),className:"btn btn-link me-2",button:!0,analyticsData:B,analyticsOptions:{entity:o.py.Interactive,actionType:o.Vw.Click,location:o.LZ.PreviewInteractiveQuestions,workflowPhase:o.eu.Back}})}return a.createElement(u.G,{title:N("mainTitle"),closePopup:e.closePopup,showLoadingSpinner:!M.data,size:"lg"},M.data?a.createElement(a.Fragment,null,a.createElement(m.Z,{interactive:M.data,maxHeight:p.x,experimentalInteractiveQuestions:V,goToTimepoint:function(t,n,a){var r;i.Q.C$.trigger({application:w.O.INTERACTIVES,action:b.e.Interactives.VIEW_INTERACTIVE,args:[e.id,l.m.slugify(null===(r=M.data)||void 0===r?void 0:r.name)],params:a?{t:Math.floor(a/1e3)}:null}),e.closePopup()}}),a.createElement(d.u,null,a.createElement(s.e,{actions:L}))):a.createElement(a.Fragment,null))}}}]);
2
+ //# sourceMappingURL=7309-2c6299bbc3-lite.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts/7309-2c6299bbc3-lite.chunk.js","mappings":"qPACA,SAAgB,QAAU,QAAQ,KAAO,QAAQ,KAAO,QAAQ,KAAO,QAAQ,SAAW,QAAQ,gBAAkB,QAAQ,OAAS,QAAQ,YAAc,QAAQ,SAAW,QAAQ,IAAM,SCc5L,IAAMA,EAAY,8BAOlB,SAASC,EAAYC,GACnB,IAAQC,EAAgCD,EAAhCC,YAIR,QAFoBC,EAFoBF,EAAnBE,gBAEcD,IAGjC,KAAKE,EAAA,UACH,OAAO,wBAAMC,UAAU,gBAAe,gBAACC,EAAA,EAAY,CAACC,KAAMD,EAAAE,EAAA,OAAyBC,QAAS,cAC9F,KAAKL,EAAA,YACH,OAAO,wBAAMC,UAAU,eAAc,gBAACC,EAAA,EAAY,CAACC,KAAMD,EAAAE,EAAA,OAAyBC,QAAS,cAC7F,KAAKL,EAAA,kBACH,OAAO,wBAAMC,UAAU,yBAAwB,y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AAkBA,EAAA,SAEjDhK,UAAW,oBACX0I,QAAQ,EACRP,cAAAA,EACAc,iBAAkB,CAChBC,OAAQ,iBACRC,WAAY,WACZC,SAAU,iCACVK,cAAe,YAGpB,CAYD,OACE,gBAACQ,EAAA,EAAK,CACJC,MAAOtE,EAAU,aACjBoD,WAAYpJ,EAAMoJ,WAClBmB,oBAAqBrH,EAAYsB,KACjClE,KAAK,MAGE4C,EAAYsB,KAIf,gCACE,gBAACvB,EAAA,EAAoB,CACnBC,YAAaA,EAAYsB,KACzBrB,UAAW,IACXL,iCAAkCA,EAClChC,cA3BZ,SAAuB0J,EAAWC,EAAY7J,G,MAC5C,eAA2B,CACzBoI,YAAa,iBACbC,OAAQ,kCACRC,KAAM,CAAElJ,EAAMkB,GAAIiI,EAAA,UAAmC,QAAhB,EAAAjG,EAAYsB,YAAI,eAAEL,OACvDuG,OAAQ9J,EAAY,CAAEmD,EAAG4G,KAAKC,MAAMhK,EAAY,MAAU,OAE5DZ,EAAMoJ,YACR,IAqBU,gBAACyB,EAAA,EAAY,KACX,gBAAC,IAAa,CAACjC,QAASA,MAXrB,iCAkBjB,C","sources":["file:///app/packages/libs/shared/src/components/interactive-questions/interactive-questions.scss","file:///app/packages/libs/shared/src/components/interactive-questions/InteractiveQuestions.tsx","file:///app/packages/libs/shared/src/enums/InteractionCorrectness.ts","file:///app/packages/projects/lite/src/apps/interactives/components/printable-interactive-worksheet/printable-interactive-worksheet.scss","file:///app/packages/projects/lite/src/apps/interactives/components/printable-interactive-worksheet/PrintableInteractionContent.tsx","file:///app/packages/projects/lite/src/apps/interactives/components/printable-interactive-worksheet/PrintableInteractiveWorksheet.tsx","file:///app/packages/projects/lite/src/apps/interactives/utils/PrintInteractive.tsx","file:///app/packages/projects/lite/src/apps/interactives/views/preview-questions/preview-questions.scss","file:///app/packages/projects/lite/src/apps/interactives/views/preview-questions/PreviewQuestionsView.tsx"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"timeTag\":\"ShZvf\",\"hide\":\"FHzDr\",\"time\":\"JDp5N\",\"type\":\"AzIWg\",\"question\":\"UhEYq\",\"deleteContainer\":\"wBqoo\",\"delete\":\"OAQQu\",\"correctness\":\"W5sR9\",\"selected\":\"tfrDf\",\"row\":\"sGk59\"};","import React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { InteractionCorrectness } from 'libs/shared/enums/InteractionCorrectness';\nimport { ExperimentalInteractionTypes, Interaction, Interactive, Timepoint } from 'libs/shared/interfaces';\nimport { DurationHelper } from 'libs/shared/utils/DurationHelper';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport { InteractionLabel } from './InteractionLabel';\n\nimport styles from './interactive-questions.scss';\n\nconst namespace = 'shared.interactiveQuestions';\n\ninterface CorrectnessProps {\n interaction: Interaction;\n getCorrectness?: (interaction: Interaction) => InteractionCorrectness;\n}\n\nfunction Correctness(props: CorrectnessProps): React.ReactElement {\n const { interaction, getCorrectness } = props;\n\n const correctness = getCorrectness(interaction);\n\n switch (correctness) {\n case InteractionCorrectness.Correct:\n return <span className='text-success'><SvgContainer size={SvgContainerSize.Medium} svgName={cvSvgLibrary.Check} /></span>;\n case InteractionCorrectness.Incorrect:\n return <span className='text-danger'><SvgContainer size={SvgContainerSize.Medium} svgName={cvSvgLibrary.Close} /></span>;\n case InteractionCorrectness.AwaitingMarking:\n return <span className='text-secondary italic'><i><Text namespace={namespace} phrase='pending' /></i></span>;\n case InteractionCorrectness.UnAnswered:\n return <button className='btn btn-outline-dark'><Text namespace={namespace} phrase='answer' /></button>;\n case InteractionCorrectness.Answered:\n return <span className='text-secondary italic'><i><Text namespace={namespace} phrase='answered' /></i></span>;\n case InteractionCorrectness.NotApplicable:\n return <></>;\n }\n}\n\ninterface InteractionComponentProps {\n interaction: Interaction;\n visibleAt: number;\n goToTimepoint: (interactionId: string) => void;\n onClickDelete?: (interactionId: string) => void;\n scrollTo: (offset: number, height: number) => void;\n selectedInteractionId: string;\n isFirstInteraction: boolean;\n getCorrectness?: (interaction: Interaction) => InteractionCorrectness;\n}\n\nfunction InteractionComponent(props: InteractionComponentProps): React.ReactElement {\n const {\n interaction,\n visibleAt,\n selectedInteractionId,\n goToTimepoint,\n scrollTo,\n isFirstInteraction\n } = props;\n\n const selected = interaction.id.toString() === selectedInteractionId?.toString();\n\n const ref = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n if (!selected)\n return;\n\n if (!ref.current)\n return;\n\n const el = ref.current;\n const rect = el.getBoundingClientRect();\n const offset = rect.top - el.offsetParent.getBoundingClientRect().top;\n\n scrollTo(offset, rect.height);\n }, [selected]);\n\n function onClick(): void {\n goToTimepoint && goToTimepoint(interaction.id);\n }\n\n function onClickDelete(event: React.MouseEvent): void {\n event.stopPropagation();\n\n props.onClickDelete(interaction.id);\n }\n\n /**\n * Don't have a cursor if there is no callback function.\n * i.e. when rendered in a popup\n */\n const cursor = goToTimepoint ? 'cursor-pointer' : 'cursor-default';\n\n return (\n <div ref={ref}>\n <DivButton className={`py-2 ${cursor} ${styles.row} ${selected ? styles.selected : ''}`} onClick={selected ? () => {} : onClick}>\n <div className={`me-3 d-inline-flex rounded-pill justify-content-center align-items-center text-info fw-semibold bg-light-blue ${styles.timeTag} ${isFirstInteraction ? '' : styles.hide}`}>\n {isFirstInteraction ? DurationHelper.ToDisplayDuration(visibleAt) : ''}\n </div>\n\n <InteractionLabel\n interaction={interaction}\n showTypeName\n typeNameClassName={styles.type}\n questionClassName={styles.question}\n />\n {props.onClickDelete && (\n <DivButton onClick={onClickDelete} className={`${styles.deleteContainer}`}>\n <span className={`text-end ${styles.delete}`}>\n <SvgContainer\n size={SvgContainerSize.Medium}\n svgName={cvSvgLibrary.Delete}\n />\n </span>\n </DivButton>\n )}\n {props.getCorrectness && (\n <span className={`text-end ${styles.correctness}`}>\n <Correctness interaction={interaction} getCorrectness={props.getCorrectness} />\n </span>\n )}\n </DivButton>\n </div>\n );\n}\n\ninterface TimepointComponentProps {\n timepoint: Timepoint;\n goToTimepoint?: (timepointId: string, interactionId: string, visibleAt: number) => void;\n selectedInteractionId?: string;\n scrollTo?: (offset: number, height: number) => void;\n onClickDelete?: (interactionId: string) => void;\n getCorrectness?: (interaction: Interaction) => InteractionCorrectness;\n experimentalInteractiveQuestions?: boolean;\n}\n\nexport function TimepointComponent(props: TimepointComponentProps): React.ReactElement {\n const {\n timepoint,\n scrollTo,\n onClickDelete,\n selectedInteractionId,\n getCorrectness\n } = props;\n\n function goToTimepoint(interactionId: string): void {\n props.goToTimepoint(timepoint.id, interactionId, timepoint.visibleAt);\n }\n\n if (!timepoint.interactions)\n return <></>;\n\n return (\n <>\n {timepoint.interactions.map((interaction, i) => {\n if (!props.experimentalInteractiveQuestions && ExperimentalInteractionTypes[interaction.typeId])\n return <React.Fragment key={i} />;\n\n return (\n <InteractionComponent\n interaction={interaction}\n visibleAt={timepoint.visibleAt}\n goToTimepoint={props.goToTimepoint && goToTimepoint}\n onClickDelete={onClickDelete}\n scrollTo={scrollTo}\n selectedInteractionId={selectedInteractionId}\n isFirstInteraction={i === 0}\n getCorrectness={getCorrectness}\n key={i}\n />\n );\n })\n }\n </>\n );\n}\n\nexport interface InteractiveQuestionProps {\n interactive: Interactive;\n goToTimepoint?: (timepointId: string, interactionId: string, visibleAt: number) => void;\n selectedInteractionId?: string;\n maxHeight: number;\n onClickDelete?: (interactionId: string) => void;\n getCorrectness?: (interaction: Interaction) => InteractionCorrectness;\n experimentalInteractiveQuestions?: boolean;\n}\n\nexport function InteractiveQuestions(props: InteractiveQuestionProps): React.ReactElement {\n const {\n interactive,\n goToTimepoint,\n selectedInteractionId,\n maxHeight,\n onClickDelete,\n getCorrectness\n } = props;\n\n const ref = React.useRef<Scrollbars>(null);\n\n function scrollTo(offset: number, elHeight: number): void {\n if (!ref.current)\n return;\n\n const height = ref.current.getClientHeight();\n const scroll = ref.current.getScrollTop();\n const elementFromTop = offset + scroll;\n\n /**\n * Element is above scroll window if it's distance from the top\n * is less than the scroll\n */\n const isAboveScrollWindow = elementFromTop < scroll;\n\n /**\n * Element is beneath scroll window if it's distance from the top\n * plus it's height is greater than the scroll plus the window height\n */\n const isBelowScrollWindow = (elementFromTop + elHeight) > (scroll + height);\n\n /**\n * So we don't scroll if our element is visible\n */\n if (!isAboveScrollWindow && !isBelowScrollWindow)\n return;\n\n /**\n * If our element isn't visible, we want to try scroll so the element is\n * centered in our viewport\n */\n ref.current.scrollTop(elementFromTop - (height / 2) + (elHeight / 2));\n }\n\n const borderClass = goToTimepoint ? 'border rounded' : '';\n\n return (\n <Scrollbars\n autoHeight\n autoHeightMax={maxHeight}\n className={borderClass}\n hideTracksWhenNotNeeded={true}\n ref={ref}\n >\n <div className='px-3 py-2'>\n {interactive.timepoints.map((t, i) => (\n <TimepointComponent\n key={i}\n timepoint={t}\n goToTimepoint={goToTimepoint}\n selectedInteractionId={selectedInteractionId}\n scrollTo={scrollTo}\n onClickDelete={onClickDelete}\n getCorrectness={getCorrectness}\n experimentalInteractiveQuestions={props.experimentalInteractiveQuestions}\n />\n ))\n }\n </div>\n </Scrollbars>\n );\n}\n","export enum InteractionCorrectness {\n Correct,\n Incorrect,\n AwaitingMarking,\n \n Answered,\n UnAnswered,\n NotApplicable\n}","// extracted by mini-css-extract-plugin\nexport default {\"worksheet\":\"Bv47P\",\"interaction\":\"efkgi\",\"timepointCell\":\"ffoDR\",\"interactionCell\":\"rKBEu\",\"checkbox\":\"ilhe4\",\"imageMultipleChoiceText\":\"Fwn9S\",\"multipleChoiceAnswer\":\"TqhFx\",\"shortAnswerTextArea\":\"voJCM\",\"image\":\"go2dV\",\"smallImage\":\"Yky48\",\"cvLogo\":\"Z4GOw\",\"copyright\":\"petLf\",\"illustrationDrawingArea\":\"iA_Dl\"};","import React from 'react';\n\nimport { ActionableItem, Interaction, InteractionTypeId } from 'libs/shared/interfaces';\n\nimport styles from './printable-interactive-worksheet.scss';\n\nconst MISSING_WORD_REGEX = /{([^{}]*)}/g;\n\nconst alphabet = [ 'A', 'B', 'C', 'D' ];\n\ninterface PrintableInteractionContentProps {\n interaction: Interaction;\n}\n\nfunction InteractionName(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <div className='mb-2'>{props.interaction.name}</div>\n );\n}\n\nfunction AnnotationInteraction(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <div dangerouslySetInnerHTML={{ __html: props.interaction.data.annotation }}></div>\n );\n}\n\nfunction ImageInteraction(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <img className={styles.image} src={props.interaction.data.url} />\n </>\n );\n}\n\nfunction MissingWordInteraction(props: PrintableInteractionContentProps): JSX.Element {\n function replaceMissingWord(match: string, val: string): string {\n const actionableItem = props.interaction.actionableItems.find(a => a.order.toString() === val);\n const width = 2 * actionableItem.name.length;\n return Array(width + 1).join('_');\n }\n\n const sentence = typeof props.interaction.data === 'string'\n ? JSON.parse(props.interaction.data).sentence\n : props.interaction.data.sentence;\n\n const formatted = sentence.replace(MISSING_WORD_REGEX, replaceMissingWord);\n\n return (\n <div>{formatted}</div>\n );\n}\n\ninterface MultipleChoiceImageProps {\n actionableItem: ActionableItem;\n index: number;\n}\n\nfunction MultipleChoiceImage(props: MultipleChoiceImageProps): JSX.Element {\n const { actionableItem, index } = props;\n\n return (\n <td className='align-top'>\n <div className={styles.multipleChoiceAnswer}>\n <div className={`border d-inline-block ${styles.checkbox}`} />\n <div className={styles.imageMultipleChoiceText}>\n {actionableItem.name || alphabet[index]}\n </div>\n </div>\n <div className='my-3 me-3'>\n <img className={styles.smallImage} src={actionableItem.data.imageUrl} />\n </div>\n </td>\n );\n}\n\nfunction MultipleChoiceInteraction(props: PrintableInteractionContentProps): JSX.Element {\n const hasImages = !!props.interaction.actionableItems.find(a => !!a.data?.imageUrl);\n\n if (hasImages) {\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <table>\n <tbody>\n {props.interaction.actionableItems.map((a, i) => {\n if (i % 2 !== 0)\n return <React.Fragment key={i} />;\n\n const next = props.interaction.actionableItems[i + 1];\n \n return (\n <tr key={i}>\n <MultipleChoiceImage actionableItem={a} index={i} />\n {next ? <MultipleChoiceImage actionableItem={next} index={i + 1} /> : <td></td>}\n </tr>\n );\n })}\n </tbody>\n </table>\n </>\n );\n }\n\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <table>\n <tbody>\n {props.interaction.actionableItems.map(a => (\n <tr key={a.id}>\n <td>\n <div className={`border ${styles.checkbox}`} />\n </td>\n <td className='break-word align-top'>\n <div className={styles.multipleChoiceAnswer}>\n {a.name}\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </>\n );\n}\n\nfunction ShortAnswerInteraction(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <div className={`border w-100 ${styles.shortAnswerTextArea}`} />\n </>\n );\n}\n\nfunction IllustrationInteraction(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <div className={`w-100 border ${styles.illustrationDrawingArea}`} />\n </>\n );\n}\n\nexport const PrintableInteractionComponentLookup: {\n [typeId: number]: (props: PrintableInteractionContentProps) => JSX.Element\n} = {\n [InteractionTypeId.Annotation]: AnnotationInteraction,\n [InteractionTypeId.Image]: ImageInteraction,\n [InteractionTypeId.MissingWord]: MissingWordInteraction,\n [InteractionTypeId.MultipleChoice]: MultipleChoiceInteraction,\n [InteractionTypeId.TrueOrFalse]: MultipleChoiceInteraction,\n [InteractionTypeId.ShortAnswer]: ShortAnswerInteraction,\n [InteractionTypeId.Illustration]: IllustrationInteraction\n};\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { ClickViewLogo } from 'libs/shared/components/svgs/clickview-logo/ClickViewLogo';\nimport { Interaction, Interactive } from 'libs/shared/interfaces';\nimport { DurationHelper } from 'libs/shared/utils/DurationHelper';\n\nimport { PrintableInteractionComponentLookup } from './PrintableInteractionContent';\n\nimport styles from './printable-interactive-worksheet.scss';\n\nconst getPhrase = LanguageService.encloseNamespace('interactives.printableInteractiveWorksheet');\n\ninterface PrintableInteractionProps {\n interaction: Interaction;\n visibleAt: number;\n}\n\nfunction PrintableInteraction(props: PrintableInteractionProps): JSX.Element {\n const InteractionComponent = PrintableInteractionComponentLookup[props.interaction.typeId];\n\n if (!InteractionComponent)\n return <></>;\n\n return (\n <tr className={styles.interaction}>\n <td className={`align-top ${styles.timepointCell}`}>\n {DurationHelper.ToDisplayDuration(props.visibleAt)}\n </td>\n <td className={`break-word ${styles.interactionCell}`}>\n <InteractionComponent interaction={props.interaction} />\n </td>\n </tr>\n );\n}\n\ninterface PrintableInteractiveQuestionsProps {\n interactive: Interactive;\n}\n\nfunction PrintableInteractiveQuestions(props: PrintableInteractiveQuestionsProps): JSX.Element {\n return (\n <>\n {props.interactive.timepoints.map((timepoint, i) => (\n timepoint.interactions.map((interaction, j) => (\n <PrintableInteraction key={`${i}:${j}`} interaction={interaction} visibleAt={timepoint.visibleAt} />\n ))\n ))}\n </>\n );\n}\n\ninterface PrintableInteractiveWorksheetProps {\n worksheetElementId: string;\n interactive: Interactive;\n isClickViewContent: boolean;\n}\n\nexport function PrintableInteractiveWorksheet(props: PrintableInteractiveWorksheetProps): JSX.Element {\n const year = (new Date()).getFullYear();\n\n return (\n <div id={props.worksheetElementId} className={styles.worksheet}>\n <div className='row pb-2'>\n <div className='col-6'>{getPhrase('name')} ______________________________</div>\n <div className='col-6'>{getPhrase('date')} ______________________________</div>\n </div>\n <h1>\n <strong>{getPhrase('questionSheet')}:</strong> {props.interactive.name}\n </h1>\n <table>\n <tbody>\n <PrintableInteractiveQuestions interactive={props.interactive} />\n </tbody>\n </table>\n <div className={styles.cvLogo}>\n <ClickViewLogo />\n </div>\n {props.isClickViewContent &&\n <span className={styles.copyright}>{getPhrase('copyright', { year })}</span>\n }\n </div>\n );\n}\n","import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport printJS from 'print-js';\n\nimport { DevError } from 'libs/common/backbone/errors/DevError';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { Interactive } from 'libs/shared/interfaces';\n\nimport { PrintableInteractiveWorksheet } from 'apps/interactives/components/printable-interactive-worksheet/PrintableInteractiveWorksheet';\n\nconst getPhrase = LanguageService.encloseNamespace('interactives.utils');\n\nexport function printInteractive(interactive: Interactive, isCVContent: boolean, onDone?: () => void): void {\n const printRegion = document.getElementById('print-region');\n\n if (!printRegion)\n Core.ErrorHelper.throw(new DevError('Could not find print region in layout'));\n\n if (!interactive)\n return;\n\n const worksheetElementId = `printable-interactive-${interactive.id}`;\n\n const root = createRoot(printRegion);\n\n function print(): void {\n printJS({\n printable: worksheetElementId,\n type: 'html',\n documentTitle: getPhrase('worksheetTitle', { interactiveName: interactive.name }),\n targetStyles: ['*'],\n style: '@page { size: A4; margin: 1.5cm 0; }',\n onLoadingEnd: () => {\n onDone && onDone();\n root.unmount();\n },\n /**\n * font_size is deprecated but a bug in print.js still applies the default (12pt) if it\n * is omitted, overriding any custom/inline styles. \n * This value is the same as the one found in in .worksheet in printable-interactive-worksheet.scss\n */\n font_size: '14px'\n });\n }\n\n root.render(\n <div className='d-none'>\n <PrintableInteractiveWorksheet\n worksheetElementId={worksheetElementId}\n interactive={interactive}\n isClickViewContent={isCVContent}\n />\n </div>\n );\n\n window.setTimeout(() => {\n print();\n }, 200);\n}","// extracted by mini-css-extract-plugin\nexport default {\"printBtn\":\"VWlur\"};","import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ClickDescriptor, EntityType, EventVersion, LocationContext, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionOptions, Actions as ActionButtons } from 'libs/shared/components/actions/Actions';\nimport { InteractiveQuestions } from 'libs/shared/components/interactive-questions/InteractiveQuestions';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { PopupButtons } from 'libs/shared/components/popup/PopupButtons';\nimport { MINIMUM_GLANCE_HEIGHT } from 'libs/shared/constants/MinimumGlanceHeight';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Interactive, InteractiveMetadata, PopupViewProps } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { printInteractive } from 'apps/interactives/utils/PrintInteractive';\n\nimport styles from './preview-questions.scss';\n\nconst getPhrase = LanguageService.encloseNamespace('interactives.previewQuestions');\n\nexport interface PreviewQuestionsQueryParams {\n showBackButton?: boolean;\n}\n\ninterface PreviewQuestionsViewProps extends PopupViewProps {\n id: string;\n showBackButton?: boolean;\n}\n\nexport function PreviewQuestionsView(props: PreviewQuestionsViewProps): React.ReactElement {\n const [ showPrintButtonSpinner, setShowPrintButtonSpinner ] = React.useState(false);\n\n const { experimentalInteractiveQuestions } = useSettings(null);\n\n const interactiveMetadata = Flight.useBasicFetch<InteractiveMetadata>(\n InteractiveRequests.interactiveMetadata(props.id)\n );\n\n const interactive = Flight.useBasicFetch<Interactive>(interactiveMetadata.data ?\n InteractiveRequests.interactive(interactiveMetadata.data.interactiveId) : null);\n\n let analyticsData: HashObject = null;\n\n if (interactiveMetadata.data) {\n analyticsData = {\n id: interactiveMetadata.data.id,\n interactiveId: interactiveMetadata.data.interactiveId,\n name: interactiveMetadata.data.name\n };\n\n if (interactiveMetadata.data._parentVideo?.id)\n analyticsData.video = { id: interactiveMetadata.data._parentVideo.id };\n\n if (interactiveMetadata.data._parentClip?.id)\n analyticsData.clip = { id: interactiveMetadata.data._parentClip.id };\n }\n\n const actions: ActionOptions[] = [\n {\n label: getPhrase('watchInteractive'),\n className: 'btn btn-outline-dark me-2',\n svgName: cvSvgLibrary.Play,\n button: true,\n appLink: {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.VIEW_INTERACTIVE,\n args: [ props.id, TextHelper.slugify(interactive.data?.name) ]\n },\n onClick: props.closePopup,\n analyticsData,\n analyticsOptions: {\n entity: EntityType.Interactive,\n actionType: UserAction.Click,\n location: LocationContext.PreviewInteractiveQuestions,\n descriptor: ClickDescriptor.Button\n }\n },\n {\n label: getPhrase('printAsWorksheet'),\n className: `btn btn-outline-dark ${styles.printBtn}`,\n svgName: cvSvgLibrary.Print,\n button: true,\n onClick: () => {\n setShowPrintButtonSpinner(true);\n printInteractive(\n interactive.data,\n interactiveMetadata.data._isClickViewCurated?.value,\n () => setShowPrintButtonSpinner(false)\n );\n },\n showSpinner: showPrintButtonSpinner,\n analyticsData,\n analyticsOptions: {\n entity: EntityType.Interactive,\n actionType: UserAction.Print,\n location: LocationContext.PreviewInteractiveQuestions,\n workflowPhase: WorkflowPhase.Start,\n eventVersion: EventVersion.V2\n }\n }\n ];\n\n if (props.showBackButton) {\n const parent = interactiveMetadata.data?._parentClip || interactiveMetadata.data?._parentVideo;\n\n actions.unshift({\n label: getPhrase('back'),\n appLink: VideoAppLinkHelper.getInteractiveGuidanceAppLink(\n parent?.id,\n VideoHelper.isClip(parent) ? MasterType.Clip : MasterType.Video\n ),\n className: 'btn btn-link me-2',\n button: true,\n analyticsData,\n analyticsOptions: {\n entity: EntityType.Interactive,\n actionType: UserAction.Click,\n location: LocationContext.PreviewInteractiveQuestions,\n workflowPhase: WorkflowPhase.Back\n }\n });\n }\n\n function goToTimepoint(_: string, __: string, visibleAt: number): void {\n Core.AppLinkHelper.trigger({\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.VIEW_INTERACTIVE,\n args: [ props.id, TextHelper.slugify(interactive.data?.name) ],\n params: visibleAt ? { t: Math.floor(visibleAt / 1000) } : null\n });\n props.closePopup();\n }\n\n return (\n <Popup\n title={getPhrase('mainTitle')}\n closePopup={props.closePopup}\n showLoadingSpinner={!interactive.data}\n size='lg'\n >\n {(() => {\n if (!interactive.data)\n return <></>;\n\n return (\n <>\n <InteractiveQuestions\n interactive={interactive.data}\n maxHeight={MINIMUM_GLANCE_HEIGHT}\n experimentalInteractiveQuestions={experimentalInteractiveQuestions}\n goToTimepoint={goToTimepoint}\n />\n <PopupButtons>\n <ActionButtons actions={actions} />\n </PopupButtons>\n </>\n );\n })()}\n </Popup>\n );\n}\n"],"names":["namespace","Correctness","props","interaction","getCorrectness","InteractionCorrectness","className","SvgContainer","size","S","svgName","Text","phrase","InteractionComponent","visibleAt","selectedInteractionId","goToTimepoint","scrollTo","isFirstInteraction","selected","id","toString","ref","current","el","rect","getBoundingClientRect","offset","top","offsetParent","height","cursor","DivButton","onClick","DurationHelper","InteractionLabel","showTypeName","typeNameClassName","questionClassName","onClickDelete","event","stopPropagation","TimepointComponent","timepoint","interactionId","interactions","map","i","experimentalInteractiveQuestions","typeId","key","InteractiveQuestions","interactive","maxHeight","elHeight","getClientHeight","scroll","getScrollTop","elementFromTop","scrollTop","borderClass","autoHeight","autoHeightMax","hideTracksWhenNotNeeded","timepoints","t","MISSING_WORD_REGEX","alphabet","InteractionName","name","MultipleChoiceImage","actionableItem","index","src","data","imageUrl","MultipleChoiceInteraction","actionableItems","find","a","next","PrintableInteractionComponentLookup","dangerouslySetInnerHTML","__html","annotation","url","formatted","JSON","parse","sentence","replace","match","val","width","order","length","Array","join","getPhrase","LanguageService","PrintableInteraction","PrintableInteractiveQuestions","j","PrintableInteractiveWorksheet","year","Date","getFullYear","worksheetElementId","ClickViewLogo","isClickViewContent","printInteractive","isCVContent","onDone","printRegion","document","getElementById","DevError","root","render","window","setTimeout","printable","type","documentTitle","interactiveName","targetStyles","style","onLoadingEnd","unmount","font_size","PreviewQuestionsView","showPrintButtonSpinner","setShowPrintButtonSpinner","useSettings","interactiveMetadata","InteractiveRequests","interactiveId","analyticsData","_parentVideo","video","_parentClip","clip","actions","label","button","appLink","application","action","args","TextHelper","closePopup","analyticsOptions","entity","actionType","location","descriptor","_isClickViewCurated","value","showSpinner","workflowPhase","eventVersion","showBackButton","parent","unshift","VideoAppLinkHelper","VideoHelper","MasterType","Popup","title","showLoadingSpinner","_","__","params","Math","floor","PopupButtons"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[8046],{71241:(e,t,n)=>{n.d(t,{X:()=>A});var a=n(32735),r=n(44645),i=n(17327),c=n.n(i),l=n(56050),o=n(23481),m=n(81886),s=n(2786),u=n(93264),d=n(38129);const v={worksheet:"Bv47P",interaction:"efkgi",timepointCell:"ffoDR",interactionCell:"rKBEu",checkbox:"ilhe4",imageMultipleChoiceText:"Fwn9S",multipleChoiceAnswer:"TqhFx",shortAnswerTextArea:"voJCM",image:"go2dV",smallImage:"Yky48",cvLogo:"Z4GOw",copyright:"petLf",illustrationDrawingArea:"iA_Dl"};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function E(e,t,n){return(t=function(e){var t=function(e){if("object"!=_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=/{([^{}]*)}/g,f=["A","B","C","D"];function b(e){return a.createElement("div",{className:"mb-2"},e.interaction.name)}function g(e){var t=e.actionableItem,n=e.index;return a.createElement("td",{className:"align-top"},a.createElement("div",{className:v.multipleChoiceAnswer},a.createElement("div",{className:"border d-inline-block ".concat(v.checkbox)}),a.createElement("div",{className:v.imageMultipleChoiceText},t.name||f[n])),a.createElement("div",{className:"my-3 me-3"},a.createElement("img",{className:v.smallImage,src:t.data.imageUrl})))}function y(e){return e.interaction.actionableItems.find((function(e){var t;return!!(null===(t=e.data)||void 0===t?void 0:t.imageUrl)}))?a.createElement(a.Fragment,null,a.createElement(b,{interaction:e.interaction}),a.createElement("table",null,a.createElement("tbody",null,e.interaction.actionableItems.map((function(t,n){if(n%2!=0)return a.createElement(a.Fragment,{key:n});var r=e.interaction.actionableItems[n+1];return a.createElement("tr",{key:n},a.createElement(g,{actionableItem:t,index:n}),r?a.createElement(g,{actionableItem:r,index:n+1}):a.createElement("td",null))}))))):a.createElement(a.Fragment,null,a.createElement(b,{interaction:e.interaction}),a.createElement("table",null,a.createElement("tbody",null,e.interaction.actionableItems.map((function(e){return a.createElement("tr",{key:e.id},a.createElement("td",null,a.createElement("div",{className:"border ".concat(v.checkbox)})),a.createElement("td",{className:"break-word align-top"},a.createElement("div",{className:v.multipleChoiceAnswer},e.name)))})))))}var w=E(E(E(E(E(E(E({},d.Z9.Annotation,(function(e){return a.createElement("div",{dangerouslySetInnerHTML:{__html:e.interaction.data.annotation}})})),d.Z9.Image,(function(e){return a.createElement(a.Fragment,null,a.createElement(b,{interaction:e.interaction}),a.createElement("img",{className:v.image,src:e.interaction.data.url}))})),d.Z9.MissingWord,(function(e){var t=("string"==typeof e.interaction.data?JSON.parse(e.interaction.data).sentence:e.interaction.data.sentence).replace(p,(function(t,n){var a=2*e.interaction.actionableItems.find((function(e){return e.order.toString()===n})).name.length;return Array(a+1).join("_")}));return a.createElement("div",null,t)})),d.Z9.MultipleChoice,y),d.Z9.TrueOrFalse,y),d.Z9.ShortAnswer,(function(e){return a.createElement(a.Fragment,null,a.createElement(b,{interaction:e.interaction}),a.createElement("div",{className:"border w-100 ".concat(v.shortAnswerTextArea)}))})),d.Z9.Illustration,(function(e){return a.createElement(a.Fragment,null,a.createElement(b,{interaction:e.interaction}),a.createElement("div",{className:"w-100 border ".concat(v.illustrationDrawingArea)}))})),h=o.T.encloseNamespace("interactives.printableInteractiveWorksheet");function N(e){var t=w[e.interaction.typeId];return t?a.createElement("tr",{className:v.interaction},a.createElement("td",{className:"align-top ".concat(v.timepointCell)},u.T.ToDisplayDuration(e.visibleAt)),a.createElement("td",{className:"break-word ".concat(v.interactionCell)},a.createElement(t,{interaction:e.interaction}))):a.createElement(a.Fragment,null)}function k(e){return a.createElement(a.Fragment,null,e.interactive.timepoints.map((function(e,t){return e.interactions.map((function(n,r){return a.createElement(N,{key:"".concat(t,":").concat(r),interaction:n,visibleAt:e.visibleAt})}))})))}function C(e){var t=(new Date).getFullYear();return a.createElement("div",{id:e.worksheetElementId,className:v.worksheet},a.createElement("div",{className:"row pb-2"},a.createElement("div",{className:"col-6"},h("name")," ______________________________"),a.createElement("div",{className:"col-6"},h("date")," ______________________________")),a.createElement("h1",null,a.createElement("strong",null,h("questionSheet"),":")," ",e.interactive.name),a.createElement("table",null,a.createElement("tbody",null,a.createElement(k,{interactive:e.interactive}))),a.createElement("div",{className:v.cvLogo},a.createElement(s.$S,null)),e.isClickViewContent&&a.createElement("span",{className:v.copyright},h("copyright",{year:t})))}var I=o.T.encloseNamespace("interactives.utils");function A(e,t,n){var i=document.getElementById("print-region");if(i||m.Q.Ry.throw(new l.H("Could not find print region in layout")),e){var o="printable-interactive-".concat(e.id),s=(0,r.s)(i);s.render(a.createElement("div",{className:"d-none"},a.createElement(C,{worksheetElementId:o,interactive:e,isClickViewContent:t}))),window.setTimeout((function(){c()({printable:o,type:"html",documentTitle:I("worksheetTitle",{interactiveName:e.name}),targetStyles:["*"],style:"@page { size: A4; margin: 1.5cm 0; }",onLoadingEnd:function(){n&&n(),s.unmount()},font_size:"14px"})}),200)}}},59678:(e,t,n)=>{n.r(t),n.d(t,{PrintInteractiveView:()=>u});var a=n(32735),r=n(23481),i=n(20354),c=n(9111),l=n(50023),o=n(20768),m=n(71241),s=r.T.encloseNamespace("interactives.printInteractive");function u(e){var t=i.a.useBasicFetch(o.b.interactiveMetadata(e.id)),n=i.a.useBasicFetch(t.data?o.b.interactive(t.data.interactiveId):null);return a.useEffect((function(){var a;n.data&&(0,m.X)(n.data,null===(a=t.data._isClickViewCurated)||void 0===a?void 0:a.value,e.closePopup)}),[!!n.data]),a.createElement(c.G,{title:s("popupTitle"),closePopup:e.closePopup,showLoadingSpinner:!n.data,size:"lg"},a.createElement(l.E,null))}}}]);
2
+ //# sourceMappingURL=8046-590720816e-lite.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts/8046-590720816e-lite.chunk.js","mappings":"mPACA,SAAgB,UAAY,QAAQ,YAAc,QAAQ,cAAgB,QAAQ,gBAAkB,QAAQ,SAAW,QAAQ,wBAA0B,QAAQ,qBAAuB,QAAQ,oBAAsB,QAAQ,MAAQ,QAAQ,WAAa,QAAQ,OAAS,QAAQ,UAAY,QAAQ,wBAA0B,S,mnBCKlU,IAAMA,EAAqB,cAErBC,EAAW,CAAE,IAAK,IAAK,IAAK,KAMlC,SAASC,EAAgBC,GACvB,OACE,uBAAKC,UAAU,QAAQD,EAAME,YAAYC,KAE7C,CAwCA,SAASC,EAAoBJ,GAC3B,IAAQK,EAA0BL,EAA1BK,eAAgBC,EAAUN,EAAVM,MAExB,OACE,sBAAIL,UAAU,aACZ,uBAAKA,UAAW,wBACd,uBAAKA,UAAS,gCAA2B,cACzC,uBAAKA,UAAW,2BACbI,EAAeF,MAAQL,EAASQ,KAGrC,uBAAKL,UAAU,aACb,uBAAKA,UAAW,aAAmBM,IAAKF,EAAeG,KAAKC,YAIpE,CAEA,SAASC,EAA0BV,GAGjC,OAFoBA,EAAME,YAAYS,gB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sources":["file:///app/packages/projects/lite/src/apps/interactives/components/printable-interactive-worksheet/printable-interactive-worksheet.scss","file:///app/packages/projects/lite/src/apps/interactives/components/printable-interactive-worksheet/PrintableInteractionContent.tsx","file:///app/packages/projects/lite/src/apps/interactives/components/printable-interactive-worksheet/PrintableInteractiveWorksheet.tsx","file:///app/packages/projects/lite/src/apps/interactives/utils/PrintInteractive.tsx","file:///app/packages/projects/lite/src/apps/interactives/views/print-interactive/PrintInteractiveView.tsx"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"worksheet\":\"Bv47P\",\"interaction\":\"efkgi\",\"timepointCell\":\"ffoDR\",\"interactionCell\":\"rKBEu\",\"checkbox\":\"ilhe4\",\"imageMultipleChoiceText\":\"Fwn9S\",\"multipleChoiceAnswer\":\"TqhFx\",\"shortAnswerTextArea\":\"voJCM\",\"image\":\"go2dV\",\"smallImage\":\"Yky48\",\"cvLogo\":\"Z4GOw\",\"copyright\":\"petLf\",\"illustrationDrawingArea\":\"iA_Dl\"};","import React from 'react';\n\nimport { ActionableItem, Interaction, InteractionTypeId } from 'libs/shared/interfaces';\n\nimport styles from './printable-interactive-worksheet.scss';\n\nconst MISSING_WORD_REGEX = /{([^{}]*)}/g;\n\nconst alphabet = [ 'A', 'B', 'C', 'D' ];\n\ninterface PrintableInteractionContentProps {\n interaction: Interaction;\n}\n\nfunction InteractionName(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <div className='mb-2'>{props.interaction.name}</div>\n );\n}\n\nfunction AnnotationInteraction(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <div dangerouslySetInnerHTML={{ __html: props.interaction.data.annotation }}></div>\n );\n}\n\nfunction ImageInteraction(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <img className={styles.image} src={props.interaction.data.url} />\n </>\n );\n}\n\nfunction MissingWordInteraction(props: PrintableInteractionContentProps): JSX.Element {\n function replaceMissingWord(match: string, val: string): string {\n const actionableItem = props.interaction.actionableItems.find(a => a.order.toString() === val);\n const width = 2 * actionableItem.name.length;\n return Array(width + 1).join('_');\n }\n\n const sentence = typeof props.interaction.data === 'string'\n ? JSON.parse(props.interaction.data).sentence\n : props.interaction.data.sentence;\n\n const formatted = sentence.replace(MISSING_WORD_REGEX, replaceMissingWord);\n\n return (\n <div>{formatted}</div>\n );\n}\n\ninterface MultipleChoiceImageProps {\n actionableItem: ActionableItem;\n index: number;\n}\n\nfunction MultipleChoiceImage(props: MultipleChoiceImageProps): JSX.Element {\n const { actionableItem, index } = props;\n\n return (\n <td className='align-top'>\n <div className={styles.multipleChoiceAnswer}>\n <div className={`border d-inline-block ${styles.checkbox}`} />\n <div className={styles.imageMultipleChoiceText}>\n {actionableItem.name || alphabet[index]}\n </div>\n </div>\n <div className='my-3 me-3'>\n <img className={styles.smallImage} src={actionableItem.data.imageUrl} />\n </div>\n </td>\n );\n}\n\nfunction MultipleChoiceInteraction(props: PrintableInteractionContentProps): JSX.Element {\n const hasImages = !!props.interaction.actionableItems.find(a => !!a.data?.imageUrl);\n\n if (hasImages) {\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <table>\n <tbody>\n {props.interaction.actionableItems.map((a, i) => {\n if (i % 2 !== 0)\n return <React.Fragment key={i} />;\n\n const next = props.interaction.actionableItems[i + 1];\n \n return (\n <tr key={i}>\n <MultipleChoiceImage actionableItem={a} index={i} />\n {next ? <MultipleChoiceImage actionableItem={next} index={i + 1} /> : <td></td>}\n </tr>\n );\n })}\n </tbody>\n </table>\n </>\n );\n }\n\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <table>\n <tbody>\n {props.interaction.actionableItems.map(a => (\n <tr key={a.id}>\n <td>\n <div className={`border ${styles.checkbox}`} />\n </td>\n <td className='break-word align-top'>\n <div className={styles.multipleChoiceAnswer}>\n {a.name}\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </>\n );\n}\n\nfunction ShortAnswerInteraction(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <div className={`border w-100 ${styles.shortAnswerTextArea}`} />\n </>\n );\n}\n\nfunction IllustrationInteraction(props: PrintableInteractionContentProps): JSX.Element {\n return (\n <>\n <InteractionName interaction={props.interaction} />\n <div className={`w-100 border ${styles.illustrationDrawingArea}`} />\n </>\n );\n}\n\nexport const PrintableInteractionComponentLookup: {\n [typeId: number]: (props: PrintableInteractionContentProps) => JSX.Element\n} = {\n [InteractionTypeId.Annotation]: AnnotationInteraction,\n [InteractionTypeId.Image]: ImageInteraction,\n [InteractionTypeId.MissingWord]: MissingWordInteraction,\n [InteractionTypeId.MultipleChoice]: MultipleChoiceInteraction,\n [InteractionTypeId.TrueOrFalse]: MultipleChoiceInteraction,\n [InteractionTypeId.ShortAnswer]: ShortAnswerInteraction,\n [InteractionTypeId.Illustration]: IllustrationInteraction\n};\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { ClickViewLogo } from 'libs/shared/components/svgs/clickview-logo/ClickViewLogo';\nimport { Interaction, Interactive } from 'libs/shared/interfaces';\nimport { DurationHelper } from 'libs/shared/utils/DurationHelper';\n\nimport { PrintableInteractionComponentLookup } from './PrintableInteractionContent';\n\nimport styles from './printable-interactive-worksheet.scss';\n\nconst getPhrase = LanguageService.encloseNamespace('interactives.printableInteractiveWorksheet');\n\ninterface PrintableInteractionProps {\n interaction: Interaction;\n visibleAt: number;\n}\n\nfunction PrintableInteraction(props: PrintableInteractionProps): JSX.Element {\n const InteractionComponent = PrintableInteractionComponentLookup[props.interaction.typeId];\n\n if (!InteractionComponent)\n return <></>;\n\n return (\n <tr className={styles.interaction}>\n <td className={`align-top ${styles.timepointCell}`}>\n {DurationHelper.ToDisplayDuration(props.visibleAt)}\n </td>\n <td className={`break-word ${styles.interactionCell}`}>\n <InteractionComponent interaction={props.interaction} />\n </td>\n </tr>\n );\n}\n\ninterface PrintableInteractiveQuestionsProps {\n interactive: Interactive;\n}\n\nfunction PrintableInteractiveQuestions(props: PrintableInteractiveQuestionsProps): JSX.Element {\n return (\n <>\n {props.interactive.timepoints.map((timepoint, i) => (\n timepoint.interactions.map((interaction, j) => (\n <PrintableInteraction key={`${i}:${j}`} interaction={interaction} visibleAt={timepoint.visibleAt} />\n ))\n ))}\n </>\n );\n}\n\ninterface PrintableInteractiveWorksheetProps {\n worksheetElementId: string;\n interactive: Interactive;\n isClickViewContent: boolean;\n}\n\nexport function PrintableInteractiveWorksheet(props: PrintableInteractiveWorksheetProps): JSX.Element {\n const year = (new Date()).getFullYear();\n\n return (\n <div id={props.worksheetElementId} className={styles.worksheet}>\n <div className='row pb-2'>\n <div className='col-6'>{getPhrase('name')} ______________________________</div>\n <div className='col-6'>{getPhrase('date')} ______________________________</div>\n </div>\n <h1>\n <strong>{getPhrase('questionSheet')}:</strong> {props.interactive.name}\n </h1>\n <table>\n <tbody>\n <PrintableInteractiveQuestions interactive={props.interactive} />\n </tbody>\n </table>\n <div className={styles.cvLogo}>\n <ClickViewLogo />\n </div>\n {props.isClickViewContent &&\n <span className={styles.copyright}>{getPhrase('copyright', { year })}</span>\n }\n </div>\n );\n}\n","import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport printJS from 'print-js';\n\nimport { DevError } from 'libs/common/backbone/errors/DevError';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { Interactive } from 'libs/shared/interfaces';\n\nimport { PrintableInteractiveWorksheet } from 'apps/interactives/components/printable-interactive-worksheet/PrintableInteractiveWorksheet';\n\nconst getPhrase = LanguageService.encloseNamespace('interactives.utils');\n\nexport function printInteractive(interactive: Interactive, isCVContent: boolean, onDone?: () => void): void {\n const printRegion = document.getElementById('print-region');\n\n if (!printRegion)\n Core.ErrorHelper.throw(new DevError('Could not find print region in layout'));\n\n if (!interactive)\n return;\n\n const worksheetElementId = `printable-interactive-${interactive.id}`;\n\n const root = createRoot(printRegion);\n\n function print(): void {\n printJS({\n printable: worksheetElementId,\n type: 'html',\n documentTitle: getPhrase('worksheetTitle', { interactiveName: interactive.name }),\n targetStyles: ['*'],\n style: '@page { size: A4; margin: 1.5cm 0; }',\n onLoadingEnd: () => {\n onDone && onDone();\n root.unmount();\n },\n /**\n * font_size is deprecated but a bug in print.js still applies the default (12pt) if it\n * is omitted, overriding any custom/inline styles. \n * This value is the same as the one found in in .worksheet in printable-interactive-worksheet.scss\n */\n font_size: '14px'\n });\n }\n\n root.render(\n <div className='d-none'>\n <PrintableInteractiveWorksheet\n worksheetElementId={worksheetElementId}\n interactive={interactive}\n isClickViewContent={isCVContent}\n />\n </div>\n );\n\n window.setTimeout(() => {\n print();\n }, 200);\n}","import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { PopupLoadingSpinner } from 'libs/shared/components/popup/PopupLoadingSpinner';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { Interactive, InteractiveMetadata, PopupViewProps } from 'libs/shared/interfaces';\n\nimport { printInteractive } from 'apps/interactives/utils/PrintInteractive';\n\nconst getPhrase = LanguageService.encloseNamespace('interactives.printInteractive');\n\ninterface PrintInteractiveViewProps extends PopupViewProps {\n id: string;\n}\n\nexport function PrintInteractiveView(props: PrintInteractiveViewProps): React.ReactElement {\n const interactiveMetadata = Flight.useBasicFetch<InteractiveMetadata>(\n InteractiveRequests.interactiveMetadata(props.id)\n );\n\n const interactive = Flight.useBasicFetch<Interactive>(interactiveMetadata.data ?\n InteractiveRequests.interactive(interactiveMetadata.data.interactiveId) : null);\n\n React.useEffect(() => {\n if (!interactive.data)\n return;\n\n printInteractive(interactive.data, interactiveMetadata.data._isClickViewCurated?.value, props.closePopup);\n }, [!!interactive.data]);\n\n return (\n <Popup\n title={getPhrase('popupTitle')}\n closePopup={props.closePopup}\n showLoadingSpinner={!interactive.data}\n size='lg'\n >\n <PopupLoadingSpinner />\n </Popup>\n );\n}\n"],"names":["MISSING_WORD_REGEX","alphabet","InteractionName","props","className","interaction","name","MultipleChoiceImage","actionableItem","index","src","data","imageUrl","MultipleChoiceInteraction","actionableItems","find","a","map","i","key","next","id","PrintableInteractionComponentLookup","dangerouslySetInnerHTML","__html","annotation","url","formatted","JSON","parse","sentence","replace","match","val","width","order","toString","length","Array","join","getPhrase","LanguageService","PrintableInteraction","InteractionComponent","typeId","DurationHelper","visibleAt","PrintableInteractiveQuestions","interactive","timepoints","timepoint","interactions","j","PrintableInteractiveWorksheet","year","Date","getFullYear","worksheetElementId","ClickViewLogo","isClickViewContent","printInteractive","isCVContent","onDone","printRegion","document","getElementById","DevError","root","render","window","setTimeout","printable","type","documentTitle","interactiveName","targetStyles","style","onLoadingEnd","unmount","font_size","PrintInteractiveView","interactiveMetadata","interactiveId","_isClickViewCurated","value","closePopup","title","showLoadingSpinner","size"],"sourceRoot":""}