@design.estate/dees-catalog 1.0.225 → 1.0.226

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.
Files changed (40) hide show
  1. package/dist_bundle/bundle.js +314 -229
  2. package/dist_bundle/bundle.js.map +4 -4
  3. package/dist_ts_web/00_commitinfo_data.js +1 -1
  4. package/dist_ts_web/elements/dees-form.d.ts +2 -1
  5. package/dist_ts_web/elements/dees-form.demo.d.ts +1 -0
  6. package/dist_ts_web/elements/dees-form.demo.js +34 -0
  7. package/dist_ts_web/elements/dees-form.js +7 -19
  8. package/dist_ts_web/elements/dees-input-fileupload.d.ts +1 -2
  9. package/dist_ts_web/elements/dees-input-fileupload.js +2 -3
  10. package/dist_ts_web/elements/dees-input-iban.d.ts +15 -0
  11. package/dist_ts_web/elements/dees-input-iban.demo.d.ts +1 -0
  12. package/dist_ts_web/elements/dees-input-iban.demo.js +3 -0
  13. package/dist_ts_web/elements/dees-input-iban.js +113 -0
  14. package/dist_ts_web/elements/dees-input-phone.d.ts +10 -0
  15. package/dist_ts_web/elements/dees-input-phone.demo.d.ts +1 -0
  16. package/dist_ts_web/elements/dees-input-phone.demo.js +3 -0
  17. package/dist_ts_web/elements/dees-input-phone.js +20 -0
  18. package/dist_ts_web/elements/dees-input-searchselect.d.ts +1 -0
  19. package/dist_ts_web/elements/dees-input-searchselect.js +2 -0
  20. package/dist_ts_web/elements/dees-input-tags.d.ts +1 -0
  21. package/dist_ts_web/elements/dees-input-tags.js +2 -0
  22. package/dist_ts_web/elements/dees-input-text.d.ts +6 -1
  23. package/dist_ts_web/elements/dees-input-text.js +140 -71
  24. package/dist_ts_web/elements/index.d.ts +2 -0
  25. package/dist_ts_web/elements/index.js +3 -1
  26. package/dist_watch/bundle.js +1320 -106
  27. package/dist_watch/bundle.js.map +4 -4
  28. package/package.json +3 -1
  29. package/ts_web/00_commitinfo_data.ts +1 -1
  30. package/ts_web/elements/dees-form.demo.ts +35 -0
  31. package/ts_web/elements/dees-form.ts +22 -23
  32. package/ts_web/elements/dees-input-fileupload.ts +1 -2
  33. package/ts_web/elements/dees-input-iban.demo.ts +3 -0
  34. package/ts_web/elements/dees-input-iban.ts +98 -0
  35. package/ts_web/elements/dees-input-phone.demo.ts +3 -0
  36. package/ts_web/elements/dees-input-phone.ts +29 -0
  37. package/ts_web/elements/dees-input-searchselect.ts +0 -0
  38. package/ts_web/elements/dees-input-tags.ts +0 -0
  39. package/ts_web/elements/dees-input-text.ts +153 -76
  40. package/ts_web/elements/index.ts +2 -0
@@ -17226,7 +17226,7 @@ var require_css = __commonJS({
17226
17226
  // reverse makes sure longer attributes `font-weight` are matched fully
17227
17227
  // instead of getting false positives on say `font`
17228
17228
  ].reverse();
17229
- function css3(hljs) {
17229
+ function css4(hljs) {
17230
17230
  const regex = hljs.regex;
17231
17231
  const modes = MODES(hljs);
17232
17232
  const VENDOR_PREFIX = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ };
@@ -17355,7 +17355,7 @@ var require_css = __commonJS({
17355
17355
  ]
17356
17356
  };
17357
17357
  }
17358
- module.exports = css3;
17358
+ module.exports = css4;
17359
17359
  }
17360
17360
  });
17361
17361
 
