@utilix-tech/sdk 0.85.0 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +5 -5
- package/dist/{chunk-RMXZMYSG.js → chunk-7XHM7HHU.js} +67 -1
- package/dist/{chunk-BCISWFVJ.js → chunk-YM6UC4SM.js} +79 -1
- package/dist/{code-mkKV7BQ4.d.cts → code-B9LwFkB1.d.cts} +31 -2
- package/dist/{code-mkKV7BQ4.d.ts → code-B9LwFkB1.d.ts} +31 -2
- package/dist/index.cjs +144 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/tools/code.cjs +66 -0
- package/dist/tools/code.d.cts +1 -1
- package/dist/tools/code.d.ts +1 -1
- package/dist/tools/code.js +1 -1
- package/dist/tools/units.cjs +78 -0
- package/dist/tools/units.d.cts +1 -1
- package/dist/tools/units.d.ts +1 -1
- package/dist/tools/units.js +1 -1
- package/dist/{units-DwIvTP-X.d.ts → units-gLm_pq6U.d.cts} +48 -2
- package/dist/{units-DwIvTP-X.d.cts → units-gLm_pq6U.d.ts} +48 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9040,6 +9040,7 @@ __export(units_exports, {
|
|
|
9040
9040
|
calculateRequiredBandwidth: () => calculateRequiredBandwidth,
|
|
9041
9041
|
calculateRoi: () => calculateRoi,
|
|
9042
9042
|
calculateRuleOf72: () => calculateRuleOf72,
|
|
9043
|
+
calculateSalesCommission: () => calculateSalesCommission,
|
|
9043
9044
|
calculateSavingsGoal: () => calculateSavingsGoal,
|
|
9044
9045
|
calculateSimpleInterest: () => calculateSimpleInterest,
|
|
9045
9046
|
calculateTax: () => calculateTax,
|
|
@@ -11847,6 +11848,83 @@ function calculateCreditCardMinimumPayment(balance, aprPercent, minPaymentPercen
|
|
|
11847
11848
|
finalMonthPayment
|
|
11848
11849
|
};
|
|
11849
11850
|
}
|
|
11851
|
+
function calculateSalesCommission(input) {
|
|
11852
|
+
const { salesAmount, flatRatePercent, tiers, baseSalary = 0 } = input;
|
|
11853
|
+
if (!Number.isFinite(salesAmount) || salesAmount < 0) {
|
|
11854
|
+
return { error: "salesAmount must be a finite, non-negative number" };
|
|
11855
|
+
}
|
|
11856
|
+
if (!Number.isFinite(baseSalary) || baseSalary < 0) {
|
|
11857
|
+
return { error: "baseSalary must be a finite, non-negative number when provided" };
|
|
11858
|
+
}
|
|
11859
|
+
const hasFlat = flatRatePercent !== void 0;
|
|
11860
|
+
const hasTiers = tiers !== void 0;
|
|
11861
|
+
if (hasFlat === hasTiers) {
|
|
11862
|
+
return { error: "Provide exactly one of flatRatePercent or tiers, not both and not neither" };
|
|
11863
|
+
}
|
|
11864
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
11865
|
+
if (hasFlat) {
|
|
11866
|
+
if (!Number.isFinite(flatRatePercent) || flatRatePercent < 0) {
|
|
11867
|
+
return { error: "flatRatePercent must be a finite, non-negative number" };
|
|
11868
|
+
}
|
|
11869
|
+
const commission2 = salesAmount * flatRatePercent / 100;
|
|
11870
|
+
return {
|
|
11871
|
+
salesAmount: round4(salesAmount),
|
|
11872
|
+
mode: "flat",
|
|
11873
|
+
commission: round4(commission2),
|
|
11874
|
+
baseSalary: round4(baseSalary),
|
|
11875
|
+
totalPayout: round4(baseSalary + commission2)
|
|
11876
|
+
};
|
|
11877
|
+
}
|
|
11878
|
+
const tierList = tiers;
|
|
11879
|
+
if (tierList.length === 0) {
|
|
11880
|
+
return { error: "tiers must contain at least one entry" };
|
|
11881
|
+
}
|
|
11882
|
+
let previousUpTo = 0;
|
|
11883
|
+
for (let i = 0; i < tierList.length; i++) {
|
|
11884
|
+
const tier = tierList[i];
|
|
11885
|
+
const isLast = i === tierList.length - 1;
|
|
11886
|
+
if (!Number.isFinite(tier.ratePercent) || tier.ratePercent < 0) {
|
|
11887
|
+
return { error: `tiers[${i}].ratePercent must be a finite, non-negative number` };
|
|
11888
|
+
}
|
|
11889
|
+
if (tier.upTo === null) {
|
|
11890
|
+
if (!isLast) {
|
|
11891
|
+
return { error: `tiers[${i}].upTo may only be null on the last tier (an unbounded top tier)` };
|
|
11892
|
+
}
|
|
11893
|
+
} else {
|
|
11894
|
+
if (!Number.isFinite(tier.upTo) || tier.upTo <= previousUpTo) {
|
|
11895
|
+
return {
|
|
11896
|
+
error: `tiers[${i}].upTo must be a finite number greater than the previous tier's upTo (${previousUpTo})`
|
|
11897
|
+
};
|
|
11898
|
+
}
|
|
11899
|
+
previousUpTo = tier.upTo;
|
|
11900
|
+
}
|
|
11901
|
+
}
|
|
11902
|
+
let lowerBound = 0;
|
|
11903
|
+
let commission = 0;
|
|
11904
|
+
const breakdown = [];
|
|
11905
|
+
for (const tier of tierList) {
|
|
11906
|
+
const upper = tier.upTo === null ? Infinity : tier.upTo;
|
|
11907
|
+
const amountInRange = Math.min(Math.max(salesAmount - lowerBound, 0), upper - lowerBound);
|
|
11908
|
+
const commissionForRange = amountInRange * tier.ratePercent / 100;
|
|
11909
|
+
commission += commissionForRange;
|
|
11910
|
+
breakdown.push({
|
|
11911
|
+
rangeStart: round4(lowerBound),
|
|
11912
|
+
rangeEnd: tier.upTo === null ? null : round4(tier.upTo),
|
|
11913
|
+
ratePercent: tier.ratePercent,
|
|
11914
|
+
amountInRange: round4(amountInRange),
|
|
11915
|
+
commissionForRange: round4(commissionForRange)
|
|
11916
|
+
});
|
|
11917
|
+
lowerBound = upper;
|
|
11918
|
+
}
|
|
11919
|
+
return {
|
|
11920
|
+
salesAmount: round4(salesAmount),
|
|
11921
|
+
mode: "tiered",
|
|
11922
|
+
commission: round4(commission),
|
|
11923
|
+
baseSalary: round4(baseSalary),
|
|
11924
|
+
totalPayout: round4(baseSalary + commission),
|
|
11925
|
+
breakdown
|
|
11926
|
+
};
|
|
11927
|
+
}
|
|
11850
11928
|
|
|
11851
11929
|
// src/tools/network.ts
|
|
11852
11930
|
var network_exports = {};
|
|
@@ -16939,6 +17017,7 @@ __export(code_exports, {
|
|
|
16939
17017
|
SQL_DEFAULT_OPTIONS: () => SQL_DEFAULT_OPTIONS,
|
|
16940
17018
|
analyzeRegexGroups: () => analyzeRegexGroups,
|
|
16941
17019
|
auditDependencyRanges: () => auditDependencyRanges,
|
|
17020
|
+
buildCharacterClass: () => buildCharacterClass,
|
|
16942
17021
|
buildDockerPull: () => buildDockerPull,
|
|
16943
17022
|
buildDockerRun: () => buildDockerRun,
|
|
16944
17023
|
buildGitCommand: () => buildGitCommand,
|
|
@@ -21359,6 +21438,71 @@ function extractMarkdownLinkReferences(markdown) {
|
|
|
21359
21438
|
unusedDefinitions
|
|
21360
21439
|
};
|
|
21361
21440
|
}
|
|
21441
|
+
var CHAR_CLASS_SPECIAL_CHARS = /* @__PURE__ */ new Set(["]", "\\", "^", "-"]);
|
|
21442
|
+
function escapeForCharClass(ch) {
|
|
21443
|
+
return CHAR_CLASS_SPECIAL_CHARS.has(ch) ? `\\${ch}` : ch;
|
|
21444
|
+
}
|
|
21445
|
+
var CHAR_CLASS_RANGE_RE = /^(.)-(.)$/u;
|
|
21446
|
+
function buildCharacterClass(options) {
|
|
21447
|
+
const {
|
|
21448
|
+
lowercase = false,
|
|
21449
|
+
uppercase = false,
|
|
21450
|
+
digits = false,
|
|
21451
|
+
whitespace = false,
|
|
21452
|
+
customRanges = [],
|
|
21453
|
+
customChars = "",
|
|
21454
|
+
negate = false
|
|
21455
|
+
} = options ?? {};
|
|
21456
|
+
const hasAny = lowercase || uppercase || digits || whitespace || customRanges.length > 0 || customChars.length > 0;
|
|
21457
|
+
if (!hasAny) {
|
|
21458
|
+
return { error: "At least one character set, custom range, or custom character must be specified" };
|
|
21459
|
+
}
|
|
21460
|
+
const parts = [];
|
|
21461
|
+
const includes = [];
|
|
21462
|
+
if (lowercase) {
|
|
21463
|
+
parts.push("a-z");
|
|
21464
|
+
includes.push("a-z: lowercase letters");
|
|
21465
|
+
}
|
|
21466
|
+
if (uppercase) {
|
|
21467
|
+
parts.push("A-Z");
|
|
21468
|
+
includes.push("A-Z: uppercase letters");
|
|
21469
|
+
}
|
|
21470
|
+
if (digits) {
|
|
21471
|
+
parts.push("0-9");
|
|
21472
|
+
includes.push("0-9: digits");
|
|
21473
|
+
}
|
|
21474
|
+
if (whitespace) {
|
|
21475
|
+
parts.push("\\s");
|
|
21476
|
+
includes.push("\\s: whitespace characters (space, tab, newline, etc.)");
|
|
21477
|
+
}
|
|
21478
|
+
for (let i = 0; i < customRanges.length; i++) {
|
|
21479
|
+
const range = customRanges[i];
|
|
21480
|
+
const match = CHAR_CLASS_RANGE_RE.exec(range);
|
|
21481
|
+
if (!match) {
|
|
21482
|
+
return { error: `customRanges[${i}] ("${range}") must be exactly two characters joined by a hyphen, e.g. "f-k"` };
|
|
21483
|
+
}
|
|
21484
|
+
const [, start, end] = match;
|
|
21485
|
+
if (start.codePointAt(0) > end.codePointAt(0)) {
|
|
21486
|
+
return { error: `customRanges[${i}] ("${range}") has a start character that comes after its end character` };
|
|
21487
|
+
}
|
|
21488
|
+
parts.push(`${escapeForCharClass(start)}-${escapeForCharClass(end)}`);
|
|
21489
|
+
includes.push(`${range}: custom range from '${start}' to '${end}' inclusive`);
|
|
21490
|
+
}
|
|
21491
|
+
if (customChars.length > 0) {
|
|
21492
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21493
|
+
const unique = [];
|
|
21494
|
+
for (const ch of customChars) {
|
|
21495
|
+
if (!seen.has(ch)) {
|
|
21496
|
+
seen.add(ch);
|
|
21497
|
+
unique.push(ch);
|
|
21498
|
+
}
|
|
21499
|
+
}
|
|
21500
|
+
parts.push(unique.map(escapeForCharClass).join(""));
|
|
21501
|
+
includes.push(`custom characters: ${unique.join(", ")}`);
|
|
21502
|
+
}
|
|
21503
|
+
const pattern = `[${negate ? "^" : ""}${parts.join("")}]`;
|
|
21504
|
+
return { pattern, negate, includes };
|
|
21505
|
+
}
|
|
21362
21506
|
|
|
21363
21507
|
// src/tools/color.ts
|
|
21364
21508
|
var color_exports = {};
|
package/dist/index.d.cts
CHANGED
|
@@ -5,10 +5,10 @@ export { t as text } from './text-xY5MJwr0.cjs';
|
|
|
5
5
|
export { d as data } from './data-DIyBrJ6l.cjs';
|
|
6
6
|
export { g as generators } from './generators-DAXXrMvG.cjs';
|
|
7
7
|
export { t as time } from './time-VMAy_SrV.cjs';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-gLm_pq6U.cjs';
|
|
9
9
|
export { n as network } from './network-ylRtLPEs.cjs';
|
|
10
10
|
export { a as api } from './api-CQnIUrVB.cjs';
|
|
11
|
-
export { c as code } from './code-
|
|
11
|
+
export { c as code } from './code-B9LwFkB1.cjs';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.cjs';
|
|
13
13
|
export { c as css } from './css-Cf7AMGM-.cjs';
|
|
14
14
|
export { m as misc } from './misc-CA3N198T.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ export { t as text } from './text-xY5MJwr0.js';
|
|
|
5
5
|
export { d as data } from './data-DIyBrJ6l.js';
|
|
6
6
|
export { g as generators } from './generators-DAXXrMvG.js';
|
|
7
7
|
export { t as time } from './time-VMAy_SrV.js';
|
|
8
|
-
export { u as units } from './units-
|
|
8
|
+
export { u as units } from './units-gLm_pq6U.js';
|
|
9
9
|
export { n as network } from './network-ylRtLPEs.js';
|
|
10
10
|
export { a as api } from './api-CQnIUrVB.js';
|
|
11
|
-
export { c as code } from './code-
|
|
11
|
+
export { c as code } from './code-B9LwFkB1.js';
|
|
12
12
|
export { c as color } from './color-tPwZCr9H.js';
|
|
13
13
|
export { c as css } from './css-Cf7AMGM-.js';
|
|
14
14
|
export { m as misc } from './misc-CA3N198T.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { media_exports as media } from './chunk-ZWFZRDQ4.js';
|
|
2
|
-
export { units_exports as units } from './chunk-
|
|
2
|
+
export { units_exports as units } from './chunk-YM6UC4SM.js';
|
|
3
3
|
export { network_exports as network } from './chunk-SW3J5CAI.js';
|
|
4
4
|
export { api_exports as api } from './chunk-U2HREMZU.js';
|
|
5
|
-
export { code_exports as code } from './chunk-
|
|
5
|
+
export { code_exports as code } from './chunk-7XHM7HHU.js';
|
|
6
6
|
export { color_exports as color } from './chunk-BPVAB4P2.js';
|
|
7
7
|
export { css_exports as css } from './chunk-6YPV2AB5.js';
|
|
8
8
|
export { misc_exports as misc } from './chunk-GX7H6TAX.js';
|
package/dist/tools/code.cjs
CHANGED
|
@@ -4364,6 +4364,71 @@ function extractMarkdownLinkReferences(markdown) {
|
|
|
4364
4364
|
unusedDefinitions
|
|
4365
4365
|
};
|
|
4366
4366
|
}
|
|
4367
|
+
var CHAR_CLASS_SPECIAL_CHARS = /* @__PURE__ */ new Set(["]", "\\", "^", "-"]);
|
|
4368
|
+
function escapeForCharClass(ch) {
|
|
4369
|
+
return CHAR_CLASS_SPECIAL_CHARS.has(ch) ? `\\${ch}` : ch;
|
|
4370
|
+
}
|
|
4371
|
+
var CHAR_CLASS_RANGE_RE = /^(.)-(.)$/u;
|
|
4372
|
+
function buildCharacterClass(options) {
|
|
4373
|
+
const {
|
|
4374
|
+
lowercase = false,
|
|
4375
|
+
uppercase = false,
|
|
4376
|
+
digits = false,
|
|
4377
|
+
whitespace = false,
|
|
4378
|
+
customRanges = [],
|
|
4379
|
+
customChars = "",
|
|
4380
|
+
negate = false
|
|
4381
|
+
} = options ?? {};
|
|
4382
|
+
const hasAny = lowercase || uppercase || digits || whitespace || customRanges.length > 0 || customChars.length > 0;
|
|
4383
|
+
if (!hasAny) {
|
|
4384
|
+
return { error: "At least one character set, custom range, or custom character must be specified" };
|
|
4385
|
+
}
|
|
4386
|
+
const parts = [];
|
|
4387
|
+
const includes = [];
|
|
4388
|
+
if (lowercase) {
|
|
4389
|
+
parts.push("a-z");
|
|
4390
|
+
includes.push("a-z: lowercase letters");
|
|
4391
|
+
}
|
|
4392
|
+
if (uppercase) {
|
|
4393
|
+
parts.push("A-Z");
|
|
4394
|
+
includes.push("A-Z: uppercase letters");
|
|
4395
|
+
}
|
|
4396
|
+
if (digits) {
|
|
4397
|
+
parts.push("0-9");
|
|
4398
|
+
includes.push("0-9: digits");
|
|
4399
|
+
}
|
|
4400
|
+
if (whitespace) {
|
|
4401
|
+
parts.push("\\s");
|
|
4402
|
+
includes.push("\\s: whitespace characters (space, tab, newline, etc.)");
|
|
4403
|
+
}
|
|
4404
|
+
for (let i = 0; i < customRanges.length; i++) {
|
|
4405
|
+
const range = customRanges[i];
|
|
4406
|
+
const match = CHAR_CLASS_RANGE_RE.exec(range);
|
|
4407
|
+
if (!match) {
|
|
4408
|
+
return { error: `customRanges[${i}] ("${range}") must be exactly two characters joined by a hyphen, e.g. "f-k"` };
|
|
4409
|
+
}
|
|
4410
|
+
const [, start, end] = match;
|
|
4411
|
+
if (start.codePointAt(0) > end.codePointAt(0)) {
|
|
4412
|
+
return { error: `customRanges[${i}] ("${range}") has a start character that comes after its end character` };
|
|
4413
|
+
}
|
|
4414
|
+
parts.push(`${escapeForCharClass(start)}-${escapeForCharClass(end)}`);
|
|
4415
|
+
includes.push(`${range}: custom range from '${start}' to '${end}' inclusive`);
|
|
4416
|
+
}
|
|
4417
|
+
if (customChars.length > 0) {
|
|
4418
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4419
|
+
const unique = [];
|
|
4420
|
+
for (const ch of customChars) {
|
|
4421
|
+
if (!seen.has(ch)) {
|
|
4422
|
+
seen.add(ch);
|
|
4423
|
+
unique.push(ch);
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4426
|
+
parts.push(unique.map(escapeForCharClass).join(""));
|
|
4427
|
+
includes.push(`custom characters: ${unique.join(", ")}`);
|
|
4428
|
+
}
|
|
4429
|
+
const pattern = `[${negate ? "^" : ""}${parts.join("")}]`;
|
|
4430
|
+
return { pattern, negate, includes };
|
|
4431
|
+
}
|
|
4367
4432
|
|
|
4368
4433
|
exports.ALL_FLAGS = ALL_FLAGS;
|
|
4369
4434
|
exports.CHEATSHEET = CHEATSHEET;
|
|
@@ -4374,6 +4439,7 @@ exports.OPERATIONS = OPERATIONS;
|
|
|
4374
4439
|
exports.SQL_DEFAULT_OPTIONS = SQL_DEFAULT_OPTIONS;
|
|
4375
4440
|
exports.analyzeRegexGroups = analyzeRegexGroups;
|
|
4376
4441
|
exports.auditDependencyRanges = auditDependencyRanges;
|
|
4442
|
+
exports.buildCharacterClass = buildCharacterClass;
|
|
4377
4443
|
exports.buildDockerPull = buildDockerPull;
|
|
4378
4444
|
exports.buildDockerRun = buildDockerRun;
|
|
4379
4445
|
exports.buildGitCommand = buildGitCommand;
|
package/dist/tools/code.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, d as AriaIssue, e as AriaValidationResult, C as CHEATSHEET, f as
|
|
1
|
+
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, d as AriaIssue, e as AriaValidationResult, C as CHEATSHEET, f as CharClassOptions, g as CharClassResult, h as CheatsheetEntry, i as CommitTrailer, j as CommitTrailerResult, k as ConnectionStringHost, l as ConnectionStringResult, m as ConventionalCommitFinding, n as ConventionalCommitFooter, o as ConventionalCommitOptions, p as ConventionalCommitParsed, q as ConventionalCommitResult, r as ConventionalCommitSeverity, s as CssResult, D as DEFAULT_COMMIT_TYPES, t as DependencyAuditDuplicate, u as DependencyAuditEntry, v as DependencyAuditIssue, w as DependencyAuditResult, x as DependencyRangeType, y as DependencySection, z as DockerImageRef, B as DockerfileLintFinding, E as DockerfileLintResult, F as DockerfileStage, G as EditorConfigIssue, H as EditorConfigProperty, I as EditorConfigSection, J as EditorConfigValidationResult, K as EnvEntry, L as EnvParseResult, M as ExportsIssue, N as ExportsShape, O as ExportsValidationResult, P as FenceTagIssue, Q as FenceTagIssueType, R as FenceValidationResult, S as GitCommandConfig, T as GitCommandResult, U as GitOperation, V as GithubUrlInfo, W as GithubUrlType, X as GitignoreTestResult, Y as GqlFormatResult, Z as HtmlFormatResult, _ as HtmlMinifyOptions, $ as HtmlMinifyResult, a0 as JsMinifyOptions, a1 as JsMinifyResult, a2 as KNOWN_LANGUAGE_TAGS, a3 as LinkReferenceDefinition, a4 as LinkReferenceUsage, a5 as MIME_TABLE, a6 as MarkdownFootnoteDefinition, a7 as MarkdownFootnoteReference, a8 as MarkdownFootnoteResult, a9 as MarkdownLinkReferenceResult, aa as MatchResult, ab as MimeEntry, ac as MimeLookupResult, ad as OPERATIONS, ae as ParsedSpec, af as PlaceholderStyle, ag as RedosFinding, ah as RedosResult, ai as RedosSeverity, aj as RegexBackreferenceInfo, ak as RegexError, al as RegexFlag, am as RegexGroupAnalysis, an as RegexGroupInfo, ao as RegexGroupIssue, ap as RegexMatch, aq as RegexResult, ar as RegexSuccess, as as ResolvedLinkReference, at as SQL_DEFAULT_OPTIONS, au as Segment, av as SpecVersion, aw as SqlDialect, ax as SqlFormatOptions, ay as SqlPlaceholder, az as SqlPlaceholderResult, aA as SvgSpriteResult, aB as SvgSpriteSymbol, aC as TestPatternResult, aD as TsconfigIssue, aE as TsconfigValidationResult, aF as analyzeRegexGroups, aG as auditDependencyRanges, aH as buildCharacterClass, aI as buildDockerPull, aJ as buildDockerRun, aK as buildGitCommand, aL as collapseHtmlWhitespace, aM as collapseJsWhitespace, aN as countProperties, aO as countRules, aP as countSqlPlaceholders, aQ as detectDialect, aR as detectOperationType, aS as detectRedos, aT as envToExport, aU as envToJson, aV as extractMarkdownFootnotes, aW as extractMarkdownLinkReferences, aX as extractSvgSpriteSymbols, aY as formatCss, aZ as formatGql, a_ as formatHtml, a$ as formatSql, b0 as getEndpointsByTag, b1 as getHtmlStats, b2 as getJsStats, b3 as getMethodColor, b4 as isValidTag, b5 as lintConventionalCommit, b6 as lintDockerfile, b7 as lookupMime, b8 as minifyCss, b9 as minifyGql, ba as minifyHtml, bb as minifyJs, bc as minifySql, bd as normalizeRef, be as parseCommitTrailers, bf as parseConnectionString, bg as parseDockerImage, bh as parseEnv, bi as parseGitCommand, bj as parseGithubUrl, bk as parseSpec, bl as removeConsoleCalls, bm as removeEmptyAttributes, bn as removeHtmlComments, bo as removeJsComments, bp as removeRedundantAttributes, bq as searchCheatsheet, br as searchEndpoints, bs as splitStatements, bt as testGitignorePatterns, bu as testPattern, bv as testRegex, bw as validateAria, bx as validateEditorConfig, by as validateEnvKey, bz as validateFenceLanguageTags, bA as validatePackageExports, bB as validateTsconfig } from '../code-B9LwFkB1.cjs';
|
package/dist/tools/code.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, d as AriaIssue, e as AriaValidationResult, C as CHEATSHEET, f as
|
|
1
|
+
export { A as ALL_FLAGS, a as ApiEndpoint, b as ApiInfo, d as AriaIssue, e as AriaValidationResult, C as CHEATSHEET, f as CharClassOptions, g as CharClassResult, h as CheatsheetEntry, i as CommitTrailer, j as CommitTrailerResult, k as ConnectionStringHost, l as ConnectionStringResult, m as ConventionalCommitFinding, n as ConventionalCommitFooter, o as ConventionalCommitOptions, p as ConventionalCommitParsed, q as ConventionalCommitResult, r as ConventionalCommitSeverity, s as CssResult, D as DEFAULT_COMMIT_TYPES, t as DependencyAuditDuplicate, u as DependencyAuditEntry, v as DependencyAuditIssue, w as DependencyAuditResult, x as DependencyRangeType, y as DependencySection, z as DockerImageRef, B as DockerfileLintFinding, E as DockerfileLintResult, F as DockerfileStage, G as EditorConfigIssue, H as EditorConfigProperty, I as EditorConfigSection, J as EditorConfigValidationResult, K as EnvEntry, L as EnvParseResult, M as ExportsIssue, N as ExportsShape, O as ExportsValidationResult, P as FenceTagIssue, Q as FenceTagIssueType, R as FenceValidationResult, S as GitCommandConfig, T as GitCommandResult, U as GitOperation, V as GithubUrlInfo, W as GithubUrlType, X as GitignoreTestResult, Y as GqlFormatResult, Z as HtmlFormatResult, _ as HtmlMinifyOptions, $ as HtmlMinifyResult, a0 as JsMinifyOptions, a1 as JsMinifyResult, a2 as KNOWN_LANGUAGE_TAGS, a3 as LinkReferenceDefinition, a4 as LinkReferenceUsage, a5 as MIME_TABLE, a6 as MarkdownFootnoteDefinition, a7 as MarkdownFootnoteReference, a8 as MarkdownFootnoteResult, a9 as MarkdownLinkReferenceResult, aa as MatchResult, ab as MimeEntry, ac as MimeLookupResult, ad as OPERATIONS, ae as ParsedSpec, af as PlaceholderStyle, ag as RedosFinding, ah as RedosResult, ai as RedosSeverity, aj as RegexBackreferenceInfo, ak as RegexError, al as RegexFlag, am as RegexGroupAnalysis, an as RegexGroupInfo, ao as RegexGroupIssue, ap as RegexMatch, aq as RegexResult, ar as RegexSuccess, as as ResolvedLinkReference, at as SQL_DEFAULT_OPTIONS, au as Segment, av as SpecVersion, aw as SqlDialect, ax as SqlFormatOptions, ay as SqlPlaceholder, az as SqlPlaceholderResult, aA as SvgSpriteResult, aB as SvgSpriteSymbol, aC as TestPatternResult, aD as TsconfigIssue, aE as TsconfigValidationResult, aF as analyzeRegexGroups, aG as auditDependencyRanges, aH as buildCharacterClass, aI as buildDockerPull, aJ as buildDockerRun, aK as buildGitCommand, aL as collapseHtmlWhitespace, aM as collapseJsWhitespace, aN as countProperties, aO as countRules, aP as countSqlPlaceholders, aQ as detectDialect, aR as detectOperationType, aS as detectRedos, aT as envToExport, aU as envToJson, aV as extractMarkdownFootnotes, aW as extractMarkdownLinkReferences, aX as extractSvgSpriteSymbols, aY as formatCss, aZ as formatGql, a_ as formatHtml, a$ as formatSql, b0 as getEndpointsByTag, b1 as getHtmlStats, b2 as getJsStats, b3 as getMethodColor, b4 as isValidTag, b5 as lintConventionalCommit, b6 as lintDockerfile, b7 as lookupMime, b8 as minifyCss, b9 as minifyGql, ba as minifyHtml, bb as minifyJs, bc as minifySql, bd as normalizeRef, be as parseCommitTrailers, bf as parseConnectionString, bg as parseDockerImage, bh as parseEnv, bi as parseGitCommand, bj as parseGithubUrl, bk as parseSpec, bl as removeConsoleCalls, bm as removeEmptyAttributes, bn as removeHtmlComments, bo as removeJsComments, bp as removeRedundantAttributes, bq as searchCheatsheet, br as searchEndpoints, bs as splitStatements, bt as testGitignorePatterns, bu as testPattern, bv as testRegex, bw as validateAria, bx as validateEditorConfig, by as validateEnvKey, bz as validateFenceLanguageTags, bA as validatePackageExports, bB as validateTsconfig } from '../code-B9LwFkB1.js';
|
package/dist/tools/code.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildDockerPull, buildDockerRun, buildGitCommand, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lintDockerfile, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validatePackageExports, validateTsconfig } from '../chunk-
|
|
1
|
+
export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildCharacterClass, buildDockerPull, buildDockerRun, buildGitCommand, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lintDockerfile, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validatePackageExports, validateTsconfig } from '../chunk-7XHM7HHU.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|
package/dist/tools/units.cjs
CHANGED
|
@@ -2743,6 +2743,83 @@ function calculateCreditCardMinimumPayment(balance, aprPercent, minPaymentPercen
|
|
|
2743
2743
|
finalMonthPayment
|
|
2744
2744
|
};
|
|
2745
2745
|
}
|
|
2746
|
+
function calculateSalesCommission(input) {
|
|
2747
|
+
const { salesAmount, flatRatePercent, tiers, baseSalary = 0 } = input;
|
|
2748
|
+
if (!Number.isFinite(salesAmount) || salesAmount < 0) {
|
|
2749
|
+
return { error: "salesAmount must be a finite, non-negative number" };
|
|
2750
|
+
}
|
|
2751
|
+
if (!Number.isFinite(baseSalary) || baseSalary < 0) {
|
|
2752
|
+
return { error: "baseSalary must be a finite, non-negative number when provided" };
|
|
2753
|
+
}
|
|
2754
|
+
const hasFlat = flatRatePercent !== void 0;
|
|
2755
|
+
const hasTiers = tiers !== void 0;
|
|
2756
|
+
if (hasFlat === hasTiers) {
|
|
2757
|
+
return { error: "Provide exactly one of flatRatePercent or tiers, not both and not neither" };
|
|
2758
|
+
}
|
|
2759
|
+
const round4 = (n) => Math.round(n * 1e4) / 1e4;
|
|
2760
|
+
if (hasFlat) {
|
|
2761
|
+
if (!Number.isFinite(flatRatePercent) || flatRatePercent < 0) {
|
|
2762
|
+
return { error: "flatRatePercent must be a finite, non-negative number" };
|
|
2763
|
+
}
|
|
2764
|
+
const commission2 = salesAmount * flatRatePercent / 100;
|
|
2765
|
+
return {
|
|
2766
|
+
salesAmount: round4(salesAmount),
|
|
2767
|
+
mode: "flat",
|
|
2768
|
+
commission: round4(commission2),
|
|
2769
|
+
baseSalary: round4(baseSalary),
|
|
2770
|
+
totalPayout: round4(baseSalary + commission2)
|
|
2771
|
+
};
|
|
2772
|
+
}
|
|
2773
|
+
const tierList = tiers;
|
|
2774
|
+
if (tierList.length === 0) {
|
|
2775
|
+
return { error: "tiers must contain at least one entry" };
|
|
2776
|
+
}
|
|
2777
|
+
let previousUpTo = 0;
|
|
2778
|
+
for (let i = 0; i < tierList.length; i++) {
|
|
2779
|
+
const tier = tierList[i];
|
|
2780
|
+
const isLast = i === tierList.length - 1;
|
|
2781
|
+
if (!Number.isFinite(tier.ratePercent) || tier.ratePercent < 0) {
|
|
2782
|
+
return { error: `tiers[${i}].ratePercent must be a finite, non-negative number` };
|
|
2783
|
+
}
|
|
2784
|
+
if (tier.upTo === null) {
|
|
2785
|
+
if (!isLast) {
|
|
2786
|
+
return { error: `tiers[${i}].upTo may only be null on the last tier (an unbounded top tier)` };
|
|
2787
|
+
}
|
|
2788
|
+
} else {
|
|
2789
|
+
if (!Number.isFinite(tier.upTo) || tier.upTo <= previousUpTo) {
|
|
2790
|
+
return {
|
|
2791
|
+
error: `tiers[${i}].upTo must be a finite number greater than the previous tier's upTo (${previousUpTo})`
|
|
2792
|
+
};
|
|
2793
|
+
}
|
|
2794
|
+
previousUpTo = tier.upTo;
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
let lowerBound = 0;
|
|
2798
|
+
let commission = 0;
|
|
2799
|
+
const breakdown = [];
|
|
2800
|
+
for (const tier of tierList) {
|
|
2801
|
+
const upper = tier.upTo === null ? Infinity : tier.upTo;
|
|
2802
|
+
const amountInRange = Math.min(Math.max(salesAmount - lowerBound, 0), upper - lowerBound);
|
|
2803
|
+
const commissionForRange = amountInRange * tier.ratePercent / 100;
|
|
2804
|
+
commission += commissionForRange;
|
|
2805
|
+
breakdown.push({
|
|
2806
|
+
rangeStart: round4(lowerBound),
|
|
2807
|
+
rangeEnd: tier.upTo === null ? null : round4(tier.upTo),
|
|
2808
|
+
ratePercent: tier.ratePercent,
|
|
2809
|
+
amountInRange: round4(amountInRange),
|
|
2810
|
+
commissionForRange: round4(commissionForRange)
|
|
2811
|
+
});
|
|
2812
|
+
lowerBound = upper;
|
|
2813
|
+
}
|
|
2814
|
+
return {
|
|
2815
|
+
salesAmount: round4(salesAmount),
|
|
2816
|
+
mode: "tiered",
|
|
2817
|
+
commission: round4(commission),
|
|
2818
|
+
baseSalary: round4(baseSalary),
|
|
2819
|
+
totalPayout: round4(baseSalary + commission),
|
|
2820
|
+
breakdown
|
|
2821
|
+
};
|
|
2822
|
+
}
|
|
2746
2823
|
|
|
2747
2824
|
exports.BASE_LABELS = BASE_LABELS;
|
|
2748
2825
|
exports.BASE_PREFIXES = BASE_PREFIXES;
|
|
@@ -2790,6 +2867,7 @@ exports.calculateRealRateOfReturn = calculateRealRateOfReturn;
|
|
|
2790
2867
|
exports.calculateRequiredBandwidth = calculateRequiredBandwidth;
|
|
2791
2868
|
exports.calculateRoi = calculateRoi;
|
|
2792
2869
|
exports.calculateRuleOf72 = calculateRuleOf72;
|
|
2870
|
+
exports.calculateSalesCommission = calculateSalesCommission;
|
|
2793
2871
|
exports.calculateSavingsGoal = calculateSavingsGoal;
|
|
2794
2872
|
exports.calculateSimpleInterest = calculateSimpleInterest;
|
|
2795
2873
|
exports.calculateTax = calculateTax;
|
package/dist/tools/units.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CommissionBreakdownEntry, G as CommissionInput, H as CommissionResult, I as CommissionTier, J as CompareUnitPricesResult, K as CompoundInterestResult, L as CompoundYearRow, M as CreditAccountInput, N as CreditAccountResult, O as CreditCardMinimumPaymentResult, P as CreditUtilizationResult, Q as DebtItemInput, R as DebtItemResult, S as DebtPayoffComparison, T as DebtPayoffInput, U as DebtPayoffPlanResult, V as DebtPayoffScheduleEntry, W as DebtPayoffStrategy, X as DebtPayoffStrategyResult, Y as DebtToIncomeRatioResult, Z as DepreciationMethod, _ as DepreciationResult, $ as DepreciationYear, a0 as Dimensions, a1 as DiscountField, a2 as DiscountInput, a3 as DiscountResult, a4 as DtiTier, a5 as EmiResult, a6 as EmiTenureUnit, a7 as EmiYearlyBreakdownRow, a8 as ExtraPaymentPayoffResult, a9 as FilePermissions, aa as FileSizeUnit, ab as FormatOptions, ac as FreelancerRateInput, ad as FreelancerRateResult, ae as GPA_GRADE_POINTS, af as GpaCourse, ag as GpaCourseResult, ah as GpaResult, ai as IbanValidationResult, aj as IpConversion, ak as IsbnFormat, al as IsbnResult, am as IsinValidationResult, an as LoanBalanceInput, ao as LoanBalanceResult, ap as LoanPrepaymentPenaltyResult, aq as LoanRefinanceResult, ar as LoanResult, as as MarginMarkupField, at as MarginMarkupInput, au as MarginMarkupResult, av as MortgagePointsResult, aw as MovingAveragePoint, ax as MovingAverageResult, ay as NotationStyle, az as NumberBase, aA as PaybackPeriodInput, aB as PaybackPeriodResult, aC as PercentChangeDirection, aD as PercentageChangeResult, aE as Permission, aF as PrepaymentPenaltyType, aG as PxConvertResult, aH as RealRateField, aI as RealRateOfReturnInput, aJ as RealRateOfReturnResult, aK as RequiredBandwidthResult, aL as RoiInput, aM as RoiResult, aN as RuleOf72Direction, aO as RuleOf72Result, aP as SavingsGoalInput, aQ as SavingsGoalMode, aR as SavingsGoalResult, aS as SemverVersion, aT as SimpleInterestResult, aU as SubnetInfo, aV as SuccessiveDiscountResult, aW as SuccessiveDiscountStep, aX as TaxDirection, aY as TaxEquivalentYieldDirection, aZ as TaxEquivalentYieldResult, a_ as TaxResult, a$ as TimeValueDirection, b0 as TimeValueResult, b1 as TipSplitResult, b2 as TransferSpeedUnit, b3 as TransferTimeResult, b4 as USD_DENOMINATIONS, b5 as UnitPriceItem, b6 as UnitPriceResult, b7 as UtilizationTier, b8 as VideoBitrateInput, b9 as VideoBitrateMode, ba as VideoBitrateResult, bb as ViewportConvertResult, bc as VinValidationResult, bd as applySuccessiveDiscounts, be as autoFormat, bf as bumpVersion, bg as calcAspectRatio, bh as calcSubnet, bi as calculateBlendedLoanRate, bj as calculateBreakEven, bk as calculateCashBreakdown, bl as calculateCashRounding, bm as calculateCdMaturity, bn as calculateChange, bo as calculateCompoundInterest, bp as calculateCreditCardMinimumPayment, bq as calculateCreditUtilization, br as calculateDebtToIncomeRatio, bs as calculateDepreciationSchedule, bt as calculateDiscount, bu as calculateEmi, bv as calculateExtraPaymentPayoff, bw as calculateFreelancerRate, bx as calculateGpa, by as calculateLoan, bz as calculateLoanPrepaymentPenalty, bA as calculateLoanRefinance, bB as calculateMarginMarkup, bC as calculateMortgagePoints, bD as calculateMovingAverages, bE as calculatePaybackPeriod, bF as calculatePercentageChange, bG as calculateRealRateOfReturn, bH as calculateRequiredBandwidth, bI as calculateRoi, bJ as calculateRuleOf72, bK as calculateSalesCommission, bL as calculateSavingsGoal, bM as calculateSimpleInterest, bN as calculateTax, bO as calculateTaxEquivalentYield, bP as calculateTimeValue, bQ as calculateTipSplit, bR as calculateTransferTime, bS as calculateVideoBitrate, bT as compareSemver, bU as compareUnitPrices, bV as convert, bW as convertAprApy, bX as convertBytes, bY as convertIp, bZ as coverBox, b_ as decimalToIp, b$ as decimalToIpCidr, c0 as describePermissions, c1 as fitIntoBox, c2 as formatNumber, c3 as formatValue, c4 as formatVwValue, c5 as formatWithSeparator, c6 as gcd, c7 as ipFromBinary, c8 as ipFromDecimal, c9 as ipFromHex, ca as ipToBinary, cb as ipToDecimal, cc as ipToDecimalCidr, cd as ipToHex, ce as ipToOctal, cf as isValid, cg as isValidCidr, ch as isValidIp, ci as isValidIpv4, cj as marginToMarkup, ck as markupToMargin, cl as octalToPermissions, cm as parseFileSize, cn as parseInput, co as parseNumberString, cp as parseSemver, cq as permissionsToChmod, cr as permissionsToOctal, cs as permissionsToSymbolic, ct as planDebtPayoff, cu as ptToPx, cv as pxToAll, cw as pxToViewport, cx as remToPx, cy as satisfiesRange, cz as scaleByHeight, cA as scaleByWidth, cB as sortVersions, cC as splitSubnet, cD as symbolicToPermissions, cE as validateBarcode, cF as validateCardNumber, cG as validateIban, cH as validateIsbn, cI as validateIsin, cJ as validateVin, cK as viewportToPx } from '../units-gLm_pq6U.cjs';
|
package/dist/tools/units.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as
|
|
1
|
+
export { A as AmortizationRow, a as AprApyDirection, b as AprApyResult, c as AspectRatioResult, B as BASE_LABELS, d as BASE_PREFIXES, e as BYTE_UNITS, f as BarcodeFormat, g as BarcodeValidationResult, h as BaseConvertResult, i as BlendedLoanRateResult, j as BreakEvenInput, k as BreakEvenResult, l as ByteConvertResult, m as ByteUnit, C as COMMON_CURRENCIES, n as COMMON_LOCALES, o as COMMON_PERMISSIONS, p as COMMON_RATIOS, q as COMMON_SIZES, r as COMMON_TAX_RATES, s as COMMON_TIP_PERCENTAGES, t as COMMON_VIEWPORTS, v as CardValidationResult, w as CashBreakdownResult, x as CashChangeResult, y as CashDenominationItem, z as CashRoundingMode, D as CashRoundingResult, E as CdMaturityResult, F as CommissionBreakdownEntry, G as CommissionInput, H as CommissionResult, I as CommissionTier, J as CompareUnitPricesResult, K as CompoundInterestResult, L as CompoundYearRow, M as CreditAccountInput, N as CreditAccountResult, O as CreditCardMinimumPaymentResult, P as CreditUtilizationResult, Q as DebtItemInput, R as DebtItemResult, S as DebtPayoffComparison, T as DebtPayoffInput, U as DebtPayoffPlanResult, V as DebtPayoffScheduleEntry, W as DebtPayoffStrategy, X as DebtPayoffStrategyResult, Y as DebtToIncomeRatioResult, Z as DepreciationMethod, _ as DepreciationResult, $ as DepreciationYear, a0 as Dimensions, a1 as DiscountField, a2 as DiscountInput, a3 as DiscountResult, a4 as DtiTier, a5 as EmiResult, a6 as EmiTenureUnit, a7 as EmiYearlyBreakdownRow, a8 as ExtraPaymentPayoffResult, a9 as FilePermissions, aa as FileSizeUnit, ab as FormatOptions, ac as FreelancerRateInput, ad as FreelancerRateResult, ae as GPA_GRADE_POINTS, af as GpaCourse, ag as GpaCourseResult, ah as GpaResult, ai as IbanValidationResult, aj as IpConversion, ak as IsbnFormat, al as IsbnResult, am as IsinValidationResult, an as LoanBalanceInput, ao as LoanBalanceResult, ap as LoanPrepaymentPenaltyResult, aq as LoanRefinanceResult, ar as LoanResult, as as MarginMarkupField, at as MarginMarkupInput, au as MarginMarkupResult, av as MortgagePointsResult, aw as MovingAveragePoint, ax as MovingAverageResult, ay as NotationStyle, az as NumberBase, aA as PaybackPeriodInput, aB as PaybackPeriodResult, aC as PercentChangeDirection, aD as PercentageChangeResult, aE as Permission, aF as PrepaymentPenaltyType, aG as PxConvertResult, aH as RealRateField, aI as RealRateOfReturnInput, aJ as RealRateOfReturnResult, aK as RequiredBandwidthResult, aL as RoiInput, aM as RoiResult, aN as RuleOf72Direction, aO as RuleOf72Result, aP as SavingsGoalInput, aQ as SavingsGoalMode, aR as SavingsGoalResult, aS as SemverVersion, aT as SimpleInterestResult, aU as SubnetInfo, aV as SuccessiveDiscountResult, aW as SuccessiveDiscountStep, aX as TaxDirection, aY as TaxEquivalentYieldDirection, aZ as TaxEquivalentYieldResult, a_ as TaxResult, a$ as TimeValueDirection, b0 as TimeValueResult, b1 as TipSplitResult, b2 as TransferSpeedUnit, b3 as TransferTimeResult, b4 as USD_DENOMINATIONS, b5 as UnitPriceItem, b6 as UnitPriceResult, b7 as UtilizationTier, b8 as VideoBitrateInput, b9 as VideoBitrateMode, ba as VideoBitrateResult, bb as ViewportConvertResult, bc as VinValidationResult, bd as applySuccessiveDiscounts, be as autoFormat, bf as bumpVersion, bg as calcAspectRatio, bh as calcSubnet, bi as calculateBlendedLoanRate, bj as calculateBreakEven, bk as calculateCashBreakdown, bl as calculateCashRounding, bm as calculateCdMaturity, bn as calculateChange, bo as calculateCompoundInterest, bp as calculateCreditCardMinimumPayment, bq as calculateCreditUtilization, br as calculateDebtToIncomeRatio, bs as calculateDepreciationSchedule, bt as calculateDiscount, bu as calculateEmi, bv as calculateExtraPaymentPayoff, bw as calculateFreelancerRate, bx as calculateGpa, by as calculateLoan, bz as calculateLoanPrepaymentPenalty, bA as calculateLoanRefinance, bB as calculateMarginMarkup, bC as calculateMortgagePoints, bD as calculateMovingAverages, bE as calculatePaybackPeriod, bF as calculatePercentageChange, bG as calculateRealRateOfReturn, bH as calculateRequiredBandwidth, bI as calculateRoi, bJ as calculateRuleOf72, bK as calculateSalesCommission, bL as calculateSavingsGoal, bM as calculateSimpleInterest, bN as calculateTax, bO as calculateTaxEquivalentYield, bP as calculateTimeValue, bQ as calculateTipSplit, bR as calculateTransferTime, bS as calculateVideoBitrate, bT as compareSemver, bU as compareUnitPrices, bV as convert, bW as convertAprApy, bX as convertBytes, bY as convertIp, bZ as coverBox, b_ as decimalToIp, b$ as decimalToIpCidr, c0 as describePermissions, c1 as fitIntoBox, c2 as formatNumber, c3 as formatValue, c4 as formatVwValue, c5 as formatWithSeparator, c6 as gcd, c7 as ipFromBinary, c8 as ipFromDecimal, c9 as ipFromHex, ca as ipToBinary, cb as ipToDecimal, cc as ipToDecimalCidr, cd as ipToHex, ce as ipToOctal, cf as isValid, cg as isValidCidr, ch as isValidIp, ci as isValidIpv4, cj as marginToMarkup, ck as markupToMargin, cl as octalToPermissions, cm as parseFileSize, cn as parseInput, co as parseNumberString, cp as parseSemver, cq as permissionsToChmod, cr as permissionsToOctal, cs as permissionsToSymbolic, ct as planDebtPayoff, cu as ptToPx, cv as pxToAll, cw as pxToViewport, cx as remToPx, cy as satisfiesRange, cz as scaleByHeight, cA as scaleByWidth, cB as sortVersions, cC as splitSubnet, cD as symbolicToPermissions, cE as validateBarcode, cF as validateCardNumber, cG as validateIban, cH as validateIsbn, cI as validateIsin, cJ as validateVin, cK as viewportToPx } from '../units-gLm_pq6U.js';
|
package/dist/tools/units.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditCardMinimumPayment, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRealRateOfReturn, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx } from '../chunk-
|
|
1
|
+
export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditCardMinimumPayment, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRealRateOfReturn, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSalesCommission, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx } from '../chunk-YM6UC4SM.js';
|
|
2
2
|
import '../chunk-MLKGABMK.js';
|