@truto/truto-jsonata 1.0.28 → 1.0.29
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/main.cjs +632 -383
- package/dist/main.cjs.map +1 -1
- package/dist/module.js +640 -391
- package/dist/module.js.map +1 -1
- package/package.json +10 -4
package/dist/main.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
7
|
-
var $
|
|
8
|
-
var $
|
|
9
|
-
var $
|
|
10
|
-
var $
|
|
11
|
-
var $
|
|
12
|
-
var $
|
|
13
|
-
var $
|
|
14
|
-
var $
|
|
1
|
+
var $3zTl3$jsonata = require("jsonata");
|
|
2
|
+
var $3zTl3$lodash = require("lodash");
|
|
3
|
+
var $3zTl3$mixmarkiodomino = require("@mixmark-io/domino");
|
|
4
|
+
var $3zTl3$turndown = require("turndown");
|
|
5
|
+
var $3zTl3$marked = require("marked");
|
|
6
|
+
var $3zTl3$json2md = require("json2md");
|
|
7
|
+
var $3zTl3$luxon = require("luxon");
|
|
8
|
+
var $3zTl3$retry = require("retry");
|
|
9
|
+
var $3zTl3$isnetworkerror = require("is-network-error");
|
|
10
|
+
var $3zTl3$mime = require("mime");
|
|
11
|
+
var $3zTl3$xmljs = require("xml-js");
|
|
12
|
+
var $3zTl3$dicecoefficient = require("dice-coefficient");
|
|
13
|
+
var $3zTl3$qs = require("qs");
|
|
14
|
+
var $3zTl3$langchaintextsplitters = require("@langchain/textsplitters");
|
|
15
15
|
|
|
16
16
|
function $parcel$interopDefault(a) {
|
|
17
17
|
return a && a.__esModule ? a.default : a;
|
|
@@ -25,10 +25,10 @@ function $parcel$export(e, n, v, s) {
|
|
|
25
25
|
|
|
26
26
|
$parcel$defineInteropFlag(module.exports);
|
|
27
27
|
|
|
28
|
-
$parcel$export(module.exports, "default", () => $
|
|
28
|
+
$parcel$export(module.exports, "default", () => $07b42bb192ceea00$export$2e2bcd8739ae039);
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
function $
|
|
31
|
+
function $39b2a18afc136a8c$var$base64decode(base64, urlSafe = false) {
|
|
32
32
|
if (urlSafe) base64 = base64.replace(/-/g, "+").replace(/_/g, "/");
|
|
33
33
|
const binary = atob(base64);
|
|
34
34
|
const len = binary.length;
|
|
@@ -36,10 +36,10 @@ function $0e491578bc1ae22a$var$base64decode(base64, urlSafe = false) {
|
|
|
36
36
|
for(let i = 0; i < len; i++)bytes[i] = binary.charCodeAt(i);
|
|
37
37
|
return new TextDecoder().decode(bytes);
|
|
38
38
|
}
|
|
39
|
-
var $
|
|
39
|
+
var $39b2a18afc136a8c$export$2e2bcd8739ae039 = $39b2a18afc136a8c$var$base64decode;
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
function $
|
|
42
|
+
function $d31bfe3ac2771938$var$base64encode(input, urlSafe = false) {
|
|
43
43
|
let binary = "";
|
|
44
44
|
const bytes = new TextEncoder().encode(input);
|
|
45
45
|
const len = bytes.length;
|
|
@@ -48,10 +48,10 @@ function $8d03c5df5e0a89ca$var$base64encode(input, urlSafe = false) {
|
|
|
48
48
|
if (urlSafe) base64 = base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
49
49
|
return base64;
|
|
50
50
|
}
|
|
51
|
-
var $
|
|
51
|
+
var $d31bfe3ac2771938$export$2e2bcd8739ae039 = $d31bfe3ac2771938$var$base64encode;
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
function $
|
|
54
|
+
function $2911cf265127fccd$var$base64ToBlob(base64, options = {}) {
|
|
55
55
|
const { mimeType: mimeType = "application/octet-stream" , urlSafe: urlSafe = false } = options;
|
|
56
56
|
if (!base64 || typeof base64 !== "string") return new Blob([], {
|
|
57
57
|
type: mimeType
|
|
@@ -85,17 +85,17 @@ function $8893c1da97a40f3f$var$base64ToBlob(base64, options = {}) {
|
|
|
85
85
|
throw new Error(`Invalid base64 string: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
var $
|
|
88
|
+
var $2911cf265127fccd$export$2e2bcd8739ae039 = $2911cf265127fccd$var$base64ToBlob;
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
function $
|
|
93
|
-
return new Blob((0, $
|
|
92
|
+
function $a52f8aff642734e8$var$blob(content, options) {
|
|
93
|
+
return new Blob((0, $3zTl3$lodash.castArray)(content || ""), options);
|
|
94
94
|
}
|
|
95
|
-
var $
|
|
95
|
+
var $a52f8aff642734e8$export$2e2bcd8739ae039 = $a52f8aff642734e8$var$blob;
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
async function $
|
|
98
|
+
async function $d3fd02720418c423$var$bufferToString(value, encoding) {
|
|
99
99
|
if (value instanceof ReadableStream) {
|
|
100
100
|
const chunks = [];
|
|
101
101
|
for await (const chunk of value)chunks.push(Buffer.from(chunk));
|
|
@@ -104,56 +104,56 @@ async function $218d624cd15398df$var$bufferToString(value, encoding) {
|
|
|
104
104
|
}
|
|
105
105
|
return value.toString(encoding);
|
|
106
106
|
}
|
|
107
|
-
var $
|
|
107
|
+
var $d3fd02720418c423$export$2e2bcd8739ae039 = $d3fd02720418c423$var$bufferToString;
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
|
|
111
|
-
var $
|
|
112
|
-
$94459f531e09cb01$exports = JSON.parse('{"AED":{"code":"AED","number":"784","digits":2,"currency":"UAE Dirham","countries":["United Arab Emirates (The)"]},"AFN":{"code":"AFN","number":"971","digits":2,"currency":"Afghani","countries":["Afghanistan"]},"ALL":{"code":"ALL","number":"008","digits":2,"currency":"Lek","countries":["Albania"]},"AMD":{"code":"AMD","number":"051","digits":2,"currency":"Armenian Dram","countries":["Armenia"]},"ANG":{"code":"ANG","number":"532","digits":2,"currency":"Netherlands Antillean Guilder","countries":["Cura\xe7ao","Sint Maarten (Dutch Part)"]},"AOA":{"code":"AOA","number":"973","digits":2,"currency":"Kwanza","countries":["Angola"]},"ARS":{"code":"ARS","number":"032","digits":2,"currency":"Argentine Peso","countries":["Argentina"]},"AUD":{"code":"AUD","number":"036","digits":2,"currency":"Australian Dollar","countries":["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},"AWG":{"code":"AWG","number":"533","digits":2,"currency":"Aruban Florin","countries":["Aruba"]},"AZN":{"code":"AZN","number":"944","digits":2,"currency":"Azerbaijan Manat","countries":["Azerbaijan"]},"BAM":{"code":"BAM","number":"977","digits":2,"currency":"Convertible Mark","countries":["Bosnia and Herzegovina"]},"BBD":{"code":"BBD","number":"052","digits":2,"currency":"Barbados Dollar","countries":["Barbados"]},"BDT":{"code":"BDT","number":"050","digits":2,"currency":"Taka","countries":["Bangladesh"]},"BGN":{"code":"BGN","number":"975","digits":2,"currency":"Bulgarian Lev","countries":["Bulgaria"]},"BHD":{"code":"BHD","number":"048","digits":3,"currency":"Bahraini Dinar","countries":["Bahrain"]},"BIF":{"code":"BIF","number":"108","digits":0,"currency":"Burundi Franc","countries":["Burundi"]},"BMD":{"code":"BMD","number":"060","digits":2,"currency":"Bermudian Dollar","countries":["Bermuda"]},"BND":{"code":"BND","number":"096","digits":2,"currency":"Brunei Dollar","countries":["Brunei Darussalam"]},"BOB":{"code":"BOB","number":"068","digits":2,"currency":"Boliviano","countries":["Bolivia (Plurinational State Of)"]},"BOV":{"code":"BOV","number":"984","digits":2,"currency":"Mvdol","countries":["Bolivia (Plurinational State Of)"]},"BRL":{"code":"BRL","number":"986","digits":2,"currency":"Brazilian Real","countries":["Brazil"]},"BSD":{"code":"BSD","number":"044","digits":2,"currency":"Bahamian Dollar","countries":["Bahamas (The)"]},"BTN":{"code":"BTN","number":"064","digits":2,"currency":"Ngultrum","countries":["Bhutan"]},"BWP":{"code":"BWP","number":"072","digits":2,"currency":"Pula","countries":["Botswana"]},"BYN":{"code":"BYN","number":"933","digits":2,"currency":"Belarusian Ruble","countries":["Belarus"]},"BZD":{"code":"BZD","number":"084","digits":2,"currency":"Belize Dollar","countries":["Belize"]},"CAD":{"code":"CAD","number":"124","digits":2,"currency":"Canadian Dollar","countries":["Canada"]},"CDF":{"code":"CDF","number":"976","digits":2,"currency":"Congolese Franc","countries":["Congo (The Democratic Republic of The)"]},"CHE":{"code":"CHE","number":"947","digits":2,"currency":"WIR Euro","countries":["Switzerland"]},"CHF":{"code":"CHF","number":"756","digits":2,"currency":"Swiss Franc","countries":["Liechtenstein","Switzerland"]},"CHW":{"code":"CHW","number":"948","digits":2,"currency":"WIR Franc","countries":["Switzerland"]},"CLF":{"code":"CLF","number":"990","digits":4,"currency":"Unidad de Fomento","countries":["Chile"]},"CLP":{"code":"CLP","number":"152","digits":0,"currency":"Chilean Peso","countries":["Chile"]},"CNY":{"code":"CNY","number":"156","digits":2,"currency":"Yuan Renminbi","countries":["China"]},"COP":{"code":"COP","number":"170","digits":2,"currency":"Colombian Peso","countries":["Colombia"]},"COU":{"code":"COU","number":"970","digits":2,"currency":"Unidad de Valor Real","countries":["Colombia"]},"CRC":{"code":"CRC","number":"188","digits":2,"currency":"Costa Rican Colon","countries":["Costa Rica"]},"CUC":{"code":"CUC","number":"931","digits":2,"currency":"Peso Convertible","countries":["Cuba"]},"CUP":{"code":"CUP","number":"192","digits":2,"currency":"Cuban Peso","countries":["Cuba"]},"CVE":{"code":"CVE","number":"132","digits":2,"currency":"Cabo Verde Escudo","countries":["Cabo Verde"]},"CZK":{"code":"CZK","number":"203","digits":2,"currency":"Czech Koruna","countries":["Czechia"]},"DJF":{"code":"DJF","number":"262","digits":0,"currency":"Djibouti Franc","countries":["Djibouti"]},"DKK":{"code":"DKK","number":"208","digits":2,"currency":"Danish Krone","countries":["Denmark","Faroe Islands (The)","Greenland"]},"DOP":{"code":"DOP","number":"214","digits":2,"currency":"Dominican Peso","countries":["Dominican Republic (The)"]},"DZD":{"code":"DZD","number":"012","digits":2,"currency":"Algerian Dinar","countries":["Algeria"]},"EGP":{"code":"EGP","number":"818","digits":2,"currency":"Egyptian Pound","countries":["Egypt"]},"ERN":{"code":"ERN","number":"232","digits":2,"currency":"Nakfa","countries":["Eritrea"]},"ETB":{"code":"ETB","number":"230","digits":2,"currency":"Ethiopian Birr","countries":["Ethiopia"]},"EUR":{"code":"EUR","number":"978","digits":2,"currency":"Euro","countries":["\xc5land Islands","Andorra","Austria","Belgium","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","R\xe9union","Saint Barth\xe9lemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},"FJD":{"code":"FJD","number":"242","digits":2,"currency":"Fiji Dollar","countries":["Fiji"]},"FKP":{"code":"FKP","number":"238","digits":2,"currency":"Falkland Islands Pound","countries":["Falkland Islands (The) [Malvinas]"]},"GBP":{"code":"GBP","number":"826","digits":2,"currency":"Pound Sterling","countries":["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},"GEL":{"code":"GEL","number":"981","digits":2,"currency":"Lari","countries":["Georgia"]},"GHS":{"code":"GHS","number":"936","digits":2,"currency":"Ghana Cedi","countries":["Ghana"]},"GIP":{"code":"GIP","number":"292","digits":2,"currency":"Gibraltar Pound","countries":["Gibraltar"]},"GMD":{"code":"GMD","number":"270","digits":2,"currency":"Dalasi","countries":["Gambia (The)"]},"GNF":{"code":"GNF","number":"324","digits":0,"currency":"Guinean Franc","countries":["Guinea"]},"GTQ":{"code":"GTQ","number":"320","digits":2,"currency":"Quetzal","countries":["Guatemala"]},"GYD":{"code":"GYD","number":"328","digits":2,"currency":"Guyana Dollar","countries":["Guyana"]},"HKD":{"code":"HKD","number":"344","digits":2,"currency":"Hong Kong Dollar","countries":["Hong Kong"]},"HNL":{"code":"HNL","number":"340","digits":2,"currency":"Lempira","countries":["Honduras"]},"HRK":{"code":"HRK","number":"191","digits":2,"currency":"Kuna","countries":["Croatia"]},"HTG":{"code":"HTG","number":"332","digits":2,"currency":"Gourde","countries":["Haiti"]},"HUF":{"code":"HUF","number":"348","digits":2,"currency":"Forint","countries":["Hungary"]},"IDR":{"code":"IDR","number":"360","digits":2,"currency":"Rupiah","countries":["Indonesia"]},"ILS":{"code":"ILS","number":"376","digits":2,"currency":"New Israeli Sheqel","countries":["Israel"]},"INR":{"code":"INR","number":"356","digits":2,"currency":"Indian Rupee","countries":["Bhutan","India"]},"IQD":{"code":"IQD","number":"368","digits":3,"currency":"Iraqi Dinar","countries":["Iraq"]},"IRR":{"code":"IRR","number":"364","digits":2,"currency":"Iranian Rial","countries":["Iran (Islamic Republic Of)"]},"ISK":{"code":"ISK","number":"352","digits":0,"currency":"Iceland Krona","countries":["Iceland"]},"JMD":{"code":"JMD","number":"388","digits":2,"currency":"Jamaican Dollar","countries":["Jamaica"]},"JOD":{"code":"JOD","number":"400","digits":3,"currency":"Jordanian Dinar","countries":["Jordan"]},"JPY":{"code":"JPY","number":"392","digits":0,"currency":"Yen","countries":["Japan"]},"KES":{"code":"KES","number":"404","digits":2,"currency":"Kenyan Shilling","countries":["Kenya"]},"KGS":{"code":"KGS","number":"417","digits":2,"currency":"Som","countries":["Kyrgyzstan"]},"KHR":{"code":"KHR","number":"116","digits":2,"currency":"Riel","countries":["Cambodia"]},"KMF":{"code":"KMF","number":"174","digits":0,"currency":"Comorian Franc ","countries":["Comoros (The)"]},"KPW":{"code":"KPW","number":"408","digits":2,"currency":"North Korean Won","countries":["Korea (The Democratic People’s Republic Of)"]},"KRW":{"code":"KRW","number":"410","digits":0,"currency":"Won","countries":["Korea (The Republic Of)"]},"KWD":{"code":"KWD","number":"414","digits":3,"currency":"Kuwaiti Dinar","countries":["Kuwait"]},"KYD":{"code":"KYD","number":"136","digits":2,"currency":"Cayman Islands Dollar","countries":["Cayman Islands (The)"]},"KZT":{"code":"KZT","number":"398","digits":2,"currency":"Tenge","countries":["Kazakhstan"]},"LAK":{"code":"LAK","number":"418","digits":2,"currency":"Lao Kip","countries":["Lao People’s Democratic Republic (The)"]},"LBP":{"code":"LBP","number":"422","digits":2,"currency":"Lebanese Pound","countries":["Lebanon"]},"LKR":{"code":"LKR","number":"144","digits":2,"currency":"Sri Lanka Rupee","countries":["Sri Lanka"]},"LRD":{"code":"LRD","number":"430","digits":2,"currency":"Liberian Dollar","countries":["Liberia"]},"LSL":{"code":"LSL","number":"426","digits":2,"currency":"Loti","countries":["Lesotho"]},"LYD":{"code":"LYD","number":"434","digits":3,"currency":"Libyan Dinar","countries":["Libya"]},"MAD":{"code":"MAD","number":"504","digits":2,"currency":"Moroccan Dirham","countries":["Morocco","Western Sahara"]},"MDL":{"code":"MDL","number":"498","digits":2,"currency":"Moldovan Leu","countries":["Moldova (The Republic Of)"]},"MGA":{"code":"MGA","number":"969","digits":2,"currency":"Malagasy Ariary","countries":["Madagascar"]},"MKD":{"code":"MKD","number":"807","digits":2,"currency":"Denar","countries":["Macedonia (The Former Yugoslav Republic Of)"]},"MMK":{"code":"MMK","number":"104","digits":2,"currency":"Kyat","countries":["Myanmar"]},"MNT":{"code":"MNT","number":"496","digits":2,"currency":"Tugrik","countries":["Mongolia"]},"MOP":{"code":"MOP","number":"446","digits":2,"currency":"Pataca","countries":["Macao"]},"MRU":{"code":"MRU","number":"929","digits":2,"currency":"Ouguiya","countries":["Mauritania"]},"MUR":{"code":"MUR","number":"480","digits":2,"currency":"Mauritius Rupee","countries":["Mauritius"]},"MVR":{"code":"MVR","number":"462","digits":2,"currency":"Rufiyaa","countries":["Maldives"]},"MWK":{"code":"MWK","number":"454","digits":2,"currency":"Malawi Kwacha","countries":["Malawi"]},"MXN":{"code":"MXN","number":"484","digits":2,"currency":"Mexican Peso","countries":["Mexico"]},"MXV":{"code":"MXV","number":"979","digits":2,"currency":"Mexican Unidad de Inversion (UDI)","countries":["Mexico"]},"MYR":{"code":"MYR","number":"458","digits":2,"currency":"Malaysian Ringgit","countries":["Malaysia"]},"MZN":{"code":"MZN","number":"943","digits":2,"currency":"Mozambique Metical","countries":["Mozambique"]},"NAD":{"code":"NAD","number":"516","digits":2,"currency":"Namibia Dollar","countries":["Namibia"]},"NGN":{"code":"NGN","number":"566","digits":2,"currency":"Naira","countries":["Nigeria"]},"NIO":{"code":"NIO","number":"558","digits":2,"currency":"Cordoba Oro","countries":["Nicaragua"]},"NOK":{"code":"NOK","number":"578","digits":2,"currency":"Norwegian Krone","countries":["Bouvet Island","Norway","Svalbard and Jan Mayen"]},"NPR":{"code":"NPR","number":"524","digits":2,"currency":"Nepalese Rupee","countries":["Nepal"]},"NZD":{"code":"NZD","number":"554","digits":2,"currency":"New Zealand Dollar","countries":["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},"OMR":{"code":"OMR","number":"512","digits":3,"currency":"Rial Omani","countries":["Oman"]},"PAB":{"code":"PAB","number":"590","digits":2,"currency":"Balboa","countries":["Panama"]},"PEN":{"code":"PEN","number":"604","digits":2,"currency":"Sol","countries":["Peru"]},"PGK":{"code":"PGK","number":"598","digits":2,"currency":"Kina","countries":["Papua New Guinea"]},"PHP":{"code":"PHP","number":"608","digits":2,"currency":"Philippine Peso","countries":["Philippines (The)"]},"PKR":{"code":"PKR","number":"586","digits":2,"currency":"Pakistan Rupee","countries":["Pakistan"]},"PLN":{"code":"PLN","number":"985","digits":2,"currency":"Zloty","countries":["Poland"]},"PYG":{"code":"PYG","number":"600","digits":0,"currency":"Guarani","countries":["Paraguay"]},"QAR":{"code":"QAR","number":"634","digits":2,"currency":"Qatari Rial","countries":["Qatar"]},"RON":{"code":"RON","number":"946","digits":2,"currency":"Romanian Leu","countries":["Romania"]},"RSD":{"code":"RSD","number":"941","digits":2,"currency":"Serbian Dinar","countries":["Serbia"]},"RUB":{"code":"RUB","number":"643","digits":2,"currency":"Russian Ruble","countries":["Russian Federation (The)"]},"RWF":{"code":"RWF","number":"646","digits":0,"currency":"Rwanda Franc","countries":["Rwanda"]},"SAR":{"code":"SAR","number":"682","digits":2,"currency":"Saudi Riyal","countries":["Saudi Arabia"]},"SBD":{"code":"SBD","number":"090","digits":2,"currency":"Solomon Islands Dollar","countries":["Solomon Islands"]},"SCR":{"code":"SCR","number":"690","digits":2,"currency":"Seychelles Rupee","countries":["Seychelles"]},"SDG":{"code":"SDG","number":"938","digits":2,"currency":"Sudanese Pound","countries":["Sudan (The)"]},"SEK":{"code":"SEK","number":"752","digits":2,"currency":"Swedish Krona","countries":["Sweden"]},"SGD":{"code":"SGD","number":"702","digits":2,"currency":"Singapore Dollar","countries":["Singapore"]},"SHP":{"code":"SHP","number":"654","digits":2,"currency":"Saint Helena Pound","countries":["Saint Helena, Ascension and Tristan Da Cunha"]},"SLL":{"code":"SLL","number":"694","digits":2,"currency":"Leone","countries":["Sierra Leone"]},"SOS":{"code":"SOS","number":"706","digits":2,"currency":"Somali Shilling","countries":["Somalia"]},"SRD":{"code":"SRD","number":"968","digits":2,"currency":"Surinam Dollar","countries":["Suriname"]},"SSP":{"code":"SSP","number":"728","digits":2,"currency":"South Sudanese Pound","countries":["South Sudan"]},"STN":{"code":"STN","number":"930","digits":2,"currency":"Dobra","countries":["Sao Tome and Principe"]},"SVC":{"code":"SVC","number":"222","digits":2,"currency":"El Salvador Colon","countries":["El Salvador"]},"SYP":{"code":"SYP","number":"760","digits":2,"currency":"Syrian Pound","countries":["Syrian Arab Republic"]},"SZL":{"code":"SZL","number":"748","digits":2,"currency":"Lilangeni","countries":["Eswatini"]},"THB":{"code":"THB","number":"764","digits":2,"currency":"Baht","countries":["Thailand"]},"TJS":{"code":"TJS","number":"972","digits":2,"currency":"Somoni","countries":["Tajikistan"]},"TMT":{"code":"TMT","number":"934","digits":2,"currency":"Turkmenistan New Manat","countries":["Turkmenistan"]},"TND":{"code":"TND","number":"788","digits":3,"currency":"Tunisian Dinar","countries":["Tunisia"]},"TOP":{"code":"TOP","number":"776","digits":2,"currency":"Pa’anga","countries":["Tonga"]},"TRY":{"code":"TRY","number":"949","digits":2,"currency":"Turkish Lira","countries":["Turkey"]},"TTD":{"code":"TTD","number":"780","digits":2,"currency":"Trinidad and Tobago Dollar","countries":["Trinidad and Tobago"]},"TWD":{"code":"TWD","number":"901","digits":2,"currency":"New Taiwan Dollar","countries":["Taiwan (Province of China)"]},"TZS":{"code":"TZS","number":"834","digits":2,"currency":"Tanzanian Shilling","countries":["Tanzania, United Republic Of"]},"UAH":{"code":"UAH","number":"980","digits":2,"currency":"Hryvnia","countries":["Ukraine"]},"UGX":{"code":"UGX","number":"800","digits":0,"currency":"Uganda Shilling","countries":["Uganda"]},"USD":{"code":"USD","number":"840","digits":2,"currency":"US Dollar","countries":["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (U.S.)"]},"USN":{"code":"USN","number":"997","digits":2,"currency":"US Dollar (Next day)","countries":["United States of America (The)"]},"UYI":{"code":"UYI","number":"940","digits":0,"currency":"Uruguay Peso en Unidades Indexadas (UI)","countries":["Uruguay"]},"UYU":{"code":"UYU","number":"858","digits":2,"currency":"Peso Uruguayo","countries":["Uruguay"]},"UYW":{"code":"UYW","number":"927","digits":4,"currency":"Unidad Previsional","countries":["Uruguay"]},"UZS":{"code":"UZS","number":"860","digits":2,"currency":"Uzbekistan Sum","countries":["Uzbekistan"]},"VES":{"code":"VES","number":"928","digits":2,"currency":"Bol\xedvar Soberano","countries":["Venezuela (Bolivarian Republic Of)"]},"VND":{"code":"VND","number":"704","digits":0,"currency":"Dong","countries":["Viet Nam"]},"VUV":{"code":"VUV","number":"548","digits":0,"currency":"Vatu","countries":["Vanuatu"]},"WST":{"code":"WST","number":"882","digits":2,"currency":"Tala","countries":["Samoa"]},"XAF":{"code":"XAF","number":"950","digits":0,"currency":"CFA Franc BEAC","countries":["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},"XAG":{"code":"XAG","number":"961","digits":0,"currency":"Silver","countries":["Zz11_silver"]},"XAU":{"code":"XAU","number":"959","digits":0,"currency":"Gold","countries":["Zz08_gold"]},"XBA":{"code":"XBA","number":"955","digits":0,"currency":"Bond Markets Unit European Composite Unit (EURCO)","countries":["Zz01_bond Markets Unit European_eurco"]},"XBB":{"code":"XBB","number":"956","digits":0,"currency":"Bond Markets Unit European Monetary Unit (E.M.U.-6)","countries":["Zz02_bond Markets Unit European_emu-6"]},"XBC":{"code":"XBC","number":"957","digits":0,"currency":"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)","countries":["Zz03_bond Markets Unit European_eua-9"]},"XBD":{"code":"XBD","number":"958","digits":0,"currency":"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)","countries":["Zz04_bond Markets Unit European_eua-17"]},"XCD":{"code":"XCD","number":"951","digits":2,"currency":"East Caribbean Dollar","countries":["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},"XDR":{"code":"XDR","number":"960","digits":0,"currency":"SDR (Special Drawing Right)","countries":["International Monetary Fund (Imf) "]},"XOF":{"code":"XOF","number":"952","digits":0,"currency":"CFA Franc BCEAO","countries":["Benin","Burkina Faso","C\xf4te d\'Ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},"XPD":{"code":"XPD","number":"964","digits":0,"currency":"Palladium","countries":["Zz09_palladium"]},"XPF":{"code":"XPF","number":"953","digits":0,"currency":"CFP Franc","countries":["French Polynesia","New Caledonia","Wallis and Futuna"]},"XPT":{"code":"XPT","number":"962","digits":0,"currency":"Platinum","countries":["Zz10_platinum"]},"XSU":{"code":"XSU","number":"994","digits":0,"currency":"Sucre","countries":["Sistema Unitario De Compensacion Regional De Pagos"]},"XTS":{"code":"XTS","number":"963","digits":0,"currency":"Codes specifically reserved for testing purposes","countries":["Zz06_testing_code"]},"XUA":{"code":"XUA","number":"965","digits":0,"currency":"ADB Unit of Account","countries":["Member Countries of the African Development Bank Group"]},"XXX":{"code":"XXX","number":"999","digits":0,"currency":"The codes assigned for transactions where no currency is involved","countries":["Zz07_no_currency"]},"YER":{"code":"YER","number":"886","digits":2,"currency":"Yemeni Rial","countries":["Yemen"]},"ZAR":{"code":"ZAR","number":"710","digits":2,"currency":"Rand","countries":["Lesotho","Namibia","South Africa"]},"ZMW":{"code":"ZMW","number":"967","digits":2,"currency":"Zambian Kwacha","countries":["Zambia"]},"ZWL":{"code":"ZWL","number":"932","digits":2,"currency":"Zimbabwe Dollar","countries":["Zimbabwe"]}}');
|
|
111
|
+
var $76c6d130496b900c$exports = {};
|
|
112
|
+
$76c6d130496b900c$exports = JSON.parse('{"AED":{"code":"AED","number":"784","digits":2,"currency":"UAE Dirham","countries":["United Arab Emirates (The)"]},"AFN":{"code":"AFN","number":"971","digits":2,"currency":"Afghani","countries":["Afghanistan"]},"ALL":{"code":"ALL","number":"008","digits":2,"currency":"Lek","countries":["Albania"]},"AMD":{"code":"AMD","number":"051","digits":2,"currency":"Armenian Dram","countries":["Armenia"]},"ANG":{"code":"ANG","number":"532","digits":2,"currency":"Netherlands Antillean Guilder","countries":["Cura\xe7ao","Sint Maarten (Dutch Part)"]},"AOA":{"code":"AOA","number":"973","digits":2,"currency":"Kwanza","countries":["Angola"]},"ARS":{"code":"ARS","number":"032","digits":2,"currency":"Argentine Peso","countries":["Argentina"]},"AUD":{"code":"AUD","number":"036","digits":2,"currency":"Australian Dollar","countries":["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},"AWG":{"code":"AWG","number":"533","digits":2,"currency":"Aruban Florin","countries":["Aruba"]},"AZN":{"code":"AZN","number":"944","digits":2,"currency":"Azerbaijan Manat","countries":["Azerbaijan"]},"BAM":{"code":"BAM","number":"977","digits":2,"currency":"Convertible Mark","countries":["Bosnia and Herzegovina"]},"BBD":{"code":"BBD","number":"052","digits":2,"currency":"Barbados Dollar","countries":["Barbados"]},"BDT":{"code":"BDT","number":"050","digits":2,"currency":"Taka","countries":["Bangladesh"]},"BGN":{"code":"BGN","number":"975","digits":2,"currency":"Bulgarian Lev","countries":["Bulgaria"]},"BHD":{"code":"BHD","number":"048","digits":3,"currency":"Bahraini Dinar","countries":["Bahrain"]},"BIF":{"code":"BIF","number":"108","digits":0,"currency":"Burundi Franc","countries":["Burundi"]},"BMD":{"code":"BMD","number":"060","digits":2,"currency":"Bermudian Dollar","countries":["Bermuda"]},"BND":{"code":"BND","number":"096","digits":2,"currency":"Brunei Dollar","countries":["Brunei Darussalam"]},"BOB":{"code":"BOB","number":"068","digits":2,"currency":"Boliviano","countries":["Bolivia (Plurinational State Of)"]},"BOV":{"code":"BOV","number":"984","digits":2,"currency":"Mvdol","countries":["Bolivia (Plurinational State Of)"]},"BRL":{"code":"BRL","number":"986","digits":2,"currency":"Brazilian Real","countries":["Brazil"]},"BSD":{"code":"BSD","number":"044","digits":2,"currency":"Bahamian Dollar","countries":["Bahamas (The)"]},"BTN":{"code":"BTN","number":"064","digits":2,"currency":"Ngultrum","countries":["Bhutan"]},"BWP":{"code":"BWP","number":"072","digits":2,"currency":"Pula","countries":["Botswana"]},"BYN":{"code":"BYN","number":"933","digits":2,"currency":"Belarusian Ruble","countries":["Belarus"]},"BZD":{"code":"BZD","number":"084","digits":2,"currency":"Belize Dollar","countries":["Belize"]},"CAD":{"code":"CAD","number":"124","digits":2,"currency":"Canadian Dollar","countries":["Canada"]},"CDF":{"code":"CDF","number":"976","digits":2,"currency":"Congolese Franc","countries":["Congo (The Democratic Republic of The)"]},"CHE":{"code":"CHE","number":"947","digits":2,"currency":"WIR Euro","countries":["Switzerland"]},"CHF":{"code":"CHF","number":"756","digits":2,"currency":"Swiss Franc","countries":["Liechtenstein","Switzerland"]},"CHW":{"code":"CHW","number":"948","digits":2,"currency":"WIR Franc","countries":["Switzerland"]},"CLF":{"code":"CLF","number":"990","digits":4,"currency":"Unidad de Fomento","countries":["Chile"]},"CLP":{"code":"CLP","number":"152","digits":0,"currency":"Chilean Peso","countries":["Chile"]},"CNY":{"code":"CNY","number":"156","digits":2,"currency":"Yuan Renminbi","countries":["China"]},"COP":{"code":"COP","number":"170","digits":2,"currency":"Colombian Peso","countries":["Colombia"]},"COU":{"code":"COU","number":"970","digits":2,"currency":"Unidad de Valor Real","countries":["Colombia"]},"CRC":{"code":"CRC","number":"188","digits":2,"currency":"Costa Rican Colon","countries":["Costa Rica"]},"CUC":{"code":"CUC","number":"931","digits":2,"currency":"Peso Convertible","countries":["Cuba"]},"CUP":{"code":"CUP","number":"192","digits":2,"currency":"Cuban Peso","countries":["Cuba"]},"CVE":{"code":"CVE","number":"132","digits":2,"currency":"Cabo Verde Escudo","countries":["Cabo Verde"]},"CZK":{"code":"CZK","number":"203","digits":2,"currency":"Czech Koruna","countries":["Czechia"]},"DJF":{"code":"DJF","number":"262","digits":0,"currency":"Djibouti Franc","countries":["Djibouti"]},"DKK":{"code":"DKK","number":"208","digits":2,"currency":"Danish Krone","countries":["Denmark","Faroe Islands (The)","Greenland"]},"DOP":{"code":"DOP","number":"214","digits":2,"currency":"Dominican Peso","countries":["Dominican Republic (The)"]},"DZD":{"code":"DZD","number":"012","digits":2,"currency":"Algerian Dinar","countries":["Algeria"]},"EGP":{"code":"EGP","number":"818","digits":2,"currency":"Egyptian Pound","countries":["Egypt"]},"ERN":{"code":"ERN","number":"232","digits":2,"currency":"Nakfa","countries":["Eritrea"]},"ETB":{"code":"ETB","number":"230","digits":2,"currency":"Ethiopian Birr","countries":["Ethiopia"]},"EUR":{"code":"EUR","number":"978","digits":2,"currency":"Euro","countries":["\xc5land Islands","Andorra","Austria","Belgium","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","R\xe9union","Saint Barth\xe9lemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},"FJD":{"code":"FJD","number":"242","digits":2,"currency":"Fiji Dollar","countries":["Fiji"]},"FKP":{"code":"FKP","number":"238","digits":2,"currency":"Falkland Islands Pound","countries":["Falkland Islands (The) [Malvinas]"]},"GBP":{"code":"GBP","number":"826","digits":2,"currency":"Pound Sterling","countries":["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},"GEL":{"code":"GEL","number":"981","digits":2,"currency":"Lari","countries":["Georgia"]},"GHS":{"code":"GHS","number":"936","digits":2,"currency":"Ghana Cedi","countries":["Ghana"]},"GIP":{"code":"GIP","number":"292","digits":2,"currency":"Gibraltar Pound","countries":["Gibraltar"]},"GMD":{"code":"GMD","number":"270","digits":2,"currency":"Dalasi","countries":["Gambia (The)"]},"GNF":{"code":"GNF","number":"324","digits":0,"currency":"Guinean Franc","countries":["Guinea"]},"GTQ":{"code":"GTQ","number":"320","digits":2,"currency":"Quetzal","countries":["Guatemala"]},"GYD":{"code":"GYD","number":"328","digits":2,"currency":"Guyana Dollar","countries":["Guyana"]},"HKD":{"code":"HKD","number":"344","digits":2,"currency":"Hong Kong Dollar","countries":["Hong Kong"]},"HNL":{"code":"HNL","number":"340","digits":2,"currency":"Lempira","countries":["Honduras"]},"HRK":{"code":"HRK","number":"191","digits":2,"currency":"Kuna","countries":["Croatia"]},"HTG":{"code":"HTG","number":"332","digits":2,"currency":"Gourde","countries":["Haiti"]},"HUF":{"code":"HUF","number":"348","digits":2,"currency":"Forint","countries":["Hungary"]},"IDR":{"code":"IDR","number":"360","digits":2,"currency":"Rupiah","countries":["Indonesia"]},"ILS":{"code":"ILS","number":"376","digits":2,"currency":"New Israeli Sheqel","countries":["Israel"]},"INR":{"code":"INR","number":"356","digits":2,"currency":"Indian Rupee","countries":["Bhutan","India"]},"IQD":{"code":"IQD","number":"368","digits":3,"currency":"Iraqi Dinar","countries":["Iraq"]},"IRR":{"code":"IRR","number":"364","digits":2,"currency":"Iranian Rial","countries":["Iran (Islamic Republic Of)"]},"ISK":{"code":"ISK","number":"352","digits":0,"currency":"Iceland Krona","countries":["Iceland"]},"JMD":{"code":"JMD","number":"388","digits":2,"currency":"Jamaican Dollar","countries":["Jamaica"]},"JOD":{"code":"JOD","number":"400","digits":3,"currency":"Jordanian Dinar","countries":["Jordan"]},"JPY":{"code":"JPY","number":"392","digits":0,"currency":"Yen","countries":["Japan"]},"KES":{"code":"KES","number":"404","digits":2,"currency":"Kenyan Shilling","countries":["Kenya"]},"KGS":{"code":"KGS","number":"417","digits":2,"currency":"Som","countries":["Kyrgyzstan"]},"KHR":{"code":"KHR","number":"116","digits":2,"currency":"Riel","countries":["Cambodia"]},"KMF":{"code":"KMF","number":"174","digits":0,"currency":"Comorian Franc ","countries":["Comoros (The)"]},"KPW":{"code":"KPW","number":"408","digits":2,"currency":"North Korean Won","countries":["Korea (The Democratic People’s Republic Of)"]},"KRW":{"code":"KRW","number":"410","digits":0,"currency":"Won","countries":["Korea (The Republic Of)"]},"KWD":{"code":"KWD","number":"414","digits":3,"currency":"Kuwaiti Dinar","countries":["Kuwait"]},"KYD":{"code":"KYD","number":"136","digits":2,"currency":"Cayman Islands Dollar","countries":["Cayman Islands (The)"]},"KZT":{"code":"KZT","number":"398","digits":2,"currency":"Tenge","countries":["Kazakhstan"]},"LAK":{"code":"LAK","number":"418","digits":2,"currency":"Lao Kip","countries":["Lao People’s Democratic Republic (The)"]},"LBP":{"code":"LBP","number":"422","digits":2,"currency":"Lebanese Pound","countries":["Lebanon"]},"LKR":{"code":"LKR","number":"144","digits":2,"currency":"Sri Lanka Rupee","countries":["Sri Lanka"]},"LRD":{"code":"LRD","number":"430","digits":2,"currency":"Liberian Dollar","countries":["Liberia"]},"LSL":{"code":"LSL","number":"426","digits":2,"currency":"Loti","countries":["Lesotho"]},"LYD":{"code":"LYD","number":"434","digits":3,"currency":"Libyan Dinar","countries":["Libya"]},"MAD":{"code":"MAD","number":"504","digits":2,"currency":"Moroccan Dirham","countries":["Morocco","Western Sahara"]},"MDL":{"code":"MDL","number":"498","digits":2,"currency":"Moldovan Leu","countries":["Moldova (The Republic Of)"]},"MGA":{"code":"MGA","number":"969","digits":2,"currency":"Malagasy Ariary","countries":["Madagascar"]},"MKD":{"code":"MKD","number":"807","digits":2,"currency":"Denar","countries":["Macedonia (The Former Yugoslav Republic Of)"]},"MMK":{"code":"MMK","number":"104","digits":2,"currency":"Kyat","countries":["Myanmar"]},"MNT":{"code":"MNT","number":"496","digits":2,"currency":"Tugrik","countries":["Mongolia"]},"MOP":{"code":"MOP","number":"446","digits":2,"currency":"Pataca","countries":["Macao"]},"MRU":{"code":"MRU","number":"929","digits":2,"currency":"Ouguiya","countries":["Mauritania"]},"MUR":{"code":"MUR","number":"480","digits":2,"currency":"Mauritius Rupee","countries":["Mauritius"]},"MVR":{"code":"MVR","number":"462","digits":2,"currency":"Rufiyaa","countries":["Maldives"]},"MWK":{"code":"MWK","number":"454","digits":2,"currency":"Malawi Kwacha","countries":["Malawi"]},"MXN":{"code":"MXN","number":"484","digits":2,"currency":"Mexican Peso","countries":["Mexico"]},"MXV":{"code":"MXV","number":"979","digits":2,"currency":"Mexican Unidad de Inversion (UDI)","countries":["Mexico"]},"MYR":{"code":"MYR","number":"458","digits":2,"currency":"Malaysian Ringgit","countries":["Malaysia"]},"MZN":{"code":"MZN","number":"943","digits":2,"currency":"Mozambique Metical","countries":["Mozambique"]},"NAD":{"code":"NAD","number":"516","digits":2,"currency":"Namibia Dollar","countries":["Namibia"]},"NGN":{"code":"NGN","number":"566","digits":2,"currency":"Naira","countries":["Nigeria"]},"NIO":{"code":"NIO","number":"558","digits":2,"currency":"Cordoba Oro","countries":["Nicaragua"]},"NOK":{"code":"NOK","number":"578","digits":2,"currency":"Norwegian Krone","countries":["Bouvet Island","Norway","Svalbard and Jan Mayen"]},"NPR":{"code":"NPR","number":"524","digits":2,"currency":"Nepalese Rupee","countries":["Nepal"]},"NZD":{"code":"NZD","number":"554","digits":2,"currency":"New Zealand Dollar","countries":["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},"OMR":{"code":"OMR","number":"512","digits":3,"currency":"Rial Omani","countries":["Oman"]},"PAB":{"code":"PAB","number":"590","digits":2,"currency":"Balboa","countries":["Panama"]},"PEN":{"code":"PEN","number":"604","digits":2,"currency":"Sol","countries":["Peru"]},"PGK":{"code":"PGK","number":"598","digits":2,"currency":"Kina","countries":["Papua New Guinea"]},"PHP":{"code":"PHP","number":"608","digits":2,"currency":"Philippine Peso","countries":["Philippines (The)"]},"PKR":{"code":"PKR","number":"586","digits":2,"currency":"Pakistan Rupee","countries":["Pakistan"]},"PLN":{"code":"PLN","number":"985","digits":2,"currency":"Zloty","countries":["Poland"]},"PYG":{"code":"PYG","number":"600","digits":0,"currency":"Guarani","countries":["Paraguay"]},"QAR":{"code":"QAR","number":"634","digits":2,"currency":"Qatari Rial","countries":["Qatar"]},"RON":{"code":"RON","number":"946","digits":2,"currency":"Romanian Leu","countries":["Romania"]},"RSD":{"code":"RSD","number":"941","digits":2,"currency":"Serbian Dinar","countries":["Serbia"]},"RUB":{"code":"RUB","number":"643","digits":2,"currency":"Russian Ruble","countries":["Russian Federation (The)"]},"RWF":{"code":"RWF","number":"646","digits":0,"currency":"Rwanda Franc","countries":["Rwanda"]},"SAR":{"code":"SAR","number":"682","digits":2,"currency":"Saudi Riyal","countries":["Saudi Arabia"]},"SBD":{"code":"SBD","number":"090","digits":2,"currency":"Solomon Islands Dollar","countries":["Solomon Islands"]},"SCR":{"code":"SCR","number":"690","digits":2,"currency":"Seychelles Rupee","countries":["Seychelles"]},"SDG":{"code":"SDG","number":"938","digits":2,"currency":"Sudanese Pound","countries":["Sudan (The)"]},"SEK":{"code":"SEK","number":"752","digits":2,"currency":"Swedish Krona","countries":["Sweden"]},"SGD":{"code":"SGD","number":"702","digits":2,"currency":"Singapore Dollar","countries":["Singapore"]},"SHP":{"code":"SHP","number":"654","digits":2,"currency":"Saint Helena Pound","countries":["Saint Helena, Ascension and Tristan Da Cunha"]},"SLL":{"code":"SLL","number":"694","digits":2,"currency":"Leone","countries":["Sierra Leone"]},"SOS":{"code":"SOS","number":"706","digits":2,"currency":"Somali Shilling","countries":["Somalia"]},"SRD":{"code":"SRD","number":"968","digits":2,"currency":"Surinam Dollar","countries":["Suriname"]},"SSP":{"code":"SSP","number":"728","digits":2,"currency":"South Sudanese Pound","countries":["South Sudan"]},"STN":{"code":"STN","number":"930","digits":2,"currency":"Dobra","countries":["Sao Tome and Principe"]},"SVC":{"code":"SVC","number":"222","digits":2,"currency":"El Salvador Colon","countries":["El Salvador"]},"SYP":{"code":"SYP","number":"760","digits":2,"currency":"Syrian Pound","countries":["Syrian Arab Republic"]},"SZL":{"code":"SZL","number":"748","digits":2,"currency":"Lilangeni","countries":["Eswatini"]},"THB":{"code":"THB","number":"764","digits":2,"currency":"Baht","countries":["Thailand"]},"TJS":{"code":"TJS","number":"972","digits":2,"currency":"Somoni","countries":["Tajikistan"]},"TMT":{"code":"TMT","number":"934","digits":2,"currency":"Turkmenistan New Manat","countries":["Turkmenistan"]},"TND":{"code":"TND","number":"788","digits":3,"currency":"Tunisian Dinar","countries":["Tunisia"]},"TOP":{"code":"TOP","number":"776","digits":2,"currency":"Pa’anga","countries":["Tonga"]},"TRY":{"code":"TRY","number":"949","digits":2,"currency":"Turkish Lira","countries":["Turkey"]},"TTD":{"code":"TTD","number":"780","digits":2,"currency":"Trinidad and Tobago Dollar","countries":["Trinidad and Tobago"]},"TWD":{"code":"TWD","number":"901","digits":2,"currency":"New Taiwan Dollar","countries":["Taiwan (Province of China)"]},"TZS":{"code":"TZS","number":"834","digits":2,"currency":"Tanzanian Shilling","countries":["Tanzania, United Republic Of"]},"UAH":{"code":"UAH","number":"980","digits":2,"currency":"Hryvnia","countries":["Ukraine"]},"UGX":{"code":"UGX","number":"800","digits":0,"currency":"Uganda Shilling","countries":["Uganda"]},"USD":{"code":"USD","number":"840","digits":2,"currency":"US Dollar","countries":["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (U.S.)"]},"USN":{"code":"USN","number":"997","digits":2,"currency":"US Dollar (Next day)","countries":["United States of America (The)"]},"UYI":{"code":"UYI","number":"940","digits":0,"currency":"Uruguay Peso en Unidades Indexadas (UI)","countries":["Uruguay"]},"UYU":{"code":"UYU","number":"858","digits":2,"currency":"Peso Uruguayo","countries":["Uruguay"]},"UYW":{"code":"UYW","number":"927","digits":4,"currency":"Unidad Previsional","countries":["Uruguay"]},"UZS":{"code":"UZS","number":"860","digits":2,"currency":"Uzbekistan Sum","countries":["Uzbekistan"]},"VES":{"code":"VES","number":"928","digits":2,"currency":"Bol\xedvar Soberano","countries":["Venezuela (Bolivarian Republic Of)"]},"VND":{"code":"VND","number":"704","digits":0,"currency":"Dong","countries":["Viet Nam"]},"VUV":{"code":"VUV","number":"548","digits":0,"currency":"Vatu","countries":["Vanuatu"]},"WST":{"code":"WST","number":"882","digits":2,"currency":"Tala","countries":["Samoa"]},"XAF":{"code":"XAF","number":"950","digits":0,"currency":"CFA Franc BEAC","countries":["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},"XAG":{"code":"XAG","number":"961","digits":0,"currency":"Silver","countries":["Zz11_silver"]},"XAU":{"code":"XAU","number":"959","digits":0,"currency":"Gold","countries":["Zz08_gold"]},"XBA":{"code":"XBA","number":"955","digits":0,"currency":"Bond Markets Unit European Composite Unit (EURCO)","countries":["Zz01_bond Markets Unit European_eurco"]},"XBB":{"code":"XBB","number":"956","digits":0,"currency":"Bond Markets Unit European Monetary Unit (E.M.U.-6)","countries":["Zz02_bond Markets Unit European_emu-6"]},"XBC":{"code":"XBC","number":"957","digits":0,"currency":"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)","countries":["Zz03_bond Markets Unit European_eua-9"]},"XBD":{"code":"XBD","number":"958","digits":0,"currency":"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)","countries":["Zz04_bond Markets Unit European_eua-17"]},"XCD":{"code":"XCD","number":"951","digits":2,"currency":"East Caribbean Dollar","countries":["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},"XDR":{"code":"XDR","number":"960","digits":0,"currency":"SDR (Special Drawing Right)","countries":["International Monetary Fund (Imf) "]},"XOF":{"code":"XOF","number":"952","digits":0,"currency":"CFA Franc BCEAO","countries":["Benin","Burkina Faso","C\xf4te d\'Ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},"XPD":{"code":"XPD","number":"964","digits":0,"currency":"Palladium","countries":["Zz09_palladium"]},"XPF":{"code":"XPF","number":"953","digits":0,"currency":"CFP Franc","countries":["French Polynesia","New Caledonia","Wallis and Futuna"]},"XPT":{"code":"XPT","number":"962","digits":0,"currency":"Platinum","countries":["Zz10_platinum"]},"XSU":{"code":"XSU","number":"994","digits":0,"currency":"Sucre","countries":["Sistema Unitario De Compensacion Regional De Pagos"]},"XTS":{"code":"XTS","number":"963","digits":0,"currency":"Codes specifically reserved for testing purposes","countries":["Zz06_testing_code"]},"XUA":{"code":"XUA","number":"965","digits":0,"currency":"ADB Unit of Account","countries":["Member Countries of the African Development Bank Group"]},"XXX":{"code":"XXX","number":"999","digits":0,"currency":"The codes assigned for transactions where no currency is involved","countries":["Zz07_no_currency"]},"YER":{"code":"YER","number":"886","digits":2,"currency":"Yemeni Rial","countries":["Yemen"]},"ZAR":{"code":"ZAR","number":"710","digits":2,"currency":"Rand","countries":["Lesotho","Namibia","South Africa"]},"ZMW":{"code":"ZMW","number":"967","digits":2,"currency":"Zambian Kwacha","countries":["Zambia"]},"ZWL":{"code":"ZWL","number":"932","digits":2,"currency":"Zimbabwe Dollar","countries":["Zimbabwe"]}}');
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
function $
|
|
116
|
-
if ((0, $
|
|
115
|
+
function $65782232fbed9203$var$convertCurrencyFromSubunit(arg, currencyCode) {
|
|
116
|
+
if ((0, $3zTl3$lodash.isNil)(arg)) return arg;
|
|
117
117
|
// @ts-ignore
|
|
118
|
-
if ((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
118
|
+
if ((0, (/*@__PURE__*/$parcel$interopDefault($76c6d130496b900c$exports)))[currencyCode]) {
|
|
119
119
|
const amount = parseFloat(arg);
|
|
120
120
|
// @ts-ignore
|
|
121
|
-
const subunit = (0, (/*@__PURE__*/$parcel$interopDefault($
|
|
121
|
+
const subunit = (0, (/*@__PURE__*/$parcel$interopDefault($76c6d130496b900c$exports)))[currencyCode].digits;
|
|
122
122
|
return (amount / Math.pow(10, subunit)).toFixed(subunit);
|
|
123
123
|
}
|
|
124
124
|
return arg;
|
|
125
125
|
}
|
|
126
|
-
var $
|
|
126
|
+
var $65782232fbed9203$export$2e2bcd8739ae039 = $65782232fbed9203$var$convertCurrencyFromSubunit;
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
function $
|
|
132
|
-
if ((0, $
|
|
131
|
+
function $a08ac2c1f19b49f6$var$convertCurrencyToSubunit(arg, currencyCode) {
|
|
132
|
+
if ((0, $3zTl3$lodash.isNil)(arg)) return arg;
|
|
133
133
|
// @ts-ignore
|
|
134
|
-
if ((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
134
|
+
if ((0, (/*@__PURE__*/$parcel$interopDefault($76c6d130496b900c$exports)))[currencyCode]) {
|
|
135
135
|
const amount = parseFloat(arg);
|
|
136
136
|
// @ts-ignore
|
|
137
|
-
const subunit = (0, (/*@__PURE__*/$parcel$interopDefault($
|
|
137
|
+
const subunit = (0, (/*@__PURE__*/$parcel$interopDefault($76c6d130496b900c$exports)))[currencyCode].digits;
|
|
138
138
|
return Math.floor(amount * Math.pow(10, subunit));
|
|
139
139
|
}
|
|
140
140
|
return arg;
|
|
141
141
|
}
|
|
142
|
-
var $
|
|
142
|
+
var $a08ac2c1f19b49f6$export$2e2bcd8739ae039 = $a08ac2c1f19b49f6$var$convertCurrencyToSubunit;
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
// @ts-ignore
|
|
146
146
|
|
|
147
|
-
var $
|
|
148
|
-
function $
|
|
147
|
+
var $2850686b1ab93df3$var$highlightRegExp = /highlight-(?:(?:text|source)-)?([a-z0-9]+)/;
|
|
148
|
+
function $2850686b1ab93df3$export$c359330ed80b1889(turndownService) {
|
|
149
149
|
turndownService.addRule("highlightedCodeBlock", {
|
|
150
150
|
filter: function(node) {
|
|
151
151
|
var firstChild = node.firstChild;
|
|
152
|
-
return node.nodeName === "DIV" && $
|
|
152
|
+
return node.nodeName === "DIV" && $2850686b1ab93df3$var$highlightRegExp.test(node.className) && firstChild && firstChild.nodeName === "PRE";
|
|
153
153
|
},
|
|
154
154
|
replacement: function(content, node, options) {
|
|
155
155
|
var className = node.className || "";
|
|
156
|
-
var language = (className.match($
|
|
156
|
+
var language = (className.match($2850686b1ab93df3$var$highlightRegExp) || [
|
|
157
157
|
null,
|
|
158
158
|
""
|
|
159
159
|
])[1];
|
|
@@ -161,7 +161,7 @@ function $e097920682cf8954$export$c359330ed80b1889(turndownService) {
|
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
function $
|
|
164
|
+
function $2850686b1ab93df3$export$19426ff118fe8be(turndownService) {
|
|
165
165
|
turndownService.addRule("strikethrough", {
|
|
166
166
|
filter: [
|
|
167
167
|
"del",
|
|
@@ -173,20 +173,20 @@ function $e097920682cf8954$export$19426ff118fe8be(turndownService) {
|
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
var $
|
|
177
|
-
function $
|
|
176
|
+
var $2850686b1ab93df3$var$rules = {};
|
|
177
|
+
function $2850686b1ab93df3$var$cleanCellContent(content) {
|
|
178
178
|
if (!content) return " ";
|
|
179
179
|
let cleaned = content.trim().replace(/\s+/g, " ").replace(/\|/g, "\\|").replace(/\\/g, "\\\\").replace(/\n+/g, " ").replace(/\r+/g, " ");
|
|
180
180
|
if (!cleaned || cleaned.match(/^\s*$/)) return " ";
|
|
181
181
|
if (cleaned.length < 3) cleaned += " ".repeat(3 - cleaned.length);
|
|
182
182
|
return cleaned;
|
|
183
183
|
}
|
|
184
|
-
function $
|
|
184
|
+
function $2850686b1ab93df3$var$cell(content, node, index) {
|
|
185
185
|
if (index === null && node && node.parentNode) index = Array.prototype.indexOf.call(node.parentNode.childNodes, node);
|
|
186
186
|
if (index === null) index = 0;
|
|
187
187
|
var prefix = " ";
|
|
188
188
|
if (index === 0) prefix = "| ";
|
|
189
|
-
let cellContent = $
|
|
189
|
+
let cellContent = $2850686b1ab93df3$var$cleanCellContent(content);
|
|
190
190
|
let colspan = 1;
|
|
191
191
|
if (node && node.getAttribute) {
|
|
192
192
|
colspan = parseInt(node.getAttribute("colspan") || "1", 10);
|
|
@@ -196,7 +196,7 @@ function $e097920682cf8954$var$cell(content, node, index) {
|
|
|
196
196
|
for(let i = 1; i < colspan; i++)result += " |";
|
|
197
197
|
return result;
|
|
198
198
|
}
|
|
199
|
-
function $
|
|
199
|
+
function $2850686b1ab93df3$var$isHeadingRow(tr) {
|
|
200
200
|
if (!tr || !tr.parentNode) return false;
|
|
201
201
|
var parentNode = tr.parentNode;
|
|
202
202
|
if (parentNode.nodeName === "THEAD") return true;
|
|
@@ -211,7 +211,7 @@ function $e097920682cf8954$var$isHeadingRow(tr) {
|
|
|
211
211
|
}
|
|
212
212
|
return false;
|
|
213
213
|
}
|
|
214
|
-
function $
|
|
214
|
+
function $2850686b1ab93df3$var$getTableColCount(table) {
|
|
215
215
|
if (!table || !table.rows) return 0;
|
|
216
216
|
let maxCols = 0;
|
|
217
217
|
for(let i = 0; i < table.rows.length; i++){
|
|
@@ -229,7 +229,7 @@ function $e097920682cf8954$var$getTableColCount(table) {
|
|
|
229
229
|
}
|
|
230
230
|
return maxCols;
|
|
231
231
|
}
|
|
232
|
-
function $
|
|
232
|
+
function $2850686b1ab93df3$var$shouldSkipTable(table) {
|
|
233
233
|
if (!table) return true;
|
|
234
234
|
if (!table.rows || table.rows.length === 0) return true;
|
|
235
235
|
let contentCells = 0;
|
|
@@ -249,24 +249,24 @@ function $e097920682cf8954$var$shouldSkipTable(table) {
|
|
|
249
249
|
if (totalCells === 1 && contentCells === 0) return true;
|
|
250
250
|
return false;
|
|
251
251
|
}
|
|
252
|
-
$
|
|
252
|
+
$2850686b1ab93df3$var$rules.tableCell = {
|
|
253
253
|
filter: [
|
|
254
254
|
"th",
|
|
255
255
|
"td"
|
|
256
256
|
],
|
|
257
257
|
replacement: function(content, node) {
|
|
258
|
-
return $
|
|
258
|
+
return $2850686b1ab93df3$var$cell(content, node, null);
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
|
-
$
|
|
261
|
+
$2850686b1ab93df3$var$rules.tableRow = {
|
|
262
262
|
filter: "tr",
|
|
263
263
|
replacement: function(content, node) {
|
|
264
264
|
if (!content || !content.trim()) return "";
|
|
265
265
|
var borderCells = "";
|
|
266
|
-
if ($
|
|
266
|
+
if ($2850686b1ab93df3$var$isHeadingRow(node)) {
|
|
267
267
|
const table = node.closest("table");
|
|
268
268
|
if (table) {
|
|
269
|
-
const colCount = $
|
|
269
|
+
const colCount = $2850686b1ab93df3$var$getTableColCount(table);
|
|
270
270
|
if (colCount > 0) for(var i = 0; i < colCount; i++){
|
|
271
271
|
const prefix = i === 0 ? "| " : " ";
|
|
272
272
|
borderCells += prefix + "--- |";
|
|
@@ -276,10 +276,10 @@ $e097920682cf8954$var$rules.tableRow = {
|
|
|
276
276
|
return "\n" + content + (borderCells ? "\n" + borderCells : "");
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
$
|
|
279
|
+
$2850686b1ab93df3$var$rules.table = {
|
|
280
280
|
filter: "table",
|
|
281
281
|
replacement: function(content, node) {
|
|
282
|
-
if ($
|
|
282
|
+
if ($2850686b1ab93df3$var$shouldSkipTable(node)) return "";
|
|
283
283
|
content = content.replace(/\n+/g, "\n").trim();
|
|
284
284
|
if (!content) return "";
|
|
285
285
|
const lines = content.split("\n").filter((line)=>line.trim());
|
|
@@ -303,7 +303,7 @@ $e097920682cf8954$var$rules.table = {
|
|
|
303
303
|
return "\n\n" + result + "\n\n";
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
|
-
$
|
|
306
|
+
$2850686b1ab93df3$var$rules.tableSection = {
|
|
307
307
|
filter: [
|
|
308
308
|
"thead",
|
|
309
309
|
"tbody",
|
|
@@ -313,7 +313,7 @@ $e097920682cf8954$var$rules.tableSection = {
|
|
|
313
313
|
return content;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
$
|
|
316
|
+
$2850686b1ab93df3$var$rules.tableCaption = {
|
|
317
317
|
filter: [
|
|
318
318
|
"caption"
|
|
319
319
|
],
|
|
@@ -321,7 +321,7 @@ $e097920682cf8954$var$rules.tableCaption = {
|
|
|
321
321
|
return "";
|
|
322
322
|
}
|
|
323
323
|
};
|
|
324
|
-
$
|
|
324
|
+
$2850686b1ab93df3$var$rules.tableColgroup = {
|
|
325
325
|
filter: [
|
|
326
326
|
"colgroup",
|
|
327
327
|
"col"
|
|
@@ -330,10 +330,10 @@ $e097920682cf8954$var$rules.tableColgroup = {
|
|
|
330
330
|
return "";
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
|
-
function $
|
|
334
|
-
for(var key in $
|
|
333
|
+
function $2850686b1ab93df3$export$cc4ff83fc7bd256e(turndownService) {
|
|
334
|
+
for(var key in $2850686b1ab93df3$var$rules)turndownService.addRule(key, $2850686b1ab93df3$var$rules[key]);
|
|
335
335
|
}
|
|
336
|
-
function $
|
|
336
|
+
function $2850686b1ab93df3$export$1f0c2747e2ba0b8d(turndownService) {
|
|
337
337
|
turndownService.addRule("taskListItems", {
|
|
338
338
|
filter: function(node) {
|
|
339
339
|
return node.type === "checkbox" && node.parentNode.nodeName === "LI";
|
|
@@ -343,29 +343,29 @@ function $e097920682cf8954$export$1f0c2747e2ba0b8d(turndownService) {
|
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
|
-
function $
|
|
346
|
+
function $2850686b1ab93df3$export$2e2bcd8739ae039(turndownService) {
|
|
347
347
|
turndownService.use([
|
|
348
|
-
$
|
|
349
|
-
$
|
|
350
|
-
$
|
|
351
|
-
$
|
|
348
|
+
$2850686b1ab93df3$export$c359330ed80b1889,
|
|
349
|
+
$2850686b1ab93df3$export$19426ff118fe8be,
|
|
350
|
+
$2850686b1ab93df3$export$cc4ff83fc7bd256e,
|
|
351
|
+
$2850686b1ab93df3$export$1f0c2747e2ba0b8d
|
|
352
352
|
]);
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
|
|
356
356
|
|
|
357
|
-
const $
|
|
358
|
-
const htmlDoc = (0, $
|
|
359
|
-
const turndownService = new (0, ($parcel$interopDefault($
|
|
360
|
-
turndownService.use((0, $
|
|
357
|
+
const $32dbd29821d4a1cf$var$convertHtmlToMarkdown = (html)=>{
|
|
358
|
+
const htmlDoc = (0, $3zTl3$mixmarkiodomino.createDocument)(html);
|
|
359
|
+
const turndownService = new (0, ($parcel$interopDefault($3zTl3$turndown)))();
|
|
360
|
+
turndownService.use((0, $2850686b1ab93df3$export$2e2bcd8739ae039));
|
|
361
361
|
return turndownService.turndown(htmlDoc);
|
|
362
362
|
};
|
|
363
|
-
var $
|
|
363
|
+
var $32dbd29821d4a1cf$export$2e2bcd8739ae039 = $32dbd29821d4a1cf$var$convertHtmlToMarkdown;
|
|
364
364
|
|
|
365
365
|
|
|
366
366
|
|
|
367
367
|
|
|
368
|
-
function $
|
|
368
|
+
function $812412d70a86d960$var$decodeHtmlEntities(encodedString) {
|
|
369
369
|
const htmlEntities = {
|
|
370
370
|
"&": "&",
|
|
371
371
|
"<": "<",
|
|
@@ -379,24 +379,24 @@ function $1fb4a66b7688f326$var$decodeHtmlEntities(encodedString) {
|
|
|
379
379
|
};
|
|
380
380
|
return encodedString.replace(/&|<|>|"|'|/|\|`|=/g, (match)=>htmlEntities[match]);
|
|
381
381
|
}
|
|
382
|
-
var $
|
|
382
|
+
var $812412d70a86d960$export$2e2bcd8739ae039 = $812412d70a86d960$var$decodeHtmlEntities;
|
|
383
383
|
|
|
384
384
|
|
|
385
385
|
|
|
386
|
-
const $
|
|
387
|
-
return (0, $
|
|
386
|
+
const $eac07309d5e355a6$var$insertBetween = (arr, value)=>{
|
|
387
|
+
return (0, $3zTl3$lodash.flatMap)(arr, (item, index)=>{
|
|
388
388
|
return index === arr.length - 1 ? [
|
|
389
389
|
item
|
|
390
390
|
] : [
|
|
391
391
|
item,
|
|
392
|
-
...(0, $
|
|
392
|
+
...(0, $3zTl3$lodash.castArray)(value)
|
|
393
393
|
];
|
|
394
394
|
});
|
|
395
395
|
};
|
|
396
|
-
var $
|
|
396
|
+
var $eac07309d5e355a6$export$2e2bcd8739ae039 = $eac07309d5e355a6$var$insertBetween;
|
|
397
397
|
|
|
398
398
|
|
|
399
|
-
const $
|
|
399
|
+
const $39a79f6a674f8737$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc = {
|
|
400
400
|
counter: 1,
|
|
401
401
|
offset: 0,
|
|
402
402
|
inserts: [],
|
|
@@ -404,7 +404,7 @@ const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
404
404
|
}, context = {
|
|
405
405
|
level: 0
|
|
406
406
|
})=>{
|
|
407
|
-
return (0, $
|
|
407
|
+
return (0, $3zTl3$lodash.reduce)(tokens, (acc, token)=>{
|
|
408
408
|
if (token.type === "hr") {
|
|
409
409
|
acc.inserts.push({
|
|
410
410
|
insertText: {
|
|
@@ -453,12 +453,12 @@ const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
453
453
|
}
|
|
454
454
|
});
|
|
455
455
|
acc.counter += 4;
|
|
456
|
-
(0, $
|
|
456
|
+
(0, $3zTl3$lodash.each)([
|
|
457
457
|
token.header,
|
|
458
458
|
...token.rows
|
|
459
459
|
], (rowItems, index, arr)=>{
|
|
460
|
-
(0, $
|
|
461
|
-
$
|
|
460
|
+
(0, $3zTl3$lodash.each)(rowItems, (item)=>{
|
|
461
|
+
$39a79f6a674f8737$var$parseMarkedTokenToGoogleDocsRequest([
|
|
462
462
|
item
|
|
463
463
|
], acc, context);
|
|
464
464
|
acc.counter += 2;
|
|
@@ -477,8 +477,8 @@ const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
477
477
|
acc.counter += 1;
|
|
478
478
|
return acc;
|
|
479
479
|
}
|
|
480
|
-
const childTokens = (0, $
|
|
481
|
-
if (!(0, $
|
|
480
|
+
const childTokens = (0, $3zTl3$lodash.get)(token, "tokens");
|
|
481
|
+
if (!(0, $3zTl3$lodash.isEmpty)(childTokens)) {
|
|
482
482
|
const start = acc.counter;
|
|
483
483
|
if (token.type === "list_item") {
|
|
484
484
|
if (context.level > 1) {
|
|
@@ -493,13 +493,13 @@ const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
493
493
|
acc.offset += context.level - 1;
|
|
494
494
|
acc.counter += context.level - 1;
|
|
495
495
|
}
|
|
496
|
-
$
|
|
496
|
+
$39a79f6a674f8737$var$parseMarkedTokenToGoogleDocsRequest((0, $eac07309d5e355a6$export$2e2bcd8739ae039)(childTokens, [
|
|
497
497
|
{
|
|
498
498
|
type: "space",
|
|
499
499
|
raw: "\n"
|
|
500
500
|
}
|
|
501
501
|
]), acc, context);
|
|
502
|
-
} else $
|
|
502
|
+
} else $39a79f6a674f8737$var$parseMarkedTokenToGoogleDocsRequest(childTokens, acc, context);
|
|
503
503
|
const end = acc.counter;
|
|
504
504
|
if (token.type === "heading") {
|
|
505
505
|
acc.formats.push({
|
|
@@ -574,10 +574,10 @@ const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
574
574
|
});
|
|
575
575
|
return acc;
|
|
576
576
|
}
|
|
577
|
-
const childItems = (0, $
|
|
578
|
-
if (!(0, $
|
|
577
|
+
const childItems = (0, $3zTl3$lodash.get)(token, "items");
|
|
578
|
+
if (!(0, $3zTl3$lodash.isEmpty)(childItems)) {
|
|
579
579
|
const start = acc.counter;
|
|
580
|
-
$
|
|
580
|
+
$39a79f6a674f8737$var$parseMarkedTokenToGoogleDocsRequest((0, $eac07309d5e355a6$export$2e2bcd8739ae039)(childItems, [
|
|
581
581
|
{
|
|
582
582
|
type: "space",
|
|
583
583
|
raw: "\n"
|
|
@@ -586,7 +586,7 @@ const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
586
586
|
level: context.level + 1
|
|
587
587
|
});
|
|
588
588
|
const end = acc.counter;
|
|
589
|
-
if (!context.level && token.type === "list") acc.formats = (0, $
|
|
589
|
+
if (!context.level && token.type === "list") acc.formats = (0, $3zTl3$lodash.concat)({
|
|
590
590
|
createParagraphBullets: {
|
|
591
591
|
range: {
|
|
592
592
|
startIndex: start,
|
|
@@ -597,9 +597,9 @@ const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
597
597
|
}, acc.formats);
|
|
598
598
|
return acc;
|
|
599
599
|
}
|
|
600
|
-
const text = (0, $
|
|
600
|
+
const text = (0, $3zTl3$lodash.get)(token, "text");
|
|
601
601
|
if (!text) return acc;
|
|
602
|
-
const textToInsert = (0, $
|
|
602
|
+
const textToInsert = (0, $812412d70a86d960$export$2e2bcd8739ae039)(text);
|
|
603
603
|
acc.inserts.push({
|
|
604
604
|
insertText: {
|
|
605
605
|
text: textToInsert,
|
|
@@ -612,22 +612,22 @@ const $62a670ce81736b3d$var$parseMarkedTokenToGoogleDocsRequest = (tokens, acc =
|
|
|
612
612
|
return acc;
|
|
613
613
|
}, acc);
|
|
614
614
|
};
|
|
615
|
-
const $
|
|
616
|
-
const tokens = (0, $
|
|
617
|
-
const parsedTokens = $
|
|
615
|
+
const $39a79f6a674f8737$var$convertMarkdownToGoogleDocs = (text, currentCounter = 1)=>{
|
|
616
|
+
const tokens = (0, $3zTl3$marked.Lexer).lex(text);
|
|
617
|
+
const parsedTokens = $39a79f6a674f8737$var$parseMarkedTokenToGoogleDocsRequest(tokens, {
|
|
618
618
|
counter: currentCounter,
|
|
619
619
|
formats: [],
|
|
620
620
|
inserts: [],
|
|
621
621
|
offset: 0
|
|
622
622
|
});
|
|
623
623
|
const formats = parsedTokens.formats;
|
|
624
|
-
const mergedFormats = (0, $
|
|
625
|
-
const range = (0, $
|
|
624
|
+
const mergedFormats = (0, $3zTl3$lodash.reduce)(formats, (acc, format)=>{
|
|
625
|
+
const range = (0, $3zTl3$lodash.get)(format, "updateTextStyle.range");
|
|
626
626
|
if (!range) acc.push(format);
|
|
627
627
|
else {
|
|
628
|
-
const existingFormat = (0, $
|
|
629
|
-
const r = (0, $
|
|
630
|
-
return (0, $
|
|
628
|
+
const existingFormat = (0, $3zTl3$lodash.find)(acc, (f)=>{
|
|
629
|
+
const r = (0, $3zTl3$lodash.get)(f, "updateTextStyle.range");
|
|
630
|
+
return (0, $3zTl3$lodash.isEqual)(r, range);
|
|
631
631
|
});
|
|
632
632
|
if (existingFormat) existingFormat.updateTextStyle.textStyle = {
|
|
633
633
|
...existingFormat.updateTextStyle.textStyle,
|
|
@@ -644,25 +644,25 @@ const $62a670ce81736b3d$var$convertMarkdownToGoogleDocs = (text, currentCounter
|
|
|
644
644
|
]
|
|
645
645
|
};
|
|
646
646
|
};
|
|
647
|
-
var $
|
|
647
|
+
var $39a79f6a674f8737$export$2e2bcd8739ae039 = $39a79f6a674f8737$var$convertMarkdownToGoogleDocs;
|
|
648
648
|
|
|
649
649
|
|
|
650
650
|
|
|
651
|
-
async function $
|
|
652
|
-
return (0, $
|
|
651
|
+
async function $81152fd114f29b5a$var$convertMarkdownToHtml(markdown, options) {
|
|
652
|
+
return (0, $3zTl3$marked.marked).parse(markdown, options);
|
|
653
653
|
}
|
|
654
|
-
var $
|
|
654
|
+
var $81152fd114f29b5a$export$2e2bcd8739ae039 = $81152fd114f29b5a$var$convertMarkdownToHtml;
|
|
655
655
|
|
|
656
656
|
|
|
657
657
|
|
|
658
658
|
|
|
659
659
|
|
|
660
660
|
|
|
661
|
-
const $
|
|
662
|
-
return (0, $
|
|
663
|
-
const childTokens = token.type === "blockquote" ? (0, $
|
|
661
|
+
const $2d5ba20fb7a31048$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])=>{
|
|
662
|
+
return (0, $3zTl3$lodash.reduce)(tokens, (acc, token)=>{
|
|
663
|
+
const childTokens = token.type === "blockquote" ? (0, $3zTl3$lodash.get)(token, "tokens[0].tokens") : (0, $3zTl3$lodash.get)(token, "tokens");
|
|
664
664
|
let childData = [];
|
|
665
|
-
if (childTokens) childData = $
|
|
665
|
+
if (childTokens) childData = $2d5ba20fb7a31048$var$parseMarkedTokenToNotionRequest(childTokens);
|
|
666
666
|
if (token.type === "hr") {
|
|
667
667
|
acc.push({
|
|
668
668
|
type: "divider",
|
|
@@ -699,14 +699,14 @@ const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
699
699
|
return acc;
|
|
700
700
|
}
|
|
701
701
|
if (token.type === "paragraph") {
|
|
702
|
-
const groupedChildData = (0, $
|
|
703
|
-
if (!(0, $
|
|
702
|
+
const groupedChildData = (0, $3zTl3$lodash.groupBy)(childData, (x)=>x.type === "image" ? "image" : "other");
|
|
703
|
+
if (!(0, $3zTl3$lodash.isEmpty)(groupedChildData.other)) acc.push({
|
|
704
704
|
type: "paragraph",
|
|
705
705
|
paragraph: {
|
|
706
706
|
rich_text: groupedChildData.other
|
|
707
707
|
}
|
|
708
708
|
});
|
|
709
|
-
if (!(0, $
|
|
709
|
+
if (!(0, $3zTl3$lodash.isEmpty)(groupedChildData.image)) acc = (0, $3zTl3$lodash.concat)(acc, groupedChildData.image);
|
|
710
710
|
return acc;
|
|
711
711
|
}
|
|
712
712
|
if (token.type === "heading") {
|
|
@@ -720,9 +720,9 @@ const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
720
720
|
}
|
|
721
721
|
if (token.type === "code") {
|
|
722
722
|
const textSplitByNewLine = token.text.split("\n");
|
|
723
|
-
const chunksOfChunks = (0, $
|
|
724
|
-
const chunksWithNewLines = (0, $
|
|
725
|
-
return (0, $
|
|
723
|
+
const chunksOfChunks = (0, $3zTl3$lodash.compact)((0, $3zTl3$lodash.map)(textSplitByNewLine, (chunk)=>$2d5ba20fb7a31048$var$chunkText(chunk)));
|
|
724
|
+
const chunksWithNewLines = (0, $3zTl3$lodash.flattenDeep)((0, $eac07309d5e355a6$export$2e2bcd8739ae039)((0, $3zTl3$lodash.map)(chunksOfChunks, (chunk)=>{
|
|
725
|
+
return (0, $3zTl3$lodash.map)(chunk, (_chunk)=>({
|
|
726
726
|
type: "text",
|
|
727
727
|
text: {
|
|
728
728
|
content: _chunk
|
|
@@ -753,7 +753,7 @@ const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
753
753
|
children: []
|
|
754
754
|
}
|
|
755
755
|
};
|
|
756
|
-
const headerChildren = $
|
|
756
|
+
const headerChildren = $2d5ba20fb7a31048$var$parseMarkedTokenToNotionRequest(token.header);
|
|
757
757
|
table.table.children.push({
|
|
758
758
|
type: "table_row",
|
|
759
759
|
table_row: {
|
|
@@ -762,8 +762,8 @@ const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
762
762
|
])
|
|
763
763
|
}
|
|
764
764
|
});
|
|
765
|
-
(0, $
|
|
766
|
-
const rowChildren = (0, $
|
|
765
|
+
(0, $3zTl3$lodash.each)(token.rows, (row)=>{
|
|
766
|
+
const rowChildren = (0, $3zTl3$lodash.map)(row, (rowCell)=>$2d5ba20fb7a31048$var$parseMarkedTokenToNotionRequest([
|
|
767
767
|
rowCell
|
|
768
768
|
]));
|
|
769
769
|
table.table.children.push({
|
|
@@ -778,9 +778,9 @@ const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
778
778
|
}
|
|
779
779
|
if (token.type === "list") {
|
|
780
780
|
const listType = token.items[0].task ? "to_do" : token.ordered ? "numbered_list_item" : "bulleted_list_item";
|
|
781
|
-
(0, $
|
|
782
|
-
const itemChildren = $
|
|
783
|
-
const groupedItemChildren = (0, $
|
|
781
|
+
(0, $3zTl3$lodash.each)(token.items, (item)=>{
|
|
782
|
+
const itemChildren = $2d5ba20fb7a31048$var$parseMarkedTokenToNotionRequest(item.tokens);
|
|
783
|
+
const groupedItemChildren = (0, $3zTl3$lodash.groupBy)(itemChildren, (x)=>x.type === "text" ? "other" : "list");
|
|
784
784
|
acc.push({
|
|
785
785
|
type: listType,
|
|
786
786
|
[listType]: {
|
|
@@ -794,34 +794,34 @@ const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
if (token.type === "em") {
|
|
797
|
-
(0, $
|
|
798
|
-
(0, $
|
|
797
|
+
(0, $3zTl3$lodash.each)(childData, (child)=>{
|
|
798
|
+
(0, $3zTl3$lodash.set)(child, [
|
|
799
799
|
"annotations",
|
|
800
800
|
"italic"
|
|
801
801
|
], true);
|
|
802
802
|
});
|
|
803
|
-
acc = (0, $
|
|
803
|
+
acc = (0, $3zTl3$lodash.concat)(acc, childData);
|
|
804
804
|
return acc;
|
|
805
805
|
}
|
|
806
806
|
if (token.type === "strong") {
|
|
807
|
-
(0, $
|
|
808
|
-
(0, $
|
|
807
|
+
(0, $3zTl3$lodash.each)(childData, (child)=>{
|
|
808
|
+
(0, $3zTl3$lodash.set)(child, [
|
|
809
809
|
"annotations",
|
|
810
810
|
"bold"
|
|
811
811
|
], true);
|
|
812
812
|
});
|
|
813
|
-
acc = (0, $
|
|
813
|
+
acc = (0, $3zTl3$lodash.concat)(acc, childData);
|
|
814
814
|
return acc;
|
|
815
815
|
}
|
|
816
816
|
if (token.type === "link") {
|
|
817
|
-
(0, $
|
|
818
|
-
if (child.text) (0, $
|
|
817
|
+
(0, $3zTl3$lodash.each)(childData, (child)=>{
|
|
818
|
+
if (child.text) (0, $3zTl3$lodash.set)(child, [
|
|
819
819
|
"text",
|
|
820
820
|
"link",
|
|
821
821
|
"url"
|
|
822
822
|
], token.href);
|
|
823
823
|
});
|
|
824
|
-
acc = (0, $
|
|
824
|
+
acc = (0, $3zTl3$lodash.concat)(acc, childData);
|
|
825
825
|
return acc;
|
|
826
826
|
}
|
|
827
827
|
if (token.type === "blockquote") {
|
|
@@ -833,18 +833,18 @@ const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
833
833
|
});
|
|
834
834
|
return acc;
|
|
835
835
|
}
|
|
836
|
-
if (!(0, $
|
|
837
|
-
acc = (0, $
|
|
836
|
+
if (!(0, $3zTl3$lodash.isEmpty)(childData)) {
|
|
837
|
+
acc = (0, $3zTl3$lodash.concat)(acc, childData);
|
|
838
838
|
return acc;
|
|
839
839
|
}
|
|
840
|
-
const text = (0, $
|
|
840
|
+
const text = (0, $3zTl3$lodash.get)(token, "text");
|
|
841
841
|
if (!text) return acc;
|
|
842
|
-
const textToInsert = (0, $
|
|
842
|
+
const textToInsert = (0, $812412d70a86d960$export$2e2bcd8739ae039)(text);
|
|
843
843
|
// chunk the text into 2000 character chunks, should handle emojis and multi-byte characters
|
|
844
844
|
const textSplitByNewLine = textToInsert.split("\n");
|
|
845
|
-
const chunksOfChunks = (0, $
|
|
846
|
-
const chunksWithNewLines = (0, $
|
|
847
|
-
return (0, $
|
|
845
|
+
const chunksOfChunks = (0, $3zTl3$lodash.compact)((0, $3zTl3$lodash.map)(textSplitByNewLine, (chunk)=>$2d5ba20fb7a31048$var$chunkText(chunk)));
|
|
846
|
+
const chunksWithNewLines = (0, $3zTl3$lodash.flattenDeep)((0, $eac07309d5e355a6$export$2e2bcd8739ae039)((0, $3zTl3$lodash.map)(chunksOfChunks, (chunk)=>{
|
|
847
|
+
return (0, $3zTl3$lodash.map)(chunk, (_chunk)=>({
|
|
848
848
|
type: "text",
|
|
849
849
|
text: {
|
|
850
850
|
content: _chunk
|
|
@@ -861,29 +861,29 @@ const $8252f21cc2f7f340$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
861
861
|
content: "\n"
|
|
862
862
|
}
|
|
863
863
|
}));
|
|
864
|
-
(0, $
|
|
864
|
+
(0, $3zTl3$lodash.each)(chunksWithNewLines, (chunk)=>{
|
|
865
865
|
acc.push(chunk);
|
|
866
866
|
});
|
|
867
867
|
return acc;
|
|
868
868
|
}, acc);
|
|
869
869
|
};
|
|
870
|
-
const $
|
|
870
|
+
const $2d5ba20fb7a31048$var$chunkText = (text, numChars = 2000)=>{
|
|
871
871
|
return text.match(new RegExp(`.{1,${numChars}}`, "g"));
|
|
872
872
|
};
|
|
873
|
-
const $
|
|
874
|
-
const tokens = (0, $
|
|
875
|
-
const parsedTokens = $
|
|
873
|
+
const $2d5ba20fb7a31048$var$convertMarkdownToNotion = (text)=>{
|
|
874
|
+
const tokens = (0, $3zTl3$marked.Lexer).lex(text);
|
|
875
|
+
const parsedTokens = $2d5ba20fb7a31048$var$parseMarkedTokenToNotionRequest(tokens);
|
|
876
876
|
return {
|
|
877
877
|
children: parsedTokens
|
|
878
878
|
};
|
|
879
879
|
};
|
|
880
|
-
var $
|
|
880
|
+
var $2d5ba20fb7a31048$export$2e2bcd8739ae039 = $2d5ba20fb7a31048$var$convertMarkdownToNotion;
|
|
881
881
|
|
|
882
882
|
|
|
883
883
|
|
|
884
884
|
|
|
885
|
-
const $
|
|
886
|
-
return (0, $
|
|
885
|
+
const $4157d5c97996ba13$var$parseMarkedTokenToSlackRequest = (tokens, acc = [])=>{
|
|
886
|
+
return (0, $3zTl3$lodash.reduce)(tokens, (acc, token)=>{
|
|
887
887
|
if (token.type === "hr") {
|
|
888
888
|
acc.push({
|
|
889
889
|
type: "divider"
|
|
@@ -909,22 +909,22 @@ const $8d24b15cb35479b5$var$parseMarkedTokenToSlackRequest = (tokens, acc = [])=
|
|
|
909
909
|
return acc;
|
|
910
910
|
}
|
|
911
911
|
if (token.type === "paragraph" || token.type === "text") {
|
|
912
|
-
const childTokens = (0, $
|
|
912
|
+
const childTokens = (0, $3zTl3$lodash.get)(token, "tokens");
|
|
913
913
|
let childData = [];
|
|
914
|
-
if (childTokens) childData = $
|
|
914
|
+
if (childTokens) childData = $4157d5c97996ba13$var$parseMarkedTokenToSlackRequest(childTokens);
|
|
915
915
|
else {
|
|
916
916
|
acc.push(token.raw);
|
|
917
917
|
return acc;
|
|
918
918
|
}
|
|
919
|
-
const childDataGroupedByType = (0, $
|
|
920
|
-
if (!(0, $
|
|
919
|
+
const childDataGroupedByType = (0, $3zTl3$lodash.groupBy)(childData, (x)=>(0, $3zTl3$lodash.isString)(x) ? "text" : "block");
|
|
920
|
+
if (!(0, $3zTl3$lodash.isEmpty)(childDataGroupedByType.text)) acc.push({
|
|
921
921
|
type: "section",
|
|
922
922
|
text: {
|
|
923
923
|
type: "mrkdwn",
|
|
924
|
-
text: (0, $
|
|
924
|
+
text: (0, $3zTl3$lodash.join)(childDataGroupedByType.text, "")
|
|
925
925
|
}
|
|
926
926
|
});
|
|
927
|
-
if (!(0, $
|
|
927
|
+
if (!(0, $3zTl3$lodash.isEmpty)(childDataGroupedByType.block)) acc = (0, $3zTl3$lodash.concat)(acc, childDataGroupedByType.block);
|
|
928
928
|
return acc;
|
|
929
929
|
}
|
|
930
930
|
if (token.type === "heading") {
|
|
@@ -939,13 +939,13 @@ const $8d24b15cb35479b5$var$parseMarkedTokenToSlackRequest = (tokens, acc = [])=
|
|
|
939
939
|
return acc;
|
|
940
940
|
}
|
|
941
941
|
if (token.type === "list") {
|
|
942
|
-
const items = (0, $
|
|
943
|
-
const childTokens = (0, $
|
|
942
|
+
const items = (0, $3zTl3$lodash.map)(token.items, (item)=>{
|
|
943
|
+
const childTokens = (0, $3zTl3$lodash.get)(item, "tokens");
|
|
944
944
|
let childData = [];
|
|
945
|
-
if (childTokens) childData = $
|
|
945
|
+
if (childTokens) childData = $4157d5c97996ba13$var$parseMarkedTokenToSlackRequest(childTokens);
|
|
946
946
|
return childData;
|
|
947
947
|
});
|
|
948
|
-
const listString = (0, $
|
|
948
|
+
const listString = (0, $3zTl3$lodash.join)((0, $3zTl3$lodash.filter)((0, $3zTl3$lodash.flattenDeep)(items), (x)=>!!(0, $3zTl3$lodash.get)(x, "text.text")).map((x, index)=>`${token.ordered ? `${index + 1}.` : "•"} ${(0, $3zTl3$lodash.get)(x, "text.text")}`), "\n");
|
|
949
949
|
acc.push({
|
|
950
950
|
type: "section",
|
|
951
951
|
text: {
|
|
@@ -987,16 +987,16 @@ const $8d24b15cb35479b5$var$parseMarkedTokenToSlackRequest = (tokens, acc = [])=
|
|
|
987
987
|
return acc;
|
|
988
988
|
}, acc);
|
|
989
989
|
};
|
|
990
|
-
const $
|
|
991
|
-
const tokens = (0, $
|
|
992
|
-
const parsedTokens = $
|
|
993
|
-
return (0, $
|
|
990
|
+
const $4157d5c97996ba13$var$convertMarkdownToSlack = (text)=>{
|
|
991
|
+
const tokens = (0, $3zTl3$marked.Lexer).lex(text);
|
|
992
|
+
const parsedTokens = $4157d5c97996ba13$var$parseMarkedTokenToSlackRequest(tokens);
|
|
993
|
+
return (0, $3zTl3$lodash.filter)(parsedTokens, (x)=>!(0, $3zTl3$lodash.isString)(x));
|
|
994
994
|
};
|
|
995
|
-
var $
|
|
995
|
+
var $4157d5c97996ba13$export$2e2bcd8739ae039 = $4157d5c97996ba13$var$convertMarkdownToSlack;
|
|
996
996
|
|
|
997
997
|
|
|
998
998
|
|
|
999
|
-
const $
|
|
999
|
+
const $4f56a3e9af97aaa5$var$formatPlainText = (x)=>{
|
|
1000
1000
|
if (x) {
|
|
1001
1001
|
if (x.href) return `[${x.plain_text}](${x.href.startsWith("/") ? `https://www.notion.so${x.href}` : x.href})`;
|
|
1002
1002
|
const isBold = x.annotations?.bold;
|
|
@@ -1013,10 +1013,10 @@ const $24e1f903aef46c44$var$formatPlainText = (x)=>{
|
|
|
1013
1013
|
return textToReturn;
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
|
-
const $
|
|
1016
|
+
const $4f56a3e9af97aaa5$var$convertNotionToMd = function(block, level = 1) {
|
|
1017
1017
|
const n = "\n\n";
|
|
1018
1018
|
const data = block[block.type];
|
|
1019
|
-
const plainText = data.rich_text ? data?.rich_text.map($
|
|
1019
|
+
const plainText = data.rich_text ? data?.rich_text.map($4f56a3e9af97aaa5$var$formatPlainText) : [];
|
|
1020
1020
|
// @ts-ignore
|
|
1021
1021
|
const caption = data?.caption ? data.caption.map((x)=>x?.plain_text) : [];
|
|
1022
1022
|
let childData = "";
|
|
@@ -1024,11 +1024,11 @@ const $24e1f903aef46c44$var$convertNotionToMd = function(block, level = 1) {
|
|
|
1024
1024
|
case "bookmark":
|
|
1025
1025
|
return `[${data.url}](data.url)${n}`;
|
|
1026
1026
|
case "bulleted_list_item":
|
|
1027
|
-
childData = (0, $
|
|
1028
|
-
return `- ${plainText.join("")}\n` + (childData ? `${(0, $
|
|
1027
|
+
childData = (0, $3zTl3$lodash.map)(block.children, (child)=>$4f56a3e9af97aaa5$var$convertNotionToMd(child, level + 1)).join((0, $3zTl3$lodash.repeat)(" ", level));
|
|
1028
|
+
return `- ${plainText.join("")}\n` + (childData ? `${(0, $3zTl3$lodash.repeat)(" ", level)}${childData}` : "");
|
|
1029
1029
|
case "numbered_list_item":
|
|
1030
|
-
childData = (0, $
|
|
1031
|
-
return `${block.number}. ${plainText.join("")}\n` + (childData ? `${(0, $
|
|
1030
|
+
childData = (0, $3zTl3$lodash.map)(block.children, (child)=>$4f56a3e9af97aaa5$var$convertNotionToMd(child, level + 1)).join((0, $3zTl3$lodash.repeat)(" ", level));
|
|
1031
|
+
return `${block.number}. ${plainText.join("")}\n` + (childData ? `${(0, $3zTl3$lodash.repeat)(" ", level)}${childData}` : "");
|
|
1032
1032
|
case "quote":
|
|
1033
1033
|
case "callout":
|
|
1034
1034
|
return `> ${plainText.join("")}${n}`;
|
|
@@ -1064,40 +1064,40 @@ const $24e1f903aef46c44$var$convertNotionToMd = function(block, level = 1) {
|
|
|
1064
1064
|
if (block.children) {
|
|
1065
1065
|
const firstChild = block.children[0];
|
|
1066
1066
|
const remainingChildren = block.children.slice(1);
|
|
1067
|
-
const header = `| ${firstChild.table_row.cells.map((x)=>x.map((y)=>$
|
|
1068
|
-
const divider = `|${(0, $
|
|
1067
|
+
const header = `| ${firstChild.table_row.cells.map((x)=>x.map((y)=>$4f56a3e9af97aaa5$var$formatPlainText(y)).join("")).join(" | ")} |\n`;
|
|
1068
|
+
const divider = `|${(0, $3zTl3$lodash.repeat)("---|", data.table_width)}\n`;
|
|
1069
1069
|
const rows = remainingChildren.map((row)=>{
|
|
1070
|
-
return `| ${row.table_row.cells.map((x)=>x.map((y)=>$
|
|
1070
|
+
return `| ${row.table_row.cells.map((x)=>x.map((y)=>$4f56a3e9af97aaa5$var$formatPlainText(y)).join("")).join(" | ")} |`;
|
|
1071
1071
|
}).join("\n");
|
|
1072
1072
|
return `${header}${divider}${rows}${n}`;
|
|
1073
1073
|
}
|
|
1074
1074
|
return `Table as CSV\n`;
|
|
1075
1075
|
case "table_row":
|
|
1076
|
-
return `| ${data.cells.map((x)=>x.map((y)=>$
|
|
1076
|
+
return `| ${data.cells.map((x)=>x.map((y)=>$4f56a3e9af97aaa5$var$formatPlainText(y)).join("")).join(" | ")} |\n`;
|
|
1077
1077
|
case "to_do":
|
|
1078
|
-
childData = (0, $
|
|
1079
|
-
return `- [${data.checked ? "X" : " "}] ${plainText.join("")}\n` + (childData ? `${(0, $
|
|
1078
|
+
childData = (0, $3zTl3$lodash.map)(block.children, (child)=>$4f56a3e9af97aaa5$var$convertNotionToMd(child, level + 1)).join((0, $3zTl3$lodash.repeat)(" ", level));
|
|
1079
|
+
return `- [${data.checked ? "X" : " "}] ${plainText.join("")}\n` + (childData ? `${(0, $3zTl3$lodash.repeat)(" ", level)}${childData}` : "");
|
|
1080
1080
|
default:
|
|
1081
|
-
childData = (0, $
|
|
1081
|
+
childData = (0, $3zTl3$lodash.map)(block.children, (child)=>$4f56a3e9af97aaa5$var$convertNotionToMd(child)).join("");
|
|
1082
1082
|
return plainText.join("") + n + childData;
|
|
1083
1083
|
}
|
|
1084
1084
|
};
|
|
1085
|
-
const $
|
|
1085
|
+
const $4f56a3e9af97aaa5$var$resolveChildren = function(block, blocks) {
|
|
1086
1086
|
if (!block.has_children) return block;
|
|
1087
1087
|
const children = blocks.filter((x)=>x.parent_id === block.id);
|
|
1088
1088
|
return {
|
|
1089
1089
|
...block,
|
|
1090
|
-
children: children.map((child)=>$
|
|
1090
|
+
children: children.map((child)=>$4f56a3e9af97aaa5$var$resolveChildren(child, blocks))
|
|
1091
1091
|
};
|
|
1092
1092
|
};
|
|
1093
|
-
const $
|
|
1093
|
+
const $4f56a3e9af97aaa5$var$numberOrderedLists = function(blocks) {
|
|
1094
1094
|
let number = 0;
|
|
1095
1095
|
return blocks.map((block)=>{
|
|
1096
1096
|
if (block.type !== "numbered_list_item") {
|
|
1097
1097
|
number = 0;
|
|
1098
1098
|
return block;
|
|
1099
1099
|
} else {
|
|
1100
|
-
if (block.children) block.children = $
|
|
1100
|
+
if (block.children) block.children = $4f56a3e9af97aaa5$var$numberOrderedLists(block.children);
|
|
1101
1101
|
return {
|
|
1102
1102
|
...block,
|
|
1103
1103
|
number: ++number
|
|
@@ -1105,13 +1105,13 @@ const $24e1f903aef46c44$var$numberOrderedLists = function(blocks) {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
});
|
|
1107
1107
|
};
|
|
1108
|
-
const $
|
|
1108
|
+
const $4f56a3e9af97aaa5$var$insertNewLinesBetweenLists = function(blocks) {
|
|
1109
1109
|
const listBlocks = [
|
|
1110
1110
|
"to_do",
|
|
1111
1111
|
"numbered_list_item",
|
|
1112
1112
|
"bulleted_list_item"
|
|
1113
1113
|
];
|
|
1114
|
-
return (0, $
|
|
1114
|
+
return (0, $3zTl3$lodash.flatten)(blocks.map((block, index)=>{
|
|
1115
1115
|
const nextBlock = blocks[index + 1];
|
|
1116
1116
|
const nextBlockType = nextBlock?.type;
|
|
1117
1117
|
if (listBlocks.includes(block.type) && !listBlocks.includes(nextBlockType)) return [
|
|
@@ -1127,19 +1127,19 @@ const $24e1f903aef46c44$var$insertNewLinesBetweenLists = function(blocks) {
|
|
|
1127
1127
|
return block;
|
|
1128
1128
|
}));
|
|
1129
1129
|
};
|
|
1130
|
-
const $
|
|
1131
|
-
const arrayBlocks = $
|
|
1132
|
-
const parentBlocks = (0, $
|
|
1133
|
-
const blocksWithChildren = $
|
|
1134
|
-
return $
|
|
1130
|
+
const $4f56a3e9af97aaa5$var$convertNotionToMarkdown = function(blocks) {
|
|
1131
|
+
const arrayBlocks = $4f56a3e9af97aaa5$var$insertNewLinesBetweenLists((0, $3zTl3$lodash.castArray)(blocks));
|
|
1132
|
+
const parentBlocks = (0, $3zTl3$lodash.reject)(arrayBlocks, (block)=>block.parent?.type === "block_id");
|
|
1133
|
+
const blocksWithChildren = $4f56a3e9af97aaa5$var$numberOrderedLists(parentBlocks.map((block)=>{
|
|
1134
|
+
return $4f56a3e9af97aaa5$var$resolveChildren(block, arrayBlocks);
|
|
1135
1135
|
}));
|
|
1136
|
-
return blocksWithChildren.map((block)=>$
|
|
1136
|
+
return blocksWithChildren.map((block)=>$4f56a3e9af97aaa5$var$convertNotionToMd(block)).join("");
|
|
1137
1137
|
};
|
|
1138
|
-
var $
|
|
1138
|
+
var $4f56a3e9af97aaa5$export$2e2bcd8739ae039 = $4f56a3e9af97aaa5$var$convertNotionToMarkdown;
|
|
1139
1139
|
|
|
1140
1140
|
|
|
1141
1141
|
|
|
1142
|
-
function $
|
|
1142
|
+
function $722a183009375374$var$convertNotionToMd(block) {
|
|
1143
1143
|
const data = block[block.type];
|
|
1144
1144
|
const plainText = data.rich_text ? data.rich_text.map((x)=>{
|
|
1145
1145
|
if (x) {
|
|
@@ -1151,27 +1151,27 @@ function $2d4e342e27d0a138$var$convertNotionToMd(block) {
|
|
|
1151
1151
|
const caption = data.caption ? data.caption.map((x)=>x?.plain_text) : [];
|
|
1152
1152
|
switch(block.type){
|
|
1153
1153
|
case "bookmark":
|
|
1154
|
-
return (0, ($parcel$interopDefault($
|
|
1154
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1155
1155
|
link: {
|
|
1156
1156
|
title: data.url,
|
|
1157
1157
|
source: data.url
|
|
1158
1158
|
}
|
|
1159
1159
|
});
|
|
1160
1160
|
case "bulleted_list_item":
|
|
1161
|
-
return `${(0, ($parcel$interopDefault($
|
|
1161
|
+
return `${(0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1162
1162
|
ul: plainText
|
|
1163
1163
|
}).trim()} \n`;
|
|
1164
1164
|
case "numbered_list_item":
|
|
1165
|
-
return `${(0, ($parcel$interopDefault($
|
|
1165
|
+
return `${(0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1166
1166
|
ol: plainText
|
|
1167
1167
|
}).trim()} \n`;
|
|
1168
1168
|
case "quote":
|
|
1169
1169
|
case "callout":
|
|
1170
|
-
return (0, ($parcel$interopDefault($
|
|
1170
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1171
1171
|
blockquote: plainText
|
|
1172
1172
|
});
|
|
1173
1173
|
case "code":
|
|
1174
|
-
return (0, ($parcel$interopDefault($
|
|
1174
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1175
1175
|
code: {
|
|
1176
1176
|
language: data.language,
|
|
1177
1177
|
content: plainText
|
|
@@ -1180,55 +1180,55 @@ function $2d4e342e27d0a138$var$convertNotionToMd(block) {
|
|
|
1180
1180
|
case "divider":
|
|
1181
1181
|
return "--- \n";
|
|
1182
1182
|
case "embed":
|
|
1183
|
-
return (0, ($parcel$interopDefault($
|
|
1183
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1184
1184
|
link: {
|
|
1185
1185
|
title: caption.length ? caption : "Embed",
|
|
1186
1186
|
source: data.url
|
|
1187
1187
|
}
|
|
1188
1188
|
});
|
|
1189
1189
|
case "equation":
|
|
1190
|
-
return (0, ($parcel$interopDefault($
|
|
1190
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1191
1191
|
p: data.expression
|
|
1192
1192
|
});
|
|
1193
1193
|
case "paragraph":
|
|
1194
|
-
return (0, ($parcel$interopDefault($
|
|
1194
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1195
1195
|
p: plainText.join("")
|
|
1196
1196
|
});
|
|
1197
1197
|
case "video":
|
|
1198
1198
|
case "pdf":
|
|
1199
1199
|
case "file":
|
|
1200
|
-
return (0, ($parcel$interopDefault($
|
|
1200
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1201
1201
|
link: {
|
|
1202
1202
|
title: caption.length ? caption : "File",
|
|
1203
1203
|
source: data.file ? data.file.url : data.external ? data.external.url : ""
|
|
1204
1204
|
}
|
|
1205
1205
|
});
|
|
1206
1206
|
case "heading_1":
|
|
1207
|
-
return (0, ($parcel$interopDefault($
|
|
1207
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1208
1208
|
h1: plainText
|
|
1209
1209
|
});
|
|
1210
1210
|
case "heading_2":
|
|
1211
|
-
return (0, ($parcel$interopDefault($
|
|
1211
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1212
1212
|
h2: plainText
|
|
1213
1213
|
});
|
|
1214
1214
|
case "heading_3":
|
|
1215
|
-
return (0, ($parcel$interopDefault($
|
|
1215
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1216
1216
|
h3: plainText
|
|
1217
1217
|
});
|
|
1218
1218
|
case "heading_4":
|
|
1219
|
-
return (0, ($parcel$interopDefault($
|
|
1219
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1220
1220
|
h4: plainText
|
|
1221
1221
|
});
|
|
1222
1222
|
case "heading_5":
|
|
1223
|
-
return (0, ($parcel$interopDefault($
|
|
1223
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1224
1224
|
h5: plainText
|
|
1225
1225
|
});
|
|
1226
1226
|
case "heading_6":
|
|
1227
|
-
return (0, ($parcel$interopDefault($
|
|
1227
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1228
1228
|
h6: plainText
|
|
1229
1229
|
});
|
|
1230
1230
|
case "image":
|
|
1231
|
-
return (0, ($parcel$interopDefault($
|
|
1231
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1232
1232
|
img: {
|
|
1233
1233
|
title: caption.length ? caption : "Image",
|
|
1234
1234
|
// @ts-ignore
|
|
@@ -1237,33 +1237,33 @@ function $2d4e342e27d0a138$var$convertNotionToMd(block) {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
});
|
|
1239
1239
|
case "table":
|
|
1240
|
-
return (0, ($parcel$interopDefault($
|
|
1240
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1241
1241
|
p: "Tabular values as CSV"
|
|
1242
1242
|
});
|
|
1243
1243
|
case "table_row":
|
|
1244
1244
|
// @ts-ignore
|
|
1245
|
-
return (0, ($parcel$interopDefault($
|
|
1245
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1246
1246
|
p: data.cells.map((x)=>x[0]?.plain_text).join(",")
|
|
1247
1247
|
});
|
|
1248
1248
|
case "to_do":
|
|
1249
1249
|
return `- [${data.checked ? "X" : " "}] ${plainText.join("")}\n`;
|
|
1250
1250
|
default:
|
|
1251
|
-
return (0, ($parcel$interopDefault($
|
|
1251
|
+
return (0, ($parcel$interopDefault($3zTl3$json2md)))({
|
|
1252
1252
|
p: plainText.join("")
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
|
-
var $
|
|
1256
|
+
var $722a183009375374$export$2e2bcd8739ae039 = $722a183009375374$var$convertNotionToMd;
|
|
1257
1257
|
|
|
1258
1258
|
|
|
1259
1259
|
|
|
1260
|
-
const $
|
|
1261
|
-
const $
|
|
1262
|
-
const $
|
|
1263
|
-
const $
|
|
1260
|
+
const $88bc758117136ee0$var$isString = (value)=>typeof value === "string" || value instanceof String;
|
|
1261
|
+
const $88bc758117136ee0$var$isNumber = (value)=>typeof value === "number";
|
|
1262
|
+
const $88bc758117136ee0$var$isArray = (value)=>Array.isArray(value);
|
|
1263
|
+
const $88bc758117136ee0$var$isPlainObject = (value)=>{
|
|
1264
1264
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1265
1265
|
};
|
|
1266
|
-
function $
|
|
1266
|
+
function $88bc758117136ee0$var$mapValues(originalValue, mapping, lowerCase = false, defaultValue = null) {
|
|
1267
1267
|
if ((originalValue === null || originalValue === undefined) && defaultValue !== null) return defaultValue;
|
|
1268
1268
|
if (mapping === null || mapping === undefined) return originalValue;
|
|
1269
1269
|
let newMapping = {};
|
|
@@ -1273,26 +1273,26 @@ function $b093023fe7f4f0a3$var$mapValues(originalValue, mapping, lowerCase = fal
|
|
|
1273
1273
|
else newMapping = {
|
|
1274
1274
|
...mapping
|
|
1275
1275
|
};
|
|
1276
|
-
if ($
|
|
1276
|
+
if ($88bc758117136ee0$var$isString(originalValue) || $88bc758117136ee0$var$isNumber(originalValue)) {
|
|
1277
1277
|
const val = newMapping[originalValue.toString().toLowerCase()];
|
|
1278
1278
|
if (val === null || val === undefined) return originalValue;
|
|
1279
1279
|
if (val === false) return val;
|
|
1280
1280
|
return val;
|
|
1281
1281
|
}
|
|
1282
|
-
if ($
|
|
1283
|
-
if ($
|
|
1282
|
+
if ($88bc758117136ee0$var$isArray(originalValue)) return originalValue.map((value)=>$88bc758117136ee0$var$mapValues(value, newMapping, true));
|
|
1283
|
+
if ($88bc758117136ee0$var$isPlainObject(originalValue)) {
|
|
1284
1284
|
const result = {};
|
|
1285
1285
|
Object.entries(originalValue).forEach(([key, value])=>{
|
|
1286
|
-
result[key] = $
|
|
1286
|
+
result[key] = $88bc758117136ee0$var$mapValues(value, newMapping, true);
|
|
1287
1287
|
});
|
|
1288
1288
|
return result;
|
|
1289
1289
|
}
|
|
1290
1290
|
return originalValue;
|
|
1291
1291
|
}
|
|
1292
|
-
var $
|
|
1292
|
+
var $88bc758117136ee0$export$2e2bcd8739ae039 = $88bc758117136ee0$var$mapValues;
|
|
1293
1293
|
|
|
1294
1294
|
|
|
1295
|
-
const $
|
|
1295
|
+
const $a6783cb3291a88b6$var$operatorMapping = {
|
|
1296
1296
|
eq: "=",
|
|
1297
1297
|
ne: "<>",
|
|
1298
1298
|
gt: ">",
|
|
@@ -1303,7 +1303,7 @@ const $30e62e8c4ba4c451$var$operatorMapping = {
|
|
|
1303
1303
|
nin: "not in",
|
|
1304
1304
|
like: "like"
|
|
1305
1305
|
};
|
|
1306
|
-
const $
|
|
1306
|
+
const $a6783cb3291a88b6$var$convertToDataType = (value, key, dataType, useDoubleQuotes = false, noQuotes = false, noQuotesForDate = false, escapeSingleQuotes = false)=>{
|
|
1307
1307
|
const dataTypeKey = dataType[key];
|
|
1308
1308
|
if (value === undefined || value === null) return value;
|
|
1309
1309
|
if (dataTypeKey === "string") {
|
|
@@ -1312,30 +1312,30 @@ const $30e62e8c4ba4c451$var$convertToDataType = (value, key, dataType, useDouble
|
|
|
1312
1312
|
else if (escapeSingleQuotes) return `'${value.replace(/'/g, "\\'")}'`;
|
|
1313
1313
|
else return `'${value}'`;
|
|
1314
1314
|
}
|
|
1315
|
-
if (dataTypeKey === "dotnetdate") return `DateTime(${(0, $
|
|
1315
|
+
if (dataTypeKey === "dotnetdate") return `DateTime(${(0, $3zTl3$luxon.DateTime).fromISO(value).toFormat("yyyy,MM,dd")})`;
|
|
1316
1316
|
if (typeof dataTypeKey === "object") {
|
|
1317
|
-
const val = (0, $
|
|
1317
|
+
const val = (0, $88bc758117136ee0$export$2e2bcd8739ae039)(value, dataType[key]);
|
|
1318
1318
|
if (typeof val === "string" || val instanceof String) return noQuotes ? val : useDoubleQuotes ? `"${val}"` : `'${val}'`;
|
|
1319
1319
|
return val;
|
|
1320
1320
|
}
|
|
1321
1321
|
if (dataTypeKey && dataTypeKey.startsWith("date")) {
|
|
1322
1322
|
const format = dataTypeKey.split("|")[1];
|
|
1323
|
-
const date = format ? (0, $
|
|
1323
|
+
const date = format ? (0, $3zTl3$luxon.DateTime).fromISO(value).toFormat(format) : (0, $3zTl3$luxon.DateTime).fromISO(value).toISO();
|
|
1324
1324
|
return noQuotes || noQuotesForDate ? date : useDoubleQuotes ? `"${date}"` : `'${date}'`;
|
|
1325
1325
|
}
|
|
1326
1326
|
return value;
|
|
1327
1327
|
};
|
|
1328
|
-
function $
|
|
1328
|
+
function $a6783cb3291a88b6$var$getSqlString({ key: key , operator: operator , value: value , useSpace: useSpace = false }) {
|
|
1329
1329
|
const space = useSpace ? " " : "";
|
|
1330
1330
|
return `${key}${space}${operator}${space}${value}`;
|
|
1331
1331
|
}
|
|
1332
|
-
function $
|
|
1332
|
+
function $a6783cb3291a88b6$var$convertQueryToSql(query, keysToMap = [], mapping = {}, dataTypes = {}, customOperatorMapping = {}, options = {}) {
|
|
1333
1333
|
const conjunction = options.conjunction || "AND";
|
|
1334
1334
|
const statement = [];
|
|
1335
1335
|
const keys = !keysToMap.length ? Object.keys(query) : keysToMap;
|
|
1336
1336
|
for (const key of keys){
|
|
1337
1337
|
if (key === "or") {
|
|
1338
|
-
const orPart = $
|
|
1338
|
+
const orPart = $a6783cb3291a88b6$var$convertQueryToSql(query[key], keys, mapping, dataTypes, customOperatorMapping, options);
|
|
1339
1339
|
statement.push("(" + orPart + ")");
|
|
1340
1340
|
continue;
|
|
1341
1341
|
}
|
|
@@ -1349,11 +1349,11 @@ function $30e62e8c4ba4c451$var$convertQueryToSql(query, keysToMap = [], mapping
|
|
|
1349
1349
|
else if (typeof comparison === "object") operators = Object.keys(comparison);
|
|
1350
1350
|
const sqlKey = mapping[key] || key;
|
|
1351
1351
|
for (const operator of operators){
|
|
1352
|
-
const comparator = customOperatorMapping[operator] || $
|
|
1352
|
+
const comparator = customOperatorMapping[operator] || $a6783cb3291a88b6$var$operatorMapping[operator];
|
|
1353
1353
|
if (operator !== "in" && operator !== "nin" && comparator) {
|
|
1354
1354
|
const value = typeof comparison === "object" ? comparison[operator] : comparison;
|
|
1355
|
-
const valueToInsert = $
|
|
1356
|
-
if (valueToInsert !== undefined && valueToInsert !== null) statement.push($
|
|
1355
|
+
const valueToInsert = $a6783cb3291a88b6$var$convertToDataType(value, key, dataTypes, options.useDoubleQuotes, options.noQuotes, options.noQuotesForDate, options.escapeSingleQuotes);
|
|
1356
|
+
if (valueToInsert !== undefined && valueToInsert !== null) statement.push($a6783cb3291a88b6$var$getSqlString({
|
|
1357
1357
|
key: sqlKey,
|
|
1358
1358
|
operator: comparator,
|
|
1359
1359
|
value: valueToInsert,
|
|
@@ -1365,10 +1365,10 @@ function $30e62e8c4ba4c451$var$convertQueryToSql(query, keysToMap = [], mapping
|
|
|
1365
1365
|
const value = Array.isArray(comparison) ? comparison : comparison[operator];
|
|
1366
1366
|
if (options.useOrForIn) {
|
|
1367
1367
|
const orStatement = [];
|
|
1368
|
-
const eqOperator = customOperatorMapping["eq"] || $
|
|
1368
|
+
const eqOperator = customOperatorMapping["eq"] || $a6783cb3291a88b6$var$operatorMapping["eq"];
|
|
1369
1369
|
for (const v of value){
|
|
1370
|
-
const valueToInsert = $
|
|
1371
|
-
if (valueToInsert !== undefined && valueToInsert !== null) orStatement.push($
|
|
1370
|
+
const valueToInsert = $a6783cb3291a88b6$var$convertToDataType(v, key, dataTypes, options.useDoubleQuotes, options.noQuotes, options.noQuotesForDate, options.escapeSingleQuotes);
|
|
1371
|
+
if (valueToInsert !== undefined && valueToInsert !== null) orStatement.push($a6783cb3291a88b6$var$getSqlString({
|
|
1372
1372
|
key: sqlKey,
|
|
1373
1373
|
operator: eqOperator,
|
|
1374
1374
|
value: valueToInsert,
|
|
@@ -1378,11 +1378,11 @@ function $30e62e8c4ba4c451$var$convertQueryToSql(query, keysToMap = [], mapping
|
|
|
1378
1378
|
statement.push("(" + orStatement.join(" OR ") + ")");
|
|
1379
1379
|
continue;
|
|
1380
1380
|
}
|
|
1381
|
-
statement.push($
|
|
1381
|
+
statement.push($a6783cb3291a88b6$var$getSqlString({
|
|
1382
1382
|
key: sqlKey,
|
|
1383
1383
|
operator: comparator,
|
|
1384
1384
|
value: `(${value.map((v)=>{
|
|
1385
|
-
return $
|
|
1385
|
+
return $a6783cb3291a88b6$var$convertToDataType(v, key, dataTypes, options.useDoubleQuotes, options.noQuotes, options.noQuotesForDate, options.escapeSingleQuotes);
|
|
1386
1386
|
}).join(",")})`,
|
|
1387
1387
|
useSpace: !options.noSpaceBetweenOperator
|
|
1388
1388
|
}));
|
|
@@ -1394,10 +1394,10 @@ function $30e62e8c4ba4c451$var$convertQueryToSql(query, keysToMap = [], mapping
|
|
|
1394
1394
|
if (options.groupComparisonInBrackets && statement.length) return statement.reduce((acc, condition)=>`(${acc} ${conjunction} ${condition})`);
|
|
1395
1395
|
return statement.join(` ${conjunction} `);
|
|
1396
1396
|
}
|
|
1397
|
-
var $
|
|
1397
|
+
var $a6783cb3291a88b6$export$2e2bcd8739ae039 = $a6783cb3291a88b6$var$convertQueryToSql;
|
|
1398
1398
|
|
|
1399
1399
|
|
|
1400
|
-
function $
|
|
1400
|
+
function $0b54929963cd52fc$export$2e2bcd8739ae039(buffer, urlSafe = false) {
|
|
1401
1401
|
let binary = "";
|
|
1402
1402
|
const bytes = new Uint8Array(buffer);
|
|
1403
1403
|
const len = bytes.byteLength;
|
|
@@ -1407,52 +1407,301 @@ function $775b7a4456485592$export$2e2bcd8739ae039(buffer, urlSafe = false) {
|
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
1409
|
|
|
1410
|
-
const $
|
|
1410
|
+
const $d971156c4dc5ea75$var$digest = async (text, algorithm = "SHA-256", stringType = "hex")=>{
|
|
1411
1411
|
const encoder = new TextEncoder();
|
|
1412
1412
|
const data = encoder.encode(text);
|
|
1413
1413
|
const hashBuffer = await crypto.subtle.digest(algorithm, data);
|
|
1414
1414
|
if (stringType === "hex") {
|
|
1415
1415
|
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
1416
1416
|
return hashArray.map((b)=>b.toString(16).padStart(2, "0")).join("");
|
|
1417
|
-
} else if (stringType === "base64") return (0, $
|
|
1418
|
-
else if (stringType === "base64-urlSafe") return (0, $
|
|
1417
|
+
} else if (stringType === "base64") return (0, $0b54929963cd52fc$export$2e2bcd8739ae039)(hashBuffer);
|
|
1418
|
+
else if (stringType === "base64-urlSafe") return (0, $0b54929963cd52fc$export$2e2bcd8739ae039)(hashBuffer, true);
|
|
1419
1419
|
};
|
|
1420
|
-
var $
|
|
1420
|
+
var $d971156c4dc5ea75$export$2e2bcd8739ae039 = $d971156c4dc5ea75$var$digest;
|
|
1421
1421
|
|
|
1422
1422
|
|
|
1423
1423
|
|
|
1424
|
-
function $
|
|
1425
|
-
if (format === "RFC2822") return (0, $
|
|
1426
|
-
if (format === "ISO") return (0, $
|
|
1427
|
-
if (format === "fromSeconds") return (0, $
|
|
1428
|
-
return (0, $
|
|
1424
|
+
function $9082feb10eeee34d$var$dtFromFormat(date, format) {
|
|
1425
|
+
if (format === "RFC2822") return (0, $3zTl3$luxon.DateTime).fromRFC2822(date);
|
|
1426
|
+
if (format === "ISO") return (0, $3zTl3$luxon.DateTime).fromISO(date);
|
|
1427
|
+
if (format === "fromSeconds") return (0, $3zTl3$luxon.DateTime).fromSeconds(parseInt(date));
|
|
1428
|
+
return (0, $3zTl3$luxon.DateTime).fromFormat(date, format);
|
|
1429
1429
|
}
|
|
1430
|
-
var $
|
|
1430
|
+
var $9082feb10eeee34d$export$2e2bcd8739ae039 = $9082feb10eeee34d$var$dtFromFormat;
|
|
1431
1431
|
|
|
1432
1432
|
|
|
1433
1433
|
|
|
1434
|
-
function $
|
|
1435
|
-
return (0, $
|
|
1434
|
+
function $2edac044ba27ab6a$var$dtFromIso(arg) {
|
|
1435
|
+
return (0, $3zTl3$luxon.DateTime).fromISO(arg);
|
|
1436
1436
|
}
|
|
1437
|
-
var $
|
|
1437
|
+
var $2edac044ba27ab6a$export$2e2bcd8739ae039 = $2edac044ba27ab6a$var$dtFromIso;
|
|
1438
1438
|
|
|
1439
1439
|
|
|
1440
|
-
function $
|
|
1440
|
+
function $665cba442fba41db$var$firstNonEmpty(...args) {
|
|
1441
1441
|
for (const arg of args){
|
|
1442
1442
|
if (arg !== undefined && arg !== null) return arg;
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
|
-
var $
|
|
1445
|
+
var $665cba442fba41db$export$2e2bcd8739ae039 = $665cba442fba41db$var$firstNonEmpty;
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
async function $6caff2fe6d18a689$export$2e2bcd8739ae039(iterable, mapper, { concurrency: concurrency = Number.POSITIVE_INFINITY , stopOnError: stopOnError = true , signal: signal } = {}) {
|
|
1450
|
+
return new Promise((resolve_, reject_)=>{
|
|
1451
|
+
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
1452
|
+
if (typeof mapper !== "function") throw new TypeError("Mapper function is required");
|
|
1453
|
+
if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
1454
|
+
const result = [];
|
|
1455
|
+
const errors = [];
|
|
1456
|
+
const skippedIndexesMap = new Map();
|
|
1457
|
+
let isRejected = false;
|
|
1458
|
+
let isResolved = false;
|
|
1459
|
+
let isIterableDone = false;
|
|
1460
|
+
let resolvingCount = 0;
|
|
1461
|
+
let currentIndex = 0;
|
|
1462
|
+
const iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
1463
|
+
const signalListener = ()=>{
|
|
1464
|
+
reject(signal.reason);
|
|
1465
|
+
};
|
|
1466
|
+
const cleanup = ()=>{
|
|
1467
|
+
signal?.removeEventListener("abort", signalListener);
|
|
1468
|
+
};
|
|
1469
|
+
const resolve = (value)=>{
|
|
1470
|
+
resolve_(value);
|
|
1471
|
+
cleanup();
|
|
1472
|
+
};
|
|
1473
|
+
const reject = (reason)=>{
|
|
1474
|
+
isRejected = true;
|
|
1475
|
+
isResolved = true;
|
|
1476
|
+
reject_(reason);
|
|
1477
|
+
cleanup();
|
|
1478
|
+
};
|
|
1479
|
+
if (signal) {
|
|
1480
|
+
if (signal.aborted) reject(signal.reason);
|
|
1481
|
+
signal.addEventListener("abort", signalListener, {
|
|
1482
|
+
once: true
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
const next = async ()=>{
|
|
1486
|
+
if (isResolved) return;
|
|
1487
|
+
const nextItem = await iterator.next();
|
|
1488
|
+
const index = currentIndex;
|
|
1489
|
+
currentIndex++;
|
|
1490
|
+
// Note: `iterator.next()` can be called many times in parallel.
|
|
1491
|
+
// This can cause multiple calls to this `next()` function to
|
|
1492
|
+
// receive a `nextItem` with `done === true`.
|
|
1493
|
+
// The shutdown logic that rejects/resolves must be protected
|
|
1494
|
+
// so it runs only one time as the `skippedIndex` logic is
|
|
1495
|
+
// non-idempotent.
|
|
1496
|
+
if (nextItem.done) {
|
|
1497
|
+
isIterableDone = true;
|
|
1498
|
+
if (resolvingCount === 0 && !isResolved) {
|
|
1499
|
+
if (!stopOnError && errors.length > 0) {
|
|
1500
|
+
reject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
isResolved = true;
|
|
1504
|
+
if (skippedIndexesMap.size === 0) {
|
|
1505
|
+
resolve(result);
|
|
1506
|
+
return;
|
|
1507
|
+
}
|
|
1508
|
+
const pureResult = [];
|
|
1509
|
+
// Support multiple `pMapSkip`'s.
|
|
1510
|
+
for (const [index, value] of result.entries()){
|
|
1511
|
+
if (skippedIndexesMap.get(index) === $6caff2fe6d18a689$export$ef41e78d80d1b394) continue;
|
|
1512
|
+
pureResult.push(value);
|
|
1513
|
+
}
|
|
1514
|
+
resolve(pureResult);
|
|
1515
|
+
}
|
|
1516
|
+
return;
|
|
1517
|
+
}
|
|
1518
|
+
resolvingCount++;
|
|
1519
|
+
// Intentionally detached
|
|
1520
|
+
(async ()=>{
|
|
1521
|
+
try {
|
|
1522
|
+
const element = await nextItem.value;
|
|
1523
|
+
if (isResolved) return;
|
|
1524
|
+
const value = await mapper(element, index);
|
|
1525
|
+
// Use Map to stage the index of the element.
|
|
1526
|
+
if (value === $6caff2fe6d18a689$export$ef41e78d80d1b394) skippedIndexesMap.set(index, value);
|
|
1527
|
+
result[index] = value;
|
|
1528
|
+
resolvingCount--;
|
|
1529
|
+
await next();
|
|
1530
|
+
} catch (error) {
|
|
1531
|
+
if (stopOnError) reject(error);
|
|
1532
|
+
else {
|
|
1533
|
+
errors.push(error);
|
|
1534
|
+
resolvingCount--;
|
|
1535
|
+
// In that case we can't really continue regardless of `stopOnError` state
|
|
1536
|
+
// since an iterable is likely to continue throwing after it throws once.
|
|
1537
|
+
// If we continue calling `next()` indefinitely we will likely end up
|
|
1538
|
+
// in an infinite loop of failed iteration.
|
|
1539
|
+
try {
|
|
1540
|
+
await next();
|
|
1541
|
+
} catch (error) {
|
|
1542
|
+
reject(error);
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
})();
|
|
1547
|
+
};
|
|
1548
|
+
// Create the concurrent runners in a detached (non-awaited)
|
|
1549
|
+
// promise. We need this so we can await the `next()` calls
|
|
1550
|
+
// to stop creating runners before hitting the concurrency limit
|
|
1551
|
+
// if the iterable has already been marked as done.
|
|
1552
|
+
// NOTE: We *must* do this for async iterators otherwise we'll spin up
|
|
1553
|
+
// infinite `next()` calls by default and never start the event loop.
|
|
1554
|
+
(async ()=>{
|
|
1555
|
+
for(let index = 0; index < concurrency; index++){
|
|
1556
|
+
try {
|
|
1557
|
+
// eslint-disable-next-line no-await-in-loop
|
|
1558
|
+
await next();
|
|
1559
|
+
} catch (error) {
|
|
1560
|
+
reject(error);
|
|
1561
|
+
break;
|
|
1562
|
+
}
|
|
1563
|
+
if (isIterableDone || isRejected) break;
|
|
1564
|
+
}
|
|
1565
|
+
})();
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
function $6caff2fe6d18a689$export$bbadde7b07dc6039(iterable, mapper, { concurrency: concurrency = Number.POSITIVE_INFINITY , backpressure: backpressure = concurrency } = {}) {
|
|
1569
|
+
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
1570
|
+
if (typeof mapper !== "function") throw new TypeError("Mapper function is required");
|
|
1571
|
+
if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
1572
|
+
if (!(Number.isSafeInteger(backpressure) && backpressure >= concurrency || backpressure === Number.POSITIVE_INFINITY)) throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${concurrency}) and up or \`Infinity\`, got \`${backpressure}\` (${typeof backpressure})`);
|
|
1573
|
+
return {
|
|
1574
|
+
async *[Symbol.asyncIterator] () {
|
|
1575
|
+
const iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();
|
|
1576
|
+
const promises = [];
|
|
1577
|
+
let runningMappersCount = 0;
|
|
1578
|
+
let isDone = false;
|
|
1579
|
+
let index = 0;
|
|
1580
|
+
function trySpawn() {
|
|
1581
|
+
if (isDone || !(runningMappersCount < concurrency && promises.length < backpressure)) return;
|
|
1582
|
+
const promise = (async ()=>{
|
|
1583
|
+
const { done: done , value: value } = await iterator.next();
|
|
1584
|
+
if (done) return {
|
|
1585
|
+
done: true
|
|
1586
|
+
};
|
|
1587
|
+
runningMappersCount++;
|
|
1588
|
+
// Spawn if still below concurrency and backpressure limit
|
|
1589
|
+
trySpawn();
|
|
1590
|
+
try {
|
|
1591
|
+
const returnValue = await mapper(await value, index++);
|
|
1592
|
+
runningMappersCount--;
|
|
1593
|
+
if (returnValue === $6caff2fe6d18a689$export$ef41e78d80d1b394) {
|
|
1594
|
+
const index = promises.indexOf(promise);
|
|
1595
|
+
if (index > 0) promises.splice(index, 1);
|
|
1596
|
+
}
|
|
1597
|
+
// Spawn if still below backpressure limit and just dropped below concurrency limit
|
|
1598
|
+
trySpawn();
|
|
1599
|
+
return {
|
|
1600
|
+
done: false,
|
|
1601
|
+
value: returnValue
|
|
1602
|
+
};
|
|
1603
|
+
} catch (error) {
|
|
1604
|
+
isDone = true;
|
|
1605
|
+
return {
|
|
1606
|
+
error: error
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
})();
|
|
1610
|
+
promises.push(promise);
|
|
1611
|
+
}
|
|
1612
|
+
trySpawn();
|
|
1613
|
+
while(promises.length > 0){
|
|
1614
|
+
const { error: error , done: done , value: value } = await promises[0]; // eslint-disable-line no-await-in-loop
|
|
1615
|
+
promises.shift();
|
|
1616
|
+
if (error) throw error;
|
|
1617
|
+
if (done) return;
|
|
1618
|
+
// Spawn if just dropped below backpressure limit and below the concurrency limit
|
|
1619
|
+
trySpawn();
|
|
1620
|
+
if (value === $6caff2fe6d18a689$export$ef41e78d80d1b394) continue;
|
|
1621
|
+
yield value;
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
const $6caff2fe6d18a689$export$ef41e78d80d1b394 = Symbol("skip");
|
|
1627
|
+
|
|
1446
1628
|
|
|
1447
1629
|
|
|
1448
1630
|
|
|
1631
|
+
class $b92a9d726054b2ee$export$18b052ffd8c84d7 extends Error {
|
|
1632
|
+
constructor(message){
|
|
1633
|
+
super();
|
|
1634
|
+
if (message instanceof Error) {
|
|
1635
|
+
this.originalError = message;
|
|
1636
|
+
({ message: message } = message);
|
|
1637
|
+
} else {
|
|
1638
|
+
this.originalError = new Error(message);
|
|
1639
|
+
this.originalError.stack = this.stack;
|
|
1640
|
+
}
|
|
1641
|
+
this.name = "AbortError";
|
|
1642
|
+
this.message = message;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
const $b92a9d726054b2ee$var$decorateErrorWithCounts = (error, attemptNumber, options)=>{
|
|
1646
|
+
// Minus 1 from attemptNumber because the first attempt does not count as a retry
|
|
1647
|
+
const retriesLeft = options.retries - (attemptNumber - 1);
|
|
1648
|
+
error.attemptNumber = attemptNumber;
|
|
1649
|
+
error.retriesLeft = retriesLeft;
|
|
1650
|
+
return error;
|
|
1651
|
+
};
|
|
1652
|
+
async function $b92a9d726054b2ee$export$2e2bcd8739ae039(input, options) {
|
|
1653
|
+
return new Promise((resolve, reject)=>{
|
|
1654
|
+
options = {
|
|
1655
|
+
...options
|
|
1656
|
+
};
|
|
1657
|
+
options.onFailedAttempt ??= ()=>{};
|
|
1658
|
+
options.shouldRetry ??= ()=>true;
|
|
1659
|
+
options.retries ??= 10;
|
|
1660
|
+
const operation = (0, ($parcel$interopDefault($3zTl3$retry))).operation(options);
|
|
1661
|
+
const abortHandler = ()=>{
|
|
1662
|
+
operation.stop();
|
|
1663
|
+
reject(options.signal?.reason);
|
|
1664
|
+
};
|
|
1665
|
+
if (options.signal && !options.signal.aborted) options.signal.addEventListener("abort", abortHandler, {
|
|
1666
|
+
once: true
|
|
1667
|
+
});
|
|
1668
|
+
const cleanUp = ()=>{
|
|
1669
|
+
options.signal?.removeEventListener("abort", abortHandler);
|
|
1670
|
+
operation.stop();
|
|
1671
|
+
};
|
|
1672
|
+
operation.attempt(async (attemptNumber)=>{
|
|
1673
|
+
try {
|
|
1674
|
+
const result = await input(attemptNumber);
|
|
1675
|
+
cleanUp();
|
|
1676
|
+
resolve(result);
|
|
1677
|
+
} catch (error) {
|
|
1678
|
+
try {
|
|
1679
|
+
if (!(error instanceof Error)) throw new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`);
|
|
1680
|
+
if (error instanceof $b92a9d726054b2ee$export$18b052ffd8c84d7) throw error.originalError;
|
|
1681
|
+
if (error instanceof TypeError && !(0, ($parcel$interopDefault($3zTl3$isnetworkerror)))(error)) throw error;
|
|
1682
|
+
$b92a9d726054b2ee$var$decorateErrorWithCounts(error, attemptNumber, options);
|
|
1683
|
+
if (!await options.shouldRetry(error)) {
|
|
1684
|
+
operation.stop();
|
|
1685
|
+
reject(error);
|
|
1686
|
+
}
|
|
1687
|
+
await options.onFailedAttempt(error);
|
|
1688
|
+
if (!operation.retry(error)) throw operation.mainError();
|
|
1689
|
+
} catch (finalError) {
|
|
1690
|
+
$b92a9d726054b2ee$var$decorateErrorWithCounts(finalError, attemptNumber, options);
|
|
1691
|
+
cleanUp();
|
|
1692
|
+
reject(finalError);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
});
|
|
1696
|
+
});
|
|
1697
|
+
}
|
|
1449
1698
|
|
|
1450
1699
|
|
|
1451
|
-
async function $
|
|
1452
|
-
if (!(0, $
|
|
1453
|
-
const chunks = (0, $
|
|
1454
|
-
return await (0,
|
|
1455
|
-
return await (0,
|
|
1700
|
+
async function $dffda90242e66ade$var$generateEmbeddingsCohere(body, api_key) {
|
|
1701
|
+
if (!(0, $3zTl3$lodash.isEmpty)(body.texts)) {
|
|
1702
|
+
const chunks = (0, $3zTl3$lodash.chunk)((0, $3zTl3$lodash.castArray)(body.texts), 20);
|
|
1703
|
+
return await (0, $6caff2fe6d18a689$export$2e2bcd8739ae039)(chunks, async (chunk)=>{
|
|
1704
|
+
return await (0, $b92a9d726054b2ee$export$2e2bcd8739ae039)(async ()=>{
|
|
1456
1705
|
const response = await fetch("https://api.cohere.com/v2/embed", {
|
|
1457
1706
|
method: "POST",
|
|
1458
1707
|
headers: {
|
|
@@ -1469,7 +1718,7 @@ async function $b98e369677054b00$var$generateEmbeddingsCohere(body, api_key) {
|
|
|
1469
1718
|
if (!response.ok) {
|
|
1470
1719
|
if (response.status === 429) throw new Error("Rate limit exceeded");
|
|
1471
1720
|
if (response.status >= 500) throw new Error("Server error");
|
|
1472
|
-
throw new (0, $
|
|
1721
|
+
throw new (0, $b92a9d726054b2ee$export$18b052ffd8c84d7)(await response.text());
|
|
1473
1722
|
}
|
|
1474
1723
|
return await response.json();
|
|
1475
1724
|
}, {
|
|
@@ -1480,7 +1729,7 @@ async function $b98e369677054b00$var$generateEmbeddingsCohere(body, api_key) {
|
|
|
1480
1729
|
}, {
|
|
1481
1730
|
concurrency: 1
|
|
1482
1731
|
});
|
|
1483
|
-
} else if (!(0, $
|
|
1732
|
+
} else if (!(0, $3zTl3$lodash.isEmpty)(body.images)) return await (0, $b92a9d726054b2ee$export$2e2bcd8739ae039)(async ()=>{
|
|
1484
1733
|
const response = await fetch("https://api.cohere.com/v2/embed", {
|
|
1485
1734
|
method: "POST",
|
|
1486
1735
|
headers: {
|
|
@@ -1494,7 +1743,7 @@ async function $b98e369677054b00$var$generateEmbeddingsCohere(body, api_key) {
|
|
|
1494
1743
|
if (!response.ok) {
|
|
1495
1744
|
if (response.status === 429) throw new Error("Rate limit exceeded");
|
|
1496
1745
|
if (response.status >= 500) throw new Error("Server error");
|
|
1497
|
-
throw new (0, $
|
|
1746
|
+
throw new (0, $b92a9d726054b2ee$export$18b052ffd8c84d7)(await response.text());
|
|
1498
1747
|
}
|
|
1499
1748
|
return await response.json();
|
|
1500
1749
|
}, {
|
|
@@ -1503,17 +1752,17 @@ async function $b98e369677054b00$var$generateEmbeddingsCohere(body, api_key) {
|
|
|
1503
1752
|
minTimeout: 2500
|
|
1504
1753
|
});
|
|
1505
1754
|
}
|
|
1506
|
-
var $
|
|
1755
|
+
var $dffda90242e66ade$export$2e2bcd8739ae039 = $dffda90242e66ade$var$generateEmbeddingsCohere;
|
|
1507
1756
|
|
|
1508
1757
|
|
|
1509
1758
|
|
|
1510
|
-
async function $
|
|
1511
|
-
return file && (0, $
|
|
1759
|
+
async function $02bf3dfb6ea07776$var$getArrayBuffer(file) {
|
|
1760
|
+
return file && (0, $3zTl3$lodash.isFunction)(file.arrayBuffer) ? await file.arrayBuffer() : undefined;
|
|
1512
1761
|
}
|
|
1513
|
-
var $
|
|
1762
|
+
var $02bf3dfb6ea07776$export$2e2bcd8739ae039 = $02bf3dfb6ea07776$var$getArrayBuffer;
|
|
1514
1763
|
|
|
1515
1764
|
|
|
1516
|
-
async function $
|
|
1765
|
+
async function $1d2685fb8fe23757$var$getDataUri(file, mimeType) {
|
|
1517
1766
|
if (!mimeType) throw new Error("Mime type is required");
|
|
1518
1767
|
if (file instanceof ReadableStream) {
|
|
1519
1768
|
const chunks = [];
|
|
@@ -1528,50 +1777,50 @@ async function $da697c8f5d45fcb8$var$getDataUri(file, mimeType) {
|
|
|
1528
1777
|
const base64Image = buffer.toString("base64");
|
|
1529
1778
|
return `data:${mimeType};base64,${base64Image}`;
|
|
1530
1779
|
}
|
|
1531
|
-
var $
|
|
1780
|
+
var $1d2685fb8fe23757$export$2e2bcd8739ae039 = $1d2685fb8fe23757$var$getDataUri;
|
|
1532
1781
|
|
|
1533
1782
|
|
|
1534
1783
|
|
|
1535
|
-
function $
|
|
1784
|
+
function $316e115577b8205f$var$getMimeType(extensionType) {
|
|
1536
1785
|
try {
|
|
1537
|
-
return (0, ($parcel$interopDefault($
|
|
1786
|
+
return (0, ($parcel$interopDefault($3zTl3$mime))).getType(extensionType);
|
|
1538
1787
|
} catch (e) {
|
|
1539
1788
|
return null;
|
|
1540
1789
|
}
|
|
1541
1790
|
}
|
|
1542
|
-
var $
|
|
1791
|
+
var $316e115577b8205f$export$2e2bcd8739ae039 = $316e115577b8205f$var$getMimeType;
|
|
1543
1792
|
|
|
1544
1793
|
|
|
1545
|
-
function $
|
|
1794
|
+
function $ce38a4d01b229610$var$jsonParse(str) {
|
|
1546
1795
|
try {
|
|
1547
1796
|
return JSON.parse(str);
|
|
1548
1797
|
} catch (e) {
|
|
1549
1798
|
return null;
|
|
1550
1799
|
}
|
|
1551
1800
|
}
|
|
1552
|
-
var $
|
|
1801
|
+
var $ce38a4d01b229610$export$2e2bcd8739ae039 = $ce38a4d01b229610$var$jsonParse;
|
|
1553
1802
|
|
|
1554
1803
|
|
|
1555
1804
|
|
|
1556
|
-
function $
|
|
1805
|
+
function $09e98f4df44294f2$export$2e2bcd8739ae039(json, options = {
|
|
1557
1806
|
compact: true,
|
|
1558
1807
|
spaces: 4
|
|
1559
1808
|
}) {
|
|
1560
|
-
return (0, $
|
|
1809
|
+
return (0, $3zTl3$xmljs.js2xml)(json, options);
|
|
1561
1810
|
}
|
|
1562
1811
|
|
|
1563
1812
|
|
|
1564
1813
|
|
|
1565
1814
|
|
|
1566
1815
|
|
|
1567
|
-
function $
|
|
1816
|
+
function $21046f65d0d5a838$var$getNormalizedString(value) {
|
|
1568
1817
|
return value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
1569
1818
|
}
|
|
1570
|
-
function $
|
|
1571
|
-
const normalizedValue = $
|
|
1572
|
-
const result = (0, $
|
|
1573
|
-
const normalizedPossibleValue = $
|
|
1574
|
-
const similarity = (0, $
|
|
1819
|
+
function $21046f65d0d5a838$var$mostSimilar(value, possibleValues, threshold = 0.8) {
|
|
1820
|
+
const normalizedValue = $21046f65d0d5a838$var$getNormalizedString(value);
|
|
1821
|
+
const result = (0, $3zTl3$lodash.reduce)(possibleValues, (acc, possibleValue)=>{
|
|
1822
|
+
const normalizedPossibleValue = $21046f65d0d5a838$var$getNormalizedString(possibleValue);
|
|
1823
|
+
const similarity = (0, $3zTl3$dicecoefficient.diceCoefficient)(normalizedValue, normalizedPossibleValue);
|
|
1575
1824
|
if (similarity > acc.similarity) return {
|
|
1576
1825
|
similarity: similarity,
|
|
1577
1826
|
value: possibleValue
|
|
@@ -1583,15 +1832,15 @@ function $0499a1669d807cf8$var$mostSimilar(value, possibleValues, threshold = 0.
|
|
|
1583
1832
|
});
|
|
1584
1833
|
return result.similarity >= threshold ? result.value : value;
|
|
1585
1834
|
}
|
|
1586
|
-
var $
|
|
1835
|
+
var $21046f65d0d5a838$export$2e2bcd8739ae039 = $21046f65d0d5a838$var$mostSimilar;
|
|
1587
1836
|
|
|
1588
1837
|
|
|
1589
1838
|
|
|
1590
|
-
async function $
|
|
1839
|
+
async function $efbd030a3c373e25$var$parseDocument(file, fileType) {
|
|
1591
1840
|
const documentParserApiUrl = this.environment.lookup("documentParserApiUrl");
|
|
1592
1841
|
const documentParserApiKey = this.environment.lookup("documentParserApiKey");
|
|
1593
1842
|
if (!documentParserApiKey) throw new Error("API key not found in environment");
|
|
1594
|
-
return await (0,
|
|
1843
|
+
return await (0, $b92a9d726054b2ee$export$2e2bcd8739ae039)(async ()=>{
|
|
1595
1844
|
const response = await fetch(`${documentParserApiUrl}/parse`, {
|
|
1596
1845
|
method: "POST",
|
|
1597
1846
|
headers: {
|
|
@@ -1605,7 +1854,7 @@ async function $8bd834eb1e3f8e3b$var$parseDocument(file, fileType) {
|
|
|
1605
1854
|
if (!response.ok) {
|
|
1606
1855
|
if (response.status === 429) throw new Error("Rate limit exceeded");
|
|
1607
1856
|
if (response.status >= 500) throw new Error("Server error");
|
|
1608
|
-
throw new (0, $
|
|
1857
|
+
throw new (0, $b92a9d726054b2ee$export$18b052ffd8c84d7)(await response.text());
|
|
1609
1858
|
}
|
|
1610
1859
|
const data = await response.json();
|
|
1611
1860
|
return data.content;
|
|
@@ -1615,54 +1864,54 @@ async function $8bd834eb1e3f8e3b$var$parseDocument(file, fileType) {
|
|
|
1615
1864
|
minTimeout: 2500
|
|
1616
1865
|
});
|
|
1617
1866
|
}
|
|
1618
|
-
var $
|
|
1867
|
+
var $efbd030a3c373e25$export$2e2bcd8739ae039 = $efbd030a3c373e25$var$parseDocument;
|
|
1619
1868
|
|
|
1620
1869
|
|
|
1621
1870
|
|
|
1622
|
-
function $
|
|
1623
|
-
return (0, ($parcel$interopDefault($
|
|
1871
|
+
function $9f18acaa689146e0$export$2e2bcd8739ae039(query, options) {
|
|
1872
|
+
return (0, ($parcel$interopDefault($3zTl3$qs))).parse(query, options);
|
|
1624
1873
|
}
|
|
1625
1874
|
|
|
1626
1875
|
|
|
1627
|
-
function $
|
|
1876
|
+
function $19208687036f0460$var$parseUrl(url) {
|
|
1628
1877
|
return new URL(url);
|
|
1629
1878
|
}
|
|
1630
|
-
var $
|
|
1879
|
+
var $19208687036f0460$export$2e2bcd8739ae039 = $19208687036f0460$var$parseUrl;
|
|
1631
1880
|
|
|
1632
1881
|
|
|
1633
1882
|
|
|
1634
1883
|
|
|
1635
|
-
async function $
|
|
1884
|
+
async function $067d3de34f549b6b$export$e600492876ee595b(text, options = {
|
|
1636
1885
|
chunkSize: 200,
|
|
1637
1886
|
chunkOverlap: 60
|
|
1638
1887
|
}) {
|
|
1639
1888
|
let textToSplit;
|
|
1640
|
-
if ((0, $
|
|
1641
|
-
else if ((0, $
|
|
1642
|
-
else textToSplit = (0, $
|
|
1643
|
-
const splitter = new (0, $
|
|
1889
|
+
if ((0, $3zTl3$lodash.isString)(text)) textToSplit = text;
|
|
1890
|
+
else if ((0, $3zTl3$lodash.isPlainObject)(text) || (0, $3zTl3$lodash.isArray)(text)) textToSplit = JSON.stringify(text, null, 2);
|
|
1891
|
+
else textToSplit = (0, $3zTl3$lodash.toString)(text);
|
|
1892
|
+
const splitter = new (0, $3zTl3$langchaintextsplitters.RecursiveCharacterTextSplitter)(options);
|
|
1644
1893
|
return splitter.splitText(textToSplit);
|
|
1645
1894
|
}
|
|
1646
1895
|
|
|
1647
1896
|
|
|
1648
|
-
function $
|
|
1897
|
+
function $409acf59e1abf039$var$removeEmpty(arg) {
|
|
1649
1898
|
return arg.length ? arg : undefined;
|
|
1650
1899
|
}
|
|
1651
|
-
var $
|
|
1900
|
+
var $409acf59e1abf039$export$2e2bcd8739ae039 = $409acf59e1abf039$var$removeEmpty;
|
|
1652
1901
|
|
|
1653
1902
|
|
|
1654
|
-
function $
|
|
1903
|
+
function $86ec8bea4fa12e76$var$removeEmptyItems(arg) {
|
|
1655
1904
|
if (!Array.isArray(arg)) return arg;
|
|
1656
1905
|
return arg.filter((item)=>{
|
|
1657
1906
|
if (item && typeof item === "object") return Object.keys(item).length > 0;
|
|
1658
1907
|
return item;
|
|
1659
1908
|
});
|
|
1660
1909
|
}
|
|
1661
|
-
var $
|
|
1910
|
+
var $86ec8bea4fa12e76$export$2e2bcd8739ae039 = $86ec8bea4fa12e76$var$removeEmptyItems;
|
|
1662
1911
|
|
|
1663
1912
|
|
|
1664
1913
|
|
|
1665
|
-
const $
|
|
1914
|
+
const $3c948c2fb989711d$var$sign = async (text, algorithm = "SHA-256", secret, outputFormat = "hex")=>{
|
|
1666
1915
|
const key = await crypto.subtle.importKey("raw", new TextEncoder().encode(secret), {
|
|
1667
1916
|
name: "HMAC",
|
|
1668
1917
|
hash: algorithm
|
|
@@ -1675,19 +1924,19 @@ const $81ab94868fc7e61b$var$sign = async (text, algorithm = "SHA-256", secret, o
|
|
|
1675
1924
|
if (outputFormat === "hex") {
|
|
1676
1925
|
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
1677
1926
|
return hashArray.map((b)=>b.toString(16).padStart(2, "0")).join("");
|
|
1678
|
-
} else if (outputFormat === "base64") return (0, $
|
|
1679
|
-
else if (outputFormat === "base64-urlSafe") return (0, $
|
|
1927
|
+
} else if (outputFormat === "base64") return (0, $0b54929963cd52fc$export$2e2bcd8739ae039)(hashBuffer);
|
|
1928
|
+
else if (outputFormat === "base64-urlSafe") return (0, $0b54929963cd52fc$export$2e2bcd8739ae039)(hashBuffer, true);
|
|
1680
1929
|
};
|
|
1681
|
-
var $
|
|
1930
|
+
var $3c948c2fb989711d$export$2e2bcd8739ae039 = $3c948c2fb989711d$var$sign;
|
|
1682
1931
|
|
|
1683
1932
|
|
|
1684
1933
|
|
|
1685
|
-
function $
|
|
1934
|
+
function $e18afb64e0fcb863$export$96d07f33920abf3e(array, idKey = "id", parentIdKey = "parent_id", sequenceKey = "sequence") {
|
|
1686
1935
|
// Step 1: Create a Map for quick lookup of nodes by their id
|
|
1687
1936
|
const nodeMap = new Map();
|
|
1688
1937
|
// Populate the map
|
|
1689
1938
|
array.forEach((node)=>{
|
|
1690
|
-
nodeMap.set((0, $
|
|
1939
|
+
nodeMap.set((0, $3zTl3$lodash.get)(node, idKey), {
|
|
1691
1940
|
...node,
|
|
1692
1941
|
children: []
|
|
1693
1942
|
});
|
|
@@ -1696,8 +1945,8 @@ function $580b3b65043a36bb$export$96d07f33920abf3e(array, idKey = "id", parentId
|
|
|
1696
1945
|
const rootNodes = [];
|
|
1697
1946
|
// Step 3: Organize the nodes into a tree structure
|
|
1698
1947
|
array.forEach((node)=>{
|
|
1699
|
-
const parentId = (0, $
|
|
1700
|
-
const nodeId = (0, $
|
|
1948
|
+
const parentId = (0, $3zTl3$lodash.get)(node, parentIdKey);
|
|
1949
|
+
const nodeId = (0, $3zTl3$lodash.get)(node, idKey);
|
|
1701
1950
|
if (parentId && nodeMap.has(parentId)) // If the parent exists, add the current node as a child
|
|
1702
1951
|
nodeMap.get(parentId)?.children?.push(nodeMap.get(nodeId));
|
|
1703
1952
|
else // Treat it as a root node if the parent doesn't exist or it's null
|
|
@@ -1706,7 +1955,7 @@ function $580b3b65043a36bb$export$96d07f33920abf3e(array, idKey = "id", parentId
|
|
|
1706
1955
|
// Step 4: Recursive function to sort nodes and their children
|
|
1707
1956
|
function sortTree(nodes) {
|
|
1708
1957
|
// Sort nodes using lodash by sequence
|
|
1709
|
-
const sortedNodes = (0, $
|
|
1958
|
+
const sortedNodes = (0, $3zTl3$lodash.sortBy)(nodes, sequenceKey);
|
|
1710
1959
|
sortedNodes.forEach((node)=>{
|
|
1711
1960
|
if (node.children && node.children.length > 0) node.children = sortTree(node.children);
|
|
1712
1961
|
});
|
|
@@ -1717,7 +1966,7 @@ function $580b3b65043a36bb$export$96d07f33920abf3e(array, idKey = "id", parentId
|
|
|
1717
1966
|
// Step 6: Flatten the sorted tree into an array (keeping the parent-child structure)
|
|
1718
1967
|
function flattenTree(nodes) {
|
|
1719
1968
|
return nodes.reduce((acc, node)=>{
|
|
1720
|
-
acc.push((0, $
|
|
1969
|
+
acc.push((0, $3zTl3$lodash.omit)(node, "children")) // Push the current node without 'children'
|
|
1721
1970
|
;
|
|
1722
1971
|
if (node.children && node.children.length > 0) acc.push(...flattenTree(node.children)) // Recursively flatten children
|
|
1723
1972
|
;
|
|
@@ -1726,44 +1975,44 @@ function $580b3b65043a36bb$export$96d07f33920abf3e(array, idKey = "id", parentId
|
|
|
1726
1975
|
}
|
|
1727
1976
|
return flattenTree(sortedTree);
|
|
1728
1977
|
}
|
|
1729
|
-
var $
|
|
1978
|
+
var $e18afb64e0fcb863$export$2e2bcd8739ae039 = $e18afb64e0fcb863$export$96d07f33920abf3e;
|
|
1730
1979
|
|
|
1731
1980
|
|
|
1732
1981
|
|
|
1733
|
-
function $
|
|
1734
|
-
return (0, ($parcel$interopDefault($
|
|
1982
|
+
function $6416a1557ab538fa$export$2e2bcd8739ae039(query, options) {
|
|
1983
|
+
return (0, ($parcel$interopDefault($3zTl3$qs))).stringify(query, options);
|
|
1735
1984
|
}
|
|
1736
1985
|
|
|
1737
1986
|
|
|
1738
|
-
async function $
|
|
1987
|
+
async function $b556c214cf9fbe42$var$teeStream(stream) {
|
|
1739
1988
|
return stream.tee();
|
|
1740
1989
|
}
|
|
1741
|
-
var $
|
|
1990
|
+
var $b556c214cf9fbe42$export$2e2bcd8739ae039 = $b556c214cf9fbe42$var$teeStream;
|
|
1742
1991
|
|
|
1743
1992
|
|
|
1744
1993
|
|
|
1745
|
-
function $
|
|
1746
|
-
return (0, $
|
|
1994
|
+
function $8188b81ace44452c$var$toNumber(value) {
|
|
1995
|
+
return (0, $3zTl3$lodash.toNumber)(value);
|
|
1747
1996
|
}
|
|
1748
|
-
var $
|
|
1997
|
+
var $8188b81ace44452c$export$2e2bcd8739ae039 = $8188b81ace44452c$var$toNumber;
|
|
1749
1998
|
|
|
1750
1999
|
|
|
1751
|
-
function $
|
|
2000
|
+
function $708bdc647265ecf3$var$uuid() {
|
|
1752
2001
|
return crypto.randomUUID();
|
|
1753
2002
|
}
|
|
1754
|
-
var $
|
|
2003
|
+
var $708bdc647265ecf3$export$2e2bcd8739ae039 = $708bdc647265ecf3$var$uuid;
|
|
1755
2004
|
|
|
1756
2005
|
|
|
1757
2006
|
|
|
1758
|
-
function $
|
|
2007
|
+
function $6a61bd8a992c33e8$export$2e2bcd8739ae039(xml, options = {
|
|
1759
2008
|
compact: true,
|
|
1760
2009
|
spaces: 4
|
|
1761
2010
|
}) {
|
|
1762
|
-
return (0, $
|
|
2011
|
+
return (0, $3zTl3$xmljs.xml2js)(xml, options);
|
|
1763
2012
|
}
|
|
1764
2013
|
|
|
1765
2014
|
|
|
1766
|
-
function $
|
|
2015
|
+
function $97d2742c75f2c9e6$var$zipSqlResponse(columns, data, key) {
|
|
1767
2016
|
// @ts-ignore
|
|
1768
2017
|
const columnKeys = columns.map((col)=>col[key]);
|
|
1769
2018
|
// @ts-ignore
|
|
@@ -1774,109 +2023,109 @@ function $4ce9fabd9c4c00da$var$zipSqlResponse(columns, data, key) {
|
|
|
1774
2023
|
return obj;
|
|
1775
2024
|
});
|
|
1776
2025
|
}
|
|
1777
|
-
var $
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
function $
|
|
1781
|
-
expression.registerFunction("dtFromIso", (0, $
|
|
1782
|
-
expression.registerFunction("base64decode", (0, $
|
|
1783
|
-
expression.registerFunction("base64encode", (0, $
|
|
1784
|
-
expression.registerFunction("base64ToBlob", (0, $
|
|
1785
|
-
expression.registerFunction("dtFromFormat", (0, $
|
|
1786
|
-
expression.registerFunction("removeEmpty", (0, $
|
|
1787
|
-
expression.registerFunction("removeEmptyItems", (0, $
|
|
1788
|
-
expression.registerFunction("convertCurrencyToSubunit", (0, $
|
|
1789
|
-
expression.registerFunction("convertCurrencyFromSubunit", (0, $
|
|
1790
|
-
expression.registerFunction("convertQueryToSql", (0, $
|
|
1791
|
-
expression.registerFunction("mapValues", (0, $
|
|
1792
|
-
expression.registerFunction("zipSqlResponse", (0, $
|
|
1793
|
-
expression.registerFunction("firstNonEmpty", (0, $
|
|
1794
|
-
expression.registerFunction("convertNotionToMd", (0, $
|
|
1795
|
-
expression.registerFunction("convertNotionToMarkdown", (0, $
|
|
1796
|
-
expression.registerFunction("convertMarkdownToGoogleDocs", (0, $
|
|
1797
|
-
expression.registerFunction("convertMarkdownToNotion", (0, $
|
|
1798
|
-
expression.registerFunction("convertMarkdownToSlack", (0, $
|
|
1799
|
-
expression.registerFunction("parseUrl", (0, $
|
|
2026
|
+
var $97d2742c75f2c9e6$export$2e2bcd8739ae039 = $97d2742c75f2c9e6$var$zipSqlResponse;
|
|
2027
|
+
|
|
2028
|
+
|
|
2029
|
+
function $b460a5b5a1bfbcaa$export$2e2bcd8739ae039(expression) {
|
|
2030
|
+
expression.registerFunction("dtFromIso", (0, $2edac044ba27ab6a$export$2e2bcd8739ae039));
|
|
2031
|
+
expression.registerFunction("base64decode", (0, $39b2a18afc136a8c$export$2e2bcd8739ae039));
|
|
2032
|
+
expression.registerFunction("base64encode", (0, $d31bfe3ac2771938$export$2e2bcd8739ae039));
|
|
2033
|
+
expression.registerFunction("base64ToBlob", (0, $2911cf265127fccd$export$2e2bcd8739ae039));
|
|
2034
|
+
expression.registerFunction("dtFromFormat", (0, $9082feb10eeee34d$export$2e2bcd8739ae039));
|
|
2035
|
+
expression.registerFunction("removeEmpty", (0, $409acf59e1abf039$export$2e2bcd8739ae039));
|
|
2036
|
+
expression.registerFunction("removeEmptyItems", (0, $86ec8bea4fa12e76$export$2e2bcd8739ae039));
|
|
2037
|
+
expression.registerFunction("convertCurrencyToSubunit", (0, $a08ac2c1f19b49f6$export$2e2bcd8739ae039));
|
|
2038
|
+
expression.registerFunction("convertCurrencyFromSubunit", (0, $65782232fbed9203$export$2e2bcd8739ae039));
|
|
2039
|
+
expression.registerFunction("convertQueryToSql", (0, $a6783cb3291a88b6$export$2e2bcd8739ae039));
|
|
2040
|
+
expression.registerFunction("mapValues", (0, $88bc758117136ee0$export$2e2bcd8739ae039));
|
|
2041
|
+
expression.registerFunction("zipSqlResponse", (0, $97d2742c75f2c9e6$export$2e2bcd8739ae039));
|
|
2042
|
+
expression.registerFunction("firstNonEmpty", (0, $665cba442fba41db$export$2e2bcd8739ae039));
|
|
2043
|
+
expression.registerFunction("convertNotionToMd", (0, $722a183009375374$export$2e2bcd8739ae039));
|
|
2044
|
+
expression.registerFunction("convertNotionToMarkdown", (0, $4f56a3e9af97aaa5$export$2e2bcd8739ae039));
|
|
2045
|
+
expression.registerFunction("convertMarkdownToGoogleDocs", (0, $39a79f6a674f8737$export$2e2bcd8739ae039));
|
|
2046
|
+
expression.registerFunction("convertMarkdownToNotion", (0, $2d5ba20fb7a31048$export$2e2bcd8739ae039));
|
|
2047
|
+
expression.registerFunction("convertMarkdownToSlack", (0, $4157d5c97996ba13$export$2e2bcd8739ae039));
|
|
2048
|
+
expression.registerFunction("parseUrl", (0, $19208687036f0460$export$2e2bcd8739ae039));
|
|
1800
2049
|
expression.registerFunction("difference", function(arr1, arr2) {
|
|
1801
|
-
return (0, $
|
|
2050
|
+
return (0, $3zTl3$lodash.difference)(arr1, arr2);
|
|
1802
2051
|
});
|
|
1803
|
-
expression.registerFunction("toNumber", (0, $
|
|
1804
|
-
expression.registerFunction("jsonParse", (0, $
|
|
1805
|
-
expression.registerFunction("getMimeType", (0, $
|
|
1806
|
-
expression.registerFunction("uuid", (0, $
|
|
1807
|
-
expression.registerFunction("getArrayBuffer", (0, $
|
|
1808
|
-
expression.registerFunction("mostSimilar", (0, $
|
|
1809
|
-
expression.registerFunction("sortNodes", (0, $
|
|
1810
|
-
expression.registerFunction("blob", (0, $
|
|
1811
|
-
expression.registerFunction("convertHtmlToMarkdown", (0, $
|
|
1812
|
-
expression.registerFunction("convertMarkdownToHtml", (0, $
|
|
1813
|
-
expression.registerFunction("digest", (0, $
|
|
1814
|
-
expression.registerFunction("sign", (0, $
|
|
1815
|
-
expression.registerFunction("xmlToJs", (0, $
|
|
1816
|
-
expression.registerFunction("jsToXml", (0, $
|
|
1817
|
-
expression.registerFunction("generateEmbeddingsCohere", (0, $
|
|
2052
|
+
expression.registerFunction("toNumber", (0, $8188b81ace44452c$export$2e2bcd8739ae039));
|
|
2053
|
+
expression.registerFunction("jsonParse", (0, $ce38a4d01b229610$export$2e2bcd8739ae039));
|
|
2054
|
+
expression.registerFunction("getMimeType", (0, $316e115577b8205f$export$2e2bcd8739ae039));
|
|
2055
|
+
expression.registerFunction("uuid", (0, $708bdc647265ecf3$export$2e2bcd8739ae039));
|
|
2056
|
+
expression.registerFunction("getArrayBuffer", (0, $02bf3dfb6ea07776$export$2e2bcd8739ae039));
|
|
2057
|
+
expression.registerFunction("mostSimilar", (0, $21046f65d0d5a838$export$2e2bcd8739ae039));
|
|
2058
|
+
expression.registerFunction("sortNodes", (0, $e18afb64e0fcb863$export$2e2bcd8739ae039));
|
|
2059
|
+
expression.registerFunction("blob", (0, $a52f8aff642734e8$export$2e2bcd8739ae039));
|
|
2060
|
+
expression.registerFunction("convertHtmlToMarkdown", (0, $32dbd29821d4a1cf$export$2e2bcd8739ae039));
|
|
2061
|
+
expression.registerFunction("convertMarkdownToHtml", (0, $81152fd114f29b5a$export$2e2bcd8739ae039));
|
|
2062
|
+
expression.registerFunction("digest", (0, $d971156c4dc5ea75$export$2e2bcd8739ae039));
|
|
2063
|
+
expression.registerFunction("sign", (0, $3c948c2fb989711d$export$2e2bcd8739ae039));
|
|
2064
|
+
expression.registerFunction("xmlToJs", (0, $6a61bd8a992c33e8$export$2e2bcd8739ae039));
|
|
2065
|
+
expression.registerFunction("jsToXml", (0, $09e98f4df44294f2$export$2e2bcd8739ae039));
|
|
2066
|
+
expression.registerFunction("generateEmbeddingsCohere", (0, $dffda90242e66ade$export$2e2bcd8739ae039));
|
|
1818
2067
|
expression.registerFunction("groupBy", function(array, key) {
|
|
1819
|
-
return (0, $
|
|
2068
|
+
return (0, $3zTl3$lodash.groupBy)((0, $3zTl3$lodash.castArray)(array), key);
|
|
1820
2069
|
});
|
|
1821
2070
|
expression.registerFunction("keyBy", function(array, key) {
|
|
1822
|
-
return (0, $
|
|
2071
|
+
return (0, $3zTl3$lodash.keyBy)((0, $3zTl3$lodash.castArray)(array), key);
|
|
1823
2072
|
});
|
|
1824
2073
|
expression.registerFunction("pick", function(obj, keys) {
|
|
1825
|
-
return (0, $
|
|
2074
|
+
return (0, $3zTl3$lodash.pick)(obj, keys);
|
|
1826
2075
|
});
|
|
1827
2076
|
expression.registerFunction("omit", function(obj, keys) {
|
|
1828
|
-
return (0, $
|
|
2077
|
+
return (0, $3zTl3$lodash.omit)(obj, keys);
|
|
1829
2078
|
});
|
|
1830
2079
|
expression.registerFunction("compact", function(arr) {
|
|
1831
|
-
return (0, $
|
|
2080
|
+
return (0, $3zTl3$lodash.compact)((0, $3zTl3$lodash.castArray)(arr));
|
|
1832
2081
|
});
|
|
1833
2082
|
expression.registerFunction("join", function(arr, separator) {
|
|
1834
|
-
return (0, $
|
|
2083
|
+
return (0, $3zTl3$lodash.join)((0, $3zTl3$lodash.castArray)(arr), separator);
|
|
1835
2084
|
});
|
|
1836
2085
|
expression.registerFunction("orderBy", function(arr, attr, order) {
|
|
1837
|
-
return (0, $
|
|
2086
|
+
return (0, $3zTl3$lodash.orderBy)((0, $3zTl3$lodash.castArray)(arr), attr, order);
|
|
1838
2087
|
});
|
|
1839
2088
|
expression.registerFunction("find", function(arr, attr) {
|
|
1840
|
-
return (0, $
|
|
2089
|
+
return (0, $3zTl3$lodash.find)((0, $3zTl3$lodash.castArray)(arr), attr);
|
|
1841
2090
|
});
|
|
1842
2091
|
expression.registerFunction("lofilter", function(arr, attr) {
|
|
1843
|
-
return (0, $
|
|
2092
|
+
return (0, $3zTl3$lodash.filter)((0, $3zTl3$lodash.castArray)(arr), attr);
|
|
1844
2093
|
});
|
|
1845
2094
|
expression.registerFunction("values", function(obj) {
|
|
1846
|
-
return (0, $
|
|
2095
|
+
return (0, $3zTl3$lodash.values)(obj);
|
|
1847
2096
|
});
|
|
1848
2097
|
expression.registerFunction("chunk", function(arr, size) {
|
|
1849
|
-
return (0, $
|
|
2098
|
+
return (0, $3zTl3$lodash.chunk)((0, $3zTl3$lodash.castArray)(arr), size);
|
|
1850
2099
|
});
|
|
1851
2100
|
expression.registerFunction("wrap", function(value, wrapper, endWrapper) {
|
|
1852
|
-
return (0, $
|
|
2101
|
+
return (0, $3zTl3$lodash.join)([
|
|
1853
2102
|
wrapper,
|
|
1854
2103
|
value,
|
|
1855
2104
|
endWrapper || wrapper
|
|
1856
2105
|
], "");
|
|
1857
2106
|
});
|
|
1858
|
-
expression.registerFunction("parseDocument", (0, $
|
|
1859
|
-
expression.registerFunction("recursiveCharacterTextSplitter", (0, $
|
|
1860
|
-
expression.registerFunction("getDataUri", (0, $
|
|
1861
|
-
expression.registerFunction("teeStream", (0, $
|
|
1862
|
-
expression.registerFunction("bufferToString", (0, $
|
|
1863
|
-
expression.registerFunction("parseQuery", (0, $
|
|
1864
|
-
expression.registerFunction("stringifyQuery", (0, $
|
|
2107
|
+
expression.registerFunction("parseDocument", (0, $efbd030a3c373e25$export$2e2bcd8739ae039));
|
|
2108
|
+
expression.registerFunction("recursiveCharacterTextSplitter", (0, $067d3de34f549b6b$export$e600492876ee595b));
|
|
2109
|
+
expression.registerFunction("getDataUri", (0, $1d2685fb8fe23757$export$2e2bcd8739ae039));
|
|
2110
|
+
expression.registerFunction("teeStream", (0, $b556c214cf9fbe42$export$2e2bcd8739ae039));
|
|
2111
|
+
expression.registerFunction("bufferToString", (0, $d3fd02720418c423$export$2e2bcd8739ae039));
|
|
2112
|
+
expression.registerFunction("parseQuery", (0, $9f18acaa689146e0$export$2e2bcd8739ae039));
|
|
2113
|
+
expression.registerFunction("stringifyQuery", (0, $6416a1557ab538fa$export$2e2bcd8739ae039));
|
|
1865
2114
|
expression.registerFunction("flatten", function(arr) {
|
|
1866
|
-
return (0, $
|
|
2115
|
+
return (0, $3zTl3$lodash.flatten)((0, $3zTl3$lodash.castArray)(arr));
|
|
1867
2116
|
});
|
|
1868
2117
|
expression.registerFunction("flattenDeep", function(arr) {
|
|
1869
|
-
return (0, $
|
|
2118
|
+
return (0, $3zTl3$lodash.flattenDeep)((0, $3zTl3$lodash.castArray)(arr));
|
|
1870
2119
|
});
|
|
1871
2120
|
expression.registerFunction("flattenDepth", function(arr, depth) {
|
|
1872
|
-
return (0, $
|
|
2121
|
+
return (0, $3zTl3$lodash.flattenDepth)((0, $3zTl3$lodash.castArray)(arr), depth);
|
|
1873
2122
|
});
|
|
1874
2123
|
return expression;
|
|
1875
2124
|
}
|
|
1876
2125
|
|
|
1877
2126
|
|
|
1878
|
-
function $
|
|
1879
|
-
return (0, $
|
|
2127
|
+
function $07b42bb192ceea00$export$2e2bcd8739ae039(expression) {
|
|
2128
|
+
return (0, $b460a5b5a1bfbcaa$export$2e2bcd8739ae039)((0, ($parcel$interopDefault($3zTl3$jsonata)))(expression));
|
|
1880
2129
|
}
|
|
1881
2130
|
|
|
1882
2131
|
|