System.register(["./vue-legacy-a77002d8.js","./CustomForm.vue_vue_type_style_index_0_lang-legacy-9fd46059.js","./resetbutton.vue_vue_type_style_index_0_lang-legacy-e72cc57a.js","./gptmessage.vue_vue_type_style_index_0_lang-legacy-e945d97f.js","./Task-legacy-da35db10.js","./index-legacy-02a74204.js","./loading2.vue_vue_type_style_index_0_lang-legacy-46f03ae0.js","./tool-legacy-3f4f95f0.js","./form-legacy-2adc72b2.js","./index-legacy-b3c74255.js","./index-legacy-4c8f9698.js","./withInstall-legacy-a4ca9144.js","./useGlobalIcon-legacy-7d8ca2a4.js","./useVModel-legacy-71bf3ab2.js","./index-legacy-e38592e5.js","./dialog-legacy-771f8f43.js","./index-legacy-0aff25a3.js","./v4-legacy-ad483dde.js","./index.vue_vue_type_style_index_0_lang-legacy-19b5295d.js","./ScrollLoad.vue_vue_type_script_setup_true_lang-legacy-a9d41414.js"],(function(l,e){"use strict";var t,s,a,i,n,u,c,o,g,r,_,y,d,v,f,p,m,j,x,h,w,L,k,C,b;return{setters:[l=>{t=l.f,s=l.h,a=l.z,i=l.i,n=l.D,u=l.x,c=l.Q,o=l.E,g=l.k,r=l.w,_=l.A,y=l.n,d=l.o,v=l.V},l=>{f=l._},l=>{p=l._},l=>{m=l._},l=>{l.F,j=l.g,x=l.u,h=l.C},l=>{w=l.a},l=>{L=l._},l=>{k=l.V,C=l.C},l=>{b=l.F},null,null,null,null,null,null,null,null,null,null,null],execute:function(){const e={class:"custom-copywriting-generation-page"},S=["src"],E={class:"interaction-form"},F={class:"confirm-box"},I=o("div",null,"字符余额：0/50000",-1),V=o("div",{class:"cust-line"},null,-1);l("default",t({__name:"index",setup(l){const t=_().query.id,q={tips:new URL("/assets/tips-c132fa27.png",self.location).href},z=s(),A=s(),B=s(""),D=s(!1),G=a({list:[]}),J=a({list:[],localList:[]}),M=async()=>{try{D.value=!0;let l=await j(t,"id");if(0==l.code){A.value=l.data.id,B.value=l.data.example_image;let e=l.data.form;e=b(e).list,G.list=e}D.value=!1,y((()=>{z.value&&C(z.value)}))}catch(l){D.value=!1}},N=()=>{G.list.forEach((l=>{l.lists.forEach((l=>{l.value&&(l.value="")}))}))},O=()=>{let l={};for(let e=0;e<G.list.length;e++){let t=G.list[e];for(let e=0;e<t.lists.length;e++){let s=t.lists[e],a=k(s.rules,s.value);if(a)return void w(a);l[s.name]=s.value}}(async l=>{try{J.list.push({message:""});let e=await x({scenario_id:A.value,messages:[],parameters:l});if(0==e.code){J.localList=e.data,localStorage.setItem(h,JSON.stringify(J.localList));let l=J.localList.filter((l=>"assistant"==l.role));l&&l.length&&(J.list[J.list.length-1].message=l[l.length-1].content)}}catch(e){J.list.pop()}})(l)};return i((async()=>{t?await M():w("禁止访问")})),(l,t)=>(d(),n("div",e,[u(o("div",{class:"custom-copywriting-generation",ref_key:"CopywritingBox",ref:z},[o("img",{class:"tip-box",src:B.value??q.tips,alt:""},null,8,S),o("div",E,[g(f,{formList:G.list},null,8,["formList"]),o("div",F,[I,g(p,{onClick:N,width:"20%"},{default:r((()=>[v("重置")])),_:1}),g(p,{onClick:O,width:"50%",bold:""},{default:r((()=>[v("生成文案")])),_:1})]),V,g(m,{computed:"",list:J.list},null,8,["list"])])],512),[[c,!D.value]]),u(g(L,null,null,512),[[c,D.value]])]))}}))}}}));
