PageSourceSearch

https://dashboard.laburen.com/_next/static/chunks/pages/forms/[formId]/admin-97142a3a82ca18c2.js

js laburen.com collected 2026-10-04 23:01:41 UTC 26,975 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4bce7bcc-6164-45ec-9668-9d132fcbd254",e._sentryDebugIdIdentifier="sentry-dbid-4bce7bcc-6164-45ec-9668-9d132fcbd254")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5808],{94877:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/forms/[formId]/admin",function(){return r(11568)}])},11568:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return eT}});var t=r(97458),i=r(91862),l=r(26806),s=r(66379),o=r(73803),a=r(3425),c=r(68143),d=r(36604),u=r(97181),h=r(51036),x=r(32726),m=r(83810),p=r(48326),f=r(67381),g=r(46442),j=r(97507),Z=r(84272),v=r(91551),b=r.n(v),y=r(24102),w=r(52983),S=r(68739),I=r(21062),C=r(76806),P=r(67326),k=r(35910),z=r(4146),R=r(67976),T=r(61933),N=r(95279),A=r(2266),_=r(43247),D=r(43400),E=r(86293),M=r(57332),L=r(80266),W=r(76902),F=r(43681),q=r(47568),O=r(98960),U=r(59209),H=r(41906),V=r(7829),B=r(33596),G=r(83170),$=r(40211),J=r(2149),Q=r(96062),X=r(34746),Y=function(e){let{id:n}=e,r=(0,Q.ZP)(n?"/api/forms/".concat(n):null,X._i),t=(0,$.Z)("/api/forms/".concat(n,"/admin"),(0,X.wW)(X.I5.PATCH),{}),i=(0,$.Z)("/api/forms/".concat(n),(0,X.wW)(X.I5.DELETE),{onSuccess(e,n,t){r.mutate()}});return{query:r,mutation:t,deleteMutation:i}},K=r(93708),ee=r(82605),en=r(23900);let er=(0,w.memo)(e=>{let{defaultValues:n,onSubmit:r}=e,t=(0,B.Gc)(),i=(0,w.useCallback)((0,ee.Z)(()=>{t.handleSubmit(r)()},1e3),[r,t.handleSubmit]),l=(0,B.qo)({control:t.control,defaultValue:n});return(0,en.Z)(()=>{t.formState.isDirty&&i()},[l,t.formState.isDirty]),null});er.displayName="AutoSave";var et=r(83686),ei=r(69439),el=function(e){var n,r,i;let[l,s]=(0,et.Z)({isLoading:!1}),o=null==e?void 0:e.formId,[a,c]=(0,w.useState)(!1),{query:u,mutation:h,deleteMutation:x}=Y({id:o}),m={name:null==u?void 0:null===(n=u.data)||void 0===n?void 0:n.name,draftConfig:null==u?void 0:null===(r=u.data)||void 0===r?void 0:r.draftConfig,publishedConfig:null==u?void 0:null===(i=u.data)||void 0===i?void 0:i.publishedConfig,...e.defaultValues},p=(0,B.cI)({mode:"onChange",resolver:async(e,n,r)=>await (0,J.F)(K.v7)(e,n,r),defaultValues:m}),f=(0,w.useCallback)(async n=>{try{var r;s({isLoading:!0});let t=await G.ZP.promise(h.trigger({...n}),{loading:"Saving...",success:"Saved",error:"Something went wrong"},{id:"blablaform-update",position:"top-center"});(null==e?void 0:e.refreshQueryAfterMutation)&&u.mutate(),null==e||null===(r=e.onSubmitSucces)||void 0===r||r.call(e,t)}catch(e){console.log("error",e)}finally{s({isLoading:!1})}},[s,h.trigger,u.mutate,null==e?void 0:e.onSubmitSucces]);return((0,w.useEffect)(()=>{(null==u?void 0:u.data)&&!a&&(p.reset({...u.data},{}),c(!0))},[null==u?void 0:u.data,a]),a)?(0,t.jsxs)(B.RV,{...p,children:[(0,t.jsx)(er,{defaultValues:m,onSubmit:f}),(0,t.jsxs)(d.Z,{className:"flex flex-col w-full h-full",...e.formProps,component:"form",onSubmit:p.handleSubmit(f),children:[e.children({query:u,mutation:h,methods:p,deleteMutation:x}),(0,t.jsx)("button",{id:"blablaform-form-submit",type:"submit",hidden:!0,style:{width:0,height:0}})]})]}):(0,t.jsx)(ei.Z,{})},es=r(45602),eo=r(76843),ea=r(54953),ec=r(70084);function ed(e){var n,r;let{formId:i}=e,{mode:l}=(0,R.tv)(),s=(0,B.Gc)(),{query:o,mutation:a}=Y({id:i}),[c,d]=(0,et.Z)({currentAnswer:"",isConversationStarted:!1,isFormCompleted:!1,isPublishable:!1,currentAccordionIndex:1}),h=(0,$.Z)("/api/forms/".concat(i,"/publish"),(0,X.wW)(X.I5.POST)),[m,p]=s.watch(["draftConfig","type"]),f=async()=>{await G.ZP.promise(h.trigger(),{loading:"Publishing...",success:"Published",error:"Something went wrong"},{id:"publish"}),o.mutate()},g="https://dashboard.laburen.com/forms/".concat(null==o?void 0:null===(n=o.data)||void 0===n?void 0:n.id);return!o.data&&o.isLoading?(0,t.jsx)(ei.Z,{}):(0,t.jsx)(T.Z,{sx:{height:"100%",p:0},children:(0,t.jsxs)(u.Z,{direction:"row",gap:3,sx:{height:"100%"},divider:(0,t.jsx)(N.Z,{orientation:"vertical"}),children:[(0,t.jsxs)(u.Z,{sx:{width:"35%",height:"100%",p:2,pr:0,position:"relative"},children:[(0,t.jsxs)(A.Z,{disableDivider:!0,size:"lg",transition:"0.2s ease",sx:{width:"100%",height:"100%",maxHeight:"100%",overflowY:"auto",borderRadius:"lg",transition:"all 0.2s ease"}
1,children:[(0,t.jsxs)(_.Z,{expanded:0===c.currentAccordionIndex,onChange:(e,n)=>{d({currentAccordionIndex:n?0:null})},children:[(0,t.jsx)(D.Z,{children:(0,t.jsx)(x.ZP,{startDecorator:(0,t.jsx)(k.Z,{}),children:"conversational"===p?"Start Screen":"Form Details"})}),(0,t.jsx)(E.Z,{children:(0,t.jsxs)(u.Z,{gap:2,children:[(0,t.jsxs)(M.Z,{children:[(0,t.jsx)(L.Z,{children:"Title"}),(0,t.jsx)(ea.Z,{control:s.control,...s.register("draftConfig.startScreen.title")})]}),(0,t.jsxs)(M.Z,{children:[(0,t.jsx)(L.Z,{children:"Description"}),(0,t.jsx)(W.Z,{minRows:2,maxRows:4,...s.register("draftConfig.startScreen.description")})]}),"conversational"===p&&(0,t.jsxs)(M.Z,{children:[(0,t.jsx)(L.Z,{children:"Call to action"}),(0,t.jsx)(ea.Z,{control:s.control,...s.register("draftConfig.startScreen.cta.label")})]})]})})]}),(0,t.jsxs)(_.Z,{expanded:1===c.currentAccordionIndex,onChange:(e,n)=>{d({currentAccordionIndex:n?1:null})},children:[(0,t.jsx)(D.Z,{children:(0,t.jsx)(x.ZP,{startDecorator:(0,t.jsx)(z.Z,{}),children:"Form Fields"})}),(0,t.jsx)(E.Z,{children:(0,t.jsx)(ec.ZP,{type:p})})]}),(0,t.jsxs)(_.Z,{expanded:2===c.currentAccordionIndex,onChange:(e,n)=>{d({currentAccordionIndex:n?2:null})},children:[(0,t.jsx)(D.Z,{children:(0,t.jsx)(x.ZP,{startDecorator:(0,t.jsx)(C.Z,{}),children:"End Screen"})}),(0,t.jsx)(E.Z,{children:(0,t.jsxs)(u.Z,{gap:2,children:[(0,t.jsxs)(M.Z,{children:[(0,t.jsx)(L.Z,{children:"Message"}),(0,t.jsx)(ea.Z,{control:s.control,...s.register("draftConfig.endScreen.successMessage")})]}),(0,t.jsxs)(M.Z,{children:[(0,t.jsx)(L.Z,{children:"Call to action"}),(0,t.jsx)(ea.Z,{control:s.control,...s.register("draftConfig.endScreen.cta.label")})]}),(0,t.jsxs)(M.Z,{children:[(0,t.jsx)(L.Z,{children:"Call to action URL"}),(0,t.jsx)(ea.Z,{control:s.control,...s.register("draftConfig.endScreen.cta.url")}),(0,t.jsx)(u.Z,{direction:"row-reverse",mt:1,children:(0,t.jsx)(B.Qr,{name:"draftConfig.endScreen.cta.target",render:e=>{let{field:n}=e;return(0,t.jsxs)(F.Z,{defaultValue:"_blank",variant:"outlined",size:"sm",sx:{height:"8px"},...n,onChange:(e,r)=>{n.onChange(r)},children:[(0,t.jsx)(q.Z,{value:"_blank",children:"_blank"}),(0,t.jsx)(q.Z,{value:"_self",children:"_self"})]})}})})]})]})})]}),(0,t.jsxs)(_.Z,{expanded:3===c.currentAccordionIndex,onChange:(e,n)=>{d({currentAccordionIndex:n?3:null})},children:[(0,t.jsx)(D.Z,{children:(0,t.jsx)(x.ZP,{startDecorator:(0,t.jsx)(P.Z,{}),children:"Webhook"})}),(0,t.jsx)(E.Z,{children:(0,t.jsxs)(M.Z,{children:[(0,t.jsx)(L.Z,{children:"Url"}),(0,t.jsx)(ea.Z,{control:s.control,placeholder:"https://example.com/api/webhook",...s.register("draftConfig.webhook.url")}),(0,t.jsx)(O.Z,{children:"Send form submission to the provided endpoint with a HTTP POST request"})]})})]})]}),(0,t.jsx)("div",{className:(0,V.Z)("absolute bottom-0 w-full h-24 pointer-events-none bg-gradient-to-t",{"via-white from-white":"light"===l,"via-black from-black":"dark"===l})}),(0,t.jsx)(U.Z,{startDecorator:(0,t.jsx)(S.Z,{fontSize:"sm"}),onClick:f,loading:h.isMutating||a.isMutating,disabled:a.isMutating||s.formState.isSubmitting||!s.formState.isValid,children:a.isMutating?"Saving...":"Publish Updates"})]}),(0,t.jsx)(u.Z,{sx:{width:"100%",height:"100%"},gap:1,children:(0,t.jsxs)(u.Z,{sx:e=>({borderRadius:e.radius.md,borderColor:e.palette.divider,width:"100%",height:"100%",position:"relative",overflow:"hidden",justifyContent:"center",alignItems:"center"}),children:[!!(null==o?void 0:null===(r=o.data)||void 0===r?void 0:r.publishedConfig)&&(0,t.jsx)(u.Z,{sx:{width:"100%",position:"absolute",top:2,left:2,pt:2,pr:2,zIndex:1},children:(0,t.jsx)(H.Z,{variant:"outlined",size:"sm",startDecorator:(0,t.jsx)(I.Z,{fontSize:"sm",sx:{opacity:.5}}),sx:{borderRadius:"lg",width:"100%",py:.5,px:1},className:"backdrop-blur-lg",children:(0,t.jsx)(x.ZP,{level:"body-sm",endDecorator:(0,t.jsx)(es.Z,{text:g}),children:(0,t.jsx)("a",{href:g,className:"hover:underline",target:"_blank",children:g})})})}),m&&(0,t.jsx)(u.Z,{sx:{width:"100%",maxWidth:"350px",mx:0,my:0,zIndex:0,justifyContent:"center",alignItems:"center",mt:4},children:(0,t.jsx)(eo.Z,{formId:i,config:{fields:null==m?void 0:m.fields,startScreen:null==m?void 0:m.startScreen,endScreen:null==m?void 0:m.endScreen,webhook:null==m?void 0:m.webhook,schema:null==m?void 0:m.schema},isFormSubmitted:2===c.currentAccordionIndex,isInEditor:!0})})]})})]})})}var eu=function(e){let{formId:n}=e;return(0,t.jsx)(el,{formId:n,children:()=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(ed,{formId:n})})})},eh=r(99460),ex=function(e){let{formId:n}=e;return(0,t.jsx)(T.Z,{sx:{mx:"auto"},children:(0,t.jsxs)(A.Z,{size:"lg",children:[(0,t.jsxs)(_.Z,{defaultExpanded:!0,children:[(0,t.jsx)(D.Z,{children:"Web Component"}),(0,t.jsx)(E.Z,{children:(0,t.jsx)(eh.Z,{children:"~~~html\n ".concat("<script type=\"module\">\n  import Form from 'https://cdn.jsdelivr.net/npm/@laburen/embeds@latest/dist/form/index.js';\n\n  Form.initStandard({\n    formId: '".concat(n,'\',\n  });\n</script>\n\n<laburen-form-standard style="width: 100%; height: 650px" />\n')," \n~~~")})})]}),(0,t.jsxs)(_.Z,{children:[(0,t.jsx)(D.Z,{children:"iFrame"}),(0,t.jsx)(E.Z,{children:(0,t.jsx)(eh.Z,{children:"~~~html\n ".concat('<iframe\n  src="https://dashboard.laburen.com/forms/'.concat(n,'"\n  width="100%"\n  height="100%"\n  frameborder="0"\n  allow="clipboard-write"\n></iframe>\n')," \n~~~")})})]})]})})},em=r(75476),ep=r(87010),ef=r(9435),eg=function(e){let{formId:n}=e,r=(0,y.useRouter)();return(0,t.jsx)(el,{formId:n,children:e=>{let{query:n,mutation:i,deleteMutation:l,methods:s}=e;return!n.data&&n.isLoading?(0,t.jsx)(ei.Z,{}):(0,t.jsxs)(u.Z,{sx:{width:"100%",mx:"auto",gap:2},children:[(0,t.jsx)(ef.Z,{title:"General Settings",disableSubmitButton:!0,cardProps:{sx:{width:"100%"}},children:(0,t.jsxs)(M.Z,{children:[(0,t.jsx)(L.Z,{children:"Name"}),(0,t.jsx)(ea.Z,{control:s.control,...s.register("name")}
1)]})}),(0,t.jsx)(ef.Z,{title:"Delete Form",description:"It will delete the form permanently",cardProps:{color:"danger"},submitButtonProps:{onClick:async e=>{e.preventDefault(),e.stopPropagation(),await window.confirm("All submissions will be deleted. Are you sure?")&&(await l.trigger(),r.replace(ep.n8.FORMS))},color:"danger",children:"Delete",startDecorator:(0,t.jsx)(em.Z,{}),loading:l.isMutating},children:(0,t.jsx)(M.Z,{sx:{gap:1},children:(0,t.jsx)(H.Z,{color:"danger",children:"Delete the form and all submissions permanently"})})})]})}})},ej=r(79848),eZ=r(97962),ev=r(31),eb=r(1400),ey=r(9390),ew=r(60706),eS=r(73148),eI=r(74674),eC=r(35404),eP=r(2901),ek=function(e){var n,r;let{formId:i}=e,l=(0,y.useRouter)(),s=Number(l.query.offset||0),[o,a]=(0,et.Z)({hasMore:!1}),c=(0,Q.ZP)(i?"/api/forms/".concat(i):null,X._i),h=(0,Q.ZP)(()=>{let e=new URLSearchParams({offset:"".concat(s),limit:"".concat(25)});return"/api/forms/".concat(i,"/submissions?").concat(e.toString(),"}")},X._i),m=(null==h?void 0:null===(n=h.data)||void 0===n?void 0:n.total)||0,p=(null==h?void 0:null===(r=h.data)||void 0===r?void 0:r.submissions)||[],f=Math.ceil(m/25)||1,g=w.useMemo(()=>(0,eC.Z)(s,f).map(e=>"".concat(e)),[s,f])||[],j=(0,w.useMemo)(()=>{let e=new Set;return(p||[]).forEach(n=>{Object.keys(n.data).forEach(n=>{e.add(n.toLowerCase())})}),[...Array.from(e),"createdAt"]},[null==p?void 0:p.length]);w.useEffect(()=>{l.query.limit="".concat(25),l.query.offset="".concat(s),l.replace(l,void 0,{shallow:!0})},[]);let Z=(null==c?void 0:c.isLoading)||!(null==h?void 0:h.data);return(0,t.jsx)(eb.Z,{loading:Z,variant:"rectangular",sx:{maxHeight:"100%",width:"100%"},children:(0,t.jsxs)(u.Z,{sx:{height:"100%"},gap:1,children:[m>0&&(0,t.jsx)(T.Z,{size:"sm",children:(0,t.jsxs)(u.Z,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)(x.ZP,{children:["Total: ",(0,t.jsx)("strong",{children:m})]}),(0,t.jsx)(U.Z,{disabled:!0,size:"sm",children:"Exportar"})]})}),(null==p?void 0:p.length)<=0&&(0,t.jsx)(T.Z,{children:(0,t.jsxs)(u.Z,{sx:{width:"100%",height:"100%",py:12},alignItems:"center",justifyContent:"center",gap:2,children:[(0,t.jsx)(ev.Z,{fontSize:"xl3"}),(0,t.jsx)(x.ZP,{level:"h3",children:"No hay env\xedos"})]})}),((null==p?void 0:p.length)||0)>0&&(0,t.jsx)(T.Z,{size:"sm",children:(0,t.jsxs)(ey.Z,{"aria-label":"Form Submissions Table",sx:{maxHeight:"100%",overflowY:"auto"},children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:(j||[]).map(e=>(0,t.jsx)("th",{children:e},e))})}),(0,t.jsx)("tbody",{children:null==p?void 0:p.map(e=>(0,t.jsx)("tr",{children:(j||[]).map(n=>{var r,i;let l="",s=[];if("createdAt"===n)l=null==e?void 0:null===(r=e.createdAt)||void 0===r?void 0:r.toString();else{l=null==e?void 0:null===(i=e.data)||void 0===i?void 0:i[n];try{s=JSON.parse(l)}catch(e){}}return(0,t.jsx)("td",{children:(0,t.jsxs)("div",{className:"relative flex items-center space-x-2 overflow-x-auto ".concat(s.length>0?"min-h-[200px]":""),children:[s.length>1&&(0,t.jsxs)(ew.Z,{className:"absolute top-0 right-0",size:"sm",children:[s.length-1," more ","->"]}),s.length>0?s.map((e,n)=>{let r=/\.(mp4|mov|avi|mkv)$/i.test(e),i=/\.(png|jpg|jpeg|gif)$/i.test(e),l=/\.(mp3|wav|ogg)$/i.test(e);return i?(0,t.jsx)(eP.Z,{attachment:{name:"",mimeType:"image/",url:e,size:1}},n):l?(0,t.jsx)(eP.Z,{attachment:{name:"",mimeType:"audio/",url:e,size:1}},n):r?(0,t.jsx)(eP.Z,{attachment:{name:"",mimeType:"video/",url:e,size:1}},n):(0,t.jsx)(eP.Z,{attachment:{name:"file",mimeType:"",url:e,size:1e4}},n)}):l]})},n)})},e.id))})]})}),m>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.Z,{className:"Pagination-mobile",sx:{display:{xs:"flex",md:"none"},alignItems:"center"},children:[(0,t.jsx)(eS.ZP,{"aria-label":"previous page",variant:"outlined",color:"neutral",size:"sm",children:(0,t.jsx)("i",{"data-feather":"arrow-left"})}),(0,t.jsx)(x.ZP,{level:"body-sm",mx:"auto",children:"Pag 1 al 10"}),(0,t.jsx)(eS.ZP,{"aria-label":"next page",variant:"outlined",color:"neutral",size:"sm",children:(0,t.jsx)("i",{"data-feather":"arrow-right"})})]}),(0,t.jsxs)(d.Z,{className:"Pagination-laptopUp",sx:{pt:4,gap:1,["& .".concat(eI.Z.root)]:{borderRadius:"50%"},display:{xs:"none",md:"flex"}},children:[(0,t.jsx)(U.Z,{size:"sm",variant:"plain",color:"neutral",startDecorator:(0,t.jsx)(ej.Z,{}),onClick:()=>{s-1>=0&&(l.query.offset="".concat(s-1),l.replace(l,void 0,{shallow:!0}))},children:"Anterior"}),(0,t.jsx)(d.Z,{sx:{flex:1}}),g.map(e=>(0,t.jsx)(eS.ZP,{size:"sm",variant:Number(e)?"outlined":"plain",color:Number(e)&&Number(e)-1===s?"primary":"neutral",onClick:()=>{let n=Number(e);n&&(l.query.offset="".concat(n-1),l.replace(l,void 0,{shallow:!0}))},children:e},e)),(0,t.jsx)(d.Z,{sx:{flex:1}}),(0,t.jsx)(U.Z,{size:"sm",variant:"plain",color:"neutral",endDecorator:(0,t.jsx)(eZ.Z,{}),onClick:()=>{s+1<f&&(l.query.offset="".concat(s+1),l.replace(l,void 0,{shallow:!0}))},children:"Siguiente"})]})]})]})})},ez=r(46870);function eR(e){var n;let r=(0,y.useRouter)(),v=r.query.formId,{query:S}=Y({id:v}),[I,C]=(0,et.Z)({currentAnswer:"",isConversationStarted:!1,isFormCompleted:!1,isPublishable:!1,currentAccordionIndex:0});(0,w.useEffect)(()=>{r.isReady&&!r.query.tab&&P("editor")},[r.query.tab]);let P=e=>{r.query.tab=e,r.replace(r)};return v?(0,t.jsx)(d.Z,{component:"main",className:"MainContent",sx:e=>({px:{xs:2,md:6},pt:{},pb:{xs:2,sm:2,md:3},flex:1,display:"flex",flexDirection:"column",minWidth:0,height:"100%",width:"100%",gap:1}),children:(0,t.jsxs)(u.Z,{gap:1,sx:{height:"100%",width:"100%"},children:[(0,t.jsxs)(h.Z,{size:"sm","aria-label":"breadcrumbs",separator:(0,t.jsx)(l.Z,{}),sx:{"--Breadcrumbs-gap":"1rem","--Icon-fontSize":"16px",fontWeight:"lg",color:"neutral.400",px:0},children:[(0,t.jsx)(b(),{href:ep.n8.HOME,children:(0,t.jsx)(s.xng,{})}),(0,t.jsx)(b(),{href:ep.n8.FORMS,children:(0,t.jsx)(x.ZP,{fontSize:"inherit",color:"neutral",className:"hover:underline",children:"Forms"})}),(0,t.jsx)(x.ZP,{fontSize:"inherit",color:"primary",children:null==S?void 0:null===(n=S.data)||void 0===n?void 0:n.name})]}),(0,t.jsxs)(m.Z,{"aria-label":"tabs",value:r.query.tab||"editor",size:"md",sx:{bgcolor:"transparent",width:"100%",height:"calc(100% - 37px)"},onChange:(e,n)=>{P(n)},children:[(0,t.jsxs)(p.Z,{size:"sm",sx:{justifyContent:"start",["&& .".concat(f.Z.root)]:{flex:"initial",bgcolor:"transparent","&:hover":{bgcolor:"transparent"},["&.".concat(f.Z.selected)]:{color:"primary.plainColor","&::after":{height:"3px",borderTopLeftRadius:"3px",borderTopRightRadius:"3px",bgcolor:"primary.500"}}}},children:[(0,t.jsxs)(g.Z,{indicatorInset:!0,value:"editor",children:[(0,t.jsx)(j.Z,{children:(0,t.jsx)(i.Z,{})}),"Editor"]}),(0,t.jsxs)(g.Z,{indicatorInset:!0,value:"settings",children:[(0,t.jsx)(j.Z,{children:(0,t.jsx)(a.xnQ,{})}),"Settings"]}),(0,t.jsxs)(g.Z,{indicatorInset:!0,value:"submissions",children:[(0,t.jsx)(j.Z,{children:(0,t.jsx)(c.Z,{})}),"Submissions"]}),(0,t.jsxs)(g.Z,{indicatorInset:!0,value:"install",children:[(0,t.jsx)(j.Z,{children:(0,t.jsx)(o.Z,{sx:{transform:"scale(-1, 1)"}})}),"Install"]})]}),(0,t.jsx)(Z.Z,{value:"preview",children:"Preview"}),(0,t.jsx)(Z.Z,{value:"editor",sx:{height:"100%"},children:(0,t.jsx)(eu,{formId:v})}),(0,t.jsx)(Z.Z,{value:"submissions",children:v&&(0,t.jsx)(ek,{formId:v})}),(0,t.jsx)(Z.Z,{value:"settings",children:v&&(0,t.jsx)(eg,{formId:v})}),(0,t.jsx)(Z.Z,{value:"install",children:v&&(0,t.jsx)(ex,{formId:v})})]})]})}):null}var eT=eR;eR.getLayout=function(e){return(0,t.jsx)(ez.Z,{children:e})}},35404:function(e,n){"use strict";n.Z=function(e,n){let r;let t=e-2,i=e+2+1,l=[],s=[];for(let e=1;e<=n;e++)(1==e||e==n||e>=t&&e<i)&&l.push(e);for(let e of l)r&&(e-r==2?s.push(r+1):e-r!=1&&s.push("...")),s.push(e),r=e;return s}},20316:function(e,n,r){"use strict";r.d(n,{p2:function(){return s},sM:function(){return t}});let t={PUBLIC:"public",PRIVATE:"private"},i="s3ref:secondary:",l="s3ref:primary:";function s(e){let n="primary",r=e;if(e.startsWith(i)?(n="secondary",r=e.slice(i.length)):e.startsWith(l)&&(n="primary",r=e.slice(l.length)),r.startsWith("private/"))return{backend:n,key:r,zone
1:t.PRIVATE};if(r.startsWith("public/"))return{backend:n,key:r,zone:t.PUBLIC};try{let e=new URL(r).pathname.replace(/^\//,"").split("/"),t=["chatsappai-data","laburen-agents"].includes(e[0])?e.slice(1).join("/"):e.join("/");return{backend:n,key:t,zone:"legacy"}}catch(e){return{backend:n,key:r,zone:"legacy"}}}},2901:function(e,n,r){"use strict";r.d(n,{Z:function(){return m}});var t=r(97458),i=r(96933),l=r(36604),s=r(60706),o=r(97181),a=r(32726),c=r(52983),d=r(66376),u=r(49474);function h(e){let{options:n,...r}=e,i=(0,c.useRef)(null);return(0,t.jsx)("img",{...r,ref:e=>{let r=(null===i.current&&(i.current=(0,u.Z)(n)),i.current);e?r.attach(e):r.detach()}})}var x=r(63230),m=function(e){var n,r,u,m;let{attachment:p,conversationId:f}=e,g=null==p?void 0:null===(n=p.mimeType)||void 0===n?void 0:n.startsWith("image/"),j=null==p?void 0:null===(r=p.mimeType)||void 0===r?void 0:r.startsWith("video/"),Z=null==p?void 0:null===(u=p.mimeType)||void 0===u?void 0:u.startsWith("audio/"),v=null==p?void 0:null===(m=p.mimeType)||void 0===m?void 0:m.includes("location"),{url:b}=(0,x.t)(null==p?void 0:p.url,{conversationId:f});return(()=>{try{var e;let n=null==p?void 0:null===(e=p.url)||void 0===e?void 0:e.match(/[?&]q=(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/);return n?{lat:n[1],lng:n[2]}:null}catch(e){return null}})(),(0,t.jsxs)(c.Fragment,{children:[g&&(0,t.jsx)(l.Z,{component:h,src:null!=b?b:void 0,alt:p.name,sx:{borderRadius:"xl",maxWidth:"100%"},options:{background:"#000"}}),v&&(0,t.jsx)(s.Z,{color:"neutral",variant:"soft",onClick:()=>window.open(p.url,"_blank"),size:"lg",startDecorator:(0,t.jsx)(d.Z,{}),sx:{},children:(0,t.jsx)(o.Z,{gap:.5,children:(0,t.jsx)(a.ZP,{children:p.name||"Location"})})}),j&&(0,t.jsx)(l.Z,{controls:!0,component:"video",src:null!=b?b:void 0,sx:{borderRadius:"xl",maxWidth:"100%"}}),Z&&(0,t.jsx)(l.Z,{controls:!0,component:"audio",src:null!=b?b:void 0,sx:{maxWidth:"100%"}}),!g&&!j&&!Z&&!v&&(0,t.jsx)(s.Z,{color:"neutral",variant:"soft",onClick:()=>b&&function(e,n){fetch(e).then(e=>e.blob()).then(e=>{let r=document.createElement("a");r.href=URL.createObjectURL(e),r.download=n,r.click()}).catch(n=>{console.error(n),window.open(e,"_blank")})}(b,p.name),size:"lg",startDecorator:(0,t.jsx)(i.Z,{}),sx:{},children:(0,t.jsxs)(o.Z,{gap:1,direction:"row",sx:{alignItems:"end"},children:[(0,t.jsx)(a.ZP,{children:p.name}),(0,t.jsx)(a.ZP,{level:"body-xs",children:"".concat((p.size/1e5).toFixed(2),"MB")})]})})]})}},45602:function(e,n,r){"use strict";var t=r(97458),i=r(99293),l=r(81385),s=r(73148),o=r(52983);n.Z=function(e){let[n,r]=(0,o.useState)(!1),a=(0,o.useRef)(),c=(0,o.useCallback)(async()=>{try{clearTimeout(a.current),navigator.clipboard.writeText(e.text).then(()=>{r(!0),a.current=setTimeout(()=>{r(!1)},2e3)})}catch(e){}},[e.text]);return(0,t.jsx)(s.ZP,{size:"sm",color:"neutral",variant:"plain",onClick:c,className:e.className,sx:{"&:hover":{backgroundColor:"transparent"}},children:n?(0,t.jsx)(l.Z,{size:16}):(0,t.jsx)(i.Z,{size:16})})}},69439:function(e,n,r){"use strict";var t=r(97458),i=r(97181),l=r(3810);r(52983),n.Z=function(e){let{circularProgressProps:n,rootProps:r}=e;return(0,t.jsx)(i.Z,{sx:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",...null==r?void 0:r.style},...r,children:(0,t.jsx)(l.Z,{size:"sm",...n})})}},99460:function(e,n,r){"use strict";var t=r(97458),i=r(7829),l=r(52983),s=r(69610),o=r(20676),a=r(12538),c=r(72005),d=r(78238),u=r(97181),h=r(45602);n.Z=function(e){let{children:n,className:r,chunkSize:x=3e3,...m}=e,[p,f]=(0,l.useState)(1),g=(0,l.useMemo)(()=>{let e=n||"",r=[],t=0;for(;t<e.length;)r.push(e.slice(t,t+x)),t+=x;return r},[n,x]),j=g.slice(0,p).join(""),Z=()=>{p<g.length&&f(p+1)},v=(0,l.useMemo)(()=>(0,t.jsxs)("div",{children:[(0,t.jsx)(s.UG,{...m,className:(0,i.Z)("prose-sm prose dark:prose-invert","text-sm break-words prose-p:leading-relaxed prose-pre:p-0 prose-code:before:hidden prose-code:after:hidden prose-hr:my-4","max-w-full",r),components:{code(e){var n,r;let{className:l,...s}=e,o=null==l?void 0:null===(n=l.replace)||void 0===n?void 0:n.call(l,"language-",""),a=(null==s?void 0:s.children)||"";return o||(null==s?void 0:s.fromPre)?(0,t.jsxs)(u.Z,{sx:{p:0},children:[(0,t.jsxs)(u.Z,{direction:"row",sx:e=>({alignItems:"center",background:e.colorSchemes.dark.palette.background.level1,justifyContent:"space-evenly"}),children:[(0,t.jsx)("p",{className:"mx-auto",style:{opacity:.5,lineHeight:0},children:o||""}),(0,t.jsx)(h.Z,{text:a,className:"mr-2"})]}),(0,t.jsx)(c.Z,{style:d.pJ,language:o||"bash",PreTag:"div",className:"w-full",showLineNumbers:null!=s&&null!==(r=s.children)&&void 0!==r&&!!r.includes("\n"),useInlineStyles:!0,customStyle:{lineHeight:"1.5",fontSize:"1em",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",marginTop:"0px"},codeTagProps:{style:{lineHeight:"inherit",fontSize:"inherit"}},children:String(s.children).replace(/\n$/,"")})]}):(0,t.jsx)("code",{className:(0,i.Z)(l,"bg-purple-200 dark:bg-purple-900 py-0.5 px-1 rounded-md font-thin"),...s,style:{width:"100%"}})},pre:e=>{let{children:n,...r}=e;return(0,t.jsx)(u.Z,{component:"div",className:"relative overflow-x-hidden",children:(0,t.jsx)("pre",{...r,style:{margin:0},children:l.cloneElement(n,{fromPre:!0})})})},img:e=>(0,t.jsx)("img",{...e,style:{opacity:1,scale:1,transition:"opacity 0.2s, transform 0.2s"}}),a:e=>{let{href:n,children:r}=e;return(0,t.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:r})}},remarkPlugins:[a.Z],rehypePlugins:[o.Z],children:j}),p<g.length&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"16px"},children:(0,t.jsx)("button",{onClick:Z,style:{backgroundColor:"#1f7a1f",color:"white",fontWeight:"bold",padding:"10px 20px",borderRadius:"5px",cursor:"pointer",border:"none",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",marginBottom:"10px"},children:"Mostrar m\xe1s"})})]}),[j,r,p,g.length]);return n?v:null}},94398:function(e,n,r){"use strict";var t=r(97458),i=r(60706),l=r(32726),s=r(36604);r(52983),n.Z=function(e){let{}=e;return(0,t.jsx)("a",{href:"https://laburen.com",target:"_blank",style:{textDecoration:"none",marginLeft:"auto",marginRight:"auto"},children:(0,t.jsx)(i.Z,{variant:"outlined",size:"sm",color:"neutral",children:(0,t.jsx)(s.Z,{className:"truncate",sx:{whiteSpace:"nowrap"},children:(0,t.jsxs)(l.ZP,{level:"body-xs",fontSize:"10px",children:["Powered by"," ",(0,t.jsx)(l.ZP,{level:"body-xs",fontSize:"10px",color:"primary",fontWeight:"bold",children:"⚡️ Laburen.com"})]})})})})}},82537:function(e,n,r){"use strict";var t=r(31791);function i(){let e=(0,t._)(["\n  clip: rect(0 0 0 0);\n  clip-path: inset(50%);\n  height: 1px;\n  overflow: hidden;\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  white-space: nowrap;\n  width: 1px;\n"]);return i=function(){return e},e}let l=(0,r(78751).Z)("input")(i());n.Z=l},23900:function(e,n,r){"use strict";r.d(n,{Z:function(){return a},U:function(){return o}});var t=r(6616),i=r(52983);
1let l=(e,n)=>{let r;if(!(null!=e&&"object"==typeof e&&(!(r=Object.getPrototypeOf(e))||r===Object.prototype||Array.isArray(e))))return e;let t=!Array.isArray(e),[i,s]=t?[{},Object.keys(e)]:[[],e];n.set(e,i);for(let r=0;r<s.length;++r){let o=t?s[r]:r,a=e[o];n.has(a)?i[o]=n.get(a):i[o]=l(a,n)}return i},s=e=>l(e,new WeakMap);function o(e){let n=i.useRef(e),r=i.useRef(0);return(0,t.J)(e,n.current)||(n.current=s(e),r.current+=1),i.useMemo(()=>n.current,[r.current])}var a=function(e,n){return i.useEffect(e,o(n))}},63230:function(e,n,r){"use strict";r.d(n,{t:function(){return l}});var t=r(52983),i=r(20316);function l(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[r,l]=(0,t.useState)({url:null,loading:!1,error:null}),s=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!e){l({url:null,loading:!1,error:null});return}let{zone:r}=(0,i.p2)(e);if(r!==i.sM.PRIVATE){l({url:e,loading:!1,error:null});return}let t=!1,o=async()=>{l(e=>({...e,loading:!0,error:null}));try{let r=new URLSearchParams({key:e});n.conversationId&&r.set("conversationId",n.conversationId);let i=await fetch("".concat("https://dashboard.laburen.com","/api/storage/presigned-read?").concat(r.toString()));if(!i.ok)throw Error("presigned-read: ".concat(i.status));let a=await i.json();if(!t){l({url:a.url,loading:!1,error:null});let e=Math.max((a.expiresIn-60)*1e3,0);s.current=setTimeout(o,e)}}catch(e){t||l({url:null,loading:!1,error:e})}};return o(),()=>{t=!0,s.current&&(clearTimeout(s.current),s.current=null)}},[e,n.conversationId]),r}}},function(e){e.O(0,[256,7626,8266,9981,5287,7230,1551,8099,2149,3799,93,3963,321,2694,11,9500,2950,7033,5978,3037,2607,7596,9832,8915,2508,4919,4373,2888,9774,179],function(){return e(e.s=94877)}),_N_E=e.O()}]);

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.