@aaravpos/appointment-booking-plugin 2.0.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +2 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18,7 +18,7 @@ Take a look at the reducer(s) handling this action type: ${m.type}.
|
|
|
18
18
|
`,onClick:()=>t(String(e?.id)),children:[(0,o.jsx)("div",{className:"aaravpos-outlet-card-top",children:(0,o.jsx)(pf,{status:e.isOpen})}),(0,o.jsx)("div",{className:"aaravpos-outlet-card-content",children:(0,o.jsxs)("div",{className:"aaravpos-outlet-card-inner",children:[(0,o.jsx)("h2",{className:"aaravpos-outlet-card-title",children:e.outletName}),(0,o.jsx)("p",{className:"aaravpos-outlet-card-address",children:e.address})]})})]});function hf({outlets:e,onSelectOutlet:t}){const[r,n]=(0,S.useState)(null),[a,i]=(0,S.useState)(""),s=l=>{n(l);const c=e.find(u=>u.id==l);c&&setTimeout(()=>{t(c)},100)},d=(0,S.useMemo)(()=>{if(!a.trim())return e;const l=a.toLowerCase();return e.filter(c=>c.outletName?.toLowerCase().includes(l)||c.address?.toLowerCase().includes(l))},[e,a]);return(0,o.jsxs)("div",{className:"arravpos-container",children:[(0,o.jsxs)("div",{className:"aaravpos-header",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-title",children:"Choose Your Outlet"}),(0,o.jsx)("div",{className:"aaravpos-outlet-divider"})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(ya,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search outlet...",value:a,onChange:l=>i(l.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:a&&(0,o.jsx)("button",{onClick:()=>i(""),className:"aaravpos-search-clear",children:(0,o.jsx)(pt,{size:16})})})]})]}),(0,o.jsx)("div",{className:"aaravpos-outlet-list-wrapper",children:d.length>0?(0,o.jsx)("div",{className:"aaravpos-outlet-grid",children:d.map((l,c)=>(0,o.jsx)("div",{children:(0,o.jsx)(mf,{item:l,onSelect:s,selected:r===l.id})},c))}):(0,o.jsx)("div",{className:"aaravpos-empty-state",children:(0,o.jsxs)("div",{className:"aaravpos-empty-content",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-title",children:"No outlets found"}),(0,o.jsx)("p",{className:"aaravpos-empty-text",children:"Try searching with a different keyword"})]})})})]})}var vf={USD:Rs,INR:Vu,EUR:Bu,GBP:Qu},de=({size:e=20})=>{const t=(0,F.useSelector)(r=>r.outletDetails?.currency);return(0,o.jsx)(t?vf[t]:Rs,{size:e})},mt=(e="")=>{const t=e.trim().split(" ").filter(Boolean);return t.length===0?"":((t[0]?.[0]??"")+(t.length>1?t[t.length-1]?.[0]??"":"")).toUpperCase()},yf=e=>Number(e.price||e.min_price||0),vi=(e,{perUnit:t=!1}={})=>{const r=yf(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((a,i)=>i.isActive?i.taxType==="FIXED"?a+(i.taxRate||0)*n:i.taxType==="PERCENTAGE"?a+r*n*(i.taxRate||0)/100:a:a,0)};function $a(){const[e,t]=(0,S.useState)({width:0,height:0});return(0,S.useEffect)(()=>{const r=()=>{t({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),e}var $f=[{label:"Services",page:"services",icon:(0,o.jsx)(Bs,{size:16})},{label:"Professional",page:"professionals",icon:(0,o.jsx)(Us,{size:16})},{label:"Time Slot",page:"time",icon:(0,o.jsx)(Ut,{size:16})},{label:"Details",page:"details",icon:(0,o.jsx)(Fs,{size:16})},{label:"Confirmation",page:"confirm",icon:(0,o.jsx)(Dn,{size:16})}],gf=[{label:"Professional",page:"professionals",icon:(0,o.jsx)(Us,{size:16})},{label:"Service",page:"services",icon:(0,o.jsx)(Bs,{size:16})},{label:"Time",page:"time",icon:(0,o.jsx)(Ut,{size:16})},{label:"Details",page:"details",icon:(0,o.jsx)(Fs,{size:16})},{label:(0,o.jsxs)("span",{className:"flex items-center gap-1",children:["Done ",(0,o.jsx)(Dn,{size:13})]}),page:"confirm",icon:(0,o.jsx)(Dn,{size:16})}];function Xe(){const e=(0,F.useDispatch)(),{width:t}=$a(),{isService:r}=(0,F.useSelector)(f=>f.outletDetails),n=(0,F.useSelector)(f=>f.outletList.outlets),{currentStep:a,completedSteps:i}=(0,F.useSelector)(f=>f.breadcrumbs),s=r?$f:gf,d=s.findIndex(f=>f.page===a),l=()=>{e({type:"RESET_ALL"}),pa.purge()},c=()=>{if(d===0&&n.length>1){l(),e(qc());return}if(d<=0)return;const f=s[d-1];e(An(f.page))},u=s[d];return(0,o.jsx)(o.Fragment,{children:t<991?(0,o.jsxs)("div",{className:"aaravpos-mobile-stepper",children:[(0,o.jsx)("button",{onClick:c,disabled:!1,className:"aaravpos-mobile-back-btn",children:(0,o.jsx)(Sr,{size:20})}),(0,o.jsx)("span",{className:"aaravpos-mobile-step-label",children:u?.label})]}):(0,o.jsxs)("div",{className:"aaravpos-desktop-stepper",children:[n.length>1&&(0,o.jsx)("button",{onClick:c,className:"aaravpos-desktop-back-btn",children:(0,o.jsx)(Sr,{size:20})}),(0,o.jsx)("nav",{className:"aaravpos-step-nav",children:s.map((f,p)=>{const m=a===f.page,v=i?.includes(f.page)||p<=d;return(0,o.jsxs)("button",{onClick:()=>{v&&e(An(f.page))},className:`aaravpos-step-btn
|
|
19
19
|
${v?"clickable":"disabled"}
|
|
20
20
|
${m?"active":"inactive"}
|
|
21
|
-
`,children:[(0,o.jsx)("span",{className:`aaravpos-step-icon ${m?"active":"inactive"}`,children:f.icon}),(0,o.jsx)("span",{children:f.label})]},f.page)})})]})})}function Je({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:a,isSidebarOpen:i=!1}){const{selectedServices:s,selectedProfessional:d}=(0,F.useSelector)(l=>l.service);return(0,o.jsxs)("div",{className:"aaravpos-main-layout",children:[(0,o.jsxs)("div",{className:`aaravpos-layout-wrapper ${s?.length>0||d?.id?"with-sidebar":""}`,children:[(0,o.jsxs)("main",{className:"aaravpos-main-content",children:[e,n?(0,o.jsx)("button",{onClick:a,className:"aaravpos-btn",children:(0,o.jsx)("span",{children:"View Order"})}):r]}),(0,o.jsx)("aside",{className:`aaravpos-sidebar ${i?"open":""}`,children:t})]}),i&&(0,o.jsx)("div",{className:"aaravpos-sidebar-mobile",children:(0,o.jsx)("div",{className:"aaravpos-sidebar-mobile-content",children:t})})]})}var Vs=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:a})=>{const{outletName:i}=(0,F.useSelector)(l=>l.outletDetails),{isService:s}=(0,F.useSelector)(l=>l.outletDetails),d=t.length>0;return console.log("--isService---36",s),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,o.jsxs)("p",{className:"aaravpos-order-subtitle",children:[i||"-"," Outlet"]})]}),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-body",children:[e?.id&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"aaravpos-order-section-title",style:{marginBottom:8},children:"Selected Professional"}),(0,o.jsxs)("div",{className:"aaravpos-pro-card aaravpos-display-flex aaravpos-mb-10 aaravpos-tp-10",children:[e.imageUrl?(0,o.jsx)("img",{src:e.imageUrl,alt:e.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:e.color||"#111"},children:mt(e.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:e.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:e.staff_type})]})]})]}),s&&e?.id&&(0,o.jsx)("p",{className:"aaravpos-order-section-title",children:"Selected Services"}),(0,o.jsx)("ul",{className:s?s&&e?.id?"aaravpos-pro-order-list":"aaravpos-pro-order-list-single":"aaravpos-pro-order-list-pro",children:d&&t?.length>0&&t.map(l=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:l.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:l.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Ut,{size:13}),(0,o.jsxs)("span",{children:[l.min_time||l.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(de,{size:12}),l.price||l.min_price]})]})]},l.id))})]}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-footer",children:[s&&e?.id&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(de,{size:16}),r]})]}),(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Duration"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[n," min"]})]})]}),(0,o.jsx)("button",{disabled:s?!t.length:!e,onClick:()=>a("time"),className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[s?"Choose Time":"Choose Services",(0,o.jsx)(Ze,{size:16})]})})]})]})]})]})};function bf(){const{width:e}=$a(),t=(0,F.useDispatch)(),{staff:r,selectedProfessional:n}=(0,F.useSelector)(d=>d.service),a=e<768,i=!r||r.length===0,s=d=>{if(!d?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const l=new Date,c=d.futureLeaveDates.find(u=>{if(u.status!=="APPROVED"||u.leaveType!=="FULL_DAY")return!1;const f=new Date(u.startDate),p=new Date(u.endDate);return l>=f&&l<=p});return c?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(c.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(Vs,{pro:n,goToStep:()=>t(ve())}),children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Available based on selected services"}),i&&(0,o.jsx)("p",{className:"aaravpos-no-staff",children:"No staff available for selected services"}),(0,o.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-staff-grid",children:r?.map((d,l)=>{const{isOnLeave:c,availableFrom:u}=s(d);return(0,o.jsxs)("div",{onClick:()=>{t(Is(d)),t(at(null)),a&&t(ve())},className:`aaravpos-pro-card ${n?.id===d.id?"active":""}`,children:[(0,o.jsxs)("div",{className:"aaravpos-display-flex",children:[d.imageUrl?(0,o.jsx)("img",{src:d.imageUrl,alt:d.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:d.color||"#111"},children:mt(d.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:d.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:d.staff_type})]})]}),c&&u&&(0,o.jsxs)("div",{className:"aaravpos-available-badge",children:[(0,o.jsx)("span",{className:"aaravpos-available-dot"}),(0,o.jsxs)("p",{className:"aaravpos-available-text",children:["Available from ",u]})]})]},l)})})})]})]})}var Nf=e=>Number(e.price||e.min_price||0),Mn=(e,{perUnit:t=!1}={})=>{const r=Nf(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((a,i)=>i.isActive?i.taxType==="FIXED"?a+i.taxRate*n:i.taxType==="PERCENTAGE"?a+r*n*i.taxRate/100:a:a,0)};function Sf(){const e=(0,F.useDispatch)(),{width:t}=$a(),{staff:r,selectedServices:n,selectedProfessional:a}=(0,F.useSelector)($=>$.service),[i,s]=(0,S.useState)(!1),d=n.map($=>$.id),l=(0,S.useMemo)(()=>{if(!a?.id)return[];const $=r.find(y=>y.id===a.id);return $?n.map(y=>{const g=$?.assignments?.find(x=>x.id===y?.id),h={...y,price:g?.price||y.price||y.min_price||0,duration:g?.duration||y.estimated_time||y.min_time||0};return{...h,tax:Mn(h)}}):[]},[a,r,n]),c=l.reduce(($,y)=>$+Number(y.price||y.min_price||0)*y.qty,0),u=l.reduce(($,y)=>$+(y?.duration||0)*y.qty,0),f=(0,S.useMemo)(()=>d.length?r.filter($=>{const y=$.assignments??[];return d?.every(g=>y.some(h=>String(h.id)===String(g)&&!!h?.assigned))}):[],[r,d]),p=t<768,m=d.length>0;(0,S.useEffect)(()=>{if(m&&f.length===0){const $=setTimeout(()=>s(!0),300);return()=>clearTimeout($)}else s(!1)},[m,f]);const v=$=>{if(!$?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const y=new Date,g=$.futureLeaveDates.find(h=>{if(h.status!=="APPROVED"||h.leaveType!=="FULL_DAY")return!1;const x=new Date(h.startDate),P=new Date(h.endDate);return y>=x&&y<=P});return g?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(g.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(Vs,{pro:a,selectedStaffServices:l,totalPrice:c,totalDuration:u,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!n.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Time ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Available based on selected services"}),i&&(0,o.jsx)("p",{className:"aaravpos-no-staff",children:"No staff available for selected services"}),(0,o.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-staff-grid",children:f.map(($,y)=>{const{isOnLeave:g,availableFrom:h}=v($);return(0,o.jsxs)("div",{onClick:()=>{e(Is($)),e(at(null)),p&&e(ve())},className:`aaravpos-pro-card ${a?.id===$.id?"active":""}`,children:[(0,o.jsxs)("div",{className:"aaravpos-display-flex",children:[$.imageUrl?(0,o.jsx)("img",{src:$.imageUrl,alt:$.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:$.color||"#111"},children:mt($.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:$.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:$.staff_type})]})]}),g&&h&&(0,o.jsxs)("div",{className:"aaravpos-available-badge",children:[(0,o.jsx)("span",{className:"aaravpos-available-dot"}),(0,o.jsxs)("p",{className:"aaravpos-available-text",children:["Available from ",h]})]})]},y)})})})]})]})}function zs({selectedServices:e,totalPrice:t,goToStep:r}){const{outletName:n}=(0,F.useSelector)(i=>i?.outletDetails),{isService:a}=(0,F.useSelector)(i=>i.outletDetails);return(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,o.jsxs)("p",{className:"aaravpos-order-subtitle",children:[n||"-"," Outlet"]})]}),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-body",children:[(0,o.jsx)("p",{className:"aaravpos-order-section-title",children:"SELECTED SERVICES"}),(0,o.jsx)("ul",{className:"aaravpos-order-list",children:e?.length>0&&e?.map(i=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:i.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:i.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Ut,{size:13}),(0,o.jsxs)("span",{children:[i.min_time||i.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(de,{size:12}),i.price||i.min_price]})]})]},i.id))})]}),(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-footer",children:[(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(de,{size:16}),t]})]}),(0,o.jsx)("div",{children:(0,o.jsx)("button",{onClick:()=>r("professionals"),disabled:!e.length,className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[a?"Choose Professional":"Choose Time",(0,o.jsx)(Ze,{size:16})]})})})]})]})]})}function Gs(){return(0,o.jsx)("div",{className:"aaravpos-skeleton-card",children:(0,o.jsx)("div",{className:"aaravpos-skeleton-shimmer",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}function Cf(){const e=(0,F.useDispatch)(),t=(0,S.useRef)(null),r=(0,S.useRef)(null),{superCategories:n,selectedServices:a,selectedProfessional:i,loading:s}=(0,F.useSelector)(b=>b.service),[d,l]=(0,S.useState)(null),[c,u]=(0,S.useState)(null),[f,p]=(0,S.useState)(""),m=new Set(i?i?.assignments?.map(b=>b.id):[]),v=new Set(i?i?.assignments?.map(b=>b.categoryId):[]),$=n?.map(b=>({...b,categories:b.categories?.map(N=>({...N,services:N.services?.filter(E=>m.has(E.id))||[]})).filter(N=>v.has(N.id)&&N.services.length>0)||[]})).filter(b=>b.categories.length>0)||[],y=(0,S.useMemo)(()=>d?c?c?.services||[]:d?.categories?.flatMap(b=>b.services||[])||[]:[],[d,c]),g=(0,S.useMemo)(()=>$?.flatMap(b=>b.categories?.flatMap(N=>N.services||[]))||[],[$]),h=(0,S.useMemo)(()=>{const b=f.trim().toLowerCase();return b?g.filter(N=>N.name?.toLowerCase().includes(b)||N.description?.toLowerCase().includes(b)):y},[f,g,y]),x=b=>b.taxRows?.some(N=>N.isActive)||!1,P=a.reduce((b,N)=>b+Number(N.price||N.min_price||0)*N.qty,0);return(0,S.useEffect)(()=>{if(!$?.length)return;const b=$.find(N=>N?.categories?.some(E=>E?.services?.length>0));b&&!d&&(l(b),u(null))},[$,d]),(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(zs,{selectedServices:a,totalPrice:P,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!a.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Time ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsxs)("div",{className:"aaravpos-navbar-form",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Service"}),(0,o.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from ",i?.name,"'s available services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(ya,{size:14})}),(0,o.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:f,onChange:b=>p(b.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>p(""),className:"aaravpos-search-clear",children:(0,o.jsx)(pt,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:b=>{t.current&&(t.current.scrollLeft+=b.deltaY)},className:"aaravpos-supercategory-wrapper",children:$?.map(b=>(0,o.jsx)("button",{onClick:()=>{l(b),u(null)},className:`aaravpos-supercategory-btn ${d?.id===b.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:b?.isStandAloneCategory?"Standalone":b.name})},b.id))}),d?.categories?.some(b=>b?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:b=>{r.current&&(r.current.scrollLeft+=b.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${c?"":"active"}`,children:["All Services (",d?.categories?.reduce((b,N)=>b+(N?.services?.length||0),0),")"]}),d?.categories?.map(b=>(0,o.jsxs)("button",{onClick:()=>u(b),className:`aaravpos-supercategory-btn ${c?.id===b.id?"active":""}`,children:[b.name," (",b.services.length,")"]},b.id))]}),(0,o.jsx)("div",{className:"aaravpos-services-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-services-grid",children:s?Array.from({length:10}).map((b,N)=>(0,o.jsx)(Gs,{},N)):(0,o.jsx)(o.Fragment,{children:h?.length?h?.map((b,N)=>(0,o.jsxs)("div",{onClick:()=>{const E=a.find(A=>A.id===b.id);E&&E.qty===1?e(Nr(String(b.id))):e(br({...b,price:b.price?Number(b.price):void 0}))},className:`aaravpos-service-card ${a.some(E=>E.id===b.id)?"active":""}`,children:[x(b)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),fa(b)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:b.name}),(0,o.jsxs)("div",{className:"aaravpos-service-description-wrapper",children:[(0,o.jsx)("p",{className:"aaravpos-service-description",children:b.description}),b.description&&b.description.length>30&&(0,o.jsx)("div",{className:"aaravpos-service-tooltip",children:b.description})]}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:b.estimated_time?`${b.estimated_time} min`:`${b.min_time}-${b.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:b.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),b.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),b.min_price," - ",(0,o.jsx)(de,{size:14}),b.max_price]})})]}),(0,o.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,o.jsx)("button",{onClick:E=>{E.stopPropagation(),e(Nr(String(b.id)))},className:"aaravpos-service-action-btn",children:(0,o.jsx)(Ls,{size:14})}),(0,o.jsx)("span",{className:"aaravpos-service-qty",children:a.find(E=>E.id===b.id)?.qty||0}),(0,o.jsx)("button",{onClick:E=>{E.stopPropagation(),a.find(A=>A.id===b.id)?e(js(String(b.id))):e(br({...b,price:b.price?Number(b.price):void 0}))},className:"aaravpos-service-action-btn plus",children:(0,o.jsx)(va,{size:14})})]})]},N)):(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:f?"No services found for your search.":"No services are available for this professional."})]})})})})]})]})}function xf(){const e=(0,F.useDispatch)(),t=(0,S.useRef)(null),r=(0,S.useRef)(null),{superCategories:n,selectedServices:a,loading:i}=(0,F.useSelector)(h=>h.service),{outletName:s}=(0,F.useSelector)(h=>h?.outletDetails),[d,l]=(0,S.useState)(null),[c,u]=(0,S.useState)(null),[f,p]=(0,S.useState)(""),m=(0,S.useMemo)(()=>d?c?c?.services||[]:d?.categories?.flatMap(h=>h.services||[])||[]:[],[d,c]),v=(0,S.useMemo)(()=>n?.flatMap(h=>h?.categories?.flatMap(x=>x.services||[]))||[],[n]),$=(0,S.useMemo)(()=>{const h=f.trim().toLowerCase();return h?v.filter(x=>x.name?.toLowerCase().includes(h)||x.description?.toLowerCase().includes(h)):m},[f,v,m]),y=h=>h.taxRows?.some(x=>x.isActive)||!1,g=a.reduce((h,x)=>h+Number(x.price||x.min_price||0)*x.qty,0);return(0,S.useEffect)(()=>{if(!n?.length)return;const h=n.find(x=>x?.categories?.some(P=>P?.services?.length>0));h&&!d&&(l(h),u(null))},[n,d]),(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(zs,{selectedServices:a,totalPrice:g,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!a.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Professional ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsxs)("div",{className:"aaravpos-navbar-form",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Book A Service"}),(0,o.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from"," ",(0,o.jsx)("span",{className:"aaravpos-text-bold",children:s})," Outlet's available services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(ya,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search services...",value:f,onChange:h=>p(h.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>p(""),className:"aaravpos-search-clear",children:(0,o.jsx)(pt,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:h=>{t.current&&(t.current.scrollLeft+=h.deltaY)},className:"aaravpos-supercategory-wrapper",children:n?.filter(h=>h?.categories?.some(x=>x?.services?.length>0))?.map(h=>(0,o.jsx)("button",{onClick:()=>{l(h),u(null)},className:`aaravpos-supercategory-btn ${d?.id===h.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:h?.isStandAloneCategory?"Standalone":h.name})},h.id))}),d?.categories?.some(h=>h?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:h=>{r.current&&(r.current.scrollLeft+=h.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${c?"":"active"}`,children:["All Services (",d?.categories?.reduce((h,x)=>h+(x?.services?.length||0),0),")"]}),d?.categories?.filter(h=>h?.services?.length>0)?.map(h=>(0,o.jsxs)("button",{onClick:()=>u(h),className:`aaravpos-supercategory-btn ${c?.id===h.id?"active":""}`,children:[h.name," (",h.services.length,")"]},h.id))]}),(0,o.jsx)("div",{className:"aaravpos-services-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-services-grid",children:i?Array.from({length:10}).map((h,x)=>(0,o.jsx)(Gs,{},x)):(0,o.jsx)(o.Fragment,{children:$?.length?$?.map((h,x)=>(0,o.jsxs)("div",{onClick:()=>{const P=a.find(b=>b.id===h.id);P&&P.qty===1?e(Nr(String(h.id))):e(br(h))},className:`aaravpos-service-card ${a.some(P=>P.id===h.id)?"active":""}`,children:[y(h)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),fa(h)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:h.name}),(0,o.jsxs)("div",{className:"aaravpos-service-description-wrapper",children:[(0,o.jsx)("p",{className:"aaravpos-service-description",children:h.description}),h.description&&h.description.length>30&&(0,o.jsx)("div",{className:"aaravpos-service-tooltip",children:h.description})]}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:h.estimated_time?`${h.estimated_time} min`:`${h.min_time}-${h.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:h.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),h.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),h.min_price," - ",(0,o.jsx)(de,{size:14}),h.max_price]})})]}),(0,o.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,o.jsx)("button",{onClick:P=>{P.stopPropagation(),e(Nr(String(h.id)))},className:"aaravpos-service-action-btn",children:(0,o.jsx)(Ls,{size:14})}),(0,o.jsx)("span",{className:"aaravpos-service-qty",children:a.find(P=>P.id===h.id)?.qty||0}),(0,o.jsx)("button",{onClick:P=>{P.stopPropagation(),a.find(b=>b.id===h.id)?e(js(String(h.id))):e(br(h))},className:"aaravpos-service-action-btn plus",children:(0,o.jsx)(va,{size:14})})]})]},x)):(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:f?"No services found for your search.":"No services are available for selected category."})]})})})})]})]})}var Pf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ga({buttonText:e,onButtonClick:t,showTaxesOnlyIfTime:r=!1,showTip:n=!1,tipPct:a=0,onTipChange:i,consentRequired:s=!1,consentCompleted:d=0,totalConsents:l=0,checkingConsent:c=!1,loading:u=!1,isBookingDisabled:f=!1,handleSidebarOpen:p}){const{selectedSlotIndexes:m,slots:v,selectedDate:$}=(0,F.useSelector)(T=>T.slots),{staff:y,selectedServices:g,selectedProfessional:h}=(0,F.useSelector)(T=>T.service),{timeZone:x}=(0,F.useSelector)(T=>T.outletDetails),P=me.DateTime.now().setZone(x??"UTC"),[b,N]=(0,S.useState)(""),[E,A]=(0,S.useState)(!1),z=(0,S.useRef)(null),Z=(0,S.useRef)(null),[ae,ie]=(0,S.useState)(0),k=[0,5,10,15,20],H=(0,S.useMemo)(()=>[...v?.morning||[],...v?.afternoon||[],...v?.evening||[]],[v]),X=15,q=(0,S.useMemo)(()=>{if(!h?.id)return[];const T=y?.find(_=>_.id===h.id);return T?g.map(_=>{const J=T.assignments?.find(Ie=>Ie.id===_.id),ue={..._,price:J?.price||_.price||_.min_price||0,duration:J?.duration||_.estimated_time||_.min_time||0};return{...ue,tax:Mn(ue),unitTax:Mn(ue,{perUnit:!0})}}):[]},[h,y,g]),fe=q.reduce((T,_)=>T+Number(_.price)*(_.qty||1),0),te=q.reduce((T,_)=>T+Number(_.duration)*(_.qty||1),0),oe=Math.ceil(te/X),je=T=>{if(!H.length)return"";const _=H[T]?.start_time,J=H[T+oe-1];return!_||!J?"":`${_} - ${J.end_time||J.start_time}`},I=$||{day:P.day,month:P.month,year:P.year},C=m?.[0],O=C!==void 0?je(C):null,M=I.month??0,R=O?`${Pf[M]} ${I.day} at ${O}`:null,L=q.reduce((T,_)=>T+_.tax,0),B=Number(a)||0,U=n?fe*B/100:0,V=fe+L+U;(0,S.useEffect)(()=>{n&&a==null&&i?.(0)},[n,a,i]);const W=(0,S.useMemo)(()=>u?"Processing...":c?"Checking consents...":s&&d<l?`Sign Consents (${d}/${l})`:(0,o.jsxs)(o.Fragment,{children:[e||"Book Appointment",(0,o.jsx)(Yu,{})]}),[u,c,s,d,l,e]),G=f||u||c||!O;return(0,S.useEffect)(()=>{const T=()=>{const J=z.current?.offsetHeight||0,ue=Z.current?.offsetHeight||0,Ie=(J+(window.innerWidth<=991?116:205)||0)+ue;ie(window.innerHeight-Ie)};T();const _=new ResizeObserver(()=>{T()});return Z.current&&_.observe(Z.current),z.current&&_.observe(z.current),window.addEventListener("resize",T),()=>{_.disconnect(),window.removeEventListener("resize",T)}},[q,n,d,l,E]),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsxs)("p",{className:"aaravpos-order-title",children:["Your Order",p&&(0,o.jsx)("button",{onClick:p,className:"aaravpos-sidebar-close-btn",children:(0,o.jsx)(pt,{})})]}),h?.id&&(0,o.jsxs)("div",{className:"aaravpos-pro-card aaravpos-display-flex aaravpos-mb-10 aaravpos-tp-10",children:[h.imageUrl?(0,o.jsx)("img",{src:h.imageUrl,alt:h.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:h.color||"#111"},children:mt(h.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:h.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:h.staff_type})]})]}),(0,o.jsxs)("div",{className:"aaravpos-date-time",children:[(0,o.jsx)("span",{className:"aaravpos-date-time-label",children:"Date & Time:"}),R?(0,o.jsx)("span",{className:"aaravpos-date-time-value",children:R}):(0,o.jsx)("span",{className:"aaravpos-date-time-empty",children:"No time selected"})]})]}),(0,o.jsx)("ul",{className:"aaravpos-order-list",style:{height:`${ae}px`},children:q?.length>0&&q.map(T=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:T.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:T.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Ut,{size:13}),(0,o.jsxs)("span",{children:[T.min_time||T.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(de,{size:12}),T.price||T.min_price]})]})]},T.id))}),(0,o.jsxs)("div",{className:"third",ref:Z,children:[n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"aaravpos-tip-title",children:"Add Tip"}),(0,o.jsx)("div",{className:"aaravpos-tip-options",children:[...k,"custom"].map((T,_)=>{const J=T==="custom",ue=J?E:B===T,Ie=_===0,Vt=_===[...k,"custom"].length-1;return(0,o.jsx)("button",{onClick:()=>{J?(A(!0),i?.(Number(b)||0)):(A(!1),N(""),i?.(Number(T)))},className:`aaravpos-tip-btn
|
|
21
|
+
`,children:[(0,o.jsx)("span",{className:`aaravpos-step-icon ${m?"active":"inactive"}`,children:f.icon}),(0,o.jsx)("span",{children:f.label})]},f.page)})})]})})}function Je({children:e,sidebar:t,renderButton:r,isConfirm:n=!1,handleSidebarOpen:a,isSidebarOpen:i=!1}){const{selectedServices:s,selectedProfessional:d}=(0,F.useSelector)(l=>l.service);return(0,o.jsxs)("div",{className:"aaravpos-main-layout",children:[(0,o.jsxs)("div",{className:`aaravpos-layout-wrapper ${s?.length>0||d?.id?"with-sidebar":""}`,children:[(0,o.jsxs)("main",{className:"aaravpos-main-content",children:[e,n?(0,o.jsx)("button",{onClick:a,className:"aaravpos-btn",children:(0,o.jsx)("span",{children:"View Order"})}):r]}),(0,o.jsx)("aside",{className:`aaravpos-sidebar ${i?"open":""}`,children:t})]}),i&&(0,o.jsx)("div",{className:"aaravpos-sidebar-mobile",children:(0,o.jsx)("div",{className:"aaravpos-sidebar-mobile-content",children:t})})]})}var Vs=({pro:e,selectedStaffServices:t=[],totalPrice:r=0,totalDuration:n=0,goToStep:a})=>{const{outletName:i}=(0,F.useSelector)(l=>l.outletDetails),{isService:s}=(0,F.useSelector)(l=>l.outletDetails),d=t.length>0;return console.log("--isService---36",s),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,o.jsxs)("p",{className:"aaravpos-order-subtitle",children:[i||"-"," Outlet"]})]}),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-body",children:[e?.id&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"aaravpos-order-section-title",style:{marginBottom:8},children:"Selected Professional"}),(0,o.jsxs)("div",{className:"aaravpos-pro-card aaravpos-display-flex aaravpos-mb-10 aaravpos-tp-10",children:[e.imageUrl?(0,o.jsx)("img",{src:e.imageUrl,alt:e.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:e.color||"#111"},children:mt(e.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:e.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:e.staff_type})]})]})]}),s&&e?.id&&(0,o.jsx)("p",{className:"aaravpos-order-section-title",children:"Selected Services"}),(0,o.jsx)("ul",{className:s?s&&e?.id?"aaravpos-pro-order-list":"aaravpos-pro-order-list-single":"aaravpos-pro-order-list-pro",children:d&&t?.length>0&&t.map(l=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:l.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:l.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Ut,{size:13}),(0,o.jsxs)("span",{children:[l.min_time||l.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(de,{size:12}),l.price||l.min_price]})]})]},l.id))})]}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-footer",children:[s&&e?.id&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(de,{size:16}),r]})]}),(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Duration"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[n," min"]})]})]}),(0,o.jsx)("button",{disabled:s?!t.length:!e,onClick:()=>a("time"),className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[s?"Choose Time":"Choose Services",(0,o.jsx)(Ze,{size:16})]})})]})]})]})]})};function bf(){const{width:e}=$a(),t=(0,F.useDispatch)(),{staff:r,selectedProfessional:n}=(0,F.useSelector)(d=>d.service),a=e<768,i=!r||r.length===0,s=d=>{if(!d?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const l=new Date,c=d.futureLeaveDates.find(u=>{if(u.status!=="APPROVED"||u.leaveType!=="FULL_DAY")return!1;const f=new Date(u.startDate),p=new Date(u.endDate);return l>=f&&l<=p});return c?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(c.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(Vs,{pro:n,goToStep:()=>t(ve())}),children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Available based on selected services"}),i&&(0,o.jsx)("p",{className:"aaravpos-no-staff",children:"No staff available for selected services"}),(0,o.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-staff-grid",children:r?.map((d,l)=>{const{isOnLeave:c,availableFrom:u}=s(d);return(0,o.jsxs)("div",{onClick:()=>{t(Is(d)),t(at(null)),a&&t(ve())},className:`aaravpos-pro-card ${n?.id===d.id?"active":""}`,children:[(0,o.jsxs)("div",{className:"aaravpos-display-flex",children:[d.imageUrl?(0,o.jsx)("img",{src:d.imageUrl,alt:d.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:d.color||"#111"},children:mt(d.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:d.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:d.staff_type})]})]}),c&&u&&(0,o.jsxs)("div",{className:"aaravpos-available-badge",children:[(0,o.jsx)("span",{className:"aaravpos-available-dot"}),(0,o.jsxs)("p",{className:"aaravpos-available-text",children:["Available from ",u]})]})]},l)})})})]})]})}var Nf=e=>Number(e.price||e.min_price||0),Mn=(e,{perUnit:t=!1}={})=>{const r=Nf(e),n=t?1:e.qty||1;return!e.taxRows||!e.taxRows.length?0:e.taxRows.reduce((a,i)=>i.isActive?i.taxType==="FIXED"?a+i.taxRate*n:i.taxType==="PERCENTAGE"?a+r*n*i.taxRate/100:a:a,0)};function Sf(){const e=(0,F.useDispatch)(),{width:t}=$a(),{staff:r,selectedServices:n,selectedProfessional:a}=(0,F.useSelector)($=>$.service),[i,s]=(0,S.useState)(!1),d=n.map($=>$.id),l=(0,S.useMemo)(()=>{if(!a?.id)return[];const $=r.find(y=>y.id===a.id);return $?n.map(y=>{const g=$?.assignments?.find(x=>x.id===y?.id),h={...y,price:g?.price||y.price||y.min_price||0,duration:g?.duration||y.estimated_time||y.min_time||0};return{...h,tax:Mn(h)}}):[]},[a,r,n]),c=l.reduce(($,y)=>$+Number(y.price||y.min_price||0)*y.qty,0),u=l.reduce(($,y)=>$+(y?.duration||0)*y.qty,0),f=(0,S.useMemo)(()=>d.length?r.filter($=>{const y=$.assignments??[];return d?.every(g=>y.some(h=>String(h.id)===String(g)&&!!h?.assigned))}):[],[r,d]),p=t<768,m=d.length>0;(0,S.useEffect)(()=>{if(m&&f.length===0){const $=setTimeout(()=>s(!0),300);return()=>clearTimeout($)}else s(!1)},[m,f]);const v=$=>{if(!$?.futureLeaveDates?.length)return{isOnLeave:!1,availableFrom:null};const y=new Date,g=$.futureLeaveDates.find(h=>{if(h.status!=="APPROVED"||h.leaveType!=="FULL_DAY")return!1;const x=new Date(h.startDate),P=new Date(h.endDate);return y>=x&&y<=P});return g?.returnDate?.date?{isOnLeave:!0,availableFrom:new Date(g.returnDate.date).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}:{isOnLeave:!1,availableFrom:null}};return(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(Vs,{pro:a,selectedStaffServices:l,totalPrice:c,totalDuration:u,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!n.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Time ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Professional"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Available based on selected services"}),i&&(0,o.jsx)("p",{className:"aaravpos-no-staff",children:"No staff available for selected services"}),(0,o.jsx)("div",{className:"aaravpos-staff-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-staff-grid",children:f.map(($,y)=>{const{isOnLeave:g,availableFrom:h}=v($);return(0,o.jsxs)("div",{onClick:()=>{e(Is($)),e(at(null)),p&&e(ve())},className:`aaravpos-pro-card ${a?.id===$.id?"active":""}`,children:[(0,o.jsxs)("div",{className:"aaravpos-display-flex",children:[$.imageUrl?(0,o.jsx)("img",{src:$.imageUrl,alt:$.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:$.color||"#111"},children:mt($.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:$.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:$.staff_type})]})]}),g&&h&&(0,o.jsxs)("div",{className:"aaravpos-available-badge",children:[(0,o.jsx)("span",{className:"aaravpos-available-dot"}),(0,o.jsxs)("p",{className:"aaravpos-available-text",children:["Available from ",h]})]})]},y)})})})]})]})}function zs({selectedServices:e,totalPrice:t,goToStep:r}){const{outletName:n}=(0,F.useSelector)(i=>i?.outletDetails),{isService:a}=(0,F.useSelector)(i=>i.outletDetails);return(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsx)("p",{className:"aaravpos-order-title",children:"Your Order"}),(0,o.jsxs)("p",{className:"aaravpos-order-subtitle",children:[n||"-"," Outlet"]})]}),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-body",children:[(0,o.jsx)("p",{className:"aaravpos-order-section-title",children:"SELECTED SERVICES"}),(0,o.jsx)("ul",{className:"aaravpos-order-list",children:e?.length>0&&e?.map(i=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:i.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:i.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Ut,{size:13}),(0,o.jsxs)("span",{children:[i.min_time||i.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(de,{size:12}),i.price||i.min_price]})]})]},i.id))})]}),(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-footer",children:[(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Subtotal"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(de,{size:16}),t]})]}),(0,o.jsx)("div",{children:(0,o.jsx)("button",{onClick:()=>r("professionals"),disabled:!e.length,className:"aaravpos-common-btn",children:(0,o.jsxs)("span",{className:"aaravpos-common-btn-content",children:[a?"Choose Professional":"Choose Time",(0,o.jsx)(Ze,{size:16})]})})})]})]})]})}function Gs(){return(0,o.jsx)("div",{className:"aaravpos-skeleton-card",children:(0,o.jsx)("div",{className:"aaravpos-skeleton-shimmer",style:{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent)",animation:"shimmer 1.2s infinite"}})})}function Cf(){const e=(0,F.useDispatch)(),t=(0,S.useRef)(null),r=(0,S.useRef)(null),{superCategories:n,selectedServices:a,selectedProfessional:i,loading:s}=(0,F.useSelector)(b=>b.service),[d,l]=(0,S.useState)(null),[c,u]=(0,S.useState)(null),[f,p]=(0,S.useState)(""),m=new Set(i?i?.assignments?.map(b=>b.id):[]),v=new Set(i?i?.assignments?.map(b=>b.categoryId):[]),$=n?.map(b=>({...b,categories:b.categories?.map(N=>({...N,services:N.services?.filter(E=>m.has(E.id))||[]})).filter(N=>v.has(N.id)&&N.services.length>0)||[]})).filter(b=>b.categories.length>0)||[],y=(0,S.useMemo)(()=>d?c?c?.services||[]:d?.categories?.flatMap(b=>b.services||[])||[]:[],[d,c]),g=(0,S.useMemo)(()=>$?.flatMap(b=>b.categories?.flatMap(N=>N.services||[]))||[],[$]),h=(0,S.useMemo)(()=>{const b=f.trim().toLowerCase();return b?g.filter(N=>N.name?.toLowerCase().includes(b)||N.description?.toLowerCase().includes(b)):y},[f,g,y]),x=b=>b.taxRows?.some(N=>N.isActive)||!1,P=a.reduce((b,N)=>b+Number(N.price||N.min_price||0)*N.qty,0);return(0,S.useEffect)(()=>{if(!$?.length)return;const b=$.find(N=>N?.categories?.some(E=>E?.services?.length>0));b&&!d&&(l(b),u(null))},[$,d]),(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(zs,{selectedServices:a,totalPrice:P,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!a.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Time ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsxs)("div",{className:"aaravpos-navbar-form",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Choose a Service"}),(0,o.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from ",i?.name,"'s available services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(ya,{size:14})}),(0,o.jsx)("input",{id:"search",name:"search",type:"text",placeholder:"Search services...",value:f,onChange:b=>p(b.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>p(""),className:"aaravpos-search-clear",children:(0,o.jsx)(pt,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:b=>{t.current&&(t.current.scrollLeft+=b.deltaY)},className:"aaravpos-supercategory-wrapper",children:$?.map(b=>(0,o.jsx)("button",{onClick:()=>{l(b),u(null)},className:`aaravpos-supercategory-btn ${d?.id===b.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:b?.isStandAloneCategory?"Standalone":b.name})},b.id))}),d?.categories?.some(b=>b?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:b=>{r.current&&(r.current.scrollLeft+=b.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${c?"":"active"}`,children:["All Services (",d?.categories?.reduce((b,N)=>b+(N?.services?.length||0),0),")"]}),d?.categories?.map(b=>(0,o.jsxs)("button",{onClick:()=>u(b),className:`aaravpos-supercategory-btn ${c?.id===b.id?"active":""}`,children:[b.name," (",b.services.length,")"]},b.id))]}),(0,o.jsx)("div",{className:"aaravpos-services-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-services-grid",children:s?Array.from({length:10}).map((b,N)=>(0,o.jsx)(Gs,{},N)):(0,o.jsx)(o.Fragment,{children:h?.length?h?.map((b,N)=>(0,o.jsxs)("div",{onClick:()=>{const E=a.find(A=>A.id===b.id);E&&E.qty===1?e(Nr(String(b.id))):e(br({...b,price:b.price?Number(b.price):void 0}))},className:`aaravpos-service-card ${a.some(E=>E.id===b.id)?"active":""}`,children:[x(b)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),fa(b)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:b.name}),(0,o.jsxs)("div",{className:"aaravpos-service-description-wrapper",children:[(0,o.jsx)("p",{className:"aaravpos-service-description",children:b.description}),b.description&&b.description.length>30&&(0,o.jsx)("div",{className:"aaravpos-service-tooltip",children:b.description})]}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:b.estimated_time?`${b.estimated_time} min`:`${b.min_time}-${b.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:b.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),b.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),b.min_price," - ",(0,o.jsx)(de,{size:14}),b.max_price]})})]}),(0,o.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,o.jsx)("button",{onClick:E=>{E.stopPropagation(),e(Nr(String(b.id)))},className:"aaravpos-service-action-btn",children:(0,o.jsx)(Ls,{size:14})}),(0,o.jsx)("span",{className:"aaravpos-service-qty",children:a.find(E=>E.id===b.id)?.qty||0}),(0,o.jsx)("button",{onClick:E=>{E.stopPropagation(),a.find(A=>A.id===b.id)?e(js(String(b.id))):e(br({...b,price:b.price?Number(b.price):void 0}))},className:"aaravpos-service-action-btn plus",children:(0,o.jsx)(va,{size:14})})]})]},N)):(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:f?"No services found for your search.":"No services are available for this professional."})]})})})})]})]})}function xf(){const e=(0,F.useDispatch)(),t=(0,S.useRef)(null),r=(0,S.useRef)(null),{superCategories:n,selectedServices:a,loading:i}=(0,F.useSelector)(h=>h.service),{outletName:s}=(0,F.useSelector)(h=>h?.outletDetails),[d,l]=(0,S.useState)(null),[c,u]=(0,S.useState)(null),[f,p]=(0,S.useState)(""),m=(0,S.useMemo)(()=>d?c?c?.services||[]:d?.categories?.flatMap(h=>h.services||[])||[]:[],[d,c]),v=(0,S.useMemo)(()=>n?.flatMap(h=>h?.categories?.flatMap(x=>x.services||[]))||[],[n]),$=(0,S.useMemo)(()=>{const h=f.trim().toLowerCase();return h?v.filter(x=>x.name?.toLowerCase().includes(h)||x.description?.toLowerCase().includes(h)):m},[f,v,m]),y=h=>h.taxRows?.some(x=>x.isActive)||!1,g=a.reduce((h,x)=>h+Number(x.price||x.min_price||0)*x.qty,0);return(0,S.useEffect)(()=>{if(!n?.length)return;const h=n.find(x=>x?.categories?.some(P=>P?.services?.length>0));h&&!d&&(l(h),u(null))},[n,d]),(0,o.jsxs)(Je,{sidebar:(0,o.jsx)(zs,{selectedServices:a,totalPrice:g,goToStep:()=>e(ve())}),renderButton:(0,o.jsx)("button",{onClick:()=>e(ve()),disabled:!a.length,className:"aaravpos-btn",children:(0,o.jsxs)("span",{className:"aaravpos-btn-content",children:["Choose Professional ",(0,o.jsx)(Ze,{size:16})]})}),children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsxs)("div",{className:"aaravpos-navbar-form",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Book A Service"}),(0,o.jsxs)("p",{className:"aaravpos-sub-title",children:["Select from"," ",(0,o.jsx)("span",{className:"aaravpos-text-bold",children:s})," Outlet's available services"]})]}),(0,o.jsxs)("div",{className:"aaravpos-search-wrapper",children:[(0,o.jsx)("span",{className:"aaravpos-search-icon",children:(0,o.jsx)(ya,{size:14})}),(0,o.jsx)("input",{type:"text",placeholder:"Search services...",value:f,onChange:h=>p(h.target.value),className:"aaravpos-search-input"}),(0,o.jsx)("div",{className:"aaravpos-search-actions",children:f&&(0,o.jsx)("button",{onClick:()=>p(""),className:"aaravpos-search-clear",children:(0,o.jsx)(pt,{size:16})})})]})]}),(0,o.jsx)("div",{ref:t,onWheel:h=>{t.current&&(t.current.scrollLeft+=h.deltaY)},className:"aaravpos-supercategory-wrapper",children:n?.filter(h=>h?.categories?.some(x=>x?.services?.length>0))?.map(h=>(0,o.jsx)("button",{onClick:()=>{l(h),u(null)},className:`aaravpos-supercategory-btn ${d?.id===h.id?"active":""}`,children:(0,o.jsx)("h3",{className:"aaravpos-supercategory-title",children:h?.isStandAloneCategory?"Standalone":h.name})},h.id))}),d?.categories?.some(h=>h?.services?.length>0)&&(0,o.jsxs)("div",{ref:r,onWheel:h=>{r.current&&(r.current.scrollLeft+=h.deltaY)},className:"aaravpos-supercategory-wrapper",children:[(0,o.jsxs)("button",{onClick:()=>u(null),className:`aaravpos-supercategory-btn ${c?"":"active"}`,children:["All Services (",d?.categories?.reduce((h,x)=>h+(x?.services?.length||0),0),")"]}),d?.categories?.filter(h=>h?.services?.length>0)?.map(h=>(0,o.jsxs)("button",{onClick:()=>u(h),className:`aaravpos-supercategory-btn ${c?.id===h.id?"active":""}`,children:[h.name," (",h.services.length,")"]},h.id))]}),(0,o.jsx)("div",{className:"aaravpos-services-wrapper",children:(0,o.jsx)("div",{className:"aaravpos-services-grid",children:i?Array.from({length:10}).map((h,x)=>(0,o.jsx)(Gs,{},x)):(0,o.jsx)(o.Fragment,{children:$?.length?$?.map((h,x)=>(0,o.jsxs)("div",{onClick:()=>{const P=a.find(b=>b.id===h.id);P&&P.qty===1?e(Nr(String(h.id))):e(br(h))},className:`aaravpos-service-card ${a.some(P=>P.id===h.id)?"active":""}`,children:[y(h)&&(0,o.jsx)("span",{className:"aaravpos-tax-badge",children:"TAX"}),fa(h)&&(0,o.jsx)("span",{className:"aaravpos-consent-badge",children:"CONSENT"}),(0,o.jsx)("p",{className:"aaravpos-service-title",children:h.name}),(0,o.jsxs)("div",{className:"aaravpos-service-description-wrapper",children:[(0,o.jsx)("p",{className:"aaravpos-service-description",children:h.description}),h.description&&h.description.length>30&&(0,o.jsx)("div",{className:"aaravpos-service-tooltip",children:h.description})]}),(0,o.jsxs)("p",{className:"aaravpos-service-price",children:[(0,o.jsx)("span",{children:h.estimated_time?`${h.estimated_time} min`:`${h.min_time}-${h.max_time} min`}),(0,o.jsx)("span",{className:"aaravpos-service-price-right",children:h.price?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),h.price]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),h.min_price," - ",(0,o.jsx)(de,{size:14}),h.max_price]})})]}),(0,o.jsxs)("div",{className:"aaravpos-service-actions",children:[(0,o.jsx)("button",{onClick:P=>{P.stopPropagation(),e(Nr(String(h.id)))},className:"aaravpos-service-action-btn",children:(0,o.jsx)(Ls,{size:14})}),(0,o.jsx)("span",{className:"aaravpos-service-qty",children:a.find(P=>P.id===h.id)?.qty||0}),(0,o.jsx)("button",{onClick:P=>{P.stopPropagation(),a.find(b=>b.id===h.id)?e(js(String(h.id))):e(br(h))},className:"aaravpos-service-action-btn plus",children:(0,o.jsx)(va,{size:14})})]})]},x)):(0,o.jsxs)("div",{className:"aaravpos-empty-services",children:[(0,o.jsx)("h3",{className:"aaravpos-empty-services-title",children:"No Services Found"}),(0,o.jsx)("p",{className:"aaravpos-empty-services-text",children:f?"No services found for your search.":"No services are available for selected category."})]})})})})]})]})}var Pf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ga({buttonText:e,onButtonClick:t,showTaxesOnlyIfTime:r=!1,showTip:n=!1,tipPct:a=0,onTipChange:i,consentRequired:s=!1,consentCompleted:d=0,totalConsents:l=0,checkingConsent:c=!1,loading:u=!1,isBookingDisabled:f=!1,handleSidebarOpen:p}){const{selectedSlotIndexes:m,slots:v,selectedDate:$}=(0,F.useSelector)(T=>T.slots),{staff:y,selectedServices:g,selectedProfessional:h}=(0,F.useSelector)(T=>T.service),{timeZone:x}=(0,F.useSelector)(T=>T.outletDetails),P=me.DateTime.now().setZone(x??"UTC"),[b,N]=(0,S.useState)(""),[E,A]=(0,S.useState)(!1),z=(0,S.useRef)(null),Z=(0,S.useRef)(null),[ae,ie]=(0,S.useState)(0),k=[0,5,10,15,20],H=(0,S.useMemo)(()=>[...v?.morning||[],...v?.afternoon||[],...v?.evening||[]],[v]),X=15,q=(0,S.useMemo)(()=>{if(!h?.id)return[];const T=y?.find(_=>_.id===h.id);return T?g.map(_=>{const J=T.assignments?.find(Ie=>Ie.id===_.id),ue={..._,price:J?.price||_.price||_.min_price||0,duration:J?.duration||_.estimated_time||_.min_time||0};return{...ue,tax:Mn(ue),unitTax:Mn(ue,{perUnit:!0})}}):[]},[h,y,g]),fe=q.reduce((T,_)=>T+Number(_.price)*(_.qty||1),0),te=q.reduce((T,_)=>T+Number(_.duration)*(_.qty||1),0),oe=Math.ceil(te/X),je=T=>{if(!H.length)return"";const _=H[T]?.start_time,J=H[T+oe-1];return!_||!J?"":`${_} - ${J.end_time||J.start_time}`},I=$||{day:P.day,month:P.month,year:P.year},C=m?.[0],O=C!==void 0?je(C):null,M=I.month??0,R=O?`${Pf[M]} ${I.day} at ${O}`:null,L=q.reduce((T,_)=>T+_.tax,0),B=Number(a)||0,U=n?fe*B/100:0,V=fe+L+U;(0,S.useEffect)(()=>{n&&a==null&&i?.(0)},[n,a,i]);const W=(0,S.useMemo)(()=>u?"Processing...":c?"Checking consents...":s&&d<l?`Sign Consents (${d}/${l})`:(0,o.jsxs)(o.Fragment,{children:[e||"Book Appointment",(0,o.jsx)(Yu,{})]}),[u,c,s,d,l,e]),G=f||u||c||!O;return(0,S.useEffect)(()=>{const T=()=>{const J=z.current?.offsetHeight||0,ue=Z.current?.offsetHeight||0,Ie=(J+(window.innerWidth<=991?186:205)||0)+ue;ie(window.innerHeight-Ie)};T();const _=new ResizeObserver(()=>{T()});return Z.current&&_.observe(Z.current),z.current&&_.observe(z.current),window.addEventListener("resize",T),()=>{_.disconnect(),window.removeEventListener("resize",T)}},[q,n,d,l,E]),(0,o.jsxs)("div",{className:"aaravpos-order-sidebar",children:[(0,o.jsxs)("div",{className:"aaravpos-order-header",children:[(0,o.jsxs)("p",{className:"aaravpos-order-title",children:["Your Order",p&&(0,o.jsx)("button",{onClick:p,className:"aaravpos-sidebar-close-btn",children:(0,o.jsx)(pt,{})})]}),h?.id&&(0,o.jsxs)("div",{className:"aaravpos-pro-card aaravpos-display-flex aaravpos-mb-10 aaravpos-tp-10",children:[h.imageUrl?(0,o.jsx)("img",{src:h.imageUrl,alt:h.name,className:"aaravpos-pro-image"}):(0,o.jsx)("div",{className:"aaravpos-pro-avatar",style:{background:h.color||"#111"},children:mt(h.name)}),(0,o.jsxs)("div",{className:"aaravpos-pro-info",children:[(0,o.jsx)("p",{className:"aaravpos-pro-name",children:h.name}),(0,o.jsx)("p",{className:"aaravpos-pro-type",children:h.staff_type})]})]}),(0,o.jsxs)("div",{className:"aaravpos-date-time",children:[(0,o.jsx)("span",{className:"aaravpos-date-time-label",children:"Date & Time:"}),R?(0,o.jsx)("span",{className:"aaravpos-date-time-value",children:R}):(0,o.jsx)("span",{className:"aaravpos-date-time-empty",children:"No time selected"})]})]}),(0,o.jsx)("ul",{className:"aaravpos-order-list",style:{height:`${ae}px`},children:q?.length>0&&q.map(T=>(0,o.jsxs)("li",{className:"aaravpos-order-item",children:[(0,o.jsx)("div",{className:"aaravpos-main-text",children:(0,o.jsx)("p",{className:"aaravpos-order-service-name",children:T.name})}),(0,o.jsxs)("div",{className:"aaravpos-order-details",children:[(0,o.jsxs)("div",{className:"aaravpos-order-detail",children:[(0,o.jsx)(ha,{size:13}),(0,o.jsx)("span",{children:T.qty})]}),(0,o.jsxs)("div",{className:"aaravpos-order-detail center",children:[(0,o.jsx)(Ut,{size:13}),(0,o.jsxs)("span",{children:[T.min_time||T.estimated_time," min"]})]}),(0,o.jsxs)("p",{className:"aaravpos-order-detail right",children:[(0,o.jsx)(de,{size:12}),T.price||T.min_price]})]})]},T.id))}),(0,o.jsxs)("div",{className:"third",ref:Z,children:[n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"aaravpos-tip-title",children:"Add Tip"}),(0,o.jsx)("div",{className:"aaravpos-tip-options",children:[...k,"custom"].map((T,_)=>{const J=T==="custom",ue=J?E:B===T,Ie=_===0,Vt=_===[...k,"custom"].length-1;return(0,o.jsx)("button",{onClick:()=>{J?(A(!0),i?.(Number(b)||0)):(A(!1),N(""),i?.(Number(T)))},className:`aaravpos-tip-btn
|
|
22
22
|
${Ie||Vt?"aaravpos-tip-btn-fixed":"aaravpos-tip-btn-flex"} ${ue?"aaravpos-tip-btn-active":""}`,children:J?"Custom":T===0?"No tip":`${T}%`},T)})}),E&&(0,o.jsx)("div",{className:"aaravpos-tip-input-wrapper",children:(0,o.jsx)("input",{id:"number",name:"number",type:"number",placeholder:"Enter %",value:b,onChange:T=>{const _=T.target.value;(_===""||Number(_)>=0&&Number(_)<=100)&&(N(_),i?.(Number(_)||0))},className:"aaravpos-tip-input"})})]}),s&&d<l&&(0,o.jsxs)("div",{className:"aaravpos-consent-box",children:[(0,o.jsxs)("p",{className:"aaravpos-consent-text",children:["Consent Required:"," ",d,"/",l," completed"]}),(0,o.jsx)("div",{className:"aaravpos-consent-progress",children:(0,o.jsx)("div",{className:"aaravpos-consent-progress-bar",style:{width:`${d/l*100}%`}})})]}),(0,o.jsxs)("div",{className:"aaravpos-mt-auto",children:[(0,o.jsx)(pn,{label:"Service",value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),fe.toFixed(2)]})}),n&&(0,o.jsx)(pn,{label:`Tip (${B}%)`,value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),U.toFixed(2)]})}),(!r||O)&&(0,o.jsx)(pn,{label:"Taxes",value:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de,{size:14}),L.toFixed(2)]})}),(0,o.jsx)("div",{className:"aaravpos-divider"}),(0,o.jsxs)("div",{className:"aaravpos-order-subtotal",children:[(0,o.jsx)("span",{className:"aaravpos-order-subtotal-label",children:"Total"}),(0,o.jsxs)("span",{className:"aaravpos-order-subtotal-price",children:[(0,o.jsx)(de,{size:16}),V.toFixed(2)]})]}),(0,o.jsx)("button",{onClick:t,disabled:G,className:"aaravpos-common-btn aaravpos-padding-btn",style:{height:42},children:(0,o.jsx)("span",{className:"aaravpos-common-btn-content",children:W})})]})]})]})}function pn({label:e,value:t}){return(0,o.jsxs)("div",{className:"aaravpos-summary-row",children:[(0,o.jsx)("span",{className:"aaravpos-summary-label",children:e}),(0,o.jsx)("span",{className:"aaravpos-summary-value",children:t})]})}var yt=({dateObj:e,selectedProfessional:t,outletTimeZone:r})=>{if(!t)return!1;const n=me.DateTime.fromISO(e.fullDate||"").setZone(r),a=n.toFormat("yyyy-MM-dd");if((t?.futureLeaveDates||[]).some(c=>{if(c.status!=="APPROVED"||c.leaveType!=="FULL_DAY")return!1;const u=c?.leavePeriod?.date;return u?me.DateTime.fromISO(u).toFormat("yyyy-MM-dd")===a:!1}))return!0;const i=(t?.dateOverrides||[]).find(c=>me.DateTime.fromISO(c.date).toFormat("yyyy-MM-dd")===a);if(i?.type==="CLOSED")return!0;if(i?.type==="TIME")return!1;const s=t?.weeklyHours?.weeklyJson||{},d={1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat",7:"sun"}[n.weekday],l=s?.[d];return!!(!l||l.isClosed)},wf=e=>{try{if(!e)throw new Error("Missing timezone");const t=me.DateTime.now().setZone(e);if(!t.isValid)throw new Error("Invalid timezone");return Array.from({length:6},(r,n)=>{const a=t.plus({months:n}).startOf("month");return{label:a.toFormat("LLLL yyyy"),monthIdx:a.month,year:a.year,startDow:a.startOf("month").weekday%7,days:a.daysInMonth||0}})}catch(t){return console.error("generateMonths error:",t),[]}},_f=["S","M","T","W","T","F","S"];function Of({isOpen:e,onClose:t}){const r=(0,F.useDispatch)(),{selectedDate:n}=(0,F.useSelector)(p=>p.slots),{selectedProfessional:a}=(0,F.useSelector)(p=>p.service),{timeZone:i}=(0,F.useSelector)(p=>p.outletDetails),[s]=(0,S.useState)(wf(i||"")),[d,l]=(0,S.useState)(0),c=s[d];if(!e)return null;const u=me.DateTime.now().setZone(i??"UTC"),f=(p,m)=>{const v=me.DateTime.fromObject({year:c.year,month:p,day:m}),$={day:m,month:p,year:c.year,fullDate:v.toISODate()||""};v.startOf("day")<u.startOf("day")||yt({dateObj:$,selectedProfessional:a,outletTimeZone:i||"UTC"})||(r(at({month:p,day:m,year:c.year})),t())};return(0,o.jsx)("div",{className:"aaravpos-date-modal-overlay",onClick:p=>p.target===p.currentTarget&&t(),children:(0,o.jsxs)("div",{className:"aaravpos-date-modal",children:[(0,o.jsxs)("div",{className:"aaravpos-date-modal-header",children:[(0,o.jsx)("h2",{className:"aaravpos-date-modal-title",children:"Pick a Date"}),(0,o.jsx)("button",{onClick:t,className:"aaravpos-date-close-btn",children:(0,o.jsx)(pt,{})})]}),(0,o.jsxs)("div",{className:"aaravpos-date-modal-body",children:[(0,o.jsxs)("div",{className:"aaravpos-date-nav",children:[(0,o.jsx)("button",{disabled:d===0,onClick:()=>l(p=>Math.max(p-1,0)),className:"aaravpos-date-nav-btn",children:(0,o.jsx)(Sr,{})}),(0,o.jsx)("div",{className:"aaravpos-date-month-label",children:c?.label}),(0,o.jsx)("button",{disabled:d===s.length-1,onClick:()=>l(p=>Math.min(p+1,s.length-1)),className:"aaravpos-date-nav-btn",children:(0,o.jsx)(Ze,{})})]}),(0,o.jsxs)("div",{className:"aaravpos-calendar-grid",children:[_f.map((p,m)=>(0,o.jsx)("div",{className:"aaravpos-calendar-weekday",children:p},m)),Array.from({length:c?.startDow||0}).map((p,m)=>(0,o.jsx)("div",{},`e${m}`)),Array.from({length:c?.days||0},(p,m)=>m+1).map(p=>{const m=n?.month===c?.monthIdx&&n?.day===p,v=c?.monthIdx===u.month&&p===u.day,$=me.DateTime.fromObject({year:c.year,month:c.monthIdx,day:p}),y={day:p,month:c.monthIdx,year:c.year,fullDate:$.toISODate()||""},g=$.startOf("day")<u.startOf("day"),h=yt({dateObj:y,selectedProfessional:a,outletTimeZone:i||"UTC"});return(0,o.jsxs)("div",{onClick:()=>{h||f(c.monthIdx,p)},className:["aaravpos-calendar-day",!m&&!h&&"aaravpos-calendar-day-active",v&&!m&&"aaravpos-calendar-day-today",m&&"aaravpos-calendar-day-selected",h&&"aaravpos-calendar-day-disabled",g&&"aaravpos-calendar-day-disabled"].filter(Boolean).join(" "),children:[h&&(0,o.jsx)("div",{className:"aaravpos-calendar-day-slash"}),(0,o.jsx)("span",{className:"aaravpos-calendar-day-text",children:p})]},p)})]})]})]})})}var yi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ef=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function jf(){const e=(0,F.useDispatch)(),[t,r]=(0,S.useState)(11),{staff:n,selectedServices:a,selectedProfessional:i}=(0,F.useSelector)(I=>I.service),{tenantId:s,timeZone:d}=(0,F.useSelector)(I=>I?.outletDetails),{selectedSlotIndexes:l,selectedDate:c,selectedTime:u,slots:f,loading:p}=(0,F.useSelector)(I=>I.slots),[m,v]=(0,S.useState)(!1),[$,y]=(0,S.useState)(0),g=15,h=(0,S.useMemo)(()=>[f.morning,f.afternoon,f.evening].flat(),[f]),x=(0,S.useMemo)(()=>me.DateTime.now().setZone(d),[d]),P=I=>{try{if(!I.isValid)throw new Error("Invalid timezone or start date");return Array.from({length:180},(O,M)=>{const R=I.plus({days:M});return R.isValid?{day:R.day,month:R.month,year:R.year,fullDate:R.toISODate()}:null}).filter(Boolean)}catch(C){return console.error("generateDates error:",C),[]}},b=(0,S.useMemo)(()=>P(x),[x]),N=(0,S.useMemo)(()=>{if(!i?.id)return[];const I=n?.find(C=>C.id===i.id);return I?a.map(C=>{const O=I.assignments?.find(M=>M.id===C.id);return{...C,price:O?.price||C.price||C.min_price||0,duration:O?.duration||C.estimated_time||C.min_time||0,qty:O?.qty||1}}):[]},[i,n,a]),E=N.reduce((I,C)=>I+Number(C.duration)*(C.qty||1),0),A=Math.ceil(E/g),z=c?me.DateTime.fromObject(c).toFormat("yyyy-MM-dd"):null;(0,S.useEffect)(()=>{!i?.id||!z||e(rr({tenantId:s,staffId:i.id,date:z}))},[i?.id,z,e,s]);const Z=I=>{y(C=>Math.max(0,Math.min(b.length-11,C+I*4)))};(0,S.useEffect)(()=>{c||e(at({day:x.day,month:x.month,year:x.year}))},[]),(0,S.useEffect)(()=>{if(!c||!b.length)return;const I=b.findIndex(C=>C.day===c.day&&C.month===c.month&&C.year===c.year);I!==-1&&y(Math.max(0,Math.min(b.length-t,I-Math.floor(t/2))))},[c,b,t]);const ae=I=>{if(yt({dateObj:I,selectedProfessional:i,outletTimeZone:d||"UTC"})){ne.toast.warning("Staff is unavailable on this date");return}e(at({day:I.day,month:I.month,year:I.year})),e(ln(null))},ie=I=>{if(!h.length)return;const C=h.slice(I,I+A);if(C.length<A){ne.toast.warning("You don't have sufficient time for selected service");return}if(C.some(M=>M.isBooked||M.status!=="AVAILABLE")){ne.toast.warning("Selected time range is not fully available");return}e(ln(h[I].start_time));const O=Array.from({length:A},(M,R)=>I+R);e(dn({indexes:O,ids:O.map(M=>h[M]?.id)}))};(0,S.useEffect)(()=>{if(!u||!h.length)return;const I=h.findIndex(O=>O.start_time===u);if(I===-1)return;const C=Array.from({length:A},(O,M)=>I+M);C.length===l.length&&C.every((O,M)=>O===l[M])||e(dn({indexes:C,ids:C.map(O=>h[O]?.id)}))},[u,h,A,l]),(0,S.useEffect)(()=>{if(!h.length||A===0)return;let I=!1;for(let C=0;C<=h.length-A;C++)if(h.slice(C,C+A).every(O=>!O.isBooked&&O.status==="AVAILABLE")){ie(C),I=!0;break}I||(e(ln(null)),e(dn({indexes:[],ids:[]})))},[h,A]),(0,S.useEffect)(()=>{const I=()=>{const C=window.innerWidth;C<1024?r(5):C<1280?r(7):r(11)};return I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[]);const k=f?.morning||[],H=f?.afternoon||[],X=f?.evening||[],q=I=>I.some(C=>!C.isBooked&&C.status==="AVAILABLE"),fe=()=>q(k)?"morning":q(H)?"afternoon":q(X)?"evening":null,[te,oe]=(0,S.useState)(fe()),je=()=>{let I=null;for(let C=1;C<b.length;C++){const O=x.plus({days:C});if(!yt({dateObj:{day:O.day,month:O.month,year:O.year,fullDate:O.toISODate()},selectedProfessional:i,outletTimeZone:d||"UTC"})){I=O;break}}I&&e(at({day:I.day,month:I.month,year:I.year}))};return(0,S.useEffect)(()=>{const I=h[l[0]];I&&(k.some(C=>C.id===I.id)?oe("morning"):H.some(C=>C.id===I.id)?oe("afternoon"):X.some(C=>C.id===I.id)&&oe("evening"))},[l,h,k,H,X]),(0,S.useEffect)(()=>{const I=O=>O?.some(M=>!M.isBooked&&M.status==="AVAILABLE"),C=!I(k)&&!I(H)&&!I(X);!p&&C&&je()},[k,H,X]),(0,o.jsxs)(Je,{sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(ga,{buttonText:"Fill Details",onButtonClick:()=>{if(!u||!l.length){ne.toast.warning("Please select a time slot");return}e(ve())},showTaxesOnlyIfTime:!0})}),renderButton:(0,o.jsx)("button",{onClick:()=>{if(!u||!l.length){ne.toast.warning("Please select a time slot");return}e(ve())},disabled:!u||!l.length,className:"aaravpos-btn",children:(0,o.jsx)("span",{className:"aaravpos-btn-content",children:"Fill Details"})}),children:[(0,o.jsx)(Xe,{}),(0,o.jsx)("div",{style:{marginTop:15},children:(0,o.jsx)("h1",{className:"aaravpos-page-title",style:{marginBottom:10},children:"Choose a Time"})}),(0,o.jsxs)("div",{className:"arravpos-date-wrapper",children:[(0,o.jsxs)("div",{className:"arravpos-date-strip",children:[(0,o.jsx)($i,{onClick:()=>Z(-1),children:(0,o.jsx)(Sr,{size:20})}),b.slice($,$+t).map(I=>{const C=me.DateTime.fromISO(I.fullDate||""),O=C.weekday%7,M=me.DateTime.now().setZone(d).startOf("day"),R=C.hasSame(M,"day"),L=c?.day===I.day&&c?.month===I.month&&c?.year===I.year,B=yt({dateObj:I,selectedProfessional:i,outletTimeZone:d||"UTC"});return(0,o.jsxs)("div",{onClick:()=>{B||ae(I)},className:["arravpos-date-card",B?"arravpos-date-card-disabled":L?"arravpos-date-card-active":"arravpos-date-card-default"].filter(Boolean).join(" "),children:[B&&(0,o.jsx)("div",{className:"arravpos-date-disabled-slash"}),(0,o.jsx)("span",{className:"arravpos-date-week",children:Ef[O]}),(0,o.jsx)("span",{className:"arravpos-date-day",children:I.day}),R&&!L&&!B&&(0,o.jsx)("span",{className:"arravpos-date-today",children:"TODAY"}),B&&(0,o.jsx)("span",{className:"arravpos-date-unavailable",children:"UNAVAILABLE"})]},`${I.day}-${I.month}-${I.year}`)}),(0,o.jsx)($i,{onClick:()=>Z(1),children:(0,o.jsx)(Ze,{size:20})})]}),(0,o.jsxs)("button",{onClick:()=>v(!0),className:"arravpos-calendar-btn",children:[(0,o.jsx)(_u,{size:16}),c?.month!=null?`${yi[c.month-1]} ${c.year}`:`${yi[x.month-1]} ${x.year}`]})]}),(0,o.jsxs)("div",{className:"arravpos-selected-professional",children:[i?.imageUrl?(0,o.jsx)("img",{src:i.imageUrl,alt:i.name,className:"arravpos-selected-professional-image"}):(0,o.jsx)("div",{className:"arravpos-selected-professional-avatar",style:{background:i?.color||"#111"},children:mt(i?.name)}),(0,o.jsxs)("div",{className:"arravpos-selected-professional-content",children:[(0,o.jsx)("p",{className:"arravpos-selected-professional-name",children:i?.name}),(0,o.jsxs)("p",{className:"arravpos-selected-professional-services",children:[N.map(I=>I.name).join(", ")," ·"," ",E," mins"]})]})]}),(0,o.jsxs)("div",{className:"arravpos-scroll-area",style:p?{height:300}:{},children:[p?(0,o.jsx)("div",{className:"arravpos-loader-wrapper",children:(0,o.jsx)("div",{className:"arravpos-loader"})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(mn,{label:"Morning",icon:(0,o.jsx)(cf,{size:18,className:"arravpos-slot-icon"}),slots:k,allSlots:h,selectedSlotIndexes:l,handleSlotSelect:ie,isOpen:te==="morning",onToggle:()=>oe(te==="morning"?null:"morning")}),(0,o.jsx)(mn,{label:"Afternoon",icon:(0,o.jsx)(df,{size:18,className:"arravpos-slot-icon"}),slots:H,allSlots:h,selectedSlotIndexes:l,handleSlotSelect:ie,isOpen:te==="afternoon",onToggle:()=>oe(te==="afternoon"?null:"afternoon")}),(0,o.jsx)(mn,{label:"Evening",icon:(0,o.jsx)(qu,{size:18,className:"arravpos-slot-icon"}),slots:X,allSlots:h,selectedSlotIndexes:l,handleSlotSelect:ie,isOpen:te==="evening",onToggle:()=>oe(te==="evening"?null:"evening")})]}),(0,o.jsx)(Of,{isOpen:m,onClose:()=>v(!1)})]})]})}function $i({onClick:e,children:t}){return(0,o.jsx)("button",{onClick:e,className:"arravpos-date-nav-btn",children:t})}function mn({icon:e,label:t,slots:r,allSlots:n,selectedSlotIndexes:a,handleSlotSelect:i,isOpen:s,onToggle:d}){return!r||r?.length===0?null:(0,o.jsxs)("div",{className:"arravpos-slot-section",children:[(0,o.jsxs)("div",{onClick:d,className:"arravpos-slot-section-header",children:[(0,o.jsxs)("div",{className:"arravpos-slot-section-title",children:[(0,o.jsx)("span",{children:e}),t]}),(0,o.jsx)("span",{className:`arravpos-slot-section-arrow ${s?"arravpos-slot-section-arrow-open":""}`,children:(0,o.jsx)(ks,{})})]}),s&&(0,o.jsx)("div",{className:"arravpos-slot-section-content",children:(0,o.jsx)("div",{className:"arravpos-slot-grid",children:r.map(l=>{const c=n.findIndex(p=>p.id===l.id),u=a.includes(c),f=l.isBooked||l.status!=="AVAILABLE";return(0,o.jsxs)("div",{onClick:()=>{f||i(c)},className:`arravpos-slot-card ${f?"arravpos-slot-card-disabled":u?"arravpos-slot-card-selected":"arravpos-slot-card-default"}`,children:[(0,o.jsx)("span",{className:"arravpos-slot-time",children:l.start_time}),(0,o.jsx)("span",{className:"arravpos-slot-status",children:f?"Booked":"Available"})]},l.id)})})})]})}var If=e=>e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim(),Tf=e=>{const t=e.replace(/\D/g,"").slice(0,4);return t.length>=3?`${t.slice(0,2)}/${t.slice(2)}`:t},Af=e=>e.replace(/\D/g,"").slice(0,3);function Df({onClose:e,onPay:t,amount:r}){const{timeZone:n}=(0,F.useSelector)(u=>u?.outletDetails),{control:a,handleSubmit:i,reset:s,formState:{errors:d,isSubmitting:l}}=(0,Me.useForm)({defaultValues:{name:"",number:"",expiry:"",cvv:""}}),c=async u=>{await t({name:u.name.trim(),number:u.number.trim(),expiry:u.expiry,cvv:u.cvv})&&e()};return(0,o.jsx)("div",{className:"arravpos-payment-overlay",children:(0,o.jsx)("form",{onSubmit:i(c),className:"arravpos-payment-form",children:(0,o.jsxs)("div",{className:"aaravpos-modal",children:[(0,o.jsxs)("div",{className:"arravpos-payment-header",children:[(0,o.jsx)("h2",{className:"arravpos-payment-title",children:"Make a payment"}),(0,o.jsxs)("span",{className:"arravpos-payment-amount",children:[(0,o.jsx)(de,{size:14}),r?.toFixed(2)]})]}),(0,o.jsxs)("div",{className:"arravpos-payment-fields",children:[(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"name",className:"arravpos-payment-label",children:["Card Holder Name ",(0,o.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,o.jsx)(Me.Controller,{name:"name",control:a,rules:{required:"Name required",pattern:{value:/^[A-Za-z ]+$/,message:"Only letters allowed"}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"name",autoComplete:"cc-name",placeholder:"Card Holder Name",onChange:f=>{const p=f.target.value.replace(/[^A-Za-z ]/g,"");u.onChange(p)},className:"arravpos-custom-input"})}),d.name&&(0,o.jsx)("p",{className:"arravpos-payment-error",children:d.name.message})]}),(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"number",className:"arravpos-payment-label",children:["Card Number ",(0,o.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,o.jsx)(Me.Controller,{name:"number",control:a,rules:{required:"Card number required",validate:u=>u.replace(/\s/g,"").length===16||"Must be 16 digits"},render:({field:u})=>(0,o.jsx)("input",{...u,id:"number",placeholder:"4242 4242 4242 4242",onChange:f=>{u.onChange(If(f.target.value))},className:"arravpos-custom-input"})}),d.number&&(0,o.jsx)("p",{className:"arravpos-payment-error",children:d.number.message})]}),(0,o.jsxs)("div",{className:"arravpos-payment-grid",children:[(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"expiry",className:"arravpos-payment-label",children:["Expiry Date ",(0,o.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,o.jsx)(Me.Controller,{name:"expiry",control:a,rules:{required:"Expiry required",validate:u=>{if(!/^\d{2}\/\d{2}$/.test(u))return"Invalid format";const[f,p]=u.split("/").map(Number);if(f<1||f>12)return"Invalid month";const m=me.DateTime.now().setZone(n),v=m.year%100,$=m.month;return p<v||p===v&&f<$?"Card expired":!0}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"expiry",placeholder:"MM/YY",onChange:f=>{u.onChange(Tf(f.target.value))},className:"arravpos-custom-input"})}),d.expiry&&(0,o.jsx)("p",{className:"arravpos-payment-error",children:d.expiry.message})]}),(0,o.jsxs)("div",{className:"aaravpos-form-control",children:[(0,o.jsxs)("label",{htmlFor:"cvv",className:"arravpos-payment-label",children:["CVV ",(0,o.jsx)("span",{className:"arravpos-payment-required",children:"*"})]}),(0,o.jsx)(Me.Controller,{name:"cvv",control:a,rules:{required:"CVV required",minLength:{value:3,message:"3 digits required"}},render:({field:u})=>(0,o.jsx)("input",{...u,id:"cvv",placeholder:"CVV",onChange:f=>{u.onChange(Af(f.target.value))},className:"arravpos-custom-input"})}),d.cvv&&(0,o.jsx)("p",{className:"arravpos-payment-error",children:d.cvv.message})]})]})]}),(0,o.jsxs)("div",{className:"arravpos-payment-btn-grid",children:[(0,o.jsx)("button",{type:"button",onClick:()=>{s(),e()},className:"arravpos-payment-cancel-btn",children:"Cancel"}),(0,o.jsx)("button",{type:"submit",disabled:l,className:"arravpos-payment-submit-btn",children:l?"Processing...":"Proceed"})]})]})})})}function kn(){return kn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kn.apply(null,arguments)}function Mf(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function kf(e,t){if(e==null)return{};var r,n,a=Mf(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function dt(e){"@babel/helpers - typeof";return dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(e)}function Rf(e,t){if(dt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ff(e){var t=Rf(e,"string");return dt(t)=="symbol"?t:t+""}function gi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ff(n.key),n)}}function Lf(e,t,r){return t&&gi(e.prototype,t),r&&gi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rn(e,t){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Rn(e,t)}function Uf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rn(e,t)}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cr(e)}function Ws(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ws=function(){return!!e})()}function Vf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zf(e,t){if(t&&(dt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vf(e)}function Gf(e){var t=Ws();return function(){var r,n=Cr(e);if(t){var a=Cr(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return zf(this,r)}}var Wf=xe((e=>{var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,d=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,$=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,h=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function P(N){if(typeof N=="object"&&N!==null){var E=N.$$typeof;switch(E){case r:switch(N=N.type,N){case c:case u:case a:case s:case i:case p:return N;default:switch(N=N&&N.$$typeof,N){case l:case f:case $:case v:case d:return N;default:return E}}case n:return E}}}function b(N){return P(N)===u}e.AsyncMode=c,e.ConcurrentMode=u,e.ContextConsumer=l,e.ContextProvider=d,e.Element=r,e.ForwardRef=f,e.Fragment=a,e.Lazy=$,e.Memo=v,e.Portal=n,e.Profiler=s,e.StrictMode=i,e.Suspense=p,e.isAsyncMode=function(N){return b(N)||P(N)===c},e.isConcurrentMode=b,e.isContextConsumer=function(N){return P(N)===l},e.isContextProvider=function(N){return P(N)===d},e.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===r},e.isForwardRef=function(N){return P(N)===f},e.isFragment=function(N){return P(N)===a},e.isLazy=function(N){return P(N)===$},e.isMemo=function(N){return P(N)===v},e.isPortal=function(N){return P(N)===n},e.isProfiler=function(N){return P(N)===s},e.isStrictMode=function(N){return P(N)===i},e.isSuspense=function(N){return P(N)===p},e.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===a||N===u||N===s||N===i||N===p||N===m||typeof N=="object"&&N!==null&&(N.$$typeof===$||N.$$typeof===v||N.$$typeof===d||N.$$typeof===l||N.$$typeof===f||N.$$typeof===g||N.$$typeof===h||N.$$typeof===x||N.$$typeof===y)},e.typeOf=P})),qf=xe((e=>{process.env.NODE_ENV!=="production"&&(function(){"use strict";var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,d=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,$=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,h=t?Symbol.for("react.responder"):60118,x=t?Symbol.for("react.scope"):60119;function P(_){return typeof _=="string"||typeof _=="function"||_===a||_===u||_===s||_===i||_===p||_===m||typeof _=="object"&&_!==null&&(_.$$typeof===$||_.$$typeof===v||_.$$typeof===d||_.$$typeof===l||_.$$typeof===f||_.$$typeof===g||_.$$typeof===h||_.$$typeof===x||_.$$typeof===y)}function b(_){if(typeof _=="object"&&_!==null){var J=_.$$typeof;switch(J){case r:var ue=_.type;switch(ue){case c:case u:case a:case s:case i:case p:return ue;default:var Ie=ue&&ue.$$typeof;switch(Ie){case l:case f:case $:case v:case d:return Ie;default:return J}}case n:return J}}}var N=c,E=u,A=l,z=d,Z=r,ae=f,ie=a,k=$,H=v,X=n,q=s,fe=i,te=p,oe=!1;function je(_){return oe||(oe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(_)||b(_)===c}function I(_){return b(_)===u}function C(_){return b(_)===l}function O(_){return b(_)===d}function M(_){return typeof _=="object"&&_!==null&&_.$$typeof===r}function R(_){return b(_)===f}function L(_){return b(_)===a}function B(_){return b(_)===$}function U(_){return b(_)===v}function V(_){return b(_)===n}function W(_){return b(_)===s}function G(_){return b(_)===i}function T(_){return b(_)===p}e.AsyncMode=N,e.ConcurrentMode=E,e.ContextConsumer=A,e.ContextProvider=z,e.Element=Z,e.ForwardRef=ae,e.Fragment=ie,e.Lazy=k,e.Memo=H,e.Portal=X,e.Profiler=q,e.StrictMode=fe,e.Suspense=te,e.isAsyncMode=je,e.isConcurrentMode=I,e.isContextConsumer=C,e.isContextProvider=O,e.isElement=M,e.isForwardRef=R,e.isFragment=L,e.isLazy=B,e.isMemo=U,e.isPortal=V,e.isProfiler=W,e.isStrictMode=G,e.isSuspense=T,e.isValidElementType=P,e.typeOf=b})()})),qs=xe(((e,t)=>{process.env.NODE_ENV==="production"?t.exports=Wf():t.exports=qf()})),Hf=xe(((e,t)=>{var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(d){if(d==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(d)}function s(){try{if(!Object.assign)return!1;var d=new String("abc");if(d[5]="de",Object.getOwnPropertyNames(d)[0]==="5")return!1;for(var l={},c=0;c<10;c++)l["_"+String.fromCharCode(c)]=c;if(Object.getOwnPropertyNames(l).map(function(f){return l[f]}).join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}t.exports=s()?Object.assign:function(d,l){for(var c,u=i(d),f,p=1;p<arguments.length;p++){c=Object(arguments[p]);for(var m in c)n.call(c,m)&&(u[m]=c[m]);if(r){f=r(c);for(var v=0;v<f.length;v++)a.call(c,f[v])&&(u[f[v]]=c[f[v]])}}return u}})),ba=xe(((e,t)=>{var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r})),Hs=xe(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),Kf=xe(((e,t)=>{var r=function(){};if(process.env.NODE_ENV!=="production"){var n=ba(),a={},i=Hs();r=function(d){var l="Warning: "+d;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function s(d,l,c,u,f){if(process.env.NODE_ENV!=="production"){for(var p in d)if(i(d,p)){var m;try{if(typeof d[p]!="function"){var v=Error((u||"React class")+": "+c+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}m=d[p](l,p,u,c,null,n)}catch(y){m=y}if(m&&!(m instanceof Error)&&r((u||"React class")+": type specification of "+c+" `"+p+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in a)){a[m.message]=!0;var $=f?f():"";r("Failed "+c+" type: "+m.message+($??""))}}}}s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},t.exports=s})),Yf=xe(((e,t)=>{var r=qs(),n=Hf(),a=ba(),i=Hs(),s=Kf(),d=function(){};process.env.NODE_ENV!=="production"&&(d=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function l(){return null}t.exports=function(c,u){var f=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function m(C){var O=C&&(f&&C[f]||C[p]);if(typeof O=="function")return O}var v="<<anonymous>>",$={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:P(),arrayOf:b,element:N(),elementType:E(),instanceOf:A,node:ie(),objectOf:Z,oneOf:z,oneOfType:ae,shape:H,exact:X};function y(C,O){return C===O?C!==0||1/C===1/O:C!==C&&O!==O}function g(C,O){this.message=C,this.data=O&&typeof O=="object"?O:{},this.stack=""}g.prototype=Error.prototype;function h(C){if(process.env.NODE_ENV!=="production")var O={},M=0;function R(B,U,V,W,G,T,_){if(W=W||v,T=T||V,_!==a){if(u){var J=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw J.name="Invariant Violation",J}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=W+":"+V;!O[ue]&&M<3&&(d("You are manually calling a React.PropTypes validation function for the `"+T+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),O[ue]=!0,M++)}}return U[V]==null?B?U[V]===null?new g("The "+G+" `"+T+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new g("The "+G+" `"+T+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:C(U,V,W,G,T)}var L=R.bind(null,!1);return L.isRequired=R.bind(null,!0),L}function x(C){function O(M,R,L,B,U,V){var W=M[R];if(te(W)!==C){var G=oe(W);return new g("Invalid "+B+" `"+U+"` of type "+("`"+G+"` supplied to `"+L+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return h(O)}function P(){return h(l)}function b(C){function O(M,R,L,B,U){if(typeof C!="function")return new g("Property `"+U+"` of component `"+L+"` has invalid PropType notation inside arrayOf.");var V=M[R];if(!Array.isArray(V)){var W=te(V);return new g("Invalid "+B+" `"+U+"` of type "+("`"+W+"` supplied to `"+L+"`, expected an array."))}for(var G=0;G<V.length;G++){var T=C(V,G,L,B,U+"["+G+"]",a);if(T instanceof Error)return T}return null}return h(O)}function N(){function C(O,M,R,L,B){var U=O[M];if(!c(U)){var V=te(U);return new g("Invalid "+L+" `"+B+"` of type "+("`"+V+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return h(C)}function E(){function C(O,M,R,L,B){var U=O[M];if(!r.isValidElementType(U)){var V=te(U);return new g("Invalid "+L+" `"+B+"` of type "+("`"+V+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return h(C)}function A(C){function O(M,R,L,B,U){if(!(M[R]instanceof C)){var V=C.name||v,W=I(M[R]);return new g("Invalid "+B+" `"+U+"` of type "+("`"+W+"` supplied to `"+L+"`, expected ")+("instance of `"+V+"`."))}return null}return h(O)}function z(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?d("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):d("Invalid argument supplied to oneOf, expected an array.")),l;function O(M,R,L,B,U){for(var V=M[R],W=0;W<C.length;W++)if(y(V,C[W]))return null;var G=JSON.stringify(C,function(_,J){return oe(J)==="symbol"?String(J):J});return new g("Invalid "+B+" `"+U+"` of value `"+String(V)+"` "+("supplied to `"+L+"`, expected one of "+G+"."))}return h(O)}function Z(C){function O(M,R,L,B,U){if(typeof C!="function")return new g("Property `"+U+"` of component `"+L+"` has invalid PropType notation inside objectOf.");var V=M[R],W=te(V);if(W!=="object")return new g("Invalid "+B+" `"+U+"` of type "+("`"+W+"` supplied to `"+L+"`, expected an object."));for(var G in V)if(i(V,G)){var T=C(V,G,L,B,U+"."+G,a);if(T instanceof Error)return T}return null}return h(O)}function ae(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&d("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var O=0;O<C.length;O++){var M=C[O];if(typeof M!="function")return d("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+je(M)+" at index "+O+"."),l}function R(L,B,U,V,W){for(var G=[],T=0;T<C.length;T++){var _=C[T],J=_(L,B,U,V,W,a);if(J==null)return null;J.data&&i(J.data,"expectedType")&&G.push(J.data.expectedType)}var ue=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new g("Invalid "+V+" `"+W+"` supplied to "+("`"+U+"`"+ue+"."))}return h(R)}function ie(){function C(O,M,R,L,B){return q(O[M])?null:new g("Invalid "+L+" `"+B+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return h(C)}function k(C,O,M,R,L){return new g((C||"React class")+": "+O+" type `"+M+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+L+"`.")}function H(C){function O(M,R,L,B,U){var V=M[R],W=te(V);if(W!=="object")return new g("Invalid "+B+" `"+U+"` of type `"+W+"` "+("supplied to `"+L+"`, expected `object`."));for(var G in C){var T=C[G];if(typeof T!="function")return k(L,B,U,G,oe(T));var _=T(V,G,L,B,U+"."+G,a);if(_)return _}return null}return h(O)}function X(C){function O(M,R,L,B,U){var V=M[R],W=te(V);if(W!=="object")return new g("Invalid "+B+" `"+U+"` of type `"+W+"` "+("supplied to `"+L+"`, expected `object`."));for(var G in n({},M[R],C)){var T=C[G];if(i(C,G)&&typeof T!="function")return k(L,B,U,G,oe(T));if(!T)return new g("Invalid "+B+" `"+U+"` key `"+G+"` supplied to `"+L+"`.\nBad object: "+JSON.stringify(M[R],null," ")+`
|
|
23
23
|
Valid keys: `+JSON.stringify(Object.keys(C),null," "));var _=T(V,G,L,B,U+"."+G,a);if(_)return _}return null}return h(O)}function q(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(q);if(C===null||c(C))return!0;var O=m(C);if(O){var M=O.call(C),R;if(O!==C.entries){for(;!(R=M.next()).done;)if(!q(R.value))return!1}else for(;!(R=M.next()).done;){var L=R.value;if(L&&!q(L[1]))return!1}}else return!1;return!0;default:return!1}}function fe(C,O){return C==="symbol"?!0:O?O["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&O instanceof Symbol:!1}function te(C){var O=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":fe(O,C)?"symbol":O}function oe(C){if(typeof C>"u"||C===null)return""+C;var O=te(C);if(O==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return O}function je(C){var O=oe(C);switch(O){case"array":case"object":return"an "+O;case"boolean":case"date":case"regexp":return"a "+O;default:return O}}function I(C){return!C.constructor||!C.constructor.name?v:C.constructor.name}return $.checkPropTypes=s,$.resetWarningCache=s.resetWarningCache,$.PropTypes=$,$}})),Zf=xe(((e,t)=>{var r=ba();function n(){}function a(){}a.resetWarningCache=n,t.exports=function(){function i(l,c,u,f,p,m){if(m!==r){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}i.isRequired=i;function s(){return i}var d={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:s,element:i,elementType:i,instanceOf:s,node:i,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:a,resetWarningCache:n};return d.PropTypes=d,d}})),Xf=xe(((e,t)=>{if(process.env.NODE_ENV!=="production"){var r=qs(),n=!0;t.exports=Yf()(r.isElement,n)}else t.exports=Zf()()})),w=Mt(Xf(),1);function Ke(e,t,r){this.x=e,this.y=t,this.time=r||new Date().getTime()}Ke.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1};Ke.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))};Ke.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time};function Na(e,t,r,n){this.startPoint=e,this.control1=t,this.control2=r,this.endPoint=n}Na.prototype.length=function(){for(var e=10,t=0,r=void 0,n=void 0,a=0;a<=e;a+=1){var i=a/e,s=this._point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),d=this._point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(a>0){var l=s-r,c=d-n;t+=Math.sqrt(l*l+c*c)}r=s,n=d}return t};Na.prototype._point=function(e,t,r,n,a){return t*(1-e)*(1-e)*(1-e)+3*r*(1-e)*(1-e)*e+3*n*(1-e)*e*e+a*e*e*e};function Jf(e,t,r){var n,a,i,s=null,d=0;r||(r={});var l=function(){d=r.leading===!1?0:Date.now(),s=null,i=e.apply(n,a),s||(n=a=null)};return function(){var c=Date.now();!d&&r.leading===!1&&(d=c);var u=t-(c-d);return n=this,a=arguments,u<=0||u>t?(s&&(clearTimeout(s),s=null),d=c,i=e.apply(n,a),s||(n=a=null)):!s&&r.trailing!==!1&&(s=setTimeout(l,u)),i}}function ee(e,t){var r=this,n=t||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.throttle="throttle"in n?n.throttle:16,this.minDistance="minDistance"in n?n.minDistance:5,this.throttle?this._strokeMoveUpdate=Jf(ee.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=ee.prototype._strokeUpdate,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onBegin=n.onBegin,this.onEnd=n.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(a){a.which===1&&(r._mouseButtonDown=!0,r._strokeBegin(a))},this._handleMouseMove=function(a){r._mouseButtonDown&&r._strokeMoveUpdate(a)},this._handleMouseUp=function(a){a.which===1&&r._mouseButtonDown&&(r._mouseButtonDown=!1,r._strokeEnd(a))},this._handleTouchStart=function(a){if(a.targetTouches.length===1){var i=a.changedTouches[0];r._strokeBegin(i)}},this._handleTouchMove=function(a){a.preventDefault();var i=a.targetTouches[0];r._strokeMoveUpdate(i)},this._handleTouchEnd=function(a){a.target===r._canvas&&(a.preventDefault(),r._strokeEnd(a))},this.on()}ee.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0};ee.prototype.fromDataURL=function(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Image,a=r.ratio||window.devicePixelRatio||1,i=r.width||this._canvas.width/a,s=r.height||this._canvas.height/a;this._reset(),n.src=e,n.onload=function(){t._ctx.drawImage(n,0,0,i,s)},this._isEmpty=!1};ee.prototype.toDataURL=function(e){var t;switch(e){case"image/svg+xml":return this._toSVG();default:for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return(t=this._canvas).toDataURL.apply(t,[e].concat(n))}};ee.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()};ee.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)};ee.prototype.isEmpty=function(){return this._isEmpty};ee.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),typeof this.onBegin=="function"&&this.onBegin(e)};ee.prototype._strokeUpdate=function(e){var t=e.clientX,r=e.clientY,n=this._createPoint(t,r),a=this._data[this._data.length-1],i=a&&a[a.length-1],s=i&&n.distanceTo(i)<this.minDistance;if(!(i&&s)){var d=this._addPoint(n),l=d.curve,c=d.widths;l&&c&&this._drawCurve(l,c.start,c.end),this._data[this._data.length-1].push({x:n.x,y:n.y,time:n.time,color:this.penColor})}};ee.prototype._strokeEnd=function(e){var t=this.points.length>2,r=this.points[0];if(!t&&r&&this._drawDot(r),r){var n=this._data[this._data.length-1],a=n[n.length-1];r.equals(a)||n.push({x:r.x,y:r.y,time:r.time,color:this.penColor})}typeof this.onEnd=="function"&&this.onEnd(e)};ee.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)};ee.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)};ee.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor};ee.prototype._createPoint=function(e,t,r){var n=this._canvas.getBoundingClientRect();return new Ke(e-n.left,t-n.top,r||new Date().getTime())};ee.prototype._addPoint=function(e){var t=this.points,r=void 0;if(t.push(e),t.length>2){t.length===3&&t.unshift(t[0]),r=this._calculateCurveControlPoints(t[0],t[1],t[2]);var n=r.c2;r=this._calculateCurveControlPoints(t[1],t[2],t[3]);var a=r.c1,i=new Na(t[1],n,a,t[2]),s=this._calculateCurveWidths(i);return t.shift(),{curve:i,widths:s}}return{}};ee.prototype._calculateCurveControlPoints=function(e,t,r){var n=e.x-t.x,a=e.y-t.y,i=t.x-r.x,s=t.y-r.y,d={x:(e.x+t.x)/2,y:(e.y+t.y)/2},l={x:(t.x+r.x)/2,y:(t.y+r.y)/2},c=Math.sqrt(n*n+a*a),u=Math.sqrt(i*i+s*s),f=d.x-l.x,p=d.y-l.y,m=u/(c+u),v={x:l.x+f*m,y:l.y+p*m},$=t.x-v.x,y=t.y-v.y;return{c1:new Ke(d.x+$,d.y+y),c2:new Ke(l.x+$,l.y+y)}};ee.prototype._calculateCurveWidths=function(e){var t=e.startPoint,r=e.endPoint,n={start:null,end:null},a=this.velocityFilterWeight*r.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(a);return n.start=this._lastWidth,n.end=i,this._lastVelocity=a,this._lastWidth=i,n};ee.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)};ee.prototype._drawPoint=function(e,t,r){var n=this._ctx;n.moveTo(e,t),n.arc(e,t,r,0,2*Math.PI,!1),this._isEmpty=!1};ee.prototype._drawCurve=function(e,t,r){var n=this._ctx,a=r-t,i=Math.floor(e.length());n.beginPath();for(var s=0;s<i;s+=1){var d=s/i,l=d*d,c=l*d,u=1-d,f=u*u,p=f*u,m=p*e.startPoint.x;m+=3*f*d*e.control1.x,m+=3*u*l*e.control2.x,m+=c*e.endPoint.x;var v=p*e.startPoint.y;v+=3*f*d*e.control1.y,v+=3*u*l*e.control2.y,v+=c*e.endPoint.y;var $=t+c*a;this._drawPoint(m,v,$)}n.closePath(),n.fill()};ee.prototype._drawDot=function(e){var t=this._ctx,r=typeof this.dotSize=="function"?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,r),t.closePath(),t.fill()};ee.prototype._fromData=function(e,t,r){for(var n=0;n<e.length;n+=1){var a=e[n];if(a.length>1)for(var i=0;i<a.length;i+=1){var s=a[i],d=new Ke(s.x,s.y,s.time),l=s.color;if(i===0)this.penColor=l,this._reset(),this._addPoint(d);else if(i!==a.length-1){var c=this._addPoint(d),u=c.curve,f=c.widths;u&&f&&t(u,f,l)}}else{this._reset();var p=a[0];r(p)}}};ee.prototype._toSVG=function(){var e=this,t=this._data,r=this._canvas,n=Math.max(window.devicePixelRatio||1,1),a=0,i=0,s=r.width/n,d=r.height/n,l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttributeNS(null,"width",r.width),l.setAttributeNS(null,"height",r.height),this._fromData(t,function(y,g,h){var x=document.createElement("path");if(!isNaN(y.control1.x)&&!isNaN(y.control1.y)&&!isNaN(y.control2.x)&&!isNaN(y.control2.y)){var P="M "+y.startPoint.x.toFixed(3)+","+y.startPoint.y.toFixed(3)+" "+("C "+y.control1.x.toFixed(3)+","+y.control1.y.toFixed(3)+" ")+(y.control2.x.toFixed(3)+","+y.control2.y.toFixed(3)+" ")+(y.endPoint.x.toFixed(3)+","+y.endPoint.y.toFixed(3));x.setAttribute("d",P),x.setAttribute("stroke-width",(g.end*2.25).toFixed(3)),x.setAttribute("stroke",h),x.setAttribute("fill","none"),x.setAttribute("stroke-linecap","round"),l.appendChild(x)}},function(y){var g=document.createElement("circle"),h=typeof e.dotSize=="function"?e.dotSize():e.dotSize;g.setAttribute("r",h),g.setAttribute("cx",y.x),g.setAttribute("cy",y.y),g.setAttribute("fill",y.color),l.appendChild(g)});var c="data:image/svg+xml;base64,",u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'+(' viewBox="'+a+" "+i+" "+s+" "+d+'"')+(' width="'+s+'"')+(' height="'+d+'"')+">",f=l.innerHTML;if(f===void 0){var p=document.createElement("dummy"),m=l.childNodes;p.innerHTML="";for(var v=0;v<m.length;v+=1)p.appendChild(m[v].cloneNode(!0));f=p.innerHTML}var $=u+f+"</svg>";return c+btoa($)};ee.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,function(r,n){return t._drawCurve(r,n.start,n.end)},function(r){return t._drawDot(r)}),this._data=e};ee.prototype.toData=function(){return this._data};var Qf=xe(((e,t)=>{(function(r,n){typeof e=="object"&&typeof t=="object"?t.exports=n():typeof define=="function"&&define.amd?define([],n):typeof e=="object"?e.trimCanvas=n():r.trimCanvas=n()})(e,function(){return(function(r){function n(i){if(a[i])return a[i].exports;var s=a[i]={exports:{},id:i,loaded:!1};return r[i].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}var a={};return n.m=r,n.c=a,n.p="",n(0)})([function(r,n){"use strict";function a(c){var u=c.getContext("2d"),f=c.width,p=c.height,m=u.getImageData(0,0,f,p).data,v=d(!0,f,p,m),$=d(!1,f,p,m),y=l(!0,f,p,m),g=l(!1,f,p,m)-y+1,h=$-v+1,x=u.getImageData(y,v,g,h);return c.width=g,c.height=h,u.clearRect(0,0,g,h),u.putImageData(x,0,0),c}function i(c,u,f,p){return{red:p[4*(f*u+c)],green:p[4*(f*u+c)+1],blue:p[4*(f*u+c)+2],alpha:p[4*(f*u+c)+3]}}function s(c,u,f,p){return i(c,u,f,p).alpha}function d(c,u,f,p){for(var m=c?1:-1,v=c?0:f-1;c?v<f:v>-1;v+=m)for(var $=0;$<u;$++)if(s($,v,u,p))return v;return null}function l(c,u,f,p){for(var m=c?1:-1,v=c?0:u-1;c?v<u:v>-1;v+=m)for(var $=0;$<f;$++)if(s(v,$,u,p))return v;return null}Object.defineProperty(n,"__esModule",{value:!0}),n.default=a}])})})),e0=Mt(Qf(),1),t0=["canvasProps","clearOnResize"],qr=(function(e){Uf(r,e);var t=Gf(r);function r(){var n;Bf(this,r);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return n=t.call.apply(t,[this].concat(i)),n.staticThis=n.constructor,n._sigPad=null,n._canvas=null,n.setRef=function(d){n._canvas=d,n._canvas===null&&(n._sigPad=null)},n._excludeOurProps=function(){var d=n.props;return d.canvasProps,d.clearOnResize,kf(d,t0)},n.componentDidMount=function(){var d=n.getCanvas();n._sigPad=new ee(d,n._excludeOurProps()),n._resizeCanvas(),n.on()},n.componentWillUnmount=function(){n.off()},n.componentDidUpdate=function(){Object.assign(n._sigPad,n._excludeOurProps())},n.getCanvas=function(){if(n._canvas===null)throw n.staticThis.refNullError;return n._canvas},n.getTrimmedCanvas=function(){var d=n.getCanvas(),l=document.createElement("canvas");return l.width=d.width,l.height=d.height,l.getContext("2d").drawImage(d,0,0),(0,e0.default)(l)},n.getSignaturePad=function(){if(n._sigPad===null)throw n.staticThis.refNullError;return n._sigPad},n._checkClearOnResize=function(){n.props.clearOnResize&&n._resizeCanvas()},n._resizeCanvas=function(){var d,l,c=(d=n.props.canvasProps)!==null&&d!==void 0?d:{},u=c.width,f=c.height;if(!(typeof u<"u"&&typeof f<"u")){var p=n.getCanvas(),m=Math.max((l=window.devicePixelRatio)!==null&&l!==void 0?l:1,1);typeof u>"u"&&(p.width=p.offsetWidth*m),typeof f>"u"&&(p.height=p.offsetHeight*m),p.getContext("2d").scale(m,m),n.clear()}},n.render=function(){var d=n.props.canvasProps;return S.default.createElement("canvas",kn({ref:n.setRef},d))},n.on=function(){return window.addEventListener("resize",n._checkClearOnResize),n.getSignaturePad().on()},n.off=function(){return window.removeEventListener("resize",n._checkClearOnResize),n.getSignaturePad().off()},n.clear=function(){return n.getSignaturePad().clear()},n.isEmpty=function(){return n.getSignaturePad().isEmpty()},n.fromDataURL=function(d,l){return n.getSignaturePad().fromDataURL(d,l)},n.toDataURL=function(d,l){return n.getSignaturePad().toDataURL(d,l)},n.fromData=function(d){return n.getSignaturePad().fromData(d)},n.toData=function(){return n.getSignaturePad().toData()},n}return Lf(r)})(S.Component);qr.propTypes={velocityFilterWeight:w.default.number,minWidth:w.default.number,maxWidth:w.default.number,minDistance:w.default.number,dotSize:w.default.oneOfType([w.default.number,w.default.func]),penColor:w.default.string,throttle:w.default.number,onEnd:w.default.func,onBegin:w.default.func,canvasProps:w.default.object,clearOnResize:w.default.bool};qr.defaultProps={clearOnResize:!0};qr.refNullError=new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");var r0=({onClose:e,onConfirm:t,enforcement:r,heading:n,consent:a})=>{const i=(0,S.useRef)(null),{register:s,handleSubmit:d,control:l,reset:c,watch:u,setValue:f,formState:{errors:p,isSubmitting:m}}=(0,Me.useForm)({defaultValues:{accepted:!1,typedName:"",signatureDataUrl:"",emailMe:!1},mode:"onChange"}),v=u("accepted"),$=u("typedName"),y=u("signatureDataUrl"),g=()=>{c(),r==="DRAW_SIGNATURE"&&i.current?.clear()},h=()=>{g(),e()},x=()=>{i.current?.clear(),f("signatureDataUrl","")},P=N=>{let E="";if(r==="DRAW_SIGNATURE"){const A=i.current;if(A&&!A.isEmpty())E=A.getCanvas().toDataURL("image/png");else return}t({accepted:r==="CHECKBOX_ONLY"?N.accepted:!1,typedName:r==="TYPED_NAME"?N.typedName.trim():"",signatureDataUrl:E,emailMe:N.emailMe}),g(),e()},b=!m&&(r==="CHECKBOX_ONLY"?v:r==="TYPED_NAME"?$?.trim().length>2:r==="DRAW_SIGNATURE"?!!y:!1);return(0,o.jsxs)("div",{className:"arravpos-consent-overlay",children:[(0,o.jsx)("div",{className:"arravpos-consent-backdrop"}),(0,o.jsxs)("div",{className:"arravpos-consent-modal",children:[(0,o.jsxs)("div",{className:"arravpos-consent-header",children:[(0,o.jsx)("h3",{className:"arravpos-consent-title",children:n||"Consent Form"}),(0,o.jsx)("button",{onClick:h,className:"arravpos-consent-close-btn",children:(0,o.jsx)(pt,{})})]}),(0,o.jsx)("div",{className:"arravpos-consent-content-wrapper",children:(0,o.jsx)("div",{className:"arravpos-consent-content-box",children:(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:a},className:"arravpos-consent-content"})})}),(0,o.jsxs)("form",{onSubmit:d(P),children:[r==="CHECKBOX_ONLY"&&(0,o.jsxs)("label",{className:"arravpos-consent-checkbox-label",htmlFor:"accepted",children:[(0,o.jsx)("input",{type:"checkbox",...s("accepted",{required:"You must accept terms"}),id:"accepted",className:"arravpos-consent-checkbox"}),(0,o.jsx)("span",{className:"arravpos-consent-checkbox-text",children:"I have read and agree to the terms above"})]}),r==="TYPED_NAME"&&(0,o.jsxs)("div",{className:"arravpos-consent-typed-wrapper",children:[(0,o.jsxs)("label",{className:"arravpos-consent-input-label",htmlFor:"typedName",children:["Full Name",(0,o.jsx)("span",{className:"arravpos-consent-required",children:"*"})]}),(0,o.jsx)("input",{...s("typedName",{required:"Name is required",validate:N=>N.trim().length>2||"Enter full name"}),id:"typedName",placeholder:"Type your full name",className:`arravpos-consent-input ${p.typedName?"arravpos-consent-input-error":"arravpos-consent-input-normal"}`}),(0,o.jsx)("p",{className:"arravpos-consent-helper-text",children:"By typing your name, you agree to the consent above"}),p.typedName&&(0,o.jsx)("p",{className:"arravpos-consent-error",children:p.typedName.message})]}),r==="DRAW_SIGNATURE"&&(0,o.jsx)(Me.Controller,{control:l,name:"signatureDataUrl",rules:{validate:()=>i.current&&!i.current.isEmpty()?!0:"Signature required"},render:({field:N})=>(0,o.jsxs)("div",{className:"arravpos-consent-signature-wrapper",children:[(0,o.jsx)(qr,{ref:i,canvasProps:{className:"arravpos-consent-signature-canvas"},onEnd:()=>{const E=i.current;if(!E)return;const A=E.getCanvas().toDataURL("image/png");N.onChange(A)}}),p.signatureDataUrl&&(0,o.jsx)("p",{className:"arravpos-consent-error arravpos-consent-error-signature",children:p.signatureDataUrl.message}),(0,o.jsxs)("div",{className:"arravpos-consent-signature-actions",children:[(0,o.jsxs)("button",{type:"button",onClick:x,className:"arravpos-consent-clear-btn",children:[(0,o.jsx)(tf,{size:14}),"Clear"]}),(0,o.jsxs)("label",{className:"arravpos-consent-email-label",htmlFor:"emailme",children:[(0,o.jsx)("input",{type:"checkbox",...s("emailMe"),id:"emailme",className:"arravpos-consent-email-checkbox"}),(0,o.jsx)("span",{className:"arravpos-consent-email-text",children:"Email me"})]})]})]})}),(0,o.jsxs)("div",{className:"arravpos-consent-footer",children:[(0,o.jsx)("button",{type:"button",onClick:h,className:"arravpos-consent-cancel-btn",children:"Cancel"}),(0,o.jsxs)("button",{type:"submit",disabled:!b,className:`arravpos-consent-submit-btn ${b?"arravpos-consent-submit-active":"arravpos-consent-submit-disabled"}`,children:[(0,o.jsx)(ma,{}),r==="DRAW_SIGNATURE"||r==="TYPED_NAME"?"Sign & Continue":"I Agree"]})]})]})]})]})},n0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Kt="consentDraftByService",a0=15,i0=e=>{const[t,r]=e.split("/");return+`${t}${r}`};function o0(){const e=(0,F.useDispatch)(),{tenantId:t,id:r}=(0,F.useSelector)(j=>j.outletDetails),{timeZone:n,image:a,outletName:i,address:s}=(0,F.useSelector)(j=>j.outletDetails),{staff:d,selectedServices:l,selectedProfessional:c}=(0,F.useSelector)(j=>j.service),{selectedSlotIds:u,selectedDate:f,selectedTime:p}=(0,F.useSelector)(j=>j.slots),{userDetails:m,bookingMode:v,tipPct:$}=(0,F.useSelector)(j=>j.appointment),y=Array.isArray(l)?l:[l],{selectedSlotIndexes:g,slots:h}=(0,F.useSelector)(j=>j.slots),[x,P]=(0,S.useState)(!1),[b,N]=(0,S.useState)(!1),[E,A]=(0,S.useState)(null),[z,Z]=(0,S.useState)("person"),[ae,ie]=(0,S.useState)(!1),[k,H]=(0,S.useState)(""),[X,q]=(0,S.useState)(""),[fe,te]=(0,S.useState)(null),[oe,je]=(0,S.useState)(null),[I,C]=(0,S.useState)({}),[O,M]=(0,S.useState)({}),[R,L]=(0,S.useState)(!1),[B,U]=(0,S.useState)(!1),V=(0,S.useRef)(!1),W=(0,S.useRef)(""),G=me.DateTime.now().setZone(n??"UTC"),T=y.map(j=>{const D=d?.find(re=>re.id===c?.id)?.assignments?.find(re=>re.id===j.id),K={...j,price:D?.price??j.price??j.min_price??0,duration:D?.duration??j.estimated_time??j.min_time??0};return{...K,duration:D?.duration??j.estimated_time??j.min_time??0,tax:vi(K),unitTax:vi(K,{perUnit:!0})}}),_=[...h?.morning??[],...h?.afternoon??[],...h?.evening??[]],J=T.reduce((j,D)=>j+Number(D.duration??0),0),ue=Math.ceil(J/a0),Ie=j=>{if(!_.length)return"";const D=_[j]?.start_time,K=_[j+ue-1];return!D||!K?"":`${D} - ${K.end_time??K.start_time}`},Vt={day:Number(f?.day??G.day),month:Number(f?.month??G.month),year:Number(f?.year??G.year)},Oa=g?.[0],Ea=Oa!==void 0?Ie(Oa):null,Rd=Ea?`${n0[Vt.month]} ${Vt.day} at ${Ea}`:null,Qr=T.reduce((j,D)=>j+Number(D.price)*(D.qty??1),0),ja=T.reduce((j,D)=>j+D.tax,0),Fd=Math.round(ja*100),Ia=Qr*$/100,Ld=Math.round(Ia*100),Ta=Qr+Ia+ja,Ce=(0,S.useMemo)(()=>y.filter(j=>!(!fa(j)||(j?.consent_rule?.enforcementMode??j?.enforcementMode)==="FIXED")),[y]),Bd=(0,S.useMemo)(()=>Ce.map(j=>String(j.id)).filter(Boolean),[Ce]),Ud=j=>{const D=j?.consent_template??j?.consentTemplate??null;return{heading:String(D?.heading??"").trim(),consent:String(D?.consent??"").trim()}},en=j=>{C(D=>({...D,[String(j)]:!0}))};(0,S.useEffect)(()=>{m&&Ce?.length>0&&Vd()},[m,Ce?.length]);const Vd=async()=>{const j=m?.id;if(j){L(!0);try{const D={};for(const K of Ce){const re=String(K.id),pe=String(K.consent_form_id??"");if(!re||!pe)continue;const le=di(K);if(!(le==="EVERY_X_DAYS"||le==="ONCE_PER_CUSTOMER")){D[re]={data:{checked:!0,needsSignature:!0}};continue}const Pe=!!(await ci(j,pe,re))?.data?.needsSignature;D[re]={data:{checked:!0,needsSignature:Pe}},Pe||en(re)}M(D)}catch(D){console.error(D)}finally{L(!1)}}},tn=(0,S.useMemo)(()=>Ce.filter(j=>{const D=String(j.id);if(I[D])return!1;const K=O[D];return!(K?.data?.checked&&K?.data?.needsSignature===!1)}),[Ce,I,O]),Aa=Bd.length,Da=Aa-tn.length,Ma=tn.length===0,ka=async()=>{if(!V.current){V.current=!0;try{if(!m?.firstName){ne.toast.warn("Please enter First Name before signing consent.");return}if(!m?.email&&!m?.phone){ne.toast.warn("Please enter Email or Mobile Number before signing consent.");return}const j=tn[0];if(!j){await rn();return}const D=String(j.id);if(W.current===D&&ae)return;W.current=D;const K=String(j.consent_form_id??"");if(!K){ne.toast.error("Consent form missing.");return}const re=li(j);if(!re){ne.toast.error("Consent enforcement method not found.");return}const pe=m?.id;if(di(j)!=="EVERY_VISIT"&&pe){const Te=!!(await ci(pe,K,D))?.data?.needsSignature;if(M(zt=>({...zt,[D]:{data:{checked:!0,needsSignature:Te}}})),!Te){en(D),ne.toast.success("Consent already signed for this service."),setTimeout(()=>ka(),250);return}}else M(Pe=>({...Pe,[D]:{data:{checked:!0,needsSignature:!0}}}));const{heading:le,consent:Ne}=Ud(j);if(!le||!Ne){ne.toast.error("Consent template missing.");return}H(le),q(Ne),te(re),je(D),ie(!0)}catch(j){console.error(j),ne.toast.error(j?.message??"Consent check failed")}finally{V.current=!1}}},zd=(j,D)=>{try{const K=localStorage.getItem(Kt),re=K?JSON.parse(K):{};re[String(j)]=D,localStorage.setItem(Kt,JSON.stringify(re))}catch(K){console.error("Failed to save consent draft",K)}},Gd=()=>{try{return JSON.parse(localStorage.getItem(Kt)??"{}")}catch{return{}}},Wd=j=>{const D=String(oe);if(!D)return;const K=Ce.find(Ne=>String(Ne.id)===D);if(!K)return;const re=String(K.consent_form_id??""),pe=li(K);if(!re||!pe){ne.toast.error("Consent form/method missing.");return}let le="CHECKBOX_ONLY";pe==="TYPED_NAME"?le="TYPED_NAME":pe==="DRAW_SIGNATURE"&&(le="SIGNATURE_IMAGE"),zd(D,{serviceId:D,concentFormId:re,signatureType:le,typedName:j?.typedName,isChecked:j?.accepted,signatureDataUrl:j?.signatureDataUrl,emailMe:j?.emailMe}),en(D),ie(!1),W.current="",ne.toast.success("Consent captured.")},qd=()=>{ie(!1),je(null)},Hd=async(j,D,K)=>{const re=Gd(),pe=Object.entries(re).map(([le,Ne])=>({serviceId:le,concentFormId:Ne.concentFormId,captured:Ne})).filter(le=>le.serviceId&&le.concentFormId);for(const le of pe){const{serviceId:Ne,concentFormId:Pe,captured:Te}=le,zt=Te.signatureType||(Te.typedName?"TYPED_NAME":Te.signatureDataUrl?"SIGNATURE_IMAGE":"CHECKBOX_ONLY"),Fa={tenantId:t,outletId:r,appointmentId:j,customerId:D,serviceId:Ne,formId:Pe,staffId:K,signatureType:zt,typedName:Te.typedName,imageUrl:Te.signatureDataUrl};zt==="CHECKBOX_ONLY"&&(Fa.isChecked=Te.isChecked??!0),await au(Fa)}localStorage.removeItem(Kt)};let Ra="";f&&(Ra=`${f?.year}-${String(f?.month+1).padStart(2,"0")}-${String(f?.day).padStart(2,"0")}`);const Kd={tenantId:t,outletId:r,staffId:c?.id,date:Ra,startTime:p,serviceIds:y.map(j=>j.id),slotIds:u,isWalkIn:!1,requiresConsent:Ce.length>0,customer:{first_name:m?.firstName,last_name:m?.lastName,email:m?.email,phone:m?.phone}},rn=async()=>{if(Ce.length&&!Ma){ne.toast.warn("Please complete all consent forms first");return}try{P(!0);const j=await e(nr(Kd)).unwrap(),D=j?.data??j,K=D.id||"",re=D.customerId||D.customer?.id||"",pe=D.staffId||c?.id||"";v==="booking"&&Da>0&&await Hd(K,re,pe),z==="card"?(A({appointmentId:K,customerId:re}),N(!0)):(e(cn(String(K))),e(ve()))}catch(j){const D=j?.payload?.message||j?.data?.message||j?.message||"Staff not working on this day";ne.toast.error(D)}finally{P(!1)}},Yd=async()=>{if(!p&&v==="booking")return void ne.toast.error("Select time");if(!m?.firstName)return void ne.toast.error("Enter first name");if(!m?.email&&!m?.phone)return void ne.toast.error("Email or phone required");Ce.length>0?Ma?await rn():await ka():await rn()},Zd=j=>{const D=j.replace(/\s/g,"");return/^4/.test(D)?"VISA":/^5[1-5]/.test(D)?"MASTERCARD":/^3[47]/.test(D)?"AMEX":/^6/.test(D)?"DISCOVER":"UNKNOWN"},Xd=async j=>{try{P(!0);const D=E?.appointmentId,K=String(E?.customerId);if(!D||!r)return ne.toast.error("Something went wrong."),!1;const re=Zd(j.number),pe=await ru({appointmentId:D,customerId:K,outletId:r,referenceNo:D,currency:"USD",amountCents:Math.round(Ta*100),tipAmountCents:z==="card"?Ld:0,taxAmountCents:z==="card"?Fd:0,transactionBody:{transactionOrigin:3,transactionCode:"WEB",isDebit:!0,processMethod:3,channelType:3,tenderInfo:{cardHolderName:j.name,cardNumber:j.number.replace(/\s/g,""),cardType:re,cardExpiry:i0(j.expiry),cvData:j.cvv},billingContact:{name:{firstName:m?.firstName??"",lastName:m?.lastName??""},email:m?.email??""}}}),le=pe?.data?.data??pe?.data??pe??{},Ne=le?.orderId;if(String(le?.mappedStatus).toLowerCase()==="succeeded"||String(le?.reasonMessage).toLowerCase()==="success"){if(ne.toast.success("Payment successful!"),Ne)try{await nu(Ne)}catch(Pe){ne.toast.warning(Pe instanceof Error?Pe.message:String(Pe??"Payment done, but finalize failed"))}}else ne.toast.warning("Payment pending");return N(!1),e(cn(String(E?.appointmentId))),e(ve()),!0}catch(D){return ne.toast.warning(D instanceof Error?D.message:"Payment failed, but appointment is booked"),N(!1),e(cn(String(E?.appointmentId))),e(ve()),!0}finally{P(!1)}},Jd=()=>N(!1),Qd=()=>!p||!m?.firstName||!m?.email&&!m?.phone;return(0,o.jsxs)(Je,{isSidebarOpen:B,handleSidebarOpen:()=>U(j=>!j),sidebar:(0,o.jsx)("div",{className:"aaravpos-aside",children:(0,o.jsx)(ga,{buttonText:"Book Appointment",onButtonClick:Yd,showTip:z==="card",tipPct:$,onTipChange:j=>e(ou(j??0)),consentRequired:Ce?.length>0,consentCompleted:Da,totalConsents:Aa,checkingConsent:R,loading:x,isBookingDisabled:Qd(),handleSidebarOpen:()=>U(j=>!j)})}),isConfirm:!0,children:[(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Xe,{}),(0,o.jsxs)("div",{className:"aaravpos-margin-top-20",children:[(0,o.jsx)("h1",{className:"aaravpos-page-title",children:"Confirm Booking"}),(0,o.jsx)("p",{className:"aaravpos-sub-title",children:"Review your appointment details before booking"}),(0,o.jsxs)("div",{className:"arravpos-booking-wrapper",children:[(0,o.jsxs)("div",{className:"arravpos-outlet-info",children:[a&&(0,o.jsx)("div",{className:"arravpos-outlet-logo",children:(0,o.jsx)("img",{src:a??"/logo.svg",alt:"Logo",className:"arravpos-outlet-logo-img"})}),(0,o.jsxs)("div",{className:"arravpos-outlet-content",children:[(0,o.jsx)("p",{className:"arravpos-outlet-name",children:i??"-"}),(0,o.jsxs)("p",{className:"arravpos-outlet-address",children:[s??"-",(0,o.jsx)("br",{})]})]})]}),(0,o.jsx)("div",{className:"arravpos-booking-scroll",children:(0,o.jsxs)("div",{className:"arravpos-booking-grid",children:[(0,o.jsxs)("div",{className:"arravpos-booking-column",children:[(0,o.jsx)(bi,{children:"Appointment"}),(0,o.jsxs)(s0,{children:[(0,o.jsxs)("div",{className:"arravpos-appointment-header",children:[(0,o.jsx)(d0,{pro:c}),(0,o.jsxs)("div",{className:"arravpos-appointment-content",children:[(0,o.jsx)("p",{className:"arravpos-appointment-name",children:c?.name}),(0,o.jsx)("p",{className:"arravpos-appointment-services",children:y.map(j=>j.name).join(", ")})]}),(0,o.jsxs)("span",{className:"arravpos-appointment-price",children:[(0,o.jsx)(de,{size:14}),Qr]})]}),(0,o.jsxs)("div",{className:"arravpos-appointment-date",children:[(0,o.jsx)(Eu,{}),(0,o.jsx)("span",{className:"arravpos-appointment-date-text",children:Rd??"No time selected"})]})]})]}),(0,o.jsxs)("div",{className:"arravpos-booking-column",children:[(0,o.jsx)(bi,{children:"Payment Method"}),(0,o.jsx)(Ni,{icon:(0,o.jsx)(of,{}),label:"Pay in person",selected:z==="person",onClick:()=>Z("person")}),(0,o.jsx)(Ni,{icon:(0,o.jsx)(Ru,{}),label:"Pay with card",selected:z==="card",onClick:()=>Z("card")})]})]})})]})]})]}),b&&(0,o.jsx)(Df,{onClose:Jd,onPay:Xd,amount:Ta}),ae&&oe&&(0,o.jsx)(r0,{enforcement:fe,heading:k,consent:X,onClose:qd,onConfirm:Wd},oe??"consent")]})}function s0({children:e}){return(0,o.jsx)("div",{className:"arravpos-card-box",children:e})}function d0({pro:e}){return(0,o.jsx)(o.Fragment,{children:e.imageUrl?(0,o.jsx)("img",{src:e.imageUrl,alt:e.name,className:"arravpos-profile-image"}):(0,o.jsx)("div",{className:"arravpos-profile-avatar",style:{background:e.color??"#111"},children:mt(e.name)})})}function bi({children:e}){return(0,o.jsx)("p",{className:"arravpos-section-label",children:e})}function Ni({icon:e,label:t,selected:r,onClick:n}){return(0,o.jsxs)("div",{onClick:n,className:`arravpos-select-card ${r?"arravpos-select-card-active":"arravpos-select-card-default"}`,children:[(0,o.jsx)("div",{children:e}),t,(0,o.jsx)("span",{className:"arravpos-select-check",children:r&&(0,o.jsx)(ma,{})})]})}var Ks={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}},l0=xe(((e,t)=>{(function(){"use strict";var r={}.hasOwnProperty;function n(){for(var s="",d=0;d<arguments.length;d++){var l=arguments[d];l&&(s=i(s,a(l)))}return s}function a(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var d="";for(var l in s)r.call(s,l)&&s[l]&&(d=i(d,l));return d}function i(s,d){return d?s?s+" "+d:s+d:s}typeof t<"u"&&t.exports?(n.default=n,t.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()}));function c0(e,t,r){switch(r){case"Backspace":t>0&&(e=e.slice(0,t-1)+e.slice(t),t--);break;case"Delete":e=e.slice(0,t)+e.slice(t+1);break}return{value:e,caret:t}}function u0(e,t,r){for(var n={},a="",i=0,s=0;s<e.length;){var d=r(e[s],a,n);d!==void 0&&(a+=d,t!==void 0&&(t===s?i=a.length-1:t>s&&(i=a.length))),s++}return t===void 0&&(i=a.length),{value:a,caret:i}}function f0(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=p0(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
24
24
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p0(e,t){if(e){if(typeof e=="string")return Si(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Si(e,t)}}function Si(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fn(e,t){for(var r=0,n=f0(t.split("")),a;!(a=n()).done;)a.value===e&&r++;return r}function m0(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"x",n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",a=e.length,i=Fn("(",e)-Fn(")",e);i>0&&a<t.length;)e+=t[a].replace(r,n),t[a]===")"&&i--,a++;return e}function h0(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=v0(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
package/dist/index.js
CHANGED
|
@@ -4172,7 +4172,7 @@ function Ea({ buttonText: e, onButtonClick: t, showTaxesOnlyIfTime: r = !1, show
|
|
|
4172
4172
|
]), W = f || u || l || !E;
|
|
4173
4173
|
return pe(() => {
|
|
4174
4174
|
const x = () => {
|
|
4175
|
-
const ee = z.current?.offsetHeight || 0, he = J.current?.offsetHeight || 0, Fe = (ee + (window.innerWidth <= 991 ?
|
|
4175
|
+
const ee = z.current?.offsetHeight || 0, he = J.current?.offsetHeight || 0, Fe = (ee + (window.innerWidth <= 991 ? 186 : 205) || 0) + he;
|
|
4176
4176
|
se(window.innerHeight - Fe);
|
|
4177
4177
|
};
|
|
4178
4178
|
x();
|
package/dist/styles.css
CHANGED
|
@@ -1138,8 +1138,6 @@
|
|
|
1138
1138
|
.aaravpos-status-badge {
|
|
1139
1139
|
display: inline-flex;
|
|
1140
1140
|
align-items: center;
|
|
1141
|
-
padding: 2px 8px;
|
|
1142
|
-
font-size: 10px;
|
|
1143
1141
|
padding: 1px 6px;
|
|
1144
1142
|
font-size: 9px;
|
|
1145
1143
|
font-weight: 700;
|
|
@@ -3458,10 +3456,10 @@
|
|
|
3458
3456
|
padding-right: 24px;
|
|
3459
3457
|
}
|
|
3460
3458
|
.aaravpos-order-list {
|
|
3461
|
-
height: calc(100dvh -
|
|
3459
|
+
height: calc(100dvh - 240px);
|
|
3462
3460
|
}
|
|
3463
3461
|
.aaravpos-pro-order-list {
|
|
3464
|
-
height: calc(100dvh -
|
|
3462
|
+
height: calc(100dvh - 380px);
|
|
3465
3463
|
}
|
|
3466
3464
|
.aaravpos-pro-order-list-pro {
|
|
3467
3465
|
height: calc(100dvh - 295px);
|
package/package.json
CHANGED