1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4a3e7e85-c4c3-4863-a239-1a3985ce6414",e._sentryDebugIdIdentifier="sentry-dbid-4a3e7e85-c4c3-4863-a239-1a3985ce6414")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2275],{27370:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var s=n(23798),r=n(76614),i=n(63977),a=n.n(i),l=n(2940),c=n.n(l),o=n(72716),d=n(82163);function u(e){let{children:t,backHref:n,backLabel:i="Voltar"}=e;return(0,s.jsxs)("div",{className:"min-h-screen w-full bg-surface-muted font-sans no-print",children:[(0,s.jsxs)("header",{className:"sticky top-0 z-10 flex items-center gap-3 border-0 border-b border-solid border-line-subtle bg-surface px-4 py-3 shadow-xs",children:[n?(0,s.jsxs)(c(),{href:n,className:(0,d.V)({variant:"outline",size:"sm"}),children:[(0,s.jsx)(r.A,{size:14,strokeWidth:1.75}),(0,s.jsx)("span",{className:"ml-1",children:i})]}):(0,s.jsx)("span",{className:"w-[88px]"}),(0,s.jsx)("div",{className:"flex flex-1 justify-center",children:(0,s.jsx)(a(),{src:o.A,alt:"Wiki4fit",priority:!0,width:104,height:26,className:"h-[26px] w-auto object-contain"})}),(0,s.jsx)("span",{className:"w-[88px]"})]}),(0,s.jsx)("main",{className:"mx-auto w-full max-w-[640px] px-4 py-6",children:t})]})}},53452:(e,t,n)=>{"use strict";n.d(t,{O:()=>a});var s=n(79157),r=n(21462);let i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function a(){let e=(0,s.useRouter)();return(0,r.useMemo)(()=>{if(!e.isReady)return{token:null,isReady:!1};let t=e.query.token,n=Array.isArray(t)?t[0]:t;return n&&i.test(n)?{token:n,isReady:!0}:{token:null,isReady:!0}},[e.isReady,e.query])}},55769:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var s=n(23798),r=n(21462),i=n(82776);let a=function(e){let{children:t}=e;return(0,s.jsx)(s.Fragment,{children:(0,i.r)(t).map((e,t)=>e.bold?(0,s.jsx)("strong",{className:"font-semibold",children:e.text},t):(0,s.jsx)(r.Fragment,{children:e.text},t))})}},72716:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s={src:"/_next/static/media/wiki4fit-logo.6a29d3ec.png",height:76,width:400,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAHlBMVEX5lS4qLTnYgzApLjkVJTr/mC4TIzvylzwJITjAeDDOg9PBAAAACnRSTlM+TVBRWVlAKjZKVZoJAwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAABpJREFUeJxjYGFm5OBkZWJgYGFkZmNiZWcAAAJIAD2vMZMmAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:2}},78747:(e,t,n)=>{"use strict";n.d(t,{M9:()=>l,SM:()=>a,X2:()=>c,aN:()=>i});var s=n(32759),r=n(85567);function i(e,t,n){let i=t.trim();return(0,s.useQuery)(["print-training:search",e,i],async()=>{let{data:t}=await r.Gn.get("/public/print-training/search",{params:{token:e,q:i}});return t},{enabled:null!=e&&i.length>0,staleTime:3e4,...n})}function a(e,t,n){return(0,s.useQuery)(["print-training:student-trainings",e,t],async()=>{let{data:n}=await r.Gn.get("/public/print-training/student/".concat(t,"/trainings"),{params:{token:e}});return n},{enabled:null!=e&&null!=t,staleTime:3e4,...n})}function l(e,t,n){return(0,s.useQuery)(["print-training:training",e,t],async()=>{let{data:n}=await r.Gn.get("/public/print-training/training/".concat(t),{params:{token:e}});return n},{enabled:null!=e&&null!=t,staleTime:3e4,...n})}function c(){return(0,s.useMutation)(async e=>{let{token:t,sessionId:n}=e;await r.Gn.post("/public/print-training/session/".concat(n,"/done"),null,{params:{token:t}})})}},80198:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var s=n(23798),r=n(66790);function i(e){let{width:t,height:n,rounded:i="sm",className:a}=e;return(0,s.jsx)("span",{"aria-hidden":!0,style:{width:"number"==typeof t?"".concat(t,"px"):t,height:"number"==typeof n?"".concat(n,"px"):n,borderRadius:"number"==typeof i?"".concat(i,"px"):"full"===i?"9999px":void 0},className:(0,r.cn)("block animate-pulse bg-neutral-200","sm"===i&&"rounded-xs","md"===i&&"rounded-md",a)})}},82776:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});let s=/\*\*([\s\S]+?)\*\*/g;function r(e){if(!e)return[];let t=[],n=0;s.lastIndex=0;let r=s.exec(e);for(;null!==r;)r.index>n&&t.push({text:e.slice(n,r.index),bold:!1}),t.push({text:r[1],bold:!0}),n=r.index+r[0].length,r=s.exec(e);return n<e.length&&t.push({text:e.slice(n),bold:!1}),t}},89124:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/print-training/session/[sessionId]/print",function(){return n(89633)}])}
1,89633:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var s=n(23798),r=n(90957),i=n(52086),a=n.n(i),l=n(2940),c=n.n(l),o=n(79157),d=n(21462),u=n(27370),m=n(55769);function x(e){var t,n,r,i,a,l,c;let{training:o,session:d,settings:u,facilityName:m,printedAt:x}=e,g=null!=x?x:new Date,f=(l=o.doneSessions,null==(c=o.totalSessions)||0===c?1===l?"1 sess\xe3o realizada":"".concat(l," sess\xf5es realizadas"):"".concat(l," de ").concat(c," sess\xf5es")),b=null==(n=null==u?void 0:u.showCoach)||n,j=null==(r=null==u?void 0:u.showExerciseHints)||r,A=null!=(i=null==u?void 0:u.printSize)?i:"P",N=null!=(a=null==u?void 0:u.footerText)?a:null;return(0,s.jsxs)("article",{className:"training-sheet leading-snug text-black ".concat("G"===A?"text-[16px]":"text-[13px]"),children:[(0,s.jsxs)("header",{className:"text-center",children:[m&&(0,s.jsx)("div",{className:"text-[1.17em] font-bold uppercase",children:m}),(0,s.jsx)("div",{className:"mt-0.5 text-[0.92em] uppercase tracking-wide",children:"Ficha de Treino"})]}),(0,s.jsx)("hr",{className:"my-1 border-0 border-t border-dashed border-black"}),(0,s.jsxs)("section",{className:"text-center",children:[(0,s.jsx)("div",{className:"text-[1.17em] font-bold leading-tight",children:o.studentName}),(o.studentEnrollment||b&&o.coachName)&&(0,s.jsx)("div",{className:"text-[0.83em] leading-tight",children:[o.studentEnrollment?"Mat. ".concat(o.studentEnrollment):null,b&&o.coachName?"Prof. ".concat(o.coachName):null].filter(Boolean).join(" \xb7 ")})]}),(0,s.jsx)("hr",{className:"my-1 border-0 border-t border-dashed border-black"}),(0,s.jsxs)("section",{className:"text-center",children:[(0,s.jsx)("div",{className:"text-[1.17em] font-bold uppercase leading-tight",children:d.name}),(0,s.jsx)("div",{className:"mt-0.5 text-[0.83em] leading-tight",children:[o.name,(null==(t=o.objective)?void 0:t.trim())||null].filter(Boolean).join(" \xb7 ")}),(0,s.jsx)("div",{className:"text-[0.83em] leading-tight",children:[function(e,t){if(!e&&!t)return"Indefinido";let n=e=>{if(!e)return"â";let[t,n,s]=e.split("-");return"".concat(s,"/").concat(n,"/").concat(t)};return"".concat(n(e)," at\xe9 ").concat(n(t))}(o.startDate,o.endDate),f].filter(Boolean).join(" \xb7 ")}),o.isExpired&&(0,s.jsx)("div",{className:"mt-0.5 text-[0.92em] font-bold uppercase",children:"â Treino vencido"})]}),(0,s.jsx)("hr",{className:"my-1 border-0 border-t border-dashed border-black"}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"m-0 text-center text-[1em] font-bold uppercase",children:"Exerc\xedcios"}),0===d.exercises.length?(0,s.jsx)("p",{className:"m-0 mt-1 text-center text-[0.92em]",children:"Nenhum exerc\xedcio cadastrado."}):(0,s.jsx)("div",{className:"mt-1 flex flex-col gap-2",children:(function(e){let t=[],n=0;for(;n<e.length;){var s;let r=e[n];if(null==r.groupId){t.push({kind:"single",startIndex:n+1,exercise:r}),n+=1;continue}let i=n+1,a=[r],l=n+1;for(;l<e.length&&e[l].groupId===r.groupId;)a.push(e[l]),l+=1;t.push({kind:"group",startIndex:i,groupName:null!=(s=r.groupName)?s:"Agrupamento",groupColor:r.groupColor,exercises:a}),n=l}return t})(d.exercises).map(e=>"single"===e.kind?(0,s.jsx)(p,{exercise:e.exercise,index:e.startIndex,showHint:j},e.exercise.id):(0,s.jsx)(h,{groupName:e.groupName,groupColor:e.groupColor,exercises:e.exercises,startIndex:e.startIndex,showHint:j},"group-".concat(e.exercises[0].id)))})]}),(0,s.jsx)("hr",{className:"my-1 border-0 border-t border-dashed border-black"}),N&&(0,s.jsx)("p",{className:"m-0 mb-1 text-center text-[0.92em] font-bold",children:N}),(0,s.jsxs)("footer",{className:"text-center text-[0.83em]",children:["Impresso em ",function(e){let t="".concat(e.getDate()).padStart(2,"0"),n="".concat(e.getMonth()+1).padStart(2,"0"),s=e.getFullYear(),r="".concat(e.getHours()).padStart(2,"0"),i="".concat(e.getMinutes()).padStart(2,"0");return"".concat(t,"/").concat(n,"/").concat(s," ").concat(r,":").concat(i)}(g)]})]})}function p(e){let{exercise:t,index:n,showHint:r}=e,i=[t.method?"M\xe9todo: ".concat(t.method):null,t.objective?"Objetivo: ".concat(t.objective):null].filter(Boolean).join(" \xb7 ");return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"font-bold",children:[n,". ",t.name]}),t.reps.length>0&&(0,s.jsx)("ul",{className:"m-0 mt-0.5 list-none space-y-0.5 p-0 pl-2",children:t.reps.map(e=>(0,s.jsx)("li",{children:function(e){let t="".concat(e.vezes," x ").concat(e.quantity).concat(e.unitLabel?" ".concat(e.unitLabel):""),n=e.intensity?" \xb7 Carga: ".concat(e.intensity):"",s=e.pause>0?" \xb7 ".concat(e.pause).concat(e.pauseMax?"â".concat(e.pauseMax):"","s pausa"):"";return"".concat(t).concat(n).concat(s)}(e)},e.id))}),r&&i&&(0,s.jsx)("div",{className:"mt-0.5 pl-2 text-[0.83em]",children:i}),r&&t.hint&&(0,s.jsxs)("div",{className:"mt-0.5 pl-2 text-[0.83em] italic",children:["Dica: ",(0,s.jsx)(m.A,{children:t.hint})]})]})}function h(e){let{groupName:t,groupColor:n,exercises:r,startIndex:i,showHint:a}=e;return(0,s.jsxs)("div",{className:"grouped-exercises rounded-sm border border-solid border-black/60 px-2 pb-1 pt-0.5",children:[(0,s.jsxs)("div",{className:"mb-0.5 flex items-center gap-1",children:[(0,s.jsxs)("span",{className:"text-[0.83em] font-bold uppercase tracking-wide",children:["â¶ ",t]}
1),n&&(0,s.jsx)("span",{"aria-hidden":!0,className:"grouped-exercises__dot inline-block h-2 w-2 rounded-full",style:{backgroundColor:n}})]}),(0,s.jsx)("ul",{className:"m-0 flex list-none flex-col gap-1 p-0",children:r.map((e,t)=>(0,s.jsx)("li",{children:(0,s.jsx)(p,{exercise:e,index:i+t,showHint:a})},e.id))})]})}var g=n(94950),f=n(82163),b=n(36765),j=n(80198),A=n(78747),N=n(53452);function v(){var e;let t=(0,o.useRouter)(),{token:n,isReady:i}=(0,N.O)(),{sessionId:l,trainingId:m}=(0,d.useMemo)(()=>{let e=Number(Array.isArray(t.query.sessionId)?t.query.sessionId[0]:t.query.sessionId),n=Number(Array.isArray(t.query.training)?t.query.training[0]:t.query.training);return{sessionId:Number.isFinite(e)&&e>0?e:null,trainingId:Number.isFinite(n)&&n>0?n:null}},[t.query.sessionId,t.query.training]),p=(0,A.M9)(n,m),h=(0,A.X2)(),v=(0,d.useMemo)(()=>{var e,t;return null!=(t=null==(e=p.data)?void 0:e.sessions.find(e=>e.id===l))?t:null},[null==(e=p.data)?void 0:e.sessions,l]),y=m&&n?"/print-training/training/".concat(m,"?token=").concat(n):n?"/print-training?token=".concat(n):"/print-training",w=(0,d.useRef)(!1),k=(0,d.useRef)(!1);return((0,d.useEffect)(()=>(document.body.classList.add("print-thermal-mode"),()=>document.body.classList.remove("print-thermal-mode")),[]),(0,d.useEffect)(()=>{if(!v||w.current)return;w.current=!0;let e=window.setTimeout(()=>window.print(),400);return()=>window.clearTimeout(e)},[v]),(0,d.useEffect)(()=>{function e(){!k.current&&n&&l&&(k.current=!0,h.mutate({token:n,sessionId:l}))}return window.addEventListener("afterprint",e),()=>window.removeEventListener("afterprint",e)},[n,l,h]),i)?n&&null!=l&&null!=m?(0,s.jsxs)(u.A,{backHref:y,children:[(0,s.jsxs)(a(),{children:[(0,s.jsx)("title",{children:"Imprimir sess\xe3o \xb7 Wiki4fit"}),(0,s.jsx)("style",{children:"@media print { @page { size: auto; margin: 0; } }"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[h.isSuccess&&(0,s.jsx)("div",{className:"no-print",children:(0,s.jsx)(g.A,{variant:"success",message:"Sess\xe3o marcada como impressa. Voc\xea pode imprimir novamente se precisar."})}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 no-print",children:[(0,s.jsx)("h1",{className:"m-0 text-xl font-bold text-fg",children:"Imprimir sess\xe3o"}),(0,s.jsx)(f.A,{variant:"primary",size:"lg",iconLeft:(0,s.jsx)(r.A,{size:16,strokeWidth:1.75}),onClick:()=>window.print(),disabled:!v,children:"Imprimir novamente"})]}),p.isLoading&&(0,s.jsx)(j.A,{height:400,rounded:"md"}),p.isError&&(0,s.jsx)(b.A,{icon:null,title:"Treino n\xe3o encontrado",description:"Volte e busque novamente."}),p.data&&!v&&(0,s.jsx)(b.A,{icon:null,title:"Sess\xe3o n\xe3o encontrada",description:"A sess\xe3o pode ter sido removida do treino."}),p.data&&v&&(0,s.jsx)("div",{className:"training-sheet-print-host rounded-md border border-solid border-line-subtle bg-surface p-4 shadow-xs",children:(0,s.jsx)(x,{training:p.data,session:v,settings:p.data.settings,facilityName:"Wiki4fit"})}),(0,s.jsx)(c(),{href:y,className:"self-center text-[13px] font-semibold text-fg-brand no-underline transition-colors hover:underline no-print",children:"â Voltar para a lista de sess\xf5es"})]})]}):(0,s.jsx)(u.A,{backHref:y,children:(0,s.jsx)(g.A,{variant:"warning",message:"URL inv\xe1lida."})}):null}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=89124)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.