PageSourceSearch

https://mixtiles.de/static/js/Zoom.C8XXlJE8.chunk.js

js mixtiles.de collected 2026-09-29 21:58:59 UTC 9,826 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/AnimatedPlusIcon.DmqmljQe.chunk.js","static/js/vendor.C--JXtB9.chunk.js","static/js/ApiUtils.DUU7R7v4.chunk.js"])))=>i.map(i=>d[i]);
2import{r,i as E,l as L,u as I,W as B,j as a,o as D,_ as N,a9 as $,aa as A,ab as X,x as Y,ac as K,ad as Z,ae as j,af as F}from"./vendor.C--JXtB9.chunk.js";import{u as V,at as W,au as q,X as U}from"./TopBar.DN3XeP74.chunk.js";import{l as G}from"./SplashSpinner.BhtjwGg_.chunk.js";import{a as k,_ as z,u as J}from"./Analytics.BU9ct9rR.chunk.js";import{e as H}from"./Button.DjtaW9Dr.chunk.js";import{B as Q}from"./BlurryBackground.L7fJa4cf.chunk.js";import{i as ee}from"./ApiUtils.DUU7R7v4.chunk.js";var S;function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},R.apply(null,arguments)}const je=e=>r.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 7 10"},e),S||(S=r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"m1 9 4.512-3.61a.5.5 0 0 0 0-.78L1 1"})));var C,M;function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},P.apply(null,arguments)}const te=e=>r.createElement("svg",P({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"},e),C||(C=r.createElement("g",{clipPath:"url(#plus_new_svg__a)"},r.createElement("path",{fill:"#EB2371",fillRule:"evenodd",d:"M6 0a1 1 0 0 1 1 1l-.001 4H11a1 1 0 1 1 0 2H6.999L7 11a1 1 0 1 1-2 0l-.001-4.001L1 7a1 1 0 0 1 0-2l3.999-.001L5 1a1 1 0 0 1 1-1",clipRule:"evenodd"}))),M||(M=r.createElement("defs",null,r.createElement("clipPath",{id:"plus_new_svg__a"},r.createElement("path",{fill:"#fff",d:"M0 0h12v12H0z"}))))),ne=E.div.withConfig({componentId:"sc-1dbcu59-0"})(["display:flex;gap:10px;align-items:center;overflow:hidden;white-space:nowrap;box-sizing:border-box;padding:0 19px;"]),ie=E(te).withConfig({componentId:"sc-1dbcu59-1"})(["flex-shrink:0;"]),oe=E.div.withConfig({componentId:"sc-1dbcu59-2"})(["font-size:15px;font-weight:700;line-height:150%;",""],({$hide:e})=>e&&L(["opacity:0;transition:opacity 0s 0.2s;"])),re=G(()=>N(()=>import("./AnimatedPlusIcon.DmqmljQe.chunk.js"),__vite__mapDeps([0,1,2])),"AnimatedPlusIcon");function Re({Container:e,disabled:t,floating:n,inControl:o,onClick:s,displayOpenAnimation:u,disableOutline:m,pulse:i}){const{t:d}=I(),x=!V("md")&&o,[h,l]=r.useState(!1),w=!!(i!=null&&i.isEligible)&&!t;!(i!=null&&i.isEligible)&&h&&l(!1);const y=B("UploadButton",{disabled:t,animated:!t&&!n&&!o,floating:n,control:o,round:!0,"disable-outline":m,"rive-plus":w}),b=i&&{onMouseEnter:()=>i.onHoverChange(!0),onMouseLeave:()=>i.onHoverChange(!1)},c=()=>{const v=a.jsxs(a.Fragment,{children:[!(w&&h)&&a.jsx("div",{className:"plus-icon",children:a.jsx(ie,{})}),(i==null?void 0:i.isEligible)&&a.jsx(r.Suspense,{fallback:null,children:a.jsx(re,{pulseKey:i.pulseKey,isHidden:!!t,onReadyChange:l})})]});return x?a.jsx(D.div,{className:y,onClick:s,...b,"data-testid":"upload-button",initial:{width:x?"59px":void 0},animate:{width:x?u?"fit-content":"59px":void 0},children:a.jsxs(ne,{children:[v,a.jsx(oe,{$hide:!u,children:d("order.add_photos")})]})}):a.jsx("div",{className:y,onClick:s,...b,"data-testid":"upload-button",children:v})};return e?a.jsx(e,{onClick:s,children:c()}):c()}function Pe({onPhotosSelected:e,testId:t,singleFileOnly:n=!1,openInputRef:o,shouldOpenCamera:s=!1,onFileDialogCancel:u=()=>{},style:m={}}){const{t:i}=I(),{enqueueSnackbar:d}=$(),f=()=>{k.track(z.OS_PICKER_OPENED,{source:"Main CTA"})},x=c=>{c.length>0&&d("",{variant:q.COMMON,title:i("order.upload_failed.format_not_supported"),name:"Unsupported File Format",analyticsProperties:{"Rejected Files Count":c.length,"File Types":c.map(({file:v})=>v.type)}})},h=o?{noClick:!0}:{},{getRootProps:l,getInputProps:w,open:y}=A({onDrop:e,onDropRejected:x,accept:W,multiple:!n,...h,onFileDialogCancel:u});r.useEffect(()=>{o&&(o.current=y)},[y]);const b=s?{capture:"environment",accept:"image/*"}:{};return a.jsx("div",{...l(),style:{position:"absolute",width:"100%",height:"100%",...m},children:a.jsx("input",{"data-testid":t,...w({onClick:f,...b})})})}const se=E.div.withConfig({componentId:"sc-1lboij0-0"})(["position:absolute;width:100%;display:flex;justify-content:flex-end;align-items:center;padding-top:12px;","{padding-top:32px;}z-index:1;"],H()),ae=E.div.withConfig({componentId:"sc-1lboij0-1"})(["position:absolute;margin:auto;left:0;right:0;text-align:center;font-size:16px;font-weight:600;text-transform:capitalize;"]),ce=E(U).withConfig({componentId:"sc-1lboij0-2"})(["color:",";--svg-stroke-width:1.5;box-sizing:border-box;width:36px;height:36px;border:1.5px solid transparent;border-radius:1000px;cursor:pointer;margin-right:13px;","{margin-right:32px;}display:",";"],({theme:e})=>e.colors.grayDark,H(),({$show:e})=>e?"block":"none"),le=E.div.withConfig({componentId:"sc-1lboij0-3"})(["display:flex;justify-content:center;align-items:",";width:100%;height:100vh;height:100dvh;transform:",";transition:transform 0.25s ease-in-out;"],({$position:e})=>e,({$display:e,$defaultAnimation:t})=>e?"none":t?"scale(0.65)":"none");function Se({show:e,title:t,onClose:n,position:o="center",showCloseIcon:s=!0,defaultAnimation:u=!0,usePortal:m=!0,closeOnClickOutside:i=!0,backgroundElement:d,children:f,backgroundColor:x,backdropFilter:h}){const l=a.jsxs(Q,{onClick:i?n:()=>{},show:e,backgroundColor:x,backdropFilter:h,children:[d,a.jsxs(se,{children:[a.jsx(ae,{children:t}),a.jsx(ce,{$show:s,onClick:n})]}),a.jsx(le,{$position:o,$defaultAnimation:u,$display:e,children:f})]});return m?X.createPortal(l,document.body):l}function Ce({isEnabled:e=!0,onChange:t}={}){const[n,o]=r.useState(0),[s,u]=r.useState(0),m=r.useMemo(()=>ee()?window.innerHeight:0,[]);r.useEffect(()=>{t&&s!==n&&t({state:s&&!n?"closing":"opening",value:n})},[s,n]);const i=Y(()=>{var d;
2e&&(u(n),o(m-(((d=window.visualViewport)==null?void 0:d.height)??0)))});return J(()=>{var d;return(d=window.visualViewport)==null||d.addEventListener("resize",i),()=>{var f;(f=window.visualViewport)==null||f.removeEventListener("resize",i)}}),{isKeyboardOpen:n>0,estimatedKeyboardHeight:n,previousEstimatedKeyboardHeight:s}}function ue({enabled:e,minScale:t,maxScale:n,onActiveChanged:o,element:s}){const u=r.useRef(null),m=r.useRef(null),i=r.useRef(null),[{scale:d,middleTouchOnElement:f,translateX:x,translateY:h},l]=K(()=>({scale:1,middleTouchOnElement:[0,0],translateX:0,translateY:0,immediate:!0,config:{duration:200}})),w=r.useCallback(c=>{if(c.touches.length!==2||(u.current=s.current.getBoundingClientRect(),!c.touches.length||!fe(c.touches,u.current)))return;c.preventDefault();const[v,p]=c.touches,{clientX:g,clientY:_}=T(c.touches,u.current);m.current=[g,_],i.current=O(v,p),l({middleTouchOnElement:[g,_],immediate:!0}),typeof o=="function"&&o(!0)},[l]),y=r.useCallback(c=>{if(m.current){const v=T(c.touches,u.current),[p,g]=c.touches,_=O(p,g);l({scale:me(_/i.current,t,n),translateX:v.clientX-m.current[0],translateY:v.clientY-m.current[1],immediate:!0}),typeof o=="function"&&o(!0)}},[l]),b=r.useCallback(()=>{l({scale:1,translateX:0,translateY:0,immediate:!1}),typeof o=="function"&&o(!1),m.current=null,i.current=null,u.current=null},[l]);return r.useEffect(()=>{s.current.ontouchstart=e?w:void 0,s.current.ontouchmove=e?y:void 0,s.current.ontouchend=e?b:void 0},[e,w,y,b]),{scale:d,translateX:x,translateY:h,middleTouchOnElement:f}}function O(e,t){const n={clientX:t.clientX,clientY:e.clientY},o=Math.abs(n.clientX-e.clientX),s=Math.abs(n.clientY-t.clientY);return Math.sqrt(o**2+s**2)}function de(e,t){return{clientX:Math.min(t.clientX,e.clientX)+Math.abs(t.clientX-e.clientX)/2,clientY:Math.min(t.clientY,e.clientY)+Math.abs(t.clientY-e.clientY)/2}}function T(e,t){const n=de(e[0],e[1]);return{clientX:n.clientX-t.left,clientY:n.clientY-t.top}}function fe(e,t){return Array.prototype.every.call(e,n=>n.clientX<=t.right&&n.clientX>=t.left&&n.clientY<=t.bottom&&n.clientY>=t.top)}function me(e,t,n){return Math.min(Math.max(t,e),n)}const he=E.div.withConfig({componentId:"sc-1574aiv-0"})(["touch-action:manipulation;"]),pe=E(Z("div")).withConfig({componentId:"sc-1574aiv-1"})(["pointer-events:none;z-index:100000;position:fixed;will-change:transform;"]);function ge({children:e,enabled:t=!0,minScale:n=1,maxScale:o=4,hideParent:s=!1,source:u,style:m={}}){const[i,d]=r.useState(null),f=r.useRef(null),x=r.useRef(null),h=r.useRef(null),l=r.useRef(!0),w=Y(p=>{if(p&&!i){h.current!==null&&(clearTimeout(h.current),h.current=null);const g=f.current.getBoundingClientRect();d(g),k.track(z.ZOOMED_WITH_PINCH,{Source:u})}else!p&&i&&(h.current=setTimeout(()=>{d(null),h.current=null},250))});r.useLayoutEffect(()=>{var p;if(i){const g=f.current.cloneNode(!0);g.style.opacity=1,g.style.visibility="visible",(p=x.current)==null||p.appendChild(g),s&&(f.current.parentElement.style.opacity="0")}else s&&(l.current?l.current=!1:f.current.parentElement.style.opacity="1")},[i]);const{scale:y,translateX:b,translateY:c,middleTouchOnElement:v}=ue({element:f,enabled:t,minScale:n,maxScale:o,onActiveChanged:w});return a.jsxs(a.Fragment,{children:[a.jsx(he,{ref:f,style:{opacity:i!==null?0:1,visibility:i!==null?"hidden":"visible",...m},children:e}),i!==null&&X.createPortal(a.jsx(pe,{ref:x,style:{width:i.width,height:i.height,top:i.y,left:i.x,transform:F([y,b,c],(p,g,_)=>`translate3d(${g}px, ${_}px, 0) scale3d(${p}, ${p}, 1)`),transformOrigin:v.to((p,g)=>`${p}px ${g}px 0`)}}),document.body)]})}ge.propTypes={children:j.node.isRequired,minScale:j.number,maxScale:j.number};export{Pe as D,Se as O,Re as P,je as S,ge as Z,te as a,Ce as u};
3//# sourceMappingURL=Zoom.C8XXlJE8.chunk.js.map

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.