PageSourceSearch

https://korso.pl/_nuxt/B9_lk2D2.js

js korso.pl collected 2026-09-24 09:59:16 UTC 5,701 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DJw__Pj3.js","./Cw52Jb_b.js","./Dropzone.BkW6QGI3.css","./UserMaterialsMenu.D9k9jAMD.css","./3jVmGx0y.js","./Cm2J8wJT.js","./oPzPbeIq.js","./Dv5-W7ly.js","./entry.xg9melRb.css","./UserPanelInput.D5hLz1bx.css","./9qViMJ07.js","./UserPanelLayout.DyNE8dZ5.css"])))=>i.map(i=>d[i]);
2import{B as e,d as a,a as t,b as s,k as r,_ as i}from"./Cm2J8wJT.js";import n from"./3jVmGx0y.js";import o from"./9qViMJ07.js";import{u as l}from"./uLRyIPMZ.js";import{ah as d,ak as p,O as u,X as c,aj as h,J as m,M as y,$ as f,T as g,L as _,U as b,V as k,S as v,a4 as j}from"./Cw52Jb_b.js";import"./oPzPbeIq.js";import"./Dv5-W7ly.js";e.defaults.headers.common.multiportal="true";const w=a({setup:()=>({store:t(),config:r()}),components:{UserMaterialsMenu:h((()=>i((()=>import("./DJw__Pj3.js")),__vite__mapDeps([0,1,2,3]),import.meta.url))),UserPanelInput:h((()=>i((()=>import("./3jVmGx0y.js")),__vite__mapDeps([4,5,1,2,6,7,8,9]),import.meta.url))),UserPanelLayout:h((()=>i((()=>import("./9qViMJ07.js")),__vite__mapDeps([10,5,1,2,6,7,8,11]),import.meta.url)))},middleware:"auth",asyncData:async()=>({path:s().path}),data:()=>({generateToken:!1,loading:!1,portalId:"",uploadSuccess:!1,uploadError:!1,errors:{},path:"",captchaError:!1,form:{title:{value:"",type:"text",name:"title",condition(){return"string"==typeof this.value&&this.value&&this.value.length>=3},placeholder:"np. Nowa fontanna w parku !",label:"Tytuł materiału",errorMessage:"Tytuł nie może być pusty, i powinien zawierać przynajmniej 3 znaki"},description:{value:"",type:"textarea",name:"description",condition(){return"string"==typeof this.value&&this.value&&this.value.length>10},placeholder:"",label:"Krótki opis",errorMessage:"Opis nie może być pusty, i powinien zawierać przynajmniej 10 znaków"},attachment:{value:null,type:"file",accept:"video/*",name:"attachment",max_size_mb:30,condition(){return this.value},label:"Plik video do udostępnienia",errorMessage:"Proszę dodać jeden plik"}}}),methods:{async setUpRecaptcha(){try{const{generateToken:e}=await l("materials");this.generateToken=e}catch(e){}},validateForm(e=!1){const a={...this.errors};let t=null;if(e)t=this.form[e],t.condition()?delete a[e]:a[e]=t.errorMessage;else for(const s in this.form)t=this.form[s],t.condition()?delete a[s]:a[s]=t.errorMessage;return this.errors=a,0===Object.keys(a).length},async getCaptchaResponse(){try{const a={token:await this.generateToken()},t=await e.post("/api/captcha",JSON.stringify(a,null,2),{headers:{"Content-Type":"application/json"}});return!!t.data.success&&t.data.score}catch(a){}return!1},async handleFormSubmit(){this.validateForm()&&(await this.getCaptchaResponse(),this.handleFileUpload())},async handleFileUpload(){this.loading=!0;try{const e=new FormData;e.append("file",this.form.attachment.value),e.append("userId",this.user.id),e.append("user_id",this.user.user_id),this.request({method:"post",url:"/api/userMaterials/video",headers:{"Content-Type":"multipart/form-data"},data:e},(e=>{200===e.status?this.handleMaterialSend(e.data.url):(this.loading=!1,this.uploadError="Wystąpił nieoczekiwany błąd")}),(e=>{this.loading=!1}))}catch(e){this.uploadError=`Wystąpił nieoczekiwany błąd - ${e.message}`}},async handleMaterialSend(a){try{const t="/api/userMaterials/send",s={sourceFile:a,userId:this.user.id,title:this.form.title.value,description:this.form.description.value,author:this.user.nick||this.user.name||this.user.email},r=await e.post(t,s);r.status>=200&&r.status<400?this.uploadSuccess="Materiał został dodany poprawnie !":this.uploadError="Wystąpił nieoczekiwany błąd"}catch(t){this.uploadError=`Wystąpił nieoczekiwany błąd - ${t.message}`}this.loading=!1}},computed:{user(){return this.store.user},formKeys(){return Object.keys(this.form)}},async mounted(){this.portalId=this.config.public.portalId,this.setUpRecaptcha()}},"$Cab3SGCebU"),z={class:"userMaterials"},M={key:0,class:"alert alert-danger text-center mt-4"},E={class:"alert alert-success text-center mt-4"},x={key:2,class:"userMaterials__form"},S={class:"userMaterials__row"},T={class:"userMaterials__row userMaterials__row--bottom d-flex justify-content-space-between"},C={key:0},U={key:1};const F=d(w,[["render",function(e,a,t,s,r,i){const l=p("UserMaterialsMenu"),d=n,h=o;return m(),u(h,null,{default:c((()=>[y("div",z,[f(l,{path:e.path},null,8,["path"]),a[3]||(a[3]=y("div",{class:"userMaterials__top"},[y("h3",{class:"userMaterials__title"},"Cześć !"),y("div",{class:"userMaterials__desc text-muted"},[g("Jeśli chciałbyś/chciałabyś się czymś z nami podzielić, będzie nam niezmiernie miło !"),y("br"),g(" Wypełnij formularz i wrzuć film do 30s. Nasza redakcja zweryfikuje materiał i jeśli tylko bedziemy mogli, pokażemy go na Stronie głównej naszego portalu")])],-1)),e.uploadError?(m(),_("div",M,b(e.uploadError),1)):k("",!0),e.uploadSuccess?(m(),_(v,{key:1},[y("div",E,b(e.uploadSuccess),1),a[1]||(a[1]=y("div",{class:"text-center mt-3"},[y("a",{href:"/profil/nagraj-nam-temat",class:"btn btn-primary"},"Wróć do listy")],-1))],64)):k("",!0),e.uploadSuccess?k("",!0):(m(),_("div",x,[(m(!0),_(v,null,j(e.formKeys,(a=>(m(),_("div",S,[f(d,{error:e.errors[a],handleChange:e.validateForm,pending:e.loading,field:e.form[a]},null,8,["error","handleChange","pending","field"])])))),256)),y("div",T,[y("span",{class:"btn btn--special btn--flex",onClick:a[0]||(a[0]=a=>e.loading?null:e.handleFormSubmit())},[e.loading?(m(),_("span",U,a[2]||(a[2]=[y("span",{class:"spinner-border text-secondary",role:"status"},[y("span",{class:"visually-hidden"})],-1),y("span",null,"Zapisuje...",-1)]))):(m(),_("span",C,"Zapisz"))])])]))])])),_:1})}]]);export{F 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.