PageSourceSearch

https://www.proril.com/_nuxt/CRNxQPLI.js

js proril.com collected 2026-10-04 10:57:18 UTC 10,641 bytes, 1 lines download raw bytes

1import{d as re,G as ce,H as ue,w as P,o as de,r as pe,D as w,j as r,g as e,m as p,bF as me,b as f,e as n,t as c,i as s,L as fe,k as v,M as k,c as T,l as _e,h as E,F as ve,f as ye,T as he,y as M}from"./CcTZ-wyU.js";import{_ as be}from"./CL0cWQUM.js";import{_ as xe}from"./Tane9KqF.js";import{_ as Re}from"./sqyHJVeu.js";import{_ as Ue}from"./Dc94oePW.js";import{_ as ge}from"./nnTd2vLs.js";import{_ as we}from"./CujfU3mm.js";import{_ as Ve}from"./GcS5HGvT.js";import{_ as Ce}from"./DQe6Mx-e.js";import{_ as ke}from"./OtLRjWHR.js";import{u as Te}from"./B52bKgGa.js";import{u as Se}from"./bp4vLIcK.js";import"./DOVsuPPt.js";import"./DRKekjQz.js";import"./DOo_97mo.js";import"./bbIK8-0A.js";import"./Ctbd0uQv.js";import"./8xRyFNXC.js";import"./CXKRTNYd.js";import"./az1q7Fco.js";import"./UUWsvcFy.js";const $e={class:"space-y-4"},qe={class:"text-sm text-navy-500 max-w-2xl"},Fe={class:"flex justify-end"},De={class:"flex flex-wrap gap-3"},Ie={class:"border border-navy-100 rounded-lg overflow-x-auto"},Ae={class:"w-full text-sm"},Le={class:"bg-navy-50 text-navy-700 text-left"},Oe={class:"px-4 py-3 font-medium whitespace-nowrap"},Ne={class:"px-4 py-3 font-medium"},Pe={class:"px-4 py-3 font-medium"},Ee={class:"px-4 py-3 font-medium text-right"},Me={key:0},je={colspan:"4",class:"px-4 py-10 text-center text-navy-400"},Be={key:1},He={colspan:"4",class:"px-4 py-8 text-center text-navy-400"},ze={class:"px-4 py-3 text-navy-500 whitespace-nowrap"},Ge={class:"px-4 py-3"},Ye={class:"px-4 py-3 text-navy-900"},Je={class:"px-4 py-3"},Ke={class:"flex items-center justify-end gap-1"},Qe={class:"flex gap-4"},We={class:"flex justify-end gap-2 pt-2"},Xe={class:"text-navy-600 text-sm"},Ze={class:"flex justify-end gap-2 pt-4"},el={class:"text-navy-600 text-sm"},ll={class:"flex justify-end gap-2 pt-4"},wl=re({__name:"index",setup(tl){const{t:l,locale:j}=ce();ue({title:()=>l("portal.technicalResources.seo.title"),robots:"noindex, nofollow"});const S=p([]),b=p(""),h=p("all"),$=p(!0),q=M(()=>[{label:l("portal.technicalResources.filterAllTypes"),value:"all"},{label:l("portal.technicalResources.types.PRODUCT_MANUAL"),value:"PRODUCT_MANUAL"},{label:l("portal.technicalResources.types.TECHNICAL_INSIGHT"),value:"TECHNICAL_INSIGHT"},{label:l("portal.technicalResources.types.SUCCESS_STORY"),value:"SUCCESS_STORY"}]),B=M(()=>q.value.filter(u=>u.value!=="all")),H=u=>new Date(u).toLocaleDateString(j.value,{year:"numeric",month:"2-digit",day:"2-digit"}),x=async()=>{$.value=!0;try{const u=await $fetch("/api/portal/technical-resources",{query:{keyword:b.value||void 0,type:h.value==="all"?void 0:h.value}});S.value=u.data.items}finally{$.value=!1}};P(h,x);let F;P(b,()=>{clearTimeout(F),F=setTimeout(x,300)}),de(x);const R=p(!1),U=p(null),V=p(!1),m=p(!1),d=p("file"),a=pe({type:"PRODUCT_MANUAL",title:"",content:"",date:new Date().toISOString().slice(0,10),queue:void 0,file:null,externalUrl:""}),z=()=>{a.type="PRODUCT_MANUAL",a.title="",a.content="",a.date=new Date().toISOString().slice(0,10),a.queue=void 0,a.file=null,a.externalUrl="",d.value="file"},{capture:D,isDirty:G}=Te(a),{confirmLeaveOpen:Y,requestClose:J,confirmDiscard:K,cancelDiscard:I}=Se(G),Q=()=>{R.value=!1},A=()=>J(Q),W=()=>{U.value=null,z(),R.value=!0,D()},X=async u=>{U.value=u.id,R.value=!0,m.value=!0;try{const i=(await $fetch(`/api/portal/technical-resources/${u.id}`)).data;a.type=i.type,a.title=i.title,a.content=i.content??"",a.date=i.date.slice(0,10),a.queue=i.queue??void 0,a.file=i.file,a.externalUrl=i.externalUrl??"",d.value=i.file?"file":"url"}finally{m.value=!1,D()}},Z=async()=>{V.value=!0;try{const u={type:a.type,title:a.title,content:a.content||null,date:a.date,queue:a.queue??null,fileId:d.value==="file"?a.file?.id??null:null,externalUrl:d.value==="url"&&a.externalUrl||null};U.value?await $fetch(`/api/portal/technical-resources/${U.value}`,{method:"PATCH",body:u}):await $fetch("/api/portal/technical-resources",{method:"POST",body:u}),R.value=!1,await x()}finally{V.value=!1}},y=p(null),C=p(!1),ee=async()=>{if(y.value){C.value=!0;try{await $fetch(`/api/portal/technical-resources/${y.value.id}`,{method:"DELETE"}),y.value=null,await x()}finally{C.value=!1}}};return(u,o)=>{const i=fe,g=be,L=xe,le=_e,te=Re,_=Ue,ae=ge,O=me("URadio"),oe=we,se=Ve,N=Ce,ne=ke;return f(),w(ne,{title:e(l)("portal.technicalResources.title")},{default:r(()=>[n("div",$e,[n("p",qe,c(e(l)("portal.technicalResources.description")),1),n("div",Fe,[s(i,{icon:"i-lucide-plus",onClick:W},{default:r(()=>[v(c(e(l)("portal.technicalResources.create")),1)]),_:1})]),n("div",De,[s(g,{modelValue:e(b),"onUpdate:modelValue":o[0]||(o[0]=t=>k(b)?b.value=t:null),placeholder:e(l)("portal.technicalResources.search"),icon:"i-lucide-search",class:"w-full sm:w-64"},null,8,["modelValue","placeholder"]),s(L,{modelValue:e(h),"onUpdate:modelValue":o[1]||(o[1]=t=>k(h)?h.value=t:null),items:e(q),"value-key":"value",class:"w-full sm:w-48"},null,8,["modelValue","items"])]),n("div",Ie,[n("table",Ae,[n("thead",null,[n("tr",Le,[n("th",Oe,c(e(l)("portal.technicalResources.columns.date")),1),n("th",Ne,c(e(l)("portal.technicalResources.columns.type")),1),n("th",Pe,c(e(l)("portal.technicalResources.columns.title")),1),n("th",Ee,c(e(l)("portal.technicalResources.columns.actions")),1)])]),n("tbody",null,[e($)?(f(),T("tr",Me,[n("td",je,[s(le,{name:"i-lucide-loader-2",class:"size-5 animate-spin"})])])):e(S).length===0?(f(),T("tr",Be,[n("td",He,c(e(l)("portal.technicalResources.empty")),1)])):E("",!0),(f(!0),T(ve,null,ye(e(S),t=>(f(),T("tr",{key:t.id,class:"border-t border-navy-100"},[n("td",ze,c(H(t.date)),1),n("td",Ge,[s(te,{color:"neutral",variant:"subtle"},{default:r(()=>[v(c(e(l)(`portal.technicalResources.types.${t.type}`)),1)]),_:2}
1,1024)]),n("td",Ye,c(t.title),1),n("td",Je,[n("div",Ke,[t.file?(f(),w(i,{key:0,icon:"i-lucide-download",color:"neutral",variant:"ghost",size:"sm","aria-label":e(l)("portal.technicalResources.actions.download"),to:`/api/portal/technical-resources/${t.id}/download`,target:"_blank"},null,8,["aria-label","to"])):t.externalUrl?(f(),w(i,{key:1,icon:"i-lucide-external-link",color:"neutral",variant:"ghost",size:"sm","aria-label":e(l)("portal.technicalResources.actions.download"),to:t.externalUrl,target:"_blank"},null,8,["aria-label","to"])):E("",!0),s(i,{icon:"i-lucide-pencil",color:"neutral",variant:"ghost",size:"sm","aria-label":e(l)("portal.technicalResources.actions.edit"),onClick:ie=>X(t)},null,8,["aria-label","onClick"]),s(i,{icon:"i-lucide-trash-2",color:"error",variant:"ghost",size:"sm","aria-label":e(l)("portal.technicalResources.actions.delete"),onClick:ie=>y.value=t},null,8,["aria-label","onClick"])])])]))),128))])])]),s(se,{open:e(R),"onUpdate:open":o[11]||(o[11]=t=>{t||A()}),title:e(U)?e(l)("portal.technicalResources.actions.edit"):e(l)("portal.technicalResources.create")},{body:r(()=>[n("form",{class:"space-y-4",onSubmit:he(Z,["prevent"])},[s(_,{label:e(l)("portal.technicalResources.form.type"),required:""},{default:r(()=>[s(L,{modelValue:e(a).type,"onUpdate:modelValue":o[2]||(o[2]=t=>e(a).type=t),items:e(B),"value-key":"value",class:"w-full",disabled:e(m)},null,8,["modelValue","items","disabled"])]),_:1},8,["label"]),s(_,{label:e(l)("portal.technicalResources.form.title"),required:""},{default:r(()=>[s(g,{modelValue:e(a).title,"onUpdate:modelValue":o[3]||(o[3]=t=>e(a).title=t),class:"w-full",disabled:e(m),required:""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),s(_,{label:e(l)("portal.technicalResources.form.content")},{default:r(()=>[s(ae,{modelValue:e(a).content,"onUpdate:modelValue":o[4]||(o[4]=t=>e(a).content=t),class:"w-full",rows:3,disabled:e(m)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),s(_,{label:e(l)("portal.technicalResources.form.date"),required:""},{default:r(()=>[s(g,{modelValue:e(a).date,"onUpdate:modelValue":o[5]||(o[5]=t=>e(a).date=t),type:"date",class:"w-full",disabled:e(m),required:""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),s(_,{label:e(l)("portal.technicalResources.form.linkType")},{default:r(()=>[n("div",Qe,[s(O,{modelValue:e(d),"onUpdate:modelValue":o[6]||(o[6]=t=>k(d)?d.value=t:null),value:"file",label:e(l)("portal.technicalResources.linkTypeFile")},null,8,["modelValue","label"]),s(O,{modelValue:e(d),"onUpdate:modelValue":o[7]||(o[7]=t=>k(d)?d.value=t:null),value:"url",label:e(l)("portal.technicalResources.linkTypeUrl")},null,8,["modelValue","label"])])]),_:1},8,["label"]),e(d)==="file"?(f(),w(_,{key:0,label:e(l)("portal.technicalResources.form.file")},{default:r(()=>[s(oe,{modelValue:e(a).file,"onUpdate:modelValue":o[8]||(o[8]=t=>e(a).file=t),visibility:"PRIVATE"},null,8,["modelValue"])]),_:1},8,["label"])):(f(),w(_,{key:1,label:e(l)("portal.technicalResources.form.externalUrl")},{default:r(()=>[s(g,{modelValue:e(a).externalUrl,"onUpdate:modelValue":o[9]||(o[9]=t=>e(a).externalUrl=t),type:"url",placeholder:"https://",class:"w-full",disabled:e(m)},null,8,["modelValue","disabled"])]),_:1},8,["label"])),s(_,{label:e(l)("portal.technicalResources.form.queue")},{default:r(()=>[s(g,{modelValue:e(a).queue,"onUpdate:modelValue":o[10]||(o[10]=t=>e(a).queue=t),modelModifiers:{number:!0},type:"number",class:"w-full",disabled:e(m)},null,8,["modelValue","disabled"])]),_:1},8,["label"]),n("div",We,[s(i,{color:"neutral",variant:"ghost",disabled:e(V),onClick:A},{default:r(()=>[v(c(e(l)("portal.technicalResources.actions.cancel")),1)]),_:1},8,["disabled"]),s(i,{type:"submit",loading:e(V),disabled:e(m)},{default:r(()=>[v(c(e(l)("portal.technicalResources.actions.save")),1)]),_:1},8,["loading","disabled"])])],32)]),_:1},8,["open","title"]),s(N,{open:!!e(y),title:e(l)("portal.technicalResources.actions.delete"),"onUpdate:open":o[13]||(o[13]=t=>{t||(y.value=null)})},{body:r(()=>[n("p",Xe,c(e(l)("portal.technicalResources.deleteConfirm")),1),n("div",Ze,[s(i,{color:"neutral",variant:"ghost",disabled:e(C),onClick:o[12]||(o[12]=t=>y.value=null)},{default:r(()=>[v(c(e(l)("portal.technicalResources.actions.cancel")),1)]),_:1},8,["disabled"]),s(i,{color:"error",loading:e(C),onClick:ee},{default:r(()=>[v(c(e(l)("portal.technicalResources.actions.delete")),1)]),_:1},8,["loading"])])]),_:1},8,["open","title"]),s(N,{open:e(Y),title:e(l)("portal.common.unsavedChanges.title"),"onUpdate:open":o[14]||(o[14]=t=>{t||e(I)()})},{body:r(()=>[n("p",el,c(e(l)("portal.common.unsavedChanges.message")),1),n("div",ll,[s(i,{color:"neutral",variant:"ghost",onClick:e(I)},{default:r(()=>
1[v(c(e(l)("portal.common.unsavedChanges.stay")),1)]),_:1},8,["onClick"]),s(i,{color:"error",onClick:e(K)},{default:r(()=>[v(c(e(l)("portal.common.unsavedChanges.leave")),1)]),_:1},8,["onClick"])])]),_:1},8,["open","title"])])]),_:1},8,["title"])}}});export{wl 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.