PageSourceSearch

https://boletea.com/build/assets/AvailabilityMapTab-BJfqWXUC.js

js boletea.com collected 2026-09-26 14:16:48 UTC 17,765 bytes, 1 lines download raw bytes

1import{c as vt,r as f,j as t,B as re,b as tt}from"./app-DG-duJO3.js";import{h as st}from"./index.esm-CTAP_y8X.js";import{I as yt}from"./input-BM7URMUM.js";import{L as Nt}from"./label-BrBC1loW.js";import{S as ct,a as dt,b as mt,d as xt,c as b}from"./select-CrcwtBjh.js";import{a as St,b as _t,c as wt,f as kt,e as Ct,d as At}from"./dialog-aAcNuq9h.js";import Dt from"./ShowtimeInteractiveMap-Y5CKglso.js";import{U as pt}from"./users-DJVi2qXn.js";import{L as Et}from"./layers-Cc1J_t4A.js";import{L as Mt}from"./loader-circle-Cblipo52.js";/* empty css            */import"./index-CNNxlWIL.js";import"./index-B4baCGuv.js";import"./index-6FcXV3hH.js";import"./index-DyNrdv_-.js";import"./index-Bon6b9hG.js";import"./index-DeBd2EqX.js";import"./chevron-down-BiE0Nmh3.js";import"./check-BScoEd5o.js";import"./chevron-up-BjqdTCKI.js";import"./index-DLK47JZy.js";import"./index-M_djP0p4.js";import"./SeatingCanvas-DF4iILS8.js";import"./index-xL5CnFxl.js";import"./circle-check-DFBja9G5.js";import"./store-DvIsx1yl.js";import"./lock-NuHlqjXi.js";import"./eye-off-CPX4ssUC.js";import"./circle-x-D7UT3yS2.js";import"./clock-Dd5AyPRB.js";import"./ticket-pyM1NNv6.js";import"./tag-m5YXwfGK.js";import"./sparkles-DL2oE80A.js";function vs(l){const e=vt.c(161),{event:d,showtime:r}=l;let oe;e[0]!==r.seat_inventories?(oe=r.seat_inventories||[],e[0]=r.seat_inventories,e[1]=oe):oe=e[1];const a=oe,ut=a.length;let h;e[2]!==a?(h=a.filter(Bt),e[2]=a,e[3]=h):h=e[3];const ft=h.length;let g;e[4]!==a?(g=a.filter(zt),e[4]=a,e[5]=g):g=e[5];const bt=g.length;let j;e[6]!==a?(j=a.filter(Ut),e[6]=a,e[7]=j):j=e[7];const ht=j.length;let v;e[8]!==a?(v=a.filter(Tt),e[8]=a,e[9]=v):v=e[9];let ne;e[10]!==a.length||e[11]!==h.length||e[12]!==g.length||e[13]!==j.length||e[14]!==v.length?(ne={total:ut,available:ft,sold:bt,reserved:ht,disabled:v.length},e[10]=a.length,e[11]=h.length,e[12]=g.length,e[13]=j.length,e[14]=v.length,e[15]=ne):ne=e[15];const n=ne;let ie;e[16]===Symbol.for("react.memo_cache_sentinel")?(ie=[],e[16]=ie):ie=e[16];const[s,le]=f.useState(ie),[m,lt]=f.useState("status"),[y,gt]=f.useState("available"),[x,jt]=f.useState(""),[o,ce]=f.useState(null),[p,at]=f.useState(0),[u,de]=f.useState(!1);let me;e[17]!==d||e[18]!==y||e[19]!==s||e[20]!==r.id?(me=()=>{s.length!==0&&tt.post(st("admin.local-events.showtimes.seats.status",[d.id,r.id]),{seat_uuids:s,status:y},{preserveScroll:!0,preserveState:!0,onSuccess:()=>le([])})},e[17]=d,e[18]=y,e[19]=s,e[20]=r.id,e[21]=me):me=e[21];const Te=me;let xe;e[22]!==d||e[23]!==x||e[24]!==s||e[25]!==r.id?(xe=()=>{s.length===0||!x||tt.post(st("admin.local-events.showtimes.seats.category",[d.id,r.id]),{seat_uuids:s,category:x},{preserveScroll:!0,preserveState:!0,onSuccess:()=>le([])})},e[22]=d,e[23]=x,e[24]=s,e[25]=r.id,e[26]=xe):xe=e[26];const Ue=xe;let pe;e[27]!==a?(pe=i=>{const c=i.section||i.name||i.title||"Sección General",Le=i.capacity||0,Ye=i.id,Ze=a.filter(et=>Ye&&et.seat_uuid.startsWith(`gen-${Ye}-`)?!0:et.section===c||et.category===c),rt=Ze.filter(Lt).length,ot=Ze.filter(Ft).length,nt=Ze.filter(Vt).length,it=rt+ot+nt;ce({id:Ye,name:c,capacity:Le,soldCount:rt,reservedCount:ot,blockedCount:nt,committedCount:it,minAllowed:it}),at(Le)},e[27]=a,e[28]=pe):pe=e[28];const ze=pe;let ue;
1e[29]!==p||e[30]!==o||e[31]!==d||e[32]!==r.id?(ue=i=>{if(i.preventDefault(),!o)return;const c=parseInt(String(p));isNaN(c)||c<o.minAllowed||(de(!0),tt.post(st("admin.local-events.showtimes.general-capacity.update",[d.id,r.id]),{section_node_id:o.id,capacity:c},{preserveScroll:!0,preserveState:!0,onSuccess:()=>{ce(null),de(!1)},onError:()=>de(!1),onFinish:()=>de(!1)}))},e[29]=p,e[30]=o,e[31]=d,e[32]=r.id,e[33]=ue):ue=e[33];const Be=ue,ae=o!==null&&Number(p)<o.minAllowed;let fe;e[34]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("span",{className:"text-[11px] font-bold text-muted-foreground uppercase tracking-wider",children:"Total"}),e[34]=fe):fe=e[34];let N;e[35]!==n.total?(N=t.jsxs("div",{className:"rounded-lg border px-3 py-2.5 bg-card flex items-center justify-between shadow-xs",children:[fe,t.jsx("span",{className:"text-lg font-black",children:n.total})]}),e[35]=n.total,e[36]=N):N=e[36];let be;e[37]===Symbol.for("react.memo_cache_sentinel")?(be=t.jsx("span",{className:"text-[11px] font-bold text-emerald-700 dark:text-emerald-400 uppercase tracking-wider",children:"Disponibles"}),e[37]=be):be=e[37];let S;e[38]!==n.available?(S=t.jsxs("div",{className:"rounded-lg border px-3 py-2.5 bg-emerald-500/10 border-emerald-500/20 flex items-center justify-between shadow-xs",children:[be,t.jsx("span",{className:"text-lg font-black text-emerald-600 dark:text-emerald-400",children:n.available})]}),e[38]=n.available,e[39]=S):S=e[39];let he;e[40]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx("span",{className:"text-[11px] font-bold text-blue-700 dark:text-blue-400 uppercase tracking-wider",children:"Vendidos"}),e[40]=he):he=e[40];let _;e[41]!==n.sold?(_=t.jsxs("div",{className:"rounded-lg border px-3 py-2.5 bg-blue-500/10 border-blue-500/20 flex items-center justify-between shadow-xs",children:[he,t.jsx("span",{className:"text-lg font-black text-blue-600 dark:text-blue-400",children:n.sold})]}),e[41]=n.sold,e[42]=_):_=e[42];let ge;e[43]===Symbol.for("react.memo_cache_sentinel")?(ge=t.jsx("span",{className:"text-[11px] font-bold text-amber-700 dark:text-amber-400 uppercase tracking-wider",children:"Reservados"}),e[43]=ge):ge=e[43];let w;e[44]!==n.reserved?(w=t.jsxs("div",{className:"rounded-lg border px-3 py-2.5 bg-amber-500/10 border-amber-500/20 flex items-center justify-between shadow-xs",children:[ge,t.jsx("span",{className:"text-lg font-black text-amber-600 dark:text-amber-400",children:n.reserved})]}),e[44]=n.reserved,e[45]=w):w=e[45];let je;e[46]===Symbol.for("react.memo_cache_sentinel")?(je=t.jsx("span",{className:"text-[11px] font-bold text-purple-700 dark:text-purple-400 uppercase tracking-wider",children:"Bloq. / Ocultos"}),e[46]=je):je=e[46];let k;e[47]!==n.disabled?(k=t.jsxs("div",{className:"rounded-lg border px-3 py-2.5 bg-purple-500/10 border-purple-500/20 col-span-2 sm:col-span-1 flex items-center justify-between shadow-xs",children:[je,t.jsx("span",{className:"text-lg font-black text-purple-600 dark:text-purple-400",children:n.disabled})]}),e[47]=n.disabled,e[48]=k):k=e[48];let C;e[49]!==N||e[50]!==S||e[51]!==_||e[52]!==w||e[53]!==k?(C=t.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3",children:[N,S,_,w,k]}),e[49]=N,e[50]=S,e[51]=_,e[52]=w,e[53]=k,e[54]=C):C=e[54];let ve;e[55]===Symbol.for("react.memo_cache_sentinel")?(ve=()=>lt("status"),e[55]=ve):ve=e[55];const Ge=`px-3 py-1 rounded-md text-xs font-bold transition-all ${m==="status"?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"}`;let A;e[56]!==Ge?(A=t.jsx("button",{type:"button",onClick:ve,className:Ge,children:"🔴 Modo Estatus"}),e[56]=Ge,e[57]=A):A=e[57];let ye;e[58]===Symbol.for("react.memo_cache_sentinel")?(ye=()=>lt("category"),e[58]=ye):ye=e[58];const qe=`px-3 py-1 rounded-md text-xs font-bold transition-all ${m==="category"?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"}`;let D;e[59]!==qe?(D=t.jsx("button",{type:"button",onClick:ye,className:qe,children:"🏷️ Modo Categoría"}),e[59]=qe,e[60]=D):D=e[60];let E;e[61]!==A||e[62]!==D?(E=t.jsxs("div",{className:"flex items-center gap-1 p-1 bg-muted rounded-lg shrink-0 border",children:[A,D]}),e[61]=A,e[62]=D,e[63]=E):E=e[63];let M;e[64]!==s.length?(M=t.jsx("div",{className:"text-xs",children:s.length>0?t.jsxs("span",{className:"font-bold text-[#c90000] bg-rose-500/10 px-2 py-1 rounded-md border border-rose-500/20",children:[s.length," asientos seleccionados"]}):t.jsx("span",{className:"text-muted-foreground italic hidden sm:inline",children:"Haz clic o arrastra para seleccionar asientos"})}),e[64]=s.length,e[65]=M):M=e[65];let I;e[66]!==E||e[67]!==M?(I=t.jsxs("div",{className:"flex items-center gap-3",children:[E,M]}),e[66]=E,e[67]=M,e[68]=I):I=e[68];let V;e[69]!==s.length?(V=s.length>0&&t.jsx(re,{variant:"ghost",size:"sm",onClick:()=>le([]),className:"text-xs h-8 px-2.5 text-muted-foreground hover:text-foreground",children:"Limpiar Selección"}),e[69]=s.length,e[70]=V):V=e[70];let F;e[71]!==Ue||e[72]!==Te||e[73]!==m||e[74]!==x||e[75]!==y||e[76]!==s.length||e[77]!==r.prices?(F=m==="status"?t.jsxs(t.Fragment,{children:[t.jsxs(ct,{value:y,onValueChange:gt,children:[t.jsx(dt,{className:"w-48 h-8 text-xs font-medium bg-background",children:t.jsx(mt,{})}),t.jsxs(xt,{children:[t.jsx(b,{value:"available",children:"Disponible (Venta)"}),t.jsx(b,{value:"disabled",children:"Desactivado / No Disponible"}),t.jsx(b,{value:"hidden",children:"Oculto / Invisible"}),t.jsx(b,{value:"hold_courtesy",children:"Bloqueo Cortesía"}),t.jsx(b,{value:"box_office_only",children:"Solo Taquilla"}),t.jsx(b,{value:"web_only",children:"Solo Web"})]})]}),t.jsxs(re,{onClick:Te,disabled:s.length===0,size:"sm",className:"bg-[#c90000] hover:bg-[#a00000] text-white font-bold h-8 px-3.5 text-xs shadow-xs",children:["Aplicar Estatus (",s.length,")"]})]}):t.jsxs(t.Fragment,{children:[t.jsxs(ct,{value:x,onValueChange:jt,children:[t.jsx(dt,{className:"w-48 h-8 text-xs font-medium bg-background",children:t.jsx(mt,{placeholder:"Seleccionar Categoría..."})}),t.jsx(xt,{children:(r.prices||[]).map(It)})]}),t.jsxs(re,{onClick:Ue,disabled:s.length===0||!x,size:"sm",className:"bg-[#c90000] hover:bg-[#a00000] text-white font-bold h-8 px-3.5 text-xs shadow-xs",children:["Aplicar Categoría (",s.length,")"]})]}),e[71]=Ue,e[72]=Te,e[73]=m,e[74]=x,e[75]=y,e[76]=s.length,e[77]=r.prices,e[78]=F):F=e[78];let L;e[79]!==V||e[80]!==F?(L=t.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[V,F]}),e[79]=V,e[80]=F,e[81]=L):L=e[81];let T;e[82]!==I||e[83]!==L?(T=t.jsxs("div",{className:"rounded-xl border p-3 bg-card shadow-xs flex flex-col lg:flex-row lg:items-center justify-between gap-3",children:[I,L]}),e[82]=I,e[83]=L,e[84]=T):T=e[84];let Ne;e[85]===Symbol.for("react.memo_cache_sentinel")?(Ne=i=>{le(c=>c.includes(i)?c.filter(Le=>Le!==i):[...c,i])},e[85]=Ne):Ne=e[85];let U;e[86]!==ze||e[87]!==a||e[88]!==m||e[89]!==s||e[90]!==r?(U=t.jsx(Dt,{showtime:r,inventories:a,selectedSeatUuids:s,mapMode:m,onSetSelectedSeatUuids:le,onToggleSeat:Ne,onEditGeneralCapacity:ze}),e[86]=ze,e[87]=a,e[88]=m,e[89]=s,e[90]=r,e[91]=U):U=e[91];const $e=!!o;let Se;e[92]===Symbol.for("react.memo_cache_sentinel")?(Se=i=>{i||ce(null)},e[92]=Se):Se=e[92];let _e;e[93]===Symbol.for("react.memo_cache_sentinel")?(_e=t.jsx(St,{className:"space-y-1.5 text-left",children:t.jsxs("div",{className:"flex items-center gap-2 text-primary font-bold",children:[t.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-primary/10 text-primary shrink-0",children:t.jsx(pt,{className:"h-5 w-5"})}),t.jsxs("div",{children:[t.jsx(_t,{className:"text-lg font-bold text-foreground",children:"Aforo de Sección General"}),t.jsx(wt,{className:"text-xs text-muted-foreground",children:"Ajusta la capacidad de boletos disponibles para esta zona n
1o numerada."})]})]})}),e[93]=_e):_e=e[93];let we;e[94]===Symbol.for("react.memo_cache_sentinel")?(we=t.jsx(Et,{className:"h-4 w-4 text-slate-500"}),e[94]=we):we=e[94];const Oe=o?.name;let z;e[95]!==Oe?(z=t.jsxs("span",{className:"text-muted-foreground flex items-center gap-1.5",children:[we,Oe]}),e[95]=Oe,e[96]=z):z=e[96];const Re=o?.capacity;let B;e[97]!==Re?(B=t.jsxs("span",{className:"text-foreground",children:["Aforo Actual: ",t.jsx("strong",{className:"text-primary",children:Re})]}),e[97]=Re,e[98]=B):B=e[98];let G;e[99]!==z||e[100]!==B?(G=t.jsxs("div",{className:"flex items-center justify-between font-bold border-b border-border/40 pb-1.5",children:[z,B]}),e[99]=z,e[100]=B,e[101]=G):G=e[101];let ke;e[102]===Symbol.for("react.memo_cache_sentinel")?(ke=t.jsx("span",{className:"text-[10px] uppercase font-bold block text-blue-700 dark:text-blue-400",children:"Vendidos"}),e[102]=ke):ke=e[102];const He=o?.soldCount;let q;e[103]!==He?(q=t.jsxs("div",{className:"bg-blue-500/10 border border-blue-500/20 rounded-lg p-1.5",children:[ke,t.jsx("span",{className:"font-black text-sm text-blue-600 dark:text-blue-400",children:He})]}),e[103]=He,e[104]=q):q=e[104];let Ce;e[105]===Symbol.for("react.memo_cache_sentinel")?(Ce=t.jsx("span",{className:"text-[10px] uppercase font-bold block text-amber-700 dark:text-amber-400",children:"En Reserva"}),e[105]=Ce):Ce=e[105];const We=o?.reservedCount;let $;e[106]!==We?($=t.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/20 rounded-lg p-1.5",children:[Ce,t.jsx("span",{className:"font-black text-sm text-amber-600 dark:text-amber-400",children:We})]}),e[106]=We,e[107]=$):$=e[107];let Ae;e[108]===Symbol.for("react.memo_cache_sentinel")?(Ae=t.jsx("span",{className:"text-[10px] uppercase font-bold block text-purple-700 dark:text-purple-400",children:"Bloqueos"}),e[108]=Ae):Ae=e[108];const Pe=o?.blockedCount;let O;e[109]!==Pe?(O=t.jsxs("div",{className:"bg-purple-500/10 border border-purple-500/20 rounded-lg p-1.5",children:[Ae,t.jsx("span",{className:"font-black text-sm text-purple-600 dark:text-purple-400",children:Pe})]}),e[109]=Pe,e[110]=O):O=e[110];let R;e[111]!==q||e[112]!==$||e[113]!==O?(R=t.jsxs("div",{className:"grid grid-cols-3 gap-2 pt-1 text-center",children:[q,$,O]}),e[111]=q,e[112]=$,e[113]=O,e[114]=R):R=e[114];let De;e[115]===Symbol.for("react.memo_cache_sentinel")?(De=t.jsx("span",{className:"text-muted-foreground",children:"Mínimo Permitido (Comprometido):"}),e[115]=De):De=e[115];const Je=o?.minAllowed;let H;e[116]!==Je?(H=t.jsxs("div",{className:"flex items-center justify-between text-[11px] pt-1.5 border-t border-border/40 font-semibold",children:[De,t.jsxs("span",{className:"font-black text-rose-600 dar
1k:text-rose-400",children:[Je," personas"]})]}),e[116]=Je,e[117]=H):H=e[117];let W;e[118]!==G||e[119]!==R||e[120]!==H?(W=t.jsxs("div",{className:"rounded-xl bg-muted/40 p-3 border border-border/50 space-y-2 text-xs",children:[G,R,H]}),e[118]=G,e[119]=R,e[120]=H,e[121]=W):W=e[121];let Ee;e[122]===Symbol.for("react.memo_cache_sentinel")?(Ee=t.jsx(Nt,{htmlFor:"capacity_input",className:"text-xs font-bold text-foreground",children:"Nueva Capacidad (Aforo Total)"}),e[122]=Ee):Ee=e[122];const Ke=o?.minAllowed||0;let Me;e[123]===Symbol.for("react.memo_cache_sentinel")?(Me=i=>at(i.target.value),e[123]=Me):Me=e[123];const Qe=`h-10 text-sm font-bold pl-9 bg-background focus-visible:ring-primary ${ae?"border-rose-500 focus-visible:ring-rose-500":""}`;let P;e[124]!==p||e[125]!==Ke||e[126]!==Qe?(P=t.jsx(yt,{id:"capacity_input",type:"number",min:Ke,step:"1",autoFocus:!0,value:p,onChange:Me,placeholder:"Ej. 500",className:Qe}),e[124]=p,e[125]=Ke,e[126]=Qe,e[127]=P):P=e[127];let Ie;e[128]===Symbol.for("react.memo_cache_sentinel")?(Ie=t.jsx(pt,{className:"h-4 w-4 absolute left-3 top-3 text-muted-foreground"}),e[128]=Ie):Ie=e[128];let J;e[129]!==P?(J=t.jsxs("div",{className:"relative",children:[P,Ie]}),e[129]=P,e[130]=J):J=e[130];let K;e[131]!==o?.minAllowed||e[132]!==ae?(K=ae?t.jsxs("p",{className:"text-[11px] font-bold text-rose-600 dar
1k:text-rose-400",children:["⚠️ No puedes reducir el aforo a menos de ",o?.minAllowed," personas ya que existen boletos vendidos o en transacción."]}):t.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Al guardar, se actualizará el aforo total disponible para esta sección general."}),e[131]=o?.minAllowed,e[132]=ae,e[133]=K):K=e[133];let Q;e[134]!==J||e[135]!==K?(Q=t.jsxs("div",{className:"space-y-2",children:[Ee,J,K]}),e[134]=J,e[135]=K,e[136]=Q):Q=e[136];let Ve;e[137]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>ce(null),e[137]=Ve):Ve=e[137];let X;e[138]!==u?(X=t.jsx(re,{type:"button",variant:"outline",onClick:Ve,disabled:u,className:"h-9 text-xs font-bold",children:"Cancelar"}),e[138]=u,e[139]=X):X=e[139];const Xe=u||p===""||ae;let Y;e[140]!==u?(Y=u?t.jsxs(t.Fragment,{children:[t.jsx(Mt,{className:"h-3.5 w-3.5 animate-spin"}),t.jsx("span",{children:"Guardando..."})]}):t.jsx("span",{children:"Guardar Capacidad"}),e[140]=u,e[141]=Y):Y=e[141];let Z;e[142]!==Xe||e[143]!==Y?(Z=t.jsx(re,{type:"submit",disabled:Xe,className:"h-9 text-xs font-bold bg-[#c90000] hover:bg-[#a00000] text-white gap-1.5 shadow-xs disabled:opacity-50",children:Y}),e[142]=Xe,e[143]=Y,e[144]=Z):Z=e[144];let ee;e[145]!==X||e[146]!==Z?(ee=t.jsxs(kt,{className:"gap-2 sm:gap-0 pt-3 border-t border-border/40",children:[X,Z]}),e[145]=X,e[146]=Z,e[147]=ee):ee=e[147];let te;e[148]!==Be||e[149]!==W||e[150]!==Q||e[151]!==ee?(te=t.jsxs(Ct,{className:"sm:max-w-md bg-background border-border shadow-2xl rounded-2xl p-6",children:[_e,t.jsxs("form",{onSubmit:Be,className:"space-y-4 pt-2",children:[W,Q,ee]})]}),e[148]=Be,e[149]=W,e[150]=Q,e[151]=ee,e[152]=te):te=e[152];let se;e[153]!==$e||e[154]!==te?(se=t.jsx(At,{open:$e,onOpenChange:Se,children:te}),e[153]=$e,e[154]=te,e[155]=se):se=e[155];let Fe;return e[156]!==C||e[157]!==T||e[158]!==U||e[159]!==se?(Fe=t.jsxs("div",{className:"space-y-4",children:[C,T,U,se]}),e[156]=C,e[157]=T,e[158]=U,e[159]=se,e[160]=Fe):Fe=e[160],Fe}function It(l){return t.jsx(b,{value:l.name,children:t.jsxs("div",{className:"flex items-center gap-2",children:[l.color&&t.jsx("span",{className:"h-2.5 w-2.5 rounded-full border shrink-0",style:{backgroundColor:l.color}}),t.jsx("span",{children:l.name})]})},l.id||l.name)}function Vt(l){return["hold_courtesy","disabled","hidden"].includes(l.status)}function Ft(l){return l.status==="reserved"}function Lt(l){return l.status==="sold"}function Tt(l){return["disabled","hidden","hold_courtesy"].includes(l.status)}function Ut(l){return l.status==="reserved"}function zt(l){return l.status==="sold"}function Bt(l){return l.status==="available"}export{vs 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.