@bicharts/shape-core 0.6.47 → 0.6.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{a as Gn,b as Dn}from"./chunk-UQU75XXR.mjs";import{a as Vn,b as I,c as Un,d as k,e as h,f as Wn,g as Q,h as X}from"./chunk-HMLAY26J.mjs";import{a as In,b as Nn,c as An,d as Fn,e as kn}from"./chunk-JNKMTRKG.mjs";import{A as pn,B as gn,C as yn,D as hn,E as Cn,F as bn,G as En,H as Tn,I as Sn,J as Rn,K as xn,L as wn,M as _n,N as Pn,O as vn,P as Ln,Q as Mn,S as On,a as Dt,b as Vt,c as Ut,d as Wt,e as Ht,f as Kt,g as Bt,h as jt,i as Yt,j as Qt,k as Xt,l as Zt,m as Jt,n as en,o as tn,p as nn,q as rn,r as on,s as sn,t as an,u as ln,v as un,w as cn,x as dn,y as mn,z as fn}from"./chunk-FUHYYIXD.mjs";import{a as qt}from"./chunk-U3H6UBOO.mjs";import{a as zt,b as $t}from"./chunk-2LR73DNS.mjs";import{a as le,b as ue,c as At,d as Ft,e as kt,f as Gt}from"./chunk-VIWJJUDA.mjs";import{a as V,f as U,g as O,h as W,i as j,j as xt,k as wt,l as ae,m as v,n as _t,o as Pt,p as vt,q,r as Lt,s as Mt,t as Ot,u as It,v as Y,w as Nt}from"./chunk-TPVDJHU6.mjs";import"./chunk-5MRZID36.mjs";import{a as ut,b as ct,c as dt,d as mt,e as ft,f as pt,g as gt,h as yt,i as ht,j as Ct,k as bt,l as Et,m as Tt,n as St,o as Rt}from"./chunk-GXQQHMEY.mjs";import{A as nt,B as rt,C as ot,D as it,E as st,F as at,G as lt,a as Ne,b as Ae,c as Fe,d as ke,e as Ge,f as K,g as De,h as Ve,i as Ue,j as We,k as qe,l as ze,m as $e,n as He,o as Ke,p as Be,q as je,r as Ye,s as Qe,t as Xe,u as Ze,v as Je,x as B,y as et,z as tt}from"./chunk-4VN252CK.mjs";var Z=2,me=400;function ee(t){return!!U(t)}function F(t){let e=new Set;for(let n of t){if(n==null)continue;let o=V(String(n));if(!W(o)&&!e.has(o)&&(e.add(o),e.size>=me))break}return Array.from(e)}function A(t){let e=F(t);if(e.length===0||te(t)<95)return!1;let n=e.filter(u=>ee(u)&&!v(u)).length,o=e.filter(u=>!ee(u)&&!!v(u)).length;return n>=1&&n>=o}function ce(t,e){if(!v(t))return!1;let n=U(t);return n?e==="world"?!0:ae.has(n):!1}function te(t){let e=F(t);if(e.length===0)return 0;let n=0;for(let o of e)ee(o)&&n++;return Math.round(n/e.length*1e3)/10}function z(t){let e=F(t);if(e.length===0)return 0;let n=0;for(let o of e)v(o)&&n++;return Math.round(n/e.length*1e3)/10}function re(t){let e=new Set;for(let n of t){if(n==null)continue;let o=String(n).trim();if(!W(V(o))&&!e.has(o)&&(e.add(o),e.size>=me))break}return Array.from(e)}function ne(t){let e=re(t);if(e.length===0)return 0;let n=0;for(let o of e)q(o).length>0&&n++;return Math.round(n/e.length*1e3)/10}function de(t,e){return ue(e,le)?!0:re(t).some(n=>/^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/,"")))}function qn(t,e){let n=F(t);if(n.length===0)return 0;let o=0;for(let u of n)Y(u,e)&&o++;return Math.round(o/n.length*1e3)/10}function J(t,e){let n=0;for(let o of F(t))e(o)&&n++;return n}function zn(t,e){let n=0;for(let o of re(t))e(o)&&n++;return n}function $n(t,e,n,o,u){let l=[],a=[],i={},b={},E=new Set(t),C=s=>e.map(c=>c[s]);for(let s of["city","country"]){let c=n?.[s];c&&E.has(c)&&(i[s]=c)}let g=new Set(u??t);for(let s of["lat","lon"]){let c=n?.[s];c&&g.has(c)&&(i[s]=c)}let f=n?.zip;if(f&&E.has(f)){let s=C(f),c=ne(s);c<95?a.push(`zip=${f} (only ${c}% of values read as ZIPs)`):de(s,f)?i.zip=f:a.push(`zip=${f} (all values are 3-4 digits with nothing to say they are postal)`)}let d=n?.state;if(d&&E.has(d)){let s=C(d),c=F(s);c.length>0&&c.every(S=>ce(S,o))?a.push(`state=${d} (every value is "CA", which is both Canada and California)`):A(s)?(a.push(`state=${d} (every value is a country, not a state)`),i.country||(i.country=d)):z(s)<95?a.push(`state=${d} (only ${z(s)}% of values are states/provinces)`):i.state=d}let p=new Set(Object.values(i).filter(Boolean)),y=t.filter(s=>!p.has(s)&&!s.startsWith("__"));if(!i.state){let s=null;for(let c of y){let S=C(c);if(A(S))continue;let P=z(S);if(P<95)continue;let H=J(S,D=>!!v(D)),Ie=J(S,D=>!!v(D)&&!ce(D,o));H<Z&&Ie<1||(!s||P>s.pct)&&(s={name:c,pct:P})}s&&(i.state=s.name,p.add(s.name),l.push(`state=${s.name} (${s.pct}% states/provinces)`))}if(!i.zip)for(let s of y){if(p.has(s))continue;let c=C(s),S=ne(c);if(!(S<95)&&de(c,s)&&!(zn(c,P=>q(P).length>0)<Z)){i.zip=s,p.add(s),l.push(`zip=${s} (${S}% ZIP codes)`);break}}let T=i.country;if(!T||!A(C(T))){let s=null;for(let c of y){if(p.has(c)||!A(C(c)))continue;let S=te(C(c));(!s||S>s.pct)&&(s={name:c,pct:S})}s&&(T&&(a.push(`country=${T} (only ${te(C(T))}% of values are country identifiers; using ${s.name} instead)`),b.country=T),i.country=s.name,p.add(s.name),l.push(`country=${s.name}`))}if(!i.city){let s=null;for(let c of y){if(p.has(c))continue;let S=C(c),P=qn(S,o);P<j||J(S,H=>Y(H,o))<Z||(!s||P>s.pct)&&(s={name:c,pct:P})}s&&(i.city=s.name,l.push(`city=${s.name} (${s.pct}% known cities)`))}let L=i.country?C(i.country):[],R=!!i.country&&A(L),M=R?new Set(L.map(s=>U(s==null?null:String(s))).filter(Boolean)).size:0,x=R&&M>=2,w=!!(i.lat&&i.lon)&&e.some(s=>{let c=+String(s[i.lat]??"").trim(),S=+String(s[i.lon]??"").trim();return isFinite(c)&&isFinite(S)&&c>=-90&&c<=90&&S>=-180&&S<=180&&String(s[i.lat]??"").trim()!==""&&String(s[i.lon]??"").trim()!==""});return i.lat&&i.lon&&!w&&a.push(`lat/lon=${i.lat}/${i.lon} (no row holds a usable coordinate pair)`),i.country&&!x&&!(i.city||i.state||i.zip||w)&&a.push(R?`country=${i.country} (every row resolves to the same country - nothing to place apart)`:`country=${i.country} (values are not country identifiers)`),{bind:!!(i.city||i.state||i.zip||x||w)?i:null,backfilled:l,refused:a,...Object.keys(b).length?{labelFallback:b}:{}}}var r=(t,...e)=>({part:t,langs:Object.freeze(e)}),oe=Object.freeze({jaar:r("year","nl"),kwartaal:r("quarter","nl"),maand:r("month","nl"),dag:r("day","nl","sv","da","nb"),jahr:r("year","de"),quartal:r("quarter","de"),monat:r("month","de"),tag:r("day","de"),ann\u00E9e:r("year","fr"),mois:r("month","fr"),jour:r("day","fr"),trimestre:r("quarter","fr","es","pt","it"),a\u00F1o:r("year","es"),mes:r("month","es"),d\u00EDa:r("day","es"),ano:r("year","pt"),m\u00EAs:r("month","pt"),dia:r("day","pt"),anno:r("year","it"),mese:r("month","it"),giorno:r("day","it"),\u0433\u043E\u0434:r("year","ru"),\u043C\u0435\u0441\u044F\u0446:r("month","ru"),\u0440\u0456\u043A:r("year","uk"),\u043C\u0456\u0441\u044F\u0446\u044C:r("month","uk"),\u043A\u0432\u0430\u0440\u0442\u0430\u043B:r("quarter","ru","uk"),\u0434\u0435\u043D\u044C:r("day","ru","uk"),rok:r("year","pl","cs","sk"),kwarta\u0142:r("quarter","pl"),miesi\u0105c:r("month","pl"),dzie\u0144:r("day","pl"),\u010Dtvrtlet\u00ED:r("quarter","cs"),m\u011Bs\u00EDc:r("month","cs"),den:r("day","cs"),\u0161tvr\u0165rok:r("quarter","sk"),mesiac:r("month","sk"),de\u0148:r("day","sk"),\u00E5r:r("year","sv","da","nb"),kvartal:r("quarter","sv","da","nb"),m\u00E5nad:r("month","sv"),m\u00E5ned:r("month","da","nb"),vuosi:r("year","fi"),vuosinelj\u00E4nnes:r("quarter","fi"),kuukausi:r("month","fi"),p\u00E4iv\u00E4:r("day","fi"),\u00E9v:r("year","hu"),negyed\u00E9v:r("quarter","hu"),h\u00F3nap:r("month","hu"),nap:r("day","hu"),y\u0131l:r("year","tr"),\u00E7eyrek:r("quarter","tr"),ay:r("month","tr"),g\u00FCn:r("day","tr"),\u03AD\u03C4\u03BF\u03C2:r("year","el"),\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF:r("quarter","el"),\u03BC\u03AE\u03BD\u03B1\u03C2:r("month","el"),\u03B7\u03BC\u03AD\u03C1\u03B1:r("day","el"),an:r("year","ro"),trimestru:r("quarter","ro"),lun\u0103:r("month","ro"),zi:r("day","ro"),godina:r("year","hr"),tromjese\u010Dje:r("quarter","hr"),mjesec:r("month","hr"),dan:r("day","hr"),\u5E74:r("year","ja","zh"),\u56DB\u534A\u671F:r("quarter","ja"),\u5B63\u5EA6:r("quarter","zh"),\u6708:r("month","ja","zh"),\u65E5:r("day","ja","zh"),\uC5F0\uB3C4:r("year","ko"),\uBD84\uAE30:r("quarter","ko"),\uC6D4:r("month","ko"),\uC77C:r("day","ko"),tahun:r("year","id"),kuartal:r("quarter","id"),triwulan:r("quarter","id"),bulan:r("month","id"),hari:r("day","id"),n\u0103m:r("year","vi"),qu\u00FD:r("quarter","vi"),th\u00E1ng:r("month","vi"),ng\u00E0y:r("day","vi"),\u0E1B\u0E35:r("year","th"),\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A:r("quarter","th"),\u0E40\u0E14\u0E37\u0E2D\u0E19:r("month","th"),\u0E27\u0E31\u0E19:r("day","th"),\u0627\u0644\u0633\u0646\u0629:r("year","ar"),\u0633\u0646\u0629:r("year","ar"),\u0627\u0644\u0639\u0627\u0645:r("year","ar"),\u0639\u0627\u0645:r("year","ar"),\u0627\u0644\u0631\u0628\u0639:r("quarter","ar"),\u0631\u0628\u0639:r("quarter","ar"),"\u0631\u0628\u0639 \u0627\u0644\u0633\u0646\u0629":r("quarter","ar"),\u0627\u0644\u0634\u0647\u0631:r("month","ar"),\u0634\u0647\u0631:r("month","ar"),\u0627\u0644\u064A\u0648\u0645:r("day","ar"),\u064A\u0648\u0645:r("day","ar"),\u05E9\u05E0\u05D4:r("year","he"),\u05E8\u05D1\u05E2\u05D5\u05DF:r("quarter","he"),\u05D7\u05D5\u05D3\u05E9:r("month","he"),\u05D9\u05D5\u05DD:r("day","he"),\u0935\u0930\u094D\u0937:r("year","hi"),\u0938\u093E\u0932:r("year","hi"),\u0924\u093F\u092E\u093E\u0939\u0940:r("quarter","hi"),\u092E\u0939\u0940\u0928\u093E:r("month","hi"),\u092E\u093E\u0939:r("month","hi"),\u0926\u093F\u0928:r("day","hi"),\u0633\u0627\u0644:r("year","fa"),\u0645\u0627\u0647:r("month","fa"),\u0631\u0648\u0632:r("day","fa")}),Hn=Object.freeze(Array.from(new Set(Object.values(oe).flatMap(t=>t.langs)))),fe=Object.freeze(["fa","ar","he","th"]),pe=1900,ge=2100;function Kn(t,e){let n=[],o=K(e);try{o&&n.push(t.toLocaleLowerCase(o.intl))}catch{}let u=t.toLowerCase();return n.includes(u)||n.push(u),n}function Bn(t,e){let n=String(t??"").trim().normalize("NFC");if(!n)return null;for(let o of Kn(n,e)){let u=oe[o];if(u&&u.langs.includes(e))return u.part}return null}function jn(t,e){return fe.includes(t)?typeof e=="number"&&Number.isFinite(e)&&e>=pe&&e<=ge:!0}function ye(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Yn=/\b(?:columns|cols|column)\b/i;function $(t,e){let n=Math.max(0,e-240),o=t.slice(n,e),u=o.lastIndexOf(";");return u>=0&&(o=o.slice(u+1)),Yn.test(o)}function he(t,e){let n=ye(e),o=new RegExp(String.raw`(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=[^;]*?\.name\s*===?\s*(['"])${n}\2`,"g"),u=new RegExp(String.raw`\.name\s*===?\s*(['"])${n}\1`,"g"),l=0,a;for(;(a=u.exec(t))!==null;)$(t,a.index)&&l++;let i=0;for(;(a=o.exec(t))!==null;){let b=a.index+a[0].lastIndexOf(".name");if(!$(t,b))continue;i++;let E=ye(a[1]);if(!new RegExp(String.raw`\b${E}\s*(?:>=\s*0|>\s*-1|[!=]==?\s*-1)`).test(t))return!1}return i>0&&i===l}var Ce=["__rowIdx__","__geoIso__","__geoLat__","__geoLon__","__geoPrecision__"];function Qn(t,e){if(!t)return[];let n=new Set(e);for(let i of Ce)n.add(i);let o=new Set,u=/\.name\s*===?\s*(['"])([^'"]+)\1/g,l;for(;(l=u.exec(t))!==null;)$(t,l.index)&&o.add(l[2]);if(o.size===0)return[];let a=[];return o.forEach(i=>{n.has(i)||he(t,i)||a.push(i)}),a}function Xn(t,e){if(!t)return[];let n=(t.getColumns()||[]).map(o=>o.name);if(!e||typeof t.aliasesForCode!="function")return n;for(let o of t.aliasesForCode(e))n.push(o.alias);return n}function be(t,e){let n=e?.freemiumMaxShapeColumns;return typeof n!="number"||!isFinite(n)||n<1?null:!isFinite(t)||t<=n?0:Math.round(t-n)}function Zn(t,e,n){let o=be(t,e);if(o===null||o<=0)return null;let u=typeof e?.freemiumColumnCapPivot=="number"?e.freemiumColumnCapPivot:4,l=o>u?e?.freemiumColumnCapMessageMany:e?.freemiumColumnCapMessageFew;if(typeof l!="string"||l.trim().length===0)return null;let a=l.split("{n}").join(String(o)).split("{fields}").join(o===1?"field":"fields"),i=Ee(n);return i.length===0?a:a+" "+i.join(" ")}function Ee(t){if(!t||t.length===0)return[];let e=[],n=new Map,o=new Map;for(let l of t){let a=typeof l?.dateGroupId=="string"?l.dateGroupId.trim():"";if(a!==""&&(n.has(a)||(e.push(a),n.set(a,0)),l.isDatePart===!0&&n.set(a,n.get(a)+1),l.isReassembledDate===!0&&!o.has(a))){let i=typeof l.sourceField=="string"?l.sourceField.trim():"",b=typeof l.name=="string"?l.name.trim():"",E=i!==""?i:b;E!==""&&o.set(a,E)}}let u=[];for(let l of e){let a=o.get(l),i=n.get(l)??0;!a||i===0||u.push(`'${a}' is a date hierarchy and counts as ${i+1} fields - bind the date itself instead of its hierarchy.`)}return u}var m=t=>t==null?"":String(t),N=t=>t===!0,Te=t=>{if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null},Jn=[["city","CityColumn"],["state","StateColumn"],["zip","ZipColumn"],["lat","LatColumn"],["lon","LonColumn"],["country","CountryColumn"]];function Se(t,e){let n={};for(let[o,u]of Jn){let l=m(h(t,e+u));l&&(n[o]=l)}return n}function er(t){return Array.isArray(t)?t.map(e=>({code:m(h(e,"code")),severity:m(h(e,"severity")),text:m(h(e,"text"))})).filter(e=>e.text!==""):[]}function tr(t){let e=b=>h(t,b),n=e("retryAfterSeconds"),o=e("overrideThumbnailUpload"),u=e("forceThumbnailUpload"),l=Se(t,"point"),a=Se(t,"destPoint");Object.keys(a).length&&(l.dest=a);let i=e("retryable");return{errorMessage:m(e("errorMessage")),errorCode:m(e("errorCode")),refusalCode:m(e("refusalCode")),retryable:typeof i=="boolean"?i:null,notices:er(e("notices")),freemiumStatusCode:m(e("freemiumStatusCode")),code:m(e("code")),language:m(e("language")),version:Number(e("version")??0),codeSummary:m(e("codeSummary")),chartName:m(e("chartName")??e("chartType")),finalChartName:m(e("finalChartName")),warningMessage:m(e("warningMessage")),outputHash:m(e("outputHash")),validatorToken:m(e("validatorToken")),editCodeKey:m(e("editCodeKey")),signedLLMRequestID:m(e("signedLLMRequestID")),userReply:m(e("userReply")),userReplyOutcome:m(e("userReplyOutcome")),improvementSuggestion:m(e("improvementSuggestion")),geoColumn:m(e("geoColumn")),geoKind:m(e("geoKind")),geoPointCols:Object.keys(l).length?l:null,creditBalanceBefore:Te(e("creditBalanceBefore")),creditCost:Te(e("creditCost")),isServiceError:N(e("isServiceError")),isRateLimited:N(e("isRateLimited")),isRefusal:N(e("isRefusal")),isVersionNotFound:N(e("isVersionNotFound")),isGenerationCancelled:N(e("isGenerationCancelled")),retryAfterSeconds:typeof n=="number"&&Number.isFinite(n)?n:null,servedCorrelationId:m(e("servedCorrelationId")),...typeof o=="boolean"?{overrideThumbnailUpload:o}:{},...typeof u=="boolean"?{forceThumbnailUpload:u}:{}}}var Re=t=>t==null?void 0:Number(t),G=t=>m(t)||void 0;function nr(t){let e=h(t,"charts"),n=h(t,"refused"),o=Array.isArray(e)?e.map(l=>{let a=b=>h(l,b),i=a("recommended");return{name:m(a("chartTypeName")??a("name")),description:m(a("description")??a("chartDesc")),rank:Re(a("rank")),score:Re(a("score")),renderer:G(a("renderer")),language:G(a("language")),isPreview:N(a("isPreview")),recommended:typeof i=="boolean"?i:void 0,viaProjection:G(a("viaProjection")),viaProjectionKey:G(a("viaProjectionKey")),detailNote:G(a("detailNote"))}}).filter(l=>l.name):null,u=Array.isArray(n)?n.map(l=>({name:m(h(l,"chartTypeName")??h(l,"name")),reason:m(h(l,"reason")),reasonCode:m(h(l,"reasonCode")),isVeto:N(h(l,"isVeto"))})).filter(l=>l.name):[];return{errorMessage:m(h(t,"errorMessage")),errorCode:m(h(t,"errorCode")),charts:o,refused:u,noFitSummary:m(h(t,"noFitSummary"))}}function rr(t){return!t||typeof t!="object"?null:{status:String(h(t,"status")??""),verdictReason:h(t,"verdictReason")??null,instruction:h(t,"instruction")??null,fix:h(t,"fix")??null,errorMessage:h(t,"errorMessage")??null,errorCode:h(t,"errorCode")??null}}var xe=["working","analyze","generate","refine","review"];function or(t,e){let n=String(t??"").trim().toLowerCase();if(xe.includes(n))return n;let o=String(e??"").toLowerCase();return o.includes("analyz")?"analyze":o.includes("generat")?"generate":o.includes("refin")?"refine":o.includes("review")?"review":null}var ir="FREEMIUM_ATTEMPT_SPENT",sr="CLIENT_SECRET_MISMATCH",ar="FREEMIUM_COLUMN_CAP";function lr(t){let e=t?.retryable;return typeof e=="boolean"?e:null}function ur(t){let e=t.linkNonce?(t.linkNonce()??"").trim():null,n=e?{licensee:"",licenseKey:"",secretKey:""}:t.triple();return{request:{licenseKey:n.licenseKey,licensee:n.licensee,secretKey:n.secretKey,freemiumKey:t.freemiumKey?.()??""},linkNonce:e}}function cr(t){let{width:e,height:n}=t.measure();return{request:{height:n,width:e},hints:{viewportWidth:e,viewportHeight:n}}}function dr(t){let e=0;for(let n of t){if(n.isMeasure)continue;let o=n.distinctCount;typeof o=="number"&&o>e&&(e=o)}return e}function we(t){if(t.recoveryFetchByCorrelation)return{version:null,fetchOnly:!0};if(t.recoveryFetchVersion!=null)return{version:t.recoveryFetchVersion,fetchOnly:!0};let e=t.settingVersion??null;if(t.genNew)return{version:e,fetchOnly:void 0};let n=(e??0)>0?e:null,o=(t.codeVersion??0)>0?t.codeVersion:null,u=n??o??e;return{version:u,fetchOnly:u!=null&&u>0?!0:void 0}}function mr(t){let e=t.fetchCorrelationId!=null,o=e||t.recoveryFetchVersion!=null?!1:t.genNew,u=we({genNew:o,recoveryFetchVersion:t.recoveryFetchVersion,recoveryFetchByCorrelation:e,settingVersion:t.settingVersion,codeVersion:t.codeVersion});return{genNew:o,version:u.version,fetchOnly:u.fetchOnly,fetchCorrelationId:t.fetchCorrelationId??void 0}}function fr(t){let e=n=>t.renderers.has(n);return{supportsD3:e("D3"),supportsPlotly:e("PLOTLY"),supportsVega:e("VEGA")}}function pr(t){let e=t.cap!=null&&t.budget>t.cap?t.cap:t.budget;return{triesLeft:t.triesLeft??e,maxTries:e}}function gr(t){return t&&t>0?{leafCardinality:Math.round(t)}:{}}function _e(t,e){return t!=null&&e!=null&&t!==e}function yr(t,e){return t?_e(e.capturedFor,e.now)?{shortlist:void 0,stale:!0}:{shortlist:{...t,ageMs:e.atMs>0?Math.max(0,Math.round(e.nowMs-e.atMs)):void 0},stale:!1}:{shortlist:void 0,stale:!1}}var hr=Object.freeze({integer:"number",decimal:"number",double:"number",datetime:"date",date:"date",boolean:"boolean",string:"text"});function Pe(t){let e=String(t??"").trim().toLowerCase();return hr[e]??e}function ve(t){let e="";for(let n of t)e+=JSON.stringify([String(n.name??""),n.isMeasure?"M":"D",Pe(n.dataType)]);return e}function Cr(t){return B(ve(t))}var br=2,Er=3,Tr=4,Sr=64,Rr=8e3,xr=6e4,wr=Object.freeze({RENDER_START:"render-start",RENDER_OK:"render-ok",RENDER_ERROR:"render-error",VIEW:"view",VIEW_VERDICT:"view-verdict"});function _r(t){return!!t&&!t.includes("|")&&!t.includes(",")}function ie(t,e,n,o){let u=`${t},${e}|${n}`;return o?`${u}|${Math.max(0,Math.round(o.count))}|${o.nonce}`:u}function Pr(t,e){let n=t;if(!n||!n.signer||typeof n.signer.sign!="function")throw new TypeError("createTelemetryClient needs the host's signer");if(!n.transport||typeof n.transport.post!="function")throw new TypeError("createTelemetryClient needs the host's transport");if(!n.clock||typeof n.clock.now!="function")throw new TypeError("createTelemetryClient needs the host's clock");if(!e||typeof e.baseUrl!="string"&&typeof e.baseUrl!="function")throw new TypeError("createTelemetryClient needs the service's base URL");if(typeof e.baseUrl=="string"&&e.baseUrl==="")throw new TypeError("createTelemetryClient needs the service's base URL");if(typeof e.clientVersion!="string"||e.clientVersion==="")throw new TypeError("createTelemetryClient needs the client version");if(typeof e.timeoutMs!="number"||!Number.isFinite(e.timeoutMs)||e.timeoutMs<=0)throw new TypeError("createTelemetryClient needs a positive deadline in milliseconds");let{signer:o,transport:u,clock:l}=n,a=e.apiPath??"/api",i=e.timeoutMs,b=()=>typeof e.baseUrl=="function"?e.baseUrl():e.baseUrl,E=g=>{try{e.onFailure?.(g)}catch{}},C=async(g,f,d,p)=>{let y;try{let T=await u.post(f,d,p,{timeoutMs:i});y=T.status;try{T.body?.cancel().catch(()=>{})}catch{}}catch(T){E({channel:g,stage:"post",status:null,error:T});return}(y<200||y>299)&&E({channel:g,stage:"status",status:y,error:null})};return{async sendClientMessage(g){let f,d,p;try{f=`${b()}${a}/LogClientMsg/?nocache=${l.now()}`,d=I(g),p=k(d,o)}catch(y){E({channel:"client-message",stage:"build",status:null,error:y});return}await C("client-message",f,d,{"Content-Type":"text/plain","X-Signature":p})},async countEvent(g,f,d){let p,y;try{p=`${b()}${a}/eventlog`,y=ie(g,e.clientVersion,f,d)}catch(T){E({channel:"event-count",stage:"build",status:null,error:T});return}await C("event-count",p,y,{"Content-Type":"text/plain"})}}}var Le=2**31-1;function Me(t){return Object.assign(new Error(`The request did not finish within ${t} ms.`),{name:"TimeoutError"})}function vr(t){return typeof t=="number"&&t>0&&t<=Le?null:new RangeError(`fetchTransport cannot keep a deadline of ${String(t)} ms: it must be a number of milliseconds above 0 and at most ${Le} (about 24.8 days), the longest a timer can wait. Nothing was sent.`)}function Lr(t,e={}){if(typeof t!="function")throw new TypeError("fetchTransport needs the host's fetch");let n=t,o=e.credentials??"omit";return{async post(u,l,a,i){let b=i.timeoutMs,E=vr(b);if(E)throw E;let C=new AbortController,g=!1,f=setTimeout(()=>{g=!0,C.abort(Me(b))},b),d=()=>C.abort(i.signal?.reason);i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d,{once:!0}));let p=!1,y=()=>{p||(p=!0,clearTimeout(f),i.signal?.removeEventListener("abort",d))},T=_=>g?Me(b):_,L;try{L=await n(u,{method:"POST",body:l,headers:a,credentials:o,signal:C.signal})}catch(_){throw y(),T(_)}let R=Q(L),M=R.statusText!==void 0?{statusText:R.statusText}:{};if(!R.body)return{status:R.status,...M,contentType:R.contentType,body:null,text:async()=>{try{return await R.text()}catch(_){throw T(_)}finally{y()}}};let x=R.body.getReader(),w=new ReadableStream({async pull(_){try{let s=await x.read();if(s.done){y(),_.close();return}_.enqueue(s.value)}catch(s){y(),_.error(T(s))}},cancel(_){return y(),x.cancel(_)}});return{status:R.status,...M,contentType:R.contentType,body:w,text:()=>new Response(w).text()}}}}var Oe=300,Mr="/LLMChart/",Or="/LLMChart/qualify",Ir="/VisionReview/",Nr="/LLMChart/sample",Ar=t=>!!t&&typeof t=="object"&&t.name==="TimeoutError",se=async t=>JSON.parse(await t.text());function Fr(t){try{t.body?t.body.cancel().catch(()=>{}):t.text().catch(()=>{})}catch{}}function kr(t,e){let n=t;if(!n||!n.signer||typeof n.signer.sign!="function")throw new TypeError("createGenerateClient needs the host's signer");if(!n.transport||typeof n.transport.post!="function")throw new TypeError("createGenerateClient needs the host's transport");if(!n.clock||typeof n.clock.now!="function")throw new TypeError("createGenerateClient needs the host's clock");if(!e||typeof e.baseUrl!="string"&&typeof e.baseUrl!="function")throw new TypeError("createGenerateClient needs the service's base URL");if(typeof e.baseUrl=="string"&&e.baseUrl==="")throw new TypeError("createGenerateClient needs the service's base URL");if(e.apiPath!==void 0&&typeof e.apiPath!="string")throw new TypeError("createGenerateClient's apiPath must be a string");if(e.nocache!==void 0&&e.nocache!==null&&typeof e.nocache!="function")throw new TypeError("createGenerateClient's nocache must be a function");let{signer:o,transport:u,clock:l}=n,a=e.apiPath??"/api",i=()=>typeof e.baseUrl=="function"?e.baseUrl():e.baseUrl,b=g=>e.nocache?e.nocache(g):String(l.now());async function E(g,f,d,p,y){let T=`${i()}${a}${f}?nocache=${b(g)}`,L={"Content-Type":"text/plain","X-Signature":k(d,o)},R=p.signal??void 0,M=(w,_)=>{let s=!!R?.aborted;return{kind:"transport",headersReceived:w,timedOut:!s&&Ar(_),cancelled:s,error:_}},x;try{x=await u.post(T,d,L,R?{timeoutMs:p.timeoutMs,signal:R}:{timeoutMs:p.timeoutMs})}catch(w){return M(!1,w)}if(x.status<200||x.status>299){let w="";if(p.readErrorBody===!1)Fr(x);else try{w=(await x.text()).slice(0,Oe)}catch{}return{kind:"http",status:x.status,statusText:x.statusText??"",bodyStart:w}}try{return{kind:"answer",status:x.status,value:await y(x)}}catch(w){return M(!0,w)}}function C(g,f){if(!f||typeof f.timeoutMs!="number"||!Number.isFinite(f.timeoutMs)||f.timeoutMs<=0)throw new TypeError(`The ${g} call needs a positive deadline in milliseconds`);return f}return{async generate(g,f){let d=C("generate",f),p=d.onStage??void 0;return E("generate",Mr,I(g),d,y=>X(y,p))},async qualify(g,f){let d=C("qualify",f),p=d.route??Or;if(typeof p!="string"||!p.startsWith("/"))throw new TypeError("The qualify route must start with '/'");return E("qualify",p,I(g),d,se)},async review(g,f){let d=C("review",f),p=JSON.stringify(g);if(typeof p!="string")throw new TypeError("The review wire did not serialize to JSON");return E("review",Ir,p,d,se)},async sample(g,f){let d=C("sample",f);return E("sample",Nr,I(g),d,se)}}}export{j as CITY_ROLE_MATCH_PCT,wr as CLIENT_EVENT_KINDS,sr as CLIENT_SECRET_MISMATCH,He as COMPOUND_MIN_STEM,ut as CYCLE_MEMBERS,dt as CYCLE_WORDS,ge as DATE_LEVEL_GREGORIAN_YEAR_MAX,pe as DATE_LEVEL_GREGORIAN_YEAR_MIN,Hn as DATE_LEVEL_LANGUAGES,oe as DATE_LEVEL_NAMES,fe as DATE_LEVEL_NON_GREGORIAN_LANGUAGES,gn as DEFAULT_GAP_FACTOR,nt as DEFAULT_TEMPERATURE,ir as FREEMIUM_ATTEMPT_SPENT,ar as FREEMIUM_COLUMN_CAP,et as GET_RANDOM,Be as GLUED_STEM_MIN,Ye as HANGUL_MIN_STEM,Ce as HOST_SYNTHETIC_COLUMNS,Oe as HTTP_BODY_START_CHARS,un as IDENTIFIER_HEAD_INITIAL,cn as IDENTIFIER_UNFOLDED,ln as IDENTIFIER_WORDS,Kt as INTENSIVE_SUFFIX_TOKENS,Ht as INTENSIVE_WORD_TOKENS,On as IndexedText,yn as MAX_RUN_BOUNDS,yt as PERIOD_CODE_FORMS,gt as PERIOD_CODE_MEMBERS,ht as PERIOD_ORDINALS,Ct as PERIOD_UNFOLDED,jt as POSITIONAL_SUFFIX_TOKENS,Bt as POSITIONAL_WORD_TOKENS,Gn as PREVIEW_OMITTED_FIELDS,xe as PROGRESS_STAGE_IDS,O as ROLE_MATCH_PCT,bn as SERIES_COMPLETENESS_MAX_LISTED,En as SERIES_COMPLETENESS_MIN_FILL,Tn as SERIES_KEY_MAX_DISTINCT,Tr as SEV_ERROR,br as SEV_INFO,Sr as SEV_USER_PRESENTED,Er as SEV_WARNING,B as SIMPLE_STRING_HASH,Je as STR,Xe as SUBSTRING_MIN,Ne as SUPPORTED_LANGUAGES,Ae as SUPPORTED_LANGUAGE_CODES,xr as TELEMETRY_TIMEOUT_DEV_MS,Rr as TELEMETRY_TIMEOUT_MS,Ge as VOCABULARY_LANGUAGE_CODES,ke as VOCABULARY_ONLY_LANGUAGES,ct as YEAR_WORDS,z as admin1MatchPct,rn as allowedAggregations,lr as answerIsRetryable,Gt as buildGeoIsoColumn,Ot as buildGeoPointColumns,mt as calendarWordIn,fr as capabilityFields,Nt as cityMatchPct,It as cityTagsFor,Ln as classifyAdditivity,nn as classifyForAggregation,Mn as classifyNumericValueNature,Pn as classifyTemporal,Zt as codeNeedsLegacyAggNames,mn as codeReadsColumn,fn as codeReadsColumnsByRoleOrPosition,Xt as collapseRepeatedAggPrefix,pn as columnsTheCodeReads,Ut as countryRegion,kr as createGenerateClient,Pr as createTelemetryClient,ur as credentialFields,Bn as dateLevelPart,jn as dateLevelYearAdmits,In as decimalSeparatorOf,on as defaultAggregation,Nn as detectDecimalSeparator,qt as detectFormatSignature,At as detectGeo,Rt as detectOrdinalDomain,_n as detectTextDatePattern,I as encodePayload,Fn as engineTypeForSqlType,Jt as englishImplicitAggNames,ie as eventLogLine,mr as fetchFields,Lr as fetchTransport,Ve as foldName,Zn as freemiumColumnCapRefusal,be as freemiumColumnsOverCap,Ee as freemiumDateHierarchyClauses,je as gluedPrefixStems,Xn as guardColumnNames,Vn as gzipWireText,Qe as hangulWordEndsWith,Qt as hasDefaultAggPrefix,ze as hasUnsegmentedScript,vn as hostAggHint,kn as ingest,sn as isAggregationAllowed,W as isBlankLike,wt as isCityTableLoaded,$ as isColumnContextRef,tt as isDeterministicRefusal,_r as isEventLogCode,Lt as isGeoPointAmbiguity,wn as isIdentifierName,kt as isJoinGeoKind,Wn as isNdjsonContentType,Tt as isOrdinalFriendlyName,Un as keyedSigner,gr as leafCardinalityField,at as localMidnightDateColumns,st as localMidnightToUtcDay,pt as localizedCycleIn,dn as localizedIdentifierWordIn,ft as localizedYearWordIn,A as looksLikeCountryColumn,Ze as matchNameToken,dr as maxNonMeasureCardinality,Cn as measureCadence,xn as measureSeriesCompleteness,k as messageSignature,Qn as missingHardColumnRefs,$t as monthLookupFor,We as nameLetterRuns,tn as nameLooksIntensiveRate,en as nameLooksPositional,he as nameProbeIsGuarded,Ue as nameWords,_t as normalizeCountry,lt as normalizeLocalMidnightDates,zt as normalizeMonthKey,V as normalizePlaceName,vt as normalizeZip5,yr as offeredShortlistFor,rt as parseDateStable,tr as parseGenerateResponse,An as parseNumberText,nr as parseQualifyResponse,rr as parseReviewVerdict,hn as parseTemporalPoint,Dn as payloadPreview,Et as periodCodeSeries,Rn as pickSeriesColumn,or as progressStageOf,X as readGenerateStream,qe as readName,bt as readPeriodCode,h as readWireField,xt as registerCityTable,Vt as registerIso3Regions,v as resolveAdmin1,we as resolveFetchVersion,Mt as resolveGeoPoint,De as resolveLanguage,$n as resolvePointRoles,pr as retryFields,St as safeDistinctValuesToShip,ve as schemaIdentity,Cr as schemaIdentityKey,Pe as schemaTypeFamily,Sn as seriesKeyVerdict,an as shareOfTotalIsHonest,_e as shortlistIsStale,Yt as stripHostAggPrefix,Wt as summarizeCountryRegions,Dt as summarizeGeoExtent,Fe as supportedLanguage,Ft as toGeoIso,$e as unsegmentedRuns,cr as viewportFields,K as vocabularyLanguage,ot as wholeDayFrame,it as wholeDayIso,Q as wireResponseFromFetch,Ke as wordEndsWith,ne as zipMatchPct,q as zipPrefixCandidates,Pt as zipToPrefix3};
2
+ import{a as qn,b as zn}from"./chunk-UQU75XXR.mjs";import{a as $n,b as I,c as Kn,d as k,e as C,f as Hn,g as Q,h as X}from"./chunk-HMLAY26J.mjs";import{a as Gn,b as Dn,c as Vn,d as Un,e as Wn}from"./chunk-QQQBZHY5.mjs";import{A as bn,B as En,C as Tn,D as Sn,E as Rn,F as xn,G as wn,H as _n,I as Pn,J as vn,K as Ln,L as Mn,M as On,N as In,O as Nn,P as An,Q as Fn,S as kn,a as zt,b as $t,c as Kt,d as Ht,e as Qt,f as Xt,g as Zt,h as Jt,i as en,j as tn,k as nn,l as rn,m as on,n as sn,o as an,p as ln,q as un,r as cn,s as dn,t as mn,u as fn,v as pn,w as gn,x as yn,y as hn,z as Cn}from"./chunk-QVV3ACEI.mjs";import{a as Bt}from"./chunk-U3H6UBOO.mjs";import{a as jt,b as Yt}from"./chunk-555PKUBU.mjs";import{a as le,b as ue,c as Vt,d as Ut,e as Wt,f as qt}from"./chunk-KQOVPOVU.mjs";import{a as O,b as V,c as j,d as U,k as W,l as Lt,m as Mt,n as ae,o as v,p as Ot,q as It,r as Nt,s as q,t as At,u as Ft,v as kt,w as Gt,x as Y,y as Dt}from"./chunk-INMDBTAR.mjs";import"./chunk-5MRZID36.mjs";import{a as ct,b as dt,c as mt,d as ft,e as pt,f as gt,g as yt,h as ht,i as Ct,j as bt,k as Et,l as Tt,m as _t,n as Pt,o as vt}from"./chunk-GKXYRUK5.mjs";import{A as rt,B as ot,C as it,D as st,E as at,F as lt,G as ut,a as Ae,b as Fe,c as ke,d as Ge,e as De,f as H,g as Ve,h as Ue,i as We,j as qe,k as ze,l as $e,m as Ke,n as He,o as Be,p as je,q as Ye,r as Qe,s as Xe,t as Ze,u as Je,v as et,x as B,y as tt,z as nt}from"./chunk-4VN252CK.mjs";import{b as St,c as Rt,d as xt,e as wt}from"./chunk-5HI6TVMM.mjs";var Z=2,me=400;function ee(t){return!!W(t)}function F(t){let e=new Set;for(let n of t){if(n==null)continue;let o=U(String(n));if(!V(o)&&!e.has(o)&&(e.add(o),e.size>=me))break}return Array.from(e)}function A(t){let e=F(t);if(e.length===0||te(t)<95)return!1;let n=e.filter(u=>ee(u)&&!v(u)).length,o=e.filter(u=>!ee(u)&&!!v(u)).length;return n>=1&&n>=o}function ce(t,e){if(!v(t))return!1;let n=W(t);return n?e==="world"?!0:ae.has(n):!1}function te(t){let e=F(t);if(e.length===0)return 0;let n=0;for(let o of e)ee(o)&&n++;return Math.round(n/e.length*1e3)/10}function z(t){let e=F(t);if(e.length===0)return 0;let n=0;for(let o of e)v(o)&&n++;return Math.round(n/e.length*1e3)/10}function re(t){let e=new Set;for(let n of t){if(n==null)continue;let o=String(n).trim();if(!V(U(o))&&!e.has(o)&&(e.add(o),e.size>=me))break}return Array.from(e)}function ne(t){let e=re(t);if(e.length===0)return 0;let n=0;for(let o of e)q(o).length>0&&n++;return Math.round(n/e.length*1e3)/10}function de(t,e){return ue(e,le)?!0:re(t).some(n=>/^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/,"")))}function Bn(t,e){let n=F(t);if(n.length===0)return 0;let o=0;for(let u of n)Y(u,e)&&o++;return Math.round(o/n.length*1e3)/10}function J(t,e){let n=0;for(let o of F(t))e(o)&&n++;return n}function jn(t,e){let n=0;for(let o of re(t))e(o)&&n++;return n}function Yn(t,e,n,o,u){let l=[],a=[],i={},b={},E=new Set(t),y=s=>e.map(c=>c[s]);for(let s of["city","country"]){let c=n?.[s];c&&E.has(c)&&(i[s]=c)}let g=new Set(u??t);for(let s of["lat","lon"]){let c=n?.[s];c&&g.has(c)&&(i[s]=c)}let f=n?.zip;if(f&&E.has(f)){let s=y(f),c=ne(s);c<95?a.push(`zip=${f} (only ${c}% of values read as ZIPs)`):de(s,f)?i.zip=f:a.push(`zip=${f} (all values are 3-4 digits with nothing to say they are postal)`)}let d=n?.state;if(d&&E.has(d)){let s=y(d),c=F(s);c.length>0&&c.every(S=>ce(S,o))?a.push(`state=${d} (every value is "CA", which is both Canada and California)`):A(s)?(a.push(`state=${d} (every value is a country, not a state)`),i.country||(i.country=d)):z(s)<95?a.push(`state=${d} (only ${z(s)}% of values are states/provinces)`):i.state=d}let p=new Set(Object.values(i).filter(Boolean)),h=t.filter(s=>!p.has(s)&&!s.startsWith("__"));if(!i.state){let s=null;for(let c of h){let S=y(c);if(A(S))continue;let P=z(S);if(P<95)continue;let K=J(S,D=>!!v(D)),Ne=J(S,D=>!!v(D)&&!ce(D,o));K<Z&&Ne<1||(!s||P>s.pct)&&(s={name:c,pct:P})}s&&(i.state=s.name,p.add(s.name),l.push(`state=${s.name} (${s.pct}% states/provinces)`))}if(!i.zip)for(let s of h){if(p.has(s))continue;let c=y(s),S=ne(c);if(!(S<95)&&de(c,s)&&!(jn(c,P=>q(P).length>0)<Z)){i.zip=s,p.add(s),l.push(`zip=${s} (${S}% ZIP codes)`);break}}let T=i.country;if(!T||!A(y(T))){let s=null;for(let c of h){if(p.has(c)||!A(y(c)))continue;let S=te(y(c));(!s||S>s.pct)&&(s={name:c,pct:S})}s&&(T&&(a.push(`country=${T} (only ${te(y(T))}% of values are country identifiers; using ${s.name} instead)`),b.country=T),i.country=s.name,p.add(s.name),l.push(`country=${s.name}`))}if(!i.city){let s=null;for(let c of h){if(p.has(c))continue;let S=y(c),P=Bn(S,o);P<j||J(S,K=>Y(K,o))<Z||(!s||P>s.pct)&&(s={name:c,pct:P})}s&&(i.city=s.name,l.push(`city=${s.name} (${s.pct}% known cities)`))}let L=i.country?y(i.country):[],R=!!i.country&&A(L),M=R?new Set(L.map(s=>W(s==null?null:String(s))).filter(Boolean)).size:0,x=R&&M>=2,w=!!(i.lat&&i.lon)&&e.some(s=>{let c=+String(s[i.lat]??"").trim(),S=+String(s[i.lon]??"").trim();return isFinite(c)&&isFinite(S)&&c>=-90&&c<=90&&S>=-180&&S<=180&&String(s[i.lat]??"").trim()!==""&&String(s[i.lon]??"").trim()!==""});return i.lat&&i.lon&&!w&&a.push(`lat/lon=${i.lat}/${i.lon} (no row holds a usable coordinate pair)`),i.country&&!x&&!(i.city||i.state||i.zip||w)&&a.push(R?`country=${i.country} (every row resolves to the same country - nothing to place apart)`:`country=${i.country} (values are not country identifiers)`),{bind:!!(i.city||i.state||i.zip||x||w)?i:null,backfilled:l,refused:a,...Object.keys(b).length?{labelFallback:b}:{}}}var r=(t,...e)=>({part:t,langs:Object.freeze(e)}),oe=Object.freeze({jaar:r("year","nl"),kwartaal:r("quarter","nl"),maand:r("month","nl"),dag:r("day","nl","sv","da","nb"),jahr:r("year","de"),quartal:r("quarter","de"),monat:r("month","de"),tag:r("day","de"),ann\u00E9e:r("year","fr"),mois:r("month","fr"),jour:r("day","fr"),trimestre:r("quarter","fr","es","pt","it"),a\u00F1o:r("year","es"),mes:r("month","es"),d\u00EDa:r("day","es"),ano:r("year","pt"),m\u00EAs:r("month","pt"),dia:r("day","pt"),anno:r("year","it"),mese:r("month","it"),giorno:r("day","it"),\u0433\u043E\u0434:r("year","ru"),\u043C\u0435\u0441\u044F\u0446:r("month","ru"),\u0440\u0456\u043A:r("year","uk"),\u043C\u0456\u0441\u044F\u0446\u044C:r("month","uk"),\u043A\u0432\u0430\u0440\u0442\u0430\u043B:r("quarter","ru","uk"),\u0434\u0435\u043D\u044C:r("day","ru","uk"),rok:r("year","pl","cs","sk"),kwarta\u0142:r("quarter","pl"),miesi\u0105c:r("month","pl"),dzie\u0144:r("day","pl"),\u010Dtvrtlet\u00ED:r("quarter","cs"),m\u011Bs\u00EDc:r("month","cs"),den:r("day","cs"),\u0161tvr\u0165rok:r("quarter","sk"),mesiac:r("month","sk"),de\u0148:r("day","sk"),\u00E5r:r("year","sv","da","nb"),kvartal:r("quarter","sv","da","nb"),m\u00E5nad:r("month","sv"),m\u00E5ned:r("month","da","nb"),vuosi:r("year","fi"),vuosinelj\u00E4nnes:r("quarter","fi"),kuukausi:r("month","fi"),p\u00E4iv\u00E4:r("day","fi"),\u00E9v:r("year","hu"),negyed\u00E9v:r("quarter","hu"),h\u00F3nap:r("month","hu"),nap:r("day","hu"),y\u0131l:r("year","tr"),\u00E7eyrek:r("quarter","tr"),ay:r("month","tr"),g\u00FCn:r("day","tr"),\u03AD\u03C4\u03BF\u03C2:r("year","el"),\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF:r("quarter","el"),\u03BC\u03AE\u03BD\u03B1\u03C2:r("month","el"),\u03B7\u03BC\u03AD\u03C1\u03B1:r("day","el"),an:r("year","ro"),trimestru:r("quarter","ro"),lun\u0103:r("month","ro"),zi:r("day","ro"),godina:r("year","hr"),tromjese\u010Dje:r("quarter","hr"),mjesec:r("month","hr"),dan:r("day","hr"),\u5E74:r("year","ja","zh"),\u56DB\u534A\u671F:r("quarter","ja"),\u5B63\u5EA6:r("quarter","zh"),\u6708:r("month","ja","zh"),\u65E5:r("day","ja","zh"),\uC5F0\uB3C4:r("year","ko"),\uBD84\uAE30:r("quarter","ko"),\uC6D4:r("month","ko"),\uC77C:r("day","ko"),tahun:r("year","id"),kuartal:r("quarter","id"),triwulan:r("quarter","id"),bulan:r("month","id"),hari:r("day","id"),n\u0103m:r("year","vi"),qu\u00FD:r("quarter","vi"),th\u00E1ng:r("month","vi"),ng\u00E0y:r("day","vi"),\u0E1B\u0E35:r("year","th"),\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A:r("quarter","th"),\u0E40\u0E14\u0E37\u0E2D\u0E19:r("month","th"),\u0E27\u0E31\u0E19:r("day","th"),\u0627\u0644\u0633\u0646\u0629:r("year","ar"),\u0633\u0646\u0629:r("year","ar"),\u0627\u0644\u0639\u0627\u0645:r("year","ar"),\u0639\u0627\u0645:r("year","ar"),\u0627\u0644\u0631\u0628\u0639:r("quarter","ar"),\u0631\u0628\u0639:r("quarter","ar"),"\u0631\u0628\u0639 \u0627\u0644\u0633\u0646\u0629":r("quarter","ar"),\u0627\u0644\u0634\u0647\u0631:r("month","ar"),\u0634\u0647\u0631:r("month","ar"),\u0627\u0644\u064A\u0648\u0645:r("day","ar"),\u064A\u0648\u0645:r("day","ar"),\u05E9\u05E0\u05D4:r("year","he"),\u05E8\u05D1\u05E2\u05D5\u05DF:r("quarter","he"),\u05D7\u05D5\u05D3\u05E9:r("month","he"),\u05D9\u05D5\u05DD:r("day","he"),\u0935\u0930\u094D\u0937:r("year","hi"),\u0938\u093E\u0932:r("year","hi"),\u0924\u093F\u092E\u093E\u0939\u0940:r("quarter","hi"),\u092E\u0939\u0940\u0928\u093E:r("month","hi"),\u092E\u093E\u0939:r("month","hi"),\u0926\u093F\u0928:r("day","hi"),\u0633\u0627\u0644:r("year","fa"),\u0645\u0627\u0647:r("month","fa"),\u0631\u0648\u0632:r("day","fa")}),Qn=Object.freeze(Array.from(new Set(Object.values(oe).flatMap(t=>t.langs)))),fe=Object.freeze(["fa","ar","he","th"]),pe=1900,ge=2100;function Xn(t,e){let n=[],o=H(e);try{o&&n.push(t.toLocaleLowerCase(o.intl))}catch{}let u=t.toLowerCase();return n.includes(u)||n.push(u),n}function Zn(t,e){let n=String(t??"").trim().normalize("NFC");if(!n)return null;for(let o of Xn(n,e)){let u=oe[o];if(u&&u.langs.includes(e))return u.part}return null}function Jn(t,e){return fe.includes(t)?typeof e=="number"&&Number.isFinite(e)&&e>=pe&&e<=ge:!0}function ye(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var er=/\b(?:columns|cols|column)\b/i;function $(t,e){let n=Math.max(0,e-240),o=t.slice(n,e),u=o.lastIndexOf(";");return u>=0&&(o=o.slice(u+1)),er.test(o)}function he(t,e){return Ce(t,e,n=>new RegExp(String.raw`\b${n}\s*(?:>=\s*0|>\s*-1|[!=]==?\s*-1)`).test(t))}function Ce(t,e,n){let o=ye(e),u=new RegExp(String.raw`(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=[^;]*?\.name\s*===?\s*(['"])${o}\2`,"g"),l=new RegExp(String.raw`\.name\s*===?\s*(['"])${o}\1`,"g"),a=0,i;for(;(i=l.exec(t))!==null;)$(t,i.index)&&a++;let b=0;for(;(i=u.exec(t))!==null;){let E=i.index+i[0].lastIndexOf(".name");if(!$(t,E))continue;b++;let y=ye(i[1]);if(!n(y))return!1}return b>0&&b===a}function tr(t,e){return Ce(t,e,n=>new RegExp(String.raw`\b${n}\s*(?:>=\s*0|>\s*-1|!==?\s*-1)`).test(t)&&!new RegExp(String.raw`\b${n}\s*===?\s*-1`).test(t))}var be=["__rowIdx__","__geoIso__","__geoLat__","__geoLon__","__geoPrecision__"];function nr(t,e){if(!t)return[];let n=new Set(e);for(let i of be)n.add(i);let o=new Set,u=/\.name\s*===?\s*(['"])([^'"]+)\1/g,l;for(;(l=u.exec(t))!==null;)$(t,l.index)&&o.add(l[2]);if(o.size===0)return[];let a=[];return o.forEach(i=>{n.has(i)||he(t,i)||a.push(i)}),a}function rr(t,e){if(!t)return[];let n=(t.getColumns()||[]).map(o=>o.name);if(!e||typeof t.aliasesForCode!="function")return n;for(let o of t.aliasesForCode(e))n.push(o.alias);return n}function Ee(t,e){let n=e?.freemiumMaxShapeColumns;return typeof n!="number"||!isFinite(n)||n<1?null:!isFinite(t)||t<=n?0:Math.round(t-n)}function or(t,e,n){let o=Ee(t,e);if(o===null||o<=0)return null;let u=typeof e?.freemiumColumnCapPivot=="number"?e.freemiumColumnCapPivot:4,l=o>u?e?.freemiumColumnCapMessageMany:e?.freemiumColumnCapMessageFew;if(typeof l!="string"||l.trim().length===0)return null;let a=l.split("{n}").join(String(o)).split("{fields}").join(o===1?"field":"fields"),i=Te(n);return i.length===0?a:a+" "+i.join(" ")}function Te(t){if(!t||t.length===0)return[];let e=[],n=new Map,o=new Map;for(let l of t){let a=typeof l?.dateGroupId=="string"?l.dateGroupId.trim():"";if(a!==""&&(n.has(a)||(e.push(a),n.set(a,0)),l.isDatePart===!0&&n.set(a,n.get(a)+1),l.isReassembledDate===!0&&!o.has(a))){let i=typeof l.sourceField=="string"?l.sourceField.trim():"",b=typeof l.name=="string"?l.name.trim():"",E=i!==""?i:b;E!==""&&o.set(a,E)}}let u=[];for(let l of e){let a=o.get(l),i=n.get(l)??0;!a||i===0||u.push(`'${a}' is a date hierarchy and counts as ${i+1} fields - bind the date itself instead of its hierarchy.`)}return u}var m=t=>t==null?"":String(t),N=t=>t===!0,Se=t=>{if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null},ir=[["city","CityColumn"],["state","StateColumn"],["zip","ZipColumn"],["lat","LatColumn"],["lon","LonColumn"],["country","CountryColumn"]];function Re(t,e){let n={};for(let[o,u]of ir){let l=m(C(t,e+u));l&&(n[o]=l)}return n}function sr(t){return Array.isArray(t)?t.map(e=>({code:m(C(e,"code")),severity:m(C(e,"severity")),text:m(C(e,"text"))})).filter(e=>e.text!==""):[]}function ar(t){let e=b=>C(t,b),n=e("retryAfterSeconds"),o=e("overrideThumbnailUpload"),u=e("forceThumbnailUpload"),l=Re(t,"point"),a=Re(t,"destPoint");Object.keys(a).length&&(l.dest=a);let i=e("retryable");return{errorMessage:m(e("errorMessage")),errorCode:m(e("errorCode")),refusalCode:m(e("refusalCode")),retryable:typeof i=="boolean"?i:null,notices:sr(e("notices")),freemiumStatusCode:m(e("freemiumStatusCode")),code:m(e("code")),language:m(e("language")),version:Number(e("version")??0),codeSummary:m(e("codeSummary")),chartName:m(e("chartName")??e("chartType")),finalChartName:m(e("finalChartName")),warningMessage:m(e("warningMessage")),outputHash:m(e("outputHash")),validatorToken:m(e("validatorToken")),editCodeKey:m(e("editCodeKey")),signedLLMRequestID:m(e("signedLLMRequestID")),userReply:m(e("userReply")),userReplyOutcome:m(e("userReplyOutcome")),improvementSuggestion:m(e("improvementSuggestion")),geoColumn:m(e("geoColumn")),geoKind:m(e("geoKind")),geoPointCols:Object.keys(l).length?l:null,creditBalanceBefore:Se(e("creditBalanceBefore")),creditCost:Se(e("creditCost")),isServiceError:N(e("isServiceError")),isRateLimited:N(e("isRateLimited")),isRefusal:N(e("isRefusal")),isVersionNotFound:N(e("isVersionNotFound")),isGenerationCancelled:N(e("isGenerationCancelled")),retryAfterSeconds:typeof n=="number"&&Number.isFinite(n)?n:null,servedCorrelationId:m(e("servedCorrelationId")),...typeof o=="boolean"?{overrideThumbnailUpload:o}:{},...typeof u=="boolean"?{forceThumbnailUpload:u}:{}}}var xe=t=>t==null?void 0:Number(t),G=t=>m(t)||void 0;function lr(t){let e=C(t,"charts"),n=C(t,"refused"),o=Array.isArray(e)?e.map(l=>{let a=b=>C(l,b),i=a("recommended");return{name:m(a("chartTypeName")??a("name")),description:m(a("description")??a("chartDesc")),rank:xe(a("rank")),score:xe(a("score")),renderer:G(a("renderer")),language:G(a("language")),isPreview:N(a("isPreview")),recommended:typeof i=="boolean"?i:void 0,viaProjection:G(a("viaProjection")),viaProjectionKey:G(a("viaProjectionKey")),detailNote:G(a("detailNote"))}}).filter(l=>l.name):null,u=Array.isArray(n)?n.map(l=>({name:m(C(l,"chartTypeName")??C(l,"name")),reason:m(C(l,"reason")),reasonCode:m(C(l,"reasonCode")),isVeto:N(C(l,"isVeto"))})).filter(l=>l.name):[];return{errorMessage:m(C(t,"errorMessage")),errorCode:m(C(t,"errorCode")),charts:o,refused:u,noFitSummary:m(C(t,"noFitSummary"))}}function ur(t){return!t||typeof t!="object"?null:{status:String(C(t,"status")??""),verdictReason:C(t,"verdictReason")??null,instruction:C(t,"instruction")??null,fix:C(t,"fix")??null,errorMessage:C(t,"errorMessage")??null,errorCode:C(t,"errorCode")??null}}var we=["working","analyze","generate","refine","review"];function cr(t,e){let n=String(t??"").trim().toLowerCase();if(we.includes(n))return n;let o=String(e??"").toLowerCase();return o.includes("analyz")?"analyze":o.includes("generat")?"generate":o.includes("refin")?"refine":o.includes("review")?"review":null}var dr="FREEMIUM_ATTEMPT_SPENT",mr="CLIENT_SECRET_MISMATCH",fr="FREEMIUM_COLUMN_CAP";function pr(t){let e=t?.retryable;return typeof e=="boolean"?e:null}function gr(t){let e=t.linkNonce?(t.linkNonce()??"").trim():null,n=e?{licensee:"",licenseKey:"",secretKey:""}:t.triple();return{request:{licenseKey:n.licenseKey,licensee:n.licensee,secretKey:n.secretKey,freemiumKey:t.freemiumKey?.()??""},linkNonce:e}}function yr(t){let{width:e,height:n}=t.measure();return{request:{height:n,width:e},hints:{viewportWidth:e,viewportHeight:n}}}function hr(t){let e=0;for(let n of t){if(n.isMeasure)continue;let o=n.distinctCount;typeof o=="number"&&o>e&&(e=o)}return e}function _e(t){if(t.recoveryFetchByCorrelation)return{version:null,fetchOnly:!0};if(t.recoveryFetchVersion!=null)return{version:t.recoveryFetchVersion,fetchOnly:!0};let e=t.settingVersion??null;if(t.genNew)return{version:e,fetchOnly:void 0};let n=(e??0)>0?e:null,o=(t.codeVersion??0)>0?t.codeVersion:null,u=n??o??e;return{version:u,fetchOnly:u!=null&&u>0?!0:void 0}}function Cr(t){let e=t.fetchCorrelationId!=null,o=e||t.recoveryFetchVersion!=null?!1:t.genNew,u=_e({genNew:o,recoveryFetchVersion:t.recoveryFetchVersion,recoveryFetchByCorrelation:e,settingVersion:t.settingVersion,codeVersion:t.codeVersion});return{genNew:o,version:u.version,fetchOnly:u.fetchOnly,fetchCorrelationId:t.fetchCorrelationId??void 0}}function br(t){let e=n=>t.renderers.has(n);return{supportsD3:e("D3"),supportsPlotly:e("PLOTLY"),supportsVega:e("VEGA")}}function Er(t){let e=t.cap!=null&&t.budget>t.cap?t.cap:t.budget;return{triesLeft:t.triesLeft??e,maxTries:e}}function Tr(t){return t&&t>0?{leafCardinality:Math.round(t)}:{}}function Pe(t,e){return t!=null&&e!=null&&t!==e}function Sr(t,e){return t?Pe(e.capturedFor,e.now)?{shortlist:void 0,stale:!0}:{shortlist:{...t,ageMs:e.atMs>0?Math.max(0,Math.round(e.nowMs-e.atMs)):void 0},stale:!1}:{shortlist:void 0,stale:!1}}var Rr=Object.freeze({integer:"number",decimal:"number",double:"number",datetime:"date",date:"date",boolean:"boolean",string:"text"});function ve(t){let e=String(t??"").trim().toLowerCase();return Rr[e]??e}function Le(t){let e="";for(let n of t)e+=JSON.stringify([String(n.name??""),n.isMeasure?"M":"D",ve(n.dataType)]);return e}function xr(t){return B(Le(t))}var wr=2,_r=3,Pr=4,vr=64,Lr=8e3,Mr=6e4,Or=Object.freeze({RENDER_START:"render-start",RENDER_OK:"render-ok",RENDER_ERROR:"render-error",VIEW:"view",VIEW_VERDICT:"view-verdict"});function Ir(t){return!!t&&!t.includes("|")&&!t.includes(",")}function ie(t,e,n,o){let u=`${t},${e}|${n}`;return o?`${u}|${Math.max(0,Math.round(o.count))}|${o.nonce}`:u}function Nr(t,e){let n=t;if(!n||!n.signer||typeof n.signer.sign!="function")throw new TypeError("createTelemetryClient needs the host's signer");if(!n.transport||typeof n.transport.post!="function")throw new TypeError("createTelemetryClient needs the host's transport");if(!n.clock||typeof n.clock.now!="function")throw new TypeError("createTelemetryClient needs the host's clock");if(!e||typeof e.baseUrl!="string"&&typeof e.baseUrl!="function")throw new TypeError("createTelemetryClient needs the service's base URL");if(typeof e.baseUrl=="string"&&e.baseUrl==="")throw new TypeError("createTelemetryClient needs the service's base URL");if(typeof e.clientVersion!="string"||e.clientVersion==="")throw new TypeError("createTelemetryClient needs the client version");if(typeof e.timeoutMs!="number"||!Number.isFinite(e.timeoutMs)||e.timeoutMs<=0)throw new TypeError("createTelemetryClient needs a positive deadline in milliseconds");let{signer:o,transport:u,clock:l}=n,a=e.apiPath??"/api",i=e.timeoutMs,b=()=>typeof e.baseUrl=="function"?e.baseUrl():e.baseUrl,E=g=>{try{e.onFailure?.(g)}catch{}},y=async(g,f,d,p)=>{let h;try{let T=await u.post(f,d,p,{timeoutMs:i});h=T.status;try{T.body?.cancel().catch(()=>{})}catch{}}catch(T){E({channel:g,stage:"post",status:null,error:T});return}(h<200||h>299)&&E({channel:g,stage:"status",status:h,error:null})};return{async sendClientMessage(g){let f,d,p;try{f=`${b()}${a}/LogClientMsg/?nocache=${l.now()}`,d=I(g),p=k(d,o)}catch(h){E({channel:"client-message",stage:"build",status:null,error:h});return}await y("client-message",f,d,{"Content-Type":"text/plain","X-Signature":p})},async countEvent(g,f,d){let p,h;try{p=`${b()}${a}/eventlog`,h=ie(g,e.clientVersion,f,d)}catch(T){E({channel:"event-count",stage:"build",status:null,error:T});return}await y("event-count",p,h,{"Content-Type":"text/plain"})}}}var Me=2**31-1;function Oe(t){return Object.assign(new Error(`The request did not finish within ${t} ms.`),{name:"TimeoutError"})}function Ar(t){return typeof t=="number"&&t>0&&t<=Me?null:new RangeError(`fetchTransport cannot keep a deadline of ${String(t)} ms: it must be a number of milliseconds above 0 and at most ${Me} (about 24.8 days), the longest a timer can wait. Nothing was sent.`)}function Fr(t,e={}){if(typeof t!="function")throw new TypeError("fetchTransport needs the host's fetch");let n=t,o=e.credentials??"omit";return{async post(u,l,a,i){let b=i.timeoutMs,E=Ar(b);if(E)throw E;let y=new AbortController,g=!1,f=setTimeout(()=>{g=!0,y.abort(Oe(b))},b),d=()=>y.abort(i.signal?.reason);i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d,{once:!0}));let p=!1,h=()=>{p||(p=!0,clearTimeout(f),i.signal?.removeEventListener("abort",d))},T=_=>g?Oe(b):_,L;try{L=await n(u,{method:"POST",body:l,headers:a,credentials:o,signal:y.signal})}catch(_){throw h(),T(_)}let R=Q(L),M=R.statusText!==void 0?{statusText:R.statusText}:{};if(!R.body)return{status:R.status,...M,contentType:R.contentType,body:null,text:async()=>{try{return await R.text()}catch(_){throw T(_)}finally{h()}}};let x=R.body.getReader(),w=new ReadableStream({async pull(_){try{let s=await x.read();if(s.done){h(),_.close();return}_.enqueue(s.value)}catch(s){h(),_.error(T(s))}},cancel(_){return h(),x.cancel(_)}});return{status:R.status,...M,contentType:R.contentType,body:w,text:()=>new Response(w).text()}}}}var Ie=300,kr="/LLMChart/",Gr="/LLMChart/qualify",Dr="/VisionReview/",Vr="/LLMChart/sample",Ur=t=>!!t&&typeof t=="object"&&t.name==="TimeoutError",se=async t=>JSON.parse(await t.text());function Wr(t){try{t.body?t.body.cancel().catch(()=>{}):t.text().catch(()=>{})}catch{}}function qr(t,e){let n=t;if(!n||!n.signer||typeof n.signer.sign!="function")throw new TypeError("createGenerateClient needs the host's signer");if(!n.transport||typeof n.transport.post!="function")throw new TypeError("createGenerateClient needs the host's transport");if(!n.clock||typeof n.clock.now!="function")throw new TypeError("createGenerateClient needs the host's clock");if(!e||typeof e.baseUrl!="string"&&typeof e.baseUrl!="function")throw new TypeError("createGenerateClient needs the service's base URL");if(typeof e.baseUrl=="string"&&e.baseUrl==="")throw new TypeError("createGenerateClient needs the service's base URL");if(e.apiPath!==void 0&&typeof e.apiPath!="string")throw new TypeError("createGenerateClient's apiPath must be a string");if(e.nocache!==void 0&&e.nocache!==null&&typeof e.nocache!="function")throw new TypeError("createGenerateClient's nocache must be a function");let{signer:o,transport:u,clock:l}=n,a=e.apiPath??"/api",i=()=>typeof e.baseUrl=="function"?e.baseUrl():e.baseUrl,b=g=>e.nocache?e.nocache(g):String(l.now());async function E(g,f,d,p,h){let T=`${i()}${a}${f}?nocache=${b(g)}`,L={"Content-Type":"text/plain","X-Signature":k(d,o)},R=p.signal??void 0,M=(w,_)=>{let s=!!R?.aborted;return{kind:"transport",headersReceived:w,timedOut:!s&&Ur(_),cancelled:s,error:_}},x;try{x=await u.post(T,d,L,R?{timeoutMs:p.timeoutMs,signal:R}:{timeoutMs:p.timeoutMs})}catch(w){return M(!1,w)}if(x.status<200||x.status>299){let w="";if(p.readErrorBody===!1)Wr(x);else try{w=(await x.text()).slice(0,Ie)}catch{}return{kind:"http",status:x.status,statusText:x.statusText??"",bodyStart:w}}try{return{kind:"answer",status:x.status,value:await h(x)}}catch(w){return M(!0,w)}}function y(g,f){if(!f||typeof f.timeoutMs!="number"||!Number.isFinite(f.timeoutMs)||f.timeoutMs<=0)throw new TypeError(`The ${g} call needs a positive deadline in milliseconds`);return f}return{async generate(g,f){let d=y("generate",f),p=d.onStage??void 0;return E("generate",kr,I(g),d,h=>X(h,p))},async qualify(g,f){let d=y("qualify",f),p=d.route??Gr;if(typeof p!="string"||!p.startsWith("/"))throw new TypeError("The qualify route must start with '/'");return E("qualify",p,I(g),d,se)},async review(g,f){let d=y("review",f),p=JSON.stringify(g);if(typeof p!="string")throw new TypeError("The review wire did not serialize to JSON");return E("review",Dr,p,d,se)},async sample(g,f){let d=y("sample",f);return E("sample",Vr,I(g),d,se)}}}export{j as CITY_ROLE_MATCH_PCT,Or as CLIENT_EVENT_KINDS,mr as CLIENT_SECRET_MISMATCH,He as COMPOUND_MIN_STEM,ct as CYCLE_MEMBERS,mt as CYCLE_WORDS,ge as DATE_LEVEL_GREGORIAN_YEAR_MAX,pe as DATE_LEVEL_GREGORIAN_YEAR_MIN,Qn as DATE_LEVEL_LANGUAGES,oe as DATE_LEVEL_NAMES,fe as DATE_LEVEL_NON_GREGORIAN_LANGUAGES,En as DEFAULT_GAP_FACTOR,rt as DEFAULT_TEMPERATURE,dr as FREEMIUM_ATTEMPT_SPENT,fr as FREEMIUM_COLUMN_CAP,tt as GET_RANDOM,je as GLUED_STEM_MIN,Qe as HANGUL_MIN_STEM,be as HOST_SYNTHETIC_COLUMNS,Ie as HTTP_BODY_START_CHARS,pn as IDENTIFIER_HEAD_INITIAL,gn as IDENTIFIER_UNFOLDED,fn as IDENTIFIER_WORDS,Xt as INTENSIVE_SUFFIX_TOKENS,Qt as INTENSIVE_WORD_TOKENS,kn as IndexedText,Rt as LOOSE_KEY_MIN_LENGTH,wt as LooseIndex,Tn as MAX_RUN_BOUNDS,ht as PERIOD_CODE_FORMS,yt as PERIOD_CODE_MEMBERS,Ct as PERIOD_ORDINALS,bt as PERIOD_UNFOLDED,Jt as POSITIONAL_SUFFIX_TOKENS,Zt as POSITIONAL_WORD_TOKENS,qn as PREVIEW_OMITTED_FIELDS,we as PROGRESS_STAGE_IDS,O as ROLE_MATCH_PCT,xn as SERIES_COMPLETENESS_MAX_LISTED,wn as SERIES_COMPLETENESS_MIN_FILL,_n as SERIES_KEY_MAX_DISTINCT,Pr as SEV_ERROR,wr as SEV_INFO,vr as SEV_USER_PRESENTED,_r as SEV_WARNING,B as SIMPLE_STRING_HASH,et as STR,Ze as SUBSTRING_MIN,Ae as SUPPORTED_LANGUAGES,Fe as SUPPORTED_LANGUAGE_CODES,Mr as TELEMETRY_TIMEOUT_DEV_MS,Lr as TELEMETRY_TIMEOUT_MS,De as VOCABULARY_LANGUAGE_CODES,Ge as VOCABULARY_ONLY_LANGUAGES,dt as YEAR_WORDS,z as admin1MatchPct,un as allowedAggregations,pr as answerIsRetryable,qt as buildGeoIsoColumn,kt as buildGeoPointColumns,ft as calendarWordIn,br as capabilityFields,Dt as cityMatchPct,Gt as cityTagsFor,An as classifyAdditivity,ln as classifyForAggregation,Fn as classifyNumericValueNature,In as classifyTemporal,rn as codeNeedsLegacyAggNames,hn as codeReadsColumn,Cn as codeReadsColumnsByRoleOrPosition,nn as collapseRepeatedAggPrefix,bn as columnsTheCodeReads,Kt as countryRegion,qr as createGenerateClient,Nr as createTelemetryClient,gr as credentialFields,Zn as dateLevelPart,Jn as dateLevelYearAdmits,Gn as decimalSeparatorOf,cn as defaultAggregation,Dn as detectDecimalSeparator,Bt as detectFormatSignature,Vt as detectGeo,vt as detectOrdinalDomain,On as detectTextDatePattern,I as encodePayload,Un as engineTypeForSqlType,on as englishImplicitAggNames,ie as eventLogLine,Cr as fetchFields,Fr as fetchTransport,Ue as foldName,or as freemiumColumnCapRefusal,Ee as freemiumColumnsOverCap,Te as freemiumDateHierarchyClauses,Ye as gluedPrefixStems,rr as guardColumnNames,$n as gzipWireText,Xe as hangulWordEndsWith,tn as hasDefaultAggPrefix,$e as hasUnsegmentedScript,Nn as hostAggHint,Wn as ingest,dn as isAggregationAllowed,V as isBlankLike,Mt as isCityTableLoaded,$ as isColumnContextRef,nt as isDeterministicRefusal,Ir as isEventLogCode,At as isGeoPointAmbiguity,Mn as isIdentifierName,Wt as isJoinGeoKind,Hn as isNdjsonContentType,_t as isOrdinalFriendlyName,xt as isUsableLooseKey,Kn as keyedSigner,Tr as leafCardinalityField,lt as localMidnightDateColumns,at as localMidnightToUtcDay,gt as localizedCycleIn,yn as localizedIdentifierWordIn,pt as localizedYearWordIn,A as looksLikeCountryColumn,St as looseNameKey,Je as matchNameToken,hr as maxNonMeasureCardinality,Rn as measureCadence,Ln as measureSeriesCompleteness,k as messageSignature,nr as missingHardColumnRefs,Yt as monthLookupFor,qe as nameLetterRuns,an as nameLooksIntensiveRate,sn as nameLooksPositional,he as nameProbeIsGuarded,tr as nameProbeKeepsDrawing,We as nameWords,Ot as normalizeCountry,ut as normalizeLocalMidnightDates,jt as normalizeMonthKey,U as normalizePlaceName,Nt as normalizeZip5,Sr as offeredShortlistFor,ot as parseDateStable,ar as parseGenerateResponse,Vn as parseNumberText,lr as parseQualifyResponse,ur as parseReviewVerdict,Sn as parseTemporalPoint,zn as payloadPreview,Tt as periodCodeSeries,vn as pickSeriesColumn,cr as progressStageOf,X as readGenerateStream,ze as readName,Et as readPeriodCode,C as readWireField,Lt as registerCityTable,$t as registerIso3Regions,v as resolveAdmin1,_e as resolveFetchVersion,Ft as resolveGeoPoint,Ve as resolveLanguage,Yn as resolvePointRoles,Er as retryFields,Pt as safeDistinctValuesToShip,Le as schemaIdentity,xr as schemaIdentityKey,ve as schemaTypeFamily,Pn as seriesKeyVerdict,mn as shareOfTotalIsHonest,Pe as shortlistIsStale,en as stripHostAggPrefix,Ht as summarizeCountryRegions,zt as summarizeGeoExtent,ke as supportedLanguage,Ut as toGeoIso,Ke as unsegmentedRuns,yr as viewportFields,H as vocabularyLanguage,it as wholeDayFrame,st as wholeDayIso,Q as wireResponseFromFetch,Be as wordEndsWith,ne as zipMatchPct,q as zipPrefixCandidates,It as zipToPrefix3};
@@ -1,2 +1,2 @@
1
1
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{L as a,M as b,N as c,O as d,P as e,Q as f,R as g,S as h}from"./chunk-FUHYYIXD.mjs";import"./chunk-U3H6UBOO.mjs";import"./chunk-2LR73DNS.mjs";import"./chunk-VIWJJUDA.mjs";import"./chunk-TPVDJHU6.mjs";import"./chunk-5MRZID36.mjs";import"./chunk-GXQQHMEY.mjs";import"./chunk-4VN252CK.mjs";export{h as IndexedText,e as classifyAdditivity,f as classifyNumericValueNature,c as classifyTemporal,b as detectTextDatePattern,d as hostAggHint,a as isIdentifierName,g as trimmedCells};
2
+ import{L as a,M as b,N as c,O as d,P as e,Q as f,R as g,S as h}from"./chunk-QVV3ACEI.mjs";import"./chunk-U3H6UBOO.mjs";import"./chunk-555PKUBU.mjs";import"./chunk-KQOVPOVU.mjs";import"./chunk-INMDBTAR.mjs";import"./chunk-5MRZID36.mjs";import"./chunk-GKXYRUK5.mjs";import"./chunk-4VN252CK.mjs";import"./chunk-5HI6TVMM.mjs";export{h as IndexedText,e as classifyAdditivity,f as classifyNumericValueNature,c as classifyTemporal,b as detectTextDatePattern,d as hostAggHint,a as isIdentifierName,g as trimmedCells};
package/dist/ingest.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{d as a,e as b}from"./chunk-JNKMTRKG.mjs";import"./chunk-FUHYYIXD.mjs";import"./chunk-U3H6UBOO.mjs";import"./chunk-2LR73DNS.mjs";import"./chunk-VIWJJUDA.mjs";import"./chunk-TPVDJHU6.mjs";import"./chunk-5MRZID36.mjs";import"./chunk-GXQQHMEY.mjs";import"./chunk-4VN252CK.mjs";export{a as engineTypeForSqlType,b as ingest};
2
+ import{d as a,e as b}from"./chunk-QQQBZHY5.mjs";import"./chunk-QVV3ACEI.mjs";import"./chunk-U3H6UBOO.mjs";import"./chunk-555PKUBU.mjs";import"./chunk-KQOVPOVU.mjs";import"./chunk-INMDBTAR.mjs";import"./chunk-5MRZID36.mjs";import"./chunk-GKXYRUK5.mjs";import"./chunk-4VN252CK.mjs";import"./chunk-5HI6TVMM.mjs";export{a as engineTypeForSqlType,b as ingest};
@@ -1,2 +1,2 @@
1
1
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{a,b}from"./chunk-2LR73DNS.mjs";export{b as monthLookupFor,a as normalizeMonthKey};
2
+ import{a,b}from"./chunk-555PKUBU.mjs";import"./chunk-5HI6TVMM.mjs";export{b as monthLookupFor,a as normalizeMonthKey};
@@ -1,2 +1,2 @@
1
1
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{m as a,n as b,o as c}from"./chunk-GXQQHMEY.mjs";import"./chunk-4VN252CK.mjs";export{c as detectOrdinalDomain,a as isOrdinalFriendlyName,b as safeDistinctValuesToShip};
2
+ import{m as a,n as b,o as c}from"./chunk-GKXYRUK5.mjs";import"./chunk-4VN252CK.mjs";import"./chunk-5HI6TVMM.mjs";export{c as detectOrdinalDomain,a as isOrdinalFriendlyName,b as safeDistinctValuesToShip};
@@ -1,5 +1,6 @@
1
1
  export declare function isColumnContextRef(code: string, nameIdx: number): boolean;
2
2
  export declare function nameProbeIsGuarded(code: string, name: string): boolean;
3
+ export declare function nameProbeKeepsDrawing(code: string, name: string): boolean;
3
4
  export declare const HOST_SYNTHETIC_COLUMNS: readonly string[];
4
5
  export declare function missingHardColumnRefs(code: string, presentNames: Iterable<string>): string[];
5
6
  export declare function guardColumnNames(index: {
@@ -1,17 +1,56 @@
1
+ import { LooseIndex } from "./knownNameKey";
1
2
  export declare function normalizePlaceName(s: string): string;
3
+ /**
4
+ * The LOOSE key of a place name - the shared known-name key (knownNameKey.ts), named here because
5
+ * every place table indexes under it. "New Zealand", "NewZealand" and "new-zealand" are one key;
6
+ * "Trinidad & Tobago" and "Trinidad and Tobago" are one key. Never the first question: see the
7
+ * TWO KEYS note at the top of this file.
8
+ */
9
+ export declare function placeLooseKey(s: string): string;
10
+ /**
11
+ * Is this value a typed BLANK ("N/A", "unknown", "-")? Judged on the EXACT key, and always before
12
+ * a loose lookup: squeezing "N/A" gives "na", which is Namibia.
13
+ */
14
+ export declare function isPlaceBlank(value: string): boolean;
2
15
  export declare const ISO_3166_PAIRS: string;
3
16
  export declare const ISO2_TO_ISO3: Map<string, string>;
4
17
  export declare const ISO2_SET: Set<string>;
5
18
  export declare const ISO3_SET: Set<string>;
6
19
  export declare const SUPPORTED_LANGS: readonly string[];
7
20
  export declare const COUNTRY_ALIAS_OVERLAY: Record<string, string>;
21
+ /**
22
+ * THE FORMS A COUNTRY IS WRITTEN IN THAT NO RUNTIME PROMISES, as a table this package ships.
23
+ *
24
+ * Two families, both common in real data and both missed before this table existed:
25
+ *
26
+ * - "X AND Y". The runtime's English names write these with "&" ("Trinidad & Tobago", "Bosnia &
27
+ * Herzegovina"), so every export that spells out "and" - which is most of them, and the UN's
28
+ * and ISO's own spelling - resolved to nothing. The loose key reads "&" as "and" and would reach
29
+ * most of these through the runtime's names, but WHICH names a runtime carries is its own
30
+ * business: the answer must not depend on it.
31
+ * - The ISO 3166 / UN official forms, which is what a column exported from a reference dataset
32
+ * holds: "Korea, Republic of", "Russian Federation", "Iran (Islamic Republic of)".
33
+ *
34
+ * Applied only where the runtime produced no answer for the same exact key, so it can add
35
+ * spellings and never move one; a test holds every entry to its intended code.
36
+ */
37
+ export declare const COUNTRY_FORMAL_ALIASES: Readonly<Record<string, string>>;
8
38
  export declare function countryNameMap(): Map<string, string>;
39
+ /** The loose country index (see countryNameMap). Exposed for the collision tests. */
40
+ export declare function countryLooseIndex(): LooseIndex<string>;
41
+ /**
42
+ * A country NAME (never a code) to ISO-3: the exact key first, then the loose key, never for a
43
+ * typed blank. Null when it names no country or when its loose key names more than one.
44
+ */
45
+ export declare function countryNameIso3(value: string | null | undefined): string | null;
9
46
  /** ISO-2 -> ISO-3 ("CA" -> "CAN"). Null when the code is not assigned. */
10
47
  export declare function iso2ToIso3(a2: string): string | null;
11
48
  /**
12
49
  * Resolve ANY country identifier to ISO-3: a name in any of the 30 supported
13
- * languages, an ISO-2 code, an ISO-3 code, or an overlay alias ("USA", "UK",
14
- * "Holland"). Null when it is not a country.
50
+ * languages, an ISO-2 code, an ISO-3 code, an overlay alias ("USA", "UK",
51
+ * "Holland") or a formal form ("Korea, Republic of"). Names match on the exact key first
52
+ * and then the loose one ("NewZealand", "Trinidad and Tobago"); codes match as codes only.
53
+ * Null when it is not a country, and when a loose key names more than one.
15
54
  *
16
55
  * This is the WORLD-wide resolver, and it is deliberately NOT the same thing as
17
56
  * geoPoint.normalizeCountry — that one stays narrow (US/CA/MX, 2-letter) because it
@@ -24,6 +24,7 @@ export type { GeoPointPrecision, GeoPointResult, GeoPointColumns, GeoPointAmbigu
24
24
  export { resolvePointRoles, looksLikeCountryColumn, admin1MatchPct, zipMatchPct, } from "./geoPointRoles";
25
25
  export type { PointBind, PointRoleResolution } from "./geoPointRoles";
26
26
  export { monthLookupFor, normalizeMonthKey } from "./monthNames";
27
+ export { looseNameKey, isUsableLooseKey, LOOSE_KEY_MIN_LENGTH, LooseIndex } from "./knownNameKey";
27
28
  export { STR, SIMPLE_STRING_HASH, GET_RANDOM, isDeterministicRefusal, nameWords, DEFAULT_TEMPERATURE } from "./util";
28
29
  export { SUPPORTED_LANGUAGES, SUPPORTED_LANGUAGE_CODES, supportedLanguage, resolveLanguage, VOCABULARY_ONLY_LANGUAGES, VOCABULARY_LANGUAGE_CODES, vocabularyLanguage, } from "./languages";
29
30
  export type { SupportedLanguage, SupportedLanguageCode, LanguageScript, ResolvedLanguage, VocabularyLanguage, VocabularyLanguageCode, VocabularyOnlyLanguageCode, } from "./languages";
@@ -44,7 +45,7 @@ export type { DataSource, IngestOptions, IngestResult, ColumnDescriptor, SqlColu
44
45
  export { payloadPreview, PREVIEW_OMITTED_FIELDS } from "./payloadPreview";
45
46
  export type { PayloadPreviewOptions } from "./payloadPreview";
46
47
  export { codeReadsColumn, codeReadsColumnsByRoleOrPosition, columnsTheCodeReads } from "./codeColumnReads";
47
- export { isColumnContextRef, nameProbeIsGuarded, missingHardColumnRefs, HOST_SYNTHETIC_COLUMNS, guardColumnNames, } from "./columnRefScan";
48
+ export { isColumnContextRef, nameProbeIsGuarded, nameProbeKeepsDrawing, missingHardColumnRefs, HOST_SYNTHETIC_COLUMNS, guardColumnNames, } from "./columnRefScan";
48
49
  export { freemiumColumnsOverCap, freemiumColumnCapRefusal, freemiumDateHierarchyClauses } from "./freemiumCaps";
49
50
  export type { FreemiumColumnCapStatus, FreemiumDateGroupColumn } from "./freemiumCaps";
50
51
  export type { WireSigner, WireTransport, WireResponse, CredentialTriple, CredentialSource, ViewportSource, Clock, DiagnosticEntry, DiagnosticsSink, RendererId, WireServices, } from "./host/services";
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Latin letters whose mark is FUSED into the character, so canonical decomposition cannot split
3
+ * it off: ø, ł, đ, ı, æ, ß, þ, ð have no decomposition at all, and without this they survive into a
4
+ * key and leave "København" unreachable from "Kobenhavn". The multi-letter expansions are the
5
+ * conventional transliterations (ß -> ss is how German writes it without the letter).
6
+ *
7
+ * Schwa has TWO code points in real place data - U+0259 and U+01DD (turned e); Azerbaijani names
8
+ * carry both ("Gəncə" / "Gǝncǝ"). ij, ŀ and ſ decompose only under COMPATIBILITY normalisation, so a
9
+ * canonical (NFD) key needs them here too.
10
+ */
11
+ export declare const LATIN_FOLD: Readonly<Record<string, string>>;
12
+ /** Replace every fused Latin letter with its conventional plain spelling. Expects lower case. */
13
+ export declare function foldLatin(s: string): string;
14
+ /**
15
+ * The LOOSE key of a known name: compatibility-decomposed, marks stripped, lower-cased, fused
16
+ * letters folded, "&" read as "and", and everything that is not a letter or a decimal digit
17
+ * dropped. "Côte d'Ivoire", "Cote dIvoire" and "COTE-D'IVOIRE" are one key; so are "Trinidad &
18
+ * Tobago" and "TrinidadandTobago", "Bar chart" and "bar-chart", "février" and "fevrier".
19
+ *
20
+ * - COMPATIBILITY decomposition (NFKD), not canonical: full-width letters, the ij digraph and the
21
+ * long s are the same letters a reader means.
22
+ * - SUPERSCRIPTS AND FRACTIONS GO FIRST, before decomposition would turn "²" into a digit: a
23
+ * footnote marker riding a name ("Ottawa²") is not part of it.
24
+ * - MARKS are stripped by the Unicode Diacritic property, the same class the place key strips, so
25
+ * for input with no "&" and no compatibility character the loose key is exactly the place key
26
+ * with its spaces removed.
27
+ * - Letters of every script survive, so a Japanese or Arabic name keys as itself.
28
+ *
29
+ * Never throws; a null or non-string input keys as "".
30
+ */
31
+ export declare function looseNameKey(s: string | null | undefined): string;
32
+ /**
33
+ * THE SHORTEST LOOSE KEY A LOOKUP MAY USE. Below it, a key is a CODE, and codes are matched as codes.
34
+ *
35
+ * Squeezing the punctuation out of an abbreviation turns it into somebody else's code: "N/A" becomes
36
+ * "na" (Namibia), "N.C." becomes "nc" (a USPS code the state-NAME table would then claim), "U.K."
37
+ * becomes "uk". Every real name that loosening exists to reach - "NewZealand", "NorthCarolina",
38
+ * "SaoPaulo", "barchart", "fevrier" - is far longer, so the floor costs nothing and closes the
39
+ * class. Month abbreviations never need the loose key: "Sept." is an exact match already.
40
+ */
41
+ export declare const LOOSE_KEY_MIN_LENGTH = 4;
42
+ /** True when a loose key is long enough to be looked up (see LOOSE_KEY_MIN_LENGTH). */
43
+ export declare function isUsableLooseKey(key: string): boolean;
44
+ /**
45
+ * A loose index over a table of known names: loose key -> the one value it names, or AMBIGUOUS.
46
+ *
47
+ * Built from (name, value) pairs; two pairs whose names share a loose key and whose values differ
48
+ * (by `same`) make that key ambiguous, and `get` then answers undefined - a refusal, never a pick.
49
+ * Keys shorter than LOOSE_KEY_MIN_LENGTH are never stored.
50
+ */
51
+ export declare class LooseIndex<V> {
52
+ private readonly same;
53
+ private readonly map;
54
+ constructor(same?: (a: V, b: V) => boolean);
55
+ /** Index `value` under the loose key of `name`. */
56
+ add(name: string, value: V): void;
57
+ /** The value a loose key names, or undefined when it names none or more than one. */
58
+ get(looseKey: string): V | undefined;
59
+ /** True when the key names more than one value. */
60
+ isAmbiguous(looseKey: string): boolean;
61
+ /** Every stored key with its state - for the collision tests, which pin what is ambiguous. */
62
+ entries(): Array<[string, {
63
+ value: V;
64
+ ambiguous: boolean;
65
+ }]>;
66
+ }
@@ -29,7 +29,8 @@ export declare const ROLE_MATCH_PCT = 95;
29
29
  * Is this ALREADY-NORMALIZED token a blank in disguise?
30
30
  *
31
31
  * Callers pass the output of normalizePlaceName, so genuine blanks are "" by then; this
32
- * catches the ones a person typed.
32
+ * catches the ones a person typed. A lookup that goes on to the LOOSE key asks this first, on the
33
+ * exact key, so a blank can never be squeezed into a place.
33
34
  */
34
35
  export declare function isBlankLike(normalized: string): boolean;
35
36
  /**
@@ -170,6 +170,18 @@ export type LLMClientHints = {
170
170
  * before the loader shipped.
171
171
  */
172
172
  supportsMermaid?: boolean;
173
+ /**
174
+ * Does this host picture a chart that mounts SEVERAL svgs by the one it stamps?
175
+ *
176
+ * A chart drawn as an HTML scene - a carousel turning one face to the front, with the faces
177
+ * either side of it peeking in - puts one <svg> per face in the container, and the first in
178
+ * document order is a peek. A host that takes "the first svg" for its thumbnail, its frame
179
+ * grow, its legend pass or its label fit acts on a face the reader can barely see. Declare
180
+ * this only when every one of those reads the stamped svg first (chart-host's chartSvgOf /
181
+ * SNAPSHOT_SVG_ATTR). Absent or false means such a type is not offered - the safe answer, and
182
+ * automatically the answer for every build made before the host learned it.
183
+ */
184
+ supportsHtmlScene?: boolean;
173
185
  favorLimitTo?: string;
174
186
  favorLimitCount?: number;
175
187
  groupToOthersLabel?: string;
@@ -1,5 +1,13 @@
1
- /** Lower-case and strip spaces / dots / bidi marks so "Sept.", "sept" and the
2
- * RTL-wrapped forms some locales emit all compare equal. */
1
+ /** Fold accents and case, and strip spaces / dots / bidi marks, so "Sept.", "sept" and the
2
+ * RTL-wrapped forms some locales emit all compare equal - and so do "février" and "fevrier",
3
+ * "août" and "aout": a month column exported without its accents is still that month.
4
+ *
5
+ * FOLDING IS SAFE HERE BECAUSE IT WAS MEASURED to merge no two months: across the long and short
6
+ * month names of every supported language, no two months share a folded key, and no folded foreign
7
+ * name lands on an English key of another month (a test holds both). It is applied to BOTH sides -
8
+ * the lookup tables are keyed by this function - so every pair that compared equal before still
9
+ * does. (Weekdays are a different story: Slovak "st" and "št" are Wednesday and Thursday, which is
10
+ * why the ordinal detector folds only on a miss of its exact key.) */
3
11
  export declare function normalizeMonthKey(s: string): string;
4
12
  /** Build (and cache) a normalized month-name → index map for a locale tag using
5
13
  * Intl. Returns an empty map for an unknown tag, so callers fall back. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/shape-core",
3
- "version": "0.6.47",
3
+ "version": "0.6.48",
4
4
  "description": "Host-agnostic data-shape profiler: ingest a dataset's rows through IValueCollection.addRow and read back the measured shape as an LLMColumnWithValue[] payload — types, cardinality, temporal/ordinal detection, geographic region and point resolution, cross-column signals. MEASUREMENT only: the policy that decides what a measured shape means for chart selection lives server-side.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,2 +0,0 @@
1
- /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- var s={};function m(r){return r.toLowerCase().replace(/[.‎‏\s]/g,"")}function g(r){let n=r||"en",e=s[n];if(e)return e;let o={};try{let a=new Intl.DateTimeFormat(n,{month:"long"}),i=new Intl.DateTimeFormat(n,{month:"short"});for(let t=0;t<12;++t){let c=new Date(Date.UTC(2020,t,15));o[m(a.format(c))]=t,o[m(i.format(c))]=t}}catch{}return s[n]=o,o}export{m as a,g as b};
@@ -1,2 +0,0 @@
1
- /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{f as p,h as _,i as M,k as x,n as R,o as j,u as S}from"./chunk-4VN252CK.mjs";var Ee=Object.freeze({hour:24,weekday:7,month:12,quarter:4,week:53,season:4}),Q={nl:["jaar"],de:["jahr"],fr:["ann\xE9e"],es:["a\xF1o"],pt:["ano"],it:["anno"],pl:["rok"],cs:["rok"],sk:["rok"],sv:["\xE5r"],da:["\xE5r"],nb:["\xE5r"],fi:["vuosi"],hu:["\xE9v"],tr:["y\u0131l"],ro:["anul"],hr:["godina"],id:["tahun"],vi:["n\u0103m"],ru:["\u0433\u043E\u0434"],uk:["\u0440\u0456\u043A"],el:["\u03AD\u03C4\u03BF\u03C2"],zh:["\u5E74\u4EFD","\u5E74\u5EA6"],ja:["\u5E74\u5EA6"],ko:["\uC5F0\uB3C4","\uB144\uB3C4"],ar:["\u0633\u0646\u0629"],he:["\u05E9\u05E0\u05D4"],hi:["\u0935\u0930\u094D\u0937","\u0938\u093E\u0932"],th:["\u0E1B\u0E35\u0E07\u0E1A\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13"],fa:["\u0633\u0627\u0644"]},D={hour:{de:["stunde"],fr:["heure"],es:["hora"],pt:["hora"],it:["ora"],pl:["godzina"],cs:["hodina"],sk:["hodina"],sv:["timme"],fi:["tunti"],hu:["\xF3ra"],ro:["ora"],vi:["gi\u1EDD"],ru:["\u0447\u0430\u0441"],uk:["\u0433\u043E\u0434\u0438\u043D\u0430"],el:["\u03CE\u03C1\u03B1"],zh:["\u5C0F\u65F6"],ar:["\u0633\u0627\u0639\u0629"],he:["\u05E9\u05E2\u05D4"],hi:["\u0918\u0902\u091F\u093E"],th:["\u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07"],fa:["\u0633\u0627\u0639\u062A"]},weekday:{nl:["weekdag"],de:["wochentag"],sv:["veckodag"],da:["ugedag"],nb:["ukedag"],fi:["viikonp\xE4iv\xE4"],zh:["\u661F\u671F"],ja:["\u66DC\u65E5"],ko:["\uC694\uC77C"]},month:{nl:["maand"],de:["monat"],fr:["mois"],es:["mes"],pt:["m\xEAs"],it:["mese"],pl:["miesi\u0105c"],cs:["m\u011Bs\xEDc"],sk:["mesiac"],sv:["m\xE5nad"],da:["m\xE5ned"],nb:["m\xE5ned"],fi:["kuukausi"],hu:["h\xF3nap"],hr:["mjesec"],id:["bulan"],vi:["th\xE1ng"],ru:["\u043C\u0435\u0441\u044F\u0446"],uk:["\u043C\u0456\u0441\u044F\u0446\u044C"],el:["\u03BC\u03AE\u03BD\u03B1\u03C2"],zh:["\u6708\u4EFD"],ar:["\u0634\u0647\u0631"],he:["\u05D7\u05D5\u05D3\u05E9"],hi:["\u092E\u0939\u0940\u0928\u093E","\u092E\u093E\u0939"],th:["\u0E40\u0E14\u0E37\u0E2D\u0E19"],fa:["\u0645\u0627\u0647"]},quarter:{nl:["kwartaal"],de:["quartal"],fr:["trimestre"],es:["trimestre"],pt:["trimestre"],it:["trimestre"],pl:["kwarta\u0142"],cs:["\u010Dtvrtlet\xED"],sk:["\u0161tvr\u0165rok"],sv:["kvartal"],da:["kvartal"],nb:["kvartal"],fi:["vuosinelj\xE4nnes"],hu:["negyed\xE9v"],tr:["\xE7eyrek"],ro:["trimestru"],hr:["tromjese\u010Dje"],id:["kuartal","triwulan"],vi:["qu\xFD"],ru:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B"],uk:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B"],el:["\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"],zh:["\u5B63\u5EA6"],ja:["\u56DB\u534A\u671F"],ko:["\uBD84\uAE30"],ar:["\u0631\u0628\u0639"],he:["\u05E8\u05D1\u05E2\u05D5\u05DF"],hi:["\u0924\u093F\u092E\u093E\u0939\u0940"],th:["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A"]},week:{de:["woche"],fr:["semaine"],es:["semana"],pt:["semana"],it:["settimana"],pl:["tydzie\u0144"],cs:["t\xFDden"],sk:["t\xFD\u017Ede\u0148"],sv:["vecka"],da:["uge"],nb:["uke"],fi:["viikko"],hu:["h\xE9t"],tr:["hafta"],ro:["s\u0103pt\u0103m\xE2n\u0103"],hr:["tjedan"],id:["minggu"],vi:["tu\u1EA7n"],ru:["\u043D\u0435\u0434\u0435\u043B\u044F"],uk:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C"],el:["\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"],ar:["\u0623\u0633\u0628\u0648\u0639"],he:["\u05E9\u05D1\u05D5\u05E2"],hi:["\u0938\u092A\u094D\u0924\u093E\u0939"],th:["\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C"],fa:["\u0647\u0641\u062A\u0647"]},season:{nl:["seizoen"],de:["jahreszeit"],fr:["saison"],es:["temporada"],it:["stagione"],pl:["sezon"],cs:["sez\xF3na"],sk:["sez\xF3na"],sv:["s\xE4song","\xE5rstid"],da:["s\xE6son","\xE5rstid"],nb:["sesong","\xE5rstid"],fi:["vuodenaika"],hu:["\xE9vszak"],tr:["mevsim"],ro:["anotimp"],vi:["m\xF9a"],ru:["\u0441\u0435\u0437\u043E\u043D"],uk:["\u0441\u0435\u0437\u043E\u043D"],el:["\u03B5\u03C0\u03BF\u03C7\u03AE"],zh:["\u5B63\u8282"],ja:["\u5B63\u7BC0"],ko:["\uACC4\uC808"],ar:["\u0645\u0648\u0633\u0645"],he:["\u05E2\u05D5\u05E0\u05D4"],hi:["\u092E\u094C\u0938\u092E"],th:["\u0E24\u0E14\u0E39"],fa:["\u0641\u0635\u0644"]}},J=["\xE5r","\xE9v","h\xE9t","\xF3ra"];function Z(e,r,t){let n=p(t);if(!n)return null;let o=r.normalize("NFC").toLowerCase(),s=x(e).words;return s.includes(o)?"word":n.compounds&&s.some(i=>j(i,o,R))?"suffix":null}function q(e,r){let t=String(e??"");if(!t.trim())return null;for(let[n,o]of Object.entries(r))for(let s of o){let i=J.includes(s)?Z(t,s,n):S(t,s,n);if(i)return{lang:n,word:s,view:i}}return null}function O(e){return q(e,Q)}function z(e){let r=null;for(let t of Object.keys(D)){let n=q(e,D[t]);if(n){if(r&&r.concept!==t)return null;r={concept:t,hit:n}}}return r}var ee=Object.freeze({quarter:4,half:2,week:53}),h={quarter:{en:{words:["quarter #","qtr #"],codes:["q #"]},nl:{words:["kwartaal #","# kwartaal","#e kwartaal","@ kwartaal"],codes:["k #"]},de:{words:["quartal #","# quartal","@ quartal"]},fr:{words:["trimestre #","# trimestre","#er trimestre","#e trimestre","#eme trimestre","@ trimestre"],codes:["t #","# t","trim. #"]},es:{words:["trimestre #","# trimestre","#er trimestre","#o trimestre","#\xBA trimestre","#\xB0 trimestre","@ trimestre"],codes:["t #","# t","trim. #"]},pt:{words:["trimestre #","# trimestre","#o trimestre","#\xBA trimestre","#\xB0 trimestre","@ trimestre"],codes:["t #","# t","#\xBA t","trim. #"]},it:{words:["trimestre #","# trimestre","#\xBA trimestre","#\xB0 trimestre","% trimestre","@ trimestre"],codes:["t #","trim. #"]},pl:{words:["kwarta\u0142 #","# kwarta\u0142","% kwarta\u0142","@ kwarta\u0142","# kw.","% kw."]},cs:{words:["\u010Dtvrtlet\xED #","# \u010Dtvrtlet\xED","% \u010Dtvrtlet\xED","@ \u010Dtvrtlet\xED"]},sk:{words:["\u0161tvr\u0165rok #","# \u0161tvr\u0165rok","% \u0161tvr\u0165rok","@ \u0161tvr\u0165rok"]},sv:{words:["kvartal #","# kvartalet","#:a kvartalet","#:e kvartalet","@ kvartalet"],codes:["k #"]},da:{words:["kvartal #","# kvartal","@ kvartal"],codes:["k #"]},nb:{words:["kvartal #","# kvartal","@ kvartal"],codes:["k #"]},fi:{words:["nelj\xE4nnes #","# nelj\xE4nnes","# vuosinelj\xE4nnes","vuosinelj\xE4nnes #"]},hu:{words:["negyed\xE9v #","# negyed\xE9v","% negyed\xE9v"]},tr:{words:["\xE7eyrek #","# \xE7eyrek","@ \xE7eyrek"],codes:["\xE7 #"]},ro:{words:["trimestrul #","trimestrul %","trimestru #"],codes:["t #"]},hr:{words:["tromjese\u010Dje #","# tromjese\u010Dje","% tromjese\u010Dje","kvartal #","# kvartal"]},id:{words:["kuartal #","kuartal %","kuartal ke #","triwulan #","triwulan %","triwulan ke #"],codes:["tw #","tw %"]},vi:{words:["qu\xFD #","qu\xFD %"]},ru:{words:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B #","# \u043A\u0432\u0430\u0440\u0442\u0430\u043B","% \u043A\u0432\u0430\u0440\u0442\u0430\u043B","@ \u043A\u0432\u0430\u0440\u0442\u0430\u043B","# \u043A\u0432.","% \u043A\u0432."]},uk:{words:["\u043A\u0432\u0430\u0440\u0442\u0430\u043B #","# \u043A\u0432\u0430\u0440\u0442\u0430\u043B","% \u043A\u0432\u0430\u0440\u0442\u0430\u043B","@ \u043A\u0432\u0430\u0440\u0442\u0430\u043B","# \u043A\u0432.","% \u043A\u0432."]},el:{words:["\u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF #","# \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF","#\u03BF \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF","@ \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"]},zh:{words:["\u7B2C#\u5B63\u5EA6","\u7B2C@\u5B63\u5EA6","@\u5B63\u5EA6","#\u5B63\u5EA6"]},ja:{words:["\u7B2C#\u56DB\u534A\u671F","\u7B2C@\u56DB\u534A\u671F","#\u56DB\u534A\u671F"],codes:["# q"]},ko:{words:["#\uBD84\uAE30","#/4\uBD84\uAE30"]},ar:{words:["\u0627\u0644\u0631\u0628\u0639 #","\u0627\u0644\u0631\u0628\u0639 @","\u0631\u0628\u0639 #"]},he:{words:["\u05E8\u05D1\u05E2\u05D5\u05DF #","\u05E8\u05D1\u05E2\u05D5\u05DF @"]},hi:{words:["\u0924\u093F\u092E\u093E\u0939\u0940 #","# \u0924\u093F\u092E\u093E\u0939\u0940","@ \u0924\u093F\u092E\u093E\u0939\u0940"]},th:{words:["\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A #","\u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A\u0E17\u0E35\u0E48 #"]}},half:{en:{words:["half #"],codes:["h #"]},nl:{words:["halfjaar #","# halfjaar","@ halfjaar"]},de:{words:["halbjahr #","# halbjahr","@ halbjahr"],codes:["hj #"]},fr:{words:["semestre #","# semestre","#er semestre","#e semestre","#eme semestre","@ semestre"],codes:["s #"]},es:{words:["semestre #","# semestre","#er semestre","#o semestre","#\xBA semestre","#\xB0 semestre","@ semestre"],codes:["s #","# s"]},pt:{words:["semestre #","# semestre","#o semestre","#\xBA semestre","#\xB0 semestre","@ semestre"],codes:["s #","# s"]},it:{words:["semestre #","# semestre","#\xBA semestre","#\xB0 semestre","% semestre","@ semestre"],codes:["s #"]},pl:{words:["p\xF3\u0142rocze #","# p\xF3\u0142rocze","% p\xF3\u0142rocze","@ p\xF3\u0142rocze"]},cs:{words:["pololet\xED #","# pololet\xED","% pololet\xED","@ pololet\xED"]},sk:{words:["polrok #","# polrok","% polrok"]},sv:{words:["halv\xE5r #","# halv\xE5ret","@ halv\xE5ret"]},da:{words:["halv\xE5r #","# halv\xE5r","@ halv\xE5r"]},nb:{words:["halv\xE5r #","# halv\xE5r","@ halv\xE5r"]},fi:{words:["vuosipuolisko #","# vuosipuolisko"]},hu:{words:["f\xE9l\xE9v #","# f\xE9l\xE9v","% f\xE9l\xE9v"]},tr:{words:["yar\u0131y\u0131l #","# yar\u0131y\u0131l","@ yar\u0131y\u0131l"]},ro:{words:["semestrul #","semestrul %"],codes:["s #"]},hr:{words:["polugodi\u0161te #","# polugodi\u0161te","% polugodi\u0161te"]},id:{words:["semester #","semester %"]},ru:{words:["\u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435 #","# \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435","% \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435","@ \u043F\u043E\u043B\u0443\u0433\u043E\u0434\u0438\u0435"]},uk:{words:["\u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F #","# \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F","% \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F","@ \u043F\u0456\u0432\u0440\u0456\u0447\u0447\u044F"]},el:{words:["\u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF #","# \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF","#\u03BF \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF","@ \u03B5\u03BE\u03AC\u03BC\u03B7\u03BD\u03BF"]},zh:{words:["\u4E0A\u534A\u5E74=1","\u4E0B\u534A\u5E74=2"]},ja:{words:["\u4E0A\u671F=1","\u4E0B\u671F=2","\u4E0A\u534A\u671F=1","\u4E0B\u534A\u671F=2"]},ko:{words:["\uC0C1\uBC18\uAE30=1","\uD558\uBC18\uAE30=2"]},ar:{words:["\u0627\u0644\u0646\u0635\u0641 @"]},he:{words:["\u05D7\u05E6\u05D9\u05D5\u05DF #"]},hi:{words:["\u091B\u092E\u093E\u0939\u0940 #","@ \u091B\u092E\u093E\u0939\u0940"]},th:{words:["\u0E04\u0E23\u0E36\u0E48\u0E07\u0E1B\u0E35\u0E41\u0E23\u0E01=1","\u0E04\u0E23\u0E36\u0E48\u0E07\u0E1B\u0E35\u0E2B\u0E25\u0E31\u0E07=2"]}},week:{en:{words:["week #","wk #"],codes:["w #"]},de:{words:["woche #","# woche","kw #"]},fr:{words:["semaine #","sem. #"],codes:["s #"]},es:{words:["semana #","sem. #"],codes:["s #"]},pt:{words:["semana #","sem. #"],codes:["s #"]},it:{words:["settimana #","sett. #"]},pl:{words:["tydzie\u0144 #","# tydzie\u0144","tydz. #"]},cs:{words:["t\xFDden #","# t\xFDden"]},sk:{words:["t\xFD\u017Ede\u0148 #","# t\xFD\u017Ede\u0148"]},sv:{words:["vecka #"],codes:["v #"]},da:{words:["uge #"]},nb:{words:["uke #"]},fi:{words:["viikko #","vko #","vk #"]},hu:{words:["h\xE9t #","# h\xE9t"]},tr:{words:["hafta #","# hafta"]},ro:{words:["s\u0103pt\u0103m\xE2na #"]},hr:{words:["tjedan #","# tjedan"]},id:{words:["minggu #","minggu ke #"]},vi:{words:["tu\u1EA7n #"]},ru:{words:["\u043D\u0435\u0434\u0435\u043B\u044F #","# \u043D\u0435\u0434\u0435\u043B\u044F","\u043D\u0435\u0434. #"]},uk:{words:["\u0442\u0438\u0436\u0434\u0435\u043D\u044C #","# \u0442\u0438\u0436\u0434\u0435\u043D\u044C","\u0442\u0438\u0436. #"]},el:{words:["\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1 #","# \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1"]},zh:{words:["\u7B2C#\u5468"]},ja:{words:["\u7B2C#\u9031"]},ko:{words:["#\uC8FC","#\uC8FC\uCC28"]},ar:{words:["\u0627\u0644\u0623\u0633\u0628\u0648\u0639 #","\u0623\u0633\u0628\u0648\u0639 #"]},he:{words:["\u05E9\u05D1\u05D5\u05E2 #"]},hi:{words:["\u0938\u092A\u094D\u0924\u093E\u0939 #"]},th:{words:["\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C #","\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C\u0E17\u0E35\u0E48 #"]}}},V={nl:[["eerste"],["tweede"],["derde"],["vierde"]],de:[["erstes","erste"],["zweites","zweite"],["drittes","dritte"],["viertes","vierte"]],fr:[["premier"],["deuxi\xE8me","second"],["troisi\xE8me"],["quatri\xE8me"]],es:[["primer","primero"],["segundo"],["tercer","tercero"],["cuarto"]],pt:[["primeiro"],["segundo"],["terceiro"],["quarto"]],it:[["primo"],["secondo"],["terzo"],["quarto"]],pl:[["pierwszy","pierwsze"],["drugi","drugie"],["trzeci","trzecie"],["czwarty","czwarte"]],cs:[["prvn\xED"],["druh\xE9","druh\xFD"],["t\u0159et\xED"],["\u010Dtvrt\xE9","\u010Dtvrt\xFD"]],sk:[["prv\xFD"],["druh\xFD"],["tret\xED"],["\u0161tvrt\xFD"]],sv:[["f\xF6rsta"],["andra"],["tredje"],["fj\xE4rde"]],da:[["f\xF8rste"],["andet","anden"],["tredje"],["fjerde"]],nb:[["f\xF8rste"],["andre"],["tredje"],["fjerde"]],tr:[["birinci","ilk"],["ikinci"],["\xFC\xE7\xFCnc\xFC"],["d\xF6rd\xFCnc\xFC"]],ru:[["\u043F\u0435\u0440\u0432\u044B\u0439","\u043F\u0435\u0440\u0432\u043E\u0435"],["\u0432\u0442\u043E\u0440\u043E\u0439","\u0432\u0442\u043E\u0440\u043E\u0435"],["\u0442\u0440\u0435\u0442\u0438\u0439","\u0442\u0440\u0435\u0442\u044C\u0435"],["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044B\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435"]],uk:[["\u043F\u0435\u0440\u0448\u0438\u0439","\u043F\u0435\u0440\u0448\u0435"],["\u0434\u0440\u0443\u0433\u0438\u0439","\u0434\u0440\u0443\u0433\u0435"],["\u0442\u0440\u0435\u0442\u0456\u0439","\u0442\u0440\u0435\u0442\u0454"],["\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0438\u0439","\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u0435"]],el:[["\u03C0\u03C1\u03CE\u03C4\u03BF"],["\u03B4\u03B5\u03CD\u03C4\u03B5\u03C1\u03BF"],["\u03C4\u03C1\u03AF\u03C4\u03BF"],["\u03C4\u03AD\u03C4\u03B1\u03C1\u03C4\u03BF"]],zh:[["\u4E00"],["\u4E8C"],["\u4E09"],["\u56DB"]],ja:[["\u4E00"],["\u4E8C"],["\u4E09"],["\u56DB"]],ar:[["\u0627\u0644\u0623\u0648\u0644"],["\u0627\u0644\u062B\u0627\u0646\u064A"],["\u0627\u0644\u062B\u0627\u0644\u062B"],["\u0627\u0644\u0631\u0627\u0628\u0639"]],he:[["\u05E8\u05D0\u05E9\u05D5\u05DF"],["\u05E9\u05E0\u05D9"],["\u05E9\u05DC\u05D9\u05E9\u05D9"],["\u05E8\u05D1\u05D9\u05E2\u05D9"]],hi:[["\u092A\u0939\u0932\u0940","\u092A\u0939\u0932\u093E"],["\u0926\u0942\u0938\u0930\u0940","\u0926\u0942\u0938\u0930\u093E"],["\u0924\u0940\u0938\u0930\u0940","\u0924\u0940\u0938\u0930\u093E"],["\u091A\u094C\u0925\u0940","\u091A\u094C\u0925\u093E"]]},re=["\xE7 #"],ne=String.raw`[\s\-_./]*`,te={i:1,ii:2,iii:3,iv:4};function g(e,r){let t=String(e??"").normalize("NFC").toLowerCase();return r||(t=_(t)),t.replace(/[\s_]+/g," ").trim().replace(/\.+$/,"").trim()}function N(e){return/[.*+?^${}()|[\]\\]/.test(e)?"\\"+e:e}function E(e,r,t,n){let s=!!p(r)?.foldSensitive||re.includes(e),i=e,a=null,l=/=(\d+)$/.exec(i);l&&(a=Number(l[1]),i=i.slice(0,l.index));let u=(V[r]??[]).map(m=>m.map(w=>g(w,s))),c=a!==null?{kind:"fixed",n:a}:{kind:"digits"},d="";for(let m of g(i,s))if(m==="#")d+="([0-9]{1,2})",c={kind:"digits"};else if(m==="%")d+="(iv|iii|ii|i)",c={kind:"roman"};else if(m==="@"){let w=u.flat().sort((k,B)=>B.length-k.length).map(k=>[...k].map(N).join(""));d+="("+w.join("|")+")",c={kind:"ordinal",words:u}}else m===" "?d+=ne:m==="."?d+="\\.?":d+=N(m);return{lang:r,grain:t,form:n,unfold:s,re:new RegExp("^"+d+"$","u"),number:c}}var b=null;function oe(){if(b)return b;let e=[];for(let r of Object.keys(h))for(let[t,n]of Object.entries(h[r])){for(let o of n.words??[])e.push(E(o,t,r,"word"));for(let o of n.codes??[])e.push(E(o,t,r,"code"))}return b=e,e}var L=/^[0-9]+$/,I=/^[0-9]/,P=/[0-9]$/,se=/^[\s\-_./,']*/,ae=/[\s\-_./,']*$/,ie=/^(年|년)/u;function A(e){if(e.length===4){let r=Number(e);return r>=1900&&r<=2099?r:null}return 2e3+Number(e)}function T(e){let r=[{body:e,year:null,yearDigits:0}];for(let t of[4,2]){if(e.length<=t)continue;let n=e.slice(0,t);if(L.test(n)&&!I.test(e.slice(t))){let i=e.slice(t),a=ie.exec(i),l=a?i.slice(a[0].length):i,u=se.exec(l)[0],c=l.slice(u.length),d=A(n);c&&d!==null&&(a||u||!I.test(c))&&r.push({body:c,year:d,yearDigits:t})}let o=e.slice(e.length-t),s=e.slice(0,e.length-t);if(L.test(o)&&!P.test(s)){let i=ae.exec(s)[0],a=s.slice(0,s.length-i.length),l=A(o);a&&l!==null&&(i||!P.test(a))&&r.push({body:a,year:l,yearDigits:t})}}return r}var y=null;function le(){if(y)return y;let e=new Set;for(let[r,t]of Object.entries(V)){let n=!!p(r)?.foldSensitive;for(let o of t)for(let s of o)e.add(g(s,!1)),n&&e.add(g(s,!0))}for(let r of Object.keys(h))for(let t of Object.values(h[r]))for(let n of t?.words??[]){let o=/=[0-9]+$/.exec(n);o&&e.add(g(n.slice(0,o.index),!1))}return y=[...e],y}var de=/[0-9]/,ce=/(^|[^\p{L}])(iv|iii|ii|i)([^\p{L}]|$)/u;function F(e){return de.test(e)||ce.test(e)?!0:le().some(r=>e.includes(r))}function ue(e,r){switch(e.number.kind){case"fixed":return e.number.n;case"digits":return r[1]===void 0?null:Number(r[1]);case"roman":return r[1]===void 0?null:te[r[1]]??null;case"ordinal":{let t=r[1],n=e.number.words.findIndex(o=>o.includes(t));return n<0?null:n+1}}}function me(e){let r=String(e??"");if(!r.trim()||r.length>40)return[];let t=g(r,!1),n=g(r,!0);if(!F(t)&&!F(n))return[];let o=T(t),s=T(n),i=[],a=new Set;for(let l of oe()){let u=l.lang+"|"+l.grain;if(!a.has(u))for(let c of l.unfold?s:o){let d=l.re.exec(c.body);if(!d)continue;let m=ue(l,d);if(!(m===null||m<1||m>ee[l.grain])){i.push({lang:l.lang,grain:l.grain,n:m,year:c.year,yearDigits:c.yearDigits,form:l.form}),a.add(u);break}}}return i}function G(e,r=()=>!0){if(e.length===0)return null;let t=e.map(n=>me(n).filter(r));if(t.some(n=>n.length===0))return null;for(let n of Object.keys(h))for(let o of Object.keys(h[n])){let s=[],i=0;for(let a of t){let l=a.find(d=>d.grain===n&&d.lang===o),c=a.find(d=>d.grain===n&&d.lang==="en")??l;if(!c)break;c.lang===o&&i++,s.push(c)}if(s.length===e.length&&(o==="en"||i>0))return{lang:o,grain:n,readings:s}}return null}var H=[{name:"likert7_agreement",minMatches:5,canonical:["strongly disagree","disagree","slightly disagree","neutral","slightly agree","agree","strongly agree"]},{name:"likert5_agreement",minMatches:3,canonical:["strongly disagree","disagree","neutral","agree","strongly agree"]},{name:"likert3_agreement",minMatches:2,canonical:["disagree","neutral","agree"]},{name:"likert5_satisfaction",minMatches:3,canonical:["very dissatisfied","dissatisfied","neutral","satisfied","very satisfied"]},{name:"likert3_satisfaction",minMatches:2,canonical:["dissatisfied","neutral","satisfied"]},{name:"likert5_quality",minMatches:3,canonical:["poor","fair","good","very good","excellent"]},{name:"likert3_quality",minMatches:2,canonical:["poor","fair","good"]},{name:"frequency5",minMatches:3,canonical:["never","rarely","sometimes","often","always"]},{name:"intensity5",minMatches:3,canonical:["not at all","slightly","moderately","very","extremely"]},{name:"importance5",minMatches:3,canonical:["not important","slightly important","moderately important","very important","extremely important"]},{name:"severity_low_critical",minMatches:3,canonical:["low","medium","high","critical"]},{name:"severity_low_urgent",minMatches:3,canonical:["low","medium","high","urgent"]},{name:"severity_none_critical",minMatches:3,canonical:["none","mild","moderate","severe","critical"]},{name:"priority_p4_p1",minMatches:3,canonical:["p4","p3","p2","p1","p0"]},{name:"severity_trivial_blocker",minMatches:3,canonical:["trivial","minor","major","critical","blocker"]},{name:"severity_minor_severe",minMatches:3,canonical:["minor","moderate","major","severe"]},{name:"magnitude5_medium",minMatches:3,canonical:["very low","low","medium","high","very high"]},{name:"magnitude5_moderate",minMatches:3,canonical:["very low","low","moderate","high","very high"]},{name:"speed5",minMatches:3,canonical:["very slow","slow","moderate","fast","very fast"]},{name:"temperature6",minMatches:3,canonical:["freezing","cold","cool","mild","warm","hot"]},{name:"experience6",minMatches:3,canonical:["novice","beginner","intermediate","advanced","expert","master"]},{name:"tier_metal",minMatches:3,canonical:["bronze","silver","gold","platinum","diamond"]},{name:"tshirt_letter_sizes",minMatches:4,canonical:["xxs","xs","s","m","l","xl","xxl","xxxl"]},{name:"tshirt_word_sizes",minMatches:3,canonical:["extra small","small","medium","large","extra large"]},{name:"nps_bands",minMatches:2,canonical:["detractor","passive","promoter"]},{name:"likelihood5",minMatches:3,canonical:["very unlikely","unlikely","neutral","likely","very likely"]},{name:"education",minMatches:3,canonical:["none","primary","secondary","bachelors","masters","doctoral"]},{name:"grades_a_to_f",minMatches:3,canonical:["a","b","c","d","f"]},{name:"grades_a_to_f_plusminus",minMatches:4,canonical:["a+","a","a-","b+","b","b-","c+","c","c-","d+","d","d-","f"]}],fe={seldom:"rarely",infrequently:"rarely","hardly ever":"rarely",occasionally:"sometimes",periodically:"sometimes","now and then":"sometimes",frequently:"often",frequent:"often",regularly:"often",commonly:"often",usually:"often",constantly:"always","every time":"always","all the time":"always",consistently:"always",continually:"always",bad:"poor",weak:"poor",subpar:"poor",mediocre:"fair",passable:"fair","so so":"fair",decent:"good",solid:"good",outstanding:"excellent",superb:"excellent",exceptional:"excellent",stellar:"excellent",unsatisfied:"dissatisfied",unhappy:"dissatisfied",displeased:"dissatisfied",happy:"satisfied",content:"satisfied",pleased:"satisfied",delighted:"very satisfied","highly satisfied":"very satisfied","extremely satisfied":"very satisfied","highly dissatisfied":"very dissatisfied","extremely dissatisfied":"very dissatisfied",neither:"neutral",undecided:"neutral","no opinion":"neutral","neither agree nor disagree":"neutral","completely agree":"strongly agree","totally agree":"strongly agree","completely disagree":"strongly disagree","totally disagree":"strongly disagree","highly unlikely":"very unlikely","extremely unlikely":"very unlikely","highly likely":"very likely","extremely likely":"very likely","almost certain":"very likely",bachelor:"bachelors","bachelor's":"bachelors",undergraduate:"bachelors","bachelor degree":"bachelors","master's":"masters",graduate:"masters","master degree":"masters",doctorate:"doctoral",phd:"doctoral"},ge=(()=>{let e=new Set;for(let r of H)for(let t of r.canonical)e.add(f(t));return e})(),he=(()=>{let e=new Map;for(let[r,t]of Object.entries(fe)){let n=f(r);ge.has(n)||e.has(n)||e.set(n,f(t))}return e})();function W(e){return he.get(e)??e}var pe=new Set(["hour","hr","day","dow","dom","weekday","week","wk","woy","month","mth","quarter","qtr","year","yr","semester","trimester","decade","period","fiscal","fy","rank","level","lvl","tier","grade","band","decile","percentile","quartile","quintile","score","rating","stars","step","stage","phase","round","wave","episode","chapter","age","cohort","generation","seniority","position","sequence","seq","priority"]);function Ge(e){if(!e)return!1;for(let r of M(e))if(pe.has(r))return!0;return z(e)!==null||O(e)!==null}function f(e){return e.toLowerCase().replace(/[-_]+/g," ").replace(/\s+/g," ").trim()}function v(e){let r=new Map;for(let[t,n]of e)for(let o of t)r.set(f(o),n);return r}var C=[{name:"weekday_mon_sun",minMatches:4,dict:v([[["monday","mon"],0],[["tuesday","tue","tues"],1],[["wednesday","wed","weds"],2],[["thursday","thu","thur","thurs","thr"],3],[["friday","fri"],4],[["saturday","sat"],5],[["sunday","sun"],6]])},{name:"month_jan_dec",minMatches:4,dict:v([[["january","jan"],0],[["february","feb"],1],[["march","mar"],2],[["april","apr"],3],[["may"],4],[["june","jun"],5],[["july","jul"],6],[["august","aug"],7],[["september","sep","sept"],8],[["october","oct"],9],[["november","nov"],10],[["december","dec"],11]])},{name:"quarter_q1_q4",minMatches:3,dict:v([[["q1","qtr 1","qtr1","quarter 1","q 1"],0],[["q2","qtr 2","qtr2","quarter 2","q 2"],1],[["q3","qtr 3","qtr3","quarter 3","q 3"],2],[["q4","qtr 4","qtr4","quarter 4","q 4"],3]])}],U={};function ye(e){let r=e||"";if(!r)return{weekday:new Map,month:new Map};let t=U[r];if(t)return t;let n=new Map,o=new Map,s=(a,l,u)=>{let c=f(l);c&&a.set(c,u);let d=f(l.replace(/\./g,""));d&&d!==c&&a.set(d,u)};try{let a=new Intl.DateTimeFormat(r,{weekday:"long"}),l=new Intl.DateTimeFormat(r,{weekday:"short"});for(let d=0;d<7;++d){let m=new Date(Date.UTC(2024,0,1+d));s(n,a.format(m),d),s(n,l.format(m),d)}let u=new Intl.DateTimeFormat(r,{month:"long"}),c=new Intl.DateTimeFormat(r,{month:"short"});for(let d=0;d<12;++d){let m=new Date(Date.UTC(2020,d,15));s(o,u.format(m),d),s(o,c.format(m),d)}}catch{}let i={weekday:n,month:o};return U[r]=i,i}function Y(e,r){if(r.size===0)return e;let t=new Map(e);for(let[n,o]of r)t.has(n)||t.set(n,o);return t}function we(e,r){let t=ye(r);for(let n of C){let o=n.name==="weekday_mon_sun"?Y(n.dict,t.weekday):n.name==="month_jan_dec"?Y(n.dict,t.month):n.dict,s=!0,i=new Map;for(let[l,u]of e){let c=o.get(l);if(c===void 0){s=!1;break}i.has(c)||i.set(c,u)}if(!s||i.size<n.minMatches)continue;let a=[...i.entries()].sort((l,u)=>l[0]-u[0]).map(l=>l[1]);return{pattern:n.name,orderedDomain:a}}return ke(e)}var $=C.find(e=>e.name==="quarter_q1_q4");function ke(e){let r=[...e.values()],t=G(r,s=>s.grain==="quarter"&&s.year===null&&(s.lang==="en"||s.form==="word"));if(!t||t.lang==="en")return null;let n=new Map;if(t.readings.forEach((s,i)=>{n.has(s.n)||n.set(s.n,r[i])}),n.size<$.minMatches)return null;let o=[...n.entries()].sort((s,i)=>s[0]-i[0]).map(s=>s[1]);return{pattern:$.name,orderedDomain:o}}function K(e){let r=new Map;for(let t of e){if(t==null)continue;let n=String(t);if(n.length===0)continue;let o=f(n);r.has(o)||r.set(o,n)}return r}var be=15,ve=10,Ce=(()=>{let e=["xxs","xs","s","sm","small","m","med","medium","l","lg","large","xl","xlarge","xxl","xxxl","2xl","3xl","4xl","y","n","yes","no","t","f","true","false","na","n/a","n a","none","null","unknown","other","all","both","low","medium","med","high","very low","very high","minimal","critical","urgent"],r=new Set(e.map(f));for(let t of C)for(let n of t.dict.keys())r.add(n);return r})();function _e(e){let r=e.trim();return r.length===0||r.length>ve||(r.match(/\p{L}/gu)||[]).length>1?!1:/\p{Nd}/u.test(r)}function Me(e){let r=e.trim();return r.length===1&&/[\p{L}\p{Nd}]/u.test(r)}function We(e){if(!e||e.length===0)return null;let r=new Set,t=[];for(let n of e){if(n==null)continue;let o=String(n);if(r.has(o))continue;let s=f(o);if(!(s===""||Ce.has(s)||_e(o)||Me(o))||(r.add(o),t.push(o),t.length>be))return null}return t.length>0?t:null}var xe=/^(\p{L}{0,3}) ?([0-9]+)\s*[-–—:.)]\s*(.+)$/u;function Re(e){let r=null,t=new Set,n=[];for(let o of e.values()){let s=xe.exec(o.trim());if(!s)return null;let i=s[1].toLowerCase();if(r===null)r=i;else if(i!==r)return null;let a=Number(s[2]);if(t.has(a)||f(s[3])==="")return null;t.add(a),n.push({code:a,original:o,label:s[3]})}return n}function je(e,r){let t=X(K(e.map(a=>a.label)),r);if(t===null)return;if(t.orderedDomain.length!==e.length)return null;let n=new Map;for(let a of e)n.set(a.label,a);let o=t.orderedDomain.map(a=>n.get(a));if(o.some(a=>a===void 0))return null;let s=!0,i=!0;for(let a=1;a<o.length;++a)o[a].code<=o[a-1].code&&(s=!1),o[a].code>=o[a-1].code&&(i=!1);return!s&&!i?null:{pattern:t.pattern,orderedDomain:o.map(a=>a.original)}}function Ue(e,r){if(!e||e.length<2)return null;let t=K(e);if(t.size<2)return null;let n=Re(t);if(n!==null){let s=je(n,r);if(s!==void 0)return s}let o=X(t,r);return o!==null?o:n!==null?Oe(t):null}var Se=/^([0-9]+)\s*(?:\.|\)|-)\s*([^\s\d].*)$/u,De=3,qe=20;function Oe(e){if(e.size<De||e.size>qe)return null;let r=new Set,t=[];for(let n of e.values()){let o=Se.exec(n.trim());if(!o||f(o[2])==="")return null;let s=Number(o[1]);if(r.has(s))return null;r.add(s),t.push({n:s,original:n})}return t.sort((n,o)=>n.n-o.n),{pattern:"numeric_rank_prefix",orderedDomain:t.map(n=>n.original)}}function X(e,r){let t=new Map;for(let[o,s]of e){let i=W(o);t.has(i)||t.set(i,s)}let n=null;for(let o of H){let s=[];for(let u of o.canonical){let c=t.get(u);c!==void 0&&s.push(c)}if(s.length<o.minMatches)continue;let i=new Set(o.canonical),a=!0;for(let u of e.keys())if(!i.has(W(u))){a=!1;break}if(!a)continue;let l;n===null||s.length>n.matched||s.length===n.matched&&o.canonical.length<n.pattern.canonical.length?l=!0:l=!1,l&&(n={pattern:o,matched:s.length,orderedDomain:s})}return n?{pattern:n.pattern.name,orderedDomain:n.orderedDomain}:we(e,r)}export{Ee as a,Q as b,D as c,q as d,O as e,z as f,ee as g,h,V as i,re as j,me as k,G as l,Ge as m,We as n,Ue as o};
@@ -1,2 +0,0 @@
1
- /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
- import{a as w}from"./chunk-5MRZID36.mjs";var H="AB|CA|Alberta|-113.75|52.18,AK|US|Alaska|-148.32|61.29,AL|US|Alabama|-86.73|33.08,AR|US|Arkansas|-92.85|35.29,AZ|US|Arizona|-111.99|33.32,BC|CA|British Columbia|-122.73|49.27,CA|US|California|-119.21|35.2,CO|US|Colorado|-105|39.63,CT|US|Connecticut|-73.01|41.42,DC|US|District of Columbia|-77.04|38.9,DE|US|Delaware|-75.59|39.57,FL|US|Florida|-81.29|27.53,GA|US|Georgia|-84.02|33.43,HI|US|Hawaii|-157.73|21.26,IA|US|Iowa|-92.79|41.88,ID|US|Idaho|-115.65|44.2,IL|US|Illinois|-88.05|41.67,IN|US|Indiana|-86.27|40.23,KS|US|Kansas|-96|38.59,KY|US|Kentucky|-84.91|38.13,LA|US|Louisiana|-91.28|30.57,MA|US|Massachusetts|-71.28|42.32,MB|CA|Manitoba|-97.3|49.88,MD|US|Maryland|-76.79|39.18,ME|US|Maine|-70.01|43.92,MI|US|Michigan|-83.69|42.56,MN|US|Minnesota|-93.26|44.98,MO|US|Missouri|-92.66|38.73,MS|US|Mississippi|-89.62|32.36,MT|US|Montana|-111.07|46.37,MX01|MX|Aguascalientes|-102.29|21.91,MX02|MX|Baja California|-116.5|32.46,MX03|MX|Baja California Sur|-110.12|23.52,MX04|MX|Campeche|-91.08|19.25,MX05|MX|Chiapas|-92.77|16.28,MX06|MX|Chihuahua|-106.27|30.1,MX07|MX|Coahuila|-101.88|26.32,MX08|MX|Colima|-103.94|19.15,MX09|MX|Mexico City|-99.13|19.41,MX10|MX|Durango|-104.24|24.64,MX11|MX|Guanajuato|-101.37|20.87,MX12|MX|Guerrero|-99.83|17.31,MX13|MX|Hidalgo|-98.81|20.13,MX14|MX|Jalisco|-103.39|20.64,MX15|MX|M\xE9xico|-99.14|19.51,MX16|MX|Michoac\xE1n|-101.68|19.49,MX17|MX|Morelos|-99.15|18.88,MX18|MX|Nayarit|-104.89|21.5,MX19|MX|Nuevo Le\xF3n|-100.26|25.69,MX20|MX|Oaxaca|-96.23|17.05,MX21|MX|Puebla|-98.12|19.07,MX22|MX|Quer\xE9taro|-100.35|20.57,MX23|MX|Quintana Roo|-87.09|20.7,MX24|MX|San Luis Potos\xED|-100.7|22.22,MX25|MX|Sinaloa|-107.49|24.63,MX26|MX|Sonora|-111.05|29.37,MX27|MX|Tabasco|-92.98|17.99,MX28|MX|Tamaulipas|-98.33|24.92,MX29|MX|Tlaxcala|-98.19|19.31,MX30|MX|Veracruz|-96.31|19.2,MX31|MX|Yucat\xE1n|-89.52|20.94,MX32|MX|Zacatecas|-102.7|22.93,NB|CA|New Brunswick|-65.73|45.83,NC|US|North Carolina|-79.61|35.57,ND|US|North Dakota|-98.8|47.31,NE|US|Nebraska|-96.42|41.07,NH|US|New Hampshire|-71.37|43,NJ|US|New Jersey|-74.34|40.51,NL|CA|Newfoundland and Labrador|-52.77|47.55,NM|US|New Mexico|-106.28|34.69,NS|CA|Nova Scotia|-63.11|44.86,NV|US|Nevada|-115.95|36.72,NY|US|New York|-74.13|40.89,OH|US|Ohio|-82.75|40.53,OK|US|Oklahoma|-97.01|35.66,ON|CA|Ontario|-79.27|43.94,OR|US|Oregon|-122.75|44.96,PA|US|Pennsylvania|-76.12|40.23,PE|CA|Prince Edward Island|-63.13|46.23,QC|CA|Quebec|-73.14|45.89,RI|US|Rhode Island|-71.45|41.79,SC|US|South Carolina|-80.69|33.6,SD|US|South Dakota|-98.66|43.89,SK|CA|Saskatchewan|-105.99|51.63,TN|US|Tennessee|-87.53|35.63,TX|US|Texas|-97.51|31.01,UT|US|Utah|-111.96|40.5,VA|US|Virginia|-77.08|37.61,VT|US|Vermont|-73.21|44.48,WA|US|Washington|-121.46|47.29,WI|US|Wisconsin|-88.6|43.36,WV|US|West Virginia|-81.42|38.99,WY|US|Wyoming|-105.54|42.26,YT|CA|Yukon|-135.05|60.72",X="006|-66.84|18.26,007|-66.15|18.15,008|-64.74|17.74,009|-66.12|18.37,010|-72.6|42.26,011|-72.53|42.07,012|-73.21|42.37,013|-72.51|42.58,014|-71.81|42.59,015|-71.85|42.23,016|-71.84|42.28,017|-71.44|42.33,018|-71.21|42.64,019|-70.89|42.66,020|-71.28|42.12,021|-71.05|42.31,022|-71.04|42.35,023|-70.86|41.98,024|-71.22|42.37,025|-70.6|41.71,026|-70.2|41.73,027|-71.07|41.77,028|-71.62|41.69,029|-71.47|41.82,030|-71.51|42.9,031|-71.48|43,032|-71.65|43.57,033|-71.58|43.26,034|-72.19|42.91,035|-71.31|44.69,036|-72.32|43.17,037|-72.13|43.69,038|-71.1|43.56,039|-70.76|43.24,040|-70.6|43.78,041|-70.27|43.7,042|-70.49|44.38,043|-69.75|44.3,044|-68.83|45.45,045|-69.57|43.99,046|-67.8|44.79,047|-68.34|46.55,048|-69.17|44.2,049|-69.97|44.99,050|-72.43|43.85,051|-72.65|43.28,052|-73.14|43.03,053|-72.77|42.94,054|-72.98|44.58,056|-72.6|44.35,057|-73.04|43.69,058|-72.12|44.68,059|-71.7|44.79,060|-72.81|41.88,061|-72.69|41.74,062|-72.12|41.81,063|-72.03|41.5,064|-72.61|41.46,065|-72.94|41.36,066|-73.22|41.24,067|-73.24|41.68,068|-73.42|41.28,069|-73.57|41.14,070|-74.28|40.76,071|-74.2|40.74,072|-74.2|40.68,073|-74.08|40.71,074|-74.4|41.09,075|-74.17|40.92,076|-74.01|40.94,077|-74.17|40.28,078|-74.81|40.97,079|-74.55|40.74,080|-74.98|39.78,081|-75.07|39.94,082|-74.68|39.32,083|-75.04|39.45,084|-74.48|39.35,085|-74.62|40.25,086|-74.68|40.23,087|-74.22|39.96,088|-74.72|40.54,089|-74.48|40.45,100|-73.96|40.77,101|-73.95|40.78,102|-74.02|40.72,103|-74.15|40.58,104|-73.85|40.9,105|-73.75|41.27,106|-73.74|41.02,107|-73.84|40.96,108|-73.8|40.95,109|-74.27|41.3,110|-73.69|40.74,111|-73.93|40.76,112|-73.94|40.66,113|-73.84|40.73,114|-73.77|40.69,115|-73.62|40.71,116|-73.88|40.57,117|-73.23|40.82,118|-73.5|40.77,119|-72.53|40.95,120|-74.22|42.92,121|-74.4|43.46,122|-73.81|42.7,123|-73.96|42.82,124|-74.27|42.09,125|-73.7|41.89,126|-73.88|41.69,127|-74.75|41.74,128|-73.91|43.61,129|-74.03|44.53,130|-76.16|43.08,131|-76.46|43.27,132|-76.2|43.03,133|-75.07|43.45,134|-75.35|43.03,135|-75.15|43.14,136|-75.39|44.33,137|-75.2|42.21,138|-75.46|42.43,139|-75.88|42.12,140|-78.48|43.01,141|-78.7|42.49,142|-78.8|42.91,143|-78.96|43.12,144|-77.71|42.96,145|-77.17|43.14,146|-77.65|43.17,147|-78.84|42.21,148|-77.18|42.29,149|-76.78|42.09,150|-80.23|40.56,151|-80.18|40.53,152|-79.97|40.46,153|-80.24|40.01,154|-79.65|39.92,155|-78.8|39.95,156|-79.47|40.33,157|-79.02|40.71,158|-78.66|41.32,159|-78.84|40.35,160|-79.88|40.93,161|-80.3|41.19,162|-79.35|41.08,163|-79.58|41.59,164|-80|41.87,165|-80.04|42.1,166|-78.28|40.48,167|-78.47|41.76,168|-78|40.97,169|-77.37|41.8,170|-77.29|40.44,171|-76.78|40.33,172|-77.81|39.98,173|-76.93|39.89,174|-76.72|39.97,175|-76.24|40.05,176|-76.34|40.05,177|-77.22|41.34,178|-76.77|40.93,179|-76.27|40.69,180|-75.45|40.67,181|-75.47|40.6,182|-75.88|40.9,183|-75.19|41.12,184|-75.38|41.53,185|-75.68|41.37,186|-76.17|41.4,187|-75.86|41.22,188|-76.12|41.82,189|-75.14|40.36,190|-75.37|39.97,191|-75.15|40.01,193|-75.78|39.92,194|-75.46|40.19,195|-75.9|40.42,196|-75.95|40.34,197|-75.68|39.53,198|-75.58|39.77,199|-75.46|38.83,200|-77.02|38.9,201|-77.68|38.9,202|-77.03|38.89,203|-77.01|38.86,204|-77.05|38.89,205|-77.01|38.87,206|-76.76|38.45,207|-76.78|38.88,208|-77.23|39.15,209|-76.99|39.05,210|-76.32|39.53,211|-76.73|39.58,212|-76.58|39.31,214|-76.55|39,215|-79.08|39.56,216|-76.02|38.86,217|-77.5|39.52,218|-75.57|38.27,219|-75.94|39.57,220|-77.25|38.78,221|-77.25|38.92,222|-77.11|38.88,223|-77.13|38.79,224|-77.25|38.22,225|-77.51|38.09,226|-78.25|39.03,227|-78.05|38.49,228|-78.79|38.57,229|-78.55|38.02,230|-78.09|37.66,231|-76.96|37.55,232|-77.46|37.51,233|-76.3|36.68,234|-76.66|36.77,235|-76.26|36.87,236|-76.44|37.12,237|-76.38|36.85,238|-77.41|36.94,239|-78.39|37.03,240|-80.1|37.23,241|-79.89|36.9,242|-82.49|36.83,243|-81.13|36.86,244|-79.51|38.05,245|-79.11|37.15,246|-81.8|37.19,247|-81.14|37.39,248|-81.64|37.47,249|-80.32|37.95,250|-81.45|38.27,251|-81.89|38.64,252|-81.45|38.77,253|-81.64|38.42,254|-78.11|39.45,255|-82.19|38.25,256|-82.08|37.76,257|-82.41|38.4,258|-81.21|37.72,259|-80.89|37.83,260|-80.63|40.05,261|-81.27|39.2,262|-80.02|38.75,263|-80.23|39.27,264|-80.65|39.21,265|-80.05|39.59,266|-80.8|38.48,267|-78.98|39.33,268|-79.12|38.88,270|-80.45|36.24,271|-80.24|36.06,272|-79.82|35.86,273|-79.52|35.55,274|-79.81|36.09,275|-78.54|35.93,276|-78.65|35.81,277|-78.9|35.99,278|-77.32|35.88,279|-76.5|36.19,280|-81.2|35.4,281|-80.41|35.21,282|-80.83|35.22,283|-78.94|34.96,284|-78.23|34.39,285|-77.23|35.06,286|-81.36|36.06,287|-82.78|35.51,288|-82.55|35.6,289|-83.97|35.11,290|-80.88|34.19,291|-80.62|33.71,292|-80.96|34.04,293|-81.86|34.78,294|-80.08|33.05,295|-79.49|34.07,296|-82.57|34.61,297|-80.92|34.83,298|-81.74|33.51,299|-80.96|32.55,300|-84.08|33.85,301|-84.91|34.04,302|-84.55|33.25,303|-84.42|33.77,304|-82.11|32.48,305|-83.81|34.58,306|-83.14|33.86,307|-85.1|34.71,308|-82.34|33.35,309|-82.01|33.4,310|-83.42|32.64,312|-83.64|32.83,313|-81.49|31.68,314|-81.15|32.03,315|-82.21|31.4,316|-83.21|31.02,317|-83.87|31.48,318|-84.69|32.45,319|-84.95|32.47,320|-82.58|30.27,321|-81.48|29.39,322|-81.69|30.3,323|-84.25|30.29,324|-85.58|30.55,325|-87.03|30.76,326|-82.6|29.58,327|-81.28|28.79,328|-81.32|28.47,329|-80.67|27.96,330|-80.58|25.31,331|-80.38|25.74,333|-80.25|26.13,334|-81.01|26.64,335|-82.22|28.19,336|-82.47|28.01,337|-82.73|27.85,338|-81.64|27.72,339|-81.71|26.77,341|-81.32|26.11,342|-82.16|27.29,344|-82.35|29.01,346|-82.52|28.41,347|-81.4|28.29,349|-80.72|27.34,350|-86.8|34.05,351|-86.38|33.43,352|-86.77|33.5,354|-87.86|33.07,355|-87.71|33.96,356|-87.4|34.67,357|-86.26|34.75,358|-86.59|34.69,359|-85.94|34.27,360|-86.09|32.09,361|-86.27|32.31,362|-85.65|33.53,363|-85.56|31.34,364|-86.97|31.38,365|-88.14|31.32,366|-88.19|30.68,367|-87.34|32.33,368|-85.41|32.61,369|-88.25|32.12,370|-87.02|36.12,371|-86.23|35.75,372|-86.83|36.15,373|-85.36|35.32,374|-85.33|35.06,376|-82.3|36.36,377|-84.31|36.27,378|-83.35|36.3,379|-83.97|35.97,380|-89.43|35.55,381|-89.96|35.1,382|-88.68|36.29,383|-88.5|35.61,384|-87.36|35.34,385|-85.34|36.18,386|-89.76|34.57,387|-90.81|33.54,388|-88.63|34.36,389|-89.9|33.77,390|-90|32.53,391|-90.67|32.51,392|-90.22|32.32,393|-88.8|32.42,394|-89.26|31.23,395|-89|30.59,396|-90.67|31.32,397|-88.87|33.53,398|-84.67|31.32,400|-85.29|38.07,401|-86.2|37.85,402|-85.66|38.19,403|-84.2|38.06,404|-84.42|37.53,405|-84.45|38.04,406|-84.87|38.22,407|-84.12|36.95,408|-83.26|36.9,409|-83.74|36.95,410|-84.32|38.64,411|-83.06|38.38,412|-82.67|37.89,413|-83.48|37.58,414|-83.15|37.84,415|-82.39|37.46,416|-82.78|37.54,417|-83.25|37.23,418|-82.88|37.21,420|-88.57|36.9,421|-86.09|36.89,422|-87.11|36.95,423|-87.02|37.52,424|-87.7|37.47,425|-84.71|37.15,426|-84.82|36.81,427|-85.73|37.32,430|-82.9|40.21,431|-82.99|39.69,432|-82.97|39.98,433|-83.38|40.55,434|-83.3|41.42,435|-84.22|41.46,436|-83.54|41.67,437|-81.66|39.85,438|-81.88|40.27,439|-80.9|40.25,440|-80.97|41.64,441|-81.66|41.42,442|-81.6|41.13,443|-81.54|41.07,444|-80.77|41.09,445|-80.64|41.05,446|-81.53|40.65,447|-81.39|40.83,448|-82.77|41.02,449|-82.55|40.74,450|-84.48|39.43,451|-83.84|39.16,452|-84.48|39.18,453|-84.3|39.97,454|-84.18|39.74,455|-83.81|39.94,456|-82.86|38.99,457|-81.78|39.35,458|-84.23|40.83,460|-86.13|40.17,461|-86.18|39.62,462|-86.14|39.79,463|-87.05|41.41,464|-87.34|41.55,465|-86.08|41.44,466|-86.28|41.66,467|-85.21|41.17,468|-85.17|41.09,469|-86.14|40.76,470|-85.08|39.16,471|-86.02|38.43,472|-85.74|39.05,473|-85.15|40.09,474|-86.63|38.99,475|-87.03|38.46,476|-87.53|38.13,477|-87.58|38.03,478|-87.29|39.45,479|-87.11|40.5,480|-82.79|42.83,481|-83.62|42.2,482|-83.1|42.38,483|-83.35|42.66,484|-83.22|43.29,485|-83.69|43.03,486|-84.36|43.99,487|-83.67|44.45,488|-84.67|43.02,489|-84.59|42.74,490|-85.54|42.2,491|-86.36|41.87,492|-84.36|42.06,493|-85.57|43.33,494|-86.14|43.39,495|-85.66|42.96,496|-85.52|44.44,497|-84.37|45.17,498|-86.94|46.17,499|-88.93|46.6,500|-94.77|41.63,501|-92.79|41.84,502|-93.67|42.12,503|-93.63|41.59,504|-93.37|43.17,505|-94.45|42.77,506|-92.45|42.65,507|-92.31|42.49,508|-94.56|40.96,510|-95.91|42.6,511|-96.39|42.52,512|-96.06|43.28,513|-95.16|43.27,514|-95.08|42.11,515|-95.55|41.44,516|-95.37|40.74,520|-90.98|42.46,521|-91.73|43.2,522|-92.31|41.9,523|-91.66|41.87,524|-91.69|41.96,525|-92.46|40.95,526|-91.44|40.88,527|-90.88|41.64,528|-90.61|41.56,530|-88.24|43.51,531|-88.33|42.75,532|-87.98|43.06,534|-87.86|42.74,535|-89.66|42.95,537|-89.38|43.08,538|-90.73|42.88,539|-89.55|43.64,540|-92.46|45.08,541|-88.23|45.09,542|-87.6|44.52,543|-88.01|44.53,544|-89.85|44.93,545|-89.86|45.89,546|-90.87|43.93,547|-91.52|44.85,548|-91.63|46.04,549|-88.96|44.19,550|-92.98|45.17,551|-93.08|44.96,553|-94.06|44.99,554|-93.31|45.01,556|-91.03|47.67,557|-92.68|47.39,558|-92.08|46.96,559|-92.28|43.89,560|-94.04|44.02,561|-95.65|43.92,562|-95.75|45.08,563|-94.59|45.83,564|-94.5|46.63,565|-96.08|46.86,566|-94.31|47.88,567|-96.22|48.39,570|-97.07|43.48,571|-96.76|43.54,572|-97.18|45.04,573|-98.53|43.91,574|-98.93|45.36,575|-100.61|43.86,576|-101.59|45.43,577|-103.11|44.26,580|-97.39|46.66,581|-96.83|46.86,582|-97.72|48.25,583|-99.34|48.32,584|-99.12|46.88,585|-100.98|46.76,586|-102.99|46.75,587|-101.7|48.34,588|-103.48|48.2,590|-108.62|45.98,591|-108.45|45.69,592|-105.6|48.2,593|-105.58|46.4,594|-111.24|47.79,595|-109.12|48.38,596|-111.74|46.65,597|-112.31|45.48,598|-114.25|46.97,599|-114.57|48.37,600|-88.15|42.29,601|-88.47|42.01,602|-87.69|42.04,603|-87.79|41.89,604|-88.09|41.39,605|-88.55|41.69,606|-87.69|41.83,607|-87.82|42.03,608|-87.76|41.84,609|-87.92|40.8,610|-89.56|42.18,611|-89.08|42.28,612|-90.29|41.5,613|-89.16|41.34,614|-90.43|40.82,615|-89.68|40.71,616|-89.61|40.72,617|-88.89|40.52,618|-88.15|40.11,619|-88.19|39.66,620|-90.01|39.13,622|-89.72|38.41,623|-91.02|39.99,624|-88.19|39.04,625|-89.21|39.63,626|-90|39.86,627|-89.66|39.8,628|-88.65|38.35,629|-88.89|37.55,630|-90.83|38.35,631|-90.32|38.64,633|-91.11|39.02,634|-91.78|39.93,635|-92.61|40.2,636|-90.64|37.61,637|-89.81|37.37,638|-89.73|36.55,639|-90.62|36.84,640|-94.1|39.07,641|-94.58|39.14,644|-94.69|40.13,645|-94.83|39.75,646|-93.55|39.89,647|-94.15|38.06,648|-94.35|36.93,650|-92.23|38.45,651|-92.19|38.51,652|-92.38|39.21,653|-93.26|38.71,654|-92.03|37.93,655|-91.92|37.67,656|-93.08|36.76,657|-92.43|37.03,658|-93.3|37.22,660|-95.12|38.84,661|-94.73|39.11,662|-94.72|38.95,664|-96.15|39.64,665|-96.34|39.4,666|-95.76|39.06,667|-95.23|37.64,668|-96.39|38.36,669|-97.86|39.77,670|-98.49|37.33,671|-98.4|37.44,672|-97.33|37.7,673|-95.81|37.23,674|-97.79|38.98,675|-98.99|38.25,676|-99.47|39.34,677|-101.15|39.35,678|-100.82|37.91,679|-101.43|37.18,680|-96.46|41.55,681|-96.05|41.24,683|-96.93|40.39,684|-97.26|40.89,685|-96.69|40.82,686|-97.68|41.55,687|-98.16|42.43,688|-99.15|41.34,689|-98.9|40.34,690|-100.99|40.37,691|-101.59|41.42,692|-100.64|42.67,693|-102.84|42.29,700|-89.93|29.63,701|-89.93|30.02,703|-90.65|29.62,704|-90.27|30.66,705|-92.25|30.2,706|-93.21|30.34,707|-91.2|30.57,708|-91.1|30.45,710|-93.4|32.45,711|-93.75|32.47,712|-91.95|32.56,713|-91.86|31.43,714|-92.84|31.57,716|-91.75|33.61,717|-92.79|33.48,718|-93.84|33.66,719|-93.61|34.4,720|-91.9|34.92,721|-92.56|34.93,722|-92.37|34.7,723|-90.59|35.07,724|-90.76|36.04,725|-91.81|36.01,726|-92.93|36.15,727|-94.05|36.11,728|-93.33|35.3,729|-94.08|35.29,730|-97.83|35.31,731|-97.5|35.43,734|-97.14|34.21,735|-98.81|34.53,736|-99.33|35.52,737|-98.2|36.42,738|-99.54|36.5,739|-101.67|36.74,740|-96.19|36.34,741|-95.96|36.15,743|-95.02|36.55,744|-95.44|35.64,745|-95.65|34.66,746|-97.05|36.71,747|-95.41|34.02,748|-96.66|35.17,749|-94.69|35.23,750|-96.76|33.06,751|-96.32|32.48,752|-96.78|32.79,753|-96.84|32.81,754|-95.67|33.37,755|-94.45|33.3,756|-94.58|32.49,757|-95.37|32.24,758|-95.68|31.44,759|-94.29|31.29,760|-97.54|32.59,761|-97.38|32.77,762|-97.44|33.52,763|-98.87|33.73,764|-98.59|32.61,765|-97.62|31.11,766|-97.06|31.7,767|-97.15|31.57,768|-99.37|31.23,769|-100.88|31.03,770|-95.39|29.79,772|-95.37|29.77,773|-95.24|30.48,774|-96.02|29.38,775|-94.98|29.68,776|-94.16|30.27,777|-94.19|29.96,778|-96.32|30.67,779|-96.95|28.92,780|-99.01|28.67,781|-97.93|29.08,782|-98.53|29.47,783|-98.14|27.63,784|-97.44|27.73,785|-98.19|26.39,786|-98.1|30.27,787|-97.78|30.3,788|-100.26|29.44,789|-96.87|29.92,790|-101.63|35.48,791|-101.85|35.21,792|-100.57|34.25,793|-102.15|33.37,794|-101.88|33.58,795|-100.31|32.7,796|-99.72|32.46,797|-102.22|31.57,798|-104.17|30.53,799|-106.16|31.8,800|-105.11|39.91,801|-104.47|39.51,802|-104.93|39.78,803|-105.31|40.04,804|-106.16|39.98,805|-105.35|40.57,806|-104.49|40.38,807|-103.09|40.4,808|-103.16|39.12,809|-104.67|38.79,810|-103.58|37.77,811|-106.39|37.54,812|-106.39|38.46,813|-108.42|37.49,814|-108.02|38.43,815|-108.7|38.92,816|-107.86|39.99,820|-105.27|41.31,821|-110.51|44.57,822|-104.67|42.39,823|-107.03|41.75,824|-108.65|44.32,825|-108.91|43.14,826|-106.43|43.1,827|-105|44.2,828|-106.71|44.55,829|-109.71|42.82,830|-110.51|43.7,831|-110.53|42.6,832|-112.17|42.66,833|-114.23|42.81,834|-111.63|43.86,835|-115.77|46.07,836|-115.99|44,837|-116.04|43.58,838|-116.47|47.77,840|-110.86|40.53,841|-111.81|40.71,843|-112.18|41.67,844|-112.01|41.23,845|-109.72|38.09,846|-111.68|39.63,847|-112.82|37.61,850|-112.09|33.63,851|-111.41|33,852|-111.69|33.6,853|-113.44|33.49,855|-110.3|33.43,856|-110.59|32,857|-111.09|32.18,859|-109.81|34.23,860|-111.15|35.89,863|-112.57|34.85,864|-113.79|35.66,865|-109.55|36.03,870|-106.9|35.22,871|-106.72|35.12,873|-108.56|35.44,874|-108.23|36.59,875|-106.04|36.27,877|-104.68|36.06,878|-107.94|34,879|-107.48|33.2,880|-108.03|32.37,881|-103.81|34.26,882|-104.07|32.87,883|-105.48|33.62,884|-103.79|35.74,890|-114.84|37,891|-115.42|36.33,893|-116.96|39.5,894|-118.06|41.29,895|-119.72|39.9,897|-119.8|39.18,898|-115.71|40.95,900|-118.32|34.04,902|-118.76|34.07,903|-118.34|33.95,904|-118.48|34.02,905|-118.33|33.83,906|-118.03|33.93,907|-118.45|33.39,908|-118.18|33.8,910|-118.25|34.28,911|-118.13|34.15,912|-118.25|34.19,913|-118.55|34.36,914|-118.47|34.18,915|-118.33|34.19,916|-118.38|34.18,917|-117.78|34.14,918|-118.13|34.09,919|-116.62|32.73,920|-116.7|33.16,921|-117.14|32.85,922|-115.5|33.59,923|-117.14|34.66,924|-117.33|34.17,925|-117.06|33.68,926|-117.73|33.63,927|-117.85|33.74,928|-117.71|33.85,930|-119.12|34.39,931|-119.97|34.48,932|-119.07|35.98,933|-119.01|35.35,934|-120.5|35.38,935|-118.36|37.37,936|-119.72|36.95,937|-119.85|36.71,939|-121.42|36.34,940|-122.31|37.41,941|-122.44|37.77,943|-122.13|37.44,944|-122.32|37.53,945|-122.05|38.09,946|-122.19|37.78,947|-122.26|37.89,948|-122.3|37.97,949|-122.74|38.14,950|-121.42|36.85,951|-121.76|37.33,952|-120.79|38.14,953|-120.56|37.62,954|-123.15|39.08,955|-123.75|40.5,956|-121.34|38.62,957|-120.86|39.13,958|-121.44|38.58,959|-121.73|39.47,960|-122.42|41.06,961|-120.33|40.52,967|-155.53|19.6,968|-157.83|21.34,969|144.77|13.45,970|-121.45|45.3,971|-123.79|45.64,972|-122.74|45.57,973|-123.26|44.68,974|-123.46|43.61,975|-123.06|42.34,976|-120.4|42.67,977|-120.77|44.32,978|-118.59|45.21,979|-117.63|43.34,980|-121.78|47.42,981|-122.32|47.6,982|-121.79|48.39,983|-123.87|47.96,984|-122.46|47.18,985|-123.27|46.94,986|-122.15|45.99,988|-119.91|48,989|-120.57|46.71,990|-117.56|47.62,991|-118.13|47.91,992|-117.4|47.67,993|-118.82|46.4,994|-117.21|46.2,995|-156.93|60.89,996|-151.66|60.82,997|-146.69|65.19,998|-136.2|58.94,999|-131.24|55.86",k="ABW|-70.02|12.54,AFG|68|34.63,AGO|14.24|-9.84,AIA|-63.06|18.22,ALA|19.93|60.1,ALB|19.81|41.14,AND|1.53|42.51,ARE|55.24|24.99,ARG|-61.28|-32.95,ARM|44.52|40.23,ASM|-170.7|-14.28,ATA|21.28|-80.52,ATF|70.22|-49.35,ATG|-61.84|17.12,AUS|144.91|-33.49,AUT|15.51|47.93,AZE|49.02|40.37,BDI|29.49|-3.34,BEL|4.37|50.89,BEN|2.33|7.65,BES|-68.27|12.15,BFA|-2.08|12.15,BGD|90.42|23.65,BGR|24.92|42.71,BHR|50.57|26.18,BHS|-77.34|25.06,BIH|17.97|44.18,BLM|-62.85|17.9,BLR|27.81|53.57,BLZ|-88.41|17.54,BMU|-64.78|32.29,BOL|-65.79|-17.39,BRA|-45.89|-17.51,BRB|-59.62|13.11,BRN|114.74|4.82,BTN|89.69|27.32,BWA|25.99|-23.43,CAF|18.32|4.94,CAN|-79.4|43.71,CCK|96.82|-12.16,CHE|7.96|47.07,CHL|-71.21|-33.72,CHN|114.44|32,CIV|-4.89|6.16,CMR|11.19|5.41,COD|20.23|-4.72,COG|14.18|-4.04,COK|-159.78|-21.21,COL|-74.85|5.93,COM|43.58|-11.89,CPV|-23.87|15.66,CRI|-84.14|9.99,CUB|-80.25|22.21,CUW|-68.88|12.12,CXR|105.68|-10.42,CYM|-81.38|19.32,CYP|33.31|35,CZE|15.44|49.89,DEU|9.65|51.24,DJI|43.15|11.59,DMA|-61.39|15.3,DNK|11.42|55.79,DOM|-70.07|18.75,DZA|3.55|35.62,ECU|-79.29|-1.4,EGY|31.22|29.84,ERI|38.84|15.25,ESH|-13.19|27.14,ESP|-2.91|39.69,EST|25.17|59.29,ETH|39.02|9.26,FIN|24.87|61.26,FJI|178.2|-17.85,FLK|-57.86|-51.69,FRA|2.87|47.28,FRO|-6.77|62.01,FSM|158.16|6.92,GAB|10.22|-0.06,GBR|-1.37|52.49,GEO|43.92|41.84,GGY|-2.54|49.46,GHA|-0.98|6.4,GIB|-5.35|36.14,GIN|-12.8|9.75,GLP|-61.53|16.23,GMB|-16.59|13.41,GNB|-15.48|11.9,GNQ|9.77|1.86,GRC|23.73|37.98,GRD|-61.75|12.05,GRL|-51.72|64.18,GTM|-90.71|14.73,GUF|-52.64|5.04,GUM|144.82|13.5,GUY|-58.11|6.63,HKG|114.15|22.33,HMD|73.5|-53.1,HND|-87.41|14.94,HRV|16.21|45.31,HTI|-72.34|18.54,HUN|19.21|47.39,IDN|106.85|-6.21,IMN|-4.48|54.15,IND|78.36|21,IOT|71.35|-6.19,IRL|-6.87|53.12,IRN|51.6|34.4,IRQ|44.78|33.65,ISL|-21.7|64.22,ISR|34.97|32.07,ITA|12|42.73,JAM|-76.91|18.03,JEY|-2.1|49.19,JOR|35.96|32.03,JPN|137.27|35.53,KAZ|70.17|47.24,KEN|36.81|-0.97,KGZ|73.96|41.94,KHM|104.7|11.75,KIR|172.98|1.33,KNA|-62.72|17.3,KOR|127.51|36.58,KWT|48.06|29.2,Kosovo|20.9|42.58,LAO|102.6|17.97,LBN|35.53|33.87,LBR|-10.39|6.36,LBY|13.19|32.89,LCA|-60.97|14.04,LIE|9.52|47.14,LKA|80.25|7.25,LSO|27.67|-29.38,LTU|24.18|55.04,LUX|6.08|49.56,LVA|24.13|56.85,MAC|113.55|22.19,MAF|-63.08|18.07,MAR|-6.65|33.43,MCO|7.42|43.74,MDA|28.82|47.09,MDG|47.46|-18.89,MDV|73.51|4.18,MEX|-100.65|21.59,MHL|171.38|7.09,MKD|21.47|41.8,MLI|-7.15|12.95,MLT|14.46|35.91,MMR|96.18|18.74,MNE|19.17|42.53,MNG|105.33|47.94,MNP|145.75|15.21,MOZ|32.58|-25.97,MRT|-14.58|18.01,MSR|-62.21|16.79,MTQ|-61.01|14.64,MUS|57.51|-20.23,MWI|34.34|-14.24,MYS|103.35|3.45,MYT|45.23|-12.77,N. Cyprus|33.56|35.27,NAM|17.19|-21.34,NCL|166.47|-22.26,NER|5.05|14.04,NFK|167.97|-29.05,NGA|5.91|7.87,NIC|-86.17|12.33,NIU|-169.92|-19.05,NLD|5.21|52.09,NOR|9.62|60.46,NPL|84.7|27.64,NRU|166.93|-0.55,NZL|174.54|-38.9,OMN|57.69|23.27,PAK|71.47|30.24,PAN|-79.83|8.98,PCN|-130.1|-25.07,PER|-76.4|-11.18,PHL|121.05|14.65,PLW|134.58|7.52,PNG|147.4|-7.71,POL|19.26|51.79,PRI|-66.24|18.35,PRK|126.54|39.52,PRT|-9.08|39.42,PRY|-57.15|-25.27,PSE|35.23|31.78,PYF|-149.59|-17.57,QAT|51.49|25.32,REU|55.45|-21.08,ROU|25.47|45.38,RUS|51.84|54.52,RWA|29.78|-1.98,SAU|43.01|23.76,SDN|31.67|14.67,SEN|-16.73|14.66,SGP|103.85|1.33,SGS|-36.51|-54.28,SHN|-5.72|-15.92,SJM|15.65|78.22,SLB|159.97|-9.44,SLE|-12.4|8.36,SLV|-89.08|13.7,SMR|12.45|43.94,SOM|44.96|4.91,SPM|-56.18|46.78,SRB|20.62|44.5,SSD|29.91|6.61,STP|6.73|0.34,SUR|-55.18|5.84,SVK|18.69|48.55,SVN|14.83|46.16,SWE|16.03|58.86,SWZ|31.28|-26.43,SXM|-63.05|18.03,SYC|55.46|-4.62,SYR|37.18|35.12,Somaliland|46.23|9.76,TCA|-72.1|21.74,TCD|16.57|11.53,TGO|1.16|6.8,THA|100.71|13.71,TJK|69.39|39.08,TKM|59.4|38.74,TLS|125.65|-8.67,TON|-175.2|-21.14,TTO|-61.4|10.5,TUN|10.23|35.87,TUR|32.1|39.5,TUV|179.19|-8.52,TWN|121.06|24.37,TZA|36.11|-5.88,UGA|32.23|0.59,UKR|32.8|48.99,URY|-56.28|-34.1,USA|-93.51|37.4,UZB|69.22|41.26,VAT|12.45|41.9,VCT|-61.21|13.14,VEN|-67.82|9.83,VGB|-64.62|18.43,VIR|-64.8|17.9,VNM|106.63|10.82,VUT|168.31|-17.74,WLF|-176.17|-13.28,WSM|-171.77|-13.83,YEM|44.62|14.36,ZAF|26.96|-28.33,ZMB|28.41|-13.86,ZWE|30.49|-18.56";var W={\u00F8:"o",\u0153:"oe",\u00E6:"ae",\u00DF:"ss",\u0142:"l",\u0111:"d",\u00F0:"d",\u00FE:"th",\u0131:"i",\u0127:"h",\u0167:"t",\u014B:"n",\u0138:"k",\u0259:"e",\u01DD:"e",\u0133:"ij",\u0140:"l",\u017F:"s"};function u(n){return n.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().replace(/[øœæßłđðþıħŧŋəĸ]/g,e=>W[e]).replace(/[^\p{L}\p{Nd}\s]/gu," ").replace(/\s+/g," ").trim()}var _="AD AND,AE ARE,AF AFG,AG ATG,AI AIA,AL ALB,AM ARM,AO AGO,AQ ATA,AR ARG,AS ASM,AT AUT,AU AUS,AW ABW,AX ALA,AZ AZE,BA BIH,BB BRB,BD BGD,BE BEL,BF BFA,BG BGR,BH BHR,BI BDI,BJ BEN,BL BLM,BM BMU,BN BRN,BO BOL,BQ BES,BR BRA,BS BHS,BT BTN,BV BVT,BW BWA,BY BLR,BZ BLZ,CA CAN,CC CCK,CD COD,CF CAF,CG COG,CH CHE,CI CIV,CK COK,CL CHL,CM CMR,CN CHN,CO COL,CR CRI,CU CUB,CV CPV,CW CUW,CX CXR,CY CYP,CZ CZE,DE DEU,DJ DJI,DK DNK,DM DMA,DO DOM,DZ DZA,EC ECU,EE EST,EG EGY,EH ESH,ER ERI,ES ESP,ET ETH,FI FIN,FJ FJI,FK FLK,FM FSM,FO FRO,FR FRA,GA GAB,GB GBR,GD GRD,GE GEO,GF GUF,GG GGY,GH GHA,GI GIB,GL GRL,GM GMB,GN GIN,GP GLP,GQ GNQ,GR GRC,GS SGS,GT GTM,GU GUM,GW GNB,GY GUY,HK HKG,HM HMD,HN HND,HR HRV,HT HTI,HU HUN,ID IDN,IE IRL,IL ISR,IM IMN,IN IND,IO IOT,IQ IRQ,IR IRN,IS ISL,IT ITA,JE JEY,JM JAM,JO JOR,JP JPN,KE KEN,KG KGZ,KH KHM,KI KIR,KM COM,KN KNA,KP PRK,KR KOR,KW KWT,KY CYM,KZ KAZ,LA LAO,LB LBN,LC LCA,LI LIE,LK LKA,LR LBR,LS LSO,LT LTU,LU LUX,LV LVA,LY LBY,MA MAR,MC MCO,MD MDA,ME MNE,MF MAF,MG MDG,MH MHL,MK MKD,ML MLI,MM MMR,MN MNG,MO MAC,MP MNP,MQ MTQ,MR MRT,MS MSR,MT MLT,MU MUS,MV MDV,MW MWI,MX MEX,MY MYS,MZ MOZ,NA NAM,NC NCL,NE NER,NF NFK,NG NGA,NI NIC,NL NLD,NO NOR,NP NPL,NR NRU,NU NIU,NZ NZL,OM OMN,PA PAN,PE PER,PF PYF,PG PNG,PH PHL,PK PAK,PL POL,PM SPM,PN PCN,PR PRI,PS PSE,PT PRT,PW PLW,PY PRY,QA QAT,RE REU,RO ROU,RS SRB,RU RUS,RW RWA,SA SAU,SB SLB,SC SYC,SD SDN,SE SWE,SG SGP,SH SHN,SI SVN,SJ SJM,SK SVK,SL SLE,SM SMR,SN SEN,SO SOM,SR SUR,SS SSD,ST STP,SV SLV,SX SXM,SY SYR,SZ SWZ,TC TCA,TD TCD,TF ATF,TG TGO,TH THA,TJ TJK,TK TKL,TL TLS,TM TKM,TN TUN,TO TON,TR TUR,TT TTO,TV TUV,TW TWN,TZ TZA,UA UKR,UG UGA,UM UMI,US USA,UY URY,UZ UZB,VA VAT,VC VCT,VE VEN,VG VGB,VI VIR,VN VNM,VU VUT,WF WLF,WS WSM,YE YEM,YT MYT,ZA ZAF,ZM ZMB,ZW ZWE",N=(()=>{let n=new Map;for(let e of _.split(",")){let[t,o]=e.split(" ");t&&o&&n.set(t,o)}return n})(),z=new Set(N.keys()),J=new Set(N.values()),v=["en","fr","es","de","it","pt","ru","ja","zh","ko","ar","hi","tr","pl","he","nl","sv","fi","nb","da","cs","el","uk","ro","id","vi","th","sk","hu","hr"],Q={usa:"USA","u.s.":"USA","u.s.a.":"USA",us:"USA",america:"USA","united states of america":"USA","the united states":"USA",uk:"GBR","u.k.":"GBR","great britain":"GBR",britain:"GBR",england:"GBR","south korea":"KOR","north korea":"PRK",korea:"KOR","ivory coast":"CIV","cote d ivoire":"CIV",vietnam:"VNM",laos:"LAO",syria:"SYR",iran:"IRN",russia:"RUS",moldova:"MDA",tanzania:"TZA",bolivia:"BOL",venezuela:"VEN",brunei:"BRN","czech republic":"CZE",czechia:"CZE",slovakia:"SVK",uae:"ARE","united arab emirates":"ARE",drc:"COD","dr congo":"COD","democratic republic of the congo":"COD","republic of the congo":"COG",congo:"COG",swaziland:"SWZ",eswatini:"SWZ","cape verde":"CPV","cabo verde":"CPV",burma:"MMR",myanmar:"MMR",holland:"NLD","the netherlands":"NLD",netherlands:"NLD",vatican:"VAT","vatican city":"VAT",palestine:"PSE",macau:"MAC",macao:"MAC","hong kong":"HKG",taiwan:"TWN",turkey:"TUR",turkiye:"TUR",macedonia:"MKD","north macedonia":"MKD",gambia:"GMB","the gambia":"GMB",bahamas:"BHS","the bahamas":"BHS","east timor":"TLS","timor leste":"TLS"},b=null;function j(){if(b)return b;let n=new Map,e=["en",...v.filter(t=>t!=="en")];for(let t of e){let o=null;try{o=new Intl.DisplayNames([t],{type:"region"})}catch{continue}for(let[i,r]of N){let a;try{a=o.of(i)}catch{a=void 0}if(!a||a===i)continue;let s=u(a);s&&!n.has(s)&&n.set(s,r)}}for(let[t,o]of Object.entries(Q)){let i=u(t);i&&n.set(i,o)}return b=n,n}function T(n){return N.get(String(n||"").trim().toUpperCase())??null}function E(n){if(n==null)return null;let e=String(n).trim();if(!e)return null;let t=e.toUpperCase();return t.length===3&&J.has(t)?t:t.length===2&&z.has(t)?N.get(t)??null:j().get(u(e))??null}var f3=95,$=new Set(["n a","none","null","nil","unknown","not applicable","not available","not specified","unspecified","missing","blank","empty","tbd","to be determined"]);function V(n){return n?$.has(n):!0}var m3=80;var q={"north-america":"N",world:"W"};function F(n,e){let t=n.filter(o=>o.row.kinds.includes(q[e||"north-america"]));return t.length?t:(e||"north-america")==="world"?n:t}var P=w;function L3(n){n!==P&&(P=n||"",U=null,L=null,I=null)}function n3(){return P.length>0}var t3={US:"washington",CA:"ottawa",MX:"mexico city",GB:"london",FR:"paris",DE:"berlin",IT:"rome",ES:"madrid",PT:"lisbon",NL:"amsterdam",BE:"brussels",CH:"bern",AT:"vienna",IE:"dublin",PL:"warsaw",SE:"stockholm",NO:"oslo",DK:"copenhagen",FI:"helsinki",IS:"reykjavik",CZ:"prague",SK:"bratislava",HU:"budapest",RO:"bucharest",BG:"sofia",GR:"athens",TR:"ankara",UA:"kyiv",RU:"moscow",RS:"belgrade",HR:"zagreb",SI:"ljubljana",EE:"tallinn",LV:"riga",LT:"vilnius",JP:"tokyo",CN:"beijing",KR:"seoul",KP:"pyongyang",IN:"new delhi",PK:"islamabad",BD:"dhaka",LK:"colombo",TH:"bangkok",VN:"hanoi",PH:"manila",ID:"jakarta",MY:"kuala lumpur",SG:"singapore",MM:"naypyidaw",KH:"phnom penh",LA:"vientiane",NP:"kathmandu",AF:"kabul",IR:"tehran",IQ:"baghdad",SA:"riyadh",AE:"abu dhabi",QA:"doha",KW:"kuwait city",BH:"manama",OM:"muscat",JO:"amman",LB:"beirut",SY:"damascus",IL:"jerusalem",YE:"sanaa",EG:"cairo",LY:"tripoli",TN:"tunis",DZ:"algiers",MA:"rabat",SD:"khartoum",ET:"addis ababa",KE:"nairobi",TZ:"dodoma",UG:"kampala",NG:"abuja",GH:"accra",CI:"yamoussoukro",SN:"dakar",ML:"bamako",CM:"yaounde",CD:"kinshasa",CG:"brazzaville",AO:"luanda",ZM:"lusaka",ZW:"harare",MZ:"maputo",BW:"gaborone",NA:"windhoek",ZA:"pretoria",AU:"canberra",NZ:"wellington",PG:"port moresby",FJ:"suva",BR:"brasilia",AR:"buenos aires",CL:"santiago",PE:"lima",CO:"bogota",VE:"caracas",EC:"quito",BO:"la paz",PY:"asuncion",UY:"montevideo",GY:"georgetown",SR:"paramaribo",CU:"havana",DO:"santo domingo",HT:"port au prince",JM:"kingston",TT:"port of spain",PA:"panama city",CR:"san jose",NI:"managua",HN:"tegucigalpa",SV:"san salvador",GT:"guatemala city",BZ:"belmopan",AZ:"baku",AM:"yerevan",GE:"tbilisi",KZ:"astana",UZ:"tashkent",TM:"ashgabat",KG:"bishkek",TJ:"dushanbe",MN:"ulaanbaatar",BY:"minsk",MD:"chisinau",AL:"tirana",MK:"skopje",BA:"sarajevo",ME:"podgorica",XK:"pristina",CY:"nicosia",MT:"valletta",LU:"luxembourg"},U=null;function y(){if(U)return U;let n=new Map,e=P,t=(o,i,r)=>{if(!o)return;let a=n.get(o);a?a.some(s=>s.row===i)||a.push({row:i,primary:r}):n.set(o,[{row:i,primary:r}])};for(let o of e.split(",")){let i=o.split("|");if(i.length<7)continue;let r={a1:i[1],cc:i[2],lon:+i[3],lat:+i[4],pop:+i[5],kinds:i[6]||"N"};i.length>8&&i[8]&&(r.tags=i[8].split(";").filter(Boolean));let a=t3[r.cc];if(a&&u(i[0])===a&&(r.tags||(r.tags=[]),r.tags.includes("capital")||r.tags.push("capital")),t(u(i[0]),r,!0),i.length>7&&i[7])for(let s of i[7].split(";"))t(u(s),r,!1)}for(let o of n.values())o.sort((i,r)=>r.row.pop-i.row.pop);return U=n,n}var e3=200,L=null;function i3(){if(L)return L;let n=new Map;for(let[e,t]of y()){if(!e.endsWith(" city"))continue;let o=e.slice(0,-5);!o||y().get(o)?.some(i=>i.primary)||t[0].row.pop<e3||n.set(o,t)}return L=n,n}function O(n){if(!n)return;let e=y().get(n);if(e?.some(i=>i.primary))return e;let t=i3().get(n);if(!t)return e;let o=t.map(i=>({row:i.row,primary:!0}));return e?[...o,...e]:o}var I=null;function o3(){if(I)return I;let n=new Map;for(let t of k.split(",")){let o=t.split("|");o.length<3||n.set(o[0],{lon:+o[1],lat:+o[2]})}let e=new Map;for(let t of y().values())for(let o of t){let i=T(o.row.cc);if(!i)continue;let r=e.get(i);(r===void 0||o.row.pop>r)&&(e.set(i,o.row.pop),n.set(i,{lon:o.row.lon,lat:o.row.lat}))}return I=n,n}var h=null;function D(){if(h)return h;let n=new Map;for(let e of H.split(",")){let t=e.split("|");if(t.length<5)continue;let o={key:t[0],cc:t[1],name:t[2],lon:+t[3],lat:+t[4]};n.set(u(o.key),o);let i=u(o.name);i==="mexico"&&o.cc==="MX"?(n.set("estado de mexico",o),n.set("edomex",o)):n.set(i,o)}return h=n,n}var B=null;function a3(){if(B)return B;let n=new Map;for(let e of X.split(",")){let t=e.split("|");t.length<3||n.set(t[0],{lon:+t[1],lat:+t[2]})}return B=n,n}var r3=new Set(["USA","PRI","VIR","GUM","ASM","MNP"]),s3=new Set(["USA","CAN","MEX"]);function Y(n){if(n==null)return null;let e=u(String(n));return e?D().get(e)?.key??null:null}var l3={us:"US",usa:"US","u s":"US","u s a":"US",america:"US","united states":"US","united states of america":"US",ca:"CA",can:"CA",canada:"CA",mx:"MX",mex:"MX",mexico:"MX","estados unidos mexicanos":"MX"};function I3(n){if(n==null)return null;let e=u(String(n));return e?l3[e]??null:null}function u3(n){return D().get(u(n))?.cc??null}function c3(n){let e=u3(n);return e?T(e):null}function P3(n){return Z(n)[0]??null}function M3(n){if(n==null)return null;let e=String(n).trim().replace(/\.0+$/,"");if(!e)return null;let t=/^(\d{5})(-\d{4})?$/.exec(e);return t?t[1]:/^\d{3,4}$/.test(e)?e.padStart(5,"0"):null}function Z(n){if(n==null)return[];let e=String(n).trim().replace(/\.0+$/,"");if(!e)return[];if(/^\d{3}$/.test(e)){let o=e.padStart(5,"0").slice(0,3);return o===e?[e]:[e,o]}let t=M3(e);return t?[t.slice(0,3)]:[]}function S3(n){return!!n&&n.ambiguous===!0&&!("precision"in n)}function A3(n){let e=null,t=typeof n.lat=="string"?n.lat.trim():n.lat,o=typeof n.lon=="string"?n.lon.trim():n.lon;if(t!=null&&t!==""&&o!==void 0&&o!==null&&o!==""){let a=+t,s=+o;if(isFinite(a)&&isFinite(s)&&a>=-90&&a<=90&&s>=-180&&s<=180)if(a===0&&s===0)e={lat:0,lon:0,precision:"latlon"};else return{lat:a,lon:s,precision:"latlon"}}let i=E(n.country),r=Y(n.state);if(r&&i&&c3(r)!==i&&(r=null),n.city!==void 0&&n.city!==null){let a=u(String(n.city)),s=O(a),f=s?F(s,n.mapKind):null;if(f&&f.length){let d=n.state===void 0||n.state===null?"":String(n.state).trim(),R=d?u(d):"",g=d?Y(d):null,S=[],m=-1;for(let c of f){let l=c.row,A=0;if(d&&l.a1!=="")if(g&&l.a1===g||u(l.a1)===R)A++;else continue;if(i)if(T(l.cc)===i)A++;else continue;A>m?(m=A,S=[c]):A===m&&S.push(c)}S.some(c=>c.primary)&&(S=S.filter(c=>c.primary));let p=new Map;for(let c of S)p.set(c.row.lon.toFixed(2)+","+c.row.lat.toFixed(2),c.row);if(p.size===1){let c=S[0].row;return{lat:c.lat,lon:c.lon,precision:"city"}}if(p.size>1)return{ambiguous:!0,matches:p.size}}}if(!i||r3.has(i))for(let a of Z(n.zip)){let s=a3().get(a);if(s)return{lat:s.lat,lon:s.lon,precision:"zip3"}}if(r){let a=D().get(u(r));if(a)return{lat:a.lat,lon:a.lon,precision:"state"}}if(i&&(n.mapKind!=="north-america"||s3.has(i))){let a=o3().get(i);if(a)return{lat:a.lat,lon:a.lon,precision:"country"}}return e}var G={latlon:0,city:1,zip3:2,state:3,country:4},x=8;function y3(n,e){let t=new Array(n.length),o=new Array(n.length),i=new Array(n.length),r=new Set,a=[],s=new Set,f=[],d=new Set,R=[],g={latlon:0,city:0,zip3:0,state:0,country:0},S=0,m=0,p=null;for(let l=0;l<n.length;++l){let A=n[l],C=A3({...A,mapKind:e});if(S3(C)){t[l]=null,o[l]=null,i[l]=null,m++;let M=K(A);M&&!d.has(M.toLowerCase())&&(d.add(M.toLowerCase()),R.length<x&&R.push(M))}else if(C){if(t[l]=C.lat,o[l]=C.lon,i[l]=C.precision,S++,g[C.precision]++,(p===null||G[C.precision]>G[p])&&(p=C.precision),G[C.precision]>G.city){let M=K(A);M&&!s.has(M.toLowerCase())&&(s.add(M.toLowerCase()),f.length<x&&f.push(M))}}else{t[l]=null,o[l]=null,i[l]=null;let M=K(A);M&&!r.has(M.toLowerCase())&&(r.add(M.toLowerCase()),a.push(M))}}let c=!n3()&&n.some(l=>l.city!==null&&l.city!==void 0&&String(l.city).trim()!=="");return{lat:t,lon:o,precisions:i,precision:p,precisionCounts:g,coarseExamples:f,unmatched:a,ambiguousRows:m,ambiguousExamples:R,matchedRows:S,totalRows:n.length,...c?{cityTableMissing:!0}:{}}}function K(n){let e=[n.city,n.state,n.zip,n.country].filter(t=>t!=null&&String(t).trim()!=="").map(t=>String(t).trim()).join(", ");return e||(n.label===null||n.label===void 0?"":String(n.label).trim())}function b3(n,e){let t=u(String(n??""));if(!t)return[];let o=O(t);if(!o)return[];let i=E(e??null),r=new Set;for(let a of o)if(!(i&&T(a.row.cc)!==i))for(let s of a.row.tags??[])r.add(s);return Array.from(r)}function p3(n,e){if(!n)return!1;let t=O(n);return t?F(t,e).length>0:!1}function E3(n,e){let t=new Set,o=0;for(let i of n){if(i==null)continue;let r=u(String(i));V(r)||t.has(r)||(t.add(r),p3(r,e)&&o++)}return t.size===0?0:Math.round(o/t.size*1e3)/10}export{u as a,N as b,z as c,J as d,j as e,E as f,f3 as g,V as h,m3 as i,L3 as j,n3 as k,s3 as l,Y as m,I3 as n,P3 as o,M3 as p,Z as q,S3 as r,A3 as s,y3 as t,b3 as u,p3 as v,E3 as w};