PageSourceSearch

https://studio.mirrormirrorai.com/_next/static/chunks/4639.fa6e52c9ec8873a9.js

js mirrormirrorai.com collected 2026-10-05 01:03:44 UTC 17,283 bytes, 1 lines download raw bytes

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]="6782b867-e84f-4df1-9069-563dd0d98d1e",e._sentryDebugIdIdentifier="sentry-dbid-6782b867-e84f-4df1-9069-563dd0d98d1e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[515,4639],{18547:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(62157).A)("Pipette",[["path",{d:"m2 22 1-1h3l9-9",key:"1sre89"}],["path",{d:"M3 21v-3l9-9",key:"hpe2y6"}],["path",{d:"m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z",key:"196du1"}]])},34719:(e,t,r)=>{r.d(t,{jI:()=>A});var n=r(97414);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function l(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)t.indexOf(r=l[n])>=0||(a[r]=e[r]);return a}function o(e){var t=(0,n.useRef)(e),r=(0,n.useRef)(function(e){t.current&&t.current(e)});return t.current=e,r.current}var i,s=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e<t?t:e},c=function(e){return"touches"in e},u=function(e){return e&&e.ownerDocument.defaultView||self},d=function(e,t,r){var n=e.getBoundingClientRect(),a=c(t)?function(e,t){for(var r=0;r<e.length;r++)if(e[r].identifier===t)return e[r];return e[0]}(t.touches,r):t;return{left:s((a.pageX-(n.left+u(e).pageXOffset))/n.width),top:s((a.pageY-(n.top+u(e).pageYOffset))/n.height)}},f=function(e){c(e)||e.preventDefault()},h=n.memo(function(e){var t=e.onMove,r=e.onKey,i=l(e,["onMove","onKey"]),s=(0,n.useRef)(null),h=o(t),p=o(r),m=(0,n.useRef)(null),g=(0,n.useRef)(!1),x=(0,n.useMemo)(function(){var e=function(e){f(e),(c(e)?e.touches.length>0:e.buttons>0)&&s.current?h(d(s.current,e,m.current)):r(!1)},t=function(){return r(!1)};function r(r){var n=g.current,a=u(s.current),l=r?a.addEventListener:a.removeEventListener;l(n?"touchmove":"mousemove",e),l(n?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,n=s.current;if(n&&(f(t),(!g.current||c(t))&&n)){if(c(t)){g.current=!0;var a=t.changedTouches||[];a.length&&(m.current=a[0].identifier)}n.focus(),h(d(n,t,m.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),p({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]},[p,h]),v=x[0],b=x[1],w=x[2];return(0,n.useEffect)(function(){return w},[w]),n.createElement("div",a({},i,{onTouchStart:v,onMouseDown:v,className:"react-colorful__interactive",ref:s,onKeyDown:b,tabIndex:0,role:"slider"}))}),p=function(e){return e.filter(Boolean).join(" ")},m=function(e){var t=e.color,r=e.left,a=e.top,l=p(["react-colorful__pointer",e.className]);return n.createElement("div",{className:l,style:{top:100*(void 0===a?.5:a)+"%",left:100*r+"%"}},n.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},g=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r},x=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?g(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?g(parseInt(e.substring(6,8),16)/255,2):1}},v=function(e){var t=e.s,r=e.v,n=e.a,a=(200-t)*r/100;return{h:g(e.h),s:g(a>0&&a<200?t*r/100/(a<=100?a:200-a)*100:0),l:g(a/2),a:g(n,2)}},b=function(e){var t=v(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},w=function(e){var t=e.h,r=e.s,n=e.v,a=e.a;t=t/360*6,r/=100,n/=100;var l=Math.floor(t),o=n*(1-r),i=n*(1-(t-l)*r),s=n*(1-(1-t+l)*r),c=l%6;return{r:g(255*[n,i,o,o,s,n][c]),g:g(255*[s,n,n,i,o,o][c]),b:g(255*[o,o,s,n,n,i][c]),a:g(a,2)}},y=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},j=function(e){var t=e.r,r=e.g,n=e.b,a=e.a,l=a<1?y(g(255*a)):"";return"#"+y(t)+y(r)+y(n)+l}
1,_=function(e){var t=e.r,r=e.g,n=e.b,a=e.a,l=Math.max(t,r,n),o=l-Math.min(t,r,n),i=o?l===t?(r-n)/o:l===r?2+(n-t)/o:4+(t-r)/o:0;return{h:g(60*(i<0?i+6:i)),s:g(l?o/l*100:0),v:g(l/255*100),a:a}},k=n.memo(function(e){var t=e.hue,r=e.onChange,a=p(["react-colorful__hue",e.className]);return n.createElement("div",{className:a},n.createElement(h,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:s(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":g(t),"aria-valuemax":"360","aria-valuemin":"0"},n.createElement(m,{className:"react-colorful__hue-pointer",left:t/360,color:b({h:t,s:100,v:100,a:1})})))}),N=n.memo(function(e){var t=e.hsva,r=e.onChange,a={backgroundColor:b({h:t.h,s:100,v:100,a:1})};return n.createElement("div",{className:"react-colorful__saturation",style:a},n.createElement(h,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:s(t.s+100*e.left,0,100),v:s(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+g(t.s)+"%, Brightness "+g(t.v)+"%"},n.createElement(m,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:b(t)})))}),C=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},E="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,M=new Map,z=function(e){E(function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!M.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',M.set(t,n);var a=i||r.nc;a&&n.setAttribute("nonce",a),t.head.appendChild(n)}},[])},D=function(e){var t,r,i,s,c,u=e.className,d=e.colorModel,f=e.color,h=void 0===f?d.defaultColor:f,m=e.onChange,g=l(e,["className","colorModel","color","onChange"]),x=(0,n.useRef)(null);z(x);var v=(t=o(m),i=(r=(0,n.useState)(function(){return d.toHsva(h)}))[0],s=r[1],c=(0,n.useRef)({color:h,hsva:i}),(0,n.useEffect)(function(){if(!d.equal(h,c.current.color)){var e=d.toHsva(h);c.current={hsva:e,color:h},s(e)}},[h,d]),(0,n.useEffect)(function(){var e;C(i,c.current.hsva)||d.equal(e=d.fromHsva(i),c.current.color)||(c.current={hsva:i,color:e},t(e))},[i,d,t]),[i,(0,n.useCallback)(function(e){s(function(t){return Object.assign({},t,e)})},[])]),b=v[0],w=v[1],y=p(["react-colorful",u]);return n.createElement("div",a({},g,{ref:x,className:y}),n.createElement(N,{hsva:b,onChange:w}),n.createElement(k,{hue:b.h,onChange:w,className:"react-colorful__last-control"}))},I={defaultColor:"000",toHsva:function(e){return _(x(e))},fromHsva:function(e){return j(w({h:e.h,s:e.s,v:e.v,a:1}))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||C(x(e),x(t))}},A=function(e){return n.createElement(D,a({},e,{colorModel:I}))}},42901:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(62157).A)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]])},58735:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(62157).A)("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]])},61245:(e,t,r)=>{r.r(t),r.d(t,{MoodboardPickerDialog:()=>y,default:()=>j});var n=r(22054),a=r(73752),l=r(37143),o=r(42901),i=r(51968),s=r(82323),c=r(2094),u=r(97414),d=r(74914),f=r(26953),h=r(43155),p=r(83567),m=r(94136),g=r(73867),x=r(71755),v=r(43157),b=r(42218);let w=["image/jpeg","image/png","image/webp","image/gif"];function y(e){let{open:t,onOpenChange:r,vibes:y,isLoading:j,selectedVibeId:_,onSelectVibe:k,createVibe:N,createVibeStatus:C="idle"}=e,E=(0,c.c)("campaign"),M=(0,c.c)("vibe.addVibeDialog"),{projectId:z}=(0,s.useParams)(),{isEnabled:D,gate:I}=(0,x._Q)("generate_moodboard_item"),[A,S]=(0,u.useState)([]),[P,T]=(0,u.useState)([]),[L,R]=(0,u.useState)(null),[H,O]=(0,u.useState)(!1),V=(0,u.useRef)(null),B=(0,u.useRef)(!1);(0,u.useEffect)(()=>{t||(S([]),T([]),R(null),O(!1))},[t]),(0,u.useEffect)(()=>{"pending"===C&&t&&r(!1)},[C,t,r]);let q=(0,u.useCallback)(async e=>{if(!B.current){B.current=!0;try{let t=e.filter(e=>w.includes(e.type));if(0===t.length)return;let r=await Promise.allSettled(t.map(e=>new Promise((t,r)=>{let n=new FileReader;n.onload=()=>{let e=n.result,a=e.match(/^data:(image\/[^;,]+)/);if(!a||!w.includes(a[1]))return void r(Error("Invalid image data"));t(e)},n.onerror=r,n.readAsDataURL(e)}))),n=[],a=[];if(r.forEach((e,t)=>{"fulfilled"===e.status&&(n.push(t),a.push(e.value))}),0===n.length)return void R(M("imageLoadError"));let l=n.map(e=>t[e]),o=[],i=null;S(e=>{let t=[],r=l.filter((r,n)=>{let a=e.some(e=>
1e.name===r.name&&e.lastModified===r.lastModified&&e.size===r.size);return a||t.push(n),!a});if(0===r.length)return e;let n=[...e,...r];return n.length>20?(i=M("imageCountExceedWarning"),e):n.reduce((e,t)=>e+t.size,0)>0x1400000?(i=M("imageSizeExceedWarning"),e):(o=t,n)}),i?R(i):o.length>0&&(R(null),T(e=>{let t=o.map(e=>a[e]);return[...e,...t]}))}finally{B.current=!1}}},[M]),K=(0,u.useCallback)(e=>{e.preventDefault(),O(!1),e.dataTransfer.files&&q(Array.from(e.dataTransfer.files))},[q]),U=A.length>0,W=A.length>=3&&A.length<=20;return(0,n.jsx)(p.Dialog,{open:t,onOpenChange:r,children:(0,n.jsxs)(p.DialogContent,{className:"flex max-h-[85vh] max-w-2xl flex-col gap-0 overflow-hidden p-0",children:[(0,n.jsxs)(p.DialogHeader,{className:"flex shrink-0 flex-row items-center justify-between bg-background px-6 pb-4 pt-6",children:[(0,n.jsx)(p.DialogTitle,{children:E("canvas.moodPicker.title")}),(0,n.jsx)(p.DialogClose,{asChild:!0,children:(0,n.jsx)(h.$,{variant:"ghost",className:"size-8 p-1.5 hover:bg-white/20 focus-visible:ring-0",children:(0,n.jsx)(a.A,{className:"size-4"})})})]}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[N&&!D&&(0,n.jsx)("div",{className:"shrink-0 border-b border-white/5 px-6 pb-4",children:(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("span",{className:"text-xs text-white/70",children:E("canvas.moodPicker.createSectionTitle")}),(0,n.jsx)(f.Bcw,{delayDuration:300,children:(0,n.jsxs)(f.m_M,{children:[(0,n.jsx)(f.k$k,{asChild:!0,children:(0,n.jsx)("span",{className:"cursor-default",onClick:e=>e.stopPropagation(),children:(0,n.jsx)(l.A,{className:"size-3 text-white","aria-hidden":"true"})})}),(0,n.jsx)(f.ZIw,{side:"top",className:"max-w-[220px] bg-accent",children:M.rich("planUpgradeTooltip",{link:e=>(0,n.jsx)(m.x,{onClick:I,children:e})})})]})})]}),(0,n.jsx)(f.Bcw,{children:(0,n.jsxs)(f.m_M,{children:[(0,n.jsx)(f.k$k,{asChild:!0,children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("div",{className:"pointer-events-none flex h-[134px] w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-neutral-700 opacity-50 grayscale",children:[(0,n.jsx)(o.A,{className:"size-6 text-white/45"}),(0,n.jsx)("span",{className:"text-xs text-white/70",children:E("canvas.moodPicker.createSectionTitle")}),(0,n.jsxs)("span",{className:"text-[11px] text-white/45",children:[3,"–",20," images \xb7 drop or click"]})]}),(0,n.jsx)("div",{className:"absolute inset-0 cursor-pointer",onClick:I})]})}),(0,n.jsx)(f.ZIw,{side:"bottom",className:"max-w-[220px] bg-accent",children:M.rich("planUpgradeTooltip",{link:e=>(0,n.jsx)(m.x,{onClick:I,children:e})})})]})})]})}),N&&D&&(0,n.jsx)("div",{className:"shrink-0 border-b border-white/5 px-6 pb-4",children:(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[L&&(0,n.jsx)("div",{className:"flex items-center gap-2 rounded-md bg-destructive/10 px-3 py-2",children:(0,n.jsx)("span",{className:"text-xs text-destructive",children:L})}),(0,n.jsxs)("div",{onDragOver:e=>{e.preventDefault(),O(!0)},onDragLeave:()=>O(!1),onDrop:K,className:(0,v.cn)("relative overflow-hidden rounded-lg border-2 border-dashed transition-colors",H?"border-white/40 bg-white/5":U?"border-neutral-700":"border-neutral-600 hover:border-neutral-500"),children:[(0,n.jsx)("input",{ref:V,type:"file",accept:"image/*",multiple:!0,className:"hidden","aria-label":M("uploadLabel"),onChange:e=>{e.target.files&&q(Array.from(e.target.files)),e.target.value=""}}),U?(0,n.jsxs)("div",{className:"p-3",children:[(0,n.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,n.jsxs)("span",{className:"text-xs text-white/70",children:[A.length," / ",20," photos"]}),(0,n.jsxs)(h.$,{type:"button",variant:"tertiary",size:"sm","aria-label":M("addMoreImages"),onClick:()=>{var e;return null==(e=V.current)?void 0:e.click()},children:[(0,n.jsx)(i.A,{className:"size-3"}),M("addMore")]})]}),(0,n.jsx)("div",{className:"max-h-[240px] overflow-y-auto",children:(0,n.jsx)("div",{className:"grid grid-cols-4 gap-2",children:P.map((e,t)=>{var r,l;return(0,n.jsxs)("div",{className:"group relative aspect-square overflow-hidden rounded-md",children:[(0,n.jsx)(g._V,{src:e,alt:"Moodboard image ".concat(t+1),width:120,height:120,sizes:"(min-width: 672px) 164px, 25vw",className:"size-full object-cover",noProxy:!0}),(0,n.jsx)("button",{type:"button","aria-label":"Remove ".concat(null!=(l=null==(r=A[t])?void 0:r.name)?l:"image ".concat(t+1)),onClick:()=>{S(e=>e.filter((e,r)=>r!==t)),T(e=>e.filter((e,r)=>r!==t)),R(null)},className:"absolute right-1 top-1 flex size-5 items-center justify-center rounded-full bg-black/60 text-white/70 opacity-0 transition-opacity group-hover:opacity-100 hover:bg-destructive hover:text-white",children:(0,n.jsx)(a.A,{className:"size-3"})})]},t)})})})]}):(0,n.jsxs)("button",{type:"button","aria-label":M("uploadLabel"),onClick:()=>{var e;return null==(e=V.current)?void 0:e.click()},className:"flex h-[134px] w-full flex-col items-center justify-center gap-2",children:[(0,n.jsx)(o.A,{className:"size-6 text-white/45"}),(0,n.jsx)("span",{className:"text-xs text-white/70",children:E("canvas.moodPicker.createSectionTitle")}),(0,n.jsxs)("span",{className:"text-[11px] text-white/45",children:[3,"–",20," images \xb7 drop or click"]})]})]}),U&&(0,n.jsx)("button",{type:"button",onClick:()=>
1{if(!N)return;if(A.length<3||A.length>20)return void R(M("imageCountExceedWarning"));if(A.reduce((e,t)=>e+t.size,0)>0x1400000)return void R(M("imageSizeExceedWarning"));let e=new FormData,t=d.Yj().uuid().safeParse(z);t.success&&e.append("project_id",t.data),A.forEach(t=>e.append("images",t)),N(e)},disabled:!W,className:(0,v.cn)("w-full rounded-md py-2.5 text-sm font-medium transition-colors",W?"bg-white text-black hover:bg-neutral-200":"cursor-not-allowed bg-neutral-700 text-white/45"),children:M("createButton")})]})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-6 pb-6",children:(0,n.jsx)(b.VibeView,{vibes:y,isLoading:j,selectedVibeId:_,onSelectVibe:e=>{k(e),null!=e&&r(!1)},campaignMode:!0,sectionTitleOverride:E("canvas.moodPicker.selectSectionTitle")})})]})]})})}let j=y},63845:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(62157).A)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])}}]);

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.