PageSourceSearch

https://cdn.wisgate.ai/wisgate/_nuxt/DTRnt9im.js

js wisgate.ai collected 2026-10-04 13:25:52 UTC 1,977 bytes, 1 lines download raw bytes

1import{d as b,g as k,H as w,a as u,r as I,v as S,w as P,j as U,o as R,l as a,k as d,n as j,p as B,al as D,aU as M,aW as T,aM as N}from"./DZ7mik94.js";import{I as V}from"./1jvFebBD.js";import{u as A}from"./RJDv4jit.js";const C={class:"h-full overflow-hidden bg-white flex flex-col"},G={class:"flex items-center gap-3 p-4 md:p-6 border-b border-slate-100 flex-shrink-0"},H={class:"text-lg font-semibold text-gray-900"},W={class:"flex-1 overflow-hidden relative"},K=b({name:"StudioImageInspirationPage",__name:"[key]",setup(z){const m=N(),g=D(),l=k(),{triggerUseTemplate:h}=A(),_=w(),y=u(()=>_.isMobile),s=u(()=>String(m.params.key||"")),o=I(null),f=()=>{g.push(y.value?l("/studio/image/inspiration"):l("/studio/image"))},v=e=>{if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}},c=e=>({id:e.id.toString(),key:e.key,title:e.title,prompt:e.prompt,industry:e.industry||"all",type:e.prompt_type,imageUrl:e.head_image||"/images/templates/default.jpg",imageWidth:e.head_image_width,imageHeight:e.head_image_height,description:e.description||e.title,inputResources:v(e.input_resource),author:e.author,sourceUrl:e.source_url}),p=async()=>{if(s.value){o.value=null;try{const t=(await M({p:1,page_size:1e3,types:["text-to-image","image-to-image"].join(","),industry:"all"})).items?.map(n=>c(n))?.find(n=>!!n.key&&n.key===s.value);if(t){o.value=t;return}const r=await T(s.value),i=r?.data||r;i&&i.id&&(o.value=c(i))}catch(e){console.error("Failed to load template:",e)}}};S(()=>{p()}),P(s,()=>{p()});const x=e=>{h.value=e};return(e,t)=>{const r=j;return R(),U("div",C,[a("div",G,[a("button",{onClick:f,class:"w-8 h-8 rounded-lg bg-gray-100 hover:bg-gray-200 flex items-center justify-center text-gray-500 transition-colors cursor-pointer"},[d(r,{name:"lucide:x",class:"text-sm"})]),a("div",null,[a("h1",H,B(e.$t("studio.image.inspiration","Inspiration")),1)])]),a("div",W,[d(V,{template:o.value,onUse:x},null,8,["template"])])])}}});export{K as default};

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.