PageSourceSearch

https://billetterie.theatrelenormandy.com/_next/static/chunks/6235-1944a5f5b9312323.js

js theatrelenormandy.com collected 2026-10-06 14:01:56 UTC 24,401 bytes, 1 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="bc40d2e8-694b-409d-9a19-24708dcbc009",t._sentryDebugIdIdentifier="sentry-dbid-bc40d2e8-694b-409d-9a19-24708dcbc009")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6235],{56479:function(t,e,i){"use strict";function fetchOrder(t,e,i){let n={};return i&&(n.downloadId=i),i=>i.getRepository("order").find(t,e,n)}function fetchOrderWithPayId(t,e,i){let n={payId:i};return i=>i.getRepository("order").find(t,e,n)}function fetchOrderWithDownloadIdFallback(t,e,i,n){return r=>i?fetchOrder(t,e,i)(r):fetchOrderWithPayId(t,e,null!=n?n:"")(r)}i.d(e,{G7:function(){return fetchOrder},Iz:function(){return fetchOrderWithPayId},jK:function(){return fetchOrderWithDownloadIdFallback}})},89749:function(t,e,i){"use strict";var n=i(67862),r=i(52322),a=i(2784),l=i(5632),c=i(11122),o=i(82731),s=i(73234),d=i(92472),u=i(85746),m=i(58849),f=i(67909);function _templateObject(){let t=(0,n._)(["\n  min-height: 300px;\n  display: flex;\n  flex: 1;\n  align-items: center;\n  gap: 30px;\n  padding: 30px 20px;\n"]);return _templateObject=function(){return t},t}function _templateObject1(){let t=(0,n._)(["\n  display: flex;\n  justify-content: center;\n  width: 50%;\n\n  img {\n    max-height: 45vh;\n\n    @media only screen and (max-width: ",") {\n      width: 180px;\n    }\n  }\n\n  &.img-container {\n    &--big {\n      @media only screen and (max-width: ",") {\n        display: none;\n      }\n    }\n\n    &--small {\n      @media only screen and (min-width: ",") {\n        display: none;\n      }\n    }\n  }\n"]);return _templateObject1=function(){return t},t}function _templateObject2(){let t=(0,n._)(["\n  display: flex;\n  max-width: 500px;\n  flex-direction: column;\n  justify-content: center;\n  gap: 30px;\n\n  a {\n    width: fit-content;\n  }\n\n  @media only screen and (max-width: ",") {\n    text-align: center;
1\n    align-items: center;\n    max-width: none;\n    gap: 10px;\n  }\n"]);return _templateObject2=function(){return t},t}let p=o.ZP.div.withConfig({componentId:"sc-9e8a96b5-0"})(_templateObject()),g=o.ZP.div.withConfig({componentId:"sc-9e8a96b5-1"})(_templateObject1(),u.GX,u.GX,u.CL),h=o.ZP.div.withConfig({componentId:"sc-9e8a96b5-2"})(_templateObject2(),u.GX);e.Z=function(t){let{order:e,isCart:i=!1,carpoolSlug:n}=t,{t:o}=(0,c.$G)(),u=(0,f.Z)(),v=(0,l.useRouter)(),[y,x]=(0,a.useState)(null),b=(null==e?void 0:e.ticketList)||null;(0,m.a$Y)(b);let j=b||y||null,w=function(t){var e;if(!t||0===t.size)return null;let i=null===(e=t.first())||void 0===e?void 0:e.getIn(["ticketPrice","eventDate","ticketing","@id"]);return(0,m.oLH)(i),i}(j),O=function(t,e){if(!t||0===t.size)return!1;let i=!!e&&t.every(t=>t.getIn(["ticketPrice","eventDate","ticketing","@id"])===e);return i}(j,w),C="https://app.covoiturage-simple.com/".concat(n),_=w&&O?"".concat(C,"?externaluid=").concat((0,d.bH)(w)):C;(0,a.useEffect)(()=>{if(i&&u){let getCart=async()=>{try{(0,m.oLH)(v.query.id);let t=await u.getRepository("cart").find(v.query.id,k),e=t.get("cartItemList")||null;(0,m.a$Y)(e),x(e)}catch(t){console.error("Error while fetching cart",t)}};getCart()}},[i,v.query.id,u]);let L=(0,r.jsx)("img",{src:(0,s.Q)("2024/2/22/65d781cfced67-covoit.png",600),loading:"lazy",alt:"",width:"auto"});return(0,r.jsxs)(p,{children:[(0,r.jsx)(g,{className:"img-container--big",children:L}),(0,r.jsxs)(h,{children:[(0,r.jsx)("h2",{children:o("carpool.title")}),(0,r.jsx)(g,{className:"img-container--small",children:L}),(0,r.jsx)("div",{children:o("carpool.description")}),(0,r.jsx)("a",{className:"mpd-btn mpd-btn--secondary",href:_,target:"_blank",rel:"noreferrer",children:o("carpool.cta")})]})]})};let k=["@id",{cartItemList:[{ticketPrice:[{eventDate:[{ticketing:["@id"]}]}]}]}]},7149:function(t,e,i){"use strict";i.d(e,{G:function(){return l},h:function(){return a}});var n=i(67862),r=i(82731);function _templateObject(){let t=(0,n._)(["\n  background: #3bb593;\n  min-height: 240px;\n  max-height: inherit;\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  justify-content: center;\n  text-align: center;\n  padding: 30px 20px;\n  color: white;\n\n  &:has(+ div) {\n    max-height: 260px;\n  }\n"]);return _templateObject=function(){return t},t}function _templateObject1(){let t=(0,n._)(["\n  color: white !important;\n  margin-bottom: 7px;\n"]);return _templateObject1=function(){return t},t}let a=r.ZP.div.withConfig({componentId:"sc-f70ea445-0"})(_templateObject()),l=r.ZP.h2.withConfig({componentId:"sc-f70ea445-1"})(_templateObject1())},11224:function(t,e,i){"use strict";i.d(e,{Z:function(){return forms_CustomizeTickets}});var n=i(67862),r=i(52322),a=i(2784),l=i(12524),c=i.n(l),o=i(27623),s=i(11122),d=i(82731),u=i(39737),m=i(58849),f=i(70526),p=i(86348),g=i(38524),h=i(73234),k=i(92472),v=i(85746);function _templateObject(){let t=(0,n._)(["\n  margin: 0 15rem;\n\n  @media screen and (max-width: ",") {\n    margin: 0;\n  }\n"]);return _templateObject=function(){return t},t}function _templateObject1(){let t=(0,n._)(["\n  margin: 10px 0;\n  padding: 10px 30px;\n\n  .form {\n    margin-top: 20px;\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: end;\n\n    > div {\n      flex: 1;\n      width: 100%;\n      max-width: 550px;\n    }\n  }\n"]);return _templateObject1=function(){return t},t}function _templateObject2(){let t=(0,n._)(["\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  min-height: 55px;\n  border-bottom: 1px solid ",";\n  padding-bottom: 10px;\n  margin-bottom: 10px;\n\n  .h3-like {\n    margin: 0;\n  }\n"]);return _templateObject2=function(){return t},t}function _templateObject3(){let t=(0,n._)(["\n  background-color: black;\n  width: fit-content;\n  padding: 1px 4px;\n  text-transform: uppercase;\n  color: white;\n"]);return _templateObject3=function(){return t},t}let y=d.ZP.div.withConfig({componentId:"sc-c8b8dc57-0"})(_templateObject(),v.eE),x=(0,d.ZP)(u.aJ).withConfig({componentId:"sc-c8b8dc57-1"}
1)(_templateObject1()),b=d.ZP.div.withConfig({componentId:"sc-c8b8dc57-2"})(_templateObject2(),v.Yt),j=d.ZP.div.withConfig({componentId:"sc-c8b8dc57-3"})(_templateObject3());var w=i(54764),O=i.n(w),C=i(67085),_=i(52329),L=i(2317);i(71613),C.Nf.setMoment(O());var forms_TicketForm=function(t){var e,i,n;let{ticket:l,onChangeField:c}=t,o=(0,a.useRef)(),s=(0,L.d)(),{countryOptionArray:d}=(0,_.s)(),u=l.get("@id"),f=null!==(i=l.ticketPrice)&&void 0!==i?i:null,p=null!==(n=l.isCustomized)&&void 0!==n&&n,g=p?l.participant:null;(0,m.Glu)(g,"participant"),(0,m.ilD)(f,"ticketPrice"),(0,m.oLH)(u,"ticketId");let h=p?null===(e=l.participantFormData)||void 0===e?void 0:e.toJS():{},[v,y]=(0,a.useState)(h),[w,O]=(0,a.useState)(null==g?void 0:g.get("firstname")),[D,T]=(0,a.useState)(null==g?void 0:g.get("lastname")),I=(0,k.rd)(D,w),F=l.getFormParticipantFields(!1,!1,null!=d?d:[]).map(t=>({...t,id:"".concat(t.slug,"_").concat(l.getShortId())}));return(0,r.jsxs)(x,{children:[(0,r.jsxs)(b,{children:[(0,r.jsxs)("div",{children:[I&&(0,r.jsx)(j,{className:"mb1",children:I}),(0,r.jsx)("div",{children:f.name})]}),(0,r.jsx)("div",{className:"h3-like",children:(0,k.T4)(f.facialValue||0,f.currency)})]}),s&&!!l.getFormParticipantFields().length&&(0,r.jsx)("form",{children:(0,r.jsx)(C.ZP,{className:"form",ref:o,labelPosition:"top",validateOnChange:!0,fieldList:F,fieldValues:v,onChangeField:(t,e)=>{y(i=>({...i,[t]:e}));let i=t==="".concat(m.XgW.CONTACT,"firstname"),n=t==="".concat(m.XgW.CONTACT,"lastname");"string"==typeof e&&(i||n)&&(i&&O(e.trim()),n&&T(e.trim())),c({fieldName:t,value:e,formRef:o,ticketId:u})}})})]},l.get("@id"))},forms_EventDateFormList=function(t){var e,i,n;let{participantForm:a,onChangeField:l}=t,{t:c}=(0,s.$G)(),{eventDate:o,ticketList:d}=a;(0,m.DH1)(o),(0,m.ilD)(o.ticketing,"eventDate.ticketing"),(0,m.oLH)(o.ticketing.title,"eventDate.ticketing.title"),(0,m.Glu)(o.ticketing.venue);let f=null===(e=o.ticketing.getMainImageMedia())||void 0===e?void 0:e.get("path"),p=f?(0,h.Q)(f,120,120):void 0,[g,v]=d.partition(t=>!!t.getFormParticipantFields().length);return v.size?(0,r.jsxs)(y,{children:[(0,r.jsx)(u.jh,{title:o.ticketing.title,imageUrl:p,formattedDateAndEndDate:(0,r.jsx)(k.Rk,{startDate:o.startDate,endDate:o.endDate,format:k.$3.LONG_WITH_YEAR}),id:Number(o.getShortId()),ticketCountTrans:c(g.size?"event_date.form_list.tickets":"ticket",{count:v.size}),actionBtnBlock:null,seatingName:null!==(n=null===(i=o.ticketing.venue)||void 0===i?void 0:i.seatingName)&&void 0!==n?n:null}),v.map(t=>(0,r.jsx)(forms_TicketForm,{ticket:t,onChangeField:e=>{var i;return l({...e,formData:null===(i=t.participantFormData)||void 0===i?void 0:i.toJS()})}},t.get("@id")))]}):null};function OfferTicketListModal_templateObject(){let t=(0,n._)(["\n  display: inline-block;\n  padding: 1px 4px;\n  color: white;\n  text-transform: uppercase;\n  background-color: black;\n"]);return OfferTicketListModal_templateObject=function(){return t},t}let D=d.ZP.div.withConfig({componentId:"sc-3684fd2-0"})(OfferTicketListModal_templateObject());var forms_OfferTicketListModal=function(t){let{ticketList:e,onClose:i}=t,{t:n}=(0,s.$G)();return(0,r.jsx)(u.eV,{onCancel:i,title:n("offer_header.ticket_list_modal.title"),children:(0,r.jsx)(r.Fragment,{children:e.map((t,e)=>(0,r.jsxs)(u.aJ,{className:"mb3 p2",children:[(0,r.jsx)(D,{children:n("tickets.line.index_nb",{index:e+1})}),(0,r.jsx)("div",{className:"h3-like mt1",children:t.ticketingTitle}),(0,r.jsx)("div",{children:t.ticketPriceName})]},t.get("@id")))})})},forms_OfferHeader=function(t){let{offerRule:e,ticketList:i}=t,{t:n}=(0,s.$G)(),[l,c]=(0,a.useState)(!1),{image:o,title:d}=e,f=o?(0,h.Q)(o,120,120):void 0,p=i.size;return(0,m.oLH)(d),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.jh,{title:d,imageUrl:f,formattedDateAndEndDate:null,id:Number(e.getShortId()),ticketCountTrans:n("ticket",{count:p}),actionBtnBlock:p?(0,r.jsx)("button",{type:"button",className:"mpd-btn",onClick:()=>c(!0),children:n("offer_header.ticket_list_modal.title")}):null}),l&&(0,r.jsx)(forms_OfferTicketListModal,{onClose:()=>c(!1),ticketList:i})]})};C.Nf.setMoment(O());var forms_ParticipantForm=function(t){var e;
1let{participantFields:i,participantFormData:n,ticketList:l,onChangeField:c}=t,o=(0,a.useRef)(),s=(0,L.d)(),d=l.first();(0,m.ilD)(d),(0,m.ilD)(d.orderItem);let u=null!==(e=d.get("isCustomized"))&&void 0!==e&&e,f=u?d.participant:null,p=d.orderItem.applicationId;(0,m.Glu)(f);let[g,h]=(0,a.useState)(u?n:{}),[v,y]=(0,a.useState)(null==f?void 0:f.get("firstname")),[w,O]=(0,a.useState)(null==f?void 0:f.get("lastname")),_=(0,k.rd)(w,v),D=l.map(t=>{let{ticketPrice:e}=t;return(0,m.ilD)(e,"ticketPrice"),e.name}).toSet(),T=l.map(t=>{let{ticketPrice:e}=t;return(0,m.ilD)(e,"ticketPrice"),(0,k.T4)(e.facialValue||0,e.currency)}).toSet(),I=i.map(t=>({...t,id:"".concat(t.slug,"_").concat(d.getShortId())}));return(0,r.jsxs)(x,{children:[(0,r.jsxs)(b,{children:[(0,r.jsxs)("div",{children:[_&&(0,r.jsx)(j,{className:"mb1",children:_}),(0,r.jsx)("div",{children:D.map(t=>(0,r.jsx)("div",{children:t},t))})]}),(0,r.jsx)("div",{children:T.map(t=>(0,r.jsx)("div",{className:"h3-like",children:t},t))})]}),s&&(0,r.jsx)(C.ZP,{className:"form",ref:o,labelPosition:"top",validateOnChange:!0,fieldList:I,fieldValues:g,onChangeField:(t,e)=>{h(i=>({...i,[t]:e}));let i=t==="".concat(m.XgW.CONTACT,"firstname"),n=t==="".concat(m.XgW.CONTACT,"lastname");"string"==typeof e&&(i||n)&&(i&&y(e.trim()),n&&O(e.trim())),c({fieldName:t,value:e,formRef:o,applicationId:p})}})]},d.get("@id"))},forms_OfferRuleFormList=function(t){var e;let{participantForm:i,onChangeField:n}=t,{offerRule:a,ticketList:l}=i,{countryOptionArray:c}=(0,_.s)();(0,m.DH1)(a);let s=l.reduce((t,e)=>t.concat(e.getFormParticipantFields(!1,!1,null!=c?c:[])),[]).filter((t,e,i)=>e===i.findIndex(e=>e.slug===t.slug)),d=null===(e=l.reduce((t,e)=>{let i=e.get("participantFormData");return i?t.merge(i):t},(0,o.Map)()))||void 0===e?void 0:e.toJS();return(null==s?void 0:s.length)?(0,r.jsxs)(y,{children:[(0,r.jsx)(forms_OfferHeader,{offerRule:a,ticketList:l}),(0,r.jsx)(forms_ParticipantForm,{participantFields:s,participantFormData:d,ticketList:l,onChangeField:t=>n({...t,formData:d})})]}):null},T=i(56479),I=i(18543),F=i(17722);function findFormValueKey(t){var e;let{orderItem:i}=t;(0,m.ilD)(i,"orderItem");let n=null!==(e=i.offerRule)&&void 0!==e?e:null;(0,m.Glu)(n);let r=null==n?void 0:n.isNominative;if(r)return(0,m.oLH)(i.applicationId),i.applicationId;let a=t.get("@id");return(0,m.oLH)(a),a}function getOrderItemLists(t){let[e,i]=t.partition(t=>{var e;let i=null!==(e=t.offerRule)&&void 0!==e?e:null;return(0,m.Glu)(i),t.applicationId&&(null==i?void 0:i.isNominative)});return{listWithoutIsNomivative:e,listWithIsNomivative:i}}function getTicketListFromOrderItemList(t){return(0,f.l)(t.reduce((t,e)=>e.ticketList?((0,m.lNA)(e.ticketList,"curr.ticketList"),t.concat(e.ticketList)):t,(0,o.List)()))}function getSanitizedCustomerFormValues(t){let e=(0,o.Map)(new m.O8K).keySeq().toArray(),i=Object.keys(t).reduce((e,i)=>{var n;return{...e,[i]:"string"==typeof(n=t[i])?n.trim().length>0?n.trim():null:"number"==typeof n?Number.isNaN(n)?null:n:Array.isArray(n)?n.length>0?n.map(t=>t.trim()):null:n}},t),n=(0,m.ip5)(i),r=(0,m.jBN)(i,m.XgW.CONTACT,e);return{shoppingValues:n,customerValues:r}}function getCustomerEntityWithValues(t){let{shoppingValues:e,customerValues:i}=getSanitizedCustomerFormValues(t);return(0,m.tgD)(new m.O8K({"@id":null,type:m.hiR.CONTACT}),i,e)}async function updateParticipants(t,e){let i=await (0,I.w)(),n=t.map(t=>{let{participant:i}=t;(0,m.ilD)(i,"participant");let n=i.get("@id");return(0,m.oLH)(n,"participant"),function(t,e){let{shoppingValues:i,customerValues:n}=getSanitizedCustomerFormValues(t);return i?{"@id":e,...n,shoppingData:i}:{"@id":e,...n}}(e[findFormValueKey(t)],n)}),r=n.toJS(),a=await i.getRepository("customer").bulkUpdate(r,["@id"]);return a.getMembers()}async function createParticipantAndAssignToTicket(t,e){let i=await (0,I.w)(),n=getCustomerEntityWithValues(e);(0,m.DH1)(n,"customerWithValues");let r=await i.getRepository("customer").create(n,{fields:["@id"]});return new F.ul({"@id":t["@id"],"@type":"Ticket",participant:r.get("@id"),isCustomized:!0})}async function createParticipantAndAssignToTicketList(t,e){let i=await (0,I.w)(),n=getCustomerEntityWithValues(t);(0,m.DH1)(n,"customerWithValues");let r=await i.getRepository("customer").create(n,{fields:["@id"]});return e.map(t=>new F.ul({"@id":t["@id"],"@type":"Ticket",participant:r.get("@id"),isCu
1stomized:!0}))}async function updateOrCreateCustomersFromOfferRule(t,e){if(!t)return{ticketArray:null,errorDescription:null};try{let[i,n]=e.filter(e=>!!t[findFormValueKey(e)]).partition(t=>!!t.get("isCustomized")),r=i.size?Object.keys(t).map(e=>createParticipantAndAssignToTicketList(t[e],i.filter(t=>((0,m.ilD)(t.orderItem,"ticket.orderItem"),t.orderItem.applicationId===e)))):[];n.size&&await updateParticipants(n,t);let a=await Promise.all(r),l=(0,o.List)(a).flatten().toArray();return{ticketArray:l,errorDescription:null}}catch(e){let t=await (0,k.Gi)(e);return{ticketArray:null,errorDescription:t}}}async function updateOrCreateCustomersFromEventDate(t,e){if(!t)return{ticketArray:null,errorDescription:null};try{let[i,n]=e.filter(e=>!!t[findFormValueKey(e)]).partition(t=>!!t.get("isCustomized")),r=i.map(e=>createParticipantAndAssignToTicket(e,t[findFormValueKey(e)]));n.size&&await updateParticipants(n,t);let a=await Promise.all(r);return{ticketArray:a,errorDescription:null}}catch(e){let t=await (0,k.Gi)(e);return{ticketArray:null,errorDescription:t}}}async function updateOrderTicketAndMasterTicketList(t,e,i,n){let r=await (0,I.w)(),a=null!=t?t:e,l=t?"downloadId":"payId";(0,m.oLH)(a,"accessId");try{if(i&&i.length>0){let t=(0,o.List)(i);await r.getRepository("ticket").bulkUpdate(t,["@id","participant","isCustomized"],a,l)}let t=i?i.reduce((t,e)=>{var i,r,a;let l=null!==(a=null===(r=n.find(t=>t.get("@id")===e["@id"]))||void 0===r?void 0:null===(i=r.masterTicketList)||void 0===i?void 0:i.map(t=>(0,k.BT)(t)))&&void 0!==a?a:null;if(!l)return t;let c=(0,k.BT)(e.participant);(0,m.oLH)(c);let o=l.map(t=>new F.ul({"@id":t,"@type":"MasterTicket",participant:c,isCustomized:!0}));return t.concat(o)},(0,o.List)()):null;return t&&t.size>0&&await r.getRepository("masterTicket").bulkUpdate(t,["@id","participant","isCustomized"],a,l),null}catch(e){let t=await (0,k.Gi)(e);return t}}async function getOrderTicketList(t,e,i){let n=await (0,I.w)(),r=null!=e?e:i;(0,m.DH1)(r,"accessId");let a=e?T.G7:T.Iz;try{let e=await a(t,[{ticketList:["isCustomized","participantRequiredFields","status"]}],r)(n);return(0,m.lNA)(e.ticketList,"order.ticketList"),(0,f.l)(e.ticketList)}catch(t){return null}}function CustomizeTickets_templateObject(){let t=(0,n._)(["\n  position: sticky;\n  bottom: 0;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n"]);return CustomizeTickets_templateObject=function(){return t},t}let A=(0,d.ZP)(u.aJ).withConfig({componentId:"sc-476e62c6-0"})(CustomizeTickets_templateObject());var forms_CustomizeTickets=function(t){let{order:e,downloadId:i,payId:n,onSubmit:l}=t,{t:d}=(0,s.$G)(),u=(0,g.Z)(e),[h,k]=(0,a.useState)(null),[v,y]=(0,a.useState)(null),[x,b]=(0,a.useState)(null),[j,w]=(0,a.useState)(!1),[O,C]=(0,a.useState)(null),[_,L]=(0,a.useState)(!1);if(!u)return null;(0,m.lNA)(e.orderItemList,"order.orderItemList");let D=!!i,T=function(t){let{listWithoutIsNomivative:e}=getOrderItemLists(t),i=e.filter(t=>!!t.eventDate).groupBy(t=>{var e;return null===(e=t.eventDate)||void 0===e?void 0:e.get("@id")}).toList();return i.reduce((t,e)=>{var i,n;let r=null!==(n=null===(i=e.first())||void 0===i?void 0:i.get("eventDate"))&&void 0!==n?n:null;return(0,m.ilD)(r,"eventDate"),t.push({eventDate:r,ticketList:getTicketListFromOrderItemList(e)})},(0,o.List)())}(e.orderItemList),I=function(t){let{listWithIsNomivative:e}=getOrderItemLists(t),i=e.groupBy(t=>t.applicationId).toList();return i.reduce((t,e)=>{var i,n;let r=null!==(n=null===(i=e.first())||void 0===i?void 0:i.get("offerRule"))&&void 0!==n?n:null;(0,m.ilD)(r,"offerRule");let a=getTicketListFromOrderItemList(e);return 0===a.size?t:t.push({offerRule:r,ticketList:a})},(0,o.List)())}(e.orderItemList),F=T.reduce((t,e)=>e.ticketList?t.concat(e.ticketList):t,(0,o.List)()),P=I.reduce((t,e)=>e.ticketList?t.concat(e.ticketList):t,(0,o.List)()),handleError=t=>(C(t),w(!1),null),updateTickets=async()=>{var t;let{ticketArray:e,errorDescription:r}=await updateOrCreateCustomersFromOfferRule(x,P);if(r)return handleError(r);let{ticketArray:a,errorDescription:l}=await updateOrCreateCustomersFromEventDate(v,F);if(l)return handleError(l);let c=null===(t=a||[])||void 0===t?void 0:t.concat(e||[]);if(c.length){let t=await updateOrderTicketAndMasterTicketList(i,n,c,P.concat(F));if(t)return handleError(t)}return c.length},getAllTicketCustomized=async()=>{let t=await getOrderTicketList(e.getShortId(),i,n);return(0,f.A)(t)},customizeTickets=async()=>{let t=!h||function(t){let e=Object.keys(t).map(e=>{var i;return null===(i=t[e].current)||void 0===i?void 0:i.validateForm()});return e.every(t=>t)}(h);if(!t){L(D);return}w(!0),await updateTickets();let e=await getAllTicketCustomized();if(!e){w(!1),L(D);return}w(!1),l()},handleTicketFieldChange=t=>{let{fieldName:e,value:i,formRef:n,ticketId:r,formData:a}=t;if(L(!1),C(null),k(t=>({...t,[r]:n})),null==v?void 0:v[r]){y(t=>({...t,[r]:{...a,...null==t?void 0:t[r],[e]:i}}));return}y(t=>({...t,[r]:{...a,[e]:i}}))},handleOfferRuleFieldChange=t=>{let{fieldName:e,value:i,formRef:n,applicationId:r,formData:a}=t;if(L(!1),C(null),k(t=>({...t,[r]:n})),null==x?void 0:x[r]){b(t=>({...t,[r]:{...a,...null==t?void 0:t[r],[e]:i}}));return}b(t=>({...t,[r]:{...a,[e]:i}}))};return(0,r.jsxs)("div",{className:"mt2",children:[(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)("div",{className:"txtcenter mb5",children:[(0,r.jsx)("div",{className:"mt3",children:(0,r.jsx)("h2",{className:"bold mt3",children:d("ticketing.order.payment.customize_tickets.title")})}),i&&(0,r.jsx)("div",{className:"mpd-color-gray small mt2",children:d("ticketing.order.payment.customize_tickets.message")})]}),I.map(t=>{var e;return(0,r.jsx)(forms_OfferRuleFormList,{participantForm:t,onChangeField:handleOfferRuleFieldChange},null===(e=t.offerRule)||void 0===e?void 0:e.get("@id"))}),T.map(t=>{var e;return(0,r.jsx)(forms_EventDateFormList,{participantForm:t,onChangeField:handleTicketFieldChange},null===(e=t.eventDate)||void 0===e?void 0:e.get("@id"))})]}),(0,r.jsxs)(A,{className:"pt4 pb4",children:[O&&(0,r.jsx)("div",{className:"mpd-alert mpd-alert--error",children:O}),_&&(0,r.jsx)("div",{className:"mpd-alert mpd-alert--error",children:d("ticketing.ticket.must_customize")}),(0,r.jsx)("button",{type:"button",className:c()("mpd-btn mpd-btn--primary",{"mpd-btn--loading":j}),onClick:customizeTickets,children:d("ticketing.ticket.customize")})]})]})}}
1,38524:function(t,e,i){"use strict";i.d(e,{Z:function(){return useHasATicketOrACouponToBePrinted}});var n=i(58849);function useHasATicketOrACouponToBePrinted(t){return(0,n.lNA)(t.ticketList,"order.ticketList"),(0,n.lNA)(t.orderItemList,"order.orderItemList"),t.ticketList.size>0||t.orderItemList.filter(t=>(null==t?void 0:t.createdCoupon)!==null).size>0}},52329:function(t,e,i){"use strict";i.d(e,{s:function(){return useAllCountryOptionArray}});var n=i(2784),r=i(92472),a=i(70804);function useAllCountryOptionArray(){let t=(0,a.b)(),[e,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let loadCountryOptionArray=async()=>{i(await (0,r.n1)(t))};loadCountryOptionArray()},[t]),{countryOptionArray:e}}},36590:function(t,e,i){"use strict";function downloadResponse(t,e){return t.blob().then(t=>URL.createObjectURL(t)).then(t=>{(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"download",i="dowload-link-".concat(Date.now(),"-").concat(Math.round(1e6*Math.random())),n=document.createElement("a");return n.setAttribute("class","hidden"),n.setAttribute("download",e),n.setAttribute("id",i),n.href=t,n})(t,e).click()})}i.d(e,{M:function(){return downloadResponse}})},17722:function(t,e,i){"use strict";i.d(e,{ul:function(){return HackTicket},GF:function(){return r},P1:function(){return changeMail},qB:function(){return downloadTicket}});var n,r,a=i(56479),l=i(18543),c=i(36590),o=i(58849);let s=["@id","downloadId",{ticketList:[{ticketPrice:[{eventDate:["startDate","saleEndDate",{ticketing:["title","sellingDeviceSchedule","timezone"]}]}]}]},{customer:["firstname","lastname"]}];(n=r||(r={})).OPTION="option",n.RESERVATION="reservation",n.ORDER="order",n.SWAP="swap";let HackTicket=class HackTicket{toJS(){return this}constructor(t){this["@id"]=t["@id"],this["@type"]=t["@type"],this.data=t.data,this.participant=t.participant,this.isCustomized=t.isCustomized}};async function changeMail(t,e,i,n){let r=await (0,l.w)();await r.getRepository("order").sendTicketsCouponsByMail(t,e,i,n)}async function downloadTicket(t,e,i){let n=await (0,l.w)(),r=await (0,a.G7)(t,s,e)(n),d=function(t,e){(0,o.lNA)(t.ticketList,"order.ticketList");let{ticketList:i}=t,n=e("ticketing.tickets_download_prefix");if(null!==i&&i.size>0){let t=i.getIn([0,"ticketPrice","eventDate"]);(0,o.ilD)(t,"eventDate"),(0,o.ilD)(t.ticketing,"eventDate.ticketing");let{ticketing:e}=t,{title:r}=e;r&&(n+="_".concat(r));let a=t.startDate,l=t.saleEndDate;a&&(n+="_".concat(a.format("DD-MM-k"),"h"),l&&l>a&&(n+="_".concat(l.format("k"),"h")))}let{customer:r}=t;if(r){(0,o.ilD)(r);let{firstname:t,lastname:e}=r;t&&(n+="_".concat(t)),e&&(n+="_".concat(e))}return"".concat(n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(" ","-"),".pdf")}(r,i),u=n.getRepository("order");(0,c.M)(await u.getPdfTicketsCoupons(r.getShortId(),e),d)}},70526:function(t,e,i){"use strict";i.d(e,{A:function(){return getAllCustomized},l:function(){return filterPaidTicket}});var n=i(58849);function filterPaidTicket(t){return t.filter(t=>((0,n.lTS)(t.status,"ticket.status"),t.status===n.iV1.PAYED))}function getAllCustomized(t){if(!(null==t?void 0:t.size))return!1;let e=t.filter(t=>{let e=t.getFormParticipantFields(),i=e.some(t=>{var e;return!!(null===(e=t.options)||void 0===e?void 0:e.isRequired)});return i}),i=null==e?void 0:e.every(t=>!!t.isCustomized);return i}},71613:function(){}}]);

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.