PageSourceSearch

https://remont-online.net/assets/SketchEffectPage-CcdCcMpr.js

js remont-online.net collected 2026-10-02 20:47:58 UTC 4,563 bytes, 1 lines download raw bytes

1import{aK as e,aT as c,ax as E,aX as C}from"./index-Dutum67h.js";import{a as n}from"./vendor-BPWfBN2A.js";const N=[{key:"sketch",prompt:"architectural interior pencil sketch, hand-drawn renovation concept, sepia warm tones, detailed lines"},{key:"blueprint",prompt:"technical architectural blueprint interior, engineering drawing blue white, floor plan perspective"},{key:"modern",prompt:"modern minimalist interior renovation result, clean bright space, Scandinavian design, photorealistic"},{key:"luxury",prompt:"luxury high-end interior renovation, premium materials, contemporary design, warm lighting, photorealistic"}];function P(t,u,h){const x=`${t}, interior room design`;let a=`https://image.pollinations.ai/prompt/${encodeURIComponent(x)}?width=800&height=530&model=flux&nologo=true&seed=${h}`;return u&&(a+=`&image_url=${encodeURIComponent(u)}&strength=0.65`),a}function z({locale:t,navigateTo:u}){const[h,x]=n.useState(null),[a,w]=n.useState(null),[O,j]=n.useState(null),[k,b]=n.useState([]),[r,p]=n.useState(!1),[_,d]=n.useState(0),[v,g]=n.useState(""),i=n.useRef(0);function L(s){s&&(a&&URL.revokeObjectURL(a),x(s),w(URL.createObjectURL(s)),b([]),g(""),j(null),d(0))}async function R(){if(!(!h||r)){p(!0),g(""),d(10),i.current=0;try{const{url:s}=await C(h);j(s),d(30);const l=Math.floor(Math.random()*9e3)+1e3,y=N.map((m,o)=>({key:m.key,url:P(m.prompt,s,l+o*13)}));b(y)}catch{g(c(t,"sketch_error")),p(!1),d(0)}}}function U(){i.current+=1,d(30+Math.round(i.current/4*70)),i.current>=4&&p(!1)}function S(){i.current+=1,i.current>=4&&p(!1)}async function $(s,l){try{const m=await(await fetch(s)).blob(),o=document.createElement("a");o.href=URL.createObjectURL(m),o.download=`remy-${l}.jpg`,o.click(),URL.revokeObjectURL(o.href)}catch{window.open(s,"_blank")}}const f=k.length===4&&!r;return e.jsxs("div",{className:"sketch-page",children:[e.jsxs("div",{className:"sketch-header",children:[e.jsx("div",{className:"section-eyebrow",children:c(t,"sketch_eyebrow")}),e.jsx("h1",{className:"sketch-title",children:c(t,"sketch_title")}),e.jsx("p",{className:"sketch-sub",children:c(t,"sketch_subtitle")})]}),e.jsxs("div",{className:"sketch-upload-area",children:[e.jsxs("label",{className:"sketch-upload-label",children:[e.jsx("input",{type:"file",accept:"image/*",style:{display:"none"},onChange:s=>{var l;return L((l=s.target.files)==null?void 0:l[0])}}),a?e.jsxs("div",{className:"sketch-upload-preview-wrap",children:[e.jsx("img",{src:a,alt:"room",className:"sketch-preview-img"}),e.jsx("span",{className:"sketch-change-hint",children:c(t,"sketch_change_photo")})]}):e.jsxs("div",{className:"sketch-upload-placeholder",children:[e.jsx("div",{className:"sketch-upload-icon",children:e.jsxs("svg",{width:"36",height:"36",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),e.jsx("polyline",{points:"21 15 16 10 5 21"})]})}),e.jsx("div",{className:"sketch-upload-text",children:c(t,"sketch_upload")}),e.jsx("div",{className:"sketch-upload-hint",children:c(t,"sketch_hint")})]})]}),v&&e.jsx("div",{className:"sketch-error",children:v}),h&&e.jsx("button",{className:"sketch-generate-btn nav-cta",onClick:R,disabled:r,children:r?`${c(t,"sketch_loading")} ${_}%`:c(t,"sketch_btn")})]}),k.length>0&&e.jsxs("div",{className:"sketch-results",children:[e.jsx("h2",{className:"sketch-result-title",children:c(t,"sketch_result_title")}),e.jsx("p",{className:"sketch-result-sub",children:c(t,"sketch_result_sub")}),e.jsx("div",{className:"sketch-grid",children:k.map(s=>e.jsxs("div",{className:"sketch-cell",children:[e.jsx("div",{className:"sketch-cell-label",children:c(t,`sketch_label_${s.key}`)}),e.jsxs("div",{className:"sketch-img-wrap",children:[e.jsx("img",{src:s.url,alt:s.key,className:`sketch-img${r?" loading":""}`,onLoad:U,onError:S,loading:"lazy"}),r&&e.jsx("div",{className:"sketch-img-overlay"})]}),f&&e.jsx("button",{className:"sketch-download-btn",onClick:()=>$(s.url,s.key),children:c(t,"sketch_download")})]},s.key))}),f&&e.jsxs("div",{className:"sketch-cta-block",children:[e.jsx("p",{className:"sketch-cta-text",children:c(t,"sketch_cta_text")}),e.jsx("button",{className:"nav-cta sketch-cta-btn",onClick:()=>u(E("estimate",t)),children:c(t,"sketch_cta_btn")})]})]}),!k.length&&e.jsx("div",{className:"sketch-styles-preview",children:N.map(s=>e.jsx("div",{className:"sketch-style-chip",children:c(t,`sketch_label_${s.key}`)},s.key))})]})}export{z as SketchEffectPage};

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.