PageSourceSearch

https://zig.tickets/_next/static/chunks/2883-d911cd6e9cac6973.js

js zig.tickets collected 2026-09-28 07:43:29 UTC 16,039 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhost=self.webpackChunkhost||[]).push([[2883],{41014:function(e,s,t){t.d(s,{N:function(){return l}});var r=t(95416),n=t(22823),a=t(56171),i=t(59065);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",s=(0,r.useAuth)(),t=(0,a.useRouter)(),l=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(!s.isAuthChecked)return;if(s.isAuthenticated){l.current=!0;return}let a=l.current,i=t.asPath,o=a?void 0:(0,r.sanitizeInternalPath)(i);if(!a)try{(0,n.setCookie)(r.userCookiesKeys.lastParams,JSON.stringify({lastUserPath:i}),{maxAge:500,path:"/",sameSite:"lax"})}catch(e){}let d="/"===e&&o?"/?next_to=".concat(encodeURIComponent(o)):e;t.push(d)},[s.isAuthenticated,s.isAuthChecked,t,e]),s}},85494:function(e,s,t){t.d(s,{Q:function(){return M},GK:function(){return D}});var r=t(23078),n=t(95416),a=t(71781),i=t(18580),l=t(56171),o=t(45835),d=t(59065),c=t(69393),x=t(96199),u=t(91907),h=t(72872),m=t(28430),f=t(82868),p=t(5582),j=t(71486),k=t(21870);let L={"pt-BR":h.F,"en-US":m.c,"es-ES":f.es};function g(e){var s;let{date:t=null}=e,n=(0,o.useLocale)();if(!t)return null;let a=(0,c.H)(t);if(!(0,x.f)(a))return null;let i=null!==(s=L[n])&&void 0!==s?s:h.F,l=(0,u.GP)(a,"MMM",{locale:i}).replace(".","").toUpperCase();return(0,r.jsxs)("div",{"aria-hidden":!0,className:"flex flex-col items-center justify-center bg-primary-pure rounded-sm p-2x min-w-[44px] min-h-[60px] flex-shrink-0",children:[(0,r.jsx)("span",{className:"font-base font-bold text-md leading-far text-white",children:(0,u.GP)(a,"dd")}),(0,r.jsx)("span",{className:"font-base font-bold text-xxs leading-far text-white",children:l})]})}let y={"pt-BR":h.F,"en-US":m.c,"es-ES":f.es};function N(e){if(!e)return null;let s=e.replace(/(?:Z|[+-]\d{2}:?\d{2})$/,""),t=(0,c.H)("".concat(s,"Z"));return(0,x.f)(t)?t:null}function C(e){let{courtesy:s,onClick:t}=e,a=(0,o.useTranslations)("MyCourtesies"),i=(0,o.useLocale)(),{event:l,redeemed_at:d,created_at:c,status:x,mode:m,order_token:f}=s,L=!!t&&!!f,C=function(e,s){var t;let r=N(e);if(!r)return"";let n=null!==(t=y[s])&&void 0!==t?t:h.F;return(0,u.GP)(r,"en-US"===s?"MMMM d, yyyy 'at' HH:mm":"d 'de' MMMM 'de' yyyy '\xe0s' HH:mm",{locale:n})}(l.start_date,i),v=l.address||l.address_name||"",M="code"===m&&"redeemed"===x&&!!d,w="email"===m&&!!c,b=null,D=null,W=null;M?(b=d,D="redeemedAt",W="redeemedCardAriaLabel"):w&&(b=c,D="receivedAt",W="receivedCardAriaLabel");let S=b?w?function(e,s){if(!e)return null;let t=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})/);if(!t)return null;let[,r,n,a,i,l]=t;return{date:"en-US"===s?"".concat(n,"/").concat(a,"/").concat(r):"".concat(a,"/").concat(n,"/").concat(r),time:"".concat(i,":").concat(l)}}(b,i):function(e,s){let t=N(e);return t?{date:(0,u.GP)(t,"en-US"===s?"MM/dd/yyyy":"dd/MM/yyyy"),time:(0,u.GP)(t,"HH:mm")}:null}(b,i):null,A=S?a("redeemedAtValue",S):"",V=!!(b&&D),E=()=>null==t?void 0:t(s);return(0,r.jsxs)("article",{"data-testid":"courtesy-card","data-status":x,className:"flex flex-col gap-4x bg-white rounded-sm w-full",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3x",children:[(0,r.jsx)(g,{date:l.start_date}),(0,r.jsx)("h3",{className:"flex-1 font-base font-bold text-grey-900 text-sm leading-far line-clamp-2 break-words m-0",children:l.name})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3x",children:[C&&(0,r.jsxs)("div",{className:"flex items-center gap-2x",children:[(0,r.jsx)(p.A,{size:20,className:"text-grey-600 flex-shrink-0","aria-hidden":!0}),(0,r.jsx)("span",{className:"paragraph-sm text-grey-600",children:C})]}),v&&(0,r.jsxs)("div",{className:"flex items-start gap-2x",children:[(0,r.jsx)(j.A,{size:20,className:"text-grey-600 flex-shrink-0 mt-[2px]","aria-hidden":!0}),(0,r.jsx)("span",{className:"paragraph-sm text-grey-600 flex-1 break-words",children:v})]})]}),V&&D&&W&&(0,r.jsx)("div",{className:"border border-grey-200 rounded-md p-4x max-w-full md:max-w-80",...L?{role:"button",tabIndex:0,onClick:E,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),E())},"aria-label":a(W,{date:A})}:{},children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3x",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3x min-w-0",children:[(0,r.jsx)(n.QRCodeIcon,{className:"text-grey-900 flex-shrink-0 text-md","aria-hidden":!0}),(0,r.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,r.jsx)("span",{className:"paragraph-sm text-grey-600 leading-far",children:a(D)}),(0,r.jsx)("span",{className:"font-brand font-demibold text-sm leading-compact text-grey-900 truncate",children:A})]})]}),L&&(0,r.jsx)(k.A,{size:20,className:"text-grey-900 flex-shrink-0","aria-hidden":!0})]})})]})}
1function v(e){let{courtesies:s,hasMore:t,isFetchingNextPage:i,isFetching:l,onLoadMore:c,onCourtesyClick:x}=e,u=(0,o.useTranslations)("MyCourtesies"),h=(0,n.useDeviceType)(),m=(0,d.useRef)(null),f=(0,d.useRef)({isFetching:l,isFetchingNextPage:i});f.current={isFetching:l,isFetchingNextPage:i};let p=(0,d.useRef)(c);return p.current=c,(0,d.useEffect)(()=>{if(!h||!t)return;let e=m.current;if(!e||"undefined"==typeof IntersectionObserver)return;let s=new IntersectionObserver(e=>{let[s]=e,{isFetching:t,isFetchingNextPage:r}=f.current;!s.isIntersecting||t||r||p.current()},{rootMargin:"160px 0px"});return s.observe(e),()=>s.disconnect()},[h,t]),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("ul",{className:"flex flex-col gap-6x list-none p-0 m-0",children:s.map((e,t)=>(0,r.jsx)("li",{className:t<s.length-1?"flex flex-col gap-6x pb-6x border-b border-grey-200":"flex flex-col",children:(0,r.jsx)(C,{courtesy:e,onClick:x})},e.id))}),t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:m,"aria-hidden":!0,className:"lg:hidden h-px w-full"}),(0,r.jsx)("div",{className:"hidden lg:flex justify-center mt-6x",children:(0,r.jsx)(a.Button,{className:"w-full",variant:"primary",isLoading:i,disabled:l||i,onClick:c,children:u("loadMore")})}),h&&i&&(0,r.jsx)("div",{className:"flex justify-center py-4x","aria-live":"polite",children:(0,r.jsx)("span",{className:"paragraph-sm text-grey-600",children:u("loadingMore")})})]})]})}function M(e){let{width:s=180,height:t=180,...n}=e;return(0,r.jsxs)("svg",{width:s,height:t,viewBox:"0 0 180 180",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[(0,r.jsx)("path",{d:"M84.2141 93.8573L97.0712 88.5263L86.3411 83.8178C85.3424 83.3795 84.8431 83.1604 84.3134 83.1566C83.7837 83.1528 83.2813 83.3646 82.2763 83.7884L71.3569 88.393L84.2141 93.8573Z",fill:"#1C70E9",fillOpacity:"0.5",stroke:"#1C70E9",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M99.6748 49.4238V66.2147",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M131.901 106.601C132.548 106.892 133.31 106.603 133.601 105.956C133.892 105.308 133.604 104.547 132.956 104.256L132.428 105.428L131.901 106.601ZM119.571 99.6426L119.044 100.815L131.901 106.601L132.428 105.428L132.956 104.256L120.099 98.4701L119.571 99.6426Z",fill:"#D3D2D9"}),(0,r.jsx)("path",{d:"M81.9725 51.4078L81.9725 45.5956L114.479 31.6396L114.479 43.1557",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M164.841 91.9188L132.337 105.539V63.4708L164.841 49.624V91.9188Z",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M49.4678 45.6192V31.7725L81.9717 45.6192V62.6264",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M132.338 63.446L165 49.7652L132.594 35.4004L99.6748 49.4232L132.338 63.446Z",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M81.9719 45.5954L49.5241 31.7553L81.7155 17.5498L114.635 31.5726L81.9719 45.5954Z",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M111.987 44.1787L144.526 58.3414L144.821 68.6622L153.925 64.9058L153.65 54.5198L120.149 40.7021L111.987 44.1787Z",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M102.323 26.3272L69.7845 40.4899L69.4889 50.8106L60.3851 47.0542L60.6604 36.6683L94.1613 22.8506L102.323 26.3272Z",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M119.733 92.6806L126.59 87.4287C129.371 87.8581 130.824 90.9755 129.364 93.3814L127.509 96.4379C126.908 97.4294 126.59 98.5669 126.59 99.7267V108.479V126.023C126.59 128.138 125.295 130.037 123.327 130.81L88.3165 144.561C87.1288 145.028 85.8101 145.036 84.6166 144.584L58.609 134.745C56.609 133.989 55.2859 132.073 55.2859 129.935V124.68L83.559 136.768C85.4248 137.566 87.5298 137.596 89.418 136.853L114.273 127.066C117.222 125.905 119.159 123.062 119.192 119.892C119.31 108.34 119.733 92.6806 119.733 92.6806Z",fill:"#525059"}),(0,r.jsx)("path",{d:"M70.7144 102.309L59.1429 97.0713V128.559L70.7144 133.714V102.309Z",fill:"#1C70E9",fillOpacity:"0.5"}),(0,r.jsx)("path",{d:"M49.1987 60.9736L49.1987 52.0717",stroke:"#1C70E9",strokeWidth:"2.57143",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M37.8306 71.7383L28.9286 71.7383",stroke:"#1C70E9",strokeWidth:"2.57143",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M39.7593 62.9316L33.4646 56.637",stroke:"#1C70E9",strokeWidth:"2.57143",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M17.272 127.435L40.0743 127.435",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M70.7144 102.857L70.7144 132.429",stroke:"#171719",strokeWidth:"2.57143",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M59.1431 97.7139V127.285",stroke:"#171719",strokeWidth:"2.57143",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M129.148 127.435H136.141",stroke:"#D3D2D9",strokeWidth:"2.57143",strokeLinecap:"round",strokeLinejoin:"round"}
1),(0,r.jsx)("path",{d:"M49.6656 79.0713L84.2143 93.9641V138.857L49.5 123.802L49.5828 101.437L49.6242 92.3391",stroke:"#171719",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M118.929 79.7139L84.2144 94.3599V138.857L118.929 124.45V102.082V96.4899V91.6997",stroke:"#171719",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M84.2142 93.8576L118.929 79.4325L85.5018 64.7325C84.854 64.4476 84.1175 64.4423 83.4657 64.7177L49.5 79.0719L84.2142 93.8576Z",stroke:"#171719",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M73.5677 103.375C74.5924 103.835 75.783 103.574 76.5281 102.734C78.6616 100.327 82.9033 95.539 84.2141 94.0343L49.5804 79.0713C48.7125 79.7261 45.1334 83.0143 42.5698 85.3897C41.2539 86.6089 41.5649 88.7506 43.187 89.5167C51.6116 93.4958 68.21 100.968 73.5677 103.375Z",stroke:"#171719",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M84.8572 94.1864C86.1599 95.6592 90.3574 100.326 92.5034 102.71C93.2688 103.561 94.4909 103.805 95.5207 103.306C100.797 100.752 116.857 92.9754 125.407 88.8144C127.143 87.9693 127.353 85.5881 125.798 84.4433C123.286 82.5945 120.177 80.305 119.382 79.7139",stroke:"#171719",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M84.2144 64.1034C82.2188 63.9756 73.9316 63.6426 73.9316 63.6426L44.5068 76.3729C43.33 76.882 43.5412 78.615 44.8053 78.8299C46.9881 79.201 49.28 79.5989 49.7645 79.714",stroke:"#171719",strokeWidth:"2.57143",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M84.2144 64.1034C86.2099 63.9756 94.4971 63.6426 94.4971 63.6426L123.922 76.3729C125.099 76.882 124.887 78.615 123.623 78.8299C121.441 79.201 119.149 79.5989 118.664 79.714",stroke:"#171719",strokeWidth:"2.57143",strokeLinejoin:"round"})]})}function w(e){let{onOpenRedeem:s}=e,t=(0,o.useTranslations)("MyCourtesies");return(0,r.jsxs)("div",{className:"flex flex-col items-center text-center gap-5 py-6",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-7",children:[(0,r.jsx)(M,{className:"w-[180px] h-[180px]"}),(0,r.jsx)("h3",{className:"heading-xs-heavy text-grey-900",children:t("noCourtesiesTitle")}),(0,r.jsx)("p",{className:"paragraph-md text-grey-700 max-w-[516px]",children:t("noCourtesiesDescription")})]}),(0,r.jsx)(a.Button,{variant:"secondary",className:"h-10 w-full max-w-[180px]",onClick:s,"data-testid":"open-courtesy-redemption-mobile",children:t("redeemCta")})]})}function b(e){let{itemCount:s=3}=e;return(0,r.jsx)("div",{className:"flex flex-col gap-6x","data-testid":"my-courtesies-skeleton",children:Array.from({length:s}).map((e,s)=>(0,r.jsxs)("div",{className:"flex flex-col gap-4x bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3x",children:[(0,r.jsx)(a.Skeleton,{className:"w-11 h-[60px] rounded-sm flex-shrink-0"}),(0,r.jsx)(a.Skeleton,{className:"h-6 flex-1 max-w-[260px] rounded"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3x",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2x",children:[(0,r.jsx)(a.Skeleton,{className:"w-5 h-5 rounded flex-shrink-0"}),(0,r.jsx)(a.Skeleton,{className:"h-4 w-2/5 rounded"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2x",children:[(0,r.jsx)(a.Skeleton,{className:"w-5 h-5 rounded flex-shrink-0"}),(0,r.jsx)(a.Skeleton,{className:"h-4 w-3/5 rounded"})]})]}),(0,r.jsx)("div",{className:"border border-grey-200 rounded-md p-4x max-w-full md:max-w-80",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3x",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3x flex-1 min-w-0",children:[(0,r.jsx)(a.Skeleton,{className:"w-6 h-6 rounded flex-shrink-0"}),(0,r.jsxs)("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[(0,r.jsx)(a.Skeleton,{className:"h-4 w-1/3 rounded"}),(0,r.jsx)(a.Skeleton,{className:"h-5 w-2/3 rounded"})]})]}),(0,r.jsx)(a.Skeleton,{className:"w-5 h-5 rounded flex-shrink-0"})]})})]},s))})}function D(e){let{onOpenRedeem:s,onCourtesyClick:t}=e,c=(0,o.useTranslations)("MyCourtesies"),x=(0,l.useRouter)(),[u,h]=(0,d.useState)(""),[m,f]=(0,d.useState)(""),{courtesies:p,total:j,hasMore:k,loadMore:L,isLoading:g,isFetching:y,isFetchingNextPage:N,isError:C}=(0,n.useMyCourtesies)({perPage:10,searchTerm:m||void 0}),M=!C&&0===p.length,D=()=>{f(u.trim())},W=y&&!N&&!g,S=(0,d.useCallback)(e=>{e.order_token&&x.push("/meus-ingressos/".concat(e.order_token))},[x]),A=!C&&p.length>0,V=!!m;return(0,r.jsxs)("section",{className:"flex flex-col gap-6x","aria-label":c("sectionAriaLabel"),children:[(A||V)&&(0,r.jsxs)("div",{className:"flex flex-col gap-4x",children:[A&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4x",children:[(0,r.jsx)("h2",{className:"font-brand font-demibold text-sm leading-compact text-grey-900 m-0",children:c("courtesiesCount",{count:j<10?"0".concat(j):"".concat(j)})}),(0,r.jsx)(a.Button,{variant:"primary",className:"inline-flex w-full max-w-56 h-10",onClick:s,"data-testid":"open-courtesy-redemption",children:c("redeemCta")})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("div",{className:"relative w-full",children:[(0,r.jsx)(i.A,{size:18,className:"absolute left-3 top-1/2 -translate-y-1/2 text-grey-500 pointer-events-none","aria-hidden":!0}),(0,r.jsx)(a.Input,{value:u,onChange:e=>h(e.target.value),onKeyDown:e=>{"Enter"===e.key&&D()},className:"pl-10",placeholder:c("searchByEventName"),"aria-label":c("searchByEventName"),"data-testid":"my-courtesies-search-input"})]}),(0,r.jsx)(a.Button,{onClick:D,isLoading:W,"data-testid":"my-courtesies-search-button",children:c("searchButton")})]})]}),g&&(0,r.jsx)(b,{}),!g&&C&&(0,r.jsxs)("div",{className:"text-center py-6x",children:[(0,r.jsx)("h3",{className:"heading-xs-heavy text-grey-900",children:c("errorOccurred")}),(0,r.jsx)("p",{className:"paragraph-md text-grey-700",children:c("tryAgainLater")})]}),!g&&!C&&M&&!V&&(0,r.jsx)(w,{onOpenRedeem:s}),!g&&!C&&M&&V&&(0,r.jsx)("div",{className:"text-center py-6x",children:(0,r.jsx)("h3",{className:"heading-xs-heavy text-grey-900",children:c("noCourtesiesFoundAgain")})}),!g&&!C&&p.length>
10&&(0,r.jsx)(v,{courtesies:p,hasMore:k,isFetching:y,isFetchingNextPage:N,onLoadMore:L,onCourtesyClick:null!=t?t:S})]})}}}]);

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.