@everymatrix/casino-wagering-bonuses-controller 1.2.0 → 1.2.2
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.
|
@@ -60,7 +60,7 @@ n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=e}$on(e,t){
|
|
|
60
60
|
const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});const Z=e=>K[e]
|
|
61
61
|
/* eslint-disable quote-props */,K={AED:"د.إ",AFN:"؋",ALL:"L",AMD:"֏",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"ман",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BRL:"R$",BSD:"$",BTC:"฿",BTN:"Nu.",BWP:"P",BYR:"p.",BZD:"BZ$",CAD:"$",CDF:"FC",CHF:"CHF",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",ETH:"Ξ",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JOD:"JD",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KWD:"KD",KYD:"$",KZT:"лв",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTC:"Ł",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$U",UZS:"лв",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",YER:"﷼",ZAR:"R",ZWD:"Z$"};
|
|
62
62
|
/* ../casino-wagering-bonus-progress/src/CasinoWageringBonusProgress.svelte generated by Svelte v3.48.0 */
|
|
63
|
-
function W(n){let r,o,i,s,a,l,c,u=[{class:"ring",r:/*radius*/n[2],cx:/*center*/n[7],cy:/*center*/n[7],"stroke-width":`${/*ringStrokeWidth*/n[4]}px`}],d={};for(let e=0;e<u.length;e+=1)d=t(d,u[e]);let g=[{class:"ring ring-progress "+(/*status*/n[1]===/*BonusStatus*/n[5].InProgress?"active":""),r:/*radius*/n[2],cx:/*center*/n[7],cy:/*center*/n[7],"stroke-width":`${/*ringStrokeWidth*/n[4]}px`,"stroke-dasharray":`${/*circumference*/n[6]} ${/*circumference*/n[6]}`,"stroke-dashoffset":/*circumference*/n[6]-Number(/*percent*/n[0])/100*/*circumference*/n[6]}],y={};for(let e=0;e<g.length;e+=1)y=t(y,g[e]);let v=[{class:"center "+(/*status*/n[1]===/*BonusStatus*/n[5].InProgress?"active":""),r:/*radius*/n[2]-/*ringStrokeWidth*/n[4]/2-3,cx:/*center*/n[7],cy:/*center*/n[7]}],E={};for(let e=0;e<v.length;e+=1)E=t(E,v[e]);let C=[{x:/*center*/n[7],y:/*center*/n[7]}],w={};for(let e=0;e<C.length;e+=1)w=t(w,C[e]);let B=[{width:/*size*/n[3],height:/*size*/n[3]}],S={};for(let e=0;e<B.length;e+=1)S=t(S,B[e]);return{c(){r=m("svg"),o=m("circle"),i=m("circle"),s=m("circle"),a=m("text"),l=b(/*percent*/n[0]),c=b("%"),this.c=e,T(o,d),T(i,y),T(s,E),T(a,w),T(r,S)},m(e,t){p(e,r,t),h(r,o),h(r,i),h(r,s),h(r,a),h(a,l),h(a,c)},p(e,[t]){T(o,d=F(u,[/*radius, center, ringStrokeWidth*/148&t&&{class:"ring",r:/*radius*/e[2],cx:/*center*/e[7],cy:/*center*/e[7],"stroke-width":`${/*ringStrokeWidth*/e[4]}px`}])),T(i,y=F(g,[/*status, BonusStatus, radius, center, ringStrokeWidth, circumference, percent*/247&t&&{class:"ring ring-progress "+(/*status*/e[1]===/*BonusStatus*/e[5].InProgress?"active":""),r:/*radius*/e[2],cx:/*center*/e[7],cy:/*center*/e[7],"stroke-width":`${/*ringStrokeWidth*/e[4]}px`,"stroke-dasharray":`${/*circumference*/e[6]} ${/*circumference*/e[6]}`,"stroke-dashoffset":/*circumference*/e[6]-Number(/*percent*/e[0])/100*/*circumference*/e[6]}])),T(s,E=F(v,[/*status, BonusStatus, radius, ringStrokeWidth, center*/182&t&&{class:"center "+(/*status*/e[1]===/*BonusStatus*/e[5].InProgress?"active":""),r:/*radius*/e[2]-/*ringStrokeWidth*/e[4]/2-3,cx:/*center*/e[7],cy:/*center*/e[7]}])),/*percent*/1&t&&A(l,/*percent*/e[0]),T(a,w=F(C,[/*center*/128&t&&{x:/*center*/e[7],y:/*center*/e[7]}])),T(r,S=F(B,[/*size*/8&t&&{width:/*size*/e[3],height:/*size*/e[3]}]))},i:e,o:e,d(e){e&&f(r)}}}function X(e,t,n){let r,o,i,s,a,{percent:l=""}=t,{status:c=""}=t;var u;return function(e){e.BeforeClaimed="BeforeClaimed",e.InProgress="active",e.ForfeitedOrCompleted="ForfeitedOrCompleted"}(u||(u={})),e.$$set=e=>{"percent"in e&&n(0,l=e.percent),"status"in e&&n(1,c=e.status)},e.$$.update=()=>{/*size*/8&e.$$.dirty&&n(4,o=r/7.5),/*size, ringStrokeWidth*/24&e.$$.dirty&&n(2,i=r/2-o/2),/*size*/8&e.$$.dirty&&n(7,s=r/2),/*radius*/4&e.$$.dirty&&n(6,a=2*i*Math.PI)},n(3,r=200),[l,c,i,r,o,u,a,s]}!customElements.get("casino-wagering-bonus-progress")&&customElements.define("casino-wagering-bonus-progress",class extends j{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}text{fill:#FFFFFF;text-anchor:middle;dominant-baseline:middle;font-style:normal;font-weight:700;font-size:36px}circle.ring{stroke:#F2F4F6;fill:transparent}circle.ring-progress{transition:0.35s stroke-dashoffset;stroke:#C4C4C4;transform:rotate(-90deg);transform-origin:50% 50%}circle.ring-progress.active{stroke:#00AEEF}circle.center{fill:#C4C4C4}circle.center.active{fill:#00AEEF}</style>",V(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},X,W,s,{percent:0,status:1},null),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),D()))}static get observedAttributes(){return["percent","status"]}get percent(){return this.$$.ctx[0]}set percent(e){this.$$set({percent:e}),D()}get status(){return this.$$.ctx[1]}set status(e){this.$$set({status:e}),D()}});var z="data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_338)'%3e %3cpath d='M12.5 0C5.60762 0 0 5.60762 0 12.5C0 19.3924 5.60762 25 12.5 25C19.3924 25 25 19.3924 25 12.5C25 5.60762 19.3924 0 12.5 0ZM12.5 23.4375C6.46896 23.4375 1.56251 18.531 1.56251 12.5C1.56251 6.46896 6.46896 1.56251 12.5 1.56251C18.531 1.56251 23.4375 6.46896 23.4375 12.5C23.4375 18.531 18.531 23.4375 12.5 23.4375V23.4375Z' fill='%2300AEEF'/%3e %3cpath d='M13.2813 4.6875H11.7188V12.8235L16.6351 17.7398L17.7399 16.6351L13.2813 12.1765V4.6875Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_338'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e",Y="data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_347)'%3e %3cpath d='M12.5002 7.5C11.5797 7.5 10.8335 8.2462 10.8335 9.16667V23.3333C10.8335 24.2538 11.5797 25 12.5002 25C13.4206 25 14.1668 24.2538 14.1668 23.3333V9.16667C14.1668 8.2462 13.4206 7.5 12.5002 7.5ZM13.3335 23.3333C13.3335 23.7936 12.9604 24.1667 12.5002 24.1667C12.0399 24.1667 11.6668 23.7936 11.6668 23.3333V9.16667C11.6668 8.70641 12.0399 8.33333 12.5002 8.33333C12.9604 8.33333 13.3335 8.70641 13.3335 9.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M7.08317 12.5C6.1627 12.5 5.4165 13.2462 5.4165 14.1667V23.3333C5.4165 24.2538 6.1627 25 7.08317 25C8.00364 25 8.74984 24.2538 8.74984 23.3333V14.1667C8.74984 13.2462 8.00364 12.5 7.08317 12.5ZM7.9165 23.3333C7.9165 23.7936 7.54343 24.1667 7.08317 24.1667C6.62291 24.1667 6.24984 23.7936 6.24984 23.3333V14.1667C6.24984 13.7064 6.62291 13.3333 7.08317 13.3333C7.54343 13.3333 7.9165 13.7064 7.9165 14.1667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M1.66667 18.333C0.746198 18.333 0 19.0792 0 19.9997V23.333C0 24.2535 0.746198 24.9997 1.66667 24.9997C2.58714 24.9997 3.33333 24.2535 3.33333 23.333V19.9997C3.33333 19.0792 2.58714 18.333 1.66667 18.333ZM2.5 23.333C2.5 23.7933 2.12693 24.1663 1.66667 24.1663C1.20641 24.1663 0.833333 23.7933 0.833333 23.333V19.9997C0.833333 19.5394 1.20641 19.1663 1.66667 19.1663C2.12693 19.1663 2.5 19.5394 2.5 19.9997V23.333Z' fill='%2300AEEF'/%3e %3cpath d='M17.9167 2.5C16.9962 2.5 16.25 3.2462 16.25 4.16667V23.3333C16.25 24.2538 16.9962 25 17.9167 25C18.8371 25 19.5833 24.2538 19.5833 23.3333V4.16667C19.5833 3.2462 18.8371 2.5 17.9167 2.5ZM18.75 23.3333C18.75 23.7936 18.3769 24.1667 17.9167 24.1667C17.4564 24.1667 17.0833 23.7936 17.0833 23.3333V4.16667C17.0833 3.70641 17.4564 3.33333 17.9167 3.33333C18.3769 3.33333 18.75 3.70641 18.75 4.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M23.3332 0C22.4127 0 21.6665 0.746198 21.6665 1.66667V23.3333C21.6665 24.2538 22.4127 25 23.3332 25C24.2536 25 24.9998 24.2538 24.9998 23.3333V1.66667C24.9998 0.746198 24.2536 0 23.3332 0ZM24.1665 23.3333C24.1665 23.7936 23.7934 24.1667 23.3332 24.1667C22.8729 24.1667 22.4998 23.7936 22.4998 23.3333V1.66667C22.4998 1.20641 22.8729 0.833333 23.3332 0.833333C23.7934 0.833333 24.1665 1.20641 24.1665 1.66667V23.3333Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_347'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e";
|
|
63
|
+
function W(n){let r,o,i,s,a,l,c,u=[{class:"ring",r:/*radius*/n[2],cx:/*center*/n[7],cy:/*center*/n[7],"stroke-width":`${/*ringStrokeWidth*/n[4]}px`}],d={};for(let e=0;e<u.length;e+=1)d=t(d,u[e]);let g=[{class:"ring ring-progress "+(/*status*/n[1]===/*BonusStatus*/n[5].InProgress?"active":""),r:/*radius*/n[2],cx:/*center*/n[7],cy:/*center*/n[7],"stroke-width":`${/*ringStrokeWidth*/n[4]}px`,"stroke-dasharray":`${/*circumference*/n[6]} ${/*circumference*/n[6]}`,"stroke-dashoffset":/*circumference*/n[6]-Number(/*percent*/n[0])/100*/*circumference*/n[6]}],y={};for(let e=0;e<g.length;e+=1)y=t(y,g[e]);let v=[{class:"center "+(/*status*/n[1]===/*BonusStatus*/n[5].InProgress?"active":""),r:/*radius*/n[2]-/*ringStrokeWidth*/n[4]/2-3,cx:/*center*/n[7],cy:/*center*/n[7]}],E={};for(let e=0;e<v.length;e+=1)E=t(E,v[e]);let C=[{x:/*center*/n[7],y:/*center*/n[7]}],w={};for(let e=0;e<C.length;e+=1)w=t(w,C[e]);let B=[{width:/*size*/n[3],height:/*size*/n[3]}],S={};for(let e=0;e<B.length;e+=1)S=t(S,B[e]);return{c(){r=m("svg"),o=m("circle"),i=m("circle"),s=m("circle"),a=m("text"),l=b(/*percent*/n[0]),c=b("%"),this.c=e,T(o,d),T(i,y),T(s,E),T(a,w),T(r,S)},m(e,t){p(e,r,t),h(r,o),h(r,i),h(r,s),h(r,a),h(a,l),h(a,c)},p(e,[t]){T(o,d=F(u,[/*radius, center, ringStrokeWidth*/148&t&&{class:"ring",r:/*radius*/e[2],cx:/*center*/e[7],cy:/*center*/e[7],"stroke-width":`${/*ringStrokeWidth*/e[4]}px`}])),T(i,y=F(g,[/*status, BonusStatus, radius, center, ringStrokeWidth, circumference, percent*/247&t&&{class:"ring ring-progress "+(/*status*/e[1]===/*BonusStatus*/e[5].InProgress?"active":""),r:/*radius*/e[2],cx:/*center*/e[7],cy:/*center*/e[7],"stroke-width":`${/*ringStrokeWidth*/e[4]}px`,"stroke-dasharray":`${/*circumference*/e[6]} ${/*circumference*/e[6]}`,"stroke-dashoffset":/*circumference*/e[6]-Number(/*percent*/e[0])/100*/*circumference*/e[6]}])),T(s,E=F(v,[/*status, BonusStatus, radius, ringStrokeWidth, center*/182&t&&{class:"center "+(/*status*/e[1]===/*BonusStatus*/e[5].InProgress?"active":""),r:/*radius*/e[2]-/*ringStrokeWidth*/e[4]/2-3,cx:/*center*/e[7],cy:/*center*/e[7]}])),/*percent*/1&t&&A(l,/*percent*/e[0]),T(a,w=F(C,[/*center*/128&t&&{x:/*center*/e[7],y:/*center*/e[7]}])),T(r,S=F(B,[/*size*/8&t&&{width:/*size*/e[3],height:/*size*/e[3]}]))},i:e,o:e,d(e){e&&f(r)}}}function X(e,t,n){let r,o,i,s,a,{percent:l=""}=t,{status:c=""}=t;var u;return function(e){e.BeforeClaimed="BeforeClaimed",e.InProgress="active",e.ForfeitedOrCompleted="ForfeitedOrCompleted"}(u||(u={})),e.$$set=e=>{"percent"in e&&n(0,l=e.percent),"status"in e&&n(1,c=e.status)},e.$$.update=()=>{/*size*/8&e.$$.dirty&&n(4,o=r/7.5),/*size, ringStrokeWidth*/24&e.$$.dirty&&n(2,i=r/2-o/2),/*size*/8&e.$$.dirty&&n(7,s=r/2),/*radius*/4&e.$$.dirty&&n(6,a=2*i*Math.PI)},n(3,r=200),[l,c,i,r,o,u,a,s]}!customElements.get("casino-wagering-bonus-progress")&&customElements.define("casino-wagering-bonus-progress",class extends j{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}text{fill:#FFFFFF;text-anchor:middle;dominant-baseline:middle;font-style:normal;font-weight:700;font-size:36px}circle.ring{stroke:#F2F4F6;fill:transparent}circle.ring-progress{transition:0.35s stroke-dashoffset;stroke:#C4C4C4;transform:rotate(-90deg);transform-origin:50% 50%}circle.ring-progress.active{stroke:#00AEEF}circle.center{fill:#C4C4C4}circle.center.active{fill:#00AEEF}</style>",V(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},X,W,s,{percent:0,status:1},null),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),D()))}static get observedAttributes(){return["percent","status"]}get percent(){return this.$$.ctx[0]}set percent(e){this.$$set({percent:e}),D()}get status(){return this.$$.ctx[1]}set status(e){this.$$set({status:e}),D()}});var z="data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_338)'%3e %3cpath d='M12.5 0C5.60762 0 0 5.60762 0 12.5C0 19.3924 5.60762 25 12.5 25C19.3924 25 25 19.3924 25 12.5C25 5.60762 19.3924 0 12.5 0ZM12.5 23.4375C6.46896 23.4375 1.56251 18.531 1.56251 12.5C1.56251 6.46896 6.46896 1.56251 12.5 1.56251C18.531 1.56251 23.4375 6.46896 23.4375 12.5C23.4375 18.531 18.531 23.4375 12.5 23.4375V23.4375Z' fill='%2300AEEF'/%3e %3cpath d='M13.2813 4.6875H11.7188V12.8235L16.6351 17.7398L17.7399 16.6351L13.2813 12.1765V4.6875Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_338'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e",Y="data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_347)'%3e %3cpath d='M12.5002 7.5C11.5797 7.5 10.8335 8.2462 10.8335 9.16667V23.3333C10.8335 24.2538 11.5797 25 12.5002 25C13.4206 25 14.1668 24.2538 14.1668 23.3333V9.16667C14.1668 8.2462 13.4206 7.5 12.5002 7.5ZM13.3335 23.3333C13.3335 23.7936 12.9604 24.1667 12.5002 24.1667C12.0399 24.1667 11.6668 23.7936 11.6668 23.3333V9.16667C11.6668 8.70641 12.0399 8.33333 12.5002 8.33333C12.9604 8.33333 13.3335 8.70641 13.3335 9.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M7.08317 12.5C6.1627 12.5 5.4165 13.2462 5.4165 14.1667V23.3333C5.4165 24.2538 6.1627 25 7.08317 25C8.00364 25 8.74984 24.2538 8.74984 23.3333V14.1667C8.74984 13.2462 8.00364 12.5 7.08317 12.5ZM7.9165 23.3333C7.9165 23.7936 7.54343 24.1667 7.08317 24.1667C6.62291 24.1667 6.24984 23.7936 6.24984 23.3333V14.1667C6.24984 13.7064 6.62291 13.3333 7.08317 13.3333C7.54343 13.3333 7.9165 13.7064 7.9165 14.1667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M1.66667 18.333C0.746198 18.333 0 19.0792 0 19.9997V23.333C0 24.2535 0.746198 24.9997 1.66667 24.9997C2.58714 24.9997 3.33333 24.2535 3.33333 23.333V19.9997C3.33333 19.0792 2.58714 18.333 1.66667 18.333ZM2.5 23.333C2.5 23.7933 2.12693 24.1663 1.66667 24.1663C1.20641 24.1663 0.833333 23.7933 0.833333 23.333V19.9997C0.833333 19.5394 1.20641 19.1663 1.66667 19.1663C2.12693 19.1663 2.5 19.5394 2.5 19.9997V23.333Z' fill='%2300AEEF'/%3e %3cpath d='M17.9167 2.5C16.9962 2.5 16.25 3.2462 16.25 4.16667V23.3333C16.25 24.2538 16.9962 25 17.9167 25C18.8371 25 19.5833 24.2538 19.5833 23.3333V4.16667C19.5833 3.2462 18.8371 2.5 17.9167 2.5ZM18.75 23.3333C18.75 23.7936 18.3769 24.1667 17.9167 24.1667C17.4564 24.1667 17.0833 23.7936 17.0833 23.3333V4.16667C17.0833 3.70641 17.4564 3.33333 17.9167 3.33333C18.3769 3.33333 18.75 3.70641 18.75 4.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M23.3332 0C22.4127 0 21.6665 0.746198 21.6665 1.66667V23.3333C21.6665 24.2538 22.4127 25 23.3332 25C24.2536 25 24.9998 24.2538 24.9998 23.3333V1.66667C24.9998 0.746198 24.2536 0 23.3332 0ZM24.1665 23.3333C24.1665 23.7936 23.7934 24.1667 23.3332 24.1667C22.8729 24.1667 22.4998 23.7936 22.4998 23.3333V1.66667C22.4998 1.20641 22.8729 0.833333 23.3332 0.833333C23.7934 0.833333 24.1665 1.20641 24.1665 1.66667V23.3333Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_347'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e";const J=(e,t)=>({remainder:e%t,quotient:Math.floor(e/t)}),q=e=>{const t=new Date;return new Date(e).getTime()-t.getTime()},Q=e=>{const t=q(e)/6e4,{quotient:n,remainder:r}=J(t,1440),{quotient:o,remainder:i}=J(r,60),s=Math.floor(i);return[{value:n,symbol:"d"},{value:o,symbol:"h"},{value:s,symbol:"m"}].map((e=>{return t=e.value,(Math.abs(t)<10?`0${t}`:t)+e.symbol;var t})).join(" ")},ee=(e,t="")=>({part:e,class:[e,t].join(" ")}),te=async(e,t={})=>{let n;return n=await fetch(e,t),n=await n.json(),n};
|
|
64
64
|
/******************************************************************************
|
|
65
65
|
Copyright (c) Microsoft Corporation.
|
|
66
66
|
|
|
@@ -76,7 +76,7 @@ function W(n){let r,o,i,s,a,l,c,u=[{class:"ring",r:/*radius*/n[2],cx:/*center*/n
|
|
|
76
76
|
PERFORMANCE OF THIS SOFTWARE.
|
|
77
77
|
***************************************************************************** */
|
|
78
78
|
/* global Reflect, Promise */
|
|
79
|
-
var
|
|
79
|
+
var ne=function(e,t){return ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ne(e,t)};function re(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ne(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var oe,ie,se,ae,le=function(){return le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},le.apply(this,arguments)};function ce(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function ue(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.claimable="claimable",e.active="active",e.completed="completed",e.forfeited="forfeited",e.expired="expired",e.released="released",e.closed="closed"}(oe||(oe={})),function(e){e.standard="standard",e.freeBet="freeBet",e.freeRound="freeRound",e.tournamentTicket="tournamentTicket",e.oddsBoost="oddsBoost",e.cashBack="cashBack"}(ie||(ie={})),function(e){e.Money="money",e.BetCount="betcount"}(se||(se={})),function(e){e.en="en",e.zh="zh"}(ae||(ae={}));var he="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var pe=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}((function(e,t){
|
|
80
80
|
/** @license
|
|
81
81
|
* eventsource.js
|
|
82
82
|
* Available under MIT License (MIT)
|
|
@@ -161,36 +161,36 @@ n+=(-1===t.indexOf("?")?"?":"&")+l+"="+encodeURIComponent(h)}var i=e.withCredent
|
|
|
161
161
|
// https://code.google.com/p/chromium/issues/detail?id=260144
|
|
162
162
|
// https://code.google.com/p/chromium/issues/detail?id=225654
|
|
163
163
|
// ...
|
|
164
|
-
U=$),r((function(){if(-1!==["Asia/Anadyr","Asia/Barnaul","Asia/Chita","Asia/Irkutsk","Asia/Kamchatka","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Magadan","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Sakhalin","Asia/Srednekolymsk","Asia/Tomsk","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Europe/Astrakhan","Europe/Kaliningrad","Europe/Kirov","Europe/Moscow","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Ulyanovsk","Europe/Volgograd","W-SU"].indexOf((new Intl.DateTimeFormat).resolvedOptions().timeZone)){var e=function(e){return"[97m[1m"+e+"[22m[37m"},t=["","🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦","","[37m24 февраля "+e("Россия напала на Украину")+".","","Народ Украины всеобще мобилизован и готов защищать свою страну от вражеского вторжения. "+e("91% украинцев полностью поддерживает своего президента Владимира Зеленского")+" и его ответные действия на нападение России.","","Весь мир осудил необоснованное вторжение и решил ввести "+e("невиданные ранее санкции против России")+". С каждым новым днем они будут ощущаться все сильнее и сильнее среди мирных граждан.","","В то же время, "+e("российское правительство ограничивает доступ граждан к внешней информации")+", насаждая однобокие формулировки и версии происходящего.","","В качестве надежного источника информации загрузите безопасный браузер Tor:","",e("https://www.torproject.org/"),"","И посетите:","",e("https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion/russian"),"","🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦","",e("Прекратите эту бессмысленную войну! Остановите военного преступника Путина!")+"[39m","","🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦",""].join("\n");alert(t),window.open("http://www.change.org/NetVoyne")}}),15e3),function(n){var r=function(e){e.EventSourcePolyfill=$,e.NativeEventSource=l,e.EventSource=U}(t);void 0!==r&&(e.exports=r)}()}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:
|
|
164
|
+
U=$),r((function(){if(-1!==["Asia/Anadyr","Asia/Barnaul","Asia/Chita","Asia/Irkutsk","Asia/Kamchatka","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Magadan","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Sakhalin","Asia/Srednekolymsk","Asia/Tomsk","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Europe/Astrakhan","Europe/Kaliningrad","Europe/Kirov","Europe/Moscow","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Ulyanovsk","Europe/Volgograd","W-SU"].indexOf((new Intl.DateTimeFormat).resolvedOptions().timeZone)){var e=function(e){return"[97m[1m"+e+"[22m[37m"},t=["","🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦","","[37m24 февраля "+e("Россия напала на Украину")+".","","Народ Украины всеобще мобилизован и готов защищать свою страну от вражеского вторжения. "+e("91% украинцев полностью поддерживает своего президента Владимира Зеленского")+" и его ответные действия на нападение России.","","Весь мир осудил необоснованное вторжение и решил ввести "+e("невиданные ранее санкции против России")+". С каждым новым днем они будут ощущаться все сильнее и сильнее среди мирных граждан.","","В то же время, "+e("российское правительство ограничивает доступ граждан к внешней информации")+", насаждая однобокие формулировки и версии происходящего.","","В качестве надежного источника информации загрузите безопасный браузер Tor:","",e("https://www.torproject.org/"),"","И посетите:","",e("https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion/russian"),"","🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦","",e("Прекратите эту бессмысленную войну! Остановите военного преступника Путина!")+"[39m","","🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦",""].join("\n");alert(t),window.open("http://www.change.org/NetVoyne")}}),15e3),function(n){var r=function(e){e.EventSourcePolyfill=$,e.NativeEventSource=l,e.EventSource=U}(t);void 0!==r&&(e.exports=r)}()}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:he:globalThis)}));const fe=e=>window.postMessage(e,window.location.href),de=e=>{const t=(n=e,e=>{Object.keys(n).map((t=>{if(e.data&&e.data.type==t){const r=ce(e.data,["type"]);n[t](r)}}))});var n;H((()=>(window.addEventListener("message",t),()=>{window.removeEventListener("message",t)})))},ge=(e,t)=>{e&&(e.removeEventListener("message",t),e.close())},me=(e,t,n,r)=>{if(!n.length)return;const o={bonusWalletIDs:null==n?void 0:n.filter((e=>Ce(e))).map((e=>e.id)).join(","),XSessionId:t};if(!o.bonusWalletIDs)return;const i=`${e}/bonus/wagering/updates?${(e=>Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&"))(o)}`;return((e,t)=>{let n;return n=EventSource?new EventSource(e):new pe.EventSourcePolyfill(e,{headers:{accept:"text/event-stream"}}),n.addEventListener("message",t),n})(i,r)},be=(e,t)=>{switch(e){case oe.completed:case oe.released:case oe.expired:case oe.closed:case oe.forfeited:return t.other();case oe.active:return t.active();default:throw new Error(`unknown Bonus Status: ${e}`)}},ye=(e,t)=>{switch(e){case oe.completed:case oe.released:return t.completed();case oe.active:case oe.expired:case oe.closed:case oe.forfeited:return t.current();default:throw new Error(`unknown Bonus Status: ${e}`)}},ve=async(e,t,n={})=>{const{limit:r,lang:o,status:i}=n,s=ce(n,["limit","lang","status"]),a=Object.assign(Object.assign({type:"wagering",pagination:`limit=${r||50},offset=0`,language:o},i&&i!==oe.claimable?{status:i}:{}),s),l=i===oe.claimable?"claimable":"granted",c=new URL(`${e}/bonus/${l}`);return Object.keys(a).map((e=>{c.searchParams.append(e,a[e])})),await te(c,{headers:Object.assign({},t?{"x-SessionId":t}:{})})},Ee=async(e,t,n,r)=>await te(e+"/bonus/claim",{method:"PUT",body:JSON.stringify({bonusCode:n,currency:r}),headers:{"x-SessionId":t,accept:"text/plain","Content-Type":"application/json-patch+json"}}),Ce=e=>!!e.bonusWalletID&&be(e.status,{active:()=>!0,other:()=>!1}),we=(e,t)=>{switch(t.type){case ie.standard:case ie.freeBet:return((e,t)=>{let n;switch(t.type){case ie.standard:n="bonus money";break;case ie.freeBet:n="Free Bet"}const r=Z(Object.keys(e.increment)[0]);return"percentage"===t.mode?`${100*t.bonusAmount}% up to ${r}${t.capAmount} ${n}`:"fixed"===t.mode?`${r}${t.bonusAmount} ${n}`:void 0})(e,t);case ie.freeRound:return`${t.freespinNumber} Free Spins`;case ie.tournamentTicket:return"Enroll to Tournament Ticket";case ie.oddsBoost:return"Enroll to Odds Boost";case ie.cashBack:return"Enroll to Cash Back"}},Te=(e,t,n)=>{var r;const o=(null===(r=e.wageringProgress)||void 0===r?void 0:r.currentLevel)-1,i=n.length-1,s=e=>e.filter((e=>e.index>=0&&e.index<=i)).map((e=>{const t=n[e.index];return{key:e.key,descriptions:t.bonuses.map((e=>we(t,e)))}}))
|
|
165
165
|
// .map(line => `${line.key} Level: ${getTitleByIndex(line.index)}`);
|
|
166
|
-
return
|
|
166
|
+
return be(e.status,{active:()=>t!==oe.claimable?s([{key:"current",index:o},{key:"next",index:o+1}]):t===oe.claimable?s([{key:"first",index:0},{key:"next",index:1}]):void 0,other:()=>s([{key:"last",index:i},{key:"previous",index:i-1}])})},Be=(e,t,n)=>{const{currency:r,currentLevelIncrement:o,gap:i,currentLevel:s}=e.wageringProgress,a=Z(r),l=t[s-1];switch(n){case"target":switch(e.wageringType){case se.Money:return`Play for ${a}${o} in total`;case se.BetCount:return`Place ${o}/${null==l?void 0:l.maxContribution} bets of at least ${null==l?void 0:l.minStake} each`}case"remaining":switch(e.wageringType){case se.Money:return`Remaining: ${a}${i}`;case se.BetCount:return`Bets Remaining: ${i} bets`}case"got":const t=Se(e);switch(e.wageringType){case se.Money:return`Wagered: ${a}${t}`;case se.BetCount:return`Bets Placed: ${t} bets`}}},Ae=(e,t)=>({target:()=>be(e.status,{active:()=>Be(e,t,"target"),other:()=>`This bonus is ${e.status}`}),remaining:()=>Be(e,t,"remaining"),got:()=>Be(e,t,"got")}),Se=e=>{if(!e.wageringProgress)return 0;const{currency:t,currentLevelIncrement:n,gap:r,currentLevel:o}=e.wageringProgress;return n-r},_e=(e,t,n,r)=>{const o=q(e);o<0?n():(r(Q(e)),
|
|
167
167
|
// check if bonus will expire
|
|
168
|
-
o<t&&setTimeout((()=>{
|
|
168
|
+
o<t&&setTimeout((()=>{fe({type:"OnWageringBonusExpired"})}),o))},He=[];
|
|
169
169
|
/**
|
|
170
170
|
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
171
171
|
* @param {*=}value initial value
|
|
172
172
|
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
|
173
173
|
*/
|
|
174
|
-
function
|
|
175
|
-
const e=!
|
|
174
|
+
function Le(t,n=e){let r;const o=new Set;function i(e){if(s(t,e)&&(t=e,r)){// store is ready
|
|
175
|
+
const e=!He.length;for(const e of o)e[1](),He.push(e,t);if(e){for(let e=0;e<He.length;e+=2)He[e][0](He[e+1]);He.length=0}}}return{set:i,update:function(e){i(e(t))},subscribe:function(s,a=e){const l=[s,a];return o.add(l),1===o.size&&(r=n(i)||e),s(t),()=>{o.delete(l),0===o.size&&(r(),r=null)}}}}function Pe(t,n,r){const s=!Array.isArray(t),a=s?[t]:t,l=n.length<2;return c=t=>{let r=!1;const c=[];let h=0,p=e;const f=()=>{if(h)return;p();const r=n(s?c[0]:c,t);l?t(r):p=i(r)?r:e},d=a.map(((e,t)=>u(e,(e=>{c[t]=e,h&=~(1<<t),r&&f()}),(()=>{h|=1<<t}))));return r=!0,f(),function(){o(d),p()}},{subscribe:Le(r,c).subscribe};
|
|
176
176
|
/**
|
|
177
177
|
* Creates a `Readable` store that allows reading by subscription.
|
|
178
178
|
* @param value initial value
|
|
179
179
|
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
|
180
180
|
*/
|
|
181
|
-
var c}var
|
|
181
|
+
var c}var Re=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Ie}(e)}
|
|
182
182
|
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
183
|
-
(e)};var
|
|
183
|
+
(e)};var Ie="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Oe(e,t){return!1!==t.clone&&t.isMergeableObject(e)?De((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Me(e,t,n){return e.concat(t).map((function(e){return Oe(e,n)}))}function xe(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Ne(e,t){try{return t in e}catch(e){return!1}}
|
|
184
184
|
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
185
|
-
function
|
|
186
|
-
})(e,o)||(
|
|
185
|
+
function $e(e,t,n){var r={};return n.isMergeableObject(e)&&xe(e).forEach((function(t){r[t]=Oe(e[t],n)})),xe(t).forEach((function(o){(function(e,t){return Ne(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t));// and also unsafe if they're nonenumerable.
|
|
186
|
+
})(e,o)||(Ne(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return De;var n=t.customMerge(e);return"function"==typeof n?n:De}(o,n)(e[o],t[o],n):r[o]=Oe(t[o],n))})),r}function De(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Me,n.isMergeableObject=n.isMergeableObject||Re,
|
|
187
187
|
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
188
188
|
// implementations can use it. The caller may not replace it.
|
|
189
|
-
n.cloneUnlessOtherwiseSpecified=
|
|
189
|
+
n.cloneUnlessOtherwiseSpecified=Oe;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):$e(e,t,n):Oe(t,n)}De.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return De(e,n,t)}),{})};var Ue,ke,Fe,Ge=De;
|
|
190
190
|
/**
|
|
191
191
|
* Type Guards
|
|
192
192
|
*/
|
|
193
|
-
function
|
|
193
|
+
function Ve(e){return e.type===ke.literal}function je(e){return e.type===ke.argument}function Ze(e){return e.type===ke.number}function Ke(e){return e.type===ke.date}function We(e){return e.type===ke.time}function Xe(e){return e.type===ke.select}function ze(e){return e.type===ke.plural}function Ye(e){return e.type===ke.pound}function Je(e){return e.type===ke.tag}function qe(e){return!(!e||"object"!=typeof e||e.type!==Fe.number)}function Qe(e){return!(!e||"object"!=typeof e||e.type!==Fe.dateTime)}
|
|
194
194
|
// @generated from regex-gen.ts
|
|
195
195
|
!function(e){
|
|
196
196
|
/** Argument is unclosed (e.g. `{0`) */
|
|
@@ -252,7 +252,7 @@ e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
|
|
252
252
|
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
|
253
253
|
e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
|
254
254
|
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
|
255
|
-
e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(
|
|
255
|
+
e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Ue||(Ue={})),function(e){
|
|
256
256
|
/**
|
|
257
257
|
* Raw text
|
|
258
258
|
*/
|
|
@@ -289,7 +289,7 @@ e[e.pound=7]="pound",
|
|
|
289
289
|
/**
|
|
290
290
|
* XML-like tag
|
|
291
291
|
*/
|
|
292
|
-
e[e.tag=8]="tag"}(
|
|
292
|
+
e[e.tag=8]="tag"}(ke||(ke={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(Fe||(Fe={}));var et=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,tt=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
293
293
|
/**
|
|
294
294
|
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
295
295
|
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
|
@@ -301,7 +301,7 @@ e[e.tag=8]="tag"}(Fe||(Fe={})),function(e){e[e.number=0]="number",e[e.dateTime=1
|
|
|
301
301
|
* @public
|
|
302
302
|
* @param skeleton skeleton string
|
|
303
303
|
*/
|
|
304
|
-
function
|
|
304
|
+
function nt(e){var t={};return e.replace(tt,(function(e){var n=e.length;switch(e[0]){
|
|
305
305
|
// Era
|
|
306
306
|
case"G":t.era=4===n?"long":5===n?"narrow":"short";break;
|
|
307
307
|
// Year
|
|
@@ -335,33 +335,33 @@ case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
|
335
335
|
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
336
336
|
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}
|
|
337
337
|
// @generated from regex-gen.ts
|
|
338
|
-
var
|
|
338
|
+
var rt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var ot=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,it=/^(@+)?(\+|#+)?[rs]?$/g,st=/(\*)(0+)|(#+)(0+)|(0+)/g,at=/^(0+)$/;function lt(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(it,(function(e,n,r){
|
|
339
339
|
// @@@ case
|
|
340
|
-
return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function
|
|
340
|
+
return"string"!=typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),t}function ct(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ut(e){
|
|
341
341
|
// Engineering
|
|
342
|
-
var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!
|
|
342
|
+
var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!at.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ht(e){var t=ct(e);return t||{}}
|
|
343
343
|
/**
|
|
344
344
|
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
|
345
|
-
*/function
|
|
345
|
+
*/function pt(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=o.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=le(le(le({},t),{notation:"scientific"}),o.options.reduce((function(e,t){return le(le({},e),ht(t))}),{}));continue;case"engineering":t=le(le(le({},t),{notation:"engineering"}),o.options.reduce((function(e,t){return le(le({},e),ht(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;
|
|
346
346
|
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
347
347
|
case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;
|
|
348
348
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
349
|
-
case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(
|
|
349
|
+
case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(st,(function(e,n,r,o,i,s){if(n)t.minimumIntegerDigits=r.length;else{if(o&&i)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}
|
|
350
350
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
351
|
-
if(
|
|
351
|
+
if(at.test(o.stem))t.minimumIntegerDigits=o.stem.length;else if(ot.test(o.stem)){
|
|
352
352
|
// Precision
|
|
353
353
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
|
354
354
|
// precision-integer case
|
|
355
|
-
if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(
|
|
355
|
+
if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(ot,(function(e,n,r,o,i,s){
|
|
356
356
|
// .000* case (before ICU67 it was .000+)
|
|
357
357
|
return"*"===r?t.minimumFractionDigits=n.length:o&&"#"===o[0]?t.maximumFractionDigits=o.length:i&&s?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+s.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var i=o.options[0];
|
|
358
358
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
359
|
-
"w"===i?t=
|
|
359
|
+
"w"===i?t=le(le({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=le(le({},t),lt(i)))}
|
|
360
360
|
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
361
|
-
else if(
|
|
361
|
+
else if(it.test(o.stem))t=le(le({},t),lt(o.stem));else{var s=ct(o.stem);s&&(t=le(le({},t),s));var a=ut(o.stem);a&&(t=le(le({},t),a))}}return t}
|
|
362
362
|
// @generated from time-data-gen.ts
|
|
363
363
|
// prettier-ignore
|
|
364
|
-
var dt
|
|
364
|
+
var ft,dt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};
|
|
365
365
|
/**
|
|
366
366
|
* Returns the best matching date time pattern if a date time skeleton
|
|
367
367
|
* pattern is provided with a locale. Follows the Unicode specification:
|
|
@@ -374,7 +374,7 @@ var dt,gt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H
|
|
|
374
374
|
* of the given `locale` to the corresponding time pattern.
|
|
375
375
|
* @param locale
|
|
376
376
|
*/
|
|
377
|
-
function
|
|
377
|
+
function gt(e){var t=e.hourCycle;if(void 0===t&&
|
|
378
378
|
// @ts-ignore hourCycle(s) is not identified yet
|
|
379
379
|
e.hourCycles&&
|
|
380
380
|
// @ts-ignore
|
|
@@ -382,37 +382,37 @@ e.hourCycles.length&&(
|
|
|
382
382
|
// @ts-ignore
|
|
383
383
|
t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
|
|
384
384
|
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
385
|
-
var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(
|
|
385
|
+
var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(dt[n||""]||dt[r||""]||dt["".concat(r,"-001")]||dt["001"])[0]}var mt=new RegExp("^".concat(et.source,"*")),bt=new RegExp("".concat(et.source,"*$"));function yt(e,t){return{start:e,end:t}}
|
|
386
386
|
// #region Ponyfills
|
|
387
387
|
// Consolidate these variables up top for easier toggling during debugging
|
|
388
|
-
var
|
|
388
|
+
var vt=!!String.prototype.startsWith,Et=!!String.fromCodePoint,Ct=!!Object.fromEntries,wt=!!String.prototype.codePointAt,Tt=!!String.prototype.trimStart,Bt=!!String.prototype.trimEnd,At=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},St=!0;try{
|
|
389
389
|
/**
|
|
390
390
|
* legacy Edge or Xbox One browser
|
|
391
391
|
* Unicode flag support: supported
|
|
392
392
|
* Pattern_Syntax support: not supported
|
|
393
393
|
* See https://github.com/formatjs/formatjs/issues/2822
|
|
394
394
|
*/
|
|
395
|
-
|
|
395
|
+
St="a"===(null===(ft=Mt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===ft?void 0:ft[0])}catch(e){St=!1}var _t,Ht=vt?// Native
|
|
396
396
|
function(e,t,n){return e.startsWith(t,n)}:// For IE11
|
|
397
|
-
function(e,t,n){return e.slice(n,n+t.length)===t},
|
|
398
|
-
function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",o=e.length,i=0;o>i;){if((n=e[i++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},
|
|
397
|
+
function(e,t,n){return e.slice(n,n+t.length)===t},Lt=Et?String.fromCodePoint:// IE11
|
|
398
|
+
function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,r="",o=e.length,i=0;o>i;){if((n=e[i++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Pt=
|
|
399
399
|
// native
|
|
400
|
-
|
|
401
|
-
function(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n],i=o[0],s=o[1];t[i]=s}return t},
|
|
400
|
+
Ct?Object.fromEntries:// Ponyfill
|
|
401
|
+
function(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n],i=o[0],s=o[1];t[i]=s}return t},Rt=wt?// Native
|
|
402
402
|
function(e,t){return e.codePointAt(t)}:// IE 11
|
|
403
|
-
function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,o=e.charCodeAt(t);return o<55296||o>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?o:r-56320+(o-55296<<10)+65536}},
|
|
403
|
+
function(e,t){var n=e.length;if(!(t<0||t>=n)){var r,o=e.charCodeAt(t);return o<55296||o>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?o:r-56320+(o-55296<<10)+65536}},It=Tt?// Native
|
|
404
404
|
function(e){return e.trimStart()}:// Ponyfill
|
|
405
|
-
function(e){return e.replace(
|
|
405
|
+
function(e){return e.replace(mt,"")},Ot=Bt?// Native
|
|
406
406
|
function(e){return e.trimEnd()}:// Ponyfill
|
|
407
|
-
function(e){return e.replace(
|
|
407
|
+
function(e){return e.replace(bt,"")};
|
|
408
408
|
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
409
|
-
function
|
|
409
|
+
function Mt(e,t){return new RegExp(e,t)}
|
|
410
410
|
// #endregion
|
|
411
|
-
if(
|
|
411
|
+
if(St){
|
|
412
412
|
// Native
|
|
413
|
-
var
|
|
413
|
+
var xt=Mt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");_t=function(e,t){var n;return xt.lastIndex=t,null!==(n=xt.exec(e)[1])&&void 0!==n?n:""}}else
|
|
414
414
|
// IE11
|
|
415
|
-
|
|
415
|
+
_t=function(e,t){for(var n=[];;){var r=Rt(e,t);if(void 0===r||Ut(r)||kt(r))break;n.push(r),t+=r>=65536?2:1}return Lt.apply(void 0,n)};var Nt=/** @class */function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var o=this.char();if(123/* `{` */===o){if((i=this.parseArgument(e,n)).err)return i;r.push(i.val)}else{if(125/* `}` */===o&&e>0)break;if(35/* `#` */!==o||"plural"!==t&&"selectordinal"!==t){if(60/* `<` */===o&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Ue.UNMATCHED_CLOSING_TAG,yt(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===o&&!this.ignoreTag&&$t(this.peek()||0)){if((i=this.parseTag(e,t)).err)return i;r.push(i.val)}else{var i;if((i=this.parseLiteral(e,t)).err)return i;r.push(i.val)}}else{var s=this.clonePosition();this.bump(),r.push({type:ke.pound,location:yt(s,this.clonePosition())})}}}return{val:r,err:null}},
|
|
416
416
|
/**
|
|
417
417
|
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
418
418
|
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
@@ -434,14 +434,14 @@ Ht=function(e,t){for(var n=[];;){var r=It(e,t);if(void 0===r||kt(r)||Ft(r))break
|
|
|
434
434
|
e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();// `<`
|
|
435
435
|
var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
|
436
436
|
// Self closing tag
|
|
437
|
-
return{val:{type:
|
|
437
|
+
return{val:{type:ke.literal,value:"<".concat(r,"/>"),location:yt(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,t,!0);if(o.err)return o;var i=o.val,s=this.clonePosition();
|
|
438
438
|
// Expecting a close tag
|
|
439
|
-
if(this.bumpIf("</")){if(this.isEOF()
|
|
439
|
+
if(this.bumpIf("</")){if(this.isEOF()||!$t(this.char()))return this.error(Ue.INVALID_TAG,yt(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(Ue.UNMATCHED_CLOSING_TAG,yt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ke.tag,value:r,children:i,location:yt(n,this.clonePosition())},err:null}:this.error(Ue.INVALID_TAG,yt(s,this.clonePosition())))}return this.error(Ue.UNCLOSED_TAG,yt(n,this.clonePosition()))}return this.error(Ue.INVALID_TAG,yt(n,this.clonePosition()))},
|
|
440
440
|
/**
|
|
441
441
|
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
442
442
|
*/
|
|
443
443
|
e.prototype.parseTagName=function(){var e=this.offset();// the first tag name character
|
|
444
|
-
for(this.bump();!this.isEOF()&&
|
|
444
|
+
for(this.bump();!this.isEOF()&&Dt(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var o=this.tryParseQuote(t);if(o)r+=o;else{var i=this.tryParseUnquoted(e,t);if(i)r+=i;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var a=yt(n,this.clonePosition());return{val:{type:ke.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&($t(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e;
|
|
445
445
|
/** See `parseTag` function docs. */},
|
|
446
446
|
/**
|
|
447
447
|
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
@@ -463,67 +463,67 @@ for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'
|
|
|
463
463
|
// Optional closing apostrophe.
|
|
464
464
|
this.bump();break}t.push(39),
|
|
465
465
|
// Bump one more time because we need to skip 2 characters.
|
|
466
|
-
this.bump()}else t.push(n);this.bump()}return
|
|
467
|
-
this.bumpSpace(),this.isEOF())return this.error(
|
|
466
|
+
this.bump()}else t.push(n);this.bump()}return Lt.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60/* `<` */===n||123/* `{` */===n||35/* `#` */===n&&("plural"===t||"selectordinal"===t)||125/* `}` */===n&&e>0?null:(this.bump(),Lt(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),// `{`
|
|
467
|
+
this.bumpSpace(),this.isEOF())return this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,yt(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(Ue.EMPTY_ARGUMENT,yt(n,this.clonePosition()));
|
|
468
468
|
// argument name
|
|
469
|
-
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(
|
|
469
|
+
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Ue.MALFORMED_ARGUMENT,yt(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,yt(n,this.clonePosition()));switch(this.char()){
|
|
470
470
|
// Simple argument: `{name}`
|
|
471
471
|
case 125/* `}` */:// `}`
|
|
472
|
-
return this.bump(),{val:{type:
|
|
472
|
+
return this.bump(),{val:{type:ke.argument,
|
|
473
473
|
// value does not include the opening and closing braces.
|
|
474
|
-
value:r,location:
|
|
474
|
+
value:r,location:yt(n,this.clonePosition())},err:null};
|
|
475
475
|
// Argument with options: `{name, format, ...}`
|
|
476
476
|
case 44/* `,` */:return this.bump(),// `,`
|
|
477
|
-
this.bumpSpace(),this.isEOF()?this.error(
|
|
477
|
+
this.bumpSpace(),this.isEOF()?this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,yt(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(Ue.MALFORMED_ARGUMENT,yt(n,this.clonePosition()))}},
|
|
478
478
|
/**
|
|
479
479
|
* Advance the parser until the end of the identifier, if it is currently on
|
|
480
480
|
* an identifier character. Return an empty string otherwise.
|
|
481
481
|
*/
|
|
482
|
-
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=
|
|
482
|
+
e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=_t(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:yt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var o,i=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
|
483
483
|
// Parse this range:
|
|
484
484
|
// {name, type, style}
|
|
485
485
|
// ^---^
|
|
486
486
|
switch(s){case"":
|
|
487
487
|
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
|
488
|
-
return this.error(
|
|
488
|
+
return this.error(Ue.EXPECT_ARGUMENT_TYPE,yt(i,a));case"number":case"date":case"time":
|
|
489
489
|
// Parse this range:
|
|
490
490
|
// {name, number, style}
|
|
491
491
|
// ^-------^
|
|
492
|
-
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(f=
|
|
492
|
+
this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(f=Ot(b.val)).length)return this.error(Ue.EXPECT_ARGUMENT_STYLE,yt(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:yt(c,this.clonePosition())}}if((y=this.tryParseArgumentClose(r)).err)return y;var u=yt(r,this.clonePosition());
|
|
493
493
|
// Extract style or skeleton
|
|
494
|
-
if(l&&
|
|
494
|
+
if(l&&Ht(null==l?void 0:l.style,"::",0)){
|
|
495
495
|
// Skeleton starts with `::`.
|
|
496
|
-
var h=
|
|
496
|
+
var h=It(l.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?b:{val:{type:ke.number,value:n,location:u,style:b.val},err:null};if(0===h.length)return this.error(Ue.EXPECT_DATE_TIME_SKELETON,u);var p=h;
|
|
497
497
|
// Get "best match" pattern only if locale is passed, if not, let it
|
|
498
498
|
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
499
499
|
// for unsupported patterns.
|
|
500
|
-
this.locale&&(p=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if("j"===o){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var s=1+(1&i),a=i<2?1:3+(i>>1),l=
|
|
500
|
+
this.locale&&(p=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if("j"===o){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var s=1+(1&i),a=i<2?1:3+(i>>1),l=gt(t);for("H"!=l&&"k"!=l||(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else n+="J"===o?"H":o}return n}(h,this.locale));var f={type:Fe.dateTime,pattern:p,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?nt(p):{}};return{val:{type:"date"===s?ke.date:ke.time,value:n,location:u,style:f},err:null}}
|
|
501
501
|
// Regular style or no style.
|
|
502
|
-
return{val:{type:"number"===s?
|
|
502
|
+
return{val:{type:"number"===s?ke.number:"date"===s?ke.date:ke.time,value:n,location:u,style:null!==(o=null==l?void 0:l.style)&&void 0!==o?o:null},err:null};case"plural":case"selectordinal":case"select":
|
|
503
503
|
// Parse this range:
|
|
504
504
|
// {name, plural, options}
|
|
505
505
|
// ^---------^
|
|
506
|
-
var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(
|
|
506
|
+
var d=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ue.EXPECT_SELECT_ARGUMENT_OPTIONS,yt(d,le({},d)));this.bumpSpace();
|
|
507
507
|
// Parse offset:
|
|
508
508
|
// {name, plural, offset:1, options}
|
|
509
509
|
// ^-----^
|
|
510
510
|
// or the first option:
|
|
511
511
|
// {name, plural, one {...} other {...}}
|
|
512
512
|
// ^--^
|
|
513
|
-
var g=this.parseIdentifierIfPossible(),m=0;if("select"!==s&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(
|
|
513
|
+
var g=this.parseIdentifierIfPossible(),m=0;if("select"!==s&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(Ue.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,yt(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(Ue.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ue.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
|
|
514
514
|
// Parse another identifier for option parsing
|
|
515
|
-
this.bumpSpace(),g=this.parseIdentifierIfPossible(),m=b.val}var y,v=this.tryParsePluralOrSelectOptions(e,s,t,g);if(v.err)return v;if((y=this.tryParseArgumentClose(r)).err)return y;var E=
|
|
515
|
+
this.bumpSpace(),g=this.parseIdentifierIfPossible(),m=b.val}var y,v=this.tryParsePluralOrSelectOptions(e,s,t,g);if(v.err)return v;if((y=this.tryParseArgumentClose(r)).err)return y;var E=yt(r,this.clonePosition());return"select"===s?{val:{type:ke.select,value:n,options:Pt(v.val),location:E},err:null}:{val:{type:ke.plural,value:n,options:Pt(v.val),offset:m,pluralType:"plural"===s?"cardinal":"ordinal",location:E},err:null};default:return this.error(Ue.INVALID_ARGUMENT_TYPE,yt(i,a))}},e.prototype.tryParseArgumentClose=function(e){
|
|
516
516
|
// Parse: {value, number, ::currency/GBP }
|
|
517
|
-
return this.isEOF()||125/* `}` */!==this.char()?this.error(
|
|
517
|
+
return this.isEOF()||125/* `}` */!==this.char()?this.error(Ue.EXPECT_ARGUMENT_CLOSING_BRACE,yt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
|
518
518
|
/**
|
|
519
519
|
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
520
520
|
*/
|
|
521
521
|
e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
|
522
522
|
// Treat apostrophe as quoting but include it in the style part.
|
|
523
523
|
// Find the end of the quoted literal text.
|
|
524
|
-
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(
|
|
524
|
+
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ue.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,yt(n,this.clonePosition()));this.bump();break;case 123/* `{` */:e+=1,this.bump();break;case 125/* `}` */:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");
|
|
525
525
|
// Parse the skeleton
|
|
526
|
-
for(var t=e.split(
|
|
526
|
+
for(var t=e.split(rt).filter((function(e){return e.length>0})),n=[],r=0,o=t;r<o.length;r++){var i=o[r].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var s=i[0],a=i.slice(1),l=0,c=a;l<c.length;l++)if(0===c[l].length)throw new Error("Invalid number skeleton");n.push({stem:s,options:a})}return n}(e)}catch(e){return this.error(Ue.INVALID_NUMBER_SKELETON,t)}return{val:{type:Fe.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?pt(n):{}},err:null}},
|
|
527
527
|
/**
|
|
528
528
|
* @param nesting_level The current nesting level of messages.
|
|
529
529
|
* This can be positive when parsing message fragment in select or plural argument options.
|
|
@@ -540,24 +540,24 @@ e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){
|
|
|
540
540
|
// ^--^
|
|
541
541
|
for(var o,i=!1,s=[],a=new Set,l=r.value,c=r.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;
|
|
542
542
|
// Try parse `={number}` selector
|
|
543
|
-
var h=this.tryParseDecimalInteger(
|
|
543
|
+
var h=this.tryParseDecimalInteger(Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ue.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;c=yt(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}
|
|
544
544
|
// Duplicate selector clauses
|
|
545
|
-
if(a.has(l))return this.error("select"===t?
|
|
545
|
+
if(a.has(l))return this.error("select"===t?Ue.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ue.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(i=!0),
|
|
546
546
|
// Parse:
|
|
547
547
|
// one {one apple}
|
|
548
548
|
// ^----------^
|
|
549
|
-
this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?
|
|
549
|
+
this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?Ue.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,yt(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(e+1,t,n);if(f.err)return f;var d=this.tryParseArgumentClose(p);if(d.err)return d;s.push([l,{value:f.val,location:yt(p,this.clonePosition())}]),
|
|
550
550
|
// Keep track of the existing selectors
|
|
551
551
|
a.add(l),
|
|
552
552
|
// Prep next selector clause.
|
|
553
|
-
this.bumpSpace(),l=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===t?
|
|
553
|
+
this.bumpSpace(),l=(o=this.parseIdentifierIfPossible()).value,c=o.location}return 0===s.length?this.error("select"===t?Ue.EXPECT_SELECT_ARGUMENT_SELECTOR:Ue.EXPECT_PLURAL_ARGUMENT_SELECTOR,yt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(Ue.MISSING_OTHER_CLAUSE,yt(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,i=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;o=!0,i=10*i+(s-48),this.bump()}var a=yt(r,this.clonePosition());return o?At(i*=n)?{val:i,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){
|
|
554
554
|
// This is much faster than `Object.assign` or spread.
|
|
555
555
|
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
556
556
|
/**
|
|
557
557
|
* Return the code point at the current position of the parser.
|
|
558
558
|
* Throws if the index is out of bound.
|
|
559
559
|
*/
|
|
560
|
-
e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=
|
|
560
|
+
e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Rt(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},
|
|
561
561
|
/** Bump the parser to the next UTF-16 code unit. */
|
|
562
562
|
e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10/* '\n' */===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,
|
|
563
563
|
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
|
@@ -568,7 +568,7 @@ this.position.offset+=e<65536?1:2)}},
|
|
|
568
568
|
* following the prefix and return true. Otherwise, don't bump the parser
|
|
569
569
|
* and return false.
|
|
570
570
|
*/
|
|
571
|
-
e.prototype.bumpIf=function(e){if(
|
|
571
|
+
e.prototype.bumpIf=function(e){if(Ht(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},
|
|
572
572
|
/**
|
|
573
573
|
* Bump the parser until the pattern character is found and return `true`.
|
|
574
574
|
* Otherwise bump to the end of the file and return `false`.
|
|
@@ -580,7 +580,7 @@ e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t
|
|
|
580
580
|
*/
|
|
581
581
|
e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
|
|
582
582
|
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
583
|
-
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&
|
|
583
|
+
e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ut(this.char());)this.bump()},
|
|
584
584
|
/**
|
|
585
585
|
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
586
586
|
* If the input has been exhausted, then this returns null.
|
|
@@ -590,83 +590,83 @@ e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this
|
|
|
590
590
|
* This check if codepoint is alphabet (lower & uppercase)
|
|
591
591
|
* @param codepoint
|
|
592
592
|
* @returns
|
|
593
|
-
*/function
|
|
593
|
+
*/function $t(e){return e>=97&&e<=122||e>=65&&e<=90}function Dt(e){return 45/* '-' */===e||46/* '.' */===e||e>=48&&e<=57/* 0..9 */||95/* '_' */===e||e>=97&&e<=122/** a..z */||e>=65&&e<=90/* A..Z */||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}
|
|
594
594
|
/**
|
|
595
595
|
* Code point equivalent of regex `\p{White_Space}`.
|
|
596
596
|
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
597
|
-
*/function
|
|
597
|
+
*/function Ut(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}
|
|
598
598
|
/**
|
|
599
599
|
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
600
600
|
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
601
|
-
*/function
|
|
601
|
+
*/function kt(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function Ft(e){e.forEach((function(e){if(delete e.location,Xe(e)||ze(e))for(var t in e.options)delete e.options[t].location,Ft(e.options[t].value);else Ze(e)&&qe(e.style)||(Ke(e)||We(e))&&Qe(e.style)?delete e.style.location:Je(e)&&Ft(e.children)}))}function Gt(e,t){void 0===t&&(t={}),t=le({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Nt(e,t).parse();if(n.err){var r=SyntaxError(Ue[n.err.kind]);
|
|
602
602
|
// @ts-expect-error Assign to error object
|
|
603
603
|
throw r.location=n.err.location,
|
|
604
604
|
// @ts-expect-error Assign to error object
|
|
605
|
-
r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||
|
|
605
|
+
r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||Ft(n.val),n.val}
|
|
606
606
|
|
|
607
607
|
// Main
|
|
608
608
|
|
|
609
|
-
function
|
|
609
|
+
function Vt(e,t){var n=t&&t.cache?t.cache:Jt,r=t&&t.serializer?t.serializer:Xt;return(t&&t.strategy?t.strategy:Wt)(e,{cache:n,serializer:r})}
|
|
610
610
|
|
|
611
611
|
// Strategy
|
|
612
612
|
|
|
613
|
-
function
|
|
613
|
+
function jt(e,t,n,r){var o,i=null==(o=r)||"number"==typeof o||"boolean"==typeof o?r:n(r),s=t.get(i);return void 0===s&&(s=e.call(this,r),t.set(i,s)),s}function Zt(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return void 0===i&&(i=e.apply(this,r),t.set(o,i)),i}function Kt(e,t,n,r,o){return n.bind(t,e,r,o)}function Wt(e,t){return Kt(e,this,1===e.length?jt:Zt,t.cache.create(),t.serializer)}
|
|
614
614
|
// Serializer
|
|
615
|
-
var
|
|
615
|
+
var Xt=function(){return JSON.stringify(arguments)};
|
|
616
616
|
|
|
617
617
|
// Cache
|
|
618
618
|
|
|
619
|
-
function
|
|
619
|
+
function zt(){this.cache=Object.create(null)}zt.prototype.get=function(e){return this.cache[e]},zt.prototype.set=function(e,t){this.cache[e]=t};var Yt,Jt={create:function(){
|
|
620
620
|
// @ts-ignore
|
|
621
|
-
return new
|
|
621
|
+
return new zt}},qt={variadic:function(e,t){return Kt(e,this,Zt,t.cache.create(),t.serializer)},monadic:function(e,t){return Kt(e,this,jt,t.cache.create(),t.serializer)}};!function(e){
|
|
622
622
|
// When we have a placeholder but no value to format
|
|
623
623
|
e.MISSING_VALUE="MISSING_VALUE",
|
|
624
624
|
// When value supplied is invalid
|
|
625
625
|
e.INVALID_VALUE="INVALID_VALUE",
|
|
626
626
|
// When we need specific Intl API but it's not available
|
|
627
|
-
e.MISSING_INTL_API="MISSING_INTL_API"}(
|
|
627
|
+
e.MISSING_INTL_API="MISSING_INTL_API"}(Yt||(Yt={}));var Qt,en=/** @class */function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.code=n,o.originalMessage=r,o}return re(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),tn=/** @class */function(e){function t(t,n,r,o){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),Yt.INVALID_VALUE,o)||this}return re(t,e),t}(en),nn=/** @class */function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),Yt.INVALID_VALUE,r)||this}return re(t,e),t}(en),rn=/** @class */function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),Yt.MISSING_VALUE,n)||this}return re(t,e),t}(en);function on(e){return"function"==typeof e}
|
|
628
628
|
// TODO(skeleton): add skeleton support
|
|
629
|
-
function
|
|
629
|
+
function sn(e,t,n,r,o,i,
|
|
630
630
|
// For debugging
|
|
631
631
|
s){
|
|
632
632
|
// Hot path for straight simple msg translations
|
|
633
|
-
if(1===e.length&&
|
|
633
|
+
if(1===e.length&&Ve(e[0]))return[{type:Qt.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];
|
|
634
634
|
// Exit early for string parts.
|
|
635
|
-
if(
|
|
635
|
+
if(Ve(u))a.push({type:Qt.literal,value:u.value});else
|
|
636
636
|
// TODO: should this part be literal type?
|
|
637
637
|
// Replace `#` in plural rules with the actual numeric value.
|
|
638
|
-
if(
|
|
638
|
+
if(Ye(u))"number"==typeof i&&a.push({type:Qt.literal,value:n.getNumberFormat(t).format(i)});else{var h=u.value;
|
|
639
639
|
// Enforce that all required values are provided by the caller.
|
|
640
|
-
if(!o||!(h in o))throw new
|
|
640
|
+
if(!o||!(h in o))throw new rn(h,s);var p=o[h];if(je(u))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),a.push({type:"string"==typeof p?Qt.literal:Qt.object,value:p});else
|
|
641
641
|
// Recursively format plural and select parts' option — which can be a
|
|
642
642
|
// nested pattern structure. The choosing of the option to use is
|
|
643
643
|
// abstracted-by and delegated-to the part helper object.
|
|
644
|
-
if(
|
|
644
|
+
if(Ke(u)){var f="string"==typeof u.style?r.date[u.style]:Qe(u.style)?u.style.parsedOptions:void 0;a.push({type:Qt.literal,value:n.getDateTimeFormat(t,f).format(p)})}else if(We(u)){f="string"==typeof u.style?r.time[u.style]:Qe(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Qt.literal,value:n.getDateTimeFormat(t,f).format(p)})}else if(Ze(u)){(f="string"==typeof u.style?r.number[u.style]:qe(u.style)?u.style.parsedOptions:void 0)&&f.scale&&(p*=f.scale||1),a.push({type:Qt.literal,value:n.getNumberFormat(t,f).format(p)})}else{if(Je(u)){var d=u.children,g=u.value,m=o[g];if(!on(m))throw new nn(g,"function",s);var b=m(sn(d,t,n,r,o,i).map((function(e){return e.value})));Array.isArray(b)||(b=[b]),a.push.apply(a,b.map((function(e){return{type:"string"==typeof e?Qt.literal:Qt.object,value:e}})))}if(Xe(u)){if(!(y=u.options[p]||u.options.other))throw new tn(u.value,p,Object.keys(u.options),s);a.push.apply(a,sn(y.value,t,n,r,o))}else if(ze(u)){var y;if(!(y=u.options["=".concat(p)])){if(!Intl.PluralRules)throw new en('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Yt.MISSING_INTL_API,s);var v=n.getPluralRules(t,{type:u.pluralType}).select(p-(u.offset||0));y=u.options[v]||u.options.other}if(!y)throw new tn(u.value,p,Object.keys(u.options),s);a.push.apply(a,sn(y.value,t,n,r,o,p-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===Qt.literal&&t.type===Qt.literal?n.value+=t.value:e.push(t),e}),[])}(a)}
|
|
645
645
|
/*
|
|
646
646
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
647
647
|
Copyrights licensed under the New BSD License.
|
|
648
648
|
See the accompanying LICENSE file for terms.
|
|
649
649
|
*/
|
|
650
650
|
// -- MessageFormat --------------------------------------------------------
|
|
651
|
-
function
|
|
651
|
+
function an(e,t){return t?Object.keys(e).reduce((function(n,r){var o,i;return n[r]=(o=e[r],(i=t[r])?le(le(le({},o||{}),i||{}),Object.keys(o).reduce((function(e,t){return e[t]=le(le({},o[t]),i[t]||{}),e}),{})):o),n}),le({},e)):e}function ln(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(Qt||(Qt={}));var cn=/** @class */function(){function e(t,n,r,o){var i,s=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=s.formatToParts(e);
|
|
652
652
|
// Hot path for straight simple msg translations
|
|
653
|
-
if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===
|
|
653
|
+
if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===Qt.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return sn(s.ast,s.locales,s.formatters,s.formats,e,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
|
|
654
654
|
// Defined first because it's used to build the format pattern.
|
|
655
655
|
this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
656
656
|
// Parse string messages into an AST.
|
|
657
657
|
this.ast=e.__parse(t,{ignoreTag:null==o?void 0:o.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
|
|
658
658
|
// Creates a new object with the specified `formats` merged with the default
|
|
659
659
|
// formats.
|
|
660
|
-
this.formats=
|
|
660
|
+
this.formats=an(e.formats,r),this.formatters=o&&o.formatters||(void 0===(i=this.formatterCache)&&(i={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Vt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,ue([void 0],t,!1)))}),{cache:ln(i.number),strategy:qt.variadic}),getDateTimeFormat:Vt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,ue([void 0],t,!1)))}),{cache:ln(i.dateTime),strategy:qt.variadic}),getPluralRules:Vt((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,ue([void 0],t,!1)))}),{cache:ln(i.pluralRules),strategy:qt.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])},e.__parse=Gt,
|
|
661
661
|
// Default format options used as the prototype of the `formats` provided to the
|
|
662
662
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
663
663
|
// and Intl.DateTimeFormat instances.
|
|
664
|
-
e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),
|
|
664
|
+
e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),un=cn;
|
|
665
665
|
/*
|
|
666
666
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
667
667
|
Copyrights licensed under the New BSD License.
|
|
668
668
|
See the accompanying LICENSE file for terms.
|
|
669
|
-
*/const
|
|
669
|
+
*/const hn={},pn=(e,t,n)=>n?(t in hn||(hn[t]={}),e in hn[t]||(hn[t][e]=n),n):n,fn=(e,t)=>{if(null==t)return;if(t in hn&&e in hn[t])return hn[t][e];const n=Rn(t);for(let r=0;r<n.length;r++){const o=bn(n[r],e);if(o)return pn(e,t,o)}};let dn;const gn=Le({});function mn(e){return e in dn}function bn(e,t){if(!mn(e))return null;const n=function(e){return dn[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let e=0;e<n.length;e++)if("object"==typeof r){if(e>0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(n,t)}function yn(e,...t){delete hn[e],gn.update((n=>(n[e]=Ge.all([n[e]||{},...t]),n)))}Pe([gn],(([e])=>Object.keys(e))),gn.subscribe((e=>dn=e));const vn={};function En(e){return vn[e]}function Cn(e){return null!=e&&Rn(e).some((e=>{var t;return null===(t=En(e))||void 0===t?void 0:t.size}))}const wn={};function Tn(e){if(!Cn(e))return e in wn?wn[e]:Promise.resolve();const t=function(e){return Rn(e).map((e=>{const t=En(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return wn[e]=Promise.all(t.map((([e,t])=>function(e,t){const n=Promise.all(t.map((t=>(function(e,t){vn[e].delete(t),0===vn[e].size&&delete vn[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>yn(e,...t)))}(e,t)))).then((()=>{if(Cn(e))return Tn(e);delete wn[e]})),wn[e]}
|
|
670
670
|
/*! *****************************************************************************
|
|
671
671
|
Copyright (c) Microsoft Corporation.
|
|
672
672
|
|
|
@@ -680,63 +680,63 @@ e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
|
|
|
680
680
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
681
681
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
682
682
|
PERFORMANCE OF THIS SOFTWARE.
|
|
683
|
-
***************************************************************************** */function
|
|
683
|
+
***************************************************************************** */function Bn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}const An={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Sn(){return An}const _n=Le(!1);let Hn;const Ln=Le(null);function Pn(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function Rn(e,t=Sn().fallbackLocale){const n=Pn(e);return t?[...new Set([...n,...Pn(t)])]:n}function In(){return null!=Hn?Hn:void 0}Ln.subscribe((e=>{Hn=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const On=Object.assign(Object.assign({},Ln),{set:e=>{if(e&&function(e){if(null==e)return;const t=Rn(e);for(let e=0;e<t.length;e++){const n=t[e];if(mn(n))return n}}(e)&&Cn(e)){const{loadingDelay:t}=Sn();let n;return"undefined"!=typeof window&&null!=In()&&t?n=window.setTimeout((()=>_n.set(!0)),t):_n.set(!0),Tn(e).then((()=>{Ln.set(e)})).finally((()=>{clearTimeout(n),_n.set(!1)}))}return Ln.set(e)}}),Mn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}},xn=(e,t)=>{const{formats:n}=Sn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Nn=Mn((e=>{var{locale:t,format:n}=e,r=Bn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(r=xn("number",n)),new Intl.NumberFormat(t,r)})),$n=Mn((e=>{var{locale:t,format:n}=e,r=Bn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?r=xn("date",n):0===Object.keys(r).length&&(r=xn("date","short")),new Intl.DateTimeFormat(t,r)})),Dn=Mn((e=>{var{locale:t,format:n}=e,r=Bn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?r=xn("time",n):0===Object.keys(r).length&&(r=xn("time","short")),new Intl.DateTimeFormat(t,r)})),Un=Mn(((e,t=In())=>new un(e,t,Sn().formats,{ignoreTag:Sn().ignoreTag}))),kn=(e,t={})=>{var n,r,o,i;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:l=In(),default:c}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=fn(e,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!==(i=null!==(o=null===(r=(n=Sn()).handleMissingMessage)||void 0===r?void 0:r.call(n,{locale:l,id:e,defaultValue:c}))&&void 0!==o?o:c)&&void 0!==i?i:e;if(!a)return u;let h=u;try{h=Un(u,l).format(a)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},Fn=(e,t)=>((e={})=>{var{locale:t=In()}=e,n=Bn(e,["locale"]);return Dn(Object.assign({locale:t},n))})(t).format(e),Gn=(e,t)=>((e={})=>{var{locale:t=In()}=e,n=Bn(e,["locale"]);return $n(Object.assign({locale:t},n))})(t).format(e),Vn=(e,t)=>((e={})=>{var{locale:t=In()}=e,n=Bn(e,["locale"]);return Nn(Object.assign({locale:t},n))})(t).format(e),jn=(e,t=In())=>fn(e,t),Zn=Pe([On,gn],(()=>kn));Pe([On],(()=>Fn)),Pe([On],(()=>Gn)),Pe([On],(()=>Vn)),Pe([On,gn],(()=>jn));const Kn=e=>{(({withLocale:e,translations:t})=>{On.subscribe((n=>{null==n&&(gn.set(t),On.set(e))}));// maybe we will need this to make sure that the i18n is set up only once
|
|
684
684
|
/*dictionary.set(translations);
|
|
685
|
-
locale.set(_locale);*/})({withLocale:"en",translations:{}}),Object.keys(e).forEach((t=>{var n,r;n=t,r=e[t],
|
|
686
|
-
/* ../casino-wagering-bonus/src/CasinoWageringBonus.svelte generated by Svelte v3.48.0 */function
|
|
685
|
+
locale.set(_locale);*/})({withLocale:"en",translations:{}}),Object.keys(e).forEach((t=>{var n,r;n=t,r=e[t],yn(n,r)}))};var Wn,Xn;!function(e){e.level="level",e.current="current",e.next="next",e.first="first",e.last="last",e.previous="previous",e.startChallenge="startChallenge"}(Wn||(Wn={})),function(e){e.level="wageringBonuses.level",e.current="wageringBonuses.current",e.next="wageringBonuses.next",e.first="wageringBonuses.first",e.last="wageringBonuses.last",e.previous="wageringBonuses.previous",e.startChallenge="wageringBonuses.startChallenge"}(Xn||(Xn={}));const zn={en:{wageringBonuses:{level:"Level",current:"Current",next:"Next",first:"First",last:"Last",previous:"Previous",startChallenge:"START CHALLENGE"}},zh:{wageringBonuses:{level:"等級",current:"当前",next:"下一個",first:"第一個",last:"最後一個",previous:"上一個",startChallenge:"開始挑戰"}}};
|
|
686
|
+
/* ../casino-wagering-bonus/src/CasinoWageringBonus.svelte generated by Svelte v3.48.0 */function Yn(e,t,n){const r=e.slice();return r[22]=t[n],r[24]=n,r}function Jn(e,t,n){const r=e.slice();return r[25]=t[n],r[27]=n,r}function qn(e,t,n){const r=e.slice();return r[28]=t[n],r}function Qn(e,t,n){const r=e.slice();return r[31]=t[n],r}function er(e,t,n){const r=e.slice();return r[34]=t[n],r}
|
|
687
687
|
// (88:0) {#if bonus && isShowingBonus}
|
|
688
|
-
function
|
|
688
|
+
function tr(e){let n,r,o,i,s,a,l,c,u,m,v,E,C,T,B,S,_,H,L,P,R,I,O,M=/*bonus*/(e[1].name||/*bonus*/e[1].presentation?.name.content)+"",x=[ee("BonusInfoTitle","title")],N={};for(let e=0;e<x.length;e+=1)N=t(N,x[e]);let $=/*status*/e[0]===oe.active&&nr(e),D=[ee("BonusInfoWrapper","layout-horizental space-between")],U={};for(let e=0;e<D.length;e+=1)U=t(U,D[e]);let k=/*status*/e[0]===oe.claimable&&rr(e),G=/*status*/e[0]!==oe.claimable&&or(e),V=[ee("BonusInfo")],j={};for(let e=0;e<V.length;e+=1)j=t(j,V[e]);let Z=[ee("RewardsTopBarTitle","title")],K={};for(let e=0;e<Z.length;e+=1)K=t(K,Z[e]);let W=/*status*/e[0]!==oe.claimable&&ar(e),X=[ee("RewardsTopBar","layout-horizental space-between")],z={};for(let e=0;e<X.length;e+=1)z=t(z,X[e]);let Y=/*status*/e[0]!==oe.claimable&&lr(e),J=/*status*/e[0]===oe.claimable&&hr(e),q=[ee("BonusRewardsLevels")],Q={};for(let e=0;e<q.length;e+=1)Q=t(Q,q[e]);let te=[ee("SupportsTitle","title")],ne={};for(let e=0;e<te.length;e+=1)ne=t(ne,te[e]);let re=Object.keys(/*bonus*/e[1].extension?.bonus.wallet||/*bonus*/e[1].wallet).filter(mr),ie=[];for(let t=0;t<re.length;t+=1)ie[t]=dr(Yn(e,re,t));let se=[ee("SupportsList")],ae={};for(let e=0;e<se.length;e+=1)ae=t(ae,se[e]);let le=[ee("SupportsWrapper")],ce={};for(let e=0;e<le.length;e+=1)ce=t(ce,le[e]);let ue=[ee("BonusRewards")],he={};for(let e=0;e<ue.length;e+=1)he=t(he,ue[e]);let pe=[ee("Root","layout-horizental")],fe={};for(let e=0;e<pe.length;e+=1)fe=t(fe,pe[e]);return{c(){n=g("section"),r=g("div"),o=g("section"),i=g("section"),s=b(M),a=y(),$&&$.c(),l=y(),k&&k.c(),c=y(),G&&G.c(),u=y(),m=g("div"),v=g("section"),E=g("div"),C=b("Rewards"),T=y(),W&&W.c(),B=y(),S=g("div"),Y&&Y.c(),_=y(),J&&J.c(),H=y(),L=g("div"),P=g("div"),R=b("Include bets"),I=y(),O=g("div");for(let e=0;e<ie.length;e+=1)ie[e].c();w(i,N),w(o,U),w(r,j),w(E,K),w(v,z),w(S,Q),w(P,ne),w(O,ae),w(L,ce),w(m,he),w(n,fe)},m(e,t){p(e,n,t),h(n,r),h(r,o),h(o,i),h(i,s),h(o,a),$&&$.m(o,null),h(r,l),k&&k.m(r,null),h(r,c),G&&G.m(r,null),h(n,u),h(n,m),h(m,v),h(v,E),h(E,C),h(v,T),W&&W.m(v,null),h(m,B),h(m,S),Y&&Y.m(S,null),h(S,_),J&&J.m(S,null),h(m,H),h(m,L),h(L,P),h(P,R),h(L,I),h(L,O);for(let e=0;e<ie.length;e+=1)ie[e].m(O,null)},p(e,t){if(/*bonus*/2&t[0]&&M!==(M=/*bonus*/(e[1].name||/*bonus*/e[1].presentation?.name.content)+"")&&A(s,M),w(i,N=F(x,[ee("BonusInfoTitle","title")])),/*status*/e[0]===oe.active?$?$.p(e,t):($=nr(e),$.c(),$.m(o,null)):$&&($.d(1),$=null),w(o,U=F(D,[ee("BonusInfoWrapper","layout-horizental space-between")])),/*status*/e[0]===oe.claimable?k?k.p(e,t):(k=rr(e),k.c(),k.m(r,c)):k&&(k.d(1),k=null),/*status*/e[0]!==oe.claimable?G?G.p(e,t):(G=or(e),G.c(),G.m(r,null)):G&&(G.d(1),G=null),w(r,j=F(V,[ee("BonusInfo")])),w(E,K=F(Z,[ee("RewardsTopBarTitle","title")])),/*status*/e[0]!==oe.claimable?W?W.p(e,t):(W=ar(e),W.c(),W.m(v,null)):W&&(W.d(1),W=null),w(v,z=F(X,[ee("RewardsTopBar","layout-horizental space-between")])),/*status*/e[0]!==oe.claimable?Y?Y.p(e,t):(Y=lr(e),Y.c(),Y.m(S,_)):Y&&(Y.d(1),Y=null),/*status*/e[0]===oe.claimable?J?J.p(e,t):(J=hr(e),J.c(),J.m(S,null)):J&&(J.d(1),J=null),w(S,Q=F(q,[ee("BonusRewardsLevels")])),w(P,ne=F(te,[ee("SupportsTitle","title")])),/*bonus*/2&t[0]){let n;for(re=Object.keys(/*bonus*/e[1].extension?.bonus.wallet||/*bonus*/e[1].wallet).filter(mr),n=0;n<re.length;n+=1){const r=Yn(e,re,n);ie[n]?ie[n].p(r,t):(ie[n]=dr(r),ie[n].c(),ie[n].m(O,null))}for(;n<ie.length;n+=1)ie[n].d(1);ie.length=re.length}w(O,ae=F(se,[ee("SupportsList")])),w(L,ce=F(le,[ee("SupportsWrapper")])),w(m,he=F(ue,[ee("BonusRewards")])),w(n,fe=F(pe,[ee("Root","layout-horizental")]))},d(e){e&&f(n),$&&$.d(),k&&k.d(),G&&G.d(),W&&W.d(),Y&&Y.d(),J&&J.d(),d(ie,e)}}}
|
|
689
689
|
// (96:8) {#if status === BonusStatus.active}
|
|
690
|
-
function
|
|
690
|
+
function nr(e){let n,r,o,i,s,a,l=[ee("BonusInfoExpireDate")],u={};for(let e=0;e<l.length;e+=1)u=t(u,l[e]);let d=[ee("BonusInfoExpire")],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);return{c(){n=g("section"),r=g("img"),i=y(),s=g("span"),a=b(/*expiryTime*/e[6]),C(r,"class","icon"),c(r.src,o="data:image/svg+xml,%3csvg width='26' height='25' viewBox='0 0 26 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_3490_603)'%3e%3cpath d='M12.502 0C5.60958 0 0.00195312 5.60762 0.00195312 12.5C0.00195312 19.3924 5.60958 25 12.502 25C19.3943 25 25.002 19.3924 25.002 12.5C25.002 5.60762 19.3943 0 12.502 0ZM12.502 23.4375C6.47091 23.4375 1.56446 18.531 1.56446 12.5C1.56446 6.46896 6.47091 1.56251 12.502 1.56251C18.533 1.56251 23.4394 6.46896 23.4394 12.5C23.4394 18.531 18.533 23.4375 12.502 23.4375Z' fill='black'/%3e%3cpath d='M13.2832 4.6875H11.7207V12.8235L16.6371 17.7398L17.7418 16.6351L13.2832 12.1765V4.6875Z' fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_3490_603'%3e%3crect width='25' height='25' fill='white' transform='translate(0.00195312)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e")||C(r,"src","data:image/svg+xml,%3csvg width='26' height='25' viewBox='0 0 26 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_3490_603)'%3e%3cpath d='M12.502 0C5.60958 0 0.00195312 5.60762 0.00195312 12.5C0.00195312 19.3924 5.60958 25 12.502 25C19.3943 25 25.002 19.3924 25.002 12.5C25.002 5.60762 19.3943 0 12.502 0ZM12.502 23.4375C6.47091 23.4375 1.56446 18.531 1.56446 12.5C1.56446 6.46896 6.47091 1.56251 12.502 1.56251C18.533 1.56251 23.4394 6.46896 23.4394 12.5C23.4394 18.531 18.533 23.4375 12.502 23.4375Z' fill='black'/%3e%3cpath d='M13.2832 4.6875H11.7207V12.8235L16.6371 17.7398L17.7418 16.6351L13.2832 12.1765V4.6875Z' fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_3490_603'%3e%3crect width='25' height='25' fill='white' transform='translate(0.00195312)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"),C(r,"alt","expiryTime"),w(s,u),w(n,m)},m(e,t){p(e,n,t),h(n,r),h(n,i),h(n,s),h(s,a)},p(e,t){/*expiryTime*/64&t[0]&&A(a,/*expiryTime*/e[6]),w(s,u=F(l,[ee("BonusInfoExpireDate")])),w(n,m=F(d,[ee("BonusInfoExpire")]))},d(e){e&&f(n)}}}
|
|
691
691
|
// (107:6) {#if status === BonusStatus.claimable}
|
|
692
|
-
function
|
|
692
|
+
function rr(e){let n,r,o,i,s,a,l,u,d,m,v,T,B,S,_,H,L,P,R,I,O,M,x,N,$,D,U,k,G,V,j,Z=/*bonus*/(e[1].description||"")+"",K=/*levels*/e[2].length+"",W=/*$_*/e[10](Xn.startChallenge)+"",X=[ee("BonusInfoDescription")],J={};for(let e=0;e<X.length;e+=1)J=t(J,X[e]);let q=[ee("StatusClaimableInfoLevels")],Q={};for(let e=0;e<q.length;e+=1)Q=t(Q,q[e]);let te=[ee("StatusClaimableInfoPeriod")],ne={};for(let e=0;e<te.length;e+=1)ne=t(ne,te[e]);let re=[ee("StatusClaimableInfo")],oe={};for(let e=0;e<re.length;e+=1)oe=t(oe,re[e]);let ie=[ee("StatusClaimableCommandTerms","terms")],se={};for(let e=0;e<ie.length;e+=1)se=t(se,ie[e]);let ae=[ee("StatusClaimableCommand")],le={};for(let e=0;e<ae.length;e+=1)le=t(le,ae[e]);let ce=[ee("StatusClaimable","layout-horizental space-between")],ue={};for(let e=0;e<ce.length;e+=1)ue=t(ue,ce[e]);return{c(){n=g("div"),r=b(Z),o=y(),i=g("hr"),s=y(),a=g("section"),l=g("div"),u=g("div"),d=g("img"),v=y(),T=b(K),B=b(" Levels"),S=y(),_=g("div"),H=g("img"),P=y(),R=b(/*endTime*/e[7]),I=y(),O=g("div"),M=g("button"),x=b(W),$=y(),D=g("div"),U=g("a"),k=b("Terms and Conditions"),w(n,J),C(d,"class","icon"),c(d.src,m=Y)||C(d,"src","data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_347)'%3e %3cpath d='M12.5002 7.5C11.5797 7.5 10.8335 8.2462 10.8335 9.16667V23.3333C10.8335 24.2538 11.5797 25 12.5002 25C13.4206 25 14.1668 24.2538 14.1668 23.3333V9.16667C14.1668 8.2462 13.4206 7.5 12.5002 7.5ZM13.3335 23.3333C13.3335 23.7936 12.9604 24.1667 12.5002 24.1667C12.0399 24.1667 11.6668 23.7936 11.6668 23.3333V9.16667C11.6668 8.70641 12.0399 8.33333 12.5002 8.33333C12.9604 8.33333 13.3335 8.70641 13.3335 9.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M7.08317 12.5C6.1627 12.5 5.4165 13.2462 5.4165 14.1667V23.3333C5.4165 24.2538 6.1627 25 7.08317 25C8.00364 25 8.74984 24.2538 8.74984 23.3333V14.1667C8.74984 13.2462 8.00364 12.5 7.08317 12.5ZM7.9165 23.3333C7.9165 23.7936 7.54343 24.1667 7.08317 24.1667C6.62291 24.1667 6.24984 23.7936 6.24984 23.3333V14.1667C6.24984 13.7064 6.62291 13.3333 7.08317 13.3333C7.54343 13.3333 7.9165 13.7064 7.9165 14.1667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M1.66667 18.333C0.746198 18.333 0 19.0792 0 19.9997V23.333C0 24.2535 0.746198 24.9997 1.66667 24.9997C2.58714 24.9997 3.33333 24.2535 3.33333 23.333V19.9997C3.33333 19.0792 2.58714 18.333 1.66667 18.333ZM2.5 23.333C2.5 23.7933 2.12693 24.1663 1.66667 24.1663C1.20641 24.1663 0.833333 23.7933 0.833333 23.333V19.9997C0.833333 19.5394 1.20641 19.1663 1.66667 19.1663C2.12693 19.1663 2.5 19.5394 2.5 19.9997V23.333Z' fill='%2300AEEF'/%3e %3cpath d='M17.9167 2.5C16.9962 2.5 16.25 3.2462 16.25 4.16667V23.3333C16.25 24.2538 16.9962 25 17.9167 25C18.8371 25 19.5833 24.2538 19.5833 23.3333V4.16667C19.5833 3.2462 18.8371 2.5 17.9167 2.5ZM18.75 23.3333C18.75 23.7936 18.3769 24.1667 17.9167 24.1667C17.4564 24.1667 17.0833 23.7936 17.0833 23.3333V4.16667C17.0833 3.70641 17.4564 3.33333 17.9167 3.33333C18.3769 3.33333 18.75 3.70641 18.75 4.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M23.3332 0C22.4127 0 21.6665 0.746198 21.6665 1.66667V23.3333C21.6665 24.2538 22.4127 25 23.3332 25C24.2536 25 24.9998 24.2538 24.9998 23.3333V1.66667C24.9998 0.746198 24.2536 0 23.3332 0ZM24.1665 23.3333C24.1665 23.7936 23.7934 24.1667 23.3332 24.1667C22.8729 24.1667 22.4998 23.7936 22.4998 23.3333V1.66667C22.4998 1.20641 22.8729 0.833333 23.3332 0.833333C23.7934 0.833333 24.1665 1.20641 24.1665 1.66667V23.3333Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_347'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e"),C(d,"alt","Levels"),w(u,Q),C(H,"class","icon"),c(H.src,L=z)||C(H,"src","data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_338)'%3e %3cpath d='M12.5 0C5.60762 0 0 5.60762 0 12.5C0 19.3924 5.60762 25 12.5 25C19.3924 25 25 19.3924 25 12.5C25 5.60762 19.3924 0 12.5 0ZM12.5 23.4375C6.46896 23.4375 1.56251 18.531 1.56251 12.5C1.56251 6.46896 6.46896 1.56251 12.5 1.56251C18.531 1.56251 23.4375 6.46896 23.4375 12.5C23.4375 18.531 18.531 23.4375 12.5 23.4375V23.4375Z' fill='%2300AEEF'/%3e %3cpath d='M13.2813 4.6875H11.7188V12.8235L16.6351 17.7398L17.7399 16.6351L13.2813 12.1765V4.6875Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_338'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e"),C(H,"alt","EndTime"),w(_,ne),w(l,oe),C(M,"type","button"),M.disabled=N=!/*isButtonClickable*/e[8],C(U,"href",G=/*bonus*/e[1].termsUrl),C(U,"target","__blank"),w(D,se),w(O,le),w(a,ue)},m(t,c){p(t,n,c),h(n,r),p(t,o,c),p(t,i,c),p(t,s,c),p(t,a,c),h(a,l),h(l,u),h(u,d),h(u,v),h(u,T),h(u,B),h(l,S),h(l,_),h(_,H),h(_,P),h(_,R),h(a,I),h(a,O),h(O,M),h(M,x),h(O,$),h(O,D),h(D,U),h(U,k),V||(j=E(M,"click",/*eventStartChallenge*/e[11]),V=!0)},p(e,t){/*bonus*/2&t[0]&&Z!==(Z=/*bonus*/(e[1].description||"")+"")&&A(r,Z),w(n,J=F(X,[ee("BonusInfoDescription")])),/*levels*/4&t[0]&&K!==(K=/*levels*/e[2].length+"")&&A(T,K),w(u,Q=F(q,[ee("StatusClaimableInfoLevels")])),/*endTime*/128&t[0]&&A(R,/*endTime*/e[7]),w(_,ne=F(te,[ee("StatusClaimableInfoPeriod")])),w(l,oe=F(re,[ee("StatusClaimableInfo")])),/*$_*/1024&t[0]&&W!==(W=/*$_*/e[10](Xn.startChallenge)+"")&&A(x,W),/*isButtonClickable*/256&t[0]&&N!==(N=!/*isButtonClickable*/e[8])&&(M.disabled=N),/*bonus*/2&t[0]&&G!==(G=/*bonus*/e[1].termsUrl)&&C(U,"href",G),w(D,se=F(ie,[ee("StatusClaimableCommandTerms","terms")])),w(O,le=F(ae,[ee("StatusClaimableCommand")])),w(a,ue=F(ce,[ee("StatusClaimable","layout-horizental space-between")]))},d(e){e&&f(n),e&&f(o),e&&f(i),e&&f(s),e&&f(a),V=!1,j()}}}
|
|
693
693
|
// (148:6) {#if status !== BonusStatus.claimable}
|
|
694
|
-
function
|
|
694
|
+
function or(e){let n,r,o,i,s,a,l,c,u,d,m,v,E,T,S,_,H,L,P,R,I,O,M,x,N=/*levelsCurrent*/e[3].textWithLength+"",$=/*bonusTypeInfo*/e[5].target()+"",D=[oe.completed,oe.released].includes(/*bonus*/e[1].status),U=[ee("LevelStatus")],k={};for(let e=0;e<U.length;e+=1)k=t(k,U[e]);let G=[ee("LevelStatusWrapper")],V={};for(let e=0;e<G.length;e+=1)V=t(V,G[e]);let j=[ee("BonusTypeTarget","title")],Z={};for(let e=0;e<j.length;e+=1)Z=t(Z,j[e]);let K=/*bonus*/e[1].status===oe.active&&ir(e),W=D&&sr(e),X=[ee("BonusType")],z={};for(let e=0;e<X.length;e+=1)z=t(z,X[e]);let Y=[ee("BonusTerms","terms")],J={};for(let e=0;e<Y.length;e+=1)J=t(J,Y[e]);let q=[ee("BonusTypeWrapper")],Q={};for(let e=0;e<q.length;e+=1)Q=t(Q,q[e]);let te=[ee("AfterClaimedWrapper","layout-horizental space-between")],ne={};for(let e=0;e<te.length;e+=1)ne=t(ne,te[e]);return{c(){n=g("hr"),r=y(),o=g("section"),i=g("div"),s=g("casino-wagering-bonus-progress"),l=y(),c=g("div"),u=b("Level\n "),d=b(N),m=y(),v=g("div"),E=g("div"),T=g("div"),S=b($),_=y(),K&&K.c(),H=y(),W&&W.c(),L=y(),P=g("div"),R=b("Learn more about the challenge rules and included games or events in \n "),I=g("a"),O=b("Terms and Conditions"),x=b("\n section"),B(s,"percent",/*percent*/e[4]),B(s,"status",a=/*bonus*/e[1].status),w(c,k),w(i,V),w(T,Z),w(E,z),C(I,"href",M=/*bonus*/e[1].termsUrl),C(I,"target","__blank"),w(P,J),w(v,Q),w(o,ne)},m(e,t){p(e,n,t),p(e,r,t),p(e,o,t),h(o,i),h(i,s),h(i,l),h(i,c),h(c,u),h(c,d),h(o,m),h(o,v),h(v,E),h(E,T),h(T,S),h(E,_),K&&K.m(E,null),h(E,H),W&&W.m(E,null),h(v,L),h(v,P),h(P,R),h(P,I),h(I,O),h(P,x)},p(e,t){/*percent*/16&t[0]&&B(s,"percent",/*percent*/e[4]),/*bonus*/2&t[0]&&a!==(a=/*bonus*/e[1].status)&&B(s,"status",a),/*levelsCurrent*/8&t[0]&&N!==(N=/*levelsCurrent*/e[3].textWithLength+"")&&A(d,N),w(c,k=F(U,[ee("LevelStatus")])),w(i,V=F(G,[ee("LevelStatusWrapper")])),/*bonusTypeInfo*/32&t[0]&&$!==($=/*bonusTypeInfo*/e[5].target()+"")&&A(S,$),w(T,Z=F(j,[ee("BonusTypeTarget","title")])),/*bonus*/e[1].status===oe.active?K?K.p(e,t):(K=ir(e),K.c(),K.m(E,H)):K&&(K.d(1),K=null),/*bonus*/2&t[0]&&(D=[oe.completed,oe.released].includes(/*bonus*/e[1].status)),D?W?W.p(e,t):(W=sr(e),W.c(),W.m(E,null)):W&&(W.d(1),W=null),w(E,z=F(X,[ee("BonusType")])),/*bonus*/2&t[0]&&M!==(M=/*bonus*/e[1].termsUrl)&&C(I,"href",M),w(P,J=F(Y,[ee("BonusTerms","terms")])),w(v,Q=F(q,[ee("BonusTypeWrapper")])),w(o,ne=F(te,[ee("AfterClaimedWrapper","layout-horizental space-between")]))},d(e){e&&f(n),e&&f(r),e&&f(o),K&&K.d(),W&&W.d()}}}
|
|
695
695
|
// (170:12) {#if bonus.status === BonusStatus.active}
|
|
696
|
-
function
|
|
696
|
+
function ir(e){let n,r,o,i,s,a=/*bonusTypeInfo*/e[5].remaining()+"",l=/*bonusTypeInfo*/e[5].got()+"",c=[ee("BonusTypeRemaining")],u={};for(let e=0;e<c.length;e+=1)u=t(u,c[e]);let d=[ee("BonusTypeGot")],m={};for(let e=0;e<d.length;e+=1)m=t(m,d[e]);return{c(){n=g("div"),r=b(a),o=y(),i=g("div"),s=b(l),w(n,u),w(i,m)},m(e,t){p(e,n,t),h(n,r),p(e,o,t),p(e,i,t),h(i,s)},p(e,t){/*bonusTypeInfo*/32&t[0]&&a!==(a=/*bonusTypeInfo*/e[5].remaining()+"")&&A(r,a),w(n,u=F(c,[ee("BonusTypeRemaining")])),/*bonusTypeInfo*/32&t[0]&&l!==(l=/*bonusTypeInfo*/e[5].got()+"")&&A(s,l),w(i,m=F(d,[ee("BonusTypeGot")]))},d(e){e&&f(n),e&&f(o),e&&f(i)}}}
|
|
697
697
|
// (179:12) {#if [BonusStatus.completed, BonusStatus.released].includes(bonus.status)}
|
|
698
|
-
function
|
|
698
|
+
function sr(e){let t,n,r,o,i,s,a,l,u,d,m=/*levelsCurrent*/e[3].textWithLength+"";return{c(){t=g("div"),n=g("img"),o=b("\n Completed"),i=y(),s=g("div"),a=g("img"),u=b("\n Levels finished:\n "),d=b(m),C(n,"class","icon"),c(n.src,r=z)||C(n,"src","data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_338)'%3e %3cpath d='M12.5 0C5.60762 0 0 5.60762 0 12.5C0 19.3924 5.60762 25 12.5 25C19.3924 25 25 19.3924 25 12.5C25 5.60762 19.3924 0 12.5 0ZM12.5 23.4375C6.46896 23.4375 1.56251 18.531 1.56251 12.5C1.56251 6.46896 6.46896 1.56251 12.5 1.56251C18.531 1.56251 23.4375 6.46896 23.4375 12.5C23.4375 18.531 18.531 23.4375 12.5 23.4375V23.4375Z' fill='%2300AEEF'/%3e %3cpath d='M13.2813 4.6875H11.7188V12.8235L16.6351 17.7398L17.7399 16.6351L13.2813 12.1765V4.6875Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_338'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e"),C(a,"class","icon"),c(a.src,l=Y)||C(a,"src","data:image/svg+xml,%3csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cg clip-path='url(%23clip0_3490_347)'%3e %3cpath d='M12.5002 7.5C11.5797 7.5 10.8335 8.2462 10.8335 9.16667V23.3333C10.8335 24.2538 11.5797 25 12.5002 25C13.4206 25 14.1668 24.2538 14.1668 23.3333V9.16667C14.1668 8.2462 13.4206 7.5 12.5002 7.5ZM13.3335 23.3333C13.3335 23.7936 12.9604 24.1667 12.5002 24.1667C12.0399 24.1667 11.6668 23.7936 11.6668 23.3333V9.16667C11.6668 8.70641 12.0399 8.33333 12.5002 8.33333C12.9604 8.33333 13.3335 8.70641 13.3335 9.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M7.08317 12.5C6.1627 12.5 5.4165 13.2462 5.4165 14.1667V23.3333C5.4165 24.2538 6.1627 25 7.08317 25C8.00364 25 8.74984 24.2538 8.74984 23.3333V14.1667C8.74984 13.2462 8.00364 12.5 7.08317 12.5ZM7.9165 23.3333C7.9165 23.7936 7.54343 24.1667 7.08317 24.1667C6.62291 24.1667 6.24984 23.7936 6.24984 23.3333V14.1667C6.24984 13.7064 6.62291 13.3333 7.08317 13.3333C7.54343 13.3333 7.9165 13.7064 7.9165 14.1667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M1.66667 18.333C0.746198 18.333 0 19.0792 0 19.9997V23.333C0 24.2535 0.746198 24.9997 1.66667 24.9997C2.58714 24.9997 3.33333 24.2535 3.33333 23.333V19.9997C3.33333 19.0792 2.58714 18.333 1.66667 18.333ZM2.5 23.333C2.5 23.7933 2.12693 24.1663 1.66667 24.1663C1.20641 24.1663 0.833333 23.7933 0.833333 23.333V19.9997C0.833333 19.5394 1.20641 19.1663 1.66667 19.1663C2.12693 19.1663 2.5 19.5394 2.5 19.9997V23.333Z' fill='%2300AEEF'/%3e %3cpath d='M17.9167 2.5C16.9962 2.5 16.25 3.2462 16.25 4.16667V23.3333C16.25 24.2538 16.9962 25 17.9167 25C18.8371 25 19.5833 24.2538 19.5833 23.3333V4.16667C19.5833 3.2462 18.8371 2.5 17.9167 2.5ZM18.75 23.3333C18.75 23.7936 18.3769 24.1667 17.9167 24.1667C17.4564 24.1667 17.0833 23.7936 17.0833 23.3333V4.16667C17.0833 3.70641 17.4564 3.33333 17.9167 3.33333C18.3769 3.33333 18.75 3.70641 18.75 4.16667V23.3333Z' fill='%2300AEEF'/%3e %3cpath d='M23.3332 0C22.4127 0 21.6665 0.746198 21.6665 1.66667V23.3333C21.6665 24.2538 22.4127 25 23.3332 25C24.2536 25 24.9998 24.2538 24.9998 23.3333V1.66667C24.9998 0.746198 24.2536 0 23.3332 0ZM24.1665 23.3333C24.1665 23.7936 23.7934 24.1667 23.3332 24.1667C22.8729 24.1667 22.4998 23.7936 22.4998 23.3333V1.66667C22.4998 1.20641 22.8729 0.833333 23.3332 0.833333C23.7934 0.833333 24.1665 1.20641 24.1665 1.66667V23.3333Z' fill='%2300AEEF'/%3e %3c/g%3e %3cdefs%3e %3cclipPath id='clip0_3490_347'%3e %3crect width='25' height='25' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e%3c/svg%3e")},m(e,r){p(e,t,r),h(t,n),h(t,o),p(e,i,r),p(e,s,r),h(s,a),h(s,u),h(s,d)},p(e,t){/*levelsCurrent*/8&t[0]&&m!==(m=/*levelsCurrent*/e[3].textWithLength+"")&&A(d,m)},d(e){e&&f(t),e&&f(i),e&&f(s)}}}
|
|
699
699
|
// (211:8) {#if status !== BonusStatus.claimable}
|
|
700
|
-
function
|
|
700
|
+
function ar(e){let n,r,o,i,s=[ee("RewardsTopBarLinkToDetail")],a={};for(let e=0;e<s.length;e+=1)a=t(a,s[e]);return{c(){n=g("div"),r=g("a"),r.textContent="All Rewards",C(r,"href","javascript:void(0)"),w(n,a)},m(t,s){p(t,n,s),h(n,r),o||(i=E(r,"click",/*click_handler*/e[17]),o=!0)},p(e,t){w(n,a=F(s,[ee("RewardsTopBarLinkToDetail")]))},d(e){e&&f(n),o=!1,i()}}}
|
|
701
701
|
// (226:8) {#if status !== BonusStatus.claimable}
|
|
702
|
-
function
|
|
702
|
+
function lr(e){let t,n=Te(/*bonus*/e[1],/*status*/e[0],/*levels*/e[2]),r=[];for(let t=0;t<n.length;t+=1)r[t]=ur(Qn(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);p(e,t,n)},p(e,o){if(/*bonus, status, levels, $_*/1031&o[0]){let i;for(n=Te(/*bonus*/e[1],/*status*/e[0],/*levels*/e[2]),i=0;i<n.length;i+=1){const s=Qn(e,n,i);r[i]?r[i].p(s,o):(r[i]=ur(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&f(t)}}}
|
|
703
703
|
// (234:14) {#each reward.descriptions as description}
|
|
704
|
-
function
|
|
704
|
+
function cr(e){let t,n,r=/*description*/e[34]+"";return{c(){t=g("p"),n=b(r)},m(e,r){p(e,t,r),h(t,n)},p(e,t){/*bonus, status, levels*/7&t[0]&&r!==(r=/*description*/e[34]+"")&&A(n,r)},d(e){e&&f(t)}}}
|
|
705
705
|
// (227:10) {#each (getRewards(bonus, status, levels)) as reward}
|
|
706
|
-
function
|
|
706
|
+
function ur(e){let n,r,o,i,s,a,l,c,u,m=/*$_*/e[10](Xn[/*reward*/e[31].key])+"",v=/*$_*/e[10](Xn.level)+"",E=[ee("BonusRewardsLevelsItemPosition")],C={};for(let e=0;e<E.length;e+=1)C=t(C,E[e]);let T=/*reward*/e[31].descriptions,B=[];for(let t=0;t<T.length;t+=1)B[t]=cr(er(e,T,t));let S=[ee("BonusRewardsLevelsItem")],_={};for(let e=0;e<S.length;e+=1)_=t(_,S[e]);return{c(){n=g("div"),r=g("div"),o=b(m),i=y(),s=b(v),a=b(":"),l=y(),c=g("div");for(let e=0;e<B.length;e+=1)B[e].c();u=y(),w(r,C),w(n,_)},m(e,t){p(e,n,t),h(n,r),h(r,o),h(r,i),h(r,s),h(r,a),h(n,l),h(n,c);for(let e=0;e<B.length;e+=1)B[e].m(c,null);h(n,u)},p(e,t){if(/*$_, bonus, status, levels*/1031&t[0]&&m!==(m=/*$_*/e[10](Xn[/*reward*/e[31].key])+"")&&A(o,m),/*$_*/1024&t[0]&&v!==(v=/*$_*/e[10](Xn.level)+"")&&A(s,v),w(r,C=F(E,[ee("BonusRewardsLevelsItemPosition")])),/*bonus, status, levels*/7&t[0]){let n;for(T=/*reward*/e[31].descriptions,n=0;n<T.length;n+=1){const r=er(e,T,n);B[n]?B[n].p(r,t):(B[n]=cr(r),B[n].c(),B[n].m(c,null))}for(;n<B.length;n+=1)B[n].d(1);B.length=T.length}w(n,_=F(S,[ee("BonusRewardsLevelsItem")]))},d(e){e&&f(n),d(B,e)}}}
|
|
707
707
|
// (243:8) {#if status === BonusStatus.claimable}
|
|
708
|
-
function
|
|
708
|
+
function hr(e){let t,n=/*bonus*/e[1].levels,r=[];for(let t=0;t<n.length;t+=1)r[t]=fr(Jn(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);p(e,t,n)},p(e,o){if(/*bonus, $_*/1026&o[0]){let i;for(n=/*bonus*/e[1].levels,i=0;i<n.length;i+=1){const s=Jn(e,n,i);r[i]?r[i].p(s,o):(r[i]=fr(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&f(t)}}}
|
|
709
709
|
// (259:14) {#each level.bonuses as levelBonus}
|
|
710
|
-
function
|
|
710
|
+
function pr(e){let t,n,r=we(/*level*/e[25],/*levelBonus*/e[28])+"";return{c(){t=g("p"),n=b(r)},m(e,r){p(e,t,r),h(t,n)},p(e,t){/*bonus*/2&t[0]&&r!==(r=we(/*level*/e[25],/*levelBonus*/e[28])+"")&&A(n,r)},d(e){e&&f(t)}}}
|
|
711
711
|
// (244:10) {#each bonus.levels as level, index}
|
|
712
|
-
function
|
|
712
|
+
function fr(e){let n,r,o,i,s,a,l,c,u,m=/*$_*/e[10](Xn.level)+"",v=/*level*/(e[25].maxRepeats>1?`${/*index*/e[27]+1}-${/*index*/e[27]+1+/*level*/e[25].maxRepeats-1}`/*index*/:e[27]+1)+"",E=[ee("BonusRewardsLevelsItemPosition")],C={};for(let e=0;e<E.length;e+=1)C=t(C,E[e]);let T=/*level*/e[25].bonuses,B=[];for(let t=0;t<T.length;t+=1)B[t]=pr(qn(e,T,t));let S=[ee("BonusRewardsLevelsItem")],_={};for(let e=0;e<S.length;e+=1)_=t(_,S[e]);return{c(){n=g("div"),r=g("div"),o=b(m),i=y(),s=b(v),a=b(":"),l=y(),c=g("div");for(let e=0;e<B.length;e+=1)B[e].c();u=y(),w(r,C),w(n,_)},m(e,t){p(e,n,t),h(n,r),h(r,o),h(r,i),h(r,s),h(r,a),h(n,l),h(n,c);for(let e=0;e<B.length;e+=1)B[e].m(c,null);h(n,u)},p(e,t){if(/*$_*/1024&t[0]&&m!==(m=/*$_*/e[10](Xn.level)+"")&&A(o,m),/*bonus*/2&t[0]&&v!==(v=/*level*/(e[25].maxRepeats>1?`${/*index*/e[27]+1}-${/*index*/e[27]+1+/*level*/e[25].maxRepeats-1}`/*index*/:e[27]+1)+"")&&A(s,v),w(r,C=F(E,[ee("BonusRewardsLevelsItemPosition")])),/*bonus*/2&t[0]){let n;for(T=/*level*/e[25].bonuses,n=0;n<T.length;n+=1){const r=qn(e,T,n);B[n]?B[n].p(r,t):(B[n]=pr(r),B[n].c(),B[n].m(c,null))}for(;n<B.length;n+=1)B[n].d(1);B.length=T.length}w(n,_=F(S,[ee("BonusRewardsLevelsItem")]))},d(e){e&&f(n),d(B,e)}}}
|
|
713
713
|
// (274:10) {#each Object.keys(bonus.extension?.bonus.wallet || bonus.wallet).filter(k => ['sports', 'casino'].includes(k)) as support, i}
|
|
714
|
-
function
|
|
715
|
-
return e[18](/*support*/e[22])}return{c(){t=g("div"),n=g("a"),r=b(l),i=y(),C(n,"href",o="javascript:void(0)")},m(e,o){p(e,t,o),h(t,n),h(n,r),h(t,i),s||(a=E(n,"click",c),s=!0)},p(t,n){e=t,/*bonus*/2&n[0]&&l!==(l=/*support*/e[22]+"")&&A(r,l)},d(e){e&&f(t),s=!1,a()}}}function
|
|
714
|
+
function dr(e){let t,n,r,o,i,s,a,l=/*support*/e[22]+"";function c(){/*click_handler_1*/
|
|
715
|
+
return e[18](/*support*/e[22])}return{c(){t=g("div"),n=g("a"),r=b(l),i=y(),C(n,"href",o="javascript:void(0)")},m(e,o){p(e,t,o),h(t,n),h(n,r),h(t,i),s||(a=E(n,"click",c),s=!0)},p(t,n){e=t,/*bonus*/2&n[0]&&l!==(l=/*support*/e[22]+"")&&A(r,l)},d(e){e&&f(t),s=!1,a()}}}function gr(t){let n,r=/*bonus*/t[1]&&/*isShowingBonus*/t[9]&&tr(t);return{c(){r&&r.c(),n=v(),this.c=e},m(e,t){r&&r.m(e,t),p(e,n,t)},p(e,t){/*bonus*/e[1]&&/*isShowingBonus*/e[9]?r?r.p(e,t):(r=tr(e),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},i:e,o:e,d(e){r&&r.d(e),e&&f(n)}}}const mr=e=>["sports","casino"].includes(e);function br(e,t,n){let r,o;var i,s;i=Zn,s=e=>n(10,o=e),e.$$.on_destroy.push(u(i,s));let a,l,c,h,{rawbonus:p=""}=t,{endpoint:f=""}=t,{currency:d="EUR"}=t,{lang:g=ae.en}=t,{session:m=""}=t,{status:b=oe.claimable}=t,y=[],v="0",E="",C=!0,w=3e4;const T=()=>{try{n(1,a=Object.assign({},JSON.parse(p)))}catch(e){console.error(e)}if(a){if(n(2,y=(e=>{const t=[];return e.map((e=>{const{maxRepeats:n,completedTime:r}=e,o=ce(e,["maxRepeats","completedTime"]);for(let e=0;e<n;e++)t.push(Object.assign({},o))})),t})(a.levels)),a.bonusWalletID){const e=((e,t)=>({bonusTypeInfo:Ae(e,t),percent:ye(e.status,{completed:()=>"100",current:()=>{if(!e.wageringProgress)return"0";let{currency:t,currentLevelIncrement:n,gap:r,currentLevel:o}=e.wageringProgress;const i=n-r;return String(Math.floor(i/n*100))}}),levelsCurrent:ye(e.status,{completed:()=>({text:t.length,textWithLength:`${t.length}/${t.length}`}),current:()=>{if(!e.wageringProgress)return{current:"0",textWithLength:`0/${t.length}`};const{currentLevel:n}=e.wageringProgress;return{text:n,textWithLength:`${n}/${t.length}`}}})}))(a,y);n(5,c=e.bonusTypeInfo),n(4,v=e.percent),n(3,l=e.levelsCurrent)}B()}},B=()=>{a&&(_e(a.expiryDate,w,(()=>n(6,h="Expired")),(e=>n(6,h=e))),_e(a.endTime||a.trigger.endTime,w,(()=>n(7,E="Ended")),(e=>n(7,E=e))))};H((()=>{const e=setInterval((()=>{B()}),w);return()=>{clearInterval(e)}})),de({OnWageringBonusButtonStateChanged:e=>n(8,C=e.clickable)});return e.$$set=e=>{"rawbonus"in e&&n(12,p=e.rawbonus),"endpoint"in e&&n(13,f=e.endpoint),"currency"in e&&n(14,d=e.currency),"lang"in e&&n(15,g=e.lang),"session"in e&&n(16,m=e.session),"status"in e&&n(0,b=e.status)},e.$$.update=()=>{var t;/*rawbonus*/4096&e.$$.dirty[0]&&p&&T(),/*lang*/32768&e.$$.dirty[0]&&g&&(t=g,On.set(t)),/*status, bonus*/3&e.$$.dirty[0]&&n(9,r=b===oe.claimable||a.status===b)},[b,a,y,l,v,c,h,E,C,r,o,async()=>{if(!m)return;fe({type:"OnWageringBonusJoinRequest",bonusID:a.bonusID}),fe({type:"OnWageringBonusButtonStateChanged",clickable:!1});(await Ee(f,m,a.code,d)).success&&fe({type:"OnWageringBonusClaimed"}),fe({type:"OnWageringBonusButtonStateChanged",clickable:!0})},p,f,d,g,m,()=>fe({type:"OnWageringBonusAllRewardsClick",bonusWalletID:a.id}),e=>fe({type:"OnWageringBonusSupportClicked",support:e})]}var yr,vr;
|
|
716
716
|
/* src/CasinoWageringBonusesController.svelte generated by Svelte v3.48.0 */
|
|
717
|
-
function
|
|
717
|
+
function Er(e,t,n){const r=e.slice();return r[15]=t[n],r}function Cr(e,t,n){const r=e.slice();return r[18]=t[n],r}
|
|
718
718
|
// (87:4) {#each Object.keys(BonusStatus) as _status}
|
|
719
|
-
function
|
|
720
|
-
return e[11](/*_status*/e[18])}return{c(){t=g("li"),n=b(a),r=y(),C(t,"class",o=/*status*/e[0]===
|
|
719
|
+
function wr(e){let t,n,r,o,i,s,a=oe[/*_status*/e[18]]+"";function l(){/*click_handler*/
|
|
720
|
+
return e[11](/*_status*/e[18])}return{c(){t=g("li"),n=b(a),r=y(),C(t,"class",o=/*status*/e[0]===oe[/*_status*/e[18]]?"active":"")},m(e,o){p(e,t,o),h(t,n),h(t,r),i||(s=E(t,"click",l),i=!0)},p(n,r){e=n,/*status*/1&r&&o!==(o=/*status*/e[0]===oe[/*_status*/e[18]]?"active":"")&&C(t,"class",o)},d(e){e&&f(t),i=!1,s()}}}
|
|
721
721
|
// (120:4) {:else}
|
|
722
|
-
function
|
|
722
|
+
function Tr(t){let n;return{c(){n=b("No wagering bonuses found")},m(e,t){p(e,n,t)},p:e,d(e){e&&f(n)}}}
|
|
723
723
|
// (118:4) {#if errorMessage}
|
|
724
|
-
function
|
|
724
|
+
function Br(e){let t,n,r;return{c(){var o,i,s,a;t=g("div"),n=b("Error: "),r=b(/*errorMessage*/e[7]),o=t,i="color",null===(s="red")?o.style.removeProperty(i):o.style.setProperty(i,s,a?"important":"")},m(e,o){p(e,t,o),h(t,n),h(t,r)},p(e,t){/*errorMessage*/128&t&&A(r,/*errorMessage*/e[7])},d(e){e&&f(t)}}}
|
|
725
725
|
// (105:2) {#if bonuses.length > 0}
|
|
726
|
-
function
|
|
726
|
+
function Ar(e){let t,n=/*bonuses*/e[5],r=[];for(let t=0;t<n.length;t+=1)r[t]=_r(Er(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=v()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);p(e,t,n)},p(e,o){if(/*endpoint, session, lang, currency, JSON, bonuses, status*/63&o){let i;for(n=/*bonuses*/e[5],i=0;i<n.length;i+=1){const s=Er(e,n,i);r[i]?r[i].p(s,o):(r[i]=_r(s),r[i].c(),r[i].m(t.parentNode,t))}for(;i<r.length;i+=1)r[i].d(1);r.length=n.length}},d(e){d(r,e),e&&f(t)}}}
|
|
727
727
|
// (102:0) {#if isLoading}
|
|
728
|
-
function
|
|
728
|
+
function Sr(t){let n;return{c(){n=b("Loading, please wait ...")},m(e,t){p(e,n,t)},p:e,d(e){e&&f(n)}}}
|
|
729
729
|
// (106:4) {#each bonuses as item}
|
|
730
|
-
function
|
|
731
|
-
return e[6]?
|
|
730
|
+
function _r(e){let n,r=[{endpoint:/*endpoint*/e[1],session:/*session*/e[3],lang:/*lang*/e[2],currency:/*currency*/e[4],rawbonus:JSON.stringify(/*item*/e[15]),status:/*status*/e[0]}],o={};for(let e=0;e<r.length;e+=1)o=t(o,r[e]);return{c(){n=g("casino-wagering-bonus"),w(n,o)},m(e,t){p(e,n,t)},p(e,t){w(n,o=F(r,[/*endpoint, session, lang, currency, bonuses, status*/63&t&&{endpoint:/*endpoint*/e[1],session:/*session*/e[3],lang:/*lang*/e[2],currency:/*currency*/e[4],rawbonus:JSON.stringify(/*item*/e[15]),status:/*status*/e[0]}]))},d(e){e&&f(n)}}}function Hr(n){let r,o,i,s,a=Object.keys(oe),l=[];for(let e=0;e<a.length;e+=1)l[e]=wr(Cr(n,a,e));let c=[ee("WageringTabs")],u={};for(let e=0;e<c.length;e+=1)u=t(u,c[e]);function m(e,t){/*isLoading*/
|
|
731
|
+
return e[6]?Sr:/*bonuses*/e[5].length>0?Ar:/*errorMessage*/e[7]?Br:Tr}let b=m(n),E=b(n);return{c(){r=g("div"),o=g("ul");for(let e=0;e<l.length;e+=1)l[e].c();i=y(),E.c(),s=v(),this.c=e,w(r,u)},m(e,t){p(e,r,t),h(r,o);for(let e=0;e<l.length;e+=1)l[e].m(o,null);p(e,i,t),E.m(e,t),p(e,s,t)},p(e,[t]){if(/*status, BonusStatus, Object, init*/257&t){let n;for(a=Object.keys(oe),n=0;n<a.length;n+=1){const r=Cr(e,a,n);l[n]?l[n].p(r,t):(l[n]=wr(r),l[n].c(),l[n].m(o,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=a.length}w(r,u=F(c,[ee("WageringTabs")])),b===(b=m(e))&&E?E.p(e,t):(E.d(1),E=b(e),E&&(E.c(),E.m(s.parentNode,s)))},i:e,o:e,d(e){e&&f(r),d(l,e),e&&f(i),E.d(e),e&&f(s)}}}function Lr(e,t,n){let{endpoint:r=""}=t,{lang:o=ae.en}=t,{session:i=""}=t,{currency:s="EUR"}=t,{status:a=oe.claimable}=t,{limit:l=""}=t,c=!1;H((()=>(n(10,c=!0),()=>{n(10,c=!1)})));let u,h=[],p=!0,f="";Kn(zn);const d=(g={WageringProgressUpdate:e=>{n(5,h=h.map((t=>{let n=null==e?void 0:e.items[t.bonusWalletID];if(!n)return t;let{status:r,level:o,levelIncrement:i,gap:s}=n,a=Object.assign({},t);return a=Object.assign(Object.assign({},a),{wageringProgress:Object.assign(Object.assign({},a.wageringProgress),{currentLevel:o,currentLevelIncrement:i,gap:s})}),r&&(a=Object.assign(Object.assign({},a),{status:r}),setTimeout((()=>m()),500)),a})))}},e=>{let t=e.data;if(t)try{let e=JSON.parse(t);if(!e)return;Object.keys(g).map((t=>{if(e.messageType==t){const{messageType:n}=e,r=ce(e,["messageType"]);
|
|
732
732
|
// console.log(messageType, restData);
|
|
733
|
-
g[t](r)}}))}catch(e){console.error(e)}});var g;const m=async()=>{c&&a&&o&&i&&r&&(n(6,p=!0),await(async()=>{const e=await
|
|
733
|
+
g[t](r)}}))}catch(e){console.error(e)}});var g;const m=async()=>{c&&a&&o&&i&&r&&(n(6,p=!0),await(async()=>{const e=await ve(r,i,{lang:o,status:a,limit:l});e.success?(n(5,h=e.items||e.bonuses),
|
|
734
734
|
// if(status !== BonusStatus.claimable){
|
|
735
735
|
// bonuses = _bonuses.filter(bonus => bonus.status === status)
|
|
736
736
|
// }else{
|
|
737
737
|
// bonuses = _bonuses
|
|
738
738
|
// }
|
|
739
|
-
|
|
739
|
+
ge(u,d),a===oe.active&&(u=me(r,i,h,d))):n(7,f=e.errorMessage)})(),n(6,p=!1))};de({OnWageringBonusClaimed:()=>m(),OnWageringBonusExpired:()=>m()}),H((()=>()=>ge(u,d)));return e.$$set=e=>{"endpoint"in e&&n(1,r=e.endpoint),"lang"in e&&n(2,o=e.lang),"session"in e&&n(3,i=e.session),"currency"in e&&n(4,s=e.currency),"status"in e&&n(0,a=e.status),"limit"in e&&n(9,l=e.limit)},e.$$.update=()=>{/*isMounted*/1024&e.$$.dirty&&c&&m(),/*endpoint*/2&e.$$.dirty&&r&&m(),/*lang*/4&e.$$.dirty&&o&&m(),/*session*/8&e.$$.dirty&&i&&m()},[a,r,o,i,s,h,p,f,m,l,c,e=>{a!==oe[e]&&(n(0,a=oe[e]),m())}]}yr="casino-wagering-bonus",vr=class extends j{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';font-size:24px;line-height:28px;font-style:normal}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}button{font-size:24px;line-height:28px}hr{margin:18px 0;border-top:1px solid #00AEEF}section.layout-horizental{display:flex;flex-direction:row}section.layout-horizental.space-between{justify-content:space-between}.title{font-weight:700}.terms{font-size:18px;line-height:21px}.icon{width:24px;height:24px;vertical-align:bottom}.Root{border:1px solid #00AEEF;max-width:1300px;padding:28px 0}.Root>div{padding:0 28px}.Root>div:nth-child(1){flex:55%}.Root>div:nth-child(2){flex:45%;border-left:1px solid #00AEEF}.BonusInfoTitle{color:#59CA00}.BonusInfoExpireDate{color:#DC0D1F}.BonusInfoDescription{margin-top:20px}.StatusClaimableInfoPeriod{margin-top:18px}.StatusClaimable>div:nth-child(1){flex:40%}.StatusClaimable>div:nth-child(2){flex:60%}.StatusClaimableCommand button{width:100%;background:#00AEEF;border:1px solid #00AEEF;color:#FFFFFF;cursor:pointer;font-weight:400;padding:30px;transition:0.6s}.StatusClaimableCommand button:disabled{opacity:0.3}.StatusClaimableCommandTerms{margin-top:10px;text-align:center}.StatusClaimableCommandTerms a{color:#000000}.LevelStatus{text-align:center;margin-top:10px}.BonusTypeWrapper{margin-left:30px}.BonusType>div{margin-bottom:20px}.BonusTypeRemaining{color:#00AEEF}.BonusTypeGot{color:#7884A0}.RewardsTopBarTitle{color:#252631;padding-bottom:12px}.BonusRewardsLevels>div{margin-top:5px;padding:12px 0}.BonusRewardsLevelsItem{display:flex}.BonusRewardsLevelsItemPosition{margin-right:5px}.SupportsWrapper{margin-top:35px}.SupportsWrapper div{margin-top:15px}</style>",V(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},br,gr,s,{rawbonus:12,endpoint:13,currency:14,lang:15,session:16,status:0},null,[-1,-1]),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),D()))}static get observedAttributes(){return["rawbonus","endpoint","currency","lang","session","status"]}get rawbonus(){return this.$$.ctx[12]}set rawbonus(e){this.$$set({rawbonus:e}),D()}get endpoint(){return this.$$.ctx[13]}set endpoint(e){this.$$set({endpoint:e}),D()}get currency(){return this.$$.ctx[14]}set currency(e){this.$$set({currency:e}),D()}get lang(){return this.$$.ctx[15]}set lang(e){this.$$set({lang:e}),D()}get session(){return this.$$.ctx[16]}set session(e){this.$$set({session:e}),D()}get status(){return this.$$.ctx[0]}set status(e){this.$$set({status:e}),D()}},!customElements.get(yr)&&customElements.define(yr,vr);class Pr extends j{constructor(e){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}casino-wagering-bonus::part(Root){margin-bottom:30px}.WageringTabs{margin:20px 0}.WageringTabs li{display:inline;margin:10px 10px 10px 0;padding:10px;border:1px #ccc solid;cursor:pointer}.WageringTabs li.active{border-color:aquamarine;font-weight:700}</style>",V(this,{target:this.shadowRoot,props:S(this.attributes),customElement:!0},Lr,Hr,s,{endpoint:1,lang:2,session:3,currency:4,status:0,limit:9},null),e&&(e.target&&p(e.target,this,e.anchor),e.props&&(this.$set(e.props),D()))}static get observedAttributes(){return["endpoint","lang","session","currency","status","limit"]}get endpoint(){return this.$$.ctx[1]}set endpoint(e){this.$$set({endpoint:e}),D()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),D()}get session(){return this.$$.ctx[3]}set session(e){this.$$set({session:e}),D()}get currency(){return this.$$.ctx[4]}set currency(e){this.$$set({currency:e}),D()}get status(){return this.$$.ctx[0]}set status(e){this.$$set({status:e}),D()}get limit(){return this.$$.ctx[9]}set limit(e){this.$$set({limit:e}),D()}}
|
|
740
740
|
// @ts-ignore
|
|
741
|
-
return!customElements.get("casino-wagering-bonuses-controller")&&customElements.define("casino-wagering-bonuses-controller",
|
|
741
|
+
return!customElements.get("casino-wagering-bonuses-controller")&&customElements.define("casino-wagering-bonuses-controller",Pr),Pr}));
|
|
742
742
|
//# sourceMappingURL=casino-wagering-bonuses-controller.js.map
|