@ingestro/importer-react 4.9.8 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{a as M,d as U,e as d,k as O,p as N}from"./chunk-L5AEQQSP.js";import{a as g,b as P,c as L}from"./chunk-YN3W6BG7.js";import{isNil as F}from"lodash";import{isArray as Y}from"lodash";var f=class r{constructor(t,e){this.dataModels=[];this.mapValidation=t=>{switch(t){case"regex":return"REGEX";case"required":return"REQUIRED";case"required_with":return"REQUIRED_WITH";case"required_with_all":return"REQUIRED_WITH_ALL";case"required_with_all_values":return"REQUIRED_WITH_ALL_VALUES";case"required_with_values":return"REQUIRED_WITH_VALUES";case"required_without":return"REQUIRED_WITHOUT";case"required_without_all":return"REQUIRED_WITHOUT_ALL";case"required_without_all_values":return"REQUIRED_WITHOUT_ALL_VALUES";case"required_without_values":return"REQUIRED_WITHOUT_VALUES";case"unique":return"UNIQUE";case"compare":return"COMPARE";default:throw new Error(`validation "${t}" isn't in available options`)}};this.getValidator=(t,e)=>new U({validation:this.mapValidation(t.validate),regex:t.regex??void 0,fields:t.columnValues?.map(a=>({key:a.key,value:a.value??[],type:this.findDataModelTypeByKey(a.key,e),label:this.findDataModelLabelByKey(a.key,e)}))??[],errorMessage:t.errorMessage,operator:t.operator,value:t.value});this.findDataModel=t=>this.columns.find(e=>e.key===t);this.findDataModelTypeByKey=(t,e)=>{let a=this.findDataModel(t);if(a)return r.mapDataModelType({columnType:a.columnType});if(e.checkValidation)throw new Error(`validation key "${t}" isn't found.`);return"string"};this.findDataModelLabelByKey=(t,e)=>{let a=this.findDataModel(t);if(a)return a.label;if(e.checkValidation)throw new Error(`validation key "${t}" isn't found.`);return""};this.validatorParser=t=>{let e=t.validate.toUpperCase(),a=t.columnValues??{},i=t.columns??[];return e==="REQUIRED_WITH_VALUES"||e==="REQUIRED_WITH_ALL_VALUES"||e==="REQUIRED_WITHOUT_VALUES"||e==="REQUIRED_WITHOUT_ALL_VALUES"?Object.keys(a).map(n=>({key:n,value:Y(a[n])?a[n]:[a[n]]})):e==="REQUIRED_WITH"||e==="REQUIRED_WITHOUT"||e==="REQUIRED_WITHOUT_ALL"||e==="REQUIRED_WITH_ALL"?i.map(n=>({key:n})):[]};this.setDataModels=t=>{this.dataModels=this.columns.map(e=>{let a=r.mapDataModelType({columnType:e.columnType});e.numberFormat===void 0&&a==="currency_usd"&&(e.numberFormat="us");let i=e.optionMappingConfiguration?.processingMode??"browser",n=e.optionMappingConfiguration?.layers&&e.optionMappingConfiguration?.layers.length>0?e.optionMappingConfiguration?.layers:["smart","historic","fuzzy","exact"];t.enableNodeProcessing||(i="browser",n=n.filter(o=>o!=="historic"&&o!=="smart")),t.enableReuseMapping||(n=n.filter(o=>o!=="historic"));let u={layers:n,processingMode:i,threshold:e.optionMappingConfiguration?.threshold??.6},s={description:e.description??"",example:e.example??"",key:e.key,label:e.label,type:a,isRequired:!1,outputFormat:e.outputFormat??"",inputFormat:a==="date"?M(e.inputFormat):null,validators:e.validations?.map(o=>this.getValidator({...o,columnValues:this.validatorParser(o)},t)),mappingValidation:e.mappingValidation,alternativeMatches:e.alternativeMatches,columnSize:1,columnWidth:e.columnWidth,numberFormat:e.numberFormat||"eu",hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:u,excludeFromAutoMatching:e.excludeFromAutoMatching};return d.isTypeCategory(a)?new N({...s,type:a,options:r.createDropdownOptions(e),isMultiSelection:e.isMultiSelect??!1,allowCustomOptions:e.allowCustomOptions,allowedCustomOptionTypes:e.allowedCustomOptionTypes,preserveUnmappedOptions:r.sanitizePreserveUnmappedOptions(e.preserveUnmappedOptions)}):new d(s)})};this.getDataModels=()=>this.dataModels;this.columns=t,this.setDataModels(e)}static{this.mapDataModelType=({columnType:t})=>{switch(t){case"boolean":return"boolean";case"int":return"int";case"float":return"float";case"category":return"single-select";case"date":return"date";case"date_dmy":return"date_dmy";case"date_mdy":return"date_mdy";case"date_iso":return"date_iso";case"datetime":return"datetime";case"time_hms":return"time_hms";case"time_hms_24":return"time_hms_24";case"time_hm":return"time_hm";case"time_hm_24":return"time_hm_24";case"email":return"email";case"url_www":return"url_www";case"url_https":return"url_https";case"url":return"url";case"phone":return"phone";case"zip_code_de":return"zip_code_de";case"percentage":return"percentage";case"country_code_alpha_2":return"country_code_alpha_2";case"country_code_alpha_3":return"country_code_alpha_3";case"currency_code":return"currency_code";case"currency_eur":return"currency_eur";case"currency_usd":return"currency_usd";case"bic":return"bic";case"vat_eu":return"vat_eu";case"gtin":return"gtin";case"iban":return"iban";default:return"string"}}}static{this.mapColumnType=({dataType:t})=>{switch(t){case"boolean":return"boolean";case"int":return"int";case"float":return"float";case"single-select":return"category";case"date":return"date";case"date_dmy":return"date_dmy";case"date_mdy":return"date_mdy";case"date_iso":return"date_iso";case"datetime":return"datetime";case"time_hms":return"time_hms";case"time_hms_24":return"time_hms_24";case"time_hm":return"time_hm";case"time_hm_24":return"time_hm_24";case"email":return"email";case"url_www":return"url_www";case"url_https":return"url_https";case"url":return"url";case"phone":return"phone";case"zip_code_de":return"zip_code_de";case"percentage":return"percentage";case"country_code_alpha_2":return"country_code_alpha_2";case"country_code_alpha_3":return"country_code_alpha_3";case"currency_code":return"currency_code";case"currency_eur":return"currency_eur";case"currency_usd":return"currency_usd";case"bic":return"bic";case"vat_eu":return"vat_eu";case"gtin":return"gtin";case"iban":return"iban";default:return"string"}}}static{this.VALID_PRESERVE_UNMAPPED_OPTIONS=["none","optional-off","optional-on","always"]}static{this.sanitizePreserveUnmappedOptions=t=>{if(typeof t=="string"&&r.VALID_PRESERVE_UNMAPPED_OPTIONS.includes(t))return t}}static{this.createDropdownOptions=t=>t.columnType==="category"?t.dropdownOptions?.map(e=>({label:`${e.label}`,value:`${e.value}`,type:e.type,alternativeMatches:e.alternativeMatches??[],validations:e.validations??[],description:e.description??""}))??[]:t.columnType==="currency_code"?g:t.columnType==="country_code_alpha_2"?P:t.columnType==="country_code_alpha_3"?L:[]}},w=f;var Ae=(r,t,e,a,i,n)=>{let u=0,s=0,o=0,l=!1,p=!1,{value:E,columns:A,isExact:H,isEmptyValues:T}=t,y=E?.trim();if(!T&&(F(y)||y.length===0))return;let v=T?r.length-1:r.length;for(let m=0;m<v;m++){let C=r[m],R=Object.keys(C);for(let _=0;_<R.length;_++){let D=A.findIndex(c=>c.key===R[_]),I=D>=0?A[D]:void 0;if(I===void 0)continue;let x=C[R[_]];if(O(x,{value:y??"",columns:[I],isExact:H,isEmptyValues:T})){u++;let c=n.findIndex(k=>k.key===I.key),h=n[c];(e.includes(c)||a.includes(m))&&s++,i.includes(c)&&o++,h.disabled&&(p=!0),d.isTypeCategory(w.mapDataModelType({columnType:h.columnType}))&&(l=!0)}}}return{counter:u,hidden:s,skip:o,matchedCategoryType:l,matchedDisabledColumn:p}};var b=r=>r==null||r===""||typeof r=="string"&&r.trim()==="";var S=r=>b(r)||Array.isArray(r)&&r.length===0,V=(r,t)=>typeof r=="string"?t?r.toLowerCase():r:typeof r=="number"?Number.isNaN(r)?{__nuvoNum:"NaN"}:r===1/0?{__nuvoNum:"+Infinity"}:r===-1/0?{__nuvoNum:"-Infinity"}:r:Array.isArray(r)?r.map(e=>V(e,t)):r,Q=(r,t,e)=>JSON.stringify(t.map(a=>V(r[a]??null,e))),G=({rows:r,columnKeys:t,ignoreCase:e=!1,ignoreBlanks:a=!1,excludeFromRemoval:i=[]})=>{if(t.length===0)return[];let n=new Set(i),u=new Set,s=[];for(let o=0;o<r.length;o++){if(n.has(o))continue;let l=r[o];if(a&&t.some(E=>S(l[E])))continue;let p=Q(l,t,e);u.has(p)?s.push(o):u.add(p)}return s},B=({rows:r,columnKeys:t,excludeFromRemoval:e=[]})=>{if(t.length===0)return[];let a=new Set(e),i=[];for(let n=0;n<r.length;n++){if(a.has(n))continue;let u=r[n];t.every(s=>S(u[s]))&&i.push(n)}return i},Me=r=>r.mode==="duplicate"?G(r):B(r);export{w as a,Ae as b,b as c,S as d,Me as e};
@@ -0,0 +1,7 @@
1
+ import{a as W}from"./chunk-J5WOZVPO.js";var Fe=e=>!e||typeof e!="string"?"":e.replace(/<[^>]*>/g,""),_e=e=>!!e&&/[A-Za-z0-9_]/.test(e),J=e=>{let r=[],n=/(['"])((?:(?!\1)[^\\]|\\.)*)(\1)/g,t;for(;(t=n.exec(e))!==null;)r.push({start:t.index,end:t.index+t[0].length});return r},Z=(e,r)=>r.some(n=>e>=n.start&&e<n.end),Q=(e,r,n)=>{let t=e,s=[...r,{label:"rowIndex",key:"rowIndex"}];for(let i of s){let{label:o,key:a}=i,l=`@${o}`,u=J(t),c=a==="rowIndex"?`row.${a}`:`row["${a.trim()}"]`,m="",d=0,f=0;for(;f<t.length;){let p=t.indexOf(l,f);if(p===-1)break;let w=p+l.length,R=!_e(t[w]);m+=t.slice(d,p),R&&!Z(p,u)?m+=c:m+=l,d=w,f=w}m+=t.slice(d),t=m}if(n){let i=W.getInstance().getTruthyWords(),o=W.getInstance().getFalsyWords(),a=J(t),l=(u,c,m)=>{let d=u;for(let f of c){let p=String(f);if(!p)continue;let w=p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),R=new RegExp(`\\b${w}\\b`,"gi"),A="",x=0,E;for(R.lastIndex=0;(E=R.exec(d))!==null;){let F=E.index,ge=F+E[0].length;A+=d.slice(x,F),Z(F,a)?A+=m:A+=E[0],x=ge,E.index===R.lastIndex&&R.lastIndex++}A+=d.slice(x),d=A}return d};t=l(t,i,"true"),t=l(t,o,"false")}return t},We=e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/@/g,"[@]");import{Interpreter as fe}from"eval5";import*as Ee from"@babel/standalone";var $="REMOVE_ROW",I="REMOVE_DUPLICATE_ROWS",P="REMOVE_DUPLICATE_ROWS_BY",B="REMOVE_EMPTY_ROWS",V="REMOVE_EMPTY_ROWS_BY",y="IGNORE_CASE",v="IGNORE_BLANKS",q=[y,v],S=[I,P,B,V],N=[$,...S],D=[$,I,B],he=new RegExp(`\\b(?:${D.join("|")})\\(\\)|\\b(?:${N.join("|")})\\b|\\b(?:${q.join("|")})\\b`),X=/^[A-Z][A-Z0-9_]*$/,O=Object.freeze({__removeRowMarker:!0});var g=(e,r)=>{if(e[r]!=="/")return null;if(e[r+1]==="/"){let n=r+2,t=" ";for(;n<e.length&&e[n]!==`
2
+ `;)t+=" ",n+=1;return{end:n,erased:t}}if(e[r+1]==="*"){let n=r+2,t=" ";for(;n<e.length;){if(e[n]==="*"&&e[n+1]==="/")return t+=" ",n+=2,{end:n,erased:t};t+=e[n]===`
3
+ `?`
4
+ `:" ",n+=1}return{end:n,erased:t}}return null};var we=new Set(["return","typeof","instanceof","in","of","void","delete","new","await","case","throw","else","do","default","yield"]),_=(e,r)=>{if(e[r]!=="/"||e[r+1]==="/"||e[r+1]==="*")return null;let n=r-1;for(;n>=0&&/[ \t]/.test(e[n]);)n-=1;if(n>=0){let a=e[n];if(a==="+"||a==="-"||a===")"||a==="]")return null;if(/[\w$]/.test(a)){let l=n;for(;l>0&&/[\w$]/.test(e[l-1]);)l-=1;let u=e.slice(l,n+1);if(!we.has(u))return null}}let t=r+1,s=!1,i=!1,o=-1;for(;t<e.length&&e[t]!==`
5
+ `;){if(s){s=!1,t+=1;continue}if(e[t]==="\\"){s=!0,t+=1;continue}if(e[t]==="["&&!i){i=!0,o=t,t+=1;continue}if(e[t]==="]"&&i){t===o+1||t===o+2&&e[o+1]==="^"||(i=!1,o=-1),t+=1;continue}if(e[t]==="/"&&!i){for(t+=1;t<e.length&&/[a-z]/i.test(e[t]);)t+=1;return{end:t,erased:" ".repeat(t-r)}}t+=1}return null};var ee=(e,r)=>{let n="",t=0;for(;t<e.length;){let s=g(e,t);if(s){n+=e.slice(t,s.end),t=s.end;continue}let i=_(e,t);if(i){n+=e.slice(t,i.end),t=i.end;continue}let o=t+1;for(;o<e.length&&!(g(e,o)!==null||_(e,o)!==null);)o+=1;n+=r(e.slice(t,o)),t=o}return n};var G=(e,r)=>{let n=e[r],t=r+1;for(;t<e.length;){if(e[t]==="\\"){t+=2;continue}if(e[t]===n)return t+1;t+=1}return t},K=(e,r)=>{let n=r,t=1;for(;n<e.length&&t>0;){let s=e[n];if(s==="'"||s==='"'){n=G(e,n);continue}if(s==="`"){n=Oe(e,n);continue}if(s==="/"){let i=g(e,n);if(i){n=i.end;continue}let o=_(e,n);if(o){n=o.end;continue}}if(s==="{"&&(t+=1),s==="}"&&(t-=1,t===0))return n;n+=1}return n},Oe=(e,r)=>{let n=r+1;for(;n<e.length;){if(e[n]==="\\"){n+=2;continue}if(e[n]==="`")return n+1;if(e[n]==="$"&&e[n+1]==="{"){n=K(e,n+2)+1;continue}n+=1}return n};var j=(e,r)=>{let n="",t=0,s=i=>{let o=i+1,a="`";for(;o<e.length;){if(e[o]==="\\"){a+=e.slice(o,Math.min(o+2,e.length)),o+=2;continue}if(e[o]==="`"){a+="`",o+=1;break}if(e[o]==="$"&&e[o+1]==="{"){a+="${",o+=2;let l=K(e,o);a+=j(e.slice(o,l),r),l<e.length&&e[l]==="}"?(a+="}",o=l+1):o=l;continue}a+=e[o],o+=1}return{end:o,mapped:a}};for(;t<e.length;){let i=g(e,t);if(i){n+=e.slice(t,i.end),t=i.end;continue}let o=_(e,t);if(o){n+=e.slice(t,o.end),t=o.end;continue}let a=e[t];if(a==="'"||a==='"'){let u=G(e,t);n+=e.slice(t,u),t=u;continue}if(a==="`"){let{end:u,mapped:c}=s(t);n+=c,t=u;continue}let l=t+1;for(;l<e.length&&!(g(e,l)!==null||_(e,l)!==null||e[l]==="'"||e[l]==='"'||e[l]==="`");)l+=1;n+=r(e.slice(t,l)),t=l}return n};var xe=new RegExp(`@(?=(?:${N.join("|")})\\s*\\()`,"g"),be=new RegExp(`\\b(${D.join("|")})\\(\\)\\(\\)`,"g"),Ae=e=>e.replace(xe,"").replace(be,"$1()"),C=e=>j(e,r=>ee(r,Ae));var ne=(e,r)=>r+1>=e.length?{end:r+1,erased:" "}:{end:r+2,erased:" "},te=(e,r,n)=>{let t=r+1,s=" ";for(;t<e.length;){if(e[t]==="\\"){let i=ne(e,t);s+=i.erased,t=i.end;continue}if(e[t]===n){s+=" ",t+=1;break}s+=" ",t+=1}return{end:t,erased:s}},T=e=>{let r="",n=0,t=s=>{let i=s+1,o=" ";for(;i<e.length;){if(e[i]==="\\"){let a=ne(e,i);o+=a.erased,i=a.end;continue}if(e[i]==="`"){o+=" ",i+=1;break}if(e[i]==="$"&&e[i+1]==="{"){o+="${",i+=2;let a=1;for(;i<e.length&&a>0;){let l=e[i];if(l==="'"||l==='"'){let u=te(e,i,l);o+=u.erased,i=u.end;continue}if(l==="`"){let u=t(i);o+=u.erased,i=u.end;continue}if(l==="/"){let u=g(e,i);if(u){o+=u.erased,i=u.end;continue}let c=_(e,i);if(c){o+=c.erased,i=c.end;continue}}if(l==="{"&&(a+=1),l==="}"&&(a-=1,a===0)){o+="}",i+=1;break}o+=l,i+=1}continue}o+=" ",i+=1}return{end:i,erased:o}};for(;n<e.length;){let s=e[n];if(s==="'"||s==='"'){let{end:i,erased:o}=te(e,n,s);r+=o,n=i;continue}if(s==="`"){let{end:i,erased:o}=t(n);r+=o,n=i;continue}r+=s,n+=1}return r};var re=(e,r)=>{let n="",t=0;for(;t<e.length;){let s=r(e,t);if(s){n+=s.erased,t=s.end;continue}n+=e[t],t+=1}return n},b=e=>re(re(T(e),_),g);var H=new RegExp(`\\b(${S.join("|")})\\s*\\(`,"g"),oe=/\bREMOVE_ROW\s*\(\s*\)/g,Le=new RegExp(`^\\s*(${S.join("|")})\\s*\\([\\s\\S]*\\)\\s*$`),h=(e,r,n)=>({code:e,messageKey:r,params:n}),ye=(e,r)=>{let n=0;for(let t=r;t<e.length;t++){let s=e[t];if(s==="(")n+=1;else if(s===")"&&(n-=1,n===0))return t}return-1},ve=e=>{let r=[],n="",t=0,s=null;for(let i=0;i<e.length;i++){let o=e[i];if(s){n+=o,o===s&&e[i-1]!=="\\"&&(s=null);continue}if(o==='"'||o==="'"||o==="`"){s=o,n+=o;continue}if(o==="("||o==="["||o==="{"){t+=1,n+=o;continue}if(o===")"||o==="]"||o==="}"){t-=1,n+=o;continue}if(o===","&&t===0){n.trim()&&r.push(n.trim()),n="";continue}n+=o}return n.trim()&&r.push(n.trim()),r},Se=(e,r)=>{if(e===y||e===v)return{flag:e};let n=e.match(/^@(.+)$/);if(n){let o=n[1].trim(),a=r.find(l=>l.label===o);return a?{key:a.key}:{unknown:o}}let t=e.match(/^(?:row\s*)?\[\s*["']([^"']+)["']\s*\]$/);if(t){let o=t[1].trim(),a=r.find(l=>l.key===o||l.key.trim()===o);return a?{key:a.key}:{unknown:o}}let s=e.match(/^row\.([a-zA-Z_$][\w$]*)$/);if(s){let o=s[1].trim(),a=r.find(l=>l.key===o||l.key.trim()===o);return a?{key:a.key}:{unknown:o}}let i=e.match(/^row\.(.+)$/);return i?{unknown:i[1].trim()}:{unknown:e}},Ce=(e,r)=>{let n=T(e).trim(),t=n.match(new RegExp(`^(${S.join("|")})\\s*\\(`));if(!t)return{kind:"sheetAction",error:h("SHEET_HELPER_IN_CONDITION","txt_prompts_sheet_helper_must_stand_alone")};let s=t[1],i=n.indexOf("(",t[0].length-1),o=ye(n,i);if(o<0||n.slice(o+1).trim()!=="")return{kind:"sheetAction",error:h("SHEET_HELPER_IN_CONDITION","txt_prompts_sheet_helper_must_stand_alone")};let l=e.trim().slice(i+1,o),u=ve(l),c=s===I||s===P,m=s===P||s===V,d=c?"duplicate":"empty";if(!m&&u.length>0){for(let x of u)if((x===y||x===v)&&!c)return{kind:"sheetAction",error:h("FLAG_ON_EMPTY_HELPER","txt_prompts_flags_only_for_duplicates")}}let f=[],p=new Set,w=!1,R=!1;for(let x of u){let E=Se(x,r);if(E){if("flag"in E){if(!c)return{kind:"sheetAction",error:h("FLAG_ON_EMPTY_HELPER","txt_prompts_flags_only_for_duplicates")};if(p.has(E.flag))return{kind:"sheetAction",error:h("DUPLICATE_FLAG","txt_prompts_duplicate_flag",{flag:E.flag})};p.add(E.flag),E.flag===y&&(w=!0),E.flag===v&&(R=!0);continue}if("unknown"in E)return X.test(E.unknown)?{kind:"sheetAction",error:h("INVALID_FLAG","txt_prompts_invalid_flag",{flag:E.unknown})}:m?{kind:"sheetAction",error:h("UNKNOWN_COLUMN","txt_prompts_unknown_column",{column:E.unknown})}:{kind:"sheetAction",error:h("NO_ARG_HELPER_WITH_COLUMNS","txt_prompts_use_by_helper",{helper:s,byHelper:`${s}_BY`})};if(!m)return{kind:"sheetAction",error:h("NO_ARG_HELPER_WITH_COLUMNS","txt_prompts_use_by_helper",{helper:s,byHelper:`${s}_BY`})};f.push(E.key)}}return m&&f.length===0?{kind:"sheetAction",error:h("MISSING_COLUMN","txt_prompts_missing_by_column")}:{kind:"sheetAction",params:{mode:d,columnKeys:f,...c?{ignoreCase:w,ignoreBlanks:R}:{}}}},Te=(e,r)=>{let n=0,t=0;for(let s=r-1;s>=0;s--){let i=e[s];if(i===")")n+=1;else if(i==="("){if(n-=1,n<0)return!1}else if(i==="}")t+=1;else if(i==="{"){if(t-=1,t<0)return!1}else{if(n===0&&t===0&&i==="?")return!0;if(n===0&&t===0&&i===";")return!1}}return!1},ke=e=>e.replace(/\bREMOVE_ROW\s*\(\s*\)\s*\(\s*\)/g,"REMOVE_ROW()"),U=e=>{let r=ke(b(e));oe.lastIndex=0;let n;for(;(n=oe.exec(r))!==null;){let t=n.index,s=t+n[0].length,i=t-1;for(;i>=0&&(/\s/.test(r[i])||r[i]==="(");)i-=1;let o=i>=0?r[i]:"",a=s;for(;a<r.length&&(/\s/.test(r[a])||r[a]===")");)a+=1;let l=a<r.length?r[a]:"";if(!(o==="?"||o===":"&&Te(r,i))||l==="?"||l===","||l==="+"||l==="-"||l==="*"||l==="/"||l==="%"||l==="&"||l==="|"||l==="="||l==="!"||l==="<"||l===">"||l==="."||l==="["||l==="(")return h("REMOVE_ROW_PLACEMENT","txt_prompts_remove_row_placement")}},ie=e=>{let r=b(e);return/\bREMOVE_ROW\s*\(/.test(r)?!0:(H.lastIndex=0,H.test(r))},se=(e,r)=>{if(!e?.trim())return{kind:"valueTransform"};let n=b(e);H.lastIndex=0;let t=H.test(n),s=/\bREMOVE_ROW\s*\(/.test(n);if(t)return Le.test(e.trim())?s?{kind:"sheetAction",error:h("SHEET_HELPER_IN_CONDITION","txt_prompts_sheet_helper_must_stand_alone")}:Ce(e,r):{kind:"sheetAction",error:h("SHEET_HELPER_IN_CONDITION","txt_prompts_sheet_helper_must_stand_alone")};if(s){let i=U(e);return i?{kind:"conditionalRemove",error:i}:{kind:"conditionalRemove"}}return{kind:"valueTransform"}},L=e=>e===O?!0:typeof e!="object"||e===null?!1:e.__removeRowMarker===!0;var Y=({t:e,count:r})=>({title:e("txt_confirm_title"),description:e("txt_confirm_remove_selected_rows",{count:r}),confirmButton:e("txt_continue")});var Ie=({t:e,showConfirmModal:r,visualRows:n,dataRowCount:t,mode:s,onConfirm:i,onCancel:o})=>{if(n.length===0)return o(),!1;let{title:a,description:l,confirmButton:u}=Y({t:e,count:n.length,dataRowCount:t,mode:s});return r({isShowIcon:!0,title:a,description:l,textPositiveButton:e("txt_cancel"),textNegativeButton:u,onClickPositiveButton:o,onClickNegativeButton:i,disabledClickOutside:!0}),!0};var le=({sourceDataArray:e,updates:r,selectedColumn:n})=>r.map(([t,s])=>{let i=e[t],o=typeof i=="object"&&i!==null&&!Array.isArray(i)?i[n]??null:null;return[t,s,o]}),ae=(e,r)=>{if(r.length===0)return e;let n=[...new Set(r)].sort((t,s)=>t-s);return e.map(([t,s,i])=>{let o=t,a=0;for(let l of n)l<o&&(a+=1);return[o-a,s,i]})};var vt=e=>e?`${e}_errors`:"model-data_errors",St=(e,r,n,t)=>!e&&r===0&&!n&&t>1,k=e=>e!=null&&e!==-1,Ct=(e,r)=>k(e)&&k(r);var M=10,ue=({hot:e,outputResponses:r,selectedColumn:n,lastValidRowIndex:t,kind:s,applyOnlyErrors:i,errors:o,currentColumnIndex:a})=>{let l=[],u=[],c=[],m=[],d=0,f=0;for(let p=0;p<r.length;p++){let w=e?.toVisualRow(p);if(!k(w)||p>t)continue;d+=1;let R=r[p]?.[0]??null;if(L(R)){s==="conditionalRemove"&&(f+=1,typeof w=="number"&&u.push(w),c.length<M&&c.push([R]),!i&&m.length<M&&m.push([R,p+1]));continue}l.push([p,n,R]),c.length<M&&c.push([R]),i?o?.[p]?.[a??-1]?.validate&&(s!=="conditionalRemove"||m.length<M)&&m.push([R,p+1]):s==="conditionalRemove"?m.length<M&&m.push([R,p+1]):m.push([R,p+1])}return{updateOutputResponses:l,previewOutputResponses:c,rowsToRemoveVisual:u,testOutputRows:m,dataRowCount:d,removeCount:f}};var z=e=>(e?.countRows()??0)-2,Pe=e=>!!e&&typeof e=="object"&&!Array.isArray(e),ce=({hot:e,sourceDataArray:r,rowsToRemove:n,selectedColumnKey:t,maxPreviewRows:s=10})=>{let i=new Set(n),o=z(e),a=[];for(let l=0;l<=o&&a.length<s;l++){let u=e?.toVisualRow(l);if(!k(u))continue;let c=r[l];if(!Pe(c))continue;let m=typeof u=="number"&&i.has(u);a.push({...c,...m&&t?{[t]:O}:{},ai_prompt_error_row_index:l+1})}return a};var Me=/^[^\s,;()[\]{}+\-*/=<>!&|?.]+(?:\s+[^\s,;()[\]{}+\-*/=<>!&|?.]+)*/,me=(e,r)=>{let n=b(C(e)),t=[...r.map(s=>s.label),"rowIndex"].sort((s,i)=>i.length-s.length);for(let s=0;s<n.length;s++){if(n[s]!=="@")continue;let i=n.slice(s+1),o=t.find(l=>i.startsWith(l)&&!/[\w$]/.test(i.charAt(l.length)||""));if(o){s+=o.length;continue}return i.match(Me)?.[0]?.trim()||void 0}};var Ve=["eval","Function","setTimeout","setInterval","fetch","XMLHttpRequest","document","window"],pe=new RegExp(`\\b(?:${Ve.join("|")})\\b`,"g"),Ne=/^[^\s,;()[\]{}+\-*/=<>!&|?.]+(?:\s+[^\s,;()[\]{}+\-*/=<>!&|?.]+)*/,De=(e,r)=>{for(let n=r;n>=0;n--){if(e[n]==="@"){let t=e.slice(n+1).match(Ne)?.[0];if(!t)return!1;let s=n+1+t.length;return r>=n&&r<s}if(/[,;()[\]{}+\-*/=<>!&|?\n]/.test(e[n]))return!1}return!1},de=e=>{let r=C(e),n=b(r);pe.lastIndex=0;let t;for(;(t=pe.exec(n))!==null;)if(!De(n,t.index))throw new Error(`Formula contains potentially unsafe operations: ${t[0]}`);return`(row) => {
6
+ return (${r})
7
+ }`};var Re=class{constructor(){this.formula="";this.outputData=[];this.initialize=()=>Promise.resolve();this.cleanupData=()=>{this.outputData=[]};this.setFormula=r=>(this.formula=r,Promise.resolve());this.check=()=>!0;this.parse=async(r,n,t)=>{this.outputData=[];let s=Q(this.formula,n,t),i=this.generateInputValues(r,n),o=i?.[0];await this.validateFunction([o],n,s);let a=this.replaceNullishCoalescingWithLogicalOr(s),l=this.transpileToES5(a);for(let u=0;u<i.length;u++)try{let c={$$inputs:{...i[u],rowIndex:u+1},REMOVE_ROW:()=>O},f=new fe(c,{timeout:5e3}).evaluate(l)(c.$$inputs);if(L(f)){this.outputData[u]=[O];continue}let p=f===void 0?"":f;this.outputData[u]=[JSON.parse(JSON.stringify(p))]}catch(c){throw new Error(`Error in row ${u+1}: ${c instanceof Error?c.message:"Check your formula"}`)}return this.outputData};this.validateFunction=async(r,n,t)=>{let s=[...n.map(u=>u.key.trim()),"rowIndex"],i=t||this.formula;if(i){let u=/row\.([a-zA-Z_][\w$]*)/g,c=i.matchAll(u);for(let m of c){let d=m[1];if(!s.includes(d))throw new Error(`Invalid variable: row.${d} is not a valid column reference`)}}let o=r[0],a=this.replaceNullishCoalescingWithLogicalOr(t||this.formula),l=this.transpileToES5(a);try{let u={$$inputs:{...o,rowIndex:0},REMOVE_ROW:()=>O},d=new fe(u,{timeout:5e3}).evaluate(l)(u.$$inputs);if(L(d)){this.outputData[0]=[O];return}let f=d===void 0?"":d;this.outputData[0]=[JSON.parse(JSON.stringify(f))]}catch(u){let c=u instanceof Error?u.message:"Invalid Syntax";throw Error(c)}};this.generateInputValues=(r,n)=>{let t=[];for(let s=0;s<r.length;++s)t[s]={},n.forEach((i,o)=>{let a=r[s],l=i.key.trim(),m=(Array.isArray(a)?a[o]:a[l])??"";t[s][l]=m}),t[s].rowIndex=s;return t};this.replaceNullishCoalescingWithLogicalOr=r=>r.replace(/\?\?/g,"||");this.transpileToES5=r=>{try{let t=Ee.transform(r,{presets:[["env",{targets:{ie:"11"},modules:!1}]],compact:!1,comments:!1}).code||r;return t=t.replace(/^["']use strict["'];?\s*/i,"").trim().replace(/;$/,""),t}catch(n){throw new Error(n instanceof Error?n.message:"Invalid syntax")}}}};export{vt as a,St as b,Ct as c,$ as d,I as e,P as f,B as g,V as h,y as i,v as j,N as k,he as l,G as m,K as n,j as o,C as p,ie as q,se as r,L as s,Y as t,Ie as u,le as v,ae as w,ue as x,z as y,ce as z,me as A,de as B,Fe as C,Q as D,We as E,Re as F};
@@ -0,0 +1 @@
1
+ import{isNil as m}from"lodash";var p=class n{static{this.currencySymbol={eu:"\u20AC",us:"$"}}static{this.percentageSymbol="%"}static{this.maxSafeNumberLength=Number.MAX_SAFE_INTEGER}static{this.CURRENCY_CODE_RE=/(?<![A-Za-z])(?:EUR|USD)(?![A-Za-z])/gi}static{this.ADORNMENT_SYMBOL_RE=new RegExp(`[${Object.values(n.currencySymbol).join("")}${n.percentageSymbol}]`,"g")}static{this.SCIENTIFIC_NOTATION_RE=/^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))[eE]([+-]?\d+)$/}static stripCurrencyAdornment(e){return e.replace(n.CURRENCY_CODE_RE,"").replace(n.ADORNMENT_SYMBOL_RE,"").replace(/\s+/g,"")}static isScientificNotation(e){return n.SCIENTIFIC_NOTATION_RE.test(e)}static convertToFormat(e,r){if(e==null||e===""||typeof e=="string"&&e.trim()==="")return"";let t="";if(typeof e=="string"){let o=this.convertStringToNumber(e,{targetFormat:r?.targetFormat});if(o===null)return e;t=o}else if(typeof e=="number"){let o=e;r?.adornment==="percentage"&&(o=e*100,o=Number(o.toFixed(10))),t=o.toString()}else throw new Error(`[convertToFormat] unsupported type of the "value" - ${typeof e}`);n.isScientificNotation(t)&&(t=n.expandScientificNotation(t));let[a,i]=t.split("."),s=r?.decimalDigits||i?.length||0,u="";try{let o=Number(t);if(!isFinite(o))return t;u=n.formatUS(o,s)}catch{return t}if(r?.targetFormat==="eu"){let o=u.replace(/,/g,"$").replace(/\./g,",").replace(/\$/g,".");return this.appendAdornment(o,r)}return this.appendAdornment(u,r)}static detectNumberFormat(e,r){let t=[];for(let u=0;u<e.length;u++)(e[u]===","||e[u]===".")&&t.push(e[u]);if(t.length===0)return;let a=n.stripCurrencyAdornment(e).replace(/[+-]/g,"");if(t.length===1){let[u,o]=a.split(t[0]);return u.length>3?t[0]===","?"eu":"us":u.replace(/0/g,"")===""?t[0]===","?"eu":"us":/^\d{3}$/.test(o)?r?.targetFormat?r?.targetFormat:r?.resolveUncertainty===!1?void 0:t[0]===","?"us":"eu":t[0]===","?"eu":"us"}let i=/^([1-9]\d{0,2})(\.\d{3})*(,\d+)?$/,s=/^([1-9]\d{0,2})(,\d{3})*(\.\d+)?$/;return i.test(a)?"eu":s.test(a)?"us":null}static convertToUsWithDecimal(e,r){let t=n.stripCurrencyAdornment(e.trim());if(n.isScientificNotation(t))return t;let a=e,i=n.getDelimiters(e),s=t.replace(/[+-]/g,"");if(i.length===1){let[u,o]=s.split(i[0]);if(/^\d{3}$/.test(o))return r==="us"?a=`${e}`?.replace(/,/g,""):a=`${e}`?.replace(/\./g,"$")?.replace(/,/,".").replace(/\$/g,""),a}return this.replaceDelimiter(e)}static{this.convertStringToNumber=(e,r)=>{if(typeof e=="number")return`${e}`;if(typeof e!="string")return null;let t=n.stripCurrencyAdornment(e.trim());if(t==="")return e;if(n.isScientificNotation(t)){if(!Number.isFinite(Number(t)))return null;let s=t;return r?.adornment==="percentage"&&e.includes(n.percentageSymbol)&&(s=Number((Number(s)/100).toFixed(10)).toString()),s}let a=this.detectNumberFormat(t,{targetFormat:r?.format??r?.targetFormat}),i="";if(a===null||(a==="us"||m(a)?i=t.replace(/,/g,""):i=t.replace(/\./g,"$").replace(/,/,".").replace(/\$/g,""),i.length>n.maxSafeNumberLength&&(i=i.slice(0,n.maxSafeNumberLength),i.at(-1)==="."&&(i=i.slice(0,n.maxSafeNumberLength-1))),isNaN(Number(i))))return null;if(r?.adornment==="percentage"&&e.includes(n.percentageSymbol)){let s=Number(i)/100;i=Number(s.toFixed(10)).toString()}return i}}static hasDecimalPart(e,r){if(typeof e=="number")return e%1!==0;let t=e.trim(),a=r||this.detectNumberFormat(t);return a===null?!1:a==="us"?e.includes("."):e.includes(",")}static appendAdornment(e,r){return r?.adornment==="currency"?r.symbol==="us"?`${this.currencySymbol.us}${e}`:`${e} ${this.currencySymbol[r.symbol??"eu"]}`:r?.adornment==="percentage"?`${e} ${this.percentageSymbol}`:e}static getDelimiters(e){let r=[];for(let t=0;t<e.length;t++)(e[t]===","||e[t]===".")&&r.push(e[t]);return r}static expandScientificNotation(e){let r=e.match(n.SCIENTIFIC_NOTATION_RE);if(!r)return e;let[,t,a="",i="",s="",u]=r,o=s||i,l=parseInt(u,10),d=a+o,c=a.length+l;return(c<=0?-c:c>=d.length?c-d.length:0)>1e3?e:c<=0?`${t}0.${"0".repeat(-c)}${d}`:c>=d.length?`${t}${d}${"0".repeat(c-d.length)}`:`${t}${d.slice(0,c)}.${d.slice(c)}`}static formatUS(e,r){return new Intl.NumberFormat("en-US",{useGrouping:!0,minimumFractionDigits:r,maximumFractionDigits:r}).format(e)}static replaceDelimiter(e){let r=e,t=n.detectNumberFormat(`${e}`);return m(t)?null:(t==="eu"?r=`${e}`?.replace(/\./g,"$")?.replace(/,/,".").replace(/\$/g,""):r=`${e}`?.replace(/,/g,""),r)}};var y=n=>n.trim()?.replace(/[-!$%^&*()+|~=`{}\[\]:";'<>?,.\/]/g,"")?.replace(/^_+/,"")?.replace(/_+$/,"")?.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*/g,"")?.replace(/ /g,"_")?.replace(/ß/g,"ss")?.replace(/ä/g,"ae")?.replace(/ö/g,"oe")?.replace(/ü/g,"ue")?.toLowerCase(),I=n=>n?.replace(/[-!$%^&*()_+|~=`{}\\[\]:";'<>?,.\\/]/g," ")?.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*/g," ")?.toLowerCase();export{p as a,y as b,I as c};
@@ -0,0 +1 @@
1
+ import{e as K,f as p,p as N}from"./chunk-L5AEQQSP.js";import{a as ee,b as l,c as M,d as _,h as te,i as L,j as R,l as G,m as Y,n as w}from"./chunk-U5BU7B27.js";import{b as q,c as Q,d as h,e as J}from"./chunk-3A4DOV33.js";import{isNil as Oe}from"lodash";var oe=o=>o.some(e=>typeof e=="string"&&l(e)&&!h(e.trim())),D=o=>!oe(o)&&!o.some(e=>typeof e=="boolean"),T=o=>o.filter(e=>typeof e=="string"&&l(e)&&!h(e.trim())),he=(o,e)=>{let t=e?.trim();return t||(D(o),"")};var S=/T\d{1,2}:\d{2}(:\d{2})?(\.\d+)?/i,O=/\b\d{1,2}:\d{2}(:\d{2})?(\.\d+)?(\s*[AaPp][Mm])?\b/,De=/\s+\d{1,2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:\s*[AaPp][Mm])?(?:Z|[+-](?:[01]\d|2[0-3])(?::?[0-5]\d)?)?\s*$/i,v=/\b[AaPp][Mm]\b/,ge=/\d{1,2}:\d{2}:\d{2}\.(\d+)/;var k=o=>o.match(ge)?.[1]?.length??0,re=o=>o<=0||o>9?"":`.${"S".repeat(o)}`,V=o=>{let e=o.trim();return S.test(e)?e.split(/T/i)[0]??"":e.replace(De,"")};var Fe=/^\d{4}([/.\- ])\d{1,2}\1\d{1,2}$/,Me=/^\d{1,2}([/.\- ])\d{1,2}\1(?:\d{2}|\d{4})$/;var ae=o=>{let e=!1,t=!1;for(let r of o){if(typeof r!="string"||!l(r))continue;let a=V(r);if(Fe.test(a)){e=!0;continue}Me.test(a)&&(t=!0)}return{sawYearFirst:e,sawDayOrMonthFirst:t}},y=o=>{let{sawYearFirst:e,sawDayOrMonthFirst:t}=ae(o);return e&&!t},ne=o=>{let{sawYearFirst:e,sawDayOrMonthFirst:t}=ae(o);return e&&t};var U=o=>o?"D":"DD",z=o=>o?"M":"MM";var Se=o=>{let e=k(o),t=e>0||/\d{1,2}:\d{2}:\d{2}/.test(o),r=o.match(/(?:[T\s]|^)(\d{1,2}):\d{2}/i)?.[1]??"";return{isoT:S.test(o),seconds:t,fractionDigits:e,timezone:R(o),meridiem:v.test(o),unpaddedHour:r.length===1,paddedHour:r.length===2&&r.startsWith("0")}},ye=(o,e)=>o.isoT===e.isoT&&o.seconds===e.seconds&&o.fractionDigits===e.fractionDigits&&o.timezone===e.timezone&&o.meridiem===e.meridiem;var Ie=o=>{let e=[];for(let t of o){if(typeof t!="string"||!l(t))continue;let r=te(V(t));r&&(e.includes(r)||e.push(r))}return e},g=o=>{let e=!1,t=!1,r=null,a=!1,n=!1;for(let i of o){if(typeof i!="string"||!l(i))continue;let s=i.trim();if(!(S.test(s)||O.test(s))){if(e=!0,t)return!0;continue}if(t=!0,e)return!0;let d=Se(s);if(d.fractionDigits>9)return!0;if(d.unpaddedHour&&(a=!0),d.paddedHour&&(n=!0),!r){r=d;continue}if(!ye(r,d))return!0}return!!(a&&n)};var C=o=>{if(g(o))return"";let e=!1,t=!1,r=!1,a=!1,n=0,i=!1,s=!1;for(let F of o){if(typeof F!="string"||!l(F))continue;let f=F.trim(),Z=S.test(f);if(!Z&&!O.test(f))continue;e=!0,Z&&(t=!0),v.test(f)&&(r=!0);let j=k(f);j>0?(a=!0,n=j):/\d{1,2}:\d{2}:\d{2}/.test(f)&&(a=!0),R(f)&&(i=!0),(f.match(/(?:[T\s]|^)(\d{1,2}):\d{2}/i)?.[1]??"").length===1&&(s=!0)}if(!e)return"";let m=t?"[T]":" ",u=r?s?"h":"hh":s?"H":"HH",d=r?" A":"",c=re(n),b=i?"Z":"";return a?`${m}${u}:mm:ss${c}${d}${b}`:`${m}${u}:mm${d}${b}`},I=(o,e)=>{let t=o.trim();if(!t||/[Hh]/.test(t))return t;let r=C(e);return r?`${t}${r}`:t};var $=(o,e="",t={firstUnpadded:!1,secondUnpadded:!1})=>`YYYY${o}${z(t.firstUnpadded)}${o}${U(t.secondUnpadded)}${e}`,E=(o,e,t="",r="YYYY",a={firstUnpadded:!1,secondUnpadded:!1})=>`${o==="dM"?[U(a.firstUnpadded),z(a.secondUnpadded),r].join(e):[z(a.firstUnpadded),U(a.secondUnpadded),r].join(e)}${t}`,ie=(o,e="",t="YYYY",r={firstUnpadded:!1,secondUnpadded:!1})=>({dayFirst:E("dM",o,e,t,r),monthFirst:E("Md",o,e,t,r)}),se=["/","-","."],be=(o="",e="YYYY",t={firstUnpadded:!1,secondUnpadded:!1},r=se)=>{let a=[];for(let n of r){let{dayFirst:i,monthFirst:s}=ie(n,o,e,t);a.push(i,s)}return a};var Ve=o=>o.every(e=>typeof e!="number"&&(typeof e!="string"||!l(e))),x=({colType:o,inputFormat:e,samples:t,parserDateFormat:r})=>{if(!_(o))return null;if(M(e))return"configured";if(r?.trim())return"detected";if(D(t))return Ve(t)?"detected":"undetected";let a=T(t);return g(a)||ne(a)?"undetected":y(a)?"detected":Y(a)===null?"undetected":"detected"},Ce=o=>o.getDateFormatPromptResolved?.()??o.getDeclaredInputFormat?.(),X=o=>o.getDateFormatPromptResolved?.()??(typeof o.getDeclaredInputFormat=="function"?o.getDeclaredInputFormat():o.getInputFormat()),Ee=o=>o.some(e=>{let t=e.matchedDataModel?.dataModel;return!t||!e.sheetColumn?!1:x({colType:t.getType(),inputFormat:X(t),samples:e.sheetColumn.getDateInputFormatSamples(),parserDateFormat:e.sheetColumn.getParserDateFormat?.()})==="undetected"});var H={firstUnpadded:!1,secondUnpadded:!1},me=({colType:o,inputFormat:e,samples:t,parserDateFormat:r})=>{let a=x({colType:o,inputFormat:e,samples:t,parserDateFormat:r}),n=T(t);if(a==="configured")return I((e??"").trim(),n);if(a!=="detected")return"";let i=r?.trim();if(i)return i;let s=C(n),m=L(n);if(y(n))return $(m,s,H);let u=Y(n);return u!=="dM"&&u!=="Md"?"":E(u,m,s,"YYYY",H)},xe=(o,e)=>{o.forEach(t=>{let r=t.matchedDataModel?.dataModel;if(!r?.setInputFormat||!t.sheetColumn)return;let a=r.getType(),n=X(r),i=t.sheetColumn.getDateInputFormatSamples(),s=t.sheetColumn.getParserDateFormat?.(),m=T(i),u=x({colType:a,inputFormat:n,samples:i,parserDateFormat:s});if(!u)return;let d=e?.getChosenFormat?.(t)?.trim()||"",c=d||me({colType:a,inputFormat:n,samples:i,parserDateFormat:s});if(!c&&u==="undetected"&&e?.fallbackUndetected&&!D(i)&&!g(m)){let b=L(m),F=C(m);c=y(m)?$(b,F,H):E("dM",b,F,"YYYY",H)}!d&&!M(n)&&D(i)&&!c||c&&r.setInputFormat(I(c,m))})};var Pe=o=>{if(o==null)return"";if(typeof o=="object"&&!Array.isArray(o)&&"value"in o){let e=o.value;return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:""}return typeof o=="string"||typeof o=="number"||typeof o=="boolean"?o:""},Ae=(o,e)=>o.map(t=>({sheetColumn:{getDateInputFormatSamples:()=>e.map(r=>Pe(r?.[t.getKey()]))},matchedDataModel:{dataModel:t}}));import le from"moment";var _e=5,de=o=>{let e=le(o,q,!0);if(e.isValid())return e;let t=le.parseZone(o,Q,!0);return t.isValid()?t:null},Re=(o,e)=>{if(!l(o))return null;let t=w([o],e)[0];if(typeof t!="string")return null;if(t===o||t===o.trim()){if(!h(t.trim()))return null;let a=de(t.trim());return a?{original:o,parsedMoment:a}:null}let r=de(t);return r?{original:o,parsedMoment:r}:null},Ye=({serial:o,outputFormat:e,textFormatted:t})=>o!=null&&e?J(o).format(e):t??void 0,we=({samples:o,inputFormat:e,outputFormat:t,maxRows:r=_e})=>o.filter(n=>l(n)).slice(0,r).map(n=>{let i=Re(n,e);return i?{original:n,formatted:i.parsedMoment.format(t)}:{original:n,formatted:null}});var ue=(o,e)=>{if(!_(e.getType()))return p.parse(o,{dataModel:e});if(ee(o))return null;let t=`${o}`,r=e.getInputFormat();if(M(r)){if(h(t))return p.parse(t,{dataModel:e});let a=r;if(!G(t,a)){let n=I(a,[t]);if(n!==a&&G(t,n))a=n;else return t}return p.parse(w([t],a)[0],{dataModel:e})}return p.parse(t,{dataModel:e})};var W=class{constructor({sheetColumn:e,matchedDataModel:t,detectedNumberFormats:r}){this.parseSheetValue=(e,t)=>t.dataModel.getType()==="date"?ue(e,t.dataModel):p.parse(e,t);this.getOptionValue=(e,t)=>{if(!t)if(this.matchedDataModel.dataModel){let r=this.sheetColumn.columnKey,n=this.detectedNumberFormats.columns.find(i=>i.column===r)?.numberFormat||this.detectedNumberFormats.global;return this.parseSheetValue(e,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0,numberFormat:n})}else return e;for(let r=0;r<t.length;r++)if(`${t[r]?.sheetOption}`==`${e}`){let a=!Oe(t[r]?.dataModelOptions)&&(t[r]?.dataModelOptions?.length??0)>0;if(t[r]?.autoPreserved===!0&&t[r]?.dataModelOption==null&&!a){if(this.matchedDataModel.dataModel instanceof N){let n=`${e}`,i=this.matchedDataModel.dataModel.getOptions().find(s=>s.label===n||s.value===n);if(i)return p.parse(i.value,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0})}return e}return this.matchedDataModel.dataModel&&this.matchedDataModel.dataModel.getIsMultiSelection()?p.parse(t[r]?.dataModelOptions,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0}):this.matchedDataModel.dataModel?p.parse(t[r]?.dataModelOption,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0}):t[r]?.dataModelOption}};this.getValues=()=>{let e=this.sheetColumn.rows,t=[];for(let r=0;r<e.length;r++){let a=e[r],n=this.getOptionValue(a,this.matchedOptions);t.push(n)}return t};if(this.sheetColumn=e,this.matchedDataModel=t,this.matchedOptions=void 0,this.detectedNumberFormats=r||{global:"eu",columns:[]},this.matchedDataModel.matchedOptions){this.matchedOptions=[];for(let a=0;a<(this.matchedDataModel.matchedOptions?.length??0);a++){let n=this.matchedDataModel.matchedOptions[a];this.matchedDataModel.dataModel?.getIsMultiSelection()?n.dataModelOptions&&this.matchedOptions.push(n):n.dataModelOption!==void 0&&n.dataModelOption!==null?this.matchedOptions.push(n):n.autoPreserved===!0&&!n.userCleared&&this.matchedOptions.push(n)}}}},pe=W;var B=class{constructor(e){this.matchedColumns=[];this.parseValues=()=>{let e=[];this.matchedColumns.forEach(t=>{let r=t.matchedDataModel,n=new pe({sheetColumn:t.sheetColumn,matchedDataModel:r,detectedNumberFormats:this.detectedNumberFormats}).getValues(),i=r.dataModel.getKey();n.forEach((s,m)=>{e[m]?e[m][i]=s:e[m]={[i]:s}})});for(let t=0;t<e.length;++t)for(let r=0;r<this.columns.length;++r){let n=this.columns[r].key;e[t][n]===void 0&&(e[t][n]=null)}return e};this.getValues=()=>(this.matchedColumns=[],this.matching.filter(t=>t.matchedDataModel?.dataModel).forEach(t=>{this.matchedColumns.push({sheetColumn:t.sheetColumn,matchedDataModel:t.matchedDataModel})}),this.parseValues());let{matching:t,detectedNumberFormats:r}=e;this.matching=t,this.detectedNumberFormats=r||{global:"eu",columns:[]},this.columns=e.columns??[]}},ce=B;var ho=({matching:o,detectedNumberFormats:e,columns:t})=>new ce({matching:o,detectedNumberFormats:e,columns:t}).getValues();import*as fe from"comlink";var P=class{static{this.serialize=e=>e.serialize()}static{this.deSerialize=e=>K.isTypeCategory(e.type)?new N({description:e.description,example:e.example,key:e.key,label:e.label,type:e.type,options:e.options,validators:[],alternativeMatches:e.alternativeMatches,columnSize:e.columnSize,isMultiSelection:e.isMultiSelection??!1,allowCustomOptions:e.allowCustomOptions,allowedCustomOptionTypes:e.allowedCustomOptionTypes,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration}):new K({description:e.description,example:e.example,key:e.key,label:e.label,type:e.type,validators:[],alternativeMatches:e.alternativeMatches,columnSize:e.columnSize,outputFormat:e.outputFormat,inputFormat:e.inputFormat,numberFormat:e.numberFormat,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration})}};var A=class{static{this.serialize=e=>{let t={matching:[],detectedNumberFormats:e.detectedNumberFormats,columns:e.columns};return t.matching=e.matching.map(r=>({sheetColumn:r.sheetColumn,matchedDataModel:r.matchedDataModel?{dataModel:r.matchedDataModel.dataModel?P.serialize(r.matchedDataModel.dataModel):r.matchedDataModel.dataModel,matchedOptions:r.matchedDataModel.matchedOptions}:r.matchedDataModel})),[t,[]]}}static{this.deserialize=e=>({matching:e.matching.map(t=>({sheetColumn:t.sheetColumn,matchedDataModel:t.matchedDataModel?{dataModel:t.matchedDataModel.dataModel?P.deSerialize(t.matchedDataModel.dataModel):t.matchedDataModel.dataModel,matchedOptions:t.matchedDataModel.matchedOptions}:t.matchedDataModel})),detectedNumberFormats:e.detectedNumberFormats,columns:e.columns})}};fe.transferHandlers.set("Matching",{canHandle:o=>!!(o!==null&&typeof o=="object"&&o.matching),serialize:o=>A.serialize(o),deserialize:o=>A.deserialize(o)});export{T as a,he as b,y as c,Ie as d,g as e,C as f,$ as g,ie as h,se as i,be as j,x as k,Ce as l,Ee as m,me as n,xe as o,Ae as p,Ye as q,we as r,ho as s,P as t};
@@ -0,0 +1 @@
1
+ import{d as F}from"./chunk-JWTYPSUX.js";import{f as O,r as J,s as M,t as C,u as V}from"./chunk-3A4DOV33.js";import{c}from"./chunk-EWEVS5OB.js";import{isEmpty as x,uniq as k}from"lodash";var A=0,y=class{constructor({sheet:e,columnKey:t,rows:s,columnIndex:n,id:r,label:i,refJoinSheetColum:o,parserDateFormat:l}){this.removed=!1;this.label="";this.rowsLoaded=!1;this.parserDateFormatResolved=!1;this.dateInputFormatSamples=null;this.parsedDateSamplesByInputFormat=new Map;this.getColumnKey=()=>this.columnKey;this.getId=()=>this.id;this.getSheet=()=>this.sheet;this.loadRows=()=>{if(this.rowsLoaded||this.columnIndex==null)return;let e=this.sheet.readColumnValues(this.columnIndex);this.rows=x(e)?[""]:e,this.dateInputFormatSamples??=this.rows,this.rowsLoaded=!0};this.getRows=()=>(this.loadRows(),this.rows);this.peekRows=e=>{if(e<=0)return[];if(this.rowsLoaded||this.columnIndex==null)return this.getRows().slice(0,e);let t=this.sheet.readColumnValues(this.columnIndex,e);return x(t)?[""]:t};this.getUniqueRows=()=>(this.uniques===void 0&&(this.uniques=k(this.getRows())),this.uniques);this.remove=()=>{this.removed=!0};this.unRemove=()=>{this.removed=!1};this.isRemoved=()=>this.removed;this.getType=()=>0;this.getFileName=()=>this.sheet.getSheetFileName();this.toJSON=()=>({columnKey:this.columnKey,id:this.id,rows:this.getRows(),type:this.getType()});this.equal=e=>this.getId()===e.getId();this.keyEqual=e=>this.columnKey===e.columnKey;this.setIndex=e=>{this.index=e};this.getIndex=()=>this.index;this.normalizeInputFormatKey=e=>{let t=typeof e=="string"?e.trim():"";return t!==""?t:null};this.dateInputFormatCacheKey=e=>this.normalizeInputFormatKey(e)??"\0auto";this.needsDateFormatParse=e=>!this.parsedDateSamplesByInputFormat.has(this.dateInputFormatCacheKey(e));this.hasParsedDateForInputFormat=e=>!this.needsDateFormatParse(e);this.getParsedDateSamplesForInputFormat=e=>this.parsedDateSamplesByInputFormat.get(this.dateInputFormatCacheKey(e));this.getDateInputFormatSamples=()=>{if(this.dateInputFormatSamples)return this.dateInputFormatSamples;if(this.columnIndex!=null){let e=this.sheet.readColumnValues(this.columnIndex);return this.dateInputFormatSamples=x(e)?[""]:e,this.dateInputFormatSamples}return this.rows};this.getParserDateFormat=()=>(!this.parserDateFormatResolved&&this.columnIndex!=null&&(this.parserDateFormat=this.sheet.excelDisplayFormatAt(this.columnIndex),this.parserDateFormatResolved=!0),this.parserDateFormat);this.applyDateInputFormatParse=(e,t)=>{let s=this.getDateInputFormatSamples();if(e.length!==s.length)throw new Error(`SheetColumn.applyDateInputFormatParse: parsed sample count (${e.length}) must match source sample count (${s.length}) for column "${this.columnKey}".`);this.parsedDateSamplesByInputFormat.set(this.dateInputFormatCacheKey(t),this.withStoredExcelDates(e))};this.getStoredDateSerialAt=e=>{if(this.columnIndex!=null)return this.sheet.readDateSerialAt(this.columnIndex,e)};this.getStoredDateSerials=()=>{if(this.columnIndex!=null)return this.sheet.readColumnDateSerials(this.columnIndex)};this.withStoredExcelDates=e=>{let t=this.getStoredDateSerials();return!t||t.length!==e.length?e:e.map((s,n)=>{let r=t[n];return r==null?s:O(r)})};this.getRefJoinSheetColum=()=>this.refJoinSheetColum;this.columnKey=t.trim(),this.sheet=e,Object.defineProperty(this,"sheet",{value:e,enumerable:!1,writable:!0,configurable:!0}),n!=null&&s==null?(this.columnIndex=n,this.rows=[],this.rowsLoaded=!1):(this.rows=x(s)?[""]:s,this.rowsLoaded=!0,this.dateInputFormatSamples=[...this.rows]),typeof r>"u"?(A++,this.id=`${t}-${A}`):this.id=r,i&&(this.label=i),l&&(this.parserDateFormat=l,this.parserDateFormatResolved=!0),Object.defineProperty(this,"refJoinSheetColum",{value:o,enumerable:!1,writable:!0,configurable:!0})}setRows(e){this.rows=e,this.rowsLoaded=!0,this.uniques=void 0}},g=y;var w=class extends g{constructor({sheet:t,sheetColumns:s,rows:n,id:r,columnKey:i}){super({columnKey:i,rows:n,sheet:t,id:r});this.getType=()=>1;this.getJoinedSheetColumns=()=>this.sheetColumns;this.toJSON=()=>({columnKey:this.columnKey,id:this.id,rows:this.rows,sheetColumns:this.sheetColumns.map(t=>t.toJSON()),type:this.getType()});this.sheetColumns=s}},H=w;var T=["?",",","@"];import{isNaN as z,minBy as q,isString as Y,isEqual as R,isEmpty as B,isNil as G}from"lodash";var D=class{constructor({sheets:e,filename:t,type:s,fileSize:n}){this.globalNumberFormat="eu";this.columnsNumberFormat=[];this.needsConfiguration=!1;this.pendingXmlConfigKey=null;this.pendingXmlConfig=null;this.sourceXml=null;this.sourcePdfFile=null;this.pdfDocument=null;this.selectedPdfTableIds=null;this.pdfModelOutput=null;this.pdfInstructionHistory=null;this.pdfReshapeSessionId=null;this.keepSheetSelection=!1;this.addSheet=e=>{this.sheets.push(e)};this.setNeedsConfiguration=e=>{this.needsConfiguration=e};this.getNeedsConfiguration=()=>this.needsConfiguration;this.setPendingXmlConfigKey=e=>{this.pendingXmlConfigKey=e};this.getPendingXmlConfigKey=()=>this.pendingXmlConfigKey;this.setPendingXmlConfig=e=>{this.pendingXmlConfig=e};this.getPendingXmlConfig=()=>this.pendingXmlConfig;this.setSourceXml=e=>{this.sourceXml=e};this.getSourceXml=()=>this.sourceXml;this.setSourcePdfFile=e=>{this.sourcePdfFile=e};this.getSourcePdfFile=()=>this.sourcePdfFile;this.setPdfDocument=e=>{this.pdfDocument=e};this.getPdfDocument=()=>this.pdfDocument;this.setSelectedPdfTableIds=e=>{this.selectedPdfTableIds=e};this.getSelectedPdfTableIds=()=>this.selectedPdfTableIds;this.setPdfModelOutput=e=>{this.pdfModelOutput=e};this.getPdfModelOutput=()=>this.pdfModelOutput;this.setPdfInstructionHistory=e=>{this.pdfInstructionHistory=e};this.getPdfInstructionHistory=()=>this.pdfInstructionHistory;this.setPdfReshapeSessionId=e=>{this.pdfReshapeSessionId=e};this.getPdfReshapeSessionId=()=>this.pdfReshapeSessionId;this.setKeepSheetSelection=e=>{this.keepSheetSelection=e};this.getKeepSheetSelection=()=>this.keepSheetSelection;this.replaceSheets=e=>{let t=this.needsConfiguration||!!this.pendingXmlConfigKey||!!this.pendingXmlConfig||!!this.sourceXml,s=!!this.sourcePdfFile||!!this.pdfDocument;this.sheets=e,this.sheets.forEach(n=>{n.setSpreadSheet(this)}),this.needsConfiguration=!1,this.pendingXmlConfigKey=null,t?this.keepSheetSelection=!0:s||(this.pendingXmlConfig=null,this.sourceXml=null),s&&(this.keepSheetSelection=!0)};this.isSelected=()=>{for(let e=0;e<this.sheets.length;e++)if(this.sheets[e].isSelected())return!0;return!1};this.getSheets=()=>this.sheets;this.getSelectedSheets=()=>this.sheets.filter(e=>e.isSelected());this.getFilename=()=>this.filename;this.selectAllSheet=e=>this.sheets.forEach(t=>{t.setSelected(e)});this.getType=()=>this.type;this.setType=e=>{this.type=e};this.getFileSize=()=>{let e=this.fileSize/1e6;return Number(parseFloat(`${e}`).toFixed(4))};this.sheets=e,this.filename=t,this.type=s,this.fileSize=n??0,this.sheets.forEach(r=>{r.setSpreadSheet(this)})}setNumberFormat(e){this.globalNumberFormat=e.global,this.columnsNumberFormat=e.columns}getNumberFormat(){return{global:this.globalNumberFormat,columns:this.columnsNumberFormat}}},P=D;var U={dmy:"D/M/YYYY",us:"M/D/YY",de:"DD.MM.YYYY"},K=(u,e)=>u?M(u,C(e)):void 0,_=u=>{let e=C(u);return e==="os"?J():U[e]},fe=({data:u,excelDateCells:e,columnDateFormats:t,maxRow:s=50,maxCol:n=300})=>{let r=Math.min(u.length,s),i=u.slice(0,r).map(o=>o.slice(0,n));return V(i,e,o=>C(t?.[o]))};var L=0,b=class{constructor({data:e,name:t,isNotSetColumn:s,id:n,columnDateFormats:r,excelDateCells:i,excelDateSerials:o}){this.selected=!1;this.isManualSelectHeader=!1;this.columns=[];this.columnsInitialized=!1;this.headerRowIndex=0;this.transposed=!1;this.headerRowIndexes=[];this.addedColumns=[];this.usedSourceCells=new Set;this.mergedHeadersActive=!1;this.mergedRowsBackup=null;this.availableRows=null;this.spreadSheet=new P({filename:"",sheets:[],type:"xlsx",fileSize:0});this.getId=()=>this.id;this.setSpreadSheet=e=>{this.spreadSheet=e};this.getSpreadSheet=()=>this.spreadSheet;this.setSelected=e=>{this.selected=e};this.isSelected=()=>this.selected;this.setHeaderRowIndex=e=>{this.headerRowIndex=e,this.columnsInitialized=!1,this.mergedHeadersActive||(this.headerRowIndexes=[e])};this.setTransposed=e=>{this.transposed=e};this.getTransposed=()=>this.transposed;this.setHeaderRowIndexes=e=>{this.headerRowIndexes=[...e]};this.getHeaderRowIndexes=()=>this.headerRowIndexes.length>0?this.headerRowIndexes:[this.headerRowIndex];this.addAddedColumn=e=>{if(this.addedColumns.push(e),e.sourceCell){let n=`${e.sourceCell.row},${e.sourceCell.col}`;this.usedSourceCells.add(n)}let t=this.data[this.headerRowIndex],s=this.data.length>0?Math.max(...this.data.map(n=>n.length)):0;t&&t.push(e.columnName);for(let n=0;n<this.data.length;n++)if(n!==this.headerRowIndex){for(;this.data[n].length<s;)this.data[n].push("");n<this.headerRowIndex?this.data[n].push(""):this.data[n].push(e.value)}this.setColumns()};this.removeAddedColumn=e=>{let s=(this.data[this.headerRowIndex]?.length||0)-this.addedColumns.length,n=e-s;if(n<0||n>=this.addedColumns.length)return;let r=this.addedColumns[n];if(r?.sourceCell){let i=`${r.sourceCell.row},${r.sourceCell.col}`;this.usedSourceCells.delete(i)}for(let i=0;i<this.data.length;i++)this.data[i].splice(e,1);this.addedColumns.splice(n,1),this.setColumns()};this.removeColumnFromData=e=>{if(!(e<0)){for(let t=0;t<this.data.length;t++)this.data[t].length>e&&this.data[t].splice(e,1);this.clearExcelDateMetadata()}};this.clearAddedColumns=()=>{if(this.addedColumns.length>0){let t=(this.data[this.headerRowIndex]?.length||0)-this.addedColumns.length;for(let s=this.addedColumns.length-1;s>=0;s--){let n=t+s;for(let r=0;r<this.data.length;r++)this.data[r].length>n&&this.data[r].splice(n,1)}}this.addedColumns=[],this.usedSourceCells.clear(),this.setColumns()};this.isSourceCellUsed=(e,t)=>{let s=`${e},${t}`;return this.usedSourceCells.has(s)};this.getAddedColumnBySourceCell=(e,t)=>this.addedColumns.find(s=>s.sourceCell&&s.sourceCell.row===e&&s.sourceCell.col===t);this.getAddedColumns=()=>this.addedColumns;this.setMergedHeadersActive=e=>{this.mergedHeadersActive=e};this.isMergedHeadersActive=()=>this.mergedHeadersActive;this.setMergedRowsBackup=e=>{this.mergedRowsBackup=e};this.getMergedRowsBackup=()=>this.mergedRowsBackup;this.setAvailableRows=e=>{this.availableRows=e};this.getAvailableRows=()=>this.availableRows;this.isLoneWhitelistCharacter=e=>{let t=e.toString()?.trim()??"";return T.some(s=>t===s)};this.isSignificantCell=e=>!B(e)&&!this.isLoneWhitelistCharacter(e);this.collapseAdjacentDuplicates=e=>e.filter((t,s)=>s===0||`${t}`!=`${e[s-1]}`);this.getSignificantCells=e=>{let t=(e??[]).filter(this.isSignificantCell);return this.collapseAdjacentDuplicates(t)};this.getDataTransform=()=>this.data.map((e,t)=>({data:e,index:t,length:this.getSignificantCells(e).length}));this.getMaxLengthColumns=()=>this.getDataTransform().reduce((t,s)=>Math.max(t,s.length),0);this.isHeaderLikeCell=e=>!F.includes(Y(e)?e.toLowerCase():e)&&z(Number(e));this.countHeaderLikeCells=e=>this.getSignificantCells(e).filter(this.isHeaderLikeCell).length;this.setHeaderByAutoDetection=()=>{let t=this.getMaxLengthColumns(),s=this.getDataTransform().slice(0,50).filter(r=>r.length===t&&this.countHeaderLikeCells(r.data)===t),n=s.length===1?s[0].index:q(s,r=>r.length)?.index??0;this.setHeaderRowIndex(n)};this.getHeaderRowIndex=()=>this.headerRowIndex;this.getHeaderRow=()=>this.data[this.headerRowIndex]?.filter(e=>!!e);this.getColumns=()=>(this.ensureColumnsBuilt(),this.columns.filter(e=>!e.isRemoved()));this.getSortedColumns=()=>[...this.getColumns()].sort((e,t)=>c(e.getColumnKey())<c(t.getColumnKey())?-1:c(e.getColumnKey())>c(t.getColumnKey())?1:0);this.getColumnsWithRemoved=()=>(this.ensureColumnsBuilt(),this.columns.filter(e=>e.getType()!==1));this.getColumn=(e,t)=>(this.ensureColumnsBuilt(),this.columns.find(s=>t?c(s.getColumnKey())===c(`${e}`):s.getColumnKey()===e));this.getColumnsByKey=(e,t)=>(this.ensureColumnsBuilt(),this.columns.filter(s=>t?c(s.getColumnKey())===c(`${e}`):s.getColumnKey()===e));this.getValues=()=>{let e=this.data.filter((s,n)=>n>this.headerRowIndex);if(B(e))return[[]];let t=[];for(let s=0;s<e.length;s++){let n=[];for(let r=0;r<this.data[this.headerRowIndex].length;r++)G(this.data[this.headerRowIndex][r])||n.push(this.parseValue(e[s][r]));t.push(n)}return t};this.getData=()=>this.data;this.getExcelDateCells=()=>this.excelDateCells;this.getExcelDateSerials=()=>this.excelDateSerials;this.getColumnDateFormats=()=>this.columnDateFormats;this.getName=()=>this.name;this.getDisplayName=({t:e})=>{if(this.getName()?.length>0)return this.getName();switch(this.spreadSheet.getType()){case"json":return`${e("txt_default_sheet_prefix_name")} 1`;case"csv":return`${e("txt_default_sheet_prefix_name")} 1`;default:return""}};this.getSheetFileName=()=>`${this.spreadSheet.getFilename()}`;this.getIsManualSelectHeader=()=>this.isManualSelectHeader;this.setIsManualSelectHeader=()=>{this.isManualSelectHeader=!0};this.clearIsManualSelectHeader=()=>{this.isManualSelectHeader=!1};this.addColumn=e=>{this.ensureColumnsBuilt(),this.columns.push(new g({columnKey:`${e}`,sheet:this,rows:this.getRowsByColumnIndex(this.getColumnIndex(e))}))};this.removeColumn=e=>{this.ensureColumnsBuilt(),this.columns.find(t=>t.getColumnKey()===e)?.remove()};this.removeColumnByIndex=e=>{this.ensureColumnsBuilt(),this.columns.find((t,s)=>s===e)?.remove()};this.setData=(e,t)=>{if(t!=null&&t!==this&&(e===t.getData()||R(e,t.getData()))&&(t.columnDateFormats!=null||t.excelDateCells!=null||t.excelDateSerials!=null)){this.data=e,this.columnDateFormats=t.columnDateFormats,this.excelDateCells=t.excelDateCells,this.excelDateSerials=t.excelDateSerials;return}if(e===this.data||R(e,this.data)){this.data=e;return}this.data=e,this.clearExcelDateMetadata()};this.clearExcelDateMetadata=()=>{this.columnDateFormats=void 0,this.excelDateCells=void 0,this.excelDateSerials=void 0};this.toJSON=()=>({name:this.name,id:this.id,type:this.getType(),values:this.getValues(),headerRow:this.getHeaderRow()});this.equal=e=>this.id===e.getId();this.getType=()=>0;this.readColumnValues=(e,t)=>this.getRowsByColumnIndex(e,t);this.readDateSerialAt=(e,t)=>{if(!this.excelDateSerials||e<0||t<0)return;let s=this.headerRowIndex+1+t;if(!(s>=this.data.length))return this.excelDateSerials[`${s},${e}`]};this.readColumnDateSerials=e=>{if(!this.excelDateSerials||e===-1)return;let t=[],s=!1;for(let n=0;n<this.data.length-this.headerRowIndex-1;n++){let r=this.readDateSerialAt(e,n);r!=null&&(s=!0),t.push(r)}return s?t:void 0};this.excelDisplayFormatAt=e=>this.getExcelDisplayInputFormat(e);this.getRowsByColumnIndex=(e,t)=>{if(e===-1)return[];let s=[],n=this.columnDateFormats?.[e];for(let r=0;r<this.data.length;r++){let i=this.data[r];if(r>this.headerRowIndex){let o=i[e]??"",l=K(this.excelDateCells?.[`${r},${e}`],n);if(s.push(l??this.parseValue(o)),t!=null&&s.length>=t)break}}return s};this.getExcelDisplayInputFormat=e=>{if(!this.excelDateCells)return;let t=!1;for(let s=this.headerRowIndex+1;s<this.data.length;s++)if((this.data[s]?.[e]??"")!==""){if(!this.excelDateCells[`${s},${e}`])return;t=!0}return t?_(this.columnDateFormats?.[e]):void 0};this.ensureColumnsBuilt=()=>{this.columnsInitialized||this.setColumns()};this.setColumns=()=>{let e=this.data[this.headerRowIndex];if(e){let t=[];for(let s=0;s<e.length;++s){let n=e[s];n&&t.push(new g({columnKey:`${n}`,sheet:this,columnIndex:s,parserDateFormat:this.columnDateFormats?.[s]}))}this.columns=t}else this.columns=[];this.columnsInitialized=!0};this.getColumnIndex=e=>this.data[this.headerRowIndex].findIndex(n=>R(`${n}`,`${e}`));this.parseValue=e=>typeof e=="string"?e.trim():e;this.data=e,this.name=t,this.columnDateFormats=r,this.excelDateCells=i,this.excelDateSerials=o,typeof n>"u"?(L++,this.id=`${t}-${L}`):this.id=n,this.columnsInitialized=!!s}},E=b;var v=class extends E{constructor({joinedData:t,sheets:s,mappings:n,mappingIndexes:r}){super({data:t.data,name:"join-sheet",isNotSetColumn:!0});this.sheets=[];this.joinHistory=[];this.findRefJoinSheetColumn=t=>{let s=this.sheets.length===2?this.sheets[0]:this,n=this.sheets[this.sheets.length-1];if(t<s.getColumns().length)return s.getColumns()[t];let r=t-s.getColumns().length;return n.getColumns().filter((i,o)=>this.joinHistory[this.joinHistory.length-1].mappingIndexes.every(l=>l.target!==o))[r]};this.setJoinColumns=(t,s)=>{let n=this.data[this.headerRowIndex];if(!n){this.columns=[];return}let r=[];for(let i=0;i<n.length;++i){let o=n[i],l=s.findIndex(a=>a.source===i),m=this.columns[i]&&this.columns[i].getType()===1;if(l>=0||m){let a=t[l],h;m&&l>=0?h=[...this.columns[i].getJoinedSheetColumns(),a.target]:m?h=this.columns[i].getJoinedSheetColumns():h=[a.source.getRefJoinSheetColum()??a.source,a.target],r.push(new H({columnKey:`${o}`,sheetColumns:h,sheet:this,rows:this.getRowsByColumnIndex(i)}))}else{let a=this.columns[i]?this.columns[i].getRefJoinSheetColum()??this.columns[i]:this.findRefJoinSheetColumn(i);r.push(new g({columnKey:`${o}`,sheet:a.getSheet(),rows:this.getRowsByColumnIndex(i),refJoinSheetColum:a}))}}this.columns=r};this.getJoinedSheets=()=>this.sheets;this.getType=()=>1;this.joinSheet=(t,s,n,r)=>{this.setData(t.data),this.sheets.push(s),this.joinHistory.push({mappingIndexes:r,type:t.type,row:t.data.length,col:this.data[this.headerRowIndex]?.length??0}),this.setJoinColumns(n,r)};this.getJoinColumns=()=>this.columns.filter(t=>t.getType()===1);this.getJoinHistory=()=>this.joinHistory;this.headerRowIndex=0,this.joinHistory.push({mappingIndexes:r,type:t.type,row:t.data.length,col:this.data[this.headerRowIndex]?.length??0}),this.sheets=s,this.setJoinColumns(n,r)}},Ve=v;var Q=({rowA:u,rowB:e},t)=>t.every(s=>{let n=`${u[s.source]??""}`,r=`${e[s.target]??""}`;return n===r&&n!==""&&r!==""}),$=(u,e,t)=>{let s=[];for(let n of e){let r=`${u[n[t]]??""}`;if(r==="")return"";s.push(r)}return JSON.stringify(s)},Z=(u,e,t)=>{let s=[],n=u.headerRow,r=e.headerRow;for(let i=0;i<n.length;++i)s.push(n[i]);for(let i=0;i<r.length;++i)t.every(o=>o.target!==i)&&s.push(r[i]);return s},Ke=async(u,e)=>{let t=u.values,s=e.values,n=u.headerRow,r=e.headerRow,i=[...n,...r],o=[];o.push(i);for(let l=0;l<t.length;++l)o.push([...t[l],...s[0]]);return{data:o,type:"ADD_TO_ALL_ROWS"}},_e=async(u,e)=>{let t=u.values,s=e.values,n=u.headerRow,r=e.headerRow,i=[...n,...r],o=[];o.push(i);for(let l=0;l<t.length;++l)o.push([...t[l],...r.map(()=>"")]);for(let l=0;l<s.length;++l)o.push([...n.map(()=>""),...s[l]]);return{data:o,type:"JOIN_WITHOUT_COLUMNS"}},Be=async(u,e,t)=>{let s=u.values,n=e.values,r=[],i=[],o={},l=Z(u,e,t);r.push(l);let m=new Map;for(let a=0;a<n.length;++a){let h=$(n[a],t,"target");if(!h)continue;let d=m.get(h);d?d.push(a):m.set(h,[a])}for(let a=0;a<s.length;++a){let h=!1,d=s[a],p=$(d,t,"source");for(let f of p&&m.get(p)||[]){let S=n[f];o[f]=!0,h=!0,r.push([...d,...S.filter((N,j)=>t.every(X=>X.target!==j))])}h||i.push([...d,...e.headerRow.filter((f,S)=>t.every(N=>N.target!==S)).map(()=>"")])}for(let a=0;a<n.length;++a){if(o[a])continue;let h=n[a],d=u.headerRow.map(()=>"");t.forEach(p=>{d[p.source]=h[p.target]}),i.push([...d,...h.filter((p,f)=>t.every(S=>S.target!==f))])}return i.forEach(a=>{r.push(a)}),{data:r,type:"JOIN_ON_COLUMNS"}},Le=async(u,e,t)=>{let s=e.headerRow.filter((o,l)=>t.every(m=>m.target!==l)),r=[[...u.headerRow,...s]];for(let o=0;o<u.values.length;++o){let l=[...u.values[o],...s.map(()=>"")];r.push(l)}let i=e.values;for(let o=0;o<i.length;++o){let l=u.headerRow.map(()=>""),m=[];for(let a=0;a<e.headerRow.length;++a){let h=t.find(d=>d.target===a);h?l[h.source]=i[o][a]:m.push(i[o][a])}r.push([...l,...m])}return{data:r,type:"APPEND_TO_COLUMNS"}},Ee=async(u,e,t)=>{let s=u.values,n=e.values,r=s.length+n.length,i=0,o={};for(let l=0;l<s.length;l++){let m=s[l],a=null,h=0;for(let d=0;d<n.length;d++){let p=n[d];if(Q({rowA:m,rowB:p},t)&&(a=d,h++,h===2))break}h===1&&a!==null&&(i+=1,o[a]=!0)}for(let l=0;l<n.length;l++)o[l]&&(i+=1);return{count:i,total:r}};export{g as a,P as b,fe as c,E as d,Ve as e,$ as f,Ke as g,_e as h,Be as i,Le as j,Ee as k};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-J5WOZVPO.js";var t=()=>o.getInstance().getTruthyWords(),e=()=>o.getInstance().getFalsyWords(),r=()=>o.getInstance().getBooleanOptionToRender(),s=[...t(),...e()];export{t as a,e as b,r as c,s as d};
@@ -0,0 +1 @@
1
+ import{a as y,b as p,c as u}from"./chunk-EWEVS5OB.js";import{isInteger as m,isNumber as f,isString as g}from"lodash";var a=e=>{if(g(e)){let r=e.trimEnd();return r===""?null:r}return e},O=(e,r,i)=>{for(let n=0;n<e.length;n++){let t=e[n].getKey(),o=r;if(i&&(t=u(t),o=u(o)),t===o)return e[n]}return null},$=(e,r)=>{for(let i=0;i<r.length;i++)if(r[i].getKey()===e)return i;return-1},M=(e,r)=>`${e.value}`==`${r}`,l=(e,r)=>{let i=0;for(let n=0;n<r.length;n++){let t=r[n],o="baseKeyCounter";t?.[o]&&e===t?.["baseKey"]&&i<(t?.[o]??0)&&(i=t?.[o]||0)}return i},b=(e,r)=>!e.some(i=>i.baseKey===r),x=(e,r,i=!0)=>{let n=i?p(e):e,t=l(n,r)+1,o=n;return b(r,n)?t--:t>0&&(o=`${n}_${t}`),{key:{value:o,baseKey:n,baseKeyCounter:t}}},D=({value:e,dataModel:r,isTrim:i})=>{let n=r.getOptionTypeMap(),t=e!==void 0?n.get(e):void 0;if(!t&&typeof e=="number"&&(t=n.get(String(e))),!t&&typeof e=="string"){let o=Number(e);isNaN(o)||(t=n.get(o))}if(t=t??"string",e===""&&n.has(e))return e;if(t==="int"){let o=Number(e);return!isNaN(o)&&m(o)?o:i?a(`${e}`):`${e}`}else if(t==="float"){if(f(e))return e;let o=`${e}`.replace(/,/,"."),s=y.convertStringToNumber(`${o}`,{format:"us"});return s===null?i?a(`${e}`):`${e}`:Number(s)}else return i?a(`${e}`):`${e}`};export{a,O as b,$ as c,M as d,x as e,D as f};
@@ -0,0 +1 @@
1
+ import{b as oe,c as g,l as h,n as F}from"./chunk-U5BU7B27.js";import{a as l,d as I,f as b}from"./chunk-KNOWDPDH.js";import{a as G,b as q}from"./chunk-JWTYPSUX.js";import{a as Z,b as J,c as j,d as ee,g as te,h as re,j as ie}from"./chunk-3A4DOV33.js";import{a as d}from"./chunk-EWEVS5OB.js";import{a as Q}from"./chunk-J5WOZVPO.js";var _=class{constructor({validation:e,regex:t,fields:i,errorMessage:o,operator:n,value:s}){this.getValidation=()=>this.validation;this.getRegex=()=>this.regex;this.getFields=()=>this.fields;this.getErrorMessage=()=>this.errorMessage;this.getOperator=()=>this.operator;this.getValue=()=>this.value;this.serialize=()=>({validation:this.getValidation(),fields:this.getFields(),regex:this.getRegex(),errorMessage:this.getErrorMessage(),operator:this.getOperator(),value:this.getValue()});this.validation=e,this.regex=t,this.fields=i??[],this.errorMessage=o,this.operator=n,this.value=s}},Rt=_;var f=class r{constructor({description:e,key:t,example:i,label:o,type:n,validators:s,mappingValidation:a,alternativeMatches:p,columnSize:u,creator:m,baseKey:y,baseKeyCounter:T,outputFormat:M,inputFormat:E,numberFormat:C,hidden:x,disabled:S,optionMappingConfiguration:O,columnWidth:P,excludeFromAutoMatching:R}){this.getDescription=()=>this.description;this.getKey=()=>this.key;this.getExample=()=>this.example;this.getLabel=()=>this.label;this.setLabel=e=>{this.label=e};this.getType=()=>this.type;this.getOutputFormat=()=>r.getOutputFormat(this.outputFormat);this.getInputFormat=()=>this.inputFormat;this.getDeclaredInputFormat=()=>this.declaredInputFormat;this.setInputFormat=e=>{this.inputFormat=e};this.dateFormatPromptResolved=null;this.setDateFormatPromptResolved=e=>{this.dateFormatPromptResolved=e};this.getDateFormatPromptResolved=()=>this.dateFormatPromptResolved;this.resetSessionInputFormat=()=>{this.inputFormat=this.declaredInputFormat,this.dateFormatPromptResolved=null};this.getValidators=()=>this.validators;this.getColumnSize=()=>this.columnSize;this.getColumnWidth=()=>this.columnWidth;this.getIsRequired=()=>!!this.validators.find(t=>t.getValidation()==="REQUIRED");this.getIsUnique=()=>!!this.validators.find(t=>t.getValidation()==="UNIQUE");this.getIsUniqueAndRequired=()=>this.getIsRequired()===!0&&this.getIsUnique()===!0;this.hasMappingValidation=()=>!!(this.mappingValidation&&this.mappingValidation.logic&&this.mappingValidation.logic.trim().length>0);this.getMappingValidation=()=>this.mappingValidation||void 0;this.getAlternativeMatches=()=>this.alternativeMatches.filter(e=>!!e);this.getCreator=()=>this.creator;this.getBaseKey=()=>this.baseKey;this.getBaseKeyCounter=()=>this.baseKeyCounter;this.setCustomKey=({key:e,baseKey:t,baseKeyCounter:i,creator:o})=>{this.baseKey=t,this.key=e,this.baseKeyCounter=i,this.creator=o};this.isDropdown=()=>r.isTypeDropdown(this.getType());this.isCategoryType=()=>r.isTypeCategory(this.getType());this.isBooleanType=()=>this.type==="boolean";this.serialize=()=>({description:this.getDescription(),example:this.getExample(),key:this.getKey(),label:this.getLabel(),type:this.getType(),validators:[],alternativeMatches:this.getAlternativeMatches(),columnSize:this.getColumnSize(),columnWidth:this.getColumnWidth(),outputFormat:this.getOutputFormat(),inputFormat:this.getInputFormat(),isMultiSelection:this.getIsMultiSelection(),numberFormat:this.getNumberFormat(),baseKey:this.getBaseKey(),baseKeyCounter:this.getBaseKeyCounter(),creator:this.getCreator(),hidden:this.isHidden(),disabled:this.isDisabled(),optionMappingConfiguration:this.getOptionMappingConfiguration(),excludeFromAutoMatching:this.isExcludedFromAutoMatching()});this.getIsMultiSelection=()=>!1;this.getNumberFormat=()=>this.numberFormat;this.isDisabled=()=>this.disabled;this.isNumeric=()=>this.type==="int"||this.type==="float"||this.type==="currency_eur"||this.type==="currency_usd"||this.type==="percentage";this.isCurrency=()=>this.type==="currency_eur"||this.type==="currency_usd";this.baseClone=()=>{let e=this.serialize(),t=new r({description:e.description,example:e.example,key:e.key,label:e.label,type:e.type,validators:this.getValidators(),alternativeMatches:e.alternativeMatches,columnSize:e.columnSize,columnWidth:e.columnWidth,baseKey:e.baseKey,baseKeyCounter:e.baseKeyCounter,creator:e.creator,numberFormat:e.numberFormat,outputFormat:e.outputFormat,inputFormat:this.declaredInputFormat,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration,excludeFromAutoMatching:e.excludeFromAutoMatching});return t.setInputFormat(this.inputFormat),t.setDateFormatPromptResolved(this.dateFormatPromptResolved),t};this.isHidden=()=>this.hidden;this.isExcludedFromAutoMatching=()=>this.excludeFromAutoMatching;this.getOptionMappingConfiguration=()=>this.optionMappingConfiguration;this.description=e,this.key=t,this.example=i,this.label=o,this.type=n,this.validators=s??[],this.mappingValidation=a,this.alternativeMatches=p?[...p.filter(c=>c!==o&&c!==t)?.map(c=>c?.toString())]:[],this.columnSize=u,this.creator=m,this.baseKey=y||t,this.baseKeyCounter=T||0,this.outputFormat=M||"",this.declaredInputFormat=E??null,this.inputFormat=E??null,this.numberFormat=C||"eu",this.hidden=x??!1,this.disabled=S??!1,this.optionMappingConfiguration=O,this.columnWidth=P,this.excludeFromAutoMatching=R??!1}static{this.getOutputFormat=e=>(e||"DD.MM.YYYY").replace(/d/g,"D").replace(/e|E/g,"")}static{this.isTypeDropdown=e=>r.isTypeCategory(e)||e==="boolean"}static{this.isTypeCategory=e=>e==="single-select"||e==="currency_code"||e==="country_code_alpha_2"||e==="country_code_alpha_3"}};var Oe={ar:"ar-SA",he:"he-IL",de:"de-DE",en:"en-US",es:"es-ES",fr:"fr-FR",it:"it-IT",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",sv:"sv-SE",cz:"cs-CZ",dk:"da-DK",hu:"hu-HU",lt:"lt-LT",no:"nb-NO",ru:"ru-RU",sk:"sk-SK",zh:"zh-CN"},Yt=r=>r==="ar"||r==="he"?"rtl":"ltr",se=r=>r?Oe[r]??"de-DE":"de-DE",wt=r=>r?se(r).split("-")[0]:void 0;import{isNil as B,isArray as Ot,escapeRegExp as Pt}from"lodash";import{isArray as Pe,isNil as Re,isObject as Ie}from"lodash";var V=class{constructor(){this.parse=(e,t)=>Re(e)||Pe(e)||Ie(e)?null:G().includes(`${e}`.toLowerCase())?!0:q().includes(`${e}`.toLowerCase())?!1:e===""?null:`${e}`}},ae=V;import{isArray as le,isBoolean as pe,isNil as ue,isObject as me}from"lodash";var U=class{constructor(){this.parseSingle=(e,t)=>ue(e)||me(e)||le(e)?null:pe(e)?JSON.stringify(e):b({value:e,dataModel:t.dataModel,isTrim:!0});this.parseMultiple=(e,t)=>le(e)?e.map(i=>b({value:i,dataModel:t.dataModel,isTrim:!0})):ue(e)||me(e)||e===""?null:pe(e)?[JSON.stringify(e)]:[b({value:e,dataModel:t.dataModel,isTrim:!0})];this.parse=(e,t)=>t.dataModel.getIsMultiSelection()&&!t.forceSingle?this.parseMultiple(e,t):this.parseSingle(e,t)}},de=U;import{isArray as Fe,isBoolean as _e,isNil as Ne,isObject as Ve}from"lodash";var L=class{constructor(){this.parse=(e,t)=>{if(Ne(e)||Fe(e)||Ve(e))return null;if(_e(e))return JSON.stringify(e);if(e==="")return null;if(typeof e=="number"){let i=`${e}`;return l(d.isScientificNotation(i)?d.expandScientificNotation(i):i)}return l(`${e}`)}}},ye=L;import{isArray as Ue,isBoolean as Le,isNil as He,isObject as Ye}from"lodash";var H=class{constructor(){this.parse=(e,t)=>He(e)?null:Le(e)?e?"1":"0":Ye(e)||Ue(e)||e===""||l(e)===null?null:this.valueParser(e,t)}},D=H;var Y=class extends D{constructor(){super(...arguments);this.valueParser=(t,i)=>{let o=d.convertStringToNumber(t,{format:i?.numberFormat});return o===null?l(`${t}`):Number(o)}}},ce=Y;var w=class extends D{constructor(){super(...arguments);this.valueParser=(t,i)=>{let o=d.convertStringToNumber(t,{format:i?.numberFormat});return o===null?l(`${t}`):Number(o)}}},Me=w;import{isArray as we,isBoolean as Xe,isNil as ke,isNumber as ve,isObject as $e}from"lodash";var X=class{constructor(){this.parse=(e,t)=>{if(ke(e)||$e(e)||we(e))return null;if(Xe(e))return JSON.stringify(e);if(ve(e))return e;if(e===""||l(e)===null)return null;let i=d.convertStringToNumber(e,{adornment:"percentage"});return i===null?l(`${e}`):Number(i)}}},ge=X;import{isArray as We,isBoolean as Ke,isNil as Be,isObject as ze}from"lodash";var k=class{constructor(){this.parse=(e,t)=>{if(Be(e)||We(e)||ze(e))return null;if(Ke(e))return JSON.stringify(e);if(e===""||l(e)===null)return null;let i=d.convertStringToNumber(e,{format:t?.numberFormat});return i===null?l(`${e}`):Number(i)}}},fe=k;var he=["dd.MM.yyyy HH:mm","dd.MM.yyyy","dd/MM/yyyy HH:mm:ss","dd/MM/yyyy HH:mm","dd/MM/yyyy","dd-MM-yyyy HH:mm:ss","dd-MM-yyyy HH:mm","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd","yyyy-dd-MM","yyyy-MM-dd HH:mm:ss","dd-MM-yyyy","MM-dd-yyyy","MM/dd/yyyy","MM.dd.yyyy","yyyy/MM/dd","yyyyMMdd","dd MMM yyyy","dd MMMM yyyy","MM-dd-yyyy HH:mm:ss","MM/dd/yyyy HH:mm:ss","yyyy-MM-dd HH:mm","MM-dd-yyyy HH:mm","MM/dd/yyyy HH:mm","dd-MMM-yyyy","MMM yyyy","MMMM yyyy","MM/yyyy","M/yyyy","yyyy/MM","MM.yyyy","MM.yy","yyyy.MM","MM-yyyy","yyyy-MM","MMMM d, yyyy","MMM d, yyyy","MM dd yyyy","yyyy-MM-dd'T'HH:mm:ss.SSS","yyyy-MM-dd'T'HH:mm:ss.SSSxxx","yyyy.MM.dd","yyyy MM dd","yyyy/dd/MM","yyyy.dd.MM","dd yyyy MM","dd.yyyy.MM","dd-yyyy-MM","yyyy dd MM","MM yyyy dd","dd/yyyy/MM","MM/yyyy/dd"],Qe=["dd.MM.yyyy","dd/MM/yyyy","dd-MM-yyyy","MM.dd.yyyy","MM/dd/yyyy","MM-dd-yyyy","yyyy.MM.dd","yyyy/MM/dd","yyyy-MM-dd","yyyy.dd.MM","yyyy/dd/MM","yyyy-dd-MM","dd MMM yyyy","dd MMMM yyyy","MMM dd, yyyy","MMMM dd, yyyy","MMM dd yyyy","yyyy MMM dd"],Ge=["ddMMyyyy","MMddyyyy","yyyyMMdd"],qe=[""," HH:mm"," HH:mm:ss"],Ze=["yyyy-MM-dd","yyyy-dd-MM"],Je=["'T'HH:mm:ss","'T'HH:mm:ss.SSS","'T'HH:mm:ss.SSSxxx"],je=[...Qe.flatMap(r=>qe.map(e=>`${r}${e}`)),...Ge,...Ze.flatMap(r=>Je.map(e=>`${r}${e}`))],et=new Set(he),v=new Set([...he,...je.filter(r=>!et.has(r))]);var tt={YYYY:"yyyy",YY:"yy",MMMM:"MMMM",MMM:"MMM",MM:"MM",M:"M",DD:"dd",D:"d",HH:"HH",H:"H",hh:"hh",h:"h",mm:"mm",m:"m",ss:"ss",s:"s",SSS:"SSS",SS:"SS",S:"S",A:"a",a:"a",XXXXX:"XXXXX",XXXX:"XXXX",XXX:"XXX",XX:"XX",X:"X",xxxxx:"xxxxx",xxxx:"xxxx",xxx:"xxx",xx:"xx",x:"x",ZZ:"xxx",Z:"X"},Te=r=>r.replace(/'/g,"''"),rt=r=>{let e="",t=0;for(;t<r.length;){let i=r[t];if(i==="'"){t+=1;let o="";for(;t<r.length;)if(r[t]==="'")if(r[t+1]==="'")o+="'",t+=2;else{t+=1;break}else o+=r[t],t+=1;e+=`'${Te(o)}'`;continue}if(i==="["){t+=1;let o="";for(;t<r.length;)if(r[t]==="]")if(r[t+1]==="]")o+="]",t+=2;else{t+=1;break}else o+=r[t],t+=1;e+=`'${Te(o)}'`;continue}if(i==="T"){e+="'T'",t+=1;continue}if(/[A-Za-z]/.test(i)){let o=1;for(;r[t+o]===i;)o++;let n=r.slice(t,t+o);e+=tt[n]??n,t+=o}else e+=i,t+=1}return e},Ee=/^(yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|XXXXX|XXXX|XXX|XX|X|xxxxx|xxxx|xxx|xx|x|a)/,it=new Set(["HH","H","hh","h","mm","m","ss","s","SSS","SS","S","a","XXXXX","XXXX","XXX","XX","X","xxxxx","xxxx","xxx","xx","x"]),ot=new Set(["MMM","MMMM"]),nt=[".","/","-"," "],st="",at=r=>{let e=[],t=0;for(;t<r.length;){if(r[t]==="'"){t+=1;let n="'";for(;t<r.length;)if(r[t]==="'")if(r[t+1]==="'")n+="''",t+=2;else{n+="'",t+=1;break}else n+=r[t],t+=1;e.push({kind:"text",text:n});continue}let i=r.slice(t).match(Ee);if(i){e.push({kind:"token",token:i[1]}),t+=i[1].length;continue}let o=r[t];for(t+=1;t<r.length&&!(r[t]==="'"||Ee.test(r.slice(t)));)o+=r[t],t+=1;e.push({kind:"text",text:o})}return e},lt=r=>{for(let e=0;e<r.length;e++){let t=r[e];if(t.kind!=="token"||!it.has(t.token))continue;let i=e>0?r[e-1]:null;return i?.kind==="text"&&(/^[T\s]+$/.test(i.text)||i.text==="'T'")?e-1:e}return r.length},be=r=>{let e=at(r);if(e.some(a=>a.kind==="token"&&ot.has(a.token)))return`exact:${r}`;let t=lt(e),i=e.slice(0,t),o=e.slice(t),n="",s=!1;for(let a of i){if(a.kind==="token"){let p=a.token;p==="d"?p="dd":p==="M"?p="MM":p==="yy"&&(p="yyyy"),n+=p,s=!0;continue}s&&a.text.length===1&&nt.includes(a.text)?n+=st:n+=a.text,s=!1}for(let a of o)n+=a.kind==="token"?a.token:a.text;return n},$=null,pt=()=>{if($)return $;let r=new Set;for(let e of v){let t=be(e);t&&r.add(t)}return $=r,r},ut=r=>{if(!g(r))return!1;let e=rt(r.trim());if(v.has(e))return!0;let t=be(e);return!t||t.startsWith("exact:")?!1:pt().has(t)},Cr=r=>{if(!g(r))return null;let e=r.trim();return ut(e)?e:null},mt=({sourceRows:r,inputFormat:e})=>{let t=e.trim(),i=0,o=0;for(let n=0;n<r.length;n++){let s=r[n];oe(s)&&(o+=1,h(s.trim(),t)||(i+=1))}return{mismatchCount:i,totalCount:o}},xr=(r,e)=>{let t=e.trim();if(h(r,t))return!1;let i=r.trim();return/^\d{4}-\d{2}-\d{2}/.test(i)?!!(t.includes("/")||t.includes(".")&&!t.includes("/")):!1},Sr=({columnKey:r,sourceRows:e,inputFormat:t})=>{let{mismatchCount:i,totalCount:o}=mt({sourceRows:e,inputFormat:t});i!==0&&console.warn(`Ingestro: Column '${r}': ${i} of ${o} cells did not match inputFormat '${t.trim()}'.`)};import{parse as dt,format as yt}from"date-fns";import{isArray as ct,isBoolean as Mt,isNil as gt,isObject as ft}from"lodash";import A from"moment";var Ae=/([+-](?:0\d|1[0-4]):?[0-5]\d|Z)$/i,De=(r,e)=>{let o=!!r.match(Ae)?A.parseZone(r,e,!0):A(r,e,!0);return o.isValid()&&o.format(e)===r},W=class{constructor(){this.parse=(e,t)=>{if(gt(e)||ct(e)||ft(e))return null;if(Mt(e))return JSON.stringify(e);let i=t?.dataModel?.getType();if(!i)return l(`${e}`);if(typeof e=="string"){if(e==="")return null;try{if(t?.dataModel?.getType()==="date"){let o=t?.dataModel?.getOutputFormat(),n=t?.dataModel?.getInputFormat(),s=`${e}`,a=!1;if(g(n)&&!t?.skipDeclaredInputFormatNormalization){let y=ee(s);if(h(s,n)||y)y||(s=`${F([s],n)[0]}`),a=!0;else{let M=F([s],n)[0];if(M===s)return De(s,o)?s:l(s);s=`${M}`,a=!0}}if(!a&&De(s,o))return s;let m=!!s.match(Ae)?A.parseZone(s,j):A(s,J);if(m.isValid())return m.format(o);throw new Error("invalid date")}else{let o=te[i];if(!o)return l(`${e}`);let n=dt(e,Z,new Date);return yt(n,o)}}catch{let n=re[i];return n?l(ie(e,n)):l(`${e}`)}}else return l(`${e}`)}}},Ce=W;import{isArray as ht}from"lodash";var Tt=new ce,Et=new Me,bt=new fe,Dt=new ge,At=new ae,Ct=new de,xt=new ye,St=new Ce,K=class{static{this.parse=(e,t)=>{let i;switch(t?.dataModel?.getType()){case"int":i=Tt;break;case"float":i=Et;break;case"boolean":i=At;break;case"single-select":case"currency_code":case"country_code_alpha_2":case"country_code_alpha_3":i=Ct;break;case"percentage":i=Dt;break;case"currency_eur":case"currency_usd":i=bt;break;case"date":case"date_dmy":case"date_mdy":case"date_iso":case"datetime":case"time_hms":case"time_hms_24":case"time_hm":case"time_hm_24":i=St;break;case"email":case"url_www":case"url_https":case"url":case"phone":case"zip_code_de":case"bic":case"vat_eu":case"gtin":case"iban":default:i=xt;break}return i.parse(e,t)}}static{this.parseRawValueToDisplayValue=(e,t)=>{let i=e;if(t.isNumeric)i=d.convertToFormat(e,{targetFormat:t.numberFormat||"eu",adornment:t.type==="percentage"?"percentage":void 0}),["currency_eur","currency_usd"].includes(t.type)&&(t.type==="currency_usd"?i=`$${i}`:i=`${i} \u20AC`);else if(t.type==="boolean"){let n=Q.getInstance().getOptionsForReviewEntries().find(s=>`${s.value}`.includes(`${e}`));n&&(i=`${n.label}`)}else if(f.isTypeCategory(t.type))if(t.isMultiSelection){if(ht(e)){let o=t.options?.filter(n=>e.some(s=>I(n,s)));o&&(i=o.map(n=>n.label).join(", "))}}else{let o=t.options?.find(n=>I(n,e));o&&(i=`${o?.label}`)}return`${i}`}}static{this.parseDisplayValueToRawValue=(e,t)=>{if(t.isNumeric){let i=d.convertToUsWithDecimal(`${e}`,t.numberFormat??"eu");if(i===null)return e;let o=d.convertStringToNumber(i,{format:"us"});return o!==null?Number(o):e}else return e}}},xe=K;var ai=(r,e)=>Number(r).toLocaleString(e??"de-DE",{numberingSystem:"latn"}),li=(r,e)=>{let{value:t,isExact:i,columns:o,isEmptyValues:n}=e;if(n)return B(r)||r==="";if(Ot(r)&&o[0]?.isMultiSelection){let a=o[0],p=r.map(u=>{let m=a.options?.find(y=>`${y.value}`==`${u}`);return m?m.label:`${u}`}).join(", ");return i?p===t:p.toLowerCase().includes(t.toLowerCase())}let s=xe.parseRawValueToDisplayValue(r,o[0]);return i&&!B(r)&&s===t?!0:!!(!i&&!B(r)&&s?.toLowerCase()?.includes(t?.toLowerCase()))},pi=(r,e,t,i)=>{let o=r.map(u=>{let m=i.options?.find(y=>`${y.value}`==`${u}`);return m?m.label:`${u}`}),n=e.split(",").map(u=>u.trim()).filter(Boolean);if(n.length===0)return r;let s=-1;for(let u=0;u<=o.length-n.length;u++){let m=!0;for(let y=0;y<n.length;y++)if(o[u+y].toLowerCase()!==n[y].toLowerCase()){m=!1;break}if(m){s=u;break}}if(s===-1)return r;let a=[...r.slice(0,s),...t,...r.slice(s+n.length)],p=new Set;return a.filter(u=>{let m=`${u}`;return p.has(m)?!1:(p.add(m),!0)})},ui=(r,e,t)=>{let i=new RegExp(Pt(e),"gi");return`${r}`.replace(i,t)},mi=r=>typeof r=="string"?r.replace(/(\r\n|\n|\r)/gm,""):r,di=(r,e)=>e?e.map((t,i)=>r.map(o=>({rowIndex:i,valid:!0,key:o.key,value:t[o.key]}))):[];var z=class r extends f{constructor({description:t,key:i,example:o,label:n,type:s,options:a,validators:p,alternativeMatches:u,columnSize:m,isMultiSelection:y,allowCustomOptions:T,allowedCustomOptionTypes:M,preserveUnmappedOptions:E,creator:C,baseKey:x,baseKeyCounter:S,hidden:O,optionMappingConfiguration:P,...R}){super({description:t,key:i,example:o,label:n,type:s,validators:p,alternativeMatches:u,columnSize:m,creator:C,baseKey:x,baseKeyCounter:S,hidden:O,optionMappingConfiguration:P,...R});this.optionTypeMap=null;this.getOptions=()=>this.options;this.getOptionTypeMap=()=>{if(!this.optionTypeMap){this.optionTypeMap=new Map;for(let t=0;t<this.options.length;t++){let i=this.options[t];this.optionTypeMap.set(i.value,i.type??"string")}}return this.optionTypeMap};this.setOptions=t=>{this.options=t,this.optionTypeMap=null};this.serialize=()=>{let t={description:this.getDescription(),example:this.getExample(),isRequired:this.getIsRequired(),key:this.getKey(),label:this.getLabel(),type:this.getType(),validators:this.getValidators().map(o=>o.serialize()),alternativeMatches:this.getAlternativeMatches(),columnSize:this.getColumnSize(),columnWidth:this.getColumnWidth(),outputFormat:this.getOutputFormat(),inputFormat:this.getInputFormat(),numberFormat:this.getNumberFormat(),baseKey:this.getBaseKey(),baseKeyCounter:this.getBaseKeyCounter(),creator:this.getCreator(),hidden:this.isHidden(),disabled:this.isDisabled(),optionMappingConfiguration:this.getOptionMappingConfiguration(),excludeFromAutoMatching:this.isExcludedFromAutoMatching()},i=this.getOptions();return{...t,options:i,isMultiSelection:this.isMultiSelection,allowCustomOptions:this.allowCustomOptions,allowedCustomOptionTypes:this.allowedCustomOptionTypes?[...this.allowedCustomOptionTypes]:void 0,preserveUnmappedOptions:this.preserveUnmappedOptions}};this.getIsMultiSelection=()=>this.isMultiSelection;this.getAllowCustomOptions=()=>this.allowCustomOptions;this.getAllowedCustomOptionTypes=()=>this.allowedCustomOptionTypes?[...this.allowedCustomOptionTypes]:void 0;this.getPreserveUnmappedOptions=()=>this.preserveUnmappedOptions;this.options=a?.map(c=>({...c,baseKey:c?.baseKey||c.value,baseKeyCounter:c.baseKeyCounter||0,alternativeMatches:c.alternativeMatches.filter(Se=>Se!==c.label),validations:c.validations||[]})),this.isMultiSelection=y,this.allowCustomOptions=T,this.allowedCustomOptionTypes=M?[...M]:void 0,this.preserveUnmappedOptions=E}clone(){let t=this.serialize();return new r({description:t.description,example:t.example,key:t.key,label:t.label,type:t.type,options:t.options,validators:this.getValidators(),alternativeMatches:t.alternativeMatches,columnSize:t.columnSize,columnWidth:t.columnWidth,isMultiSelection:t.isMultiSelection,allowCustomOptions:t.allowCustomOptions,allowedCustomOptionTypes:t.allowedCustomOptionTypes,preserveUnmappedOptions:t.preserveUnmappedOptions,hidden:t.hidden,disabled:t.disabled,optionMappingConfiguration:t.optionMappingConfiguration,excludeFromAutoMatching:t.excludeFromAutoMatching})}},Ti=z;export{Cr as a,xr as b,Sr as c,Rt as d,f as e,xe as f,Yt as g,se as h,wt as i,ai as j,li as k,pi as l,ui as m,mi as n,di as o,Ti as p};
@@ -0,0 +1 @@
1
+ import{B as y,b as S,c as E,d as h,n as f}from"./chunk-3A4DOV33.js";var Te="prod",O=()=>{let e=y;return typeof e=="function"?e:void 0},Me=(e,n)=>{let t=O();return t?t(e,n):null};import l from"moment";var Se=e=>e===""||e===null||e===void 0,g=e=>typeof e=="string"&&e.trim()!=="";var V=["date","date_dmy","date_mdy","date_iso","datetime"],P=new Set(V),T=e=>g(e),w=e=>typeof e=="string"&&P.has(e),Ne=({columnKey:e,columnType:n,inputFormat:t})=>!!e&&T(t)&&w(n);var M=["/",".","-"," "],x=e=>{let n=e.trim();if(!n)return null;for(let t of n){let r=M.find(s=>s===t);if(r)return r}return null},Oe=(e,n=".")=>{for(let t of e){if(typeof t!="string")continue;let r=x(t);if(r)return r}return n},R=/(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d|[+-](?:[01]\d|2[0-3])[0-5]\d)$/i,C=/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?[+-](?:[01]\d|2[0-3])$/i,L=e=>R.test(e)||C.test(e),H={yyyy:"YYYY",yy:"YY",dd:"DD",d:"D",XXXXX:"Z",XXXX:"ZZ",XXX:"Z",XX:"ZZ",X:"ZZ",xxxxx:"Z",xxxx:"ZZ",xxx:"Z",xx:"ZZ",x:"ZZ",ZZ:"ZZ",Z:"Z"},v=e=>e.replace(/\]/g,"]]"),K=/YYYY|YY|MMMM|MMM|MM|M|DD|D|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a|ZZ|Z/g,$=e=>/^(H{1,2}|h{1,2})$/.test(e),_=e=>e.match(K)??[],N=e=>{let n="",t=0;for(;t<e.length;){if(e[t]==="["){let r=t+1;for(;r<e.length;){if(e[r]==="]"&&e[r+1]==="]"){r+=2;continue}if(r+=1,e[r-1]==="]")break}t=r;continue}n+=e[t],t+=1}return n},F=e=>{let n="",t=0;for(;t<e.length;){if(e[t]==="\\"&&t+1<e.length){t+=2;continue}n+=e[t],t+=1}return n},U=e=>{let n=_(e),t=n.some(i=>/^(D|DD)$/.test(i)),r=n.some(i=>/^(Y{2,4})$/.test(i)),s=n.some(i=>/^(M{1,4})$/.test(i));return(t||r)&&!s},B=e=>{let n="",t=0,r=null;for(;t<e.length;){if(e[t]==="["){let i=t+1,o="[";for(;i<e.length;){if(e[i]==="]"&&e[i+1]==="]"){o+="]]",i+=2;continue}if(o+=e[i],i+=1,e[i-1]==="]")break}n+=o,t=i;continue}if(e[t]==="\\"&&t+1<e.length){n+=e[t]+e[t+1],t+=2;continue}let s=e.slice(t).match(/^(YYYY|YY|MMMM|MMM|MM|M|DD|D|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a|ZZ|Z)/);if(s){let i=s[1],o=/^(m{1,2})$/.test(i)&&!(r!==null&&$(r));n+=o?i==="mm"?"MM":"M":i,r=i,t+=i.length;continue}n+=e[t],t+=1}return n},Z=e=>{let n="",t=0;for(;t<e.length;){let s=e[t];if(s==="'"){t+=1;let i="";for(;t<e.length;)if(e[t]==="'")if(e[t+1]==="'")i+="'",t+=2;else{t+=1;break}else i+=e[t],t+=1;n+=`[${v(i)}]`;continue}if(/[A-Za-z]/.test(s)){let i=1;for(;e[t+i]===s;)i++;let o=e.slice(t,t+i);n+=H[o]??o,t+=i}else n+=s,t+=1}let r=F(N(n));return U(r)&&(n=B(n)),n},I=e=>{let n=F(N(e));return _(n).some(t=>t==="Z"||t==="ZZ")},k=/^(YYYY|YY|MMMM|MMM|MM|M|DD|D|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a|ZZ|Z)/,z=new Set(["HH","H","hh","h","mm","m","ss","s","SSS","SS","S","A","a","ZZ","Z"]),G=new Set(["MMM","MMMM"]),Y={D:"day",DD:"day",M:"month",MM:"month",YY:"year",YYYY:"year"},j=/(\s+\d{1,2}:\d{2}(?::\d{2})?(?::\d+|\.\d+)?(?:\s*[AaPp][Mm])?(?:\s*(?:Z|[+-]\d{2}(?::?\d{2})?))?)$/,W=e=>{let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let i=t+1,o="[";for(;i<e.length;){if(e[i]==="]"&&e[i+1]==="]"){o+="]]",i+=2;continue}if(o+=e[i],i+=1,e[i-1]==="]")break}n.push({kind:"text",text:o}),t=i;continue}if(e[t]==="\\"&&t+1<e.length){n.push({kind:"text",text:e[t]+e[t+1]}),t+=2;continue}let r=e.slice(t).match(k);if(r){n.push({kind:"token",token:r[1]}),t+=r[1].length;continue}let s=e[t];for(t+=1;t<e.length&&!(e[t]==="["||e[t]==="\\"||k.test(e.slice(t)));)s+=e[t],t+=1;n.push({kind:"text",text:s})}return n},J=e=>e.map(n=>n.kind==="token"?n.token:n.text).join(""),q=e=>{for(let n=0;n<e.length;n++){let t=e[n];if(t.kind!=="token"||!z.has(t.token))continue;let r=n>0?e[n-1]:null;return r?.kind==="text"&&(/^[T\s]+$/.test(r.text)||r.text==="[T]")?n-1:n}return e.length},Q=e=>{let n=[],t=!1;for(let s of e){if(s.kind==="token"){t=!0;continue}t&&s.text.length>0&&n.push(s.text),t=!1}if(n.length===0)return null;let r=n[0];return!n.every(s=>s===r)||r.length!==1||!M.includes(r)?null:r},A=e=>{let n=[];for(let t of e){if(t.kind!=="token")continue;let r=Y[t.token];if(!r)return null;n.push(r)}return n.length>0?n:null},ee=(e,n)=>{if(Q(e)===null||!A(e))return!1;for(let t of e){if(t.kind==="token"){if(!Y[t.token])return!1;continue}if(t.text.length!==1||!M.includes(t.text))return!1}for(let t of n)if(t.kind==="text"){if(t.text.startsWith("[")){if(t.text!=="[T]")return!1;continue}if(!/^[T\s:.]*$/.test(t.text))return!1}return!0},te=e=>l(String(e).padStart(2,"0"),"YY",!0).year(),ne=(e,n)=>{let t=x(e);if(!t)return l.invalid();let r=e.split(t);if(r.length!==n.length)return l.invalid();if(!r.every(u=>/^\d+$/.test(u)))return l.invalid();let s=1,i=1,o=1970,d=!1;for(let u=0;u<n.length;u++){let m=r[u],a=Number(m);if(!Number.isFinite(a))return l.invalid();switch(n[u]){case"day":if(m.length>2)return l.invalid();s=a;break;case"month":if(m.length>2)return l.invalid();i=a;break;case"year":if(m.length===2)o=te(a);else if(m.length===4)o=a;else return l.invalid();d=!0;break}}if(!d)return l.invalid();let c=l({year:o,month:i-1,day:s});return!c.isValid()||c.year()!==o||c.month()!==i-1||c.date()!==s?l.invalid():c},re=(e,n)=>{if(!n)return{dateText:e,timeText:""};if(n.startsWith("[T]")||n.startsWith("T")){let r=e.indexOf("T");return r<=0?null:{dateText:e.slice(0,r),timeText:e.slice(r)}}let t=e.match(j);return!t||t.index===void 0||t.index===0?null:{dateText:e.slice(0,t.index),timeText:t[1]}},b=(e,n)=>{let t=Z(n),r=I(t),s=W(t);if(s.some(D=>D.kind==="token"&&G.has(D.token)))return r?l.parseZone(e,t,!0):l(e,t,!0);let i=q(s),o=s.slice(0,i),d=s.slice(i),c=A(o);if(!c||!ee(o,d))return r?l.parseZone(e,t,!0):l(e,t,!0);let u=J(d),m=re(e,u);if(!m)return l.invalid();let a=ne(m.dateText,c);if(!a.isValid())return l.invalid();if(!u)return a;let p=r?l.parseZone(m.timeText,u,!0):l(m.timeText,u,!0);return p.isValid()?(a.hours(p.hours()).minutes(p.minutes()).seconds(p.seconds()).milliseconds(p.milliseconds()),r?a.utcOffset(p.utcOffset(),!0):a):l.invalid()},X=e=>e.trim(),ie=(e,n)=>{if(!g(e))return e;let t=e.trim();if(h(t))return t;let r=X(e),s=b(r,n.trim());if(!s.isValid())return e;let i=I(Z(n.trim()))&&L(e);return s.format(i?E:S)},Ve=(e,n)=>{if(!g(e)||h(e.trim()))return!0;let t=X(e);return b(t,n.trim()).isValid()},se=e=>{let n=null;for(let t of e)try{if(typeof t!="string")continue;let r=t.trim(),s=x(r);if(!s)continue;let i=r.split(s).map(u=>u.replace(/[,.\-/]/g,"")).map(Number).filter(u=>isNaN(u)||u<=31),[o,d]=i,c=null;if(!isNaN(o)&&o>12?c="dM":!isNaN(d)&&d>12&&(c="Md"),!c)continue;if(n===null){n=c;continue}if(n!==c)return null}catch{continue}return n},Pe=(e,n)=>{if(T(n)){let s=n.trim();return e.map(i=>ie(i,s))}let t=[],r=se(e);for(let s=0;s<e.length;s++){let i=e[s];t.push(f(i,!1,{allDefaultDateFormat:!0,priorityFormat:r}))}return t};export{Se as a,g as b,T as c,w as d,Ne as e,Te as f,Me as g,x as h,Oe as i,L as j,Z as k,Ve as l,se as m,Pe as n};
@@ -0,0 +1 @@
1
+ var e=[{label:"AFN",value:"AFN",type:"string",alternativeMatches:["Af","Afghanistan"]},{label:"ARS",value:"ARS",type:"string",alternativeMatches:["AR$","Argentina"]},{label:"AWG",value:"AWG",type:"string",alternativeMatches:["Aruba"]},{label:"AUD",value:"AUD",type:"string",alternativeMatches:["AU$","Australia"]},{label:"AZN",value:"AZN",type:"string",alternativeMatches:["man.","Azerbaijan"]},{label:"BSD",value:"BSD",type:"string",alternativeMatches:["Bahamas"]},{label:"BBD",value:"BBD",type:"string",alternativeMatches:["Barbados"]},{label:"BYN",value:"BYN",type:"string",alternativeMatches:["Br"]},{label:"BZD",value:"BZD",type:"string",alternativeMatches:["BZ$","Belize"]},{label:"BMD",value:"BMD",type:"string",alternativeMatches:["Bermuda"]},{label:"BOB",value:"BOB",type:"string",alternativeMatches:["Bs","Bolivia"]},{label:"BAM",value:"BAM",type:"string",alternativeMatches:["KM","Bosnia and Herzegovina"]},{label:"BWP",value:"BWP",type:"string",alternativeMatches:["BWP","Botswana"]},{label:"BGN",value:"BGN",type:"string",alternativeMatches:["BGN","Bulgaria"]},{label:"BRL",value:"BRL",type:"string",alternativeMatches:["R$","Brazil"]},{label:"BND",value:"BND",type:"string",alternativeMatches:["BN$","Brunei"]},{label:"KHR",value:"KHR",type:"string",alternativeMatches:["KHR","Cambodia"]},{label:"CAD",value:"CAD",type:"string",alternativeMatches:["CA$","Canada"]},{label:"KYD",value:"KYD",type:"string",alternativeMatches:["Cayman Islands"]},{label:"CLP",value:"CLP",type:"string",alternativeMatches:["CL$","Chile"]},{label:"CNY",value:"CNY",type:"string",alternativeMatches:["CN\xA5","China"]},{label:"COP",value:"COP",type:"string",alternativeMatches:["CO$","Colombia"]},{label:"CRC",value:"CRC",type:"string",alternativeMatches:["\u20A1","Costa Rica"]},{label:"HRK",value:"HRK",type:"string",alternativeMatches:["kn","Croatia"]},{label:"CUP",value:"CUP",type:"string",alternativeMatches:["Cuba"]},{label:"CZK",value:"CZK",type:"string",alternativeMatches:["K\u010D","Czech Republic"]},{label:"DKK",value:"DKK",type:"string",alternativeMatches:["Dkr","Denmark"]},{label:"DOP",value:"DOP",type:"string",alternativeMatches:["RD$","Dominican Republic"]},{label:"XCD",value:"XCD",type:"string",alternativeMatches:["Anguilla"]},{label:"EGP",value:"EGP",type:"string",alternativeMatches:["EGP","Egypt"]},{label:"SVC",value:"SVC",type:"string",alternativeMatches:["El Salvador"]},{label:"EUR",value:"EUR",type:"string",alternativeMatches:["\u20AC","Germany"]},{label:"FKP",value:"FKP",type:"string",alternativeMatches:["Falkland Islands"]},{label:"FJD",value:"FJD",type:"string",alternativeMatches:["Fiji Islands"]},{label:"GHS",value:"GHS",type:"string",alternativeMatches:["GH\u20B5","Ghana"]},{label:"GIP",value:"GIP",type:"string",alternativeMatches:["Gibraltar"]},{label:"GTQ",value:"GTQ",type:"string",alternativeMatches:["GTQ"]},{label:"GGP",value:"GGP",type:"string",alternativeMatches:[]},{label:"GYD",value:"GYD",type:"string",alternativeMatches:["Guyana"]},{label:"HNL",value:"HNL",type:"string",alternativeMatches:["HNL","Honduras"]},{label:"HKD",value:"HKD",type:"string",alternativeMatches:["HK$","Hong Kong"]},{label:"HUF",value:"HUF",type:"string",alternativeMatches:["Ft","Hungary"]},{label:"ISK",value:"ISK",type:"string",alternativeMatches:["Ikr","Iceland"]},{label:"INR",value:"INR",type:"string",alternativeMatches:["\u20B9","India"]},{label:"IDR",value:"IDR",type:"string",alternativeMatches:["Rp","Indonesia"]},{label:"IRR",value:"IRR",type:"string",alternativeMatches:["IRR","Iran"]},{label:"IMP",value:"IMP",type:"string",alternativeMatches:[]},{label:"ILS",value:"ILS",type:"string",alternativeMatches:["\u20AA","Israel"]},{label:"JMD",value:"JMD",type:"string",alternativeMatches:["J$","Jamaica"]},{label:"JPY",value:"JPY",type:"string",alternativeMatches:["\xA5","Japan"]},{label:"JEP",value:"JEP",type:"string",alternativeMatches:[]},{label:"KZT",value:"KZT",type:"string",alternativeMatches:["KZT","Kazakhstan"]},{label:"KPW",value:"KPW",type:"string",alternativeMatches:["North Korea"]},{label:"KRW",value:"KRW",type:"string",alternativeMatches:["\u20A9","South Korea"]},{label:"KGS",value:"KGS",type:"string",alternativeMatches:["Kyrgyzstan"]},{label:"LAK",value:"LAK",type:"string",alternativeMatches:["Laos"]},{label:"LBP",value:"LBP",type:"string",alternativeMatches:["L.L.","Lebanon"]},{label:"LRD",value:"LRD",type:"string",alternativeMatches:["Liberia"]},{label:"MKD",value:"MKD",type:"string",alternativeMatches:["MKD","North Macedonia"]},{label:"MYR",value:"MYR",type:"string",alternativeMatches:["RM","Malaysia"]},{label:"MUR",value:"MUR",type:"string",alternativeMatches:["MURs","Mauritius"]},{label:"MXN",value:"MXN",type:"string",alternativeMatches:["MX$","Mexico"]},{label:"MNT",value:"MNT",type:"string",alternativeMatches:["Mongolia"]},{label:"MZN",value:"MZN",type:"string",alternativeMatches:["MTn","Mozambique"]},{label:"NAD",value:"NAD",type:"string",alternativeMatches:["N$","Namibia"]},{label:"NPR",value:"NPR",type:"string",alternativeMatches:["NPRs","Nepal"]},{label:"ANG",value:"ANG",type:"string",alternativeMatches:["Netherlands Antilles"]},{label:"NZD",value:"NZD",type:"string",alternativeMatches:["NZ$","Cook Islands"]},{label:"NIO",value:"NIO",type:"string",alternativeMatches:["C$","Nicaragua"]},{label:"NGN",value:"NGN",type:"string",alternativeMatches:["\u20A6","Nigeria"]},{label:"NOK",value:"NOK",type:"string",alternativeMatches:["Nkr","Bouvet Island"]},{label:"OMR",value:"OMR",type:"string",alternativeMatches:["OMR","Oman"]},{label:"PKR",value:"PKR",type:"string",alternativeMatches:["PKRs","Pakistan"]},{label:"PAB",value:"PAB",type:"string",alternativeMatches:["B/.","Panama"]},{label:"PYG",value:"PYG",type:"string",alternativeMatches:["\u20B2","Paraguay"]},{label:"PEN",value:"PEN",type:"string",alternativeMatches:["S/.","Peru"]},{label:"PHP",value:"PHP",type:"string",alternativeMatches:["\u20B1","Philippines"]},{label:"PLN",value:"PLN",type:"string",alternativeMatches:["z\u0142","Poland"]},{label:"QAR",value:"QAR",type:"string",alternativeMatches:["QR","Qatar"]},{label:"RON",value:"RON",type:"string",alternativeMatches:["RON","Romania"]},{label:"RUB",value:"RUB",type:"string",alternativeMatches:["RUB","Russian Federation"]},{label:"SHP",value:"SHP",type:"string",alternativeMatches:["Saint Helena"]},{label:"SAR",value:"SAR",type:"string",alternativeMatches:["SR","Saudi Arabia"]},{label:"RSD",value:"RSD",type:"string",alternativeMatches:["din.","Serbia"]},{label:"SCR",value:"SCR",type:"string",alternativeMatches:["Seychelles"]},{label:"SGD",value:"SGD",type:"string",alternativeMatches:["S$","Singapore"]},{label:"SBD",value:"SBD",type:"string",alternativeMatches:["Solomon Islands"]},{label:"SOS",value:"SOS",type:"string",alternativeMatches:["Ssh","Somalia"]},{label:"ZAR",value:"ZAR",type:"string",alternativeMatches:["R","South Africa"]},{label:"LKR",value:"LKR",type:"string",alternativeMatches:["SLRs","Sri Lanka"]},{label:"SEK",value:"SEK",type:"string",alternativeMatches:["Skr","Sweden"]},{label:"CHF",value:"CHF",type:"string",alternativeMatches:["CHF","Liechtenstein"]},{label:"SRD",value:"SRD",type:"string",alternativeMatches:["Suriname"]},{label:"SYP",value:"SYP",type:"string",alternativeMatches:["SY\xA3","Syria"]},{label:"TWD",value:"TWD",type:"string",alternativeMatches:["NT$"]},{label:"THB",value:"THB",type:"string",alternativeMatches:["\u0E3F","Thailand"]},{label:"TTD",value:"TTD",type:"string",alternativeMatches:["TT$","Trinidad and Tobago"]},{label:"TRY",value:"TRY",type:"string",alternativeMatches:["TL","Turkey"]},{label:"TVD",value:"TVD",type:"string",alternativeMatches:[]},{label:"UAH",value:"UAH",type:"string",alternativeMatches:["\u20B4","Ukraine"]},{label:"GBP",value:"GBP",type:"string",alternativeMatches:["\xA3","England"]},{label:"USD",value:"USD",type:"string",alternativeMatches:["$","USA"]},{label:"UYU",value:"UYU",type:"string",alternativeMatches:["$U","Uruguay"]},{label:"UZS",value:"UZS",type:"string",alternativeMatches:["UZS","Uzbekistan"]},{label:"VEF",value:"VEF",type:"string",alternativeMatches:["Bs.F.","Venezuela"]},{label:"VND",value:"VND",type:"string",alternativeMatches:["\u20AB","Vietnam"]},{label:"YER",value:"YER",type:"string",alternativeMatches:["YR","Yemen"]},{label:"ZWD",value:"ZWD",type:"string",alternativeMatches:["Zimbabwe"]},{label:"XOF",value:"XOF",type:"string",alternativeMatches:["CFA Franc","West Africa"]},{label:"BDT",value:"BDT",type:"string",alternativeMatches:["\u09F3","Bangladesh"]},{label:"UGX",value:"UGX",type:"string",alternativeMatches:["USh","Uganda"]},{label:"KES",value:"KES",type:"string",alternativeMatches:["KSh","Kenya"]},{label:"LSL",value:"LSL",type:"string",alternativeMatches:["Loti","Lesotho"]},{label:"MWK",value:"MWK",type:"string",alternativeMatches:["K","Malawi"]},{label:"TZS",value:"TZS",type:"string",alternativeMatches:["TSh","Tanzania"]},{label:"ETB",value:"ETB",type:"string",alternativeMatches:["Br","Ethiopia"]},{label:"VEB",value:"VEB",type:"string",alternativeMatches:["Bs","Venezuela"]},{label:"XAF",value:"XAF",type:"string",alternativeMatches:["CFA Franc","Central Africa"]}],a=[{value:"AF",label:"AF",type:"string",alternativeMatches:["Afghanistan"]},{value:"AX",label:"AX",type:"string",alternativeMatches:["\xC5land Islands"]},{value:"AL",label:"AL",type:"string",alternativeMatches:["Albania"]},{value:"DZ",label:"DZ",type:"string",alternativeMatches:["Algeria"]},{value:"AS",label:"AS",type:"string",alternativeMatches:["American Samoa"]},{value:"AD",label:"AD",type:"string",alternativeMatches:["Andorra"]},{value:"AO",label:"AO",type:"string",alternativeMatches:["Angola"]},{value:"AI",label:"AI",type:"string",alternativeMatches:["Anguilla"]},{value:"AQ",label:"AQ",type:"string",alternativeMatches:["Antarctica"]},{value:"AG",label:"AG",type:"string",alternativeMatches:["Antigua and Barbuda","Antigua","Barbuda"]},{value:"AR",label:"AR",type:"string",alternativeMatches:["Argentina"]},{value:"AM",label:"AM",type:"string",alternativeMatches:["Armenia"]},{value:"AW",label:"AW",type:"string",alternativeMatches:["Aruba"]},{value:"AU",label:"AU",type:"string",alternativeMatches:["Australia"]},{value:"AT",label:"AT",type:"string",alternativeMatches:["Austria"]},{value:"AZ",label:"AZ",type:"string",alternativeMatches:["Azerbaijan"]},{value:"BS",label:"BS",type:"string",alternativeMatches:["Bahamas"]},{value:"BH",label:"BH",type:"string",alternativeMatches:["Bahrain"]},{value:"BD",label:"BD",type:"string",alternativeMatches:["Bangladesh"]},{value:"BB",label:"BB",type:"string",alternativeMatches:["Barbados"]},{value:"BY",label:"BY",type:"string",alternativeMatches:["Belarus"]},{value:"BE",label:"BE",type:"string",alternativeMatches:["Belgium"]},{value:"BZ",label:"BZ",type:"string",alternativeMatches:["Belize"]},{value:"BJ",label:"BJ",type:"string",alternativeMatches:["Benin"]},{value:"BM",label:"BM",type:"string",alternativeMatches:["Bermuda"]},{value:"BT",label:"BT",type:"string",alternativeMatches:["Bhutan"]},{value:"BO",label:"BO",type:"string",alternativeMatches:["Bolivia (Plurinational State of)","Bolivia"]},{value:"BQ",label:"BQ",type:"string",alternativeMatches:["Bonaire, Sint Eustatius and Saba"]},{value:"BA",label:"BA",type:"string",alternativeMatches:["Bosnia and Herzegovina"]},{value:"BW",label:"BW",type:"string",alternativeMatches:["Botswana"]},{value:"BV",label:"BV",type:"string",alternativeMatches:["Bouvet Island"]},{value:"BR",label:"BR",type:"string",alternativeMatches:["Brazil"]},{value:"IO",label:"IO",type:"string",alternativeMatches:["British Indian Ocean Territory"]},{value:"BN",label:"BN",type:"string",alternativeMatches:["Brunei Darussalam"]},{value:"BG",label:"BG",type:"string",alternativeMatches:["Bulgaria"]},{value:"BF",label:"BF",type:"string",alternativeMatches:["Burkina Faso"]},{value:"BI",label:"BI",type:"string",alternativeMatches:["Burundi"]},{value:"KH",label:"KH",type:"string",alternativeMatches:["Cambodia"]},{value:"CM",label:"CM",type:"string",alternativeMatches:["Cameroon"]},{value:"CA",label:"CA",type:"string",alternativeMatches:["Canada"]},{value:"CV",label:"CV",type:"string",alternativeMatches:["Cape Verde"]},{value:"KY",label:"KY",type:"string",alternativeMatches:["Cayman Islands"]},{value:"CF",label:"CF",type:"string",alternativeMatches:["Central African Republic"]},{value:"TD",label:"TD",type:"string",alternativeMatches:["Chad"]},{value:"CL",label:"CL",type:"string",alternativeMatches:["Chile"]},{value:"CN",label:"CN",type:"string",alternativeMatches:["China"]},{value:"CX",label:"CX",type:"string",alternativeMatches:["Christmas Island"]},{value:"CC",label:"CC",type:"string",alternativeMatches:["Cocos (Keeling) Islands","Cocos Islands"]},{value:"CO",label:"CO",type:"string",alternativeMatches:["Colombia"]},{value:"KM",label:"KM",type:"string",alternativeMatches:["Comoros"]},{value:"CG",label:"CG",type:"string",alternativeMatches:["Congo"]},{value:"CD",label:"CD",type:"string",alternativeMatches:["Congo (the Democratic Republic of the)","Congo"]},{value:"CK",label:"CK",type:"string",alternativeMatches:["Cook Islands"]},{value:"CR",label:"CR",type:"string",alternativeMatches:["Costa Rica"]},{value:"CI",label:"CI",type:"string",alternativeMatches:["C\xF4te d'Ivoire","Cote d Ivoire"]},{value:"HR",label:"HR",type:"string",alternativeMatches:["Croatia"]},{value:"CU",label:"CU",type:"string",alternativeMatches:["Cuba"]},{value:"CW",label:"CW",type:"string",alternativeMatches:["Cura\xE7ao","Curacao"]},{value:"CY",label:"CY",type:"string",alternativeMatches:["Cyprus"]},{value:"CZ",label:"CZ",type:"string",alternativeMatches:["Czechia","Czech Republic"]},{value:"DK",label:"DK",type:"string",alternativeMatches:["Denmark"]},{value:"DJ",label:"DJ",type:"string",alternativeMatches:["Djibouti"]},{value:"DM",label:"DM",type:"string",alternativeMatches:["Dominica"]},{value:"DO",label:"DO",type:"string",alternativeMatches:["Dominican Republic"]},{value:"EC",label:"EC",type:"string",alternativeMatches:["Ecuador"]},{value:"EG",label:"EG",type:"string",alternativeMatches:["Egypt"]},{value:"SV",label:"SV",type:"string",alternativeMatches:["El Salvador"]},{value:"GQ",label:"GQ",type:"string",alternativeMatches:["Equatorial Guinea"]},{value:"ER",label:"ER",type:"string",alternativeMatches:["Eritrea"]},{value:"EE",label:"EE",type:"string",alternativeMatches:["Estonia"]},{value:"ET",label:"ET",type:"string",alternativeMatches:["Ethiopia"]},{value:"FK",label:"FK",type:"string",alternativeMatches:["Falkland Islands (Malvinas)"]},{value:"FO",label:"FO",type:"string",alternativeMatches:["Faroe Islands"]},{value:"FJ",label:"FJ",type:"string",alternativeMatches:["Fiji"]},{value:"FI",label:"FI",type:"string",alternativeMatches:["Finland"]},{value:"FR",label:"FR",type:"string",alternativeMatches:["France"]},{value:"GF",label:"GF",type:"string",alternativeMatches:["French Guiana"]},{value:"PF",label:"PF",type:"string",alternativeMatches:["French Polynesia"]},{value:"TF",label:"TF",type:"string",alternativeMatches:["French Southern Territories"]},{value:"GA",label:"GA",type:"string",alternativeMatches:["Gabon"]},{value:"GM",label:"GM",type:"string",alternativeMatches:["Gambia"]},{value:"GE",label:"GE",type:"string",alternativeMatches:["Georgia"]},{value:"DE",label:"DE",type:"string",alternativeMatches:["Germany"]},{value:"GH",label:"GH",type:"string",alternativeMatches:["Ghana"]},{value:"GI",label:"GI",type:"string",alternativeMatches:["Gibraltar"]},{value:"GR",label:"GR",type:"string",alternativeMatches:["Greece"]},{value:"GL",label:"GL",type:"string",alternativeMatches:["Greenland"]},{value:"GD",label:"GD",type:"string",alternativeMatches:["Grenada"]},{value:"GP",label:"GP",type:"string",alternativeMatches:["Guadeloupe"]},{value:"GU",label:"GU",type:"string",alternativeMatches:["Guam"]},{value:"GT",label:"GT",type:"string",alternativeMatches:["Guatemala"]},{value:"GG",label:"GG",type:"string",alternativeMatches:["Guernsey"]},{value:"GN",label:"GN",type:"string",alternativeMatches:["Guinea"]},{value:"GW",label:"GW",type:"string",alternativeMatches:["Guinea-Bissau"]},{value:"GY",label:"GY",type:"string",alternativeMatches:["Guyana"]},{value:"HT",label:"HT",type:"string",alternativeMatches:["Haiti"]},{value:"HM",label:"HM",type:"string",alternativeMatches:["Heard Island and McDonald Islands","Heard Island","McDonald Islands"]},{value:"VA",label:"VA",type:"string",alternativeMatches:["Holy See (Vatican City State)"]},{value:"HN",label:"HN",type:"string",alternativeMatches:["Honduras"]},{value:"HK",label:"HK",type:"string",alternativeMatches:["Hong Kong"]},{value:"HU",label:"HU",type:"string",alternativeMatches:["Hungary"]},{value:"IS",label:"IS",type:"string",alternativeMatches:["Iceland"]},{value:"IN",label:"IN",type:"string",alternativeMatches:["India"]},{value:"ID",label:"ID",type:"string",alternativeMatches:["Indonesia"]},{value:"IR",label:"IR",type:"string",alternativeMatches:["Iran (Islamic Republic of) ","Iran"]},{value:"IQ",label:"IQ",type:"string",alternativeMatches:["Iraq"]},{value:"IE",label:"IE",type:"string",alternativeMatches:["Ireland"]},{value:"IM",label:"IM",type:"string",alternativeMatches:["Isle of Man"]},{value:"IL",label:"IL",type:"string",alternativeMatches:["Israel"]},{value:"IT",label:"IT",type:"string",alternativeMatches:["Italy"]},{value:"JM",label:"JM",type:"string",alternativeMatches:["Jamaica"]},{value:"JP",label:"JP",type:"string",alternativeMatches:["Japan"]},{value:"JE",label:"JE",type:"string",alternativeMatches:["Jersey"]},{value:"JO",label:"JO",type:"string",alternativeMatches:["Jordan"]},{value:"KZ",label:"KZ",type:"string",alternativeMatches:["Kazakhstan"]},{value:"KE",label:"KE",type:"string",alternativeMatches:["Kenya"]},{value:"KI",label:"KI",type:"string",alternativeMatches:["Kiribati"]},{value:"KP",label:"KP",type:"string",alternativeMatches:["Democratic People's Republic of Korea","North Korea"]},{value:"KR",label:"KR",type:"string",alternativeMatches:["Korea, Republic of Korea","South Korea"]},{value:"KW",label:"KW",type:"string",alternativeMatches:["Kuwait"]},{value:"KG",label:"KG",type:"string",alternativeMatches:["Kyrgyzstan"]},{value:"LA",label:"LA",type:"string",alternativeMatches:["Lao People's Democratic Republic"]},{value:"LV",label:"LV",type:"string",alternativeMatches:["Latvia"]},{value:"LB",label:"LB",type:"string",alternativeMatches:["Lebanon"]},{value:"LS",label:"LS",type:"string",alternativeMatches:["Lesotho"]},{value:"LR",label:"LR",type:"string",alternativeMatches:["Liberia"]},{value:"LY",label:"LY",type:"string",alternativeMatches:["Libya"]},{value:"LI",label:"LI",type:"string",alternativeMatches:["Liechtenstein"]},{value:"LT",label:"LT",type:"string",alternativeMatches:["Lithuania"]},{value:"LU",label:"LU",type:"string",alternativeMatches:["Luxembourg"]},{value:"MO",label:"MO",type:"string",alternativeMatches:["Macao"]},{value:"MK",label:"MK",type:"string",alternativeMatches:["Republic of North Macedonia","North Macedonia"]},{value:"MG",label:"MG",type:"string",alternativeMatches:["Madagascar"]},{value:"MW",label:"MW",type:"string",alternativeMatches:["Malawi"]},{value:"MY",label:"MY",type:"string",alternativeMatches:["Malaysia"]},{value:"MV",label:"MV",type:"string",alternativeMatches:["Maldives"]},{value:"ML",label:"ML",type:"string",alternativeMatches:["Mali"]},{value:"MT",label:"MT",type:"string",alternativeMatches:["Malta"]},{value:"MH",label:"MH",type:"string",alternativeMatches:["Marshall Islands"]},{value:"MQ",label:"MQ",type:"string",alternativeMatches:["Martinique"]},{value:"MR",label:"MR",type:"string",alternativeMatches:["Mauritania"]},{value:"MU",label:"MU",type:"string",alternativeMatches:["Mauritius"]},{value:"YT",label:"YT",type:"string",alternativeMatches:["Mayotte"]},{value:"MX",label:"MX",type:"string",alternativeMatches:["Mexico"]},{value:"FM",label:"FM",type:"string",alternativeMatches:["Micronesia (Federated States of)"]},{value:"MD",label:"MD",type:"string",alternativeMatches:["Moldova (the Republic of)"]},{value:"MC",label:"MC",type:"string",alternativeMatches:["Monaco"]},{value:"MN",label:"MN",type:"string",alternativeMatches:["Mongolia"]},{value:"ME",label:"ME",type:"string",alternativeMatches:["Montenegro"]},{value:"MS",label:"MS",type:"string",alternativeMatches:["Montserrat"]},{value:"MA",label:"MA",type:"string",alternativeMatches:["Morocco"]},{value:"MZ",label:"MZ",type:"string",alternativeMatches:["Mozambique"]},{value:"MM",label:"MM",type:"string",alternativeMatches:["Myanmar"]},{value:"NA",label:"NA",type:"string",alternativeMatches:["Namibia"]},{value:"NR",label:"NR",type:"string",alternativeMatches:["Nauru"]},{value:"NP",label:"NP",type:"string",alternativeMatches:["Nepal"]},{value:"NL",label:"NL",type:"string",alternativeMatches:["Netherlands"]},{value:"NC",label:"NC",type:"string",alternativeMatches:["New Caledonia"]},{value:"NZ",label:"NZ",type:"string",alternativeMatches:["New Zealand"]},{value:"NI",label:"NI",type:"string",alternativeMatches:["Nicaragua"]},{value:"NE",label:"NE",type:"string",alternativeMatches:["Niger"]},{value:"NG",label:"NG",type:"string",alternativeMatches:["Nigeria"]},{value:"NU",label:"NU",type:"string",alternativeMatches:["Niue"]},{value:"NF",label:"NF",type:"string",alternativeMatches:["Norfolk Island"]},{value:"MP",label:"MP",type:"string",alternativeMatches:["Northern Mariana Islands"]},{value:"NO",label:"NO",type:"string",alternativeMatches:["Norway"]},{value:"OM",label:"OM",type:"string",alternativeMatches:["Oman"]},{value:"PK",label:"PK",type:"string",alternativeMatches:["Pakistan"]},{value:"PW",label:"PW",type:"string",alternativeMatches:["Palau"]},{value:"PS",label:"PS",type:"string",alternativeMatches:["Palestinian Territory, Occupied"]},{value:"PA",label:"PA",type:"string",alternativeMatches:["Panama"]},{value:"PG",label:"PG",type:"string",alternativeMatches:["Papua New Guinea"]},{value:"PY",label:"PY",type:"string",alternativeMatches:["Paraguay"]},{value:"PE",label:"PE",type:"string",alternativeMatches:["Peru"]},{value:"PH",label:"PH",type:"string",alternativeMatches:["Philippines"]},{value:"PN",label:"PN",type:"string",alternativeMatches:["Pitcairn"]},{value:"PL",label:"PL",type:"string",alternativeMatches:["Poland"]},{value:"PT",label:"PT",type:"string",alternativeMatches:["Portugal"]},{value:"PR",label:"PR",type:"string",alternativeMatches:["Puerto Rico"]},{value:"QA",label:"QA",type:"string",alternativeMatches:["Qatar"]},{value:"RE",label:"RE",type:"string",alternativeMatches:["R\xE9union"]},{value:"RO",label:"RO",type:"string",alternativeMatches:["Romania"]},{value:"RU",label:"RU",type:"string",alternativeMatches:["Russian Federation"]},{value:"RW",label:"RW",type:"string",alternativeMatches:["Rwanda"]},{value:"BL",label:"BL",type:"string",alternativeMatches:["Saint Barth\xE9lemy"]},{value:"SH",label:"SH",type:"string",alternativeMatches:["Saint Helena, Ascension and Tristan da Cunha"]},{value:"KN",label:"KN",type:"string",alternativeMatches:["Saint Kitts and Nevis","Saint Kitts","Nevis"]},{value:"LC",label:"LC",type:"string",alternativeMatches:["Saint Lucia"]},{value:"MF",label:"MF",type:"string",alternativeMatches:["Saint Martin (French part)"]},{value:"PM",label:"PM",type:"string",alternativeMatches:["Saint Pierre and Miquelon","Saint Pierre","Miquelon"]},{value:"VC",label:"VC",type:"string",alternativeMatches:["Saint Vincent and the Grenadines","Saint Vincent","Grenadines"]},{value:"WS",label:"WS",type:"string",alternativeMatches:["Samoa"]},{value:"SM",label:"SM",type:"string",alternativeMatches:["San Marino"]},{value:"ST",label:"ST",type:"string",alternativeMatches:["Sao Tome and Principe","Sao Tome","Principe"]},{value:"SA",label:"SA",type:"string",alternativeMatches:["Saudi Arabia"]},{value:"SN",label:"SN",type:"string",alternativeMatches:["Senegal"]},{value:"RS",label:"RS",type:"string",alternativeMatches:["Serbia"]},{value:"SC",label:"SC",type:"string",alternativeMatches:["Seychelles"]},{value:"SL",label:"SL",type:"string",alternativeMatches:["Sierra Leone"]},{value:"SG",label:"SG",type:"string",alternativeMatches:["Singapore"]},{value:"SX",label:"SX",type:"string",alternativeMatches:["Sint Maarten"]},{value:"SK",label:"SK",type:"string",alternativeMatches:["Slovakia"]},{value:"SI",label:"SI",type:"string",alternativeMatches:["Slovenia"]},{value:"SB",label:"SB",type:"string",alternativeMatches:["Solomon Islands"]},{value:"SO",label:"SO",type:"string",alternativeMatches:["Somalia"]},{value:"ZA",label:"ZA",type:"string",alternativeMatches:["South Africa"]},{value:"GS",label:"GS",type:"string",alternativeMatches:["South Georgia and the South Sandwich Islands","South Georgia","South Sandwich Islands"]},{value:"SS",label:"SS",type:"string",alternativeMatches:["South Sudan"]},{value:"ES",label:"ES",type:"string",alternativeMatches:["Spain"]},{value:"LK",label:"LK",type:"string",alternativeMatches:["Sri Lanka"]},{value:"SD",label:"SD",type:"string",alternativeMatches:["Sudan"]},{value:"SR",label:"SR",type:"string",alternativeMatches:["Suriname"]},{value:"SJ",label:"SJ",type:"string",alternativeMatches:["Svalbard and Jan Mayen","Svalbard","Jan Mayen"]},{value:"SZ",label:"SZ",type:"string",alternativeMatches:["Swaziland","Eswatini"]},{value:"SE",label:"SE",type:"string",alternativeMatches:["Sweden"]},{value:"CH",label:"CH",type:"string",alternativeMatches:["Switzerland"]},{value:"SY",label:"SY",type:"string",alternativeMatches:["Syrian Arab Republic"]},{value:"TW",label:"TW",type:"string",alternativeMatches:["Taiwan, Province of China"]},{value:"TJ",label:"TJ",type:"string",alternativeMatches:["Tajikistan"]},{value:"TZ",label:"TZ",type:"string",alternativeMatches:["Tanzania, United Republic of","Tanzania"]},{value:"TH",label:"TH",type:"string",alternativeMatches:["Thailand"]},{value:"TL",label:"TL",type:"string",alternativeMatches:["Timor-Leste"]},{value:"TG",label:"TG",type:"string",alternativeMatches:["Togo"]},{value:"TK",label:"TK",type:"string",alternativeMatches:["Tokelau"]},{value:"TO",label:"TO",type:"string",alternativeMatches:["Tonga"]},{value:"TT",label:"TT",type:"string",alternativeMatches:["Trinidad and Tobago","Trinidad","Tobago"]},{value:"TN",label:"TN",type:"string",alternativeMatches:["Tunisia"]},{value:"TR",label:"TR",type:"string",alternativeMatches:["Turkey"]},{value:"TM",label:"TM",type:"string",alternativeMatches:["Turkmenistan"]},{value:"TC",label:"TC",type:"string",alternativeMatches:["Turks and Caicos Islands"]},{value:"TV",label:"TV",type:"string",alternativeMatches:["Tuvalu"]},{value:"UG",label:"UG",type:"string",alternativeMatches:["Uganda"]},{value:"UA",label:"UA",type:"string",alternativeMatches:["Ukraine"]},{value:"AE",label:"AE",type:"string",alternativeMatches:["United Arab Emirates","UAE"]},{value:"GB",label:"GB",type:"string",alternativeMatches:["United Kingdom"]},{value:"US",label:"US",type:"string",alternativeMatches:["United States"]},{value:"UM",label:"UM",type:"string",alternativeMatches:["United States Minor Outlying Islands"]},{value:"UY",label:"UY",type:"string",alternativeMatches:["Uruguay"]},{value:"UZ",label:"UZ",type:"string",alternativeMatches:["Uzbekistan"]},{value:"VU",label:"VU",type:"string",alternativeMatches:["Vanuatu"]},{value:"VE",label:"VE",type:"string",alternativeMatches:["Venezuela (Bolivarian Republic of)","Venezuela","Bolivarian"]},{value:"VN",label:"VN",type:"string",alternativeMatches:["Viet Nam"]},{value:"VG",label:"VG",type:"string",alternativeMatches:["Virgin Islands (British)","British"]},{value:"VI",label:"VI",type:"string",alternativeMatches:["Virgin Islands (U.S.)"]},{value:"WF",label:"WF",type:"string",alternativeMatches:["Wallis and Futuna"]},{value:"EH",label:"EH",type:"string",alternativeMatches:["Western Sahara"]},{value:"YE",label:"YE",type:"string",alternativeMatches:["Yemen"]},{value:"ZM",label:"ZM",type:"string",alternativeMatches:["Zambia"]},{value:"ZW",label:"ZW",type:"string",alternativeMatches:["Zimbabwe"]}],t=[{value:"AFG",label:"AFG",type:"string",alternativeMatches:["Afghanistan"]},{value:"ALA",label:"ALA",type:"string",alternativeMatches:["\xC5land Islands"]},{value:"ALB",label:"ALB",type:"string",alternativeMatches:["Albania"]},{value:"DZA",label:"DZA",type:"string",alternativeMatches:["Algeria"]},{value:"ASM",label:"ASM",type:"string",alternativeMatches:["American Samoa"]},{value:"AND",label:"AND",type:"string",alternativeMatches:["Andorra"]},{value:"AGO",label:"AGO",type:"string",alternativeMatches:["Angola"]},{value:"AIA",label:"AIA",type:"string",alternativeMatches:["Anguilla"]},{value:"ATA",label:"ATA",type:"string",alternativeMatches:["Antarctica"]},{value:"ATG",label:"ATG",type:"string",alternativeMatches:["Antigua and Barbuda","Antigua","Barbuda"]},{value:"ARG",label:"ARG",type:"string",alternativeMatches:["Argentina"]},{value:"ARM",label:"ARM",type:"string",alternativeMatches:["Armenia"]},{value:"ABW",label:"ABW",type:"string",alternativeMatches:["Aruba"]},{value:"AUS",label:"AUS",type:"string",alternativeMatches:["Australia"]},{value:"AUT",label:"AUT",type:"string",alternativeMatches:["Austria"]},{value:"AZE",label:"AZE",type:"string",alternativeMatches:["Azerbaijan"]},{value:"BHS",label:"BHS",type:"string",alternativeMatches:["Bahamas"]},{value:"BHR",label:"BHR",type:"string",alternativeMatches:["Bahrain"]},{value:"BGD",label:"BGD",type:"string",alternativeMatches:["Bangladesh"]},{value:"BRB",label:"BRB",type:"string",alternativeMatches:["Barbados"]},{value:"BLR",label:"BLR",type:"string",alternativeMatches:["Belarus"]},{value:"BEL",label:"BEL",type:"string",alternativeMatches:["Belgium"]},{value:"BLZ",label:"BLZ",type:"string",alternativeMatches:["Belize"]},{value:"BEN",label:"BEN",type:"string",alternativeMatches:["Benin"]},{value:"BMU",label:"BMU",type:"string",alternativeMatches:["Bermuda"]},{value:"BTN",label:"BTN",type:"string",alternativeMatches:["Bhutan"]},{value:"BOL",label:"BOL",type:"string",alternativeMatches:["Bolivia (Plurinational State of)","Bolivia"]},{value:"BES",label:"BES",type:"string",alternativeMatches:["Bonaire, Sint Eustatius and Saba"]},{value:"BIH",label:"BIH",type:"string",alternativeMatches:["Bosnia and Herzegovina"]},{value:"BWA",label:"BWA",type:"string",alternativeMatches:["Botswana"]},{value:"BVT",label:"BVT",type:"string",alternativeMatches:["Bouvet Island"]},{value:"BRA",label:"BRA",type:"string",alternativeMatches:["Brazil"]},{value:"IOT",label:"IOT",type:"string",alternativeMatches:["British Indian Ocean Territory"]},{value:"BRN",label:"BRN",type:"string",alternativeMatches:["Brunei Darussalam"]},{value:"BGR",label:"BGR",type:"string",alternativeMatches:["Bulgaria"]},{value:"BFA",label:"BFA",type:"string",alternativeMatches:["Burkina Faso"]},{value:"BDI",label:"BDI",type:"string",alternativeMatches:["Burundi"]},{value:"KHM",label:"KHM",type:"string",alternativeMatches:["Cambodia"]},{value:"CMR",label:"CMR",type:"string",alternativeMatches:["Cameroon"]},{value:"CAN",label:"CAN",type:"string",alternativeMatches:["Canada"]},{value:"CPV",label:"CPV",type:"string",alternativeMatches:["Cape Verde"]},{value:"CYM",label:"CYM",type:"string",alternativeMatches:["Cayman Islands"]},{value:"CAF",label:"CAF",type:"string",alternativeMatches:["Central African Republic"]},{value:"TCD",label:"TCD",type:"string",alternativeMatches:["Chad"]},{value:"CHL",label:"CHL",type:"string",alternativeMatches:["Chile"]},{value:"CHN",label:"CHN",type:"string",alternativeMatches:["China"]},{value:"CXR",label:"CXR",type:"string",alternativeMatches:["Christmas Island"]},{value:"CCK",label:"CCK",type:"string",alternativeMatches:["Cocos (Keeling) Islands"]},{value:"COL",label:"COL",type:"string",alternativeMatches:["Colombia"]},{value:"COM",label:"COM",type:"string",alternativeMatches:["Comoros"]},{value:"COG",label:"COG",type:"string",alternativeMatches:["Congo"]},{value:"COD",label:"COD",type:"string",alternativeMatches:["Congo (the Democratic Republic of the)"]},{value:"COK",label:"COK",type:"string",alternativeMatches:["Cook Islands"]},{value:"CRI",label:"CRI",type:"string",alternativeMatches:["Costa Rica"]},{value:"CIV",label:"CIV",type:"string",alternativeMatches:["C\xF4te d'Ivoire"]},{value:"HRV",label:"HRV",type:"string",alternativeMatches:["Croatia"]},{value:"CUB",label:"CUB",type:"string",alternativeMatches:["Cuba"]},{value:"CUW",label:"CUW",type:"string",alternativeMatches:["Cura\xE7ao"]},{value:"CYP",label:"CYP",type:"string",alternativeMatches:["Cyprus"]},{value:"CZE",label:"CZE",type:"string",alternativeMatches:["Czechia","Czech Republic"]},{value:"DNK",label:"DNK",type:"string",alternativeMatches:["Denmark"]},{value:"DJI",label:"DJI",type:"string",alternativeMatches:["Djibouti"]},{value:"DMA",label:"DMA",type:"string",alternativeMatches:["Dominica"]},{value:"DOM",label:"DOM",type:"string",alternativeMatches:["Dominican Republic"]},{value:"ECU",label:"ECU",type:"string",alternativeMatches:["Ecuador"]},{value:"EGY",label:"EGY",type:"string",alternativeMatches:["Egypt"]},{value:"SLV",label:"SLV",type:"string",alternativeMatches:["El Salvador"]},{value:"GNQ",label:"GNQ",type:"string",alternativeMatches:["Equatorial Guinea"]},{value:"ERI",label:"ERI",type:"string",alternativeMatches:["Eritrea"]},{value:"EST",label:"EST",type:"string",alternativeMatches:["Estonia"]},{value:"ETH",label:"ETH",type:"string",alternativeMatches:["Ethiopia"]},{value:"FLK",label:"FLK",type:"string",alternativeMatches:["Falkland Islands (Malvinas)"]},{value:"FRO",label:"FRO",type:"string",alternativeMatches:["Faroe Islands"]},{value:"FJI",label:"FJI",type:"string",alternativeMatches:["Fiji"]},{value:"FIN",label:"FIN",type:"string",alternativeMatches:["Finland"]},{value:"FRA",label:"FRA",type:"string",alternativeMatches:["France"]},{value:"GUF",label:"GUF",type:"string",alternativeMatches:["French Guiana"]},{value:"PYF",label:"PYF",type:"string",alternativeMatches:["French Polynesia"]},{value:"ATF",label:"ATF",type:"string",alternativeMatches:["French Southern Territories"]},{value:"GAB",label:"GAB",type:"string",alternativeMatches:["Gabon"]},{value:"GMB",label:"GMB",type:"string",alternativeMatches:["Gambia"]},{value:"GEO",label:"GEO",type:"string",alternativeMatches:["Georgia"]},{value:"DEU",label:"DEU",type:"string",alternativeMatches:["Germany"]},{value:"GHA",label:"GHA",type:"string",alternativeMatches:["Ghana"]},{value:"GIB",label:"GIB",type:"string",alternativeMatches:["Gibraltar"]},{value:"GRC",label:"GRC",type:"string",alternativeMatches:["Greece"]},{value:"GRL",label:"GRL",type:"string",alternativeMatches:["Greenland"]},{value:"GRD",label:"GRD",type:"string",alternativeMatches:["Grenada"]},{value:"GLP",label:"GLP",type:"string",alternativeMatches:["Guadeloupe"]},{value:"GUM",label:"GUM",type:"string",alternativeMatches:["Guam"]},{value:"GTM",label:"GTM",type:"string",alternativeMatches:["Guatemala"]},{value:"GGY",label:"GGY",type:"string",alternativeMatches:["Guernsey"]},{value:"GIN",label:"GIN",type:"string",alternativeMatches:["Guinea"]},{value:"GNB",label:"GNB",type:"string",alternativeMatches:["Guinea-Bissau"]},{value:"GUY",label:"GUY",type:"string",alternativeMatches:["Guyana"]},{value:"HTI",label:"HTI",type:"string",alternativeMatches:["Haiti"]},{value:"HMD",label:"HMD",type:"string",alternativeMatches:["Heard Island and McDonald Islands","Heard Island","McDonald Islands"]},{value:"VAT",label:"VAT",type:"string",alternativeMatches:["Holy See (Vatican City State)"]},{value:"HND",label:"HND",type:"string",alternativeMatches:["Honduras"]},{value:"HKG",label:"HKG",type:"string",alternativeMatches:["Hong Kong"]},{value:"HUN",label:"HUN",type:"string",alternativeMatches:["Hungary"]},{value:"ISL",label:"ISL",type:"string",alternativeMatches:["Iceland"]},{value:"IND",label:"IND",type:"string",alternativeMatches:["India"]},{value:"IDN",label:"IDN",type:"string",alternativeMatches:["Indonesia"]},{value:"IRN",label:"IRN",type:"string",alternativeMatches:["Iran (Islamic Republic of) ","Iran"]},{value:"IRQ",label:"IRQ",type:"string",alternativeMatches:["Iraq"]},{value:"IRL",label:"IRL",type:"string",alternativeMatches:["Ireland"]},{value:"IMN",label:"IMN",type:"string",alternativeMatches:["Isle of Man"]},{value:"ISR",label:"ISR",type:"string",alternativeMatches:["Israel"]},{value:"ITA",label:"ITA",type:"string",alternativeMatches:["Italy"]},{value:"JAM",label:"JAM",type:"string",alternativeMatches:["Jamaica"]},{value:"JPN",label:"JPN",type:"string",alternativeMatches:["Japan"]},{value:"JEY",label:"JEY",type:"string",alternativeMatches:["Jersey"]},{value:"JOR",label:"JOR",type:"string",alternativeMatches:["Jordan"]},{value:"KAZ",label:"KAZ",type:"string",alternativeMatches:["Kazakhstan"]},{value:"KEN",label:"KEN",type:"string",alternativeMatches:["Kenya"]},{value:"KIR",label:"KIR",type:"string",alternativeMatches:["Kiribati"]},{value:"PRK",label:"PRK",type:"string",alternativeMatches:["Democratic People's Republic of Korea","North Korea"]},{value:"KOR",label:"KOR",type:"string",alternativeMatches:["Korea, Republic of Korea","South Korea"]},{value:"KWT",label:"KWT",type:"string",alternativeMatches:["Kuwait"]},{value:"KGZ",label:"KGZ",type:"string",alternativeMatches:["Kyrgyzstan"]},{value:"LAO",label:"LAO",type:"string",alternativeMatches:["Lao People's Democratic Republic"]},{value:"LVA",label:"LVA",type:"string",alternativeMatches:["Latvia"]},{value:"LBN",label:"LBN",type:"string",alternativeMatches:["Lebanon"]},{value:"LSO",label:"LSO",type:"string",alternativeMatches:["Lesotho"]},{value:"LBR",label:"LBR",type:"string",alternativeMatches:["Liberia"]},{value:"LBY",label:"LBY",type:"string",alternativeMatches:["Libya"]},{value:"LIE",label:"LIE",type:"string",alternativeMatches:["Liechtenstein"]},{value:"LTU",label:"LTU",type:"string",alternativeMatches:["Lithuania"]},{value:"LUX",label:"LUX",type:"string",alternativeMatches:["Luxembourg"]},{value:"MAC",label:"MAC",type:"string",alternativeMatches:["Macao"]},{value:"MKD",label:"MKD",type:"string",alternativeMatches:["Republic of North Macedonia","North Macedonia"]},{value:"MDG",label:"MDG",type:"string",alternativeMatches:["Madagascar"]},{value:"MWI",label:"MWI",type:"string",alternativeMatches:["Malawi"]},{value:"MYS",label:"MYS",type:"string",alternativeMatches:["Malaysia"]},{value:"MDV",label:"MDV",type:"string",alternativeMatches:["Maldives"]},{value:"MLI",label:"MLI",type:"string",alternativeMatches:["Mali"]},{value:"MLT",label:"MLT",type:"string",alternativeMatches:["Malta"]},{value:"MHL",label:"MHL",type:"string",alternativeMatches:["Marshall Islands"]},{value:"MTQ",label:"MTQ",type:"string",alternativeMatches:["Martinique"]},{value:"MRT",label:"MRT",type:"string",alternativeMatches:["Mauritania"]},{value:"MUS",label:"MUS",type:"string",alternativeMatches:["Mauritius"]},{value:"MYT",label:"MYT",type:"string",alternativeMatches:["Mayotte"]},{value:"MEX",label:"MEX",type:"string",alternativeMatches:["Mexico"]},{value:"FSM",label:"FSM",type:"string",alternativeMatches:["Micronesia (Federated States of)"]},{value:"MDA",label:"MDA",type:"string",alternativeMatches:["Moldova (the Republic of)"]},{value:"MCO",label:"MCO",type:"string",alternativeMatches:["Monaco"]},{value:"MNG",label:"MNG",type:"string",alternativeMatches:["Mongolia"]},{value:"MNE",label:"MNE",type:"string",alternativeMatches:["Montenegro"]},{value:"MSR",label:"MSR",type:"string",alternativeMatches:["Montserrat"]},{value:"MAR",label:"MAR",type:"string",alternativeMatches:["Morocco"]},{value:"MOZ",label:"MOZ",type:"string",alternativeMatches:["Mozambique"]},{value:"MMR",label:"MMR",type:"string",alternativeMatches:["Myanmar"]},{value:"NAM",label:"NAM",type:"string",alternativeMatches:["Namibia"]},{value:"NRU",label:"NRU",type:"string",alternativeMatches:["Nauru"]},{value:"NPL",label:"NPL",type:"string",alternativeMatches:["Nepal"]},{value:"NLD",label:"NLD",type:"string",alternativeMatches:["Netherlands"]},{value:"NCL",label:"NCL",type:"string",alternativeMatches:["New Caledonia"]},{value:"NZL",label:"NZL",type:"string",alternativeMatches:["New Zealand"]},{value:"NIC",label:"NIC",type:"string",alternativeMatches:["Nicaragua"]},{value:"NER",label:"NER",type:"string",alternativeMatches:["Niger"]},{value:"NGA",label:"NGA",type:"string",alternativeMatches:["Nigeria"]},{value:"NIU",label:"NIU",type:"string",alternativeMatches:["Niue"]},{value:"NFK",label:"NFK",type:"string",alternativeMatches:["Norfolk Island"]},{value:"MNP",label:"MNP",type:"string",alternativeMatches:["Northern Mariana Islands"]},{value:"NOR",label:"NOR",type:"string",alternativeMatches:["Norway"]},{value:"OMN",label:"OMN",type:"string",alternativeMatches:["Oman"]},{value:"PAK",label:"PAK",type:"string",alternativeMatches:["Pakistan"]},{value:"PLW",label:"PLW",type:"string",alternativeMatches:["Palau"]},{value:"PSE",label:"PSE",type:"string",alternativeMatches:["Palestinian Territory, Occupied"]},{value:"PAN",label:"PAN",type:"string",alternativeMatches:["Panama"]},{value:"PNG",label:"PNG",type:"string",alternativeMatches:["Papua New Guinea"]},{value:"PRY",label:"PRY",type:"string",alternativeMatches:["Paraguay"]},{value:"PER",label:"PER",type:"string",alternativeMatches:["Peru"]},{value:"PHL",label:"PHL",type:"string",alternativeMatches:["Philippines"]},{value:"PCN",label:"PCN",type:"string",alternativeMatches:["Pitcairn"]},{value:"POL",label:"POL",type:"string",alternativeMatches:["Poland"]},{value:"PRT",label:"PRT",type:"string",alternativeMatches:["Portugal"]},{value:"PRI",label:"PRI",type:"string",alternativeMatches:["Puerto Rico"]},{value:"QAT",label:"QAT",type:"string",alternativeMatches:["Qatar"]},{value:"REU",label:"REU",type:"string",alternativeMatches:["R\xE9union"]},{value:"ROU",label:"ROU",type:"string",alternativeMatches:["Romania"]},{value:"RUS",label:"RUS",type:"string",alternativeMatches:["Russian Federation"]},{value:"RWA",label:"RWA",type:"string",alternativeMatches:["Rwanda"]},{value:"BLM",label:"BLM",type:"string",alternativeMatches:["Saint Barth\xE9lemy"]},{value:"SHN",label:"SHN",type:"string",alternativeMatches:["Saint Helena, Ascension and Tristan da Cunha"]},{value:"KNA",label:"KNA",type:"string",alternativeMatches:["Saint Kitts and Nevis","Saint Kitts","Nevis"]},{value:"LCA",label:"LCA",type:"string",alternativeMatches:["Saint Lucia"]},{value:"MAF",label:"MAF",type:"string",alternativeMatches:["Saint Martin (French part)"]},{value:"SPM",label:"SPM",type:"string",alternativeMatches:["Saint Pierre and Miquelon","Saint Pierre","Miquelon"]},{value:"VCT",label:"VCT",type:"string",alternativeMatches:["Saint Vincent and the Grenadines","Saint Vincent","Grenadines"]},{value:"WSM",label:"WSM",type:"string",alternativeMatches:["Samoa"]},{value:"SMR",label:"SMR",type:"string",alternativeMatches:["San Marino"]},{value:"STP",label:"STP",type:"string",alternativeMatches:["Sao Tome and Principe","Sao Tome","Principe"]},{value:"SAU",label:"SAU",type:"string",alternativeMatches:["Saudi Arabia"]},{value:"SEN",label:"SEN",type:"string",alternativeMatches:["Senegal"]},{value:"SRB",label:"SRB",type:"string",alternativeMatches:["Serbia"]},{value:"SYC",label:"SYC",type:"string",alternativeMatches:["Seychelles"]},{value:"SLE",label:"SLE",type:"string",alternativeMatches:["Sierra Leone"]},{value:"SGP",label:"SGP",type:"string",alternativeMatches:["Singapore"]},{value:"SXM",label:"SXM",type:"string",alternativeMatches:["Sint Maarten (Dutch part)"]},{value:"SVK",label:"SVK",type:"string",alternativeMatches:["Slovakia"]},{value:"SVN",label:"SVN",type:"string",alternativeMatches:["Slovenia"]},{value:"SLB",label:"SLB",type:"string",alternativeMatches:["Solomon Islands"]},{value:"SOM",label:"SOM",type:"string",alternativeMatches:["Somalia"]},{value:"ZAF",label:"ZAF",type:"string",alternativeMatches:["South Africa"]},{value:"SGS",label:"SGS",type:"string",alternativeMatches:["South Georgia and the South Sandwich Islands","South Georgia","South Sandwich Islands"]},{value:"SSD",label:"SSD",type:"string",alternativeMatches:["South Sudan"]},{value:"ESP",label:"ESP",type:"string",alternativeMatches:["Spain"]},{value:"LKA",label:"LKA",type:"string",alternativeMatches:["Sri Lanka"]},{value:"SDN",label:"SDN",type:"string",alternativeMatches:["Sudan"]},{value:"SUR",label:"SUR",type:"string",alternativeMatches:["Suriname"]},{value:"SJM",label:"SJM",type:"string",alternativeMatches:["Svalbard and Jan Mayen","Svalbard","Jan Mayen"]},{value:"SWZ",label:"SWZ",type:"string",alternativeMatches:["Swaziland","Eswatini"]},{value:"SWE",label:"SWE",type:"string",alternativeMatches:["Sweden"]},{value:"CHE",label:"CHE",type:"string",alternativeMatches:["Switzerland"]},{value:"SYR",label:"SYR",type:"string",alternativeMatches:["Syrian Arab Republic"]},{value:"TWN",label:"TWN",type:"string",alternativeMatches:["Taiwan, Province of China"]},{value:"TJK",label:"TJK",type:"string",alternativeMatches:["Tajikistan"]},{value:"TZA",label:"TZA",type:"string",alternativeMatches:["Tanzania, United Republic of"]},{value:"THA",label:"THA",type:"string",alternativeMatches:["Thailand"]},{value:"TLS",label:"TLS",type:"string",alternativeMatches:["Timor-Leste"]},{value:"TGO",label:"TGO",type:"string",alternativeMatches:["Togo"]},{value:"TKL",label:"TKL",type:"string",alternativeMatches:["Tokelau"]},{value:"TON",label:"TON",type:"string",alternativeMatches:["Tonga"]},{value:"TTO",label:"TTO",type:"string",alternativeMatches:["Trinidad and Tobago","Trinidad","Tobago"]},{value:"TUN",label:"TUN",type:"string",alternativeMatches:["Tunisia"]},{value:"TUR",label:"TUR",type:"string",alternativeMatches:["Turkey"]},{value:"TKM",label:"TKM",type:"string",alternativeMatches:["Turkmenistan"]},{value:"TCA",label:"TCA",type:"string",alternativeMatches:["Turks and Caicos Islands"]},{value:"TUV",label:"TUV",type:"string",alternativeMatches:["Tuvalu"]},{value:"UGA",label:"UGA",type:"string",alternativeMatches:["Uganda"]},{value:"UKR",label:"UKR",type:"string",alternativeMatches:["Ukraine"]},{value:"ARE",label:"ARE",type:"string",alternativeMatches:["United Arab Emirates"]},{value:"GBR",label:"GBR",type:"string",alternativeMatches:["United Kingdom"]},{value:"USA",label:"USA",type:"string",alternativeMatches:["United States"]},{value:"UMI",label:"UMI",type:"string",alternativeMatches:["United States Minor Outlying Islands"]},{value:"URY",label:"URY",type:"string",alternativeMatches:["Uruguay"]},{value:"UZB",label:"UZB",type:"string",alternativeMatches:["Uzbekistan"]},{value:"VUT",label:"VUT",type:"string",alternativeMatches:["Vanuatu"]},{value:"VEN",label:"VEN",type:"string",alternativeMatches:["Venezuela (Bolivarian Republic of)","Venezuela","Bolivarian"]},{value:"VNM",label:"VNM",type:"string",alternativeMatches:["Viet Nam"]},{value:"VGB",label:"VGB",type:"string",alternativeMatches:["Virgin Islands (British)","British"]},{value:"VIR",label:"VIR",type:"string",alternativeMatches:["Virgin Islands (U.S.)"]},{value:"WLF",label:"WLF",type:"string",alternativeMatches:["Wallis and Futuna"]},{value:"ESH",label:"ESH",type:"string",alternativeMatches:["Western Sahara"]},{value:"YEM",label:"YEM",type:"string",alternativeMatches:["Yemen"]},{value:"ZMB",label:"ZMB",type:"string",alternativeMatches:["Zambia"]},{value:"ZWE",label:"ZWE",type:"string",alternativeMatches:["Zimbabwe"]}];export{e as a,a as b,t as c};