1"use strict";(self.webpackChunkyumapos_web_client_mobile=self.webpackChunkyumapos_web_client_mobile||[]).push([[5869],{75869(Y,_,c){c.r(_),c.d(_,{DialogTableSelectionComponent:()=>B});var i=c(85802),m=c(34006),v=c(68018),M=c(85988),f=c(30995),o=c(35547);const x=(t,s)=>s.floorTableId;function w(t,s){if(1&t&&(i.qSk(),o.Hgh(0,"rect",5)),2&t){const e=o.XpG().$implicit;o.BMQ("x",e.floorTableX)("y",e.floorTableY)("width",e.floorTableWidth)("height",e.floorTableHeight)}}function y(t,s){if(1&t&&(i.qSk(),o.Hgh(0,"ellipse",6)),2&t){const e=o.XpG().$implicit;o.BMQ("rx",e.floorTableWidth/2)("ry",e.floorTableHeight/2)("cx",e.floorTableX+e.floorTableWidth/2)("cy",e.floorTableY+e.floorTableHeight/2)}}function O(t,s){if(1&t){const e=o.RV6();i.qSk(),o.rj2(0,"g",4),o.VwU("click",function(){const r=i.eBV(e).$implicit,a=o.XpG(2);return i.Njj(a.tableClick(r))}),o.nVh(1,w,1,4,":svg:rect",5)(2,y,1,4,":svg:ellipse",6),o.rj2(3,"text",7),o.EFF(4),o.eux()()}if(2&t){const e=s.$implicit;o.AVh("floor-table-reserved",e.isFloorTableReserved),o.BMQ("transform",e.floorTableTransformValue),o.R7$(),o.vxM(e.isFloorTableSquare?1:2),o.R7$(2),o.BMQ("x",e.floorTableCenterX)("y",e.floorTableCenterY)("transform",e.floorTableTextTransformValue),o.R7$(),o.SpI(" ",e.floorTableNumber," ")}}function I(t,s){if(1&t&&(i.qSk(),o.rj2(0,"svg",1)(1,"g"),o.Hgh(2,"polygon",2),o.Z7z(3,O,5,8,":svg:g",3,x),o.eux()()),2&t){const e=o.XpG();o.AVh("table-selection-mode",e.tableSelectionMode),o.BMQ("viewBox",e.floorPlanViewInfo.floorViewBox),o.R7$(2),o.BMQ("points",e.floorPlanViewInfo.floorPoints),o.R7$(),o.Dyx(e.floorPlanViewInfo.floorTables)}}let k=(()=>{class t{constructor(){this.tableSelectionMode=!0,this.floorTableClick=new i.bkB}ngOnChanges(e){if(this.floorPlanViewInfo=void 0,this.floorPlan&&this.reservations){const l=this.reservations.filter(n=>n.planId===this.floorPlan.planId),r=this.floorPlan.floorPoints.map(n=>n.pointX),a=this.floorPlan.floorPoints.map(n=>n.pointY),p=Math.min(...r),d=Math.min(...a),T=Math.max(...r),C=Math.max(...a),b=(T-p+(C-d))/50,D=this.floorPlan.floorTables.map(n=>{const E=this.currentOrderSelectedTableId===n.tableId||l.some(A=>A.tableIds.some(N=>N===n.tableId)),h=n.tableX+n.tableWidth/2,g=n.tableY+n.tableHeight/2,P=[],u=[`translate(${h*-(b-1)},${g*-(b-1)})`,`scale(${b})`];return n.tableAngle&&(P.push(`rotate(${n.tableAngle} ${n.tableX} ${n.tableY})`),u.push(`rotate(${-1*n.tableAngle} ${h} ${g})`)),{floorTableId:n.tableId,floorTableNumber:n.tableNumber,floorTableSeatsCount:n.numOfSeats,isFloorTableSquare:0!==n.tableType,isFloorTableReserved:E,floorTableX:n.tableX,floorTableY:n.tableY,floorTableWidth:n.tableWidth,floorTableHeight:n.tableHeight,floorTableCenterX:h,floorTableCenterY:g,floorTableTransformValue:P.join(" "),floorTableTextTransformValue:u.join(" ")}});this.floorPlanViewInfo={floorPlanName:this.floorPlan.planName,floorTotalTablesCount:this.floorPlan.floorTables.length,floorNotReservedTablesCount:this.floorPlan.floorTables.length-l.length,floorPoints:this.floorPlan.floorPoints.map(n=>`${n.pointX},${n.pointY}`).join(" "),floorViewBox:`${p} ${d} ${T-p} ${C-d}`,floorTables:D,tableNumberFontSize:14}}}tableClick(e){this.floorTableClick.emit(e.floorTableId)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=o.VBU({type:t,selectors:[["yp-floor-plan"]],inputs:{floorPlan:"floorPlan",reservations:"reservations",currentOrderSelectedTableId:"currentOrderSelectedTableId",tableSelectionMode:"tableSelectionMode"},outputs:{floorTableClick:"floorTableClick"},features:[o.OA$],decls:1,vars:1,consts:[["width","100%","height","100%","preserveAspectRatio","xMidYMid meet",2,"max-height","25rem",3,"table-selection-mode"],["width","100%","height","100%","preserveAspectRatio","xMidYMid meet",2,"max-height","25rem"],["stroke-width","3",1,"floor-points"],[1,"floor-table-wrapper",3,"floor-table-reserved"],[1,"floor-table-wrapper",3,"click"],["vector-effect","non-scaling-stroke","rx","7",1,"floor-table"],["vector-effect","non-scaling-stroke",1,"floor-table"],["font-size","1","font-weight","900","fill","black","text-anchor","middle","alignment-baseline","middle",1,"curs
1or-pointer","user-select-none"]],template:function(l,r){1&l&&o.nVh(0,I,5,4,":svg:svg",0),2&l&&o.vxM(r.floorPlanViewInfo?0:-1)},styles:[".floor-points[_ngcontent-%COMP%]{fill:var(--yp-body-bg-shift2);stroke:var(--yp-body-bg-shift4)}.table-selection-mode[_ngcontent-%COMP%] .floor-table-wrapper[_ngcontent-%COMP%]:not(.floor-table-reserved):hover .floor-table[_ngcontent-%COMP%]{stroke:var(--yp-primary-bg)!important;stroke-width:3}.floor-table-wrapper.floor-table-reserved[_ngcontent-%COMP%] .floor-table[_ngcontent-%COMP%]{fill:var(--yp-primary-bg);stroke:var(--yp-primary-bg)}.floor-table-wrapper.floor-table-reserved[_ngcontent-%COMP%] text[_ngcontent-%COMP%]{fill:var(--yp-primary-color)}.floor-table-wrapper[_ngcontent-%COMP%] .floor-table[_ngcontent-%COMP%]{fill:var(--yp-body-bg-shift4);stroke:var(--yp-body-color-shift7);stroke-width:2;cursor:pointer}.floor-table-wrapper[_ngcontent-%COMP%] text[_ngcontent-%COMP%]{fill:var(--yp-body-color)}"],changeDetection:0})}}return t})();const F=(t,s)=>s.floorPlan.planId;function S(t,s){if(1&t&&(o.j41(0,"yp-dialog-header"),o.EFF(1),o.nI1(2,"translate"),o.k0s()),2&t){const e=o.XpG();o.R7$(),o.SpI(" ",o.bMT(2,1,e.selectedFloorPlan?"CHECKOUT.TABLE.DIALOG.SELECT_TABLE.TITLE":"CHECKOUT.TABLE.DIALOG.SELECT_ROOM.TITLE")," ")}}function $(t,s){if(1&t){const e=o.RV6();o.j41(0,"div",4)(1,"div",5)(2,"h5",6),o.EFF(3),o.k0s(),o.j41(4,"div"),o.EFF(5),o.nI1(6,"translate"),o.nI1(7,"translate"),o.k0s()(),o.j41(8,"div",7)(9,"div",8),o.bIt("click",function(){const r=i.eBV(e).$implicit,a=o.XpG(2);return i.Njj(a.chooseRoom(r.floorPlan))}),o.j41(10,"div",9),o.nrm(11,"yp-floor-plan",10),o.k0s()()()()}if(2&t){const e=s.$implicit,l=o.XpG(2);o.R7$(3),o.JRh(e.floorPlan.planName),o.R7$(2),o.LHq(" ",o.bMT(6,9,"TABLE.TOTAL"),": ",e.floorPlan.floorTables.length,", ",o.bMT(7,11,"TABLE.FREE"),": ",e.floorNotReservedTablesCount," "),o.R7$(6),o.Y8G("floorPlan",e.floorPlan)("reservations",l.reservations)("currentOrderSelectedTableId",l.currentOrderSelectedTableId)("tableSelectionMode",!1)}}function R(t,s){if(1&t&&(o.j41(0,"div",1),o.Z7z(1,$,12,13,"div",4,F),o.k0s()),2&t){const e=o.XpG();o.R7$(),o.Dyx(e.floorPlansViewInfo)}}function V(t,s){if(1&t){const e=o.RV6();o.j41(0,"div",2)(1,"div",11)(2,"yp-floor-plan",12),o.bIt("floorTableClick",function(r){i.eBV(e);const a=o.XpG();return i.Njj(a.floorTableClick(r))}),o.k0s()()()}if(2&t){const e=o.XpG();o.R7$(2),o.Y8G("floorPlan",e.selectedFloorPlan)("reservations",e.reservations)("currentOrderSelectedTableId",e.currentOrderSelectedTableId)}}function j(t,s){if(1&t){const e=o.RV6();o.j41(0,"div",3)(1,"button",14),o.bIt("click",function(){i.eBV(e);const r=o.XpG(2);return i.Njj(r.footerButtonClick())}),o.EFF(2),o.nI1(3,"translate"),o.k0s()()}2&t&&(o.R7$(2),o.SpI(" ",o.bMT(3,1,"COMMON.BACK")," "))}function X(t,s){1&t&&o.DNE(0,j,4,3,"div",13)}let B=(()=>{class t{constructor(){this.matDialogRef=(0,i.WQX)(m.CP);const e=(0,i.WQX)(m.Vh);this.reservations=e.reservations,this.currentOrderSelectedTableId=e.currentOrderSelectedTableId,this.floorPlansViewInfo=e.storeFloorPlans.map(l=>{const r=e.reservations.find(a=>a.planId===l.planId)?.tableIds.length??0;return{floorPlan:l,floorNotReservedTablesCount:l.floorTables.length-r}})}chooseRoom(e){this.selectedFloorPlan=e}floorTableClick(e){if(void 0===this.selectedFloorPlan)throw new Error("this.selectedFloorPlan is undefined when selecting table");const l=this.selectedFloorPlan.floorTables.find(a=>a.tableId===e);if(void 0===l)throw new Error("clickedTable is not found in selected floor plan");this.reservations.find(a=>a.planId===this.selectedFloorPlan?.planId)?.tableIds.some(a=>a===e)||this.matDialogRef.close({selectedTableId:l.tableId})}footerButtonClick(){this.selectedFloorPlan=void 0}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=o.VBU({type:t,selectors:[["yp-dialog-table-selection"]],decls:6,vars:2,consts:[[4,"ypProjectedHeader"],[1,"d-flex","flex-wrap","h-100","m-2"],[1,"d-flex","align-items-center","h-100","p-3",2,"min-height","15rem"],[1,"yp-bottom-buttons-wrapper"],[1,"floor-plan-info-wrapper"],[1,"floor-plan-info","text-center"],[1,"fw-bold"],[1,"floor-plan-container"],[1,"floor-plan-wrapper",3,"click"],[1,"floor-plan"],[3,"floorPlan","reservations","currentOrderSelectedTableId","tableSelectionMode"],[1,"w-100","h-100",2,"max-height","50rem"],[3,"floorTableClick","floorPlan","reservations","currentOrderSelectedTableId"],["class","yp-bottom-buttons-wrapper",4,"ypProjectedFooter"],["type","button",1,"yp-btn","yp-btn-lg","yp-btn-secondary",3,"click"]],template:function(l,r){1&l&&(o.j41(0,"yp-fixed-header-footer"),o.DNE(1,S,3,3,"yp-dialog-header",0),o.qex(2),o.nVh(3,R,3,0,"div",1)(4,V,3,3,"div",2),o.bVm(),o.nVh(5,X,1,0,"div",3),o.k0s()),2&l&&(o.R7$(3),o.vxM(r.selectedFloorPlan?4:3),o.R7$(2),o.vxM(r.selectedFloorPlan?5:-1))},dependencies:[f.cU,k,M.B,f.xp,f.J0,v.D9],styles:[".floor-plan-info-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:50%;margin-block-start:1.5rem}.floor-plan-info-wrapper[_ngcontent-%COMP%] .floor-plan-container[_ngcontent-%COMP%]{width:100%;height:100%;padding:.5rem}.floor-plan-info-wrapper[_ngcontent-%COMP%] .floor-plan-container[_ngcontent-%COMP%] .floor-plan-wrapper[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:.5rem;cursor:pointer;border:.1rem transparent solid;background:var(--yp-body-bg-shift1)}.floor-plan-info-wrapper[_ngcontent-%COMP%] .floor-plan-container[_ngcontent-%COMP%] .floor-plan-wrapper[_ngcontent-%COMP%]:hover{border-color:var(--yp-primary-bg)}.floor-plan-info-wrapper[_ngcontent-%COMP%] .floor-plan-container[_ngcontent-%COMP%] .floor-plan-wrapper[_ngcontent-%COMP%] .floor-plan[_ngcontent-%COMP%]{flex-grow:1}@media(max-width:959.98px){.floor-plan-info-wrapper[_ngcontent-%COMP%]{flex-direction:row-reverse;width:100%;padding-block:2rem;margin:0;border-block-end:1px solid var(--yp-border-color)}.floor-plan-info-wrapper[_ngcontent-%COMP%] .floor-plan-info[_ngcontent-%COMP%]{width:45%}.floor-plan-info-wrapper[_ngcontent-%COMP%] .floor-plan-container[_ngcontent-%COMP%]{width:55%;border:none}.floor-plan-info-wrapper[_ngcontent-%COMP%] .floor-plan-container[_ngcontent-%COMP%] .floor-plan-wrapper[_ngcontent-%COMP%]{display:block}.floor-plan-info-wrapper[_ngcontent-%COMP%] .floor-plan-container[_ngcontent-%COMP%] .floor-plan-wrapper[_ngcontent-%COMP%] .floor-plan[_ngcontent-%COMP%]{height:100%}}"],changeDetection:0})}}return t})()}}]);
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.