PageSourceSearch

https://poly.cam/_next/static/chunks/2989.ec5b2d7114588336.js

js poly.cam collected 2026-09-24 09:07:10 UTC 10,115 bytes, 1 lines download raw bytes

1try{!function(){var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8b207a57-ec26-42d3-9bce-75affb3c0026",e._sentryDebugIdIdentifier="sentry-dbid-8b207a57-ec26-42d3-9bce-75affb3c0026")}()}catch(e){}try{("u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{}).SENTRY_RELEASE={id:"e5c218d51c3051e4a75cc638c5617e35fe4645f8"}}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2989],{5219:e=>{e.exports={permissions:"styles_permissions__TW1Ez",bold:"styles_bold__s4n4P",nameAndIcon:"styles_nameAndIcon__G5QbF",orgName:"styles_orgName__QT2EK",orgRow:"styles_orgRow__GQ4ML",toggle:"styles_toggle__ntf5Z",tooltip:"styles_tooltip__T97IL"}},11889:(e,t,s)=>{"use strict";function l(e,t){let s=new Set(t);return e.filter(e=>s.has(e))}s.d(t,{E:()=>l})},22989:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>k,useSaveCapture:()=>M});var l=s(54568),a=s(7620),i=s(22153),r=s(28805),n=s(33937),o=s(255),d=s(36270),c=s(98814),_=s(7064),u=s(56511),m=s(71783),g=s(80143),p=s(31011),h=s(5535),f=s(67657),y=s(98622),b=s(8444),A=s(20917),x=s(8340),w=s(83442),j=s(22695),v=s(28123),N=s(16127),S=s(81125),z=s(17680),E=s(64282),C=s(84821),I=s.n(C);let k=({captureId:e,defaultName:t,targetId:s,onSave:r,defaultDownload:g})=>{let[f,y]=(0,a.useState)(!!g),b=(0,w.c)(),{strings:A}=(0,x.B)(),v=(0,n.hA)(),{busy:N,manager:S,save:z,onAlbumCreated:C,orgs:k,orgSharingProps:B}=M(e,t,s,r,b,f);return(0,l.jsxs)(u.A,{header:A.SaveCapture,spacing:"compact",onClose:b.dismiss,closeDisabled:N,footer:(0,l.jsxs)(o.A,{className:I().footerBox,children:[(0,j.HZ)()&&(0,l.jsxs)(o.A,{className:I().footerDownload,children:[(0,l.jsx)(_.A,{disabled:N,checked:f,onChange:y}),(0,l.jsx)(h.A,{children:A.DownloadModelAfterSaving})]}),!v&&k&&k.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.A,{className:I().divider}),(0,l.jsx)(m.A,{orgs:k,checked:B.shared,toggle:B.toggle,mode:"create"})]}),(0,l.jsxs)(c.A,{palette:"action",size:"l",disabled:N,onClick:z,className:I().actionBtn,children:[N&&(0,l.jsx)(d.A,{size:16}),(0,l.jsx)(h.A,{children:f?A.SaveAndDownload:N?A.SavingCapture:A.Save})]})]}),children:[(0,l.jsxs)(p.A,{palette:"primary",className:I().createAlbumBtn,disabled:N,route:{target:"createAlbum",onCreated:C},action:"modal",children:[(0,l.jsx)(E.A,{}),(0,l.jsx)(h.A,{children:A.CreateAlbum})]}),(0,l.jsx)(i.$,{className:I().grid,manager:S,disabled:N})]})},M=(e,t,s,l,i,o,d=(0,f.B)(),c=(0,r.E)(),_=v.o)=>{let u=(0,y.n)((0,b.E4)()),[m]=(0,N.J)(()=>u.items,[u.items]),p=(0,n.hA)(),[h]=(0,N.J)(b.IF,[]),x=(0,a.useMemo)(()=>p?h?.filter(e=>e.id===p.id):h,[p,h]),w=(0,g.r_)(x),j=(0,a.useRef)(w);j.current=w,(0,a.useEffect)(()=>{u.selecting.set(!0)},[u.selecting]);let[E,C]=(0,a.useState)(),[I,k]=(0,a.useState)(!1),M=(0,a.useCallback)(async()=>{k(!0);try{let a=await (0,A.HW)();await _({method:"POST",route:`/api/capture/${e}/copy`,data:{targetId:s,exploreSave:!0,trackSource:!0,workspace:p?(0,S.HX)(p):void 0},user:a});let r=j.current.shared;if(x&&r.length){let e=x.filter(e=>r.includes(e.id)).map(S.T7);e.length>0&&await d.capture(s).update((0,z.$W)(e,"owner"))}let n=u.selection;if(n.length&&await Promise.all(n.map(e=>d.album(e.id).update({captures:{[s]:!0}}))),c.track("capture_saved",{modified_name:t,added_to_albums:n.length>0}),l(!0),o){let e=await (0,f.B)().capture(s).get();e&&i.show({route:{target:"export",capture:e},style:"modal"})}}catch(e){console.error(e),l(!1)}finally{k(!1),i.dismiss()}},[_,e,s,p,x,u.selection,c,t,l,o,d,i]);return(0,a.useEffect)(()=>{E&&m?.forEach(e=>{e.id!==E||e.selected.value||(e.toggleSelection(),C(void 0))})},[E,m]),{busy:I,manager:u,orgs:h,orgSharingProps:w,save:M,onAlbumCreated:C}}},24699:e=>{e.exports={tooltip:"styles_tooltip__ZcdEJ",open:"styles_open__Ifwto",top:"styles_top__dZ3JB",right:"styles_right__pE_jF",bottom:"styles_bottom__NcGOr",left:"styles_left__rhiSF"}},26137:e=>{e.exports={img:"styles_img__I_2RM",icon:"styles_icon__Jak_9",initials:"styles_initials__ASW1o",wrapper:"styles_wrapper__R1gYO",square:"styles_square__Y756D",circle:"styles_circle__AAO3B","size-16":"styles_size-16__MHesR","size-24":"styles_size-24__VjIAL","size-32":"styles_size-32__iSPLa","size-40":"styles_size-40__M_PKV","size-72":"styles_size-72__fmlkT","size-120":"styles_size-120__WUKtO"}},35327:(e,t,s)=>{"use strict";function l(e,t){let s=new Set(t);return e.filter(e=>!s.has(e))}s.d(t,{i:()=>l})},39856:e=>{e.exports={switch:"styles_switch__fvuLP",slider:"styles_slider__v4W1w",small:"styles_small__uQTN4",medium:"styles_medium__JDnIx",large:"styles_large__slaI5",btn:"styles_btn__LqHEj",btnLarge:"styles_btnLarge__eiq5w",btnMedium:"styles_btnMedium___08Qx",btnSmall:"styles_btnSmall__y6t_8",toggled:"styles_toggled__zTSJl",input:"styles_input__Ol2MY",disabled:"styles_disabled__w09sg"}},55657:(e,t,s)=>{"use strict";s.d(t,{A:()=>A});
1var l,a=s(54568),i=s(7620),r=s(9917),n=s(255),o=s(10123),d=s(5535),c=s(56504),_=s(27501),u=s(13749),m=s(92791),g=s(18123);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var l in s)({}).hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e}).apply(null,arguments)}let h=function(e){return i.createElement(g.A,p({width:40,height:40,viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img"},e),l||(l=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.083 10.046 14.093 9.282 19.108 5.66V6.403L29.142 9.9V19.988L24.27 18.341 24.275 13.43zM19.595 17.534 29.915 20.96 25.338 24.277 19.635 22.737zM18.92 17.311 14.11 20.798 14.09 31.614 18.974 28.075zM14.829 31.827 14.093 31.617 18.975 28.077 19.697 28.298zM18.639 30.493 13.827 33.981 13.732 34.848 18.614 31.31zM14.468 35.061 13.735 34.851 18.616 31.31 19.338 31.533z",fill:"currentColor"})))};var f=s(26137),y=s.n(f);let b=["#5ebfda","#428fc0","#64ec86","#54c36f","#f9dc61","#eaa3af","#db7365","#cb9fe2","#db5fb2"];function A({profile:e,size:t=32,className:s,...l}){let g,p,f=(0,c.lG)(e),x=(g=e.id,p=e.type,(0,i.useMemo)(()=>p===u.CO.org?"var(--surface-bright)":b[(0,m.pV)(g)%b.length],[g,p]));return(0,a.jsx)(n.A,{...l,className:(0,r.A)(y().wrapper,y()[`size-${t}`],y()[e.type===u.CO.org?"square":"circle"],s),style:{...l.style,background:x},title:e.displayName||e.username||void 0,children:(0,a.jsx)(()=>(!f||(0,_._g)(f))&&e.displayName?.length?(0,a.jsx)(d.A,{className:y().initials,title:e.displayName,children:(e=>{let t=e.split(/\s/g);if(t.length>=2){let e=t.map(e=>e[0]);for(;e.length>3;)e.splice(-2,1);return e.join("").toUpperCase()}return e[0]?.toUpperCase()??""})(e.displayName)}):f?(0,a.jsx)(o.A,{source:f,alt:"",width:t,height:t,className:y().img}):(0,a.jsx)(h,{width:t,height:t,className:y().icon}),{})})}},68129:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var l=s(54568),a=s(9917),i=s(24699),r=s.n(i);function n({children:e,className:t,open:s,position:i="bottom",...o}){return(0,l.jsx)("div",{...o,className:(0,a.A)(t,r().tooltip,{[r().open]:s,[r().top]:"top"===i,[r().right]:"right"===i,[r().bottom]:"bottom"===i,[r().left]:"left"===i}),children:e})}},71783:(e,t,s)=>{"use strict";s.d(t,{A:()=>m});var l=s(54568),a=s(7620),i=s(9917),r=s(55657),n=s(255),o=s(81174),d=s(5535),c=s(68129),_=s(5219),u=s.n(_);function m({className:e,orgs:t,checked:s,toggle:_,mode:g,disabled:p,...h}){return(0,l.jsx)(n.A,{className:(0,i.A)(u().permissions,e),...h,children:t.map(e=>(0,l.jsx)(a.Fragment,{children:e.settings?.autoShare==="required"&&s.includes(e.id)?"update"===g?(0,l.jsxs)(d.A,{children:[(0,l.jsx)(d.A,{children:"Added to team "}),(0,l.jsx)(d.A,{className:u().bold,children:e.displayName}),"."]}):(0,l.jsxs)(d.A,{children:[(0,l.jsx)(d.A,{children:"Will be added to team "}),(0,l.jsx)(d.A,{className:u().bold,children:e.displayName}),"."]}):(0,l.jsxs)(n.A,{element:"label",className:u().orgRow,children:[(0,l.jsxs)(n.A,{className:u().nameAndIcon,children:[(0,l.jsx)(r.A,{profile:e,size:32,shape:"square"}),(0,l.jsx)(d.A,{className:u().orgName,children:e.displayName})]}),(0,l.jsxs)(n.A,{className:u().toggle,children:[(0,l.jsx)(o.A,{element:"div",title:"Share with team",size:"small",toggled:s.includes(e.id),setToggled:()=>_(e.id),disabled:p}),(0,l.jsx)(c.A,{className:u().tooltip,open:!0,position:"left",children:s.includes(e.id)?"Your teammates can access":"Not shared with team"})]})]})},e.id))})}},74339:(e,t,s)=>{"use strict";s.d(t,{I:()=>r});var l=s(35327),a=s(11889),i=s(49949);function r(e,t){return(0,l.i)((0,i.s)(e.concat(t)),(0,a.E)(e,t))}},80143:(e,t,s)=>{"use strict";s.d(t,{Z2:()=>
1o,gH:()=>n,r_:()=>d});var l=s(7620),a=s(74339),i=s(81125),r=s(14811);let n=e=>{let t=(e??[]).map(e=>(0,i.qZ)(e));return(0,r.no)(t,"owner")},o=e=>(e??[]).filter(e=>e.settings?.autoShare==="required"),d=(e,t)=>{let[s,i]=(0,l.useState)(t??[]);return(0,l.useEffect)(()=>i(t=>(e??[]).filter(e=>e.settings?.autoShare!=="optional"||t.indexOf(e.id)>=0).map(e=>e.id)),[e]),{shared:s,toggle:e=>i((0,a.I)(s,[e]))}}},81174:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var l=s(54568),a=s(9917),i=s(255),r=s(39856),n=s.n(r);function o({className:e,size:t="medium",toggled:s,setToggled:r,disabled:d,title:c,element:_,...u}){return(0,l.jsxs)(i.A,{element:_,className:(0,a.A)(n().switch,e),title:c,children:[(0,l.jsx)("input",{className:n().input,type:"checkbox",checked:s,onChange:()=>r?.(!s),disabled:d,...u}),(0,l.jsx)("span",{className:(0,a.A)(n().slider,{[n().small]:"small"===t,[n().medium]:"medium"===t,[n().large]:"large"===t,[n().disabled]:d,[n().toggled]:s})})]})}},84821:e=>{e.exports={footerDownload:"styles_footerDownload__DJfpV",actionBtn:"styles_actionBtn__dcCzu",createAlbumBtn:"styles_createAlbumBtn__OxoPt",footerBox:"styles_footerBox__ILaTq",grid:"styles_grid__lnrad",divider:"styles_divider__b3Oe4"}},92791:(e,t,s)=>{"use strict";s.d(t,{Qy:()=>i,pV:()=>r,uI:()=>a});var l=s(99730);let a=e=>"string"==typeof e&&e.length>0,i=(e,t=l.D)=>"string"==typeof e&&e.length>0?t(e):void 0,r=e=>e.split("").reduce((e,t,s)=>e+t.charCodeAt(0)*(s+1),0)},99730:(e,t,s)=>{"use strict";function l(e){return e}s.d(t,{D:()=>l})}}]);

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.