@@ -67873,8 +67873,8 @@ var WccProperties = class WccProperties2 extends DeesElement {
67873
67873
  if (key === "goBright" || key === "domtools") {
67874
67874
  continue;
67875
67875
  }
67876
- const property = classProperties.get(key);
67877
- const propertyTypeString = await determinePropertyType(property);
67876
+ const property2 = classProperties.get(key);
67877
+ const propertyTypeString = await determinePropertyType(property2);
67878
67878
  propertyArray.push(x`
67879
67879
  <div class="property">
67880
67880
  ${key} / ${propertyTypeString}<br />
@@ -67905,7 +67905,7 @@ var WccProperties = class WccProperties2 extends DeesElement {
67905
67905
  }}"
67906
67906
  />`;
67907
67907
  case "Enum":
67908
- const enumValues = getEnumValues(property);
67908
+ const enumValues = getEnumValues(property2);
67909
67909
  return x`<select
67910
67910
  @change="${(eventArg) => {
67911
67911
  firstFoundInstantiatedElement[key] = eventArg.target.value;
@@ -68192,6 +68192,8 @@ __export(elements_exports, {
68192
68192
  DeesInputCheckbox: () => DeesInputCheckbox,
68193
68193
  DeesInputDropdown: () => DeesInputDropdown,
68194
68194
  DeesInputFileupload: () => DeesInputFileupload,
68195
+ DeesInputIban: () => DeesInputIban,
68196
+ DeesInputPhone: () => DeesInputPhone,
68195
68197
  DeesInputQuantitySelector: () => DeesInputQuantitySelector,
68196
68198
  DeesInputRadio: () => DeesInputRadio,
68197
68199
  DeesInputText: () => DeesInputText,
@@ -69443,88 +69445,53 @@ var DeesInputText = class extends DeesElement {
69443
69445
  this.disabled = false;
69444
69446
  this.isPasswordBool = false;
69445
69447
  this.showPasswordBool = false;
69448
+ this.validationText = "";
69446
69449
  }
69447
69450
  render() {
69448
69451
  return x`
69449
69452
  <style>
69450
- * {
69451
- box-sizing: border-box;
69452
- }
69453
-
69454
- :host {
69455
- position: relative;
69456
- display: grid;
69457
- margin: 10px 0px;
69458
- margin-bottom: 24px;
69459
- }
69460
-
69461
- .maincontainer {
69462
- color: ${this.goBright ? "#333" : "#ccc"};
69463
- }
69464
-
69465
- .label {
69466
- font-size: 14px;
69467
- margin-bottom: 5px;
69468
- }
69469
-
69470
69453
  input {
69471
- margin-top: 5px;
69472
- background: ${this.goBright ? "#fafafa" : "#222"};
69473
- border-top: ${this.goBright ? "1px solid #CCC" : "1px solid #444"};
69474
- border-bottom: ${this.goBright ? "1px solid #CCC" : "1px solid #333"};
69475
- border-right: ${this.goBright ? "1px solid #CCC" : "none"};
69476
- border-left: ${this.goBright ? "1px solid #CCC" : "none"};
69477
- padding-left:10px;
69478
- padding-right: 10px;
69479
- border-radius: 2px;
69480
- width: 100%;
69481
- line-height: 48px;
69482
- transition: all 0.2s;
69483
- outline: none;
69484
- font-size: 16px;
69485
69454
  font-family: ${this.isPasswordBool ? "monospace" : "Inter"};
69486
69455
  letter-spacing: ${this.isPasswordBool ? "1px" : "normal"};
69487
69456
  color: ${this.goBright ? "#333" : "#ccc"};
69488
69457
  }
69489
-
69490
- input:disabled {
69491
- background: ${cssManager.bdTheme("#ffffff00", "#11111100")};
69492
- border: 1px dashed ${cssManager.bdTheme("#666666", "#666666")};
69493
- color: #9b9b9e;
69494
- cursor: default;
69495
- }
69496
-
69497
- input:focus {
69498
- outline: none;
69499
- border-bottom: 1px solid #e4002b;
69500
- }
69501
-
69502
- .showPassword {
69503
- position: absolute;
69504
- bottom: 8px;
69505
- right: 10px;
69506
- border: 1px dashed #444;
69507
- border-radius: 7px;
69508
- padding: 8px 0px;
69509
- width: 40px;
69510
- }
69511
-
69512
- .showPassword:hover {
69513
- cursor: pointer;
69514
- background: ${cssManager.bdTheme("#00000010", "#ffffff10")};
69515
- }
69458
+ ${this.validationText ? i`
69459
+ .validationContainer {
69460
+ height: 22px;
69461
+ opacity: 1;
69462
+ }
69463
+ ` : i`
69464
+ .validationContainer {
69465
+ height: 4px;
69466
+ padding: 2px !important;
69467
+ opacity: 0;
69468
+ }
69469
+ `}
69516
69470
  </style>
69517
69471
  <div class="maincontainer">
69518
69472
  ${this.label ? x`<div class="label">${this.label}</div>` : x``}
69519
- <input type="${this.isPasswordBool && !this.showPasswordBool ? "password" : "text"}" .value=${this.value} @input="${this.updateValue}" .disabled=${this.disabled} />
69473
+ <input
69474
+ type="${this.isPasswordBool && !this.showPasswordBool ? "password" : "text"}"
69475
+ .value=${this.value}
69476
+ @input="${this.updateValue}"
69477
+ .disabled=${this.disabled}
69478
+ />
69479
+ <div class="validationContainer">
69480
+ ${this.validationText}
69481
+ </div>
69520
69482
  ${this.isPasswordBool ? x`
69521
- <div class="showPassword" @click=${this.togglePasswordView}>
69522
- <dees-icon .iconFA=${this.showPasswordBool ? "eye" : "eyeSlash"}></dees-icon>
69523
- </div>
69524
- ` : x``}
69483
+ <div class="showPassword" @click=${this.togglePasswordView}>
69484
+ <dees-icon .iconFA=${this.showPasswordBool ? "eye" : "eyeSlash"}></dees-icon>
69485
+ </div>
69486
+ ` : x``}
69525
69487
  </div>
69526
69488
  `;
69527
69489
  }
69490
+ firstUpdated() {
69491
+ const input = this.shadowRoot.querySelector("input");
69492
+ input.addEventListener("input", (eventArg) => {
69493
+ });
69494
+ }
69528
69495
  async updateValue(eventArg) {
69529
69496
  const target = eventArg.target;
69530
69497
  this.value = target.value;
@@ -69554,6 +69521,91 @@ DeesInputText.demo = () => x`
69554
69521
  <dees-input-text .label=${"this is a label"} .value=${"test"}></dees-input-text>
69555
69522
  <dees-input-text .isPasswordBool=${true}></dees-input-text>
69556
69523
  `;
69524
+ DeesInputText.styles = [
69525
+ cssManager.defaultStyles,
69526
+ i`
69527
+ * {
69528
+ box-sizing: border-box;
69529
+ }
69530
+
69531
+ :host {
69532
+ position: relative;
69533
+ display: grid;
69534
+ margin: 8px 0px;
69535
+ margin-bottom: 24px;
69536
+ z-index: auto;
69537
+ }
69538
+
69539
+ .maincontainer {
69540
+ color: ${cssManager.bdTheme("#333", "#ccc")};
69541
+ }
69542
+
69543
+ .label {
69544
+ font-size: 14px;
69545
+ margin-bottom: 4px;
69546
+ }
69547
+
69548
+ input {
69549
+ margin-top: 5px;
69550
+ background: ${cssManager.bdTheme("#fafafa", "#222")};
69551
+ border-top: ${cssManager.bdTheme("1px solid #CCC", "1px solid #444")};
69552
+ border-bottom: ${cssManager.bdTheme("1px solid #CCC", "1px solid #333")};
69553
+ border-right: ${cssManager.bdTheme("1px solid #CCC", "none")};
69554
+ border-left: ${cssManager.bdTheme("1px solid #CCC", "none")};
69555
+ padding-left: 10px;
69556
+ padding-right: 10px;
69557
+ border-radius: 2px;
69558
+ width: 100%;
69559
+ line-height: 36px;
69560
+ transition: all 0.2s;
69561
+ outline: none;
69562
+ font-size: 16px;
69563
+ position: relative;
69564
+ z-index: 2;
69565
+ // see template for more
69566
+ }
69567
+
69568
+ input:disabled {
69569
+ background: ${cssManager.bdTheme("#ffffff00", "#11111100")};
69570
+ border: 1px dashed ${cssManager.bdTheme("#666666", "#666666")};
69571
+ color: #9b9b9e;
69572
+ cursor: default;
69573
+ }
69574
+
69575
+ input:focus {
69576
+ outline: none;
69577
+ border-bottom: 1px solid #e4002b;
69578
+ }
69579
+
69580
+ .showPassword {
69581
+ position: absolute;
69582
+ bottom: 7px;
69583
+ right: 10px;
69584
+ border: 1px dashed #444;
69585
+ border-radius: 7px;
69586
+ padding: 4px 0px;
69587
+ width: 40px;
69588
+ }
69589
+
69590
+ .showPassword:hover {
69591
+ cursor: pointer;
69592
+ background: ${cssManager.bdTheme("#00000010", "#ffffff10")};
69593
+ }
69594
+
69595
+ .validationContainer {
69596
+ text-align: center;
69597
+ padding: 6px 2px 2px 2px;
69598
+ margin-top: -4px;
69599
+ font-size: 12px;
69600
+ color: #fff;
69601
+ background: #e4002b;
69602
+ position: relative;
69603
+ z-index: 1;
69604
+ border-radius: 3px;
69605
+ transition: all 0.2s;
69606
+ }
69607
+ `
69608
+ ];
69557
69609
  __decorateClass([
69558
69610
  n5({
69559
69611
  type: String
@@ -69593,6 +69645,20 @@ __decorateClass([
69593
69645
  reflect: true
69594
69646
  })
69595
69647
  ], DeesInputText.prototype, "showPasswordBool", 2);
69648
+ __decorateClass([
69649
+ n5({
69650
+ type: Boolean,
69651
+ reflect: true
69652
+ })
69653
+ ], DeesInputText.prototype, "validationState", 2);
69654
+ __decorateClass([
69655
+ n5({
69656
+ reflect: true
69657
+ })
69658
+ ], DeesInputText.prototype, "validationText", 2);
69659
+ __decorateClass([
69660
+ n5({})
69661
+ ], DeesInputText.prototype, "validationFunction", 2);
69596
69662
  DeesInputText = __decorateClass([
69597
69663
  e7("dees-input-text")
69598
69664
  ], DeesInputText);
@@ -70217,8 +70283,8 @@ var DeesTable = class extends DeesElement {
70217
70283
  const cell = cells[i8];
70218
70284
  const width = window.getComputedStyle(cell).width;
70219
70285
  if (cell.textContent.includes("Actions")) {
70220
- cell.style.minWidth = "68px";
70221
- cell.style.width = `${this.dataActions.filter((actionArg) => actionArg.type.includes("inRow")).length * 35}px`;
70286
+ const neededWidth = this.dataActions.filter((actionArg) => actionArg.type.includes("inRow")).length * 35;
70287
+ cell.style.width = `${Math.max(neededWidth, 68)}px`;
70222
70288
  } else {
70223
70289
  cell.style.width = width;
70224
70290
  }
@@ -70556,9 +70622,1140 @@ DeesTable = __decorateClass([
70556
70622
  e7("dees-table")
70557
70623
  ], DeesTable);
70558
70624
 
70625
+ // ts_web/elements/dees-form.demo.ts
70626
+ var demoFunc6 = () => x`
70627
+ <style>
70628
+ .demoContainer {
70629
+ max-width: 400px;
70630
+ margin: auto;
70631
+ padding: 16px;
70632
+ background: #111;
70633
+ }
70634
+ </style>
70635
+ <div class="demoContainer">
70636
+ <dees-form
70637
+ style="display: block; margin:auto; max-width: 500px; padding: 20px"
70638
+ @formData=${async (eventArg) => {
70639
+ const form = eventArg.currentTarget;
70640
+ form.setStatus("pending", "authenticating...");
70641
+ await dist_ts_exports26.plugins.smartdelay.delayFor(1e3);
70642
+ form.setStatus("success", "authenticated!");
70643
+ }}
70644
+ >
70645
+ <dees-input-text .required="${true}" key="hello1" label="a text"></dees-input-text>
70646
+ <dees-input-text .required="${true}" key="hello2" label="also a text"></dees-input-text>
70647
+ <dees-input-text .required="${true}" key="hello3" label="a password" isPasswordBool></dees-input-text>
70648
+ <dees-input-checkbox
70649
+ .required="${true}"
70650
+ key="hello3"
70651
+ label="another text"
70652
+ ></dees-input-checkbox>
70653
+ <dees-input-iban></dees-input-iban>
70654
+ <dees-form-submit>Submit</dees-form-submit>
70655
+ </dees-form>
70656
+ </div>
70657
+ `;
70658
+
70659
+ // node_modules/.pnpm/ibantools@4.3.5/node_modules/ibantools/jsnext/ibantools.js
70660
+ function isValidIBAN(iban, validationOptions) {
70661
+ if (validationOptions === void 0) {
70662
+ validationOptions = { allowQRIBAN: true };
70663
+ }
70664
+ if (iban === void 0 || iban === null)
70665
+ return false;
70666
+ var reg = new RegExp("^[0-9]{2}$", "");
70667
+ var countryCode = iban.slice(0, 2);
70668
+ var spec = countrySpecs[countryCode];
70669
+ if (spec === void 0 || spec.bban_regexp === void 0 || spec.bban_regexp === null || spec.chars === void 0)
70670
+ return false;
70671
+ return spec.chars === iban.length && reg.test(iban.slice(2, 4)) && isValidBBAN(iban.slice(4), countryCode) && isValidIBANChecksum(iban) && (validationOptions.allowQRIBAN || !isQRIBAN(iban));
70672
+ }
70673
+ var ValidationErrorsIBAN;
70674
+ (function(ValidationErrorsIBAN2) {
70675
+ ValidationErrorsIBAN2[ValidationErrorsIBAN2["NoIBANProvided"] = 0] = "NoIBANProvided";
70676
+ ValidationErrorsIBAN2[ValidationErrorsIBAN2["NoIBANCountry"] = 1] = "NoIBANCountry";
70677
+ ValidationErrorsIBAN2[ValidationErrorsIBAN2["WrongBBANLength"] = 2] = "WrongBBANLength";
70678
+ ValidationErrorsIBAN2[ValidationErrorsIBAN2["WrongBBANFormat"] = 3] = "WrongBBANFormat";
70679
+ ValidationErrorsIBAN2[ValidationErrorsIBAN2["ChecksumNotNumber"] = 4] = "ChecksumNotNumber";
70680
+ ValidationErrorsIBAN2[ValidationErrorsIBAN2["WrongIBANChecksum"] = 5] = "WrongIBANChecksum";
70681
+ ValidationErrorsIBAN2[ValidationErrorsIBAN2["WrongAccountBankBranchChecksum"] = 6] = "WrongAccountBankBranchChecksum";
70682
+ ValidationErrorsIBAN2[ValidationErrorsIBAN2["QRIBANNotAllowed"] = 7] = "QRIBANNotAllowed";
70683
+ })(ValidationErrorsIBAN || (ValidationErrorsIBAN = {}));
70684
+ function isValidBBAN(bban, countryCode) {
70685
+ if (bban === void 0 || bban === null || countryCode === void 0 || countryCode === null)
70686
+ return false;
70687
+ var spec = countrySpecs[countryCode];
70688
+ if (spec === void 0 || spec === null || spec.bban_regexp === void 0 || spec.bban_regexp === null || spec.chars === void 0 || spec.chars === null)
70689
+ return false;
70690
+ if (spec.chars - 4 === bban.length && checkFormatBBAN(bban, spec.bban_regexp)) {
70691
+ if (spec.bban_validation_func) {
70692
+ return spec.bban_validation_func(bban.replace(/[\s.]+/g, ""));
70693
+ }
70694
+ return true;
70695
+ }
70696
+ return false;
70697
+ }
70698
+ function isQRIBAN(iban) {
70699
+ if (iban === void 0 || iban === null)
70700
+ return false;
70701
+ var countryCode = iban.slice(0, 2);
70702
+ var QRIBANCountries = ["LI", "CH"];
70703
+ if (!QRIBANCountries.includes(countryCode))
70704
+ return false;
70705
+ var reg = new RegExp("^3[0-1]{1}[0-9]{3}$", "");
70706
+ return reg.test(iban.slice(4, 9));
70707
+ }
70708
+ function checkFormatBBAN(bban, bformat) {
70709
+ var reg = new RegExp(bformat, "");
70710
+ return reg.test(bban);
70711
+ }
70712
+ function electronicFormatIBAN(iban) {
70713
+ if (typeof iban !== "string") {
70714
+ return null;
70715
+ }
70716
+ return iban.replace(/[-\ ]/g, "").toUpperCase();
70717
+ }
70718
+ function friendlyFormatIBAN(iban, separator) {
70719
+ if (typeof iban !== "string") {
70720
+ return null;
70721
+ }
70722
+ if (separator === void 0 || separator === null) {
70723
+ separator = " ";
70724
+ }
70725
+ var electronic_iban = electronicFormatIBAN(iban);
70726
+ if (electronic_iban === null) {
70727
+ return null;
70728
+ }
70729
+ return electronic_iban.replace(/(.{4})(?!$)/g, "$1" + separator);
70730
+ }
70731
+ function isValidIBANChecksum(iban) {
70732
+ var countryCode = iban.slice(0, 2);
70733
+ var providedChecksum = parseInt(iban.slice(2, 4), 10);
70734
+ var bban = iban.slice(4);
70735
+ var validationString = replaceCharaterWithCode("".concat(bban).concat(countryCode, "00"));
70736
+ var rest = mod9710(validationString);
70737
+ return 98 - rest === providedChecksum;
70738
+ }
70739
+ function replaceCharaterWithCode(str) {
70740
+ return str.split("").map(function(c7) {
70741
+ var code = c7.charCodeAt(0);
70742
+ return code >= 65 ? (code - 55).toString() : c7;
70743
+ }).join("");
70744
+ }
70745
+ var ValidationErrorsBIC;
70746
+ (function(ValidationErrorsBIC2) {
70747
+ ValidationErrorsBIC2[ValidationErrorsBIC2["NoBICProvided"] = 0] = "NoBICProvided";
70748
+ ValidationErrorsBIC2[ValidationErrorsBIC2["NoBICCountry"] = 1] = "NoBICCountry";
70749
+ ValidationErrorsBIC2[ValidationErrorsBIC2["WrongBICFormat"] = 2] = "WrongBICFormat";
70750
+ })(ValidationErrorsBIC || (ValidationErrorsBIC = {}));
70751
+ var checkNorwayBBAN = function(bban) {
70752
+ var weights = [5, 4, 3, 2, 7, 6, 5, 4, 3, 2];
70753
+ var bbanWithoutSpacesAndPeriods = bban.replace(/[\s.]+/g, "");
70754
+ var controlDigit = parseInt(bbanWithoutSpacesAndPeriods.charAt(10), 10);
70755
+ var bbanWithoutControlDigit = bbanWithoutSpacesAndPeriods.substring(0, 10);
70756
+ var sum = 0;
70757
+ for (var index = 0; index < 10; index++) {
70758
+ sum += parseInt(bbanWithoutControlDigit.charAt(index), 10) * weights[index];
70759
+ }
70760
+ var remainder = sum % 11;
70761
+ return controlDigit === (remainder === 0 ? 0 : 11 - remainder);
70762
+ };
70763
+ var checkBelgianBBAN = function(bban) {
70764
+ var stripped = bban.replace(/[\s.]+/g, "");
70765
+ var checkingPart = parseInt(stripped.substring(0, stripped.length - 2), 10);
70766
+ var checksum = parseInt(stripped.substring(stripped.length - 2, stripped.length), 10);
70767
+ var remainder = checkingPart % 97 === 0 ? 97 : checkingPart % 97;
70768
+ return remainder === checksum;
70769
+ };
70770
+ var mod9710 = function(validationString) {
70771
+ while (validationString.length > 2) {
70772
+ var part = validationString.slice(0, 6);
70773
+ var partInt = parseInt(part, 10);
70774
+ if (isNaN(partInt)) {
70775
+ return NaN;
70776
+ }
70777
+ validationString = partInt % 97 + validationString.slice(part.length);
70778
+ }
70779
+ return parseInt(validationString, 10) % 97;
70780
+ };
70781
+ var checkMod9710BBAN = function(bban) {
70782
+ var stripped = bban.replace(/[\s.]+/g, "");
70783
+ var reminder = mod9710(stripped);
70784
+ return reminder === 1;
70785
+ };
70786
+ var checkPolandBBAN = function(bban) {
70787
+ var weights = [3, 9, 7, 1, 3, 9, 7];
70788
+ var controlDigit = parseInt(bban.charAt(7), 10);
70789
+ var toCheck = bban.substring(0, 7);
70790
+ var sum = 0;
70791
+ for (var index = 0; index < 7; index++) {
70792
+ sum += parseInt(toCheck.charAt(index), 10) * weights[index];
70793
+ }
70794
+ var remainder = sum % 10;
70795
+ return controlDigit === (remainder === 0 ? 0 : 10 - remainder);
70796
+ };
70797
+ var checkSpainBBAN = function(bban) {
70798
+ var weightsBankBranch = [4, 8, 5, 10, 9, 7, 3, 6];
70799
+ var weightsAccount = [1, 2, 4, 8, 5, 10, 9, 7, 3, 6];
70800
+ var controlBankBranch = parseInt(bban.charAt(8), 10);
70801
+ var controlAccount = parseInt(bban.charAt(9), 10);
70802
+ var bankBranch = bban.substring(0, 8);
70803
+ var account = bban.substring(10, 20);
70804
+ var sum = 0;
70805
+ for (var index = 0; index < 8; index++) {
70806
+ sum += parseInt(bankBranch.charAt(index), 10) * weightsBankBranch[index];
70807
+ }
70808
+ var remainder = sum % 11;
70809
+ if (controlBankBranch !== (remainder === 0 ? 0 : remainder === 1 ? 1 : 11 - remainder)) {
70810
+ return false;
70811
+ }
70812
+ sum = 0;
70813
+ for (var index = 0; index < 10; index++) {
70814
+ sum += parseInt(account.charAt(index), 10) * weightsAccount[index];
70815
+ }
70816
+ remainder = sum % 11;
70817
+ return controlAccount === (remainder === 0 ? 0 : remainder === 1 ? 1 : 11 - remainder);
70818
+ };
70819
+ var checkMod1110 = function(toCheck, control) {
70820
+ var nr = 10;
70821
+ for (var index = 0; index < toCheck.length; index++) {
70822
+ nr += parseInt(toCheck.charAt(index), 10);
70823
+ if (nr % 10 !== 0) {
70824
+ nr = nr % 10;
70825
+ }
70826
+ nr = nr * 2;
70827
+ nr = nr % 11;
70828
+ }
70829
+ return control === (11 - nr === 10 ? 0 : 11 - nr);
70830
+ };
70831
+ var checkCroatianBBAN = function(bban) {
70832
+ var controlBankBranch = parseInt(bban.charAt(6), 10);
70833
+ var controlAccount = parseInt(bban.charAt(16), 10);
70834
+ var bankBranch = bban.substring(0, 6);
70835
+ var account = bban.substring(7, 16);
70836
+ return checkMod1110(bankBranch, controlBankBranch) && checkMod1110(account, controlAccount);
70837
+ };
70838
+ var checkCzechAndSlovakBBAN = function(bban) {
70839
+ var weightsPrefix = [10, 5, 8, 4, 2, 1];
70840
+ var weightsSuffix = [6, 3, 7, 9, 10, 5, 8, 4, 2, 1];
70841
+ var controlPrefix = parseInt(bban.charAt(9), 10);
70842
+ var controlSuffix = parseInt(bban.charAt(19), 10);
70843
+ var prefix = bban.substring(4, 9);
70844
+ var suffix = bban.substring(10, 19);
70845
+ var sum = 0;
70846
+ for (var index = 0; index < prefix.length; index++) {
70847
+ sum += parseInt(prefix.charAt(index), 10) * weightsPrefix[index];
70848
+ }
70849
+ var remainder = sum % 11;
70850
+ if (controlPrefix !== (remainder === 0 ? 0 : remainder === 1 ? 1 : 11 - remainder)) {
70851
+ return false;
70852
+ }
70853
+ sum = 0;
70854
+ for (var index = 0; index < suffix.length; index++) {
70855
+ sum += parseInt(suffix.charAt(index), 10) * weightsSuffix[index];
70856
+ }
70857
+ remainder = sum % 11;
70858
+ return controlSuffix === (remainder === 0 ? 0 : remainder === 1 ? 1 : 11 - remainder);
70859
+ };
70860
+ var checkEstonianBBAN = function(bban) {
70861
+ var weights = [7, 1, 3, 7, 1, 3, 7, 1, 3, 7, 1, 3, 7];
70862
+ var controlDigit = parseInt(bban.charAt(15), 10);
70863
+ var toCheck = bban.substring(2, 15);
70864
+ var sum = 0;
70865
+ for (var index = 0; index < toCheck.length; index++) {
70866
+ sum += parseInt(toCheck.charAt(index), 10) * weights[index];
70867
+ }
70868
+ var remainder = sum % 10;
70869
+ return controlDigit === (remainder === 0 ? 0 : 10 - remainder);
70870
+ };
70871
+ var checkFrenchBBAN = function(bban) {
70872
+ var stripped = bban.replace(/[\s.]+/g, "");
70873
+ var normalized = Array.from(stripped);
70874
+ for (var index = 0; index < stripped.length; index++) {
70875
+ var c7 = normalized[index].charCodeAt(0);
70876
+ if (c7 >= 65) {
70877
+ switch (c7) {
70878
+ case 65:
70879
+ case 74:
70880
+ normalized[index] = "1";
70881
+ break;
70882
+ case 66:
70883
+ case 75:
70884
+ case 83:
70885
+ normalized[index] = "2";
70886
+ break;
70887
+ case 67:
70888
+ case 76:
70889
+ case 84:
70890
+ normalized[index] = "3";
70891
+ break;
70892
+ case 68:
70893
+ case 77:
70894
+ case 85:
70895
+ normalized[index] = "4";
70896
+ break;
70897
+ case 69:
70898
+ case 78:
70899
+ case 86:
70900
+ normalized[index] = "5";
70901
+ break;
70902
+ case 70:
70903
+ case 79:
70904
+ case 87:
70905
+ normalized[index] = "6";
70906
+ break;
70907
+ case 71:
70908
+ case 80:
70909
+ case 88:
70910
+ normalized[index] = "7";
70911
+ break;
70912
+ case 72:
70913
+ case 81:
70914
+ case 89:
70915
+ normalized[index] = "8";
70916
+ break;
70917
+ case 73:
70918
+ case 82:
70919
+ case 90:
70920
+ normalized[index] = "9";
70921
+ break;
70922
+ }
70923
+ }
70924
+ }
70925
+ var remainder = mod9710(normalized.join(""));
70926
+ return remainder === 0;
70927
+ };
70928
+ var checkHungarianBBAN = function(bban) {
70929
+ var weights = [9, 7, 3, 1, 9, 7, 3, 1, 9, 7, 3, 1, 9, 7, 3];
70930
+ var controlDigitBankBranch = parseInt(bban.charAt(7), 10);
70931
+ var toCheckBankBranch = bban.substring(0, 7);
70932
+ var sum = 0;
70933
+ for (var index = 0; index < toCheckBankBranch.length; index++) {
70934
+ sum += parseInt(toCheckBankBranch.charAt(index), 10) * weights[index];
70935
+ }
70936
+ var remainder = sum % 10;
70937
+ if (controlDigitBankBranch !== (remainder === 0 ? 0 : 10 - remainder)) {
70938
+ return false;
70939
+ }
70940
+ sum = 0;
70941
+ if (bban.endsWith("00000000")) {
70942
+ var toCheckAccount = bban.substring(8, 15);
70943
+ var controlDigitAccount = parseInt(bban.charAt(15), 10);
70944
+ for (var index = 0; index < toCheckAccount.length; index++) {
70945
+ sum += parseInt(toCheckAccount.charAt(index), 10) * weights[index];
70946
+ }
70947
+ var remainder_1 = sum % 10;
70948
+ return controlDigitAccount === (remainder_1 === 0 ? 0 : 10 - remainder_1);
70949
+ } else {
70950
+ var toCheckAccount = bban.substring(8, 23);
70951
+ var controlDigitAccount = parseInt(bban.charAt(23), 10);
70952
+ for (var index = 0; index < toCheckAccount.length; index++) {
70953
+ sum += parseInt(toCheckAccount.charAt(index), 10) * weights[index];
70954
+ }
70955
+ var remainder_2 = sum % 10;
70956
+ return controlDigitAccount === (remainder_2 === 0 ? 0 : 10 - remainder_2);
70957
+ }
70958
+ };
70959
+ var countrySpecs = {
70960
+ AD: {
70961
+ chars: 24,
70962
+ bban_regexp: "^[0-9]{8}[A-Z0-9]{12}$",
70963
+ IBANRegistry: true,
70964
+ SEPA: true
70965
+ },
70966
+ AE: {
70967
+ chars: 23,
70968
+ bban_regexp: "^[0-9]{3}[0-9]{16}$",
70969
+ IBANRegistry: true
70970
+ },
70971
+ AF: {},
70972
+ AG: {},
70973
+ AI: {},
70974
+ AL: {
70975
+ chars: 28,
70976
+ bban_regexp: "^[0-9]{8}[A-Z0-9]{16}$",
70977
+ IBANRegistry: true
70978
+ },
70979
+ AM: {},
70980
+ AO: {
70981
+ chars: 25,
70982
+ bban_regexp: "^[0-9]{21}$"
70983
+ },
70984
+ AQ: {},
70985
+ AR: {},
70986
+ AS: {},
70987
+ AT: { chars: 20, bban_regexp: "^[0-9]{16}$", IBANRegistry: true, SEPA: true },
70988
+ AU: {},
70989
+ AW: {},
70990
+ AX: {
70991
+ chars: 18,
70992
+ bban_regexp: "^[0-9]{14}$",
70993
+ IBANRegistry: true
70994
+ },
70995
+ AZ: {
70996
+ chars: 28,
70997
+ bban_regexp: "^[A-Z]{4}[A-Z0-9]{20}$",
70998
+ IBANRegistry: true
70999
+ },
71000
+ BA: {
71001
+ chars: 20,
71002
+ bban_regexp: "^[0-9]{16}$",
71003
+ bban_validation_func: checkMod9710BBAN,
71004
+ IBANRegistry: true
71005
+ },
71006
+ BB: {},
71007
+ BD: {},
71008
+ BE: { chars: 16, bban_regexp: "^[0-9]{12}$", bban_validation_func: checkBelgianBBAN, IBANRegistry: true, SEPA: true },
71009
+ BF: {
71010
+ chars: 28,
71011
+ bban_regexp: "^[A-Z0-9]{2}[0-9]{22}$"
71012
+ },
71013
+ BG: {
71014
+ chars: 22,
71015
+ bban_regexp: "^[A-Z]{4}[0-9]{6}[A-Z0-9]{8}$",
71016
+ IBANRegistry: true,
71017
+ SEPA: true
71018
+ },
71019
+ BH: {
71020
+ chars: 22,
71021
+ bban_regexp: "^[A-Z]{4}[A-Z0-9]{14}$",
71022
+ IBANRegistry: true
71023
+ },
71024
+ BI: {
71025
+ chars: 27,
71026
+ bban_regexp: "^[0-9]{23}$"
71027
+ },
71028
+ BJ: {
71029
+ chars: 28,
71030
+ bban_regexp: "^[A-Z0-9]{2}[0-9]{22}$"
71031
+ },
71032
+ BL: {
71033
+ chars: 27,
71034
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71035
+ IBANRegistry: true
71036
+ },
71037
+ BM: {},
71038
+ BN: {},
71039
+ BO: {},
71040
+ BQ: {},
71041
+ BR: {
71042
+ chars: 29,
71043
+ bban_regexp: "^[0-9]{23}[A-Z]{1}[A-Z0-9]{1}$",
71044
+ IBANRegistry: true
71045
+ },
71046
+ BS: {},
71047
+ BT: {},
71048
+ BV: {},
71049
+ BW: {},
71050
+ BY: {
71051
+ chars: 28,
71052
+ bban_regexp: "^[A-Z]{4}[0-9]{4}[A-Z0-9]{16}$",
71053
+ IBANRegistry: true
71054
+ },
71055
+ BZ: {},
71056
+ CA: {},
71057
+ CC: {},
71058
+ CD: {},
71059
+ CF: {
71060
+ chars: 27,
71061
+ bban_regexp: "^[0-9]{23}$"
71062
+ },
71063
+ CG: {
71064
+ chars: 27,
71065
+ bban_regexp: "^[0-9]{23}$"
71066
+ },
71067
+ CH: {
71068
+ chars: 21,
71069
+ bban_regexp: "^[0-9]{5}[A-Z0-9]{12}$",
71070
+ IBANRegistry: true,
71071
+ SEPA: true
71072
+ },
71073
+ CI: {
71074
+ chars: 28,
71075
+ bban_regexp: "^[A-Z]{1}[0-9]{23}$"
71076
+ },
71077
+ CK: {},
71078
+ CL: {},
71079
+ CM: {
71080
+ chars: 27,
71081
+ bban_regexp: "^[0-9]{23}$"
71082
+ },
71083
+ CN: {},
71084
+ CO: {},
71085
+ CR: {
71086
+ chars: 22,
71087
+ bban_regexp: "^[0-9]{18}$",
71088
+ IBANRegistry: true
71089
+ },
71090
+ CU: {},
71091
+ CV: { chars: 25, bban_regexp: "^[0-9]{21}$" },
71092
+ CW: {},
71093
+ CX: {},
71094
+ CY: {
71095
+ chars: 28,
71096
+ bban_regexp: "^[0-9]{8}[A-Z0-9]{16}$",
71097
+ IBANRegistry: true,
71098
+ SEPA: true
71099
+ },
71100
+ CZ: {
71101
+ chars: 24,
71102
+ bban_regexp: "^[0-9]{20}$",
71103
+ bban_validation_func: checkCzechAndSlovakBBAN,
71104
+ IBANRegistry: true,
71105
+ SEPA: true
71106
+ },
71107
+ DE: { chars: 22, bban_regexp: "^[0-9]{18}$", IBANRegistry: true, SEPA: true },
71108
+ DJ: {
71109
+ chars: 27,
71110
+ bban_regexp: "^[0-9]{23}$"
71111
+ },
71112
+ DK: { chars: 18, bban_regexp: "^[0-9]{14}$", IBANRegistry: true, SEPA: true },
71113
+ DM: {},
71114
+ DO: {
71115
+ chars: 28,
71116
+ bban_regexp: "^[A-Z]{4}[0-9]{20}$",
71117
+ IBANRegistry: true
71118
+ },
71119
+ DZ: {
71120
+ chars: 26,
71121
+ bban_regexp: "^[0-9]{22}$"
71122
+ },
71123
+ EC: {},
71124
+ EE: {
71125
+ chars: 20,
71126
+ bban_regexp: "^[0-9]{16}$",
71127
+ bban_validation_func: checkEstonianBBAN,
71128
+ IBANRegistry: true,
71129
+ SEPA: true
71130
+ },
71131
+ EG: { chars: 29, bban_regexp: "^[0-9]{25}", IBANRegistry: true },
71132
+ EH: {},
71133
+ ER: {},
71134
+ ES: {
71135
+ chars: 24,
71136
+ bban_validation_func: checkSpainBBAN,
71137
+ bban_regexp: "^[0-9]{20}$",
71138
+ IBANRegistry: true,
71139
+ SEPA: true
71140
+ },
71141
+ ET: {},
71142
+ FI: {
71143
+ chars: 18,
71144
+ bban_regexp: "^[0-9]{14}$",
71145
+ IBANRegistry: true,
71146
+ SEPA: true
71147
+ },
71148
+ FJ: {},
71149
+ FK: {
71150
+ chars: 18,
71151
+ bban_regexp: "^[A-Z]{2}[0-9]{12}$"
71152
+ },
71153
+ FM: {},
71154
+ FO: { chars: 18, bban_regexp: "^[0-9]{14}$", IBANRegistry: true },
71155
+ FR: {
71156
+ chars: 27,
71157
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71158
+ bban_validation_func: checkFrenchBBAN,
71159
+ IBANRegistry: true,
71160
+ SEPA: true
71161
+ },
71162
+ GA: {
71163
+ chars: 27,
71164
+ bban_regexp: "^[0-9]{23}$"
71165
+ },
71166
+ GB: {
71167
+ chars: 22,
71168
+ bban_regexp: "^[A-Z]{4}[0-9]{14}$",
71169
+ IBANRegistry: true,
71170
+ SEPA: true
71171
+ },
71172
+ GD: {},
71173
+ GE: {
71174
+ chars: 22,
71175
+ bban_regexp: "^[A-Z0-9]{2}[0-9]{16}$",
71176
+ IBANRegistry: true
71177
+ },
71178
+ GF: {
71179
+ chars: 27,
71180
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71181
+ IBANRegistry: true
71182
+ },
71183
+ GG: {},
71184
+ GH: {},
71185
+ GI: {
71186
+ chars: 23,
71187
+ bban_regexp: "^[A-Z]{4}[A-Z0-9]{15}$",
71188
+ IBANRegistry: true,
71189
+ SEPA: true
71190
+ },
71191
+ GL: { chars: 18, bban_regexp: "^[0-9]{14}$", IBANRegistry: true },
71192
+ GM: {},
71193
+ GN: {},
71194
+ GP: {
71195
+ chars: 27,
71196
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71197
+ IBANRegistry: true
71198
+ },
71199
+ GQ: {
71200
+ chars: 27,
71201
+ bban_regexp: "^[0-9]{23}$"
71202
+ },
71203
+ GR: {
71204
+ chars: 27,
71205
+ bban_regexp: "^[0-9]{7}[A-Z0-9]{16}$",
71206
+ IBANRegistry: true,
71207
+ SEPA: true
71208
+ },
71209
+ GS: {},
71210
+ GT: {
71211
+ chars: 28,
71212
+ bban_regexp: "^[A-Z0-9]{24}$",
71213
+ IBANRegistry: true
71214
+ },
71215
+ GU: {},
71216
+ GW: {
71217
+ chars: 25,
71218
+ bban_regexp: "^[A-Z]{2}[0-9]{19}$"
71219
+ },
71220
+ GY: {},
71221
+ HK: {},
71222
+ HM: {},
71223
+ HN: {
71224
+ chars: 28,
71225
+ bban_regexp: "^[A-Z]{4}[0-9]{20}$"
71226
+ },
71227
+ HR: {
71228
+ chars: 21,
71229
+ bban_regexp: "^[0-9]{17}$",
71230
+ bban_validation_func: checkCroatianBBAN,
71231
+ IBANRegistry: true,
71232
+ SEPA: true
71233
+ },
71234
+ HT: {},
71235
+ HU: {
71236
+ chars: 28,
71237
+ bban_regexp: "^[0-9]{24}$",
71238
+ bban_validation_func: checkHungarianBBAN,
71239
+ IBANRegistry: true,
71240
+ SEPA: true
71241
+ },
71242
+ ID: {},
71243
+ IE: {
71244
+ chars: 22,
71245
+ bban_regexp: "^[A-Z0-9]{4}[0-9]{14}$",
71246
+ IBANRegistry: true,
71247
+ SEPA: true
71248
+ },
71249
+ IL: {
71250
+ chars: 23,
71251
+ bban_regexp: "^[0-9]{19}$",
71252
+ IBANRegistry: true
71253
+ },
71254
+ IM: {},
71255
+ IN: {},
71256
+ IO: {},
71257
+ IQ: {
71258
+ chars: 23,
71259
+ bban_regexp: "^[A-Z]{4}[0-9]{15}$",
71260
+ IBANRegistry: true
71261
+ },
71262
+ IR: {
71263
+ chars: 26,
71264
+ bban_regexp: "^[0-9]{22}$"
71265
+ },
71266
+ IS: { chars: 26, bban_regexp: "^[0-9]{22}$", IBANRegistry: true, SEPA: true },
71267
+ IT: {
71268
+ chars: 27,
71269
+ bban_regexp: "^[A-Z]{1}[0-9]{10}[A-Z0-9]{12}$",
71270
+ IBANRegistry: true,
71271
+ SEPA: true
71272
+ },
71273
+ JE: {},
71274
+ JM: {},
71275
+ JO: {
71276
+ chars: 30,
71277
+ bban_regexp: "^[A-Z]{4}[0-9]{4}[A-Z0-9]{18}$",
71278
+ IBANRegistry: true
71279
+ },
71280
+ JP: {},
71281
+ KE: {},
71282
+ KG: {},
71283
+ KH: {},
71284
+ KI: {},
71285
+ KM: {
71286
+ chars: 27,
71287
+ bban_regexp: "^[0-9]{23}$"
71288
+ },
71289
+ KN: {},
71290
+ KP: {},
71291
+ KR: {},
71292
+ KW: {
71293
+ chars: 30,
71294
+ bban_regexp: "^[A-Z]{4}[A-Z0-9]{22}$",
71295
+ IBANRegistry: true
71296
+ },
71297
+ KY: {},
71298
+ KZ: {
71299
+ chars: 20,
71300
+ bban_regexp: "^[0-9]{3}[A-Z0-9]{13}$",
71301
+ IBANRegistry: true
71302
+ },
71303
+ LA: {},
71304
+ LB: {
71305
+ chars: 28,
71306
+ bban_regexp: "^[0-9]{4}[A-Z0-9]{20}$",
71307
+ IBANRegistry: true
71308
+ },
71309
+ LC: {
71310
+ chars: 32,
71311
+ bban_regexp: "^[A-Z]{4}[A-Z0-9]{24}$",
71312
+ IBANRegistry: true
71313
+ },
71314
+ LI: {
71315
+ chars: 21,
71316
+ bban_regexp: "^[0-9]{5}[A-Z0-9]{12}$",
71317
+ IBANRegistry: true,
71318
+ SEPA: true
71319
+ },
71320
+ LK: {},
71321
+ LR: {},
71322
+ LS: {},
71323
+ LT: { chars: 20, bban_regexp: "^[0-9]{16}$", IBANRegistry: true, SEPA: true },
71324
+ LU: {
71325
+ chars: 20,
71326
+ bban_regexp: "^[0-9]{3}[A-Z0-9]{13}$",
71327
+ IBANRegistry: true,
71328
+ SEPA: true
71329
+ },
71330
+ LV: {
71331
+ chars: 21,
71332
+ bban_regexp: "^[A-Z]{4}[A-Z0-9]{13}$",
71333
+ IBANRegistry: true,
71334
+ SEPA: true
71335
+ },
71336
+ LY: {
71337
+ chars: 25,
71338
+ bban_regexp: "^[0-9]{21}$",
71339
+ IBANRegistry: true
71340
+ },
71341
+ MA: {
71342
+ chars: 28,
71343
+ bban_regexp: "^[0-9]{24}$"
71344
+ },
71345
+ MC: {
71346
+ chars: 27,
71347
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71348
+ bban_validation_func: checkFrenchBBAN,
71349
+ IBANRegistry: true,
71350
+ SEPA: true
71351
+ },
71352
+ MD: {
71353
+ chars: 24,
71354
+ bban_regexp: "^[A-Z0-9]{2}[A-Z0-9]{18}$",
71355
+ IBANRegistry: true
71356
+ },
71357
+ ME: {
71358
+ chars: 22,
71359
+ bban_regexp: "^[0-9]{18}$",
71360
+ bban_validation_func: checkMod9710BBAN,
71361
+ IBANRegistry: true
71362
+ },
71363
+ MF: {
71364
+ chars: 27,
71365
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71366
+ IBANRegistry: true
71367
+ },
71368
+ MG: {
71369
+ chars: 27,
71370
+ bban_regexp: "^[0-9]{23}$"
71371
+ },
71372
+ MH: {},
71373
+ MK: {
71374
+ chars: 19,
71375
+ bban_regexp: "^[0-9]{3}[A-Z0-9]{10}[0-9]{2}$",
71376
+ bban_validation_func: checkMod9710BBAN,
71377
+ IBANRegistry: true
71378
+ },
71379
+ ML: {
71380
+ chars: 28,
71381
+ bban_regexp: "^[A-Z0-9]{2}[0-9]{22}$"
71382
+ },
71383
+ MM: {},
71384
+ MN: {
71385
+ chars: 20,
71386
+ bban_regexp: "^[0-9]{16}$"
71387
+ },
71388
+ MO: {},
71389
+ MP: {},
71390
+ MQ: {
71391
+ chars: 27,
71392
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71393
+ IBANRegistry: true
71394
+ },
71395
+ MR: {
71396
+ chars: 27,
71397
+ bban_regexp: "^[0-9]{23}$",
71398
+ IBANRegistry: true
71399
+ },
71400
+ MS: {},
71401
+ MT: {
71402
+ chars: 31,
71403
+ bban_regexp: "^[A-Z]{4}[0-9]{5}[A-Z0-9]{18}$",
71404
+ IBANRegistry: true,
71405
+ SEPA: true
71406
+ },
71407
+ MU: {
71408
+ chars: 30,
71409
+ bban_regexp: "^[A-Z]{4}[0-9]{19}[A-Z]{3}$",
71410
+ IBANRegistry: true
71411
+ },
71412
+ MV: {},
71413
+ MW: {},
71414
+ MX: {},
71415
+ MY: {},
71416
+ MZ: {
71417
+ chars: 25,
71418
+ bban_regexp: "^[0-9]{21}$"
71419
+ },
71420
+ NA: {},
71421
+ NC: {
71422
+ chars: 27,
71423
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71424
+ IBANRegistry: true
71425
+ },
71426
+ NE: {
71427
+ chars: 28,
71428
+ bban_regexp: "^[A-Z]{2}[0-9]{22}$"
71429
+ },
71430
+ NF: {},
71431
+ NG: {},
71432
+ NI: {
71433
+ chars: 28,
71434
+ bban_regexp: "^[A-Z]{4}[0-9]{20}$"
71435
+ },
71436
+ NL: {
71437
+ chars: 18,
71438
+ bban_regexp: "^[A-Z]{4}[0-9]{10}$",
71439
+ IBANRegistry: true,
71440
+ SEPA: true
71441
+ },
71442
+ NO: {
71443
+ chars: 15,
71444
+ bban_regexp: "^[0-9]{11}$",
71445
+ bban_validation_func: checkNorwayBBAN,
71446
+ IBANRegistry: true,
71447
+ SEPA: true
71448
+ },
71449
+ NP: {},
71450
+ NR: {},
71451
+ NU: {},
71452
+ NZ: {},
71453
+ OM: {},
71454
+ PA: {},
71455
+ PE: {},
71456
+ PF: {
71457
+ chars: 27,
71458
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71459
+ IBANRegistry: true
71460
+ },
71461
+ PG: {},
71462
+ PH: {},
71463
+ PK: {
71464
+ chars: 24,
71465
+ bban_regexp: "^[A-Z0-9]{4}[0-9]{16}$",
71466
+ IBANRegistry: true
71467
+ },
71468
+ PL: { chars: 28, bban_validation_func: checkPolandBBAN, bban_regexp: "^[0-9]{24}$", IBANRegistry: true, SEPA: true },
71469
+ PM: {
71470
+ chars: 27,
71471
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71472
+ IBANRegistry: true
71473
+ },
71474
+ PN: {},
71475
+ PR: {},
71476
+ PS: {
71477
+ chars: 29,
71478
+ bban_regexp: "^[A-Z0-9]{4}[0-9]{21}$",
71479
+ IBANRegistry: true
71480
+ },
71481
+ PT: { chars: 25, bban_regexp: "^[0-9]{21}$", bban_validation_func: checkMod9710BBAN, IBANRegistry: true, SEPA: true },
71482
+ PW: {},
71483
+ PY: {},
71484
+ QA: {
71485
+ chars: 29,
71486
+ bban_regexp: "^[A-Z]{4}[A-Z0-9]{21}$",
71487
+ IBANRegistry: true
71488
+ },
71489
+ RE: {
71490
+ chars: 27,
71491
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71492
+ IBANRegistry: true
71493
+ },
71494
+ RO: {
71495
+ chars: 24,
71496
+ bban_regexp: "^[A-Z]{4}[A-Z0-9]{16}$",
71497
+ IBANRegistry: true,
71498
+ SEPA: true
71499
+ },
71500
+ RS: {
71501
+ chars: 22,
71502
+ bban_regexp: "^[0-9]{18}$",
71503
+ bban_validation_func: checkMod9710BBAN,
71504
+ IBANRegistry: true
71505
+ },
71506
+ RU: {
71507
+ chars: 33,
71508
+ bban_regexp: "^[0-9]{14}[A-Z0-9]{15}$",
71509
+ IBANRegistry: true
71510
+ },
71511
+ RW: {},
71512
+ SA: {
71513
+ chars: 24,
71514
+ bban_regexp: "^[0-9]{2}[A-Z0-9]{18}$",
71515
+ IBANRegistry: true
71516
+ },
71517
+ SB: {},
71518
+ SC: {
71519
+ chars: 31,
71520
+ bban_regexp: "^[A-Z]{4}[0-9]{20}[A-Z]{3}$",
71521
+ IBANRegistry: true
71522
+ },
71523
+ SD: {
71524
+ chars: 18,
71525
+ bban_regexp: "^[0-9]{14}$",
71526
+ IBANRegistry: true
71527
+ },
71528
+ SE: { chars: 24, bban_regexp: "^[0-9]{20}$", IBANRegistry: true, SEPA: true },
71529
+ SG: {},
71530
+ SH: {},
71531
+ SI: {
71532
+ chars: 19,
71533
+ bban_regexp: "^[0-9]{15}$",
71534
+ bban_validation_func: checkMod9710BBAN,
71535
+ IBANRegistry: true,
71536
+ SEPA: true
71537
+ },
71538
+ SJ: {},
71539
+ SK: {
71540
+ chars: 24,
71541
+ bban_regexp: "^[0-9]{20}$",
71542
+ bban_validation_func: checkCzechAndSlovakBBAN,
71543
+ IBANRegistry: true,
71544
+ SEPA: true
71545
+ },
71546
+ SL: {},
71547
+ SM: {
71548
+ chars: 27,
71549
+ bban_regexp: "^[A-Z]{1}[0-9]{10}[A-Z0-9]{12}$",
71550
+ IBANRegistry: true,
71551
+ SEPA: true
71552
+ },
71553
+ SN: {
71554
+ chars: 28,
71555
+ bban_regexp: "^[A-Z]{2}[0-9]{22}$"
71556
+ },
71557
+ SO: {
71558
+ chars: 23,
71559
+ bban_regexp: "^[0-9]{19}$",
71560
+ IBANRegistry: true
71561
+ },
71562
+ SR: {},
71563
+ SS: {},
71564
+ ST: {
71565
+ chars: 25,
71566
+ bban_regexp: "^[0-9]{21}$",
71567
+ IBANRegistry: true
71568
+ },
71569
+ SV: {
71570
+ chars: 28,
71571
+ bban_regexp: "^[A-Z]{4}[0-9]{20}$",
71572
+ IBANRegistry: true
71573
+ },
71574
+ SX: {},
71575
+ SY: {},
71576
+ SZ: {},
71577
+ TC: {},
71578
+ TD: {
71579
+ chars: 27,
71580
+ bban_regexp: "^[0-9]{23}$"
71581
+ },
71582
+ TF: {
71583
+ chars: 27,
71584
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71585
+ IBANRegistry: true
71586
+ },
71587
+ TG: {
71588
+ chars: 28,
71589
+ bban_regexp: "^[A-Z]{2}[0-9]{22}$"
71590
+ },
71591
+ TH: {},
71592
+ TJ: {},
71593
+ TK: {},
71594
+ TL: {
71595
+ chars: 23,
71596
+ bban_regexp: "^[0-9]{19}$",
71597
+ IBANRegistry: true
71598
+ },
71599
+ TM: {},
71600
+ TN: {
71601
+ chars: 24,
71602
+ bban_regexp: "^[0-9]{20}$",
71603
+ IBANRegistry: true
71604
+ },
71605
+ TO: {},
71606
+ TR: {
71607
+ chars: 26,
71608
+ bban_regexp: "^[0-9]{5}[A-Z0-9]{17}$",
71609
+ IBANRegistry: true
71610
+ },
71611
+ TT: {},
71612
+ TV: {},
71613
+ TW: {},
71614
+ TZ: {},
71615
+ UA: {
71616
+ chars: 29,
71617
+ bban_regexp: "^[0-9]{6}[A-Z0-9]{19}$",
71618
+ IBANRegistry: true
71619
+ },
71620
+ UG: {},
71621
+ UM: {},
71622
+ US: {},
71623
+ UY: {},
71624
+ UZ: {},
71625
+ VA: { chars: 22, bban_regexp: "^[0-9]{18}", IBANRegistry: true, SEPA: true },
71626
+ VC: {},
71627
+ VE: {},
71628
+ VG: {
71629
+ chars: 24,
71630
+ bban_regexp: "^[A-Z0-9]{4}[0-9]{16}$",
71631
+ IBANRegistry: true
71632
+ },
71633
+ VI: {},
71634
+ VN: {},
71635
+ VU: {},
71636
+ WF: {
71637
+ chars: 27,
71638
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71639
+ IBANRegistry: true
71640
+ },
71641
+ WS: {},
71642
+ XK: {
71643
+ chars: 20,
71644
+ bban_regexp: "^[0-9]{16}$",
71645
+ IBANRegistry: true
71646
+ },
71647
+ YE: {},
71648
+ YT: {
71649
+ chars: 27,
71650
+ bban_regexp: "^[0-9]{10}[A-Z0-9]{11}[0-9]{2}$",
71651
+ IBANRegistry: true
71652
+ },
71653
+ ZA: {},
71654
+ ZM: {},
71655
+ ZW: {}
71656
+ };
71657
+
71658
+ // ts_web/elements/dees-input-iban.demo.ts
71659
+ var demoFunc7 = () => x`<dees-input-iban .label=${"IBAN"}></dees-input-iban>`;
71660
+
71661
+ // ts_web/elements/dees-input-iban.ts
71662
+ var DeesInputIban = class extends DeesElement {
71663
+ constructor() {
71664
+ super(...arguments);
71665
+ this.enteredString = "";
71666
+ this.enteredIbanIsValid = false;
71667
+ this.disabled = false;
71668
+ this.required = false;
71669
+ this.label = "";
71670
+ this.key = "";
71671
+ this.value = "";
71672
+ this.changeSubject = new dist_ts_exports26.rxjs.Subject();
71673
+ }
71674
+ render() {
71675
+ return x`
71676
+ <style>
71677
+ input[type='text'] {
71678
+ line-height: 20px;
71679
+ padding: 5px;
71680
+ width: 250px;
71681
+ }
71682
+ </style>
71683
+ <dees-input-text
71684
+ .label=${"IBAN"}
71685
+ .value=${this.value}
71686
+ @input=${(eventArg) => {
71687
+ this.validateIban(eventArg);
71688
+ }}
71689
+ ></dees-input-text>
71690
+ `;
71691
+ }
71692
+ async firstUpdated() {
71693
+ const deesInputText = this.shadowRoot.querySelector("dees-input-text");
71694
+ deesInputText.disabled = this.disabled;
71695
+ deesInputText.required = this.required;
71696
+ deesInputText.changeSubject.subscribe((valueArg) => {
71697
+ this.value = valueArg.value;
71698
+ this.changeSubject.next(this);
71699
+ });
71700
+ }
71701
+ async validateIban(eventArg) {
71702
+ const inputElement = eventArg.target;
71703
+ let enteredString = inputElement?.value;
71704
+ enteredString = enteredString || "";
71705
+ if (this.enteredString !== enteredString) {
71706
+ this.enteredString = friendlyFormatIBAN(enteredString) || "";
71707
+ if (inputElement) {
71708
+ inputElement.value = this.enteredString;
71709
+ this.value = this.enteredString;
71710
+ this.changeSubject.next(this);
71711
+ }
71712
+ }
71713
+ this.enteredIbanIsValid = isValidIBAN(this.enteredString.replace(/ /g, ""));
71714
+ const deesInputText = this.shadowRoot.querySelector("dees-input-text");
71715
+ deesInputText.validationText = `IBAN is valid: ${this.enteredIbanIsValid}`;
71716
+ }
71717
+ };
71718
+ // STATIC
71719
+ DeesInputIban.demo = demoFunc7;
71720
+ __decorateClass([
71721
+ t4()
71722
+ ], DeesInputIban.prototype, "enteredString", 2);
71723
+ __decorateClass([
71724
+ t4()
71725
+ ], DeesInputIban.prototype, "enteredIbanIsValid", 2);
71726
+ __decorateClass([
71727
+ n5({
71728
+ type: Boolean
71729
+ })
71730
+ ], DeesInputIban.prototype, "disabled", 2);
71731
+ __decorateClass([
71732
+ n5({
71733
+ type: Boolean
71734
+ })
71735
+ ], DeesInputIban.prototype, "required", 2);
71736
+ __decorateClass([
71737
+ n5({
71738
+ type: String
71739
+ })
71740
+ ], DeesInputIban.prototype, "label", 2);
71741
+ __decorateClass([
71742
+ n5({
71743
+ type: String
71744
+ })
71745
+ ], DeesInputIban.prototype, "key", 2);
71746
+ __decorateClass([
71747
+ n5({
71748
+ type: String
71749
+ })
71750
+ ], DeesInputIban.prototype, "value", 2);
71751
+ DeesInputIban = __decorateClass([
71752
+ e7("dees-input-iban")
71753
+ ], DeesInputIban);
71754
+
70559
71755
  // ts_web/elements/dees-form.ts
70560
71756
  var FORM_INPUT_TYPES = [
70561
71757
  DeesInputCheckbox,
71758
+ DeesInputIban,
70562
71759
  DeesInputText,
70563
71760
  DeesInputQuantitySelector,
70564
71761
  DeesInputRadio,
@@ -70704,22 +71901,7 @@ var DeesForm = class extends DeesElement {
70704
71901
  });
70705
71902
  }
70706
71903
  };
70707
- DeesForm.demo = () => x`
70708
- <dees-form
70709
- style="display: block; margin:auto; max-width: 500px; padding: 20px"
70710
- @formData=${async (eventArg) => {
70711
- const form = eventArg.currentTarget;
70712
- form.setStatus("pending", "authenticating...");
70713
- await plugins.smartdelay.delayFor(1e3);
70714
- form.setStatus("success", "authenticated!");
70715
- }}
70716
- >
70717
- <dees-input-text .required="${true}" key="hello1" label="a text"></dees-input-text>
70718
- <dees-input-text .required="${true}" key="hello2" label="also a text"></dees-input-text>
70719
- <dees-input-checkbox .required="${true}" key="hello3" label="another text"></dees-input-checkbox>
70720
- <dees-form-submit>Submit</dees-form-submit>
70721
- </dees-form>
70722
- `;
71904
+ DeesForm.demo = demoFunc6;
70723
71905
  DeesForm = __decorateClass([
70724
71906
  e7("dees-form")
70725
71907
  ], DeesForm);
@@ -70780,7 +71962,7 @@ DeesFormSubmit = __decorateClass([
70780
71962
  ], DeesFormSubmit);
70781
71963
 
70782
71964
  // ts_web/elements/dees-hint.demo.ts
70783
- var demoFunc6 = () => x`
71965
+ var demoFunc8 = () => x`
70784
71966
  <dees-hint></dees-hint>
70785
71967
  `;
70786
71968
 
@@ -70795,7 +71977,7 @@ var DeesHint = class extends DeesElement {
70795
71977
  return x` <div class="mainbox"></div> `;
70796
71978
  }
70797
71979
  };
70798
- DeesHint.demo = demoFunc6;
71980
+ DeesHint.demo = demoFunc8;
70799
71981
  DeesHint.styles = [cssManager.defaultStyles, i``];
70800
71982
  __decorateClass([
70801
71983
  n5({ type: String })
@@ -71195,13 +72377,13 @@ var meaninglessTransform = {
71195
72377
  flipX: false,
71196
72378
  flipY: false
71197
72379
  };
71198
- function insertCss(css3) {
71199
- if (!css3 || !IS_DOM) {
72380
+ function insertCss(css4) {
72381
+ if (!css4 || !IS_DOM) {
71200
72382
  return;
71201
72383
  }
71202
72384
  var style = DOCUMENT.createElement("style");
71203
72385
  style.setAttribute("type", "text/css");
71204
- style.innerHTML = css3;
72386
+ style.innerHTML = css4;
71205
72387
  var headChildren = DOCUMENT.head.childNodes;
71206
72388
  var beforeChild = null;
71207
72389
  for (var i8 = headChildren.length - 1; i8 > -1; i8--) {
@@ -71212,7 +72394,7 @@ function insertCss(css3) {
71212
72394
  }
71213
72395
  }
71214
72396
  DOCUMENT.head.insertBefore(style, beforeChild);
71215
- return css3;
72397
+ return css4;
71216
72398
  }
71217
72399
  var idPool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
71218
72400
  function nextUniqueId() {
@@ -73539,7 +74721,7 @@ var faFileInvoice = {
73539
74721
  };
73540
74722
 
73541
74723
  // ts_web/elements/dees-icon.demo.ts
73542
- var demoFunc7 = () => x`
74724
+ var demoFunc9 = () => x`
73543
74725
  <style>
73544
74726
  .demoContainer {
73545
74727
 
@@ -73673,7 +74855,7 @@ var DeesIcon = class extends DeesElement {
73673
74855
  }
73674
74856
  }
73675
74857
  };
73676
- DeesIcon.demo = demoFunc7;
74858
+ DeesIcon.demo = demoFunc9;
73677
74859
  DeesIcon.styles = [
73678
74860
  cssManager.defaultStyles,
73679
74861
  i`
@@ -73882,7 +75064,7 @@ var DeesInputFileupload = class extends DeesElement {
73882
75064
  constructor() {
73883
75065
  super();
73884
75066
  // INSTANCE
73885
- this.changeSubject = new smartrx_plugins_rxjs_exports.Subject();
75067
+ this.changeSubject = new dist_ts_exports26.rxjs.Subject();
73886
75068
  this.label = null;
73887
75069
  this.value = [];
73888
75070
  this.state = "idle";
@@ -74068,6 +75250,22 @@ DeesInputFileupload = __decorateClass([
74068
75250
  e7("dees-input-fileupload")
74069
75251
  ], DeesInputFileupload);
74070
75252
 
75253
+ // ts_web/elements/dees-input-phone.demo.ts
75254
+ var demoFunc10 = () => x`<dees-input-phone .label=${"Phone Number"}></dees-input-phone>`;
75255
+
75256
+ // ts_web/elements/dees-input-phone.ts
75257
+ var DeesInputPhone = class extends DeesElement {
75258
+ // INSTANCE
75259
+ render() {
75260
+ return x`<div>Phone Input</div>`;
75261
+ }
75262
+ };
75263
+ // STATIC
75264
+ DeesInputPhone.demo = demoFunc10;
75265
+ DeesInputPhone = __decorateClass([
75266
+ e7("dees-input-phone")
75267
+ ], DeesInputPhone);
75268
+
74071
75269
  // ts_web/elements/dees-mobilenavigation.ts
74072
75270
  var DeesMobilenavigation = class extends DeesElement {
74073
75271
  constructor() {
@@ -74230,7 +75428,7 @@ DeesMobilenavigation = __decorateClass([
74230
75428
  ], DeesMobilenavigation);
74231
75429
 
74232
75430
  // ts_web/elements/dees-modal.demo.ts
74233
- var demoFunc8 = () => x`
75431
+ var demoFunc11 = () => x`
74234
75432
  <dees-button @click=${() => {
74235
75433
  DeesModal.createAndShow({
74236
75434
  heading: "This is a heading",
@@ -74335,7 +75533,7 @@ var DeesModal = class extends DeesElement {
74335
75533
  }
74336
75534
  };
74337
75535
  // STATIC
74338
- DeesModal.demo = demoFunc8;
75536
+ DeesModal.demo = demoFunc11;
74339
75537
  DeesModal.styles = [
74340
75538
  cssManager.defaultStyles,
74341
75539
  i`
@@ -74518,7 +75716,7 @@ DeesPdf = __decorateClass([
74518
75716
  ], DeesPdf);
74519
75717
 
74520
75718
  // ts_web/elements/dees-simple-appdash.demo.ts
74521
- var demoFunc9 = () => x`
75719
+ var demoFunc12 = () => x`
74522
75720
  <dees-simple-appdash>Hello there</dees-simple-appdash>
74523
75721
  `;
74524
75722
 
@@ -74544,7 +75742,7 @@ var DeesSimpleAppDash = class extends DeesElement {
74544
75742
  }
74545
75743
  };
74546
75744
  // STATIC
74547
- DeesSimpleAppDash.demo = demoFunc9;
75745
+ DeesSimpleAppDash.demo = demoFunc12;
74548
75746
  DeesSimpleAppDash.styles = [
74549
75747
  cssManager.defaultStyles,
74550
75748
  i`
@@ -74581,7 +75779,7 @@ DeesSimpleAppDash = __decorateClass([
74581
75779
  ], DeesSimpleAppDash);
74582
75780
 
74583
75781
  // ts_web/elements/dees-simple-login.demo.ts
74584
- var demoFunc10 = () => x` <dees-simple-login name="someapp"> Hello there </dees-simple-login> `;
75782
+ var demoFunc13 = () => x` <dees-simple-login name="someapp"> Hello there </dees-simple-login> `;
74585
75783
 
74586
75784
  // ts_web/elements/dees-simple-login.ts
74587
75785
  var DeesSimpleLogin = class extends DeesElement {
@@ -74638,7 +75836,7 @@ var DeesSimpleLogin = class extends DeesElement {
74638
75836
  }
74639
75837
  };
74640
75838
  // STATIC
74641
- DeesSimpleLogin.demo = demoFunc10;
75839
+ DeesSimpleLogin.demo = demoFunc13;
74642
75840
  DeesSimpleLogin.styles = [
74643
75841
  cssManager.defaultStyles,
74644
75842
  i`
@@ -75150,7 +76348,7 @@ DeesStepper = __decorateClass([
75150
76348
  ], DeesStepper);
75151
76349
 
75152
76350
  // ts_web/elements/dees-toast.demo.ts
75153
- var demoFunc11 = async () => {
76351
+ var demoFunc14 = async () => {
75154
76352
  return x`<dees-toast></dees-toast>`;
75155
76353
  };
75156
76354
 
@@ -75168,7 +76366,7 @@ var DeesToast = class extends DeesElement {
75168
76366
  `;
75169
76367
  }
75170
76368
  };
75171
- DeesToast.demo = demoFunc11;
76369
+ DeesToast.demo = demoFunc14;
75172
76370
  DeesToast = __decorateClass([
75173
76371
  e7("dees-toast")
75174
76372
  ], DeesToast);
@@ -75473,5 +76671,21 @@ lit-html/directives/async-append.js:
75473
76671
  * Copyright 2017 Google LLC
75474
76672
  * SPDX-License-Identifier: BSD-3-Clause
75475
76673
  *)
76674
+
76675
+ ibantools/jsnext/ibantools.js:
76676
+ (*!
76677
+ * @license
76678
+ * This Source Code Form is subject to the terms of the Mozilla Public
76679
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
76680
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. *)
76681
+ (**
76682
+ * Validation, extraction and creation of IBAN, BBAN, BIC/SWIFT numbers plus some other helpful stuff
76683
+ * @package Documentation
76684
+ * @author Saša Jovanić
76685
+ * @module ibantools
76686
+ * @version 4.3.4
76687
+ * @license MPL-2.0
76688
+ * @preferred
76689
+ *)
75476
76690
  */
75477
76691
  //# sourceMappingURL=bundle.js.map