cdn.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. (() => {
  2. var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
  3. var __export = function __export(target, all) {
  4. for (var name in all)
  5. __defProp(target, name, {
  6. get: all[name],
  7. enumerable: true,
  8. configurable: true,
  9. set: function set(newValue) {return all[name] = function () {return newValue;};}
  10. });
  11. };
  12. // lib/locale/sq/_lib/formatDistance.js
  13. var formatDistanceLocale = {
  14. lessThanXSeconds: {
  15. one: "m\xEB pak se nj\xEB sekond\xEB",
  16. other: "m\xEB pak se {{count}} sekonda"
  17. },
  18. xSeconds: {
  19. one: "1 sekond\xEB",
  20. other: "{{count}} sekonda"
  21. },
  22. halfAMinute: "gjys\xEBm minuti",
  23. lessThanXMinutes: {
  24. one: "m\xEB pak se nj\xEB minute",
  25. other: "m\xEB pak se {{count}} minuta"
  26. },
  27. xMinutes: {
  28. one: "1 minut\xEB",
  29. other: "{{count}} minuta"
  30. },
  31. aboutXHours: {
  32. one: "rreth 1 or\xEB",
  33. other: "rreth {{count}} or\xEB"
  34. },
  35. xHours: {
  36. one: "1 or\xEB",
  37. other: "{{count}} or\xEB"
  38. },
  39. xDays: {
  40. one: "1 dit\xEB",
  41. other: "{{count}} dit\xEB"
  42. },
  43. aboutXWeeks: {
  44. one: "rreth 1 jav\xEB",
  45. other: "rreth {{count}} jav\xEB"
  46. },
  47. xWeeks: {
  48. one: "1 jav\xEB",
  49. other: "{{count}} jav\xEB"
  50. },
  51. aboutXMonths: {
  52. one: "rreth 1 muaj",
  53. other: "rreth {{count}} muaj"
  54. },
  55. xMonths: {
  56. one: "1 muaj",
  57. other: "{{count}} muaj"
  58. },
  59. aboutXYears: {
  60. one: "rreth 1 vit",
  61. other: "rreth {{count}} vite"
  62. },
  63. xYears: {
  64. one: "1 vit",
  65. other: "{{count}} vite"
  66. },
  67. overXYears: {
  68. one: "mbi 1 vit",
  69. other: "mbi {{count}} vite"
  70. },
  71. almostXYears: {
  72. one: "pothuajse 1 vit",
  73. other: "pothuajse {{count}} vite"
  74. }
  75. };
  76. var formatDistance = function formatDistance(token, count, options) {
  77. var result;
  78. var tokenValue = formatDistanceLocale[token];
  79. if (typeof tokenValue === "string") {
  80. result = tokenValue;
  81. } else if (count === 1) {
  82. result = tokenValue.one;
  83. } else {
  84. result = tokenValue.other.replace("{{count}}", String(count));
  85. }
  86. if (options !== null && options !== void 0 && options.addSuffix) {
  87. if (options.comparison && options.comparison > 0) {
  88. return "n\xEB " + result;
  89. } else {
  90. return result + " m\xEB par\xEB";
  91. }
  92. }
  93. return result;
  94. };
  95. // lib/locale/_lib/buildFormatLongFn.js
  96. function buildFormatLongFn(args) {
  97. return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  98. var width = options.width ? String(options.width) : args.defaultWidth;
  99. var format = args.formats[width] || args.formats[args.defaultWidth];
  100. return format;
  101. };
  102. }
  103. // lib/locale/sq/_lib/formatLong.js
  104. var dateFormats = {
  105. full: "EEEE, MMMM do, y",
  106. long: "MMMM do, y",
  107. medium: "MMM d, y",
  108. short: "MM/dd/yyyy"
  109. };
  110. var timeFormats = {
  111. full: "h:mm:ss a zzzz",
  112. long: "h:mm:ss a z",
  113. medium: "h:mm:ss a",
  114. short: "h:mm a"
  115. };
  116. var dateTimeFormats = {
  117. full: "{{date}} 'n\xEB' {{time}}",
  118. long: "{{date}} 'n\xEB' {{time}}",
  119. medium: "{{date}}, {{time}}",
  120. short: "{{date}}, {{time}}"
  121. };
  122. var formatLong = {
  123. date: buildFormatLongFn({
  124. formats: dateFormats,
  125. defaultWidth: "full"
  126. }),
  127. time: buildFormatLongFn({
  128. formats: timeFormats,
  129. defaultWidth: "full"
  130. }),
  131. dateTime: buildFormatLongFn({
  132. formats: dateTimeFormats,
  133. defaultWidth: "full"
  134. })
  135. };
  136. // lib/locale/sq/_lib/formatRelative.js
  137. var formatRelativeLocale = {
  138. lastWeek: "'t\xEB' eeee 'e shkuar n\xEB' p",
  139. yesterday: "'dje n\xEB' p",
  140. today: "'sot n\xEB' p",
  141. tomorrow: "'nes\xEBr n\xEB' p",
  142. nextWeek: "eeee 'at' p",
  143. other: "P"
  144. };
  145. var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
  146. // lib/locale/_lib/buildLocalizeFn.js
  147. function buildLocalizeFn(args) {
  148. return function (value, options) {
  149. var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
  150. var valuesArray;
  151. if (context === "formatting" && args.formattingValues) {
  152. var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
  153. var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
  154. valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
  155. } else {
  156. var _defaultWidth = args.defaultWidth;
  157. var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
  158. valuesArray = args.values[_width] || args.values[_defaultWidth];
  159. }
  160. var index = args.argumentCallback ? args.argumentCallback(value) : value;
  161. return valuesArray[index];
  162. };
  163. }
  164. // lib/locale/sq/_lib/localize.js
  165. var eraValues = {
  166. narrow: ["P", "M"],
  167. abbreviated: ["PK", "MK"],
  168. wide: ["Para Krishtit", "Mbas Krishtit"]
  169. };
  170. var quarterValues = {
  171. narrow: ["1", "2", "3", "4"],
  172. abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  173. wide: ["4-mujori I", "4-mujori II", "4-mujori III", "4-mujori IV"]
  174. };
  175. var monthValues = {
  176. narrow: ["J", "S", "M", "P", "M", "Q", "K", "G", "S", "T", "N", "D"],
  177. abbreviated: [
  178. "Jan",
  179. "Shk",
  180. "Mar",
  181. "Pri",
  182. "Maj",
  183. "Qer",
  184. "Kor",
  185. "Gus",
  186. "Sht",
  187. "Tet",
  188. "N\xEBn",
  189. "Dhj"],
  190. wide: [
  191. "Janar",
  192. "Shkurt",
  193. "Mars",
  194. "Prill",
  195. "Maj",
  196. "Qershor",
  197. "Korrik",
  198. "Gusht",
  199. "Shtator",
  200. "Tetor",
  201. "N\xEBntor",
  202. "Dhjetor"]
  203. };
  204. var dayValues = {
  205. narrow: ["D", "H", "M", "M", "E", "P", "S"],
  206. short: ["Di", "H\xEB", "Ma", "M\xEB", "En", "Pr", "Sh"],
  207. abbreviated: ["Die", "H\xEBn", "Mar", "M\xEBr", "Enj", "Pre", "Sht"],
  208. wide: ["Diel\xEB", "H\xEBn\xEB", "Mart\xEB", "M\xEBrkur\xEB", "Enjte", "Premte", "Shtun\xEB"]
  209. };
  210. var dayPeriodValues = {
  211. narrow: {
  212. am: "p",
  213. pm: "m",
  214. midnight: "m",
  215. noon: "d",
  216. morning: "m\xEBngjes",
  217. afternoon: "dite",
  218. evening: "mbr\xEBmje",
  219. night: "nat\xEB"
  220. },
  221. abbreviated: {
  222. am: "PD",
  223. pm: "MD",
  224. midnight: "mesn\xEBt\xEB",
  225. noon: "drek",
  226. morning: "m\xEBngjes",
  227. afternoon: "mbasdite",
  228. evening: "mbr\xEBmje",
  229. night: "nat\xEB"
  230. },
  231. wide: {
  232. am: "p.d.",
  233. pm: "m.d.",
  234. midnight: "mesn\xEBt\xEB",
  235. noon: "drek",
  236. morning: "m\xEBngjes",
  237. afternoon: "mbasdite",
  238. evening: "mbr\xEBmje",
  239. night: "nat\xEB"
  240. }
  241. };
  242. var formattingDayPeriodValues = {
  243. narrow: {
  244. am: "p",
  245. pm: "m",
  246. midnight: "m",
  247. noon: "d",
  248. morning: "n\xEB m\xEBngjes",
  249. afternoon: "n\xEB mbasdite",
  250. evening: "n\xEB mbr\xEBmje",
  251. night: "n\xEB mesnat\xEB"
  252. },
  253. abbreviated: {
  254. am: "PD",
  255. pm: "MD",
  256. midnight: "mesnat\xEB",
  257. noon: "drek",
  258. morning: "n\xEB m\xEBngjes",
  259. afternoon: "n\xEB mbasdite",
  260. evening: "n\xEB mbr\xEBmje",
  261. night: "n\xEB mesnat\xEB"
  262. },
  263. wide: {
  264. am: "p.d.",
  265. pm: "m.d.",
  266. midnight: "mesnat\xEB",
  267. noon: "drek",
  268. morning: "n\xEB m\xEBngjes",
  269. afternoon: "n\xEB mbasdite",
  270. evening: "n\xEB mbr\xEBmje",
  271. night: "n\xEB mesnat\xEB"
  272. }
  273. };
  274. var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
  275. var number = Number(dirtyNumber);
  276. if ((options === null || options === void 0 ? void 0 : options.unit) === "hour")
  277. return String(number);
  278. if (number === 1)
  279. return number + "-r\xEB";
  280. if (number === 4)
  281. return number + "t";
  282. return number + "-t\xEB";
  283. };
  284. var localize = {
  285. ordinalNumber: ordinalNumber,
  286. era: buildLocalizeFn({
  287. values: eraValues,
  288. defaultWidth: "wide"
  289. }),
  290. quarter: buildLocalizeFn({
  291. values: quarterValues,
  292. defaultWidth: "wide",
  293. argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
  294. }),
  295. month: buildLocalizeFn({
  296. values: monthValues,
  297. defaultWidth: "wide"
  298. }),
  299. day: buildLocalizeFn({
  300. values: dayValues,
  301. defaultWidth: "wide"
  302. }),
  303. dayPeriod: buildLocalizeFn({
  304. values: dayPeriodValues,
  305. defaultWidth: "wide",
  306. formattingValues: formattingDayPeriodValues,
  307. defaultFormattingWidth: "wide"
  308. })
  309. };
  310. // lib/locale/_lib/buildMatchFn.js
  311. function buildMatchFn(args) {
  312. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  313. var width = options.width;
  314. var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
  315. var matchResult = string.match(matchPattern);
  316. if (!matchResult) {
  317. return null;
  318. }
  319. var matchedString = matchResult[0];
  320. var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
  321. var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
  322. var value;
  323. value = args.valueCallback ? args.valueCallback(key) : key;
  324. value = options.valueCallback ? options.valueCallback(value) : value;
  325. var rest = string.slice(matchedString.length);
  326. return { value: value, rest: rest };
  327. };
  328. }
  329. function findKey(object, predicate) {
  330. for (var key in object) {
  331. if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
  332. return key;
  333. }
  334. }
  335. return;
  336. }
  337. function findIndex(array, predicate) {
  338. for (var key = 0; key < array.length; key++) {
  339. if (predicate(array[key])) {
  340. return key;
  341. }
  342. }
  343. return;
  344. }
  345. // lib/locale/_lib/buildMatchPatternFn.js
  346. function buildMatchPatternFn(args) {
  347. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  348. var matchResult = string.match(args.matchPattern);
  349. if (!matchResult)
  350. return null;
  351. var matchedString = matchResult[0];
  352. var parseResult = string.match(args.parsePattern);
  353. if (!parseResult)
  354. return null;
  355. var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
  356. value = options.valueCallback ? options.valueCallback(value) : value;
  357. var rest = string.slice(matchedString.length);
  358. return { value: value, rest: rest };
  359. };
  360. }
  361. // lib/locale/sq/_lib/match.js
  362. var matchOrdinalNumberPattern = /^(\d+)(-rë|-të|t|)?/i;
  363. var parseOrdinalNumberPattern = /\d+/i;
  364. var matchEraPatterns = {
  365. narrow: /^(p|m)/i,
  366. abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
  367. wide: /^(para krishtit|mbas krishtit)/i
  368. };
  369. var parseEraPatterns = {
  370. any: [/^b/i, /^(p|m)/i]
  371. };
  372. var matchQuarterPatterns = {
  373. narrow: /^[1234]/i,
  374. abbreviated: /^q[1234]/i,
  375. wide: /^[1234]-mujori (i{1,3}|iv)/i
  376. };
  377. var parseQuarterPatterns = {
  378. any: [/1/i, /2/i, /3/i, /4/i]
  379. };
  380. var matchMonthPatterns = {
  381. narrow: /^[jsmpqkftnd]/i,
  382. abbreviated: /^(jan|shk|mar|pri|maj|qer|kor|gus|sht|tet|nën|dhj)/i,
  383. wide: /^(janar|shkurt|mars|prill|maj|qershor|korrik|gusht|shtator|tetor|nëntor|dhjetor)/i
  384. };
  385. var parseMonthPatterns = {
  386. narrow: [
  387. /^j/i,
  388. /^s/i,
  389. /^m/i,
  390. /^p/i,
  391. /^m/i,
  392. /^q/i,
  393. /^k/i,
  394. /^g/i,
  395. /^s/i,
  396. /^t/i,
  397. /^n/i,
  398. /^d/i],
  399. any: [
  400. /^ja/i,
  401. /^shk/i,
  402. /^mar/i,
  403. /^pri/i,
  404. /^maj/i,
  405. /^qer/i,
  406. /^kor/i,
  407. /^gu/i,
  408. /^sht/i,
  409. /^tet/i,
  410. /^n/i,
  411. /^d/i]
  412. };
  413. var matchDayPatterns = {
  414. narrow: /^[dhmeps]/i,
  415. short: /^(di|hë|ma|më|en|pr|sh)/i,
  416. abbreviated: /^(die|hën|mar|mër|enj|pre|sht)/i,
  417. wide: /^(dielë|hënë|martë|mërkurë|enjte|premte|shtunë)/i
  418. };
  419. var parseDayPatterns = {
  420. narrow: [/^d/i, /^h/i, /^m/i, /^m/i, /^e/i, /^p/i, /^s/i],
  421. any: [/^d/i, /^h/i, /^ma/i, /^më/i, /^e/i, /^p/i, /^s/i]
  422. };
  423. var matchDayPeriodPatterns = {
  424. narrow: /^(p|m|me|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
  425. any: /^([pm]\.?\s?d\.?|drek|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i
  426. };
  427. var parseDayPeriodPatterns = {
  428. any: {
  429. am: /^p/i,
  430. pm: /^m/i,
  431. midnight: /^me/i,
  432. noon: /^dr/i,
  433. morning: /mëngjes/i,
  434. afternoon: /mbasdite/i,
  435. evening: /mbrëmje/i,
  436. night: /natë/i
  437. }
  438. };
  439. var match = {
  440. ordinalNumber: buildMatchPatternFn({
  441. matchPattern: matchOrdinalNumberPattern,
  442. parsePattern: parseOrdinalNumberPattern,
  443. valueCallback: function valueCallback(value) {return parseInt(value, 10);}
  444. }),
  445. era: buildMatchFn({
  446. matchPatterns: matchEraPatterns,
  447. defaultMatchWidth: "wide",
  448. parsePatterns: parseEraPatterns,
  449. defaultParseWidth: "any"
  450. }),
  451. quarter: buildMatchFn({
  452. matchPatterns: matchQuarterPatterns,
  453. defaultMatchWidth: "wide",
  454. parsePatterns: parseQuarterPatterns,
  455. defaultParseWidth: "any",
  456. valueCallback: function valueCallback(index) {return index + 1;}
  457. }),
  458. month: buildMatchFn({
  459. matchPatterns: matchMonthPatterns,
  460. defaultMatchWidth: "wide",
  461. parsePatterns: parseMonthPatterns,
  462. defaultParseWidth: "any"
  463. }),
  464. day: buildMatchFn({
  465. matchPatterns: matchDayPatterns,
  466. defaultMatchWidth: "wide",
  467. parsePatterns: parseDayPatterns,
  468. defaultParseWidth: "any"
  469. }),
  470. dayPeriod: buildMatchFn({
  471. matchPatterns: matchDayPeriodPatterns,
  472. defaultMatchWidth: "any",
  473. parsePatterns: parseDayPeriodPatterns,
  474. defaultParseWidth: "any"
  475. })
  476. };
  477. // lib/locale/sq.js
  478. var sq = {
  479. code: "sq",
  480. formatDistance: formatDistance,
  481. formatLong: formatLong,
  482. formatRelative: formatRelative,
  483. localize: localize,
  484. match: match,
  485. options: {
  486. weekStartsOn: 1,
  487. firstWeekContainsDate: 1
  488. }
  489. };
  490. // lib/locale/sq/cdn.js
  491. window.dateFns = _objectSpread(_objectSpread({},
  492. window.dateFns), {}, {
  493. locale: _objectSpread(_objectSpread({}, (_window$dateFns =
  494. window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
  495. sq: sq }) });
  496. //# debugId=20226FB7E605365064756E2164756E21
  497. //# sourceMappingURL=cdn.js.map
  498. })();