pixel-react 1.15.13 → 1.15.15
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/README.md +75 -75
- package/lib/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/_virtual/index12.js +2 -2
- package/lib/_virtual/index9.js +2 -2
- package/lib/assets/icons/navigate_to_pages.svg.js +6 -0
- package/lib/assets/icons/navigate_to_pages.svg.js.map +1 -0
- package/lib/assets/icons/spinner.svg.js +1 -1
- package/lib/assets/icons/spinner.svg.js.map +1 -1
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/Accordion.js +5 -3
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/types.d.ts +1 -0
- package/lib/components/Editor/VariableDropdown.js +2 -2
- package/lib/components/Icon/iconList.js +2 -0
- package/lib/components/Icon/iconList.js.map +1 -1
- package/lib/components/InputWithDropdown/InputWithDropdown.js +4 -3
- package/lib/components/InputWithDropdown/InputWithDropdown.js.map +1 -1
- package/lib/index.cjs +9901 -3778
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/node_modules/@date-fns/tz/date/index.js +1 -19
- package/lib/node_modules/@date-fns/tz/date/index.js.map +1 -1
- package/lib/node_modules/@date-fns/tz/date/mini.js +34 -6
- package/lib/node_modules/@date-fns/tz/date/mini.js.map +1 -1
- package/lib/node_modules/@date-fns/tz/tzName/index.js +40 -0
- package/lib/node_modules/@date-fns/tz/tzName/index.js.map +1 -0
- package/lib/node_modules/@date-fns/tz/tzOffset/index.js +6 -5
- package/lib/node_modules/@date-fns/tz/tzOffset/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js +93 -98
- package/lib/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/config/index.js +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/config/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/loader/index.js +15 -13
- package/lib/node_modules/@monaco-editor/loader/lib/es/loader/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/compose.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/curry.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js +1 -0
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/validators/index.js +1 -2
- package/lib/node_modules/@monaco-editor/loader/lib/es/validators/index.js.map +1 -1
- package/lib/node_modules/janus-gateway/npm/dist/janus.es.js +26 -57
- package/lib/node_modules/janus-gateway/npm/dist/janus.es.js.map +1 -1
- package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
- package/lib/node_modules/jsencrypt/lib/JSEncrypt.js +246 -0
- package/lib/node_modules/jsencrypt/lib/JSEncrypt.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +325 -0
- package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/index.js +6 -0
- package/lib/node_modules/jsencrypt/lib/index.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +570 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js +88 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js +66 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js +87 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js +65 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +1700 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +48 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js +77 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +415 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js +307 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js +61 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +1559 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js.map +1 -0
- package/lib/node_modules/libphonenumber-js/es6/AsYouType.js +115 -82
- package/lib/node_modules/libphonenumber-js/es6/AsYouType.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +68 -58
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +36 -23
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +13 -9
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js +226 -187
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js +21 -27
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js +150 -117
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js +57 -38
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/ParseError.js +70 -109
- package/lib/node_modules/libphonenumber-js/es6/ParseError.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js +72 -57
- package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/constants.js +15 -9
- package/lib/node_modules/libphonenumber-js/es6/constants.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/format.js +67 -93
- package/lib/node_modules/libphonenumber-js/es6/format.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/getCountries.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/RFC3966.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +49 -10
- package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +20 -32
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +5 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +25 -18
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +12 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +13 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +21 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +12 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -12
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +59 -35
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +2 -2
- package/lib/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +38 -36
- package/lib/node_modules/libphonenumber-js/es6/helpers/getNumberType.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/isObject.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +14 -10
- package/lib/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +22 -27
- package/lib/node_modules/libphonenumber-js/es6/helpers/parseDigits.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +6 -6
- package/lib/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isPossible.js +6 -7
- package/lib/node_modules/libphonenumber-js/es6/isPossible.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isValid.js +6 -5
- package/lib/node_modules/libphonenumber-js/es6/isValid.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +44 -26
- package/lib/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/metadata.js +120 -69
- package/lib/node_modules/libphonenumber-js/es6/metadata.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/normalizeArguments.js +87 -68
- package/lib/node_modules/libphonenumber-js/es6/normalizeArguments.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parse.js +58 -40
- package/lib/node_modules/libphonenumber-js/es6/parse.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +32 -36
- package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +44 -26
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +46 -28
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/tools/semver-compare.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/metadata.min.json.js +19 -19
- package/lib/node_modules/libphonenumber-js/metadata.min.json.js.map +1 -1
- package/lib/node_modules/prop-types/index.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js +88 -64
- package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/UI.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js +71 -6
- package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Button.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -14
- package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Day.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/DayButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Dropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/DropdownNav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Footer.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Month.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthCaption.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthGrid.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Months.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Nav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Option.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Root.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Select.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Week.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weekday.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weekdays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weeks.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +3 -2
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatDay.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/index.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getComponents.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDates.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js +4 -4
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonths.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +2 -2
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +9 -11
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/index.js +2 -2
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +3 -2
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useMulti.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useRange.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useSingle.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useDayPicker.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useFocus.js +6 -0
- package/lib/node_modules/react-day-picker/dist/esm/useFocus.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useSelection.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js +6 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/typeguards.js.map +1 -1
- package/lib/node_modules/react-day-picker/node_modules/date-fns/eachYearOfInterval.js +64 -0
- package/lib/node_modules/react-day-picker/node_modules/date-fns/eachYearOfInterval.js.map +1 -0
- package/lib/node_modules/react-hook-form/dist/index.esm.js +67 -44
- package/lib/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/lib/node_modules/react-virtuoso/dist/index.js +1246 -1200
- package/lib/node_modules/react-virtuoso/dist/index.js.map +1 -1
- package/lib/node_modules/ua-parser-js/src/ua-parser.js +85 -71
- package/lib/node_modules/ua-parser-js/src/ua-parser.js.map +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.d.ts +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.js +8 -17
- package/lib/utils/getEncryptedData/getEncryptedData.js.map +1 -1
- package/package.json +107 -106
|
@@ -1,91 +1,107 @@
|
|
|
1
1
|
import isObject from './helpers/isObject.js';
|
|
2
2
|
|
|
3
|
-
function
|
|
4
|
-
|
|
3
|
+
function _typeof(o) {
|
|
4
|
+
"@babel/helpers - typeof";
|
|
5
|
+
|
|
6
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
+
return typeof o;
|
|
8
|
+
} : function (o) {
|
|
9
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
+
}, _typeof(o);
|
|
11
|
+
}
|
|
12
|
+
function ownKeys(e, r) {
|
|
13
|
+
var t = Object.keys(e);
|
|
5
14
|
if (Object.getOwnPropertySymbols) {
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
return Object.getOwnPropertyDescriptor(
|
|
9
|
-
})),
|
|
15
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
16
|
+
r && (o = o.filter(function (r) {
|
|
17
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
18
|
+
})), t.push.apply(t, o);
|
|
10
19
|
}
|
|
11
|
-
return
|
|
20
|
+
return t;
|
|
12
21
|
}
|
|
13
|
-
function _objectSpread(
|
|
14
|
-
for (var
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
_defineProperty(
|
|
18
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
19
|
-
Object.defineProperty(
|
|
22
|
+
function _objectSpread(e) {
|
|
23
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
24
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
25
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
26
|
+
_defineProperty(e, r, t[r]);
|
|
27
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
28
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
20
29
|
});
|
|
21
30
|
}
|
|
22
|
-
return
|
|
31
|
+
return e;
|
|
23
32
|
}
|
|
24
|
-
function _defineProperty(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
function _defineProperty(e, r, t) {
|
|
34
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
35
|
+
value: t,
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true
|
|
39
|
+
}) : e[r] = t, e;
|
|
40
|
+
}
|
|
41
|
+
function _toPropertyKey(t) {
|
|
42
|
+
var i = _toPrimitive(t, "string");
|
|
43
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
44
|
+
}
|
|
45
|
+
function _toPrimitive(t, r) {
|
|
46
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
47
|
+
var e = t[Symbol.toPrimitive];
|
|
48
|
+
if (void 0 !== e) {
|
|
49
|
+
var i = e.call(t, r);
|
|
50
|
+
if ("object" != _typeof(i)) return i;
|
|
51
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
34
52
|
}
|
|
35
|
-
return
|
|
53
|
+
return ("string" === r ? String : Number)(t);
|
|
36
54
|
}
|
|
37
|
-
function _slicedToArray(
|
|
38
|
-
return _arrayWithHoles(
|
|
55
|
+
function _slicedToArray(r, e) {
|
|
56
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
39
57
|
}
|
|
40
58
|
function _nonIterableRest() {
|
|
41
59
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
42
60
|
}
|
|
43
|
-
function _unsupportedIterableToArray(
|
|
44
|
-
if (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
49
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
50
|
-
}
|
|
51
|
-
function _arrayLikeToArray(arr, len) {
|
|
52
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
53
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
54
|
-
arr2[i] = arr[i];
|
|
61
|
+
function _unsupportedIterableToArray(r, a) {
|
|
62
|
+
if (r) {
|
|
63
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
64
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
65
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
55
66
|
}
|
|
56
|
-
return arr2;
|
|
57
67
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
} finally {
|
|
68
|
+
function _arrayLikeToArray(r, a) {
|
|
69
|
+
(null == a || a > r.length) && (a = r.length);
|
|
70
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
71
|
+
return n;
|
|
72
|
+
}
|
|
73
|
+
function _iterableToArrayLimit(r, l) {
|
|
74
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
75
|
+
if (null != t) {
|
|
76
|
+
var e,
|
|
77
|
+
n,
|
|
78
|
+
i,
|
|
79
|
+
u,
|
|
80
|
+
a = [],
|
|
81
|
+
f = true,
|
|
82
|
+
o = false;
|
|
74
83
|
try {
|
|
75
|
-
if (!
|
|
84
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
85
|
+
} catch (r) {
|
|
86
|
+
o = true, n = r;
|
|
76
87
|
} finally {
|
|
77
|
-
|
|
88
|
+
try {
|
|
89
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
90
|
+
} finally {
|
|
91
|
+
if (o) throw n;
|
|
92
|
+
}
|
|
78
93
|
}
|
|
94
|
+
return a;
|
|
79
95
|
}
|
|
80
|
-
return _arr;
|
|
81
96
|
}
|
|
82
|
-
function _arrayWithHoles(
|
|
83
|
-
if (Array.isArray(
|
|
97
|
+
function _arrayWithHoles(r) {
|
|
98
|
+
if (Array.isArray(r)) return r;
|
|
84
99
|
}
|
|
100
|
+
|
|
101
|
+
// Extracts the following properties from function arguments:
|
|
85
102
|
// * input `text`
|
|
86
103
|
// * `options` object
|
|
87
104
|
// * `metadata` JSON
|
|
88
|
-
|
|
89
105
|
function normalizeArguments(args) {
|
|
90
106
|
var _Array$prototype$slic = Array.prototype.slice.call(args),
|
|
91
107
|
_Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),
|
|
@@ -95,14 +111,16 @@ function normalizeArguments(args) {
|
|
|
95
111
|
arg_4 = _Array$prototype$slic2[3];
|
|
96
112
|
var text;
|
|
97
113
|
var options;
|
|
98
|
-
var metadata;
|
|
99
|
-
// `parsePhoneNumber('88005553535', ...)`.
|
|
114
|
+
var metadata;
|
|
100
115
|
|
|
116
|
+
// If the phone number is passed as a string.
|
|
117
|
+
// `parsePhoneNumber('88005553535', ...)`.
|
|
101
118
|
if (typeof arg_1 === 'string') {
|
|
102
119
|
text = arg_1;
|
|
103
|
-
} else throw new TypeError('A text for parsing must be a string.');
|
|
104
|
-
// `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.
|
|
120
|
+
} else throw new TypeError('A text for parsing must be a string.');
|
|
105
121
|
|
|
122
|
+
// If "default country" argument is being passed then move it to `options`.
|
|
123
|
+
// `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.
|
|
106
124
|
if (!arg_2 || typeof arg_2 === 'string') {
|
|
107
125
|
if (arg_4) {
|
|
108
126
|
options = arg_3;
|
|
@@ -116,7 +134,8 @@ function normalizeArguments(args) {
|
|
|
116
134
|
defaultCountry: arg_2
|
|
117
135
|
}, options);
|
|
118
136
|
}
|
|
119
|
-
}
|
|
137
|
+
}
|
|
138
|
+
// `defaultCountry` is not passed.
|
|
120
139
|
// Example: `parsePhoneNumber('+78005553535', [options], metadata)`.
|
|
121
140
|
else if (isObject(arg_2)) {
|
|
122
141
|
if (arg_3) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeArguments.js","sources":["../../../../node_modules/libphonenumber-js/es6/normalizeArguments.js"],"sourcesContent":["function ownKeys(
|
|
1
|
+
{"version":3,"file":"normalizeArguments.js","sources":["../../../../node_modules/libphonenumber-js/es6/normalizeArguments.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nimport isObject from './helpers/isObject.js';\n\n// Extracts the following properties from function arguments:\n// * input `text`\n// * `options` object\n// * `metadata` JSON\nexport default function normalizeArguments(args) {\n var _Array$prototype$slic = Array.prototype.slice.call(args),\n _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),\n arg_1 = _Array$prototype$slic2[0],\n arg_2 = _Array$prototype$slic2[1],\n arg_3 = _Array$prototype$slic2[2],\n arg_4 = _Array$prototype$slic2[3];\n var text;\n var options;\n var metadata;\n\n // If the phone number is passed as a string.\n // `parsePhoneNumber('88005553535', ...)`.\n if (typeof arg_1 === 'string') {\n text = arg_1;\n } else throw new TypeError('A text for parsing must be a string.');\n\n // If \"default country\" argument is being passed then move it to `options`.\n // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.\n if (!arg_2 || typeof arg_2 === 'string') {\n if (arg_4) {\n options = arg_3;\n metadata = arg_4;\n } else {\n options = undefined;\n metadata = arg_3;\n }\n if (arg_2) {\n options = _objectSpread({\n defaultCountry: arg_2\n }, options);\n }\n }\n // `defaultCountry` is not passed.\n // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.\n else if (isObject(arg_2)) {\n if (arg_3) {\n options = arg_2;\n metadata = arg_3;\n } else {\n metadata = arg_2;\n }\n } else throw new Error(\"Invalid second argument: \".concat(arg_2));\n return {\n text: text,\n options: options,\n metadata: metadata\n };\n}\n//# sourceMappingURL=normalizeArguments.js.map"],"names":["normalizeArguments","args","_Array$prototype$slic","Array","prototype","slice","call","_Array$prototype$slic2","_slicedToArray","arg_1","arg_2","arg_3","arg_4","text","options","metadata","TypeError","undefined","_objectSpread","defaultCountry","isObject","Error","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK;AAChBK,MAAAA,QAAQ,GAAGJ,KAAK;AACjB,IAAA,CAAC,MAAM;AACNI,MAAAA,QAAQ,GAAGL,KAAK;AACjB,IAAA;EACD,CAAC,MACI,MAAM,IAAIW,KAAK,6BAAAC,MAAA,CAA6BZ,KAAK,CAAE,CAAC;EAEzD,OAAO;AACNG,IAAAA,IAAI,EAAJA,IAAI;AACJC,IAAAA,OAAO,EAAPA,OAAO;AACPC,IAAAA,QAAQ,EAARA;GACA;AACF;;;;","x_google_ignoreList":[0]}
|
|
@@ -16,15 +16,21 @@ import extractFormattedPhoneNumberFromPossibleRfc3966NumberUri from './helpers/e
|
|
|
16
16
|
// `phonenumberutil.js` of December 31th, 2018.
|
|
17
17
|
//
|
|
18
18
|
// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
// We don't allow input strings for parsing to be longer than 250 chars.
|
|
19
22
|
// This prevents malicious input from consuming CPU.
|
|
23
|
+
var MAX_INPUT_STRING_LENGTH = 250;
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
// This consists of the plus symbol, digits, and arabic-indic digits.
|
|
26
|
+
var PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
// Regular expression of trailing characters that we want to remove.
|
|
24
29
|
// A trailing `#` is sometimes used when writing phone numbers with extensions in US.
|
|
25
30
|
// Example: "+1 (645) 123 1234-910#" number has extension "910".
|
|
26
|
-
|
|
27
31
|
var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');
|
|
32
|
+
|
|
33
|
+
// Examples:
|
|
28
34
|
//
|
|
29
35
|
// ```js
|
|
30
36
|
// parse('8 (800) 555-35-35', 'RU')
|
|
@@ -48,25 +54,27 @@ var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$
|
|
|
48
54
|
* @param {object} metadata
|
|
49
55
|
* @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).
|
|
50
56
|
*/
|
|
51
|
-
|
|
52
57
|
function parse(text, options, metadata) {
|
|
53
58
|
// If assigning the `{}` default value is moved to the arguments above,
|
|
54
59
|
// code coverage would decrease for some weird reason.
|
|
55
60
|
options = options || {};
|
|
56
|
-
metadata = new Metadata(metadata);
|
|
61
|
+
metadata = new Metadata(metadata);
|
|
57
62
|
|
|
63
|
+
// Validate `defaultCountry`.
|
|
58
64
|
if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {
|
|
59
65
|
if (options.v2) {
|
|
60
66
|
throw new ParseError('INVALID_COUNTRY');
|
|
61
67
|
}
|
|
62
68
|
throw new Error("Unknown country: ".concat(options.defaultCountry));
|
|
63
|
-
}
|
|
69
|
+
}
|
|
64
70
|
|
|
71
|
+
// Parse the phone number.
|
|
65
72
|
var _parseInput = parseInput(text, options.v2, options.extract),
|
|
66
73
|
formattedPhoneNumber = _parseInput.number,
|
|
67
74
|
ext = _parseInput.ext,
|
|
68
|
-
error = _parseInput.error;
|
|
75
|
+
error = _parseInput.error;
|
|
69
76
|
|
|
77
|
+
// If the phone number is not viable then return nothing.
|
|
70
78
|
if (!formattedPhoneNumber) {
|
|
71
79
|
if (options.v2) {
|
|
72
80
|
if (error === 'TOO_SHORT') {
|
|
@@ -87,18 +95,20 @@ function parse(text, options, metadata) {
|
|
|
87
95
|
throw new ParseError('INVALID_COUNTRY');
|
|
88
96
|
}
|
|
89
97
|
return {};
|
|
90
|
-
}
|
|
98
|
+
}
|
|
91
99
|
|
|
100
|
+
// Validate national (significant) number length.
|
|
92
101
|
if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {
|
|
93
102
|
// Won't throw here because the regexp already demands length > 1.
|
|
94
|
-
|
|
95
103
|
/* istanbul ignore if */
|
|
96
104
|
if (options.v2) {
|
|
97
105
|
throw new ParseError('TOO_SHORT');
|
|
98
|
-
}
|
|
99
|
-
|
|
106
|
+
}
|
|
107
|
+
// Google's demo just throws an error in this case.
|
|
100
108
|
return {};
|
|
101
|
-
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Validate national (significant) number length.
|
|
102
112
|
//
|
|
103
113
|
// A sidenote:
|
|
104
114
|
//
|
|
@@ -107,12 +117,11 @@ function parse(text, options, metadata) {
|
|
|
107
117
|
// https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36
|
|
108
118
|
// Such numbers will just be discarded.
|
|
109
119
|
//
|
|
110
|
-
|
|
111
120
|
if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {
|
|
112
121
|
if (options.v2) {
|
|
113
122
|
throw new ParseError('TOO_LONG');
|
|
114
|
-
}
|
|
115
|
-
|
|
123
|
+
}
|
|
124
|
+
// Google's demo just throws an error in this case.
|
|
116
125
|
return {};
|
|
117
126
|
}
|
|
118
127
|
if (options.v2) {
|
|
@@ -128,25 +137,29 @@ function parse(text, options, metadata) {
|
|
|
128
137
|
}
|
|
129
138
|
phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;
|
|
130
139
|
return phoneNumber;
|
|
131
|
-
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Check if national phone number pattern matches the number.
|
|
132
143
|
// National number pattern is different for each country,
|
|
133
144
|
// even for those ones which are part of the "NANPA" group.
|
|
134
|
-
|
|
135
145
|
var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;
|
|
136
146
|
if (!options.extended) {
|
|
137
147
|
return valid ? result(country, nationalNumber, ext) : {};
|
|
138
|
-
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// isInternational: countryCallingCode !== undefined
|
|
139
151
|
|
|
140
152
|
return {
|
|
141
153
|
country: country,
|
|
142
154
|
countryCallingCode: countryCallingCode,
|
|
143
155
|
carrierCode: carrierCode,
|
|
144
156
|
valid: valid,
|
|
145
|
-
possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata) ? true : false,
|
|
157
|
+
possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, country, metadata) ? true : false,
|
|
146
158
|
phone: nationalNumber,
|
|
147
159
|
ext: ext
|
|
148
160
|
};
|
|
149
161
|
}
|
|
162
|
+
|
|
150
163
|
/**
|
|
151
164
|
* Extracts a formatted phone number from text.
|
|
152
165
|
* Doesn't guarantee that the extracted phone number
|
|
@@ -159,7 +172,6 @@ function parse(text, options, metadata) {
|
|
|
159
172
|
* // Returns "(213) 373-4253".
|
|
160
173
|
* extractFormattedPhoneNumber("Call (213) 373-4253 for assistance.")
|
|
161
174
|
*/
|
|
162
|
-
|
|
163
175
|
function _extractFormattedPhoneNumber(text, extract, throwOnError) {
|
|
164
176
|
if (!text) {
|
|
165
177
|
return;
|
|
@@ -172,23 +184,25 @@ function _extractFormattedPhoneNumber(text, extract, throwOnError) {
|
|
|
172
184
|
}
|
|
173
185
|
if (extract === false) {
|
|
174
186
|
return text;
|
|
175
|
-
}
|
|
176
|
-
|
|
187
|
+
}
|
|
188
|
+
// Attempt to extract a possible number from the string passed in
|
|
177
189
|
var startsAt = text.search(PHONE_NUMBER_START_PATTERN);
|
|
178
190
|
if (startsAt < 0) {
|
|
179
191
|
return;
|
|
180
192
|
}
|
|
181
|
-
return text
|
|
182
|
-
|
|
193
|
+
return text
|
|
194
|
+
// Trim everything to the left of the phone number
|
|
195
|
+
.slice(startsAt)
|
|
196
|
+
// Remove trailing non-numerical characters
|
|
183
197
|
.replace(AFTER_PHONE_NUMBER_END_PATTERN, '');
|
|
184
198
|
}
|
|
199
|
+
|
|
185
200
|
/**
|
|
186
201
|
* @param {string} text - Input.
|
|
187
202
|
* @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.
|
|
188
203
|
* @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.
|
|
189
204
|
* @return {object} `{ ?number, ?ext }`.
|
|
190
205
|
*/
|
|
191
|
-
|
|
192
206
|
function parseInput(text, v2, extract) {
|
|
193
207
|
// // Parse RFC 3966 phone number URI.
|
|
194
208
|
// if (text && text.indexOf('tel:') === 0) {
|
|
@@ -199,8 +213,8 @@ function parseInput(text, v2, extract) {
|
|
|
199
213
|
extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {
|
|
200
214
|
return _extractFormattedPhoneNumber(text, extract, v2);
|
|
201
215
|
}
|
|
202
|
-
});
|
|
203
|
-
|
|
216
|
+
});
|
|
217
|
+
// If the phone number is not viable, then abort.
|
|
204
218
|
if (!number) {
|
|
205
219
|
return {};
|
|
206
220
|
}
|
|
@@ -211,9 +225,9 @@ function parseInput(text, v2, extract) {
|
|
|
211
225
|
};
|
|
212
226
|
}
|
|
213
227
|
return {};
|
|
214
|
-
}
|
|
228
|
+
}
|
|
229
|
+
// Attempt to parse extension first, since it doesn't require region-specific
|
|
215
230
|
// data and we want to have the non-normalised number here.
|
|
216
|
-
|
|
217
231
|
var withExtensionStripped = extractExtension(number);
|
|
218
232
|
if (withExtensionStripped.ext) {
|
|
219
233
|
return withExtensionStripped;
|
|
@@ -222,10 +236,10 @@ function parseInput(text, v2, extract) {
|
|
|
222
236
|
number: number
|
|
223
237
|
};
|
|
224
238
|
}
|
|
239
|
+
|
|
225
240
|
/**
|
|
226
241
|
* Creates `parse()` result object.
|
|
227
242
|
*/
|
|
228
|
-
|
|
229
243
|
function result(country, nationalNumber, ext) {
|
|
230
244
|
var result = {
|
|
231
245
|
country: country,
|
|
@@ -236,6 +250,7 @@ function result(country, nationalNumber, ext) {
|
|
|
236
250
|
}
|
|
237
251
|
return result;
|
|
238
252
|
}
|
|
253
|
+
|
|
239
254
|
/**
|
|
240
255
|
* Parses a viable phone number.
|
|
241
256
|
* @param {string} formattedPhoneNumber — Example: "(213) 373-4253".
|
|
@@ -244,18 +259,22 @@ function result(country, nationalNumber, ext) {
|
|
|
244
259
|
* @param {Metadata} metadata
|
|
245
260
|
* @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.
|
|
246
261
|
*/
|
|
247
|
-
|
|
248
262
|
function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
|
|
249
263
|
// Extract calling code from phone number.
|
|
250
|
-
var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), defaultCountry, defaultCallingCode, metadata.metadata),
|
|
264
|
+
var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, defaultCountry, defaultCallingCode, metadata.metadata),
|
|
251
265
|
countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,
|
|
252
266
|
countryCallingCode = _extractCountryCallin.countryCallingCode,
|
|
253
|
-
number = _extractCountryCallin.number;
|
|
267
|
+
number = _extractCountryCallin.number;
|
|
254
268
|
|
|
269
|
+
// The exact country of the phone number
|
|
255
270
|
var country;
|
|
271
|
+
|
|
272
|
+
// If `formattedPhoneNumber` is passed in "international" format,
|
|
273
|
+
// choose a country by `countryCallingCode`.
|
|
256
274
|
if (countryCallingCode) {
|
|
257
275
|
metadata.selectNumberingPlan(countryCallingCode);
|
|
258
|
-
}
|
|
276
|
+
}
|
|
277
|
+
// Else, if `formattedPhoneNumber` is passed in "national" format,
|
|
259
278
|
// then `number` is defined and `countryCallingCode` is `undefined`.
|
|
260
279
|
else if (number && (defaultCountry || defaultCallingCode)) {
|
|
261
280
|
metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);
|
|
@@ -270,9 +289,11 @@ function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCo
|
|
|
270
289
|
countryCallingCode: countryCallingCode
|
|
271
290
|
};
|
|
272
291
|
}
|
|
273
|
-
var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), metadata),
|
|
292
|
+
var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, metadata),
|
|
274
293
|
nationalNumber = _extractNationalNumbe.nationalNumber,
|
|
275
|
-
carrierCode = _extractNationalNumbe.carrierCode;
|
|
294
|
+
carrierCode = _extractNationalNumbe.carrierCode;
|
|
295
|
+
|
|
296
|
+
// Sometimes there are several countries
|
|
276
297
|
// corresponding to the same country phone code
|
|
277
298
|
// (e.g. NANPA countries all having `1` country phone code).
|
|
278
299
|
// Therefore, to reliably determine the exact country,
|
|
@@ -282,18 +303,15 @@ function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCo
|
|
|
282
303
|
// get their countries populated with the full set of
|
|
283
304
|
// "phone number type" regular expressions.
|
|
284
305
|
//
|
|
285
|
-
|
|
286
306
|
var exactCountry = getCountryByCallingCode(countryCallingCode, {
|
|
287
307
|
nationalNumber: nationalNumber,
|
|
288
|
-
defaultCountry: defaultCountry,
|
|
289
308
|
metadata: metadata
|
|
290
309
|
});
|
|
291
310
|
if (exactCountry) {
|
|
292
311
|
country = exactCountry;
|
|
293
312
|
/* istanbul ignore if */
|
|
294
|
-
|
|
295
313
|
if (exactCountry === '001') ; else {
|
|
296
|
-
metadata.
|
|
314
|
+
metadata.selectNumberingPlan(country);
|
|
297
315
|
}
|
|
298
316
|
}
|
|
299
317
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sources":["../../../../node_modules/libphonenumber-js/es6/parse.js"],"sourcesContent":["// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\nimport { VALID_DIGITS, PLUS_CHARS, MIN_LENGTH_FOR_NSN, MAX_LENGTH_FOR_NSN } from './constants.js';\nimport ParseError from './ParseError.js';\nimport Metadata from './metadata.js';\nimport isViablePhoneNumber, { isViablePhoneNumberStart } from './helpers/isViablePhoneNumber.js';\nimport extractExtension from './helpers/extension/extractExtension.js';\nimport parseIncompletePhoneNumber from './parseIncompletePhoneNumber.js';\nimport getCountryCallingCode from './getCountryCallingCode.js';\nimport { isPossibleNumber } from './isPossible.js'; // import { parseRFC3966 } from './helpers/RFC3966.js'\n\nimport PhoneNumber from './PhoneNumber.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractNationalNumber from './helpers/extractNationalNumber.js';\nimport stripIddPrefix from './helpers/stripIddPrefix.js';\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport extractFormattedPhoneNumberFromPossibleRfc3966NumberUri from './helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js'; // We don't allow input strings for parsing to be longer than 250 chars.\n// This prevents malicious input from consuming CPU.\n\nvar MAX_INPUT_STRING_LENGTH = 250; // This consists of the plus symbol, digits, and arabic-indic digits.\n\nvar PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']'); // Regular expression of trailing characters that we want to remove.\n// A trailing `#` is sometimes used when writing phone numbers with extensions in US.\n// Example: \"+1 (645) 123 1234-910#\" number has extension \"910\".\n\nvar AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; // Examples:\n//\n// ```js\n// parse('8 (800) 555-35-35', 'RU')\n// parse('8 (800) 555-35-35', 'RU', metadata)\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } })\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)\n// parse('+7 800 555 35 35')\n// parse('+7 800 555 35 35', metadata)\n// ```\n//\n\n/**\r\n * Parses a phone number.\r\n *\r\n * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)\r\n * parse('123456789', { defaultCountry: 'RU' }, metadata)\r\n * parse('123456789', undefined, metadata)\r\n *\r\n * @param {string} input\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).\r\n */\n\nexport default function parse(text, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n metadata = new Metadata(metadata); // Validate `defaultCountry`.\n\n if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n\n throw new Error(\"Unknown country: \".concat(options.defaultCountry));\n } // Parse the phone number.\n\n\n var _parseInput = parseInput(text, options.v2, options.extract),\n formattedPhoneNumber = _parseInput.number,\n ext = _parseInput.ext,\n error = _parseInput.error; // If the phone number is not viable then return nothing.\n\n\n if (!formattedPhoneNumber) {\n if (options.v2) {\n if (error === 'TOO_SHORT') {\n throw new ParseError('TOO_SHORT');\n }\n\n throw new ParseError('NOT_A_NUMBER');\n }\n\n return {};\n }\n\n var _parsePhoneNumber = parsePhoneNumber(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),\n country = _parsePhoneNumber.country,\n nationalNumber = _parsePhoneNumber.nationalNumber,\n countryCallingCode = _parsePhoneNumber.countryCallingCode,\n countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,\n carrierCode = _parsePhoneNumber.carrierCode;\n\n if (!metadata.hasSelectedNumberingPlan()) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n\n return {};\n } // Validate national (significant) number length.\n\n\n if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {\n // Won't throw here because the regexp already demands length > 1.\n\n /* istanbul ignore if */\n if (options.v2) {\n throw new ParseError('TOO_SHORT');\n } // Google's demo just throws an error in this case.\n\n\n return {};\n } // Validate national (significant) number length.\n //\n // A sidenote:\n //\n // They say that sometimes national (significant) numbers\n // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).\n // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36\n // Such numbers will just be discarded.\n //\n\n\n if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {\n if (options.v2) {\n throw new ParseError('TOO_LONG');\n } // Google's demo just throws an error in this case.\n\n\n return {};\n }\n\n if (options.v2) {\n var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);\n\n if (country) {\n phoneNumber.country = country;\n }\n\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n }\n\n if (ext) {\n phoneNumber.ext = ext;\n }\n\n phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;\n return phoneNumber;\n } // Check if national phone number pattern matches the number.\n // National number pattern is different for each country,\n // even for those ones which are part of the \"NANPA\" group.\n\n\n var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;\n\n if (!options.extended) {\n return valid ? result(country, nationalNumber, ext) : {};\n } // isInternational: countryCallingCode !== undefined\n\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n carrierCode: carrierCode,\n valid: valid,\n possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata) ? true : false,\n phone: nationalNumber,\n ext: ext\n };\n}\n/**\r\n * Extracts a formatted phone number from text.\r\n * Doesn't guarantee that the extracted phone number\r\n * is a valid phone number (for example, doesn't validate its length).\r\n * @param {string} text\r\n * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.\r\n * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.\r\n * @return {string}\r\n * @example\r\n * // Returns \"(213) 373-4253\".\r\n * extractFormattedPhoneNumber(\"Call (213) 373-4253 for assistance.\")\r\n */\n\nfunction _extractFormattedPhoneNumber(text, extract, throwOnError) {\n if (!text) {\n return;\n }\n\n if (text.length > MAX_INPUT_STRING_LENGTH) {\n if (throwOnError) {\n throw new ParseError('TOO_LONG');\n }\n\n return;\n }\n\n if (extract === false) {\n return text;\n } // Attempt to extract a possible number from the string passed in\n\n\n var startsAt = text.search(PHONE_NUMBER_START_PATTERN);\n\n if (startsAt < 0) {\n return;\n }\n\n return text // Trim everything to the left of the phone number\n .slice(startsAt) // Remove trailing non-numerical characters\n .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');\n}\n/**\r\n * @param {string} text - Input.\r\n * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.\r\n * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\n\n\nfunction parseInput(text, v2, extract) {\n // // Parse RFC 3966 phone number URI.\n // if (text && text.indexOf('tel:') === 0) {\n // \treturn parseRFC3966(text)\n // }\n // let number = extractFormattedPhoneNumber(text, extract, v2)\n var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {\n extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {\n return _extractFormattedPhoneNumber(text, extract, v2);\n }\n }); // If the phone number is not viable, then abort.\n\n if (!number) {\n return {};\n }\n\n if (!isViablePhoneNumber(number)) {\n if (isViablePhoneNumberStart(number)) {\n return {\n error: 'TOO_SHORT'\n };\n }\n\n return {};\n } // Attempt to parse extension first, since it doesn't require region-specific\n // data and we want to have the non-normalised number here.\n\n\n var withExtensionStripped = extractExtension(number);\n\n if (withExtensionStripped.ext) {\n return withExtensionStripped;\n }\n\n return {\n number: number\n };\n}\n/**\r\n * Creates `parse()` result object.\r\n */\n\n\nfunction result(country, nationalNumber, ext) {\n var result = {\n country: country,\n phone: nationalNumber\n };\n\n if (ext) {\n result.ext = ext;\n }\n\n return result;\n}\n/**\r\n * Parses a viable phone number.\r\n * @param {string} formattedPhoneNumber — Example: \"(213) 373-4253\".\r\n * @param {string} [defaultCountry]\r\n * @param {string} [defaultCallingCode]\r\n * @param {Metadata} metadata\r\n * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.\r\n */\n\n\nfunction parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {\n // Extract calling code from phone number.\n var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), defaultCountry, defaultCallingCode, metadata.metadata),\n countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number; // Choose a country by `countryCallingCode`.\n\n\n var country;\n\n if (countryCallingCode) {\n metadata.selectNumberingPlan(countryCallingCode);\n } // If `formattedPhoneNumber` is passed in \"national\" format\n // then `number` is defined and `countryCallingCode` is `undefined`.\n else if (number && (defaultCountry || defaultCallingCode)) {\n metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);\n\n if (defaultCountry) {\n country = defaultCountry;\n } else {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n country = '001';\n }\n }\n }\n\n countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);\n } else return {};\n\n if (!number) {\n return {\n countryCallingCodeSource: countryCallingCodeSource,\n countryCallingCode: countryCallingCode\n };\n }\n\n var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), metadata),\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode; // Sometimes there are several countries\n // corresponding to the same country phone code\n // (e.g. NANPA countries all having `1` country phone code).\n // Therefore, to reliably determine the exact country,\n // national (significant) number should have been parsed first.\n //\n // When `metadata.json` is generated, all \"ambiguous\" country phone codes\n // get their countries populated with the full set of\n // \"phone number type\" regular expressions.\n //\n\n\n var exactCountry = getCountryByCallingCode(countryCallingCode, {\n nationalNumber: nationalNumber,\n defaultCountry: defaultCountry,\n metadata: metadata\n });\n\n if (exactCountry) {\n country = exactCountry;\n /* istanbul ignore if */\n\n if (exactCountry === '001') {// Can't happen with `USE_NON_GEOGRAPHIC_COUNTRY_CODE` being `false`.\n // If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` is set to `true` for some reason,\n // then remove the \"istanbul ignore if\".\n } else {\n metadata.country(country);\n }\n }\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n countryCallingCodeSource: countryCallingCodeSource,\n nationalNumber: nationalNumber,\n carrierCode: carrierCode\n };\n}\n//# sourceMappingURL=parse.js.map"],"names":["MAX_INPUT_STRING_LENGTH","PHONE_NUMBER_START_PATTERN","RegExp","PLUS_CHARS","VALID_DIGITS","AFTER_PHONE_NUMBER_END_PATTERN","parse","text","options","metadata","Metadata","defaultCountry","hasCountry","v2","ParseError","Error","concat","_parseInput","parseInput","extract","formattedPhoneNumber","number","ext","error","_parsePhoneNumber","parsePhoneNumber","defaultCallingCode","country","nationalNumber","countryCallingCode","countryCallingCodeSource","carrierCode","hasSelectedNumberingPlan","length","MIN_LENGTH_FOR_NSN","MAX_LENGTH_FOR_NSN","phoneNumber","PhoneNumber","__countryCallingCodeSource","valid","extended","matchesEntirely","nationalNumberPattern","result","possible","possibleLengths","isPossibleNumber","phone","_extractFormattedPhoneNumber","extractFormattedPhoneNumber","throwOnError","startsAt","search","slice","replace","extractFormattedPhoneNumberFromPossibleRfc3966NumberUri","isViablePhoneNumber","isViablePhoneNumberStart","withExtensionStripped","extractExtension","_extractCountryCallin","extractCountryCallingCode","parseIncompletePhoneNumber","selectNumberingPlan","getCountryCallingCode","_extractNationalNumbe","extractNationalNumber","exactCountry","getCountryByCallingCode"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AA0BA;;AACA,IAAMA,uBAAuB,GAAG,GAAhC;;AAGA,IAAMC,0BAA0B,GAAG,IAAIC,MAAJ,CAAW,GAAA,GAAMC,UAAN,GAAmBC,YAAnB,GAAkC,GAA7C,CAAnC;AAGA;AACA;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,EAAoB;AACnBgB,MAAAA,OAAO,GAAGhB,cAAV;AACA,IAAA;IAQDkB,kBAAkB,GAAGH,kBAAkB,IAAIsC,qBAAqB,CAACrD,cAAD,EAAiBF,QAAQ,CAACA,QAA1B,CAAhE;EACA,CAbI,MAcA,OAAO,EAAP;EAEL,IAAI,CAACY,MAAL,EAAa;IACZ,OAAO;AACNS,MAAAA,wBAAwB,EAAxBA,wBADM;AAEND,MAAAA,kBAAkB,EAAlBA;KAFD;AAIA,EAAA;EAED,IAAAoC,qBAAA,GAGIC,qBAAqB,CACxBJ,0BAA0B,CAACzC,MAAD,CADF,EAExBZ,QAFwB,CAHzB;IACCmB,cADD,GAAAqC,qBAAA,CACCrC,cADD;AAECG,IAAAA,WAFD,GAAAkC,qBAAA,CAEClC,WAFD,CAvCC;AAgDD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,EAAA,IAAMoC,YAAY,GAAGC,uBAAuB,CAACvC,kBAAD,EAAqB;AAChED,IAAAA,cAAc,EAAdA,cADgE;AAEhEjB,IAAAA,cAAc,EAAdA,cAFgE;AAGhEF,IAAAA,QAAQ,EAARA;AAHgE,GAArB,CAA5C;AAKA,EAAA,IAAI0D,YAAJ,EAAkB;AACjBxC,IAAAA,OAAO,GAAGwC,YAAV;AACA;;AACA,IAAA,IAAIA,YAAY,KAAK,KAArB,EAA4B,CAA5B,MAIO;MACN1D,QAAQ,CAACkB,OAAT,CAAiBA,OAAjB,CAAA;AACA,IAAA;AACD,EAAA;EAED,OAAO;AACNA,IAAAA,OAAO,EAAPA,OADM;AAENE,IAAAA,kBAAkB,EAAlBA,kBAFM;AAGNC,IAAAA,wBAAwB,EAAxBA,wBAHM;AAINF,IAAAA,cAAc,EAAdA,cAJM;AAKNG,IAAAA,WAAW,EAAXA;GALD;AAOA;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"parse.js","sources":["../../../../node_modules/libphonenumber-js/es6/parse.js"],"sourcesContent":["// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\n\nimport { VALID_DIGITS, PLUS_CHARS, MIN_LENGTH_FOR_NSN, MAX_LENGTH_FOR_NSN } from './constants.js';\nimport ParseError from './ParseError.js';\nimport Metadata from './metadata.js';\nimport isViablePhoneNumber, { isViablePhoneNumberStart } from './helpers/isViablePhoneNumber.js';\nimport extractExtension from './helpers/extension/extractExtension.js';\nimport parseIncompletePhoneNumber from './parseIncompletePhoneNumber.js';\nimport getCountryCallingCode from './getCountryCallingCode.js';\nimport { isPossibleNumber } from './isPossible.js';\n// import { parseRFC3966 } from './helpers/RFC3966.js'\nimport PhoneNumber from './PhoneNumber.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractNationalNumber from './helpers/extractNationalNumber.js';\nimport stripIddPrefix from './helpers/stripIddPrefix.js';\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport extractFormattedPhoneNumberFromPossibleRfc3966NumberUri from './helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js';\n\n// We don't allow input strings for parsing to be longer than 250 chars.\n// This prevents malicious input from consuming CPU.\nvar MAX_INPUT_STRING_LENGTH = 250;\n\n// This consists of the plus symbol, digits, and arabic-indic digits.\nvar PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');\n\n// Regular expression of trailing characters that we want to remove.\n// A trailing `#` is sometimes used when writing phone numbers with extensions in US.\n// Example: \"+1 (645) 123 1234-910#\" number has extension \"910\".\nvar AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\n\n// Examples:\n//\n// ```js\n// parse('8 (800) 555-35-35', 'RU')\n// parse('8 (800) 555-35-35', 'RU', metadata)\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } })\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)\n// parse('+7 800 555 35 35')\n// parse('+7 800 555 35 35', metadata)\n// ```\n//\n\n/**\r\n * Parses a phone number.\r\n *\r\n * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)\r\n * parse('123456789', { defaultCountry: 'RU' }, metadata)\r\n * parse('123456789', undefined, metadata)\r\n *\r\n * @param {string} input\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).\r\n */\nexport default function parse(text, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n metadata = new Metadata(metadata);\n\n // Validate `defaultCountry`.\n if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n throw new Error(\"Unknown country: \".concat(options.defaultCountry));\n }\n\n // Parse the phone number.\n var _parseInput = parseInput(text, options.v2, options.extract),\n formattedPhoneNumber = _parseInput.number,\n ext = _parseInput.ext,\n error = _parseInput.error;\n\n // If the phone number is not viable then return nothing.\n if (!formattedPhoneNumber) {\n if (options.v2) {\n if (error === 'TOO_SHORT') {\n throw new ParseError('TOO_SHORT');\n }\n throw new ParseError('NOT_A_NUMBER');\n }\n return {};\n }\n var _parsePhoneNumber = parsePhoneNumber(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),\n country = _parsePhoneNumber.country,\n nationalNumber = _parsePhoneNumber.nationalNumber,\n countryCallingCode = _parsePhoneNumber.countryCallingCode,\n countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,\n carrierCode = _parsePhoneNumber.carrierCode;\n if (!metadata.hasSelectedNumberingPlan()) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n return {};\n }\n\n // Validate national (significant) number length.\n if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {\n // Won't throw here because the regexp already demands length > 1.\n /* istanbul ignore if */\n if (options.v2) {\n throw new ParseError('TOO_SHORT');\n }\n // Google's demo just throws an error in this case.\n return {};\n }\n\n // Validate national (significant) number length.\n //\n // A sidenote:\n //\n // They say that sometimes national (significant) numbers\n // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).\n // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36\n // Such numbers will just be discarded.\n //\n if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {\n if (options.v2) {\n throw new ParseError('TOO_LONG');\n }\n // Google's demo just throws an error in this case.\n return {};\n }\n if (options.v2) {\n var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);\n if (country) {\n phoneNumber.country = country;\n }\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n }\n if (ext) {\n phoneNumber.ext = ext;\n }\n phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;\n return phoneNumber;\n }\n\n // Check if national phone number pattern matches the number.\n // National number pattern is different for each country,\n // even for those ones which are part of the \"NANPA\" group.\n var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;\n if (!options.extended) {\n return valid ? result(country, nationalNumber, ext) : {};\n }\n\n // isInternational: countryCallingCode !== undefined\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n carrierCode: carrierCode,\n valid: valid,\n possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, country, metadata) ? true : false,\n phone: nationalNumber,\n ext: ext\n };\n}\n\n/**\r\n * Extracts a formatted phone number from text.\r\n * Doesn't guarantee that the extracted phone number\r\n * is a valid phone number (for example, doesn't validate its length).\r\n * @param {string} text\r\n * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.\r\n * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.\r\n * @return {string}\r\n * @example\r\n * // Returns \"(213) 373-4253\".\r\n * extractFormattedPhoneNumber(\"Call (213) 373-4253 for assistance.\")\r\n */\nfunction _extractFormattedPhoneNumber(text, extract, throwOnError) {\n if (!text) {\n return;\n }\n if (text.length > MAX_INPUT_STRING_LENGTH) {\n if (throwOnError) {\n throw new ParseError('TOO_LONG');\n }\n return;\n }\n if (extract === false) {\n return text;\n }\n // Attempt to extract a possible number from the string passed in\n var startsAt = text.search(PHONE_NUMBER_START_PATTERN);\n if (startsAt < 0) {\n return;\n }\n return text\n // Trim everything to the left of the phone number\n .slice(startsAt)\n // Remove trailing non-numerical characters\n .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');\n}\n\n/**\r\n * @param {string} text - Input.\r\n * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.\r\n * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\nfunction parseInput(text, v2, extract) {\n // // Parse RFC 3966 phone number URI.\n // if (text && text.indexOf('tel:') === 0) {\n // \treturn parseRFC3966(text)\n // }\n // let number = extractFormattedPhoneNumber(text, extract, v2)\n var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {\n extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {\n return _extractFormattedPhoneNumber(text, extract, v2);\n }\n });\n // If the phone number is not viable, then abort.\n if (!number) {\n return {};\n }\n if (!isViablePhoneNumber(number)) {\n if (isViablePhoneNumberStart(number)) {\n return {\n error: 'TOO_SHORT'\n };\n }\n return {};\n }\n // Attempt to parse extension first, since it doesn't require region-specific\n // data and we want to have the non-normalised number here.\n var withExtensionStripped = extractExtension(number);\n if (withExtensionStripped.ext) {\n return withExtensionStripped;\n }\n return {\n number: number\n };\n}\n\n/**\r\n * Creates `parse()` result object.\r\n */\nfunction result(country, nationalNumber, ext) {\n var result = {\n country: country,\n phone: nationalNumber\n };\n if (ext) {\n result.ext = ext;\n }\n return result;\n}\n\n/**\r\n * Parses a viable phone number.\r\n * @param {string} formattedPhoneNumber — Example: \"(213) 373-4253\".\r\n * @param {string} [defaultCountry]\r\n * @param {string} [defaultCallingCode]\r\n * @param {Metadata} metadata\r\n * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.\r\n */\nfunction parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {\n // Extract calling code from phone number.\n var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, defaultCountry, defaultCallingCode, metadata.metadata),\n countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number;\n\n // The exact country of the phone number\n var country;\n\n // If `formattedPhoneNumber` is passed in \"international\" format,\n // choose a country by `countryCallingCode`.\n if (countryCallingCode) {\n metadata.selectNumberingPlan(countryCallingCode);\n }\n // Else, if `formattedPhoneNumber` is passed in \"national\" format,\n // then `number` is defined and `countryCallingCode` is `undefined`.\n else if (number && (defaultCountry || defaultCallingCode)) {\n metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);\n if (defaultCountry) {\n country = defaultCountry;\n } else {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n country = '001';\n }\n }\n }\n countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);\n } else return {};\n if (!number) {\n return {\n countryCallingCodeSource: countryCallingCodeSource,\n countryCallingCode: countryCallingCode\n };\n }\n var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, metadata),\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode;\n\n // Sometimes there are several countries\n // corresponding to the same country phone code\n // (e.g. NANPA countries all having `1` country phone code).\n // Therefore, to reliably determine the exact country,\n // national (significant) number should have been parsed first.\n //\n // When `metadata.json` is generated, all \"ambiguous\" country phone codes\n // get their countries populated with the full set of\n // \"phone number type\" regular expressions.\n //\n var exactCountry = getCountryByCallingCode(countryCallingCode, {\n nationalNumber: nationalNumber,\n metadata: metadata\n });\n if (exactCountry) {\n country = exactCountry;\n /* istanbul ignore if */\n if (exactCountry === '001') {\n // Can't happen with `USE_NON_GEOGRAPHIC_COUNTRY_CODE` being `false`.\n // If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` is set to `true` for some reason,\n // then remove the \"istanbul ignore if\".\n } else {\n metadata.selectNumberingPlan(country);\n }\n }\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n countryCallingCodeSource: countryCallingCodeSource,\n nationalNumber: nationalNumber,\n carrierCode: carrierCode\n };\n}\n//# sourceMappingURL=parse.js.map"],"names":["MAX_INPUT_STRING_LENGTH","PHONE_NUMBER_START_PATTERN","RegExp","PLUS_CHARS","VALID_DIGITS","AFTER_PHONE_NUMBER_END_PATTERN","parse","text","options","metadata","Metadata","defaultCountry","hasCountry","v2","ParseError","Error","concat","_parseInput","parseInput","extract","formattedPhoneNumber","number","ext","error","_parsePhoneNumber","parsePhoneNumber","defaultCallingCode","country","nationalNumber","countryCallingCode","countryCallingCodeSource","carrierCode","hasSelectedNumberingPlan","length","MIN_LENGTH_FOR_NSN","MAX_LENGTH_FOR_NSN","phoneNumber","PhoneNumber","__countryCallingCodeSource","valid","extended","matchesEntirely","nationalNumberPattern","result","possible","possibleLengths","isPossibleNumber","phone","_extractFormattedPhoneNumber","throwOnError","startsAt","search","slice","replace","extractFormattedPhoneNumberFromPossibleRfc3966NumberUri","extractFormattedPhoneNumber","isViablePhoneNumber","isViablePhoneNumberStart","withExtensionStripped","extractExtension","_extractCountryCallin","extractCountryCallingCode","parseIncompletePhoneNumber","undefined","selectNumberingPlan","getCountryCallingCode","_extractNationalNumbe","extractNationalNum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