PageSourceSearch

https://puzzlezilla.ru/_next/static/chunks/pages/create-puzzle-c9f8b9632537b495.js

js puzzlezilla.ru collected 2026-10-05 00:18:27 UTC 9,320 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[701],{7795:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/create-puzzle",function(){return n(28236)}])},20987:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var s=n(85893),r=n(25675),a=n.n(r),l={src:"/_next/static/media/loading.48407d77.svg",height:200,width:200,blurWidth:0,blurHeight:0},i=n(69707),o=n.n(i);function c(e){let{size:t=300,fullscreen:n=!1,center:r=!0,styles:i={}}=e,c=(0,s.jsx)(a(),{priority:!0,src:l,alt:"loading",width:t,height:t}),d=(0,s.jsx)("div",{style:i,className:o().wrapper,children:(0,s.jsx)("div",{className:"h-100 d-flex ".concat(r&&"justify-content-center"),children:c})}),u=(0,s.jsx)("div",{style:i,className:"d-flex ".concat(r&&"justify-content-center"),children:c});return n?d:u}},28236:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return B},default:function(){return I}});var s=n(85893),r=n(5152),a=n.n(r),l=n(25675),i=n.n(l),o=n(67294),c=n(89583),d=n(5434),u=n(41664),p=n.n(u),h=n(93201),m=n(61659),x=n(55827),b=n(20987),f=n(75058),j=n(40782),v=n(78945),g=n(51649);function w(e){let{onSuccess:t,title:n}=e,{t:r,tc:a}=(0,x.Z)("components.web.LinkUploader"),[l,i]=(0,o.useState)(""),[c,d]=(0,o.useState)(!1),[u,p]=(0,o.useState)(!1),h=(0,o.useRef)(null),m=e=>{if(0==e.length){d(!1);return}if(e.length<10){d(r("short"));return}if(!/\.(jpeg|jpg|webp|png)/i.test(e)){d(r("noti"));return}d(!1),u||h.current===e||(h.current=e,p(!0),v.Z.post("/api/create-app-link",{url:e},{responseType:"blob"}).then(function(e){t(e.data),p(!1)}).catch(function(e){console.log(e),j.Am.error(a("error")),p(!1),h.current=null}))};return u?(0,s.jsx)(b.Z,{size:100}):(0,s.jsxs)("div",{className:"position-relative",children:[(0,s.jsx)("input",{type:"text",className:"form-control pe-5 bg-light border-info ".concat(c?"is-invalid":""),value:l,placeholder:n,onChange:e=>{let t=e.target.value;t!==h.current&&(h.current=null),i(t)},onBlur:()=>m(l),onKeyDown:e=>{"Enter"==e.key&&m(l)}}),c&&(0,s.jsx)("div",{className:"invalid-feedback",children:c}),l.length>0&&(0,s.jsx)("div",{role:"button",className:"position-absolute px-2 py-1",style:{to
1p:2,right:22},onClick:()=>{h.current=null,i("")},children:(0,s.jsx)(g.QAE,{})})]})}var y=n(36131),N=n.n(y);n(13874);var _=n(31955),S=n(41803);let k=a()(()=>Promise.all([n.e(2013),n.e(2293)]).then(n.bind(n,72293)),{loadableGenerated:{webpack:()=>[72293]},ssr:!1});function Z(e){let{setSizes:t,setInitParams:n,setDefSet:r,setUploadedFile:a}=e,{t:l,tc:i}=(0,x.Z)("components.web.AppUploader"),o=e=>{let s=new window.Image;s.src=URL.createObjectURL(e),s.onload=function(){t({width:this.width,height:this.height});let l=function(e,t,n){let s=5,r=null;(r=n?n.req.cookies.localSettings:_.Z.get("localSettings"))&&((r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"!=typeof e||""===e)return t;try{return JSON.parse(e)}catch(e){return t}}(r,null))&&"number"==typeof r.x&&"number"==typeof r.y?s=Math.max(r.x,r.y):r=null);let a=t>e?"y":"x",l=(0,S.Z)(e,t,s,a);return l.x*l.y>"150"&&(s="x"==a?Math.floor("150"/l.y):Math.floor("150"/l.x),l=(0,S.Z)(e,t,s,a)),{numX:l.x,numY:l.y,mode:r?r.mode:1,rotate:!!r&&r.rotate,type:r?r.type:"pzzz"}}(this.width,this.height);n(l),r(l),a(e),j.Am.success(i("upImgsuccess")),URL.revokeObjectURL(s.src)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.b,{handleChange:e=>o(e),label:l("dropText"),hoverTitle:" ",name:"file",classes:N().drop,maxSize:30,types:["JPG","PNG","WEBP"]}),(0,s.jsx)("div",{className:"fs-5 py-3 text-center",children:l("or")}),(0,s.jsx)(w,{title:l("linkUp"),onSuccess:e=>o(e)}),(0,s.jsx)("div",{className:"fs-5 py-3 text-center",children:l("or")}),(0,s.jsx)(k,{title:l("photo"),onPhoto:e=>{o(e)}})]})}var A=n(6212),C=n(11163),P=n(50259),T=n(1052),E=n(71175);n(45636);var z=n(76884);function U(e){let{btnTitle:t,blob:n,userData:r}=e,{tc:a,t:l}=(0,x.Z)("components.web.SaveToWeb"),{user:i}=(0,T.C)(e=>e.auth),d=(0,T.T)(),[u,h]=(0,o.useState)(!1),[m,b]=(0,o.useState)(!1),[f,g]=(0,o.useState)(!1),[w,y]=(0,o.useState)(""),N=(0,C.useRouter)(),{executeRecaptcha:_}=(0,P.xX)();async function S(){var e,t,s,r,i,o,c;g(!0);let d=new FormData,u=n.name;u||(u="file."+n.type.replace("image/","")),d.append("imageFile",n,u);{let e=await _("SaveToWeb");d.append("token",e)}try{let t=await v.Z.post("/api/save-to-web",d,{headers:{"Content-Type":"multipart/form-data"}});g(!1),(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.photo_id)?(y("/app?id="+t.data.photo_id),j.Am.success(l("title")),N.push("/app?id="+t.data.photo_id)):j.Am.error(a("error"))}catch(e){g(!1),(null===(t=e.response)||void 0===t?void 0:t.data)?j.Am.error((null==e?void 0:null===(s=e.response)||void 0===s?void 0:null===(r=s.data)||void 0===r?void 0:null===(i=r[0])||void 0===i?void 0:i.message)||(null==e?void 0:null===(o=e.response)||void 0===o?void 0:null===(c=o.data)||void 0===c?void 0:c.message)):j.Am.error(a("error"))}}let k=!1;return r&&(k=r.rank.freeQty-"100">0),p(),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{disabled:f,className:"btn btn-outline-success btn-lg  mb-2 w-100",onClick:()=>{if(!i){d((0,E.m)(!0)),j.Am.error(l("logerr"));return}k?h(!0):b(!0)},children:f?(0,s.jsx)("span",{className:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"}):(0,s.jsxs)(s.Fragment,{children:[t," ",k&&(0,s.jsxs)("span",{className:"text-warning ms-2 fw-bold",children:[(0,s.jsx)(c.vAr,{className:""}),"\xa0","100"]})]})}),(0,s.jsx)(z.Z,{isOpened:u,handleClose:()=>h(!1),handleOk:S,title:l("upsrv"),description:l("upsrv_desc",{bonus:"100"})}),m&&(0,s.jsxs)(A.Z,{backdrop:"static",show:m,onHide:()=>b(!1),"aria-labelledby":"contained-modal-title-vcenter",dialogClassName:"custom-modal",centered:!0,children:[(0,s.jsx)(A.Z.Header,{closeButton:!0,children:(0,s.jsx)(A.Z.Title,{id:"contained-modal-title-vcenter",children:l("nob")})}),(0,s.jsx)(A.Z.Body,{children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:l("nob_desc",{bonus:"100",freeQty:r.rank.freeQty})}})}),(0,s.jsx)(A.Z.Footer,{children:(0,s.jsx)("button",{className:"btn btn-warning",onClick:()=>b(!1),children:"OK"})})]})]})}var F=n(59773),L=n.n(F);let O=a()(()=>
1Promise.all([n.e(5937),n.e(3167),n.e(955),n.e(3609),n.e(7405),n.e(6957),n.e(5591),n.e(6867),n.e(7408),n.e(5939),n.e(120)]).then(n.bind(n,97408)),{loadableGenerated:{webpack:()=>[97408]},loading:()=>(0,s.jsx)(b.Z,{fullscreen:!0}),ssr:!1}),R=a()(()=>n.e(6266).then(n.bind(n,30)),{loadableGenerated:{webpack:()=>[30]},ssr:!1});function D(e){let{page:t}=e,{t:n}=(0,x.Z)("pages.AppCreatePage"),r=(0,x.Z)("pages.AppPage"),[a,l]=(0,o.useState)(null),[u,b]=(0,o.useState)({}),[f,j]=(0,o.useState)(null),[v,g]=(0,o.useState)({}),[w,y]=(0,o.useState)({});return((0,o.useEffect)(()=>{let e=e=>{e.stopImmediatePropagation()};return window.addEventListener("fullscreenchange",e,!0),()=>{window.removeEventListener("fullscreenchange",e,!0)}},[]),(0,o.useEffect)(()=>{v.ID&&fetch(v.ID).then(e=>e.blob()).then(e=>{j(e)})},[v]),f)?(0,s.jsx)(O,{blob:f,defset:v,setDefSet:g,setBlob:j}):(0,s.jsx)(h.Z,{page:t,children:a?(0,s.jsx)("div",{className:L().wrapper,children:(0,s.jsx)("div",{className:"container py-md-5 pb-3",children:(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:"col-md-6 py-3 ".concat(L().imgbg," px-0 px-md-2 pe-md-5"),children:[(0,s.jsx)("h2",{className:"text-center pt-3 pt-md-0 pb-3 pb-md-4",children:n("yourph")}),(0,s.jsx)("div",{className:w.numX/w.numY<=.8?L().img:"",children:(0,s.jsx)(i(),{alt:"My photo",width:u.width,height:u.height,src:URL.createObjectURL(a)})}),(0,s.jsxs)("div",{className:" px-2 px-md-0 mt-3",children:[(0,s.jsxs)("button",{className:"btn btn-outline-primary btn-lg mb-2 w-100",onClick:()=>{l(null),j(null)},children:[(0,s.jsx)(d.Ffb,{})," ",n("again")]}),(0,s.jsx)(U,{blob:a,userData:t.userData,btnTitle:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.TvB,{})," ",n("save")]})})]})]}),(0,s.jsxs)("div",{className:"col-md-6 ps-md-5",children:[(0,s.jsx)("h1",{className:"text-center pt-3 pt-md-0 pb-3 pb-md-4 fw-bold",children:r.t("h1")}),(0,s.jsx)(m.Z,{settings:v,sizes:u,showAlert:!1,btnTitle:n("setBtn"),onSubmit:(e,t,n,s,r)=>{g(a=>{let l={...a};return l.numX=e,l.numY=t,l.mode=n,l.rotate=s,l.type=r,l.startAnimation=!0,l}),j(a)}}),(0,s.jsx)("p",{className:"text-center pt-2",children:(0,s.jsx)(p(),{href:"/blog/how-to-use",children:(0,s.jsx)("small",{children:r.t("faq")})})})]})]})})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"page-wrapper",children:(0,s.jsx)("div",{className:"container",children:(0,s.jsx)("h1",{className:"pt-5 pb-4 text-center",children:n("h1")})})}),(0,s.jsx)("div",{className:"container pb-5",children:(0,s.jsx)("div",{className:"row justify-content-center",children:(0,s.jsxs)("div",{className:"col-md-7",children:[(0,s.jsxs)("p",{className:"fs-5 text-center pb-3",children:[n("text")," ",(0,s.jsx)(p(),{href:"/blog/how-to-create-puzzle",children:n("textArt")})]}),(0,s.jsx)(Z,{setSizes:b,setInitParams:y,setDefSet:g,setUploadedFile:l})]})})}),(0,s.jsx)(R,{})]})})}n(43008);var B=!0;function I(e){let{page:t}=e;return(0,s.jsx)(D,{page:t})}},69707:function(e){e.exports={wrapper:"loader_wrapper__RfPyC"}},36131:function(e){e.exports={drop:"appUploader_drop__HbKaK"}}},function(e){e.O(0,[1228,8907,1057,1893,6394,5058,7544,9774,2888,179],function(){return e(e.s=7795)}),_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.