(()=>{"use strict";var e={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return e.d(r,{a:r}),r},d:(o,r)=>{for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{CurrencyContext:()=>y,CurrencyFactory:()=>c,default:()=>S,getCurrencyData:()=>l,getFilteredCurrencyInstance:()=>d});const r=window.wp.element,t=window.wp.htmlEntities,n=window.wp.i18n,a=window.wc.number,i=window.wp.deprecated;var s=e.n(i);const c=function(e){let o;function i(e){const o=e.replace(/<!--[\s\S]*?(-->|$)/g,"").replace(/<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/gi,"").replace(/<\/?[a-z][\s\S]*?(>|$)/gi,"");return o!==e?i(o):o}function c(e){if(e.priceFormat)return i(e.priceFormat.toString());switch(e.symbolPosition){case"left":return"%1$s%2$s";case"right":return"%2$s%1$s";case"left_space":return"%1$s %2$s";case"right_space":return"%2$s %1$s"}return"%1$s%2$s"}function l(e){const r={code:"USD",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2,...e};let n=r.precision;null===n?(console.warn("Currency precision is null"),n=NaN):"string"==typeof n&&(n=parseInt(n,10)),o={code:r.code.toString(),symbol:(0,t.decodeEntities)(r.symbol.toString()),symbolPosition:r.symbolPosition.toString(),decimalSeparator:r.decimalSeparator.toString(),priceFormat:c(r),thousandSeparator:r.thousandSeparator.toString(),precision:n}}function m(e,r=!1){const t=(0,a.numberFormat)(o,e);if(""===t)return t;const{priceFormat:i,symbol:s,code:c}=o;return(0,n.sprintf)(i,r?c:s,t)}return l(e),{getCurrencyConfig:()=>({...o}),getDataForCountry:function(e,o={},r={}){const n=o[e];if(!n)return{};const a=r[n.currency_code];return a?{code:n.currency_code,symbol:(0,t.decodeEntities)(a),symbolPosition:n.currency_pos,thousandSeparator:n.thousand_sep,decimalSeparator:n.decimal_sep,precision:n.num_decimals}:{}},setCurrency:l,formatAmount:m,formatCurrency:function(e){return s()("Currency().formatCurrency",{version:"5.0.0",alternative:"Currency().formatAmount",plugin:"WooCommerce",hint:"`formatAmount` accepts the same arguments as formatCurrency"}),m(e)},getPriceFormat:c,formatDecimal(e){if("number"!=typeof e&&(e=parseFloat(e)),Number.isNaN(e))return 0;const{precision:r}=o;return Math.round(e*Math.pow(10,r))/Math.pow(10,r)},formatDecimalString(e){if("number"!=typeof e&&(e=parseFloat(e)),Number.isNaN(e))return"";const{precision:r}=o;return e.toFixed(r)},render:e=>("number"!=typeof e&&(e=parseFloat(e)),e<0?(0,r.createElement)("span",{className:"is-negative"},m(e)):m(e))}};function l(){return s()("getCurrencyData",{version:"3.1.0",alternative:"CurrencyFactory.getDataForCountry",plugin:"WooCommerce Admin",hint:"Pass in the country, locale data, and symbol info to use getDataForCountry"}),{US:{code:"USD",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},EU:{code:"EUR",symbol:"€",symbolPosition:"left",thousandSeparator:".",decimalSeparator:",",precision:2},IN:{code:"INR",symbol:"₹",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},GB:{code:"GBP",symbol:"£",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},BR:{code:"BRL",symbol:"R$",symbolPosition:"left",thousandSeparator:".",decimalSeparator:",",precision:2},VN:{code:"VND",symbol:"₫",symbolPosition:"right",thousandSeparator:".",decimalSeparator:",",precision:1},ID:{code:"IDR",symbol:"Rp",symbolPosition:"left",thousandSeparator:".",decimalSeparator:",",precision:0},BD:{code:"BDT",symbol:"৳",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:0},PK:{code:"PKR",symbol:"₨",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},RU:{code:"RUB",symbol:"₽",symbolPosition:"right",thousandSeparator:" ",decimalSeparator:",",precision:2},TR:{code:"TRY",symbol:"₺",symbolPosition:"left",thousandSeparator:".",decimalSeparator:",",precision:2},MX:{code:"MXN",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2},CA:{code:"CAD",symbol:"$",symbolPosition:"left",thousandSeparator:",",decimalSeparator:".",precision:2}}}const m=window.wp.hooks,p=(0,window.wc.wcSettings.getSetting)("currency"),u=c(p),d=e=>{const o=u.getCurrencyConfig(),r=(0,m.applyFilters)("woocommerce_admin_report_currency",o,e);return c(r)},y=(0,r.createContext)(u),S=c;(window.wc=window.wc||{}).currency=o})();