cleanup of umd/*
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"251.prod.js","mappings":"skNAOA,MAAMA,UAAkBC,IAAAA,cACtBC,YAAYC,GACVC,MAAMD,GAENE,KAAKC,QAAU,CAAC,EAChBC,EAAAA,SAAuBC,IAAQH,KAAKC,QAAQE,EAAGC,MAAQD,EAAGE,IAAI,IAE9DL,KAAKM,MAAQ,CACXC,YAAaT,EAAMS,aAAe,KAClCC,SAAUR,KAAKC,QAAQH,EAAMS,aAAe,MAC5CE,YAAa,IAGfT,KAAKU,aAAeV,KAAKU,aAAaC,KAAKX,MAC3CA,KAAKY,eAAiBZ,KAAKY,eAAeD,KAAKX,MAC/CA,KAAKa,cAAgBb,KAAKa,cAAcF,KAAKX,MAC7CA,KAAKc,oBAAsBd,KAAKc,oBAAoBH,KAAKX,KAC3D,CAEAU,aAAaK,GACXf,KAAKgB,SAAS,CAACP,YAAaT,KAAKiB,aAAaF,EAAEG,OAAOC,QACzD,CAEAP,eAAeG,GACbA,EAAEK,iBACFpB,KAAKF,MAAMuB,SAASrB,KAAKM,MAAMG,YAAYa,OAC7C,CAGAT,cAAcE,GACE,UAAVA,EAAEQ,KACJvB,KAAKY,eAAeG,EAExB,CAEAD,sBACEd,KAAKF,MAAM0B,sBAAsBxB,KAAKM,MAAMC,YAAaP,KAAKM,MAAME,SACtE,CAGAS,aAAaQ,GACX,OAAKA,EAKEA,EAAOC,QAAQ,eAAgB,IAJ7BD,CAKX,CAEAE,SACE,OACE,oCACE,0BAAMC,UAAU,YAAYC,QAAS7B,KAAKc,qBACxC,0BAAMc,UAAU,iBAAgBE,EAAAA,EAAAA,IAAU9B,KAAKM,MAAMC,aAAa,KAAa,IAC7EP,KAAKM,MAAME,SAAS,KACxB,2BAAOuB,KAAK,MAAMC,YAAahC,KAAKM,MAAM0B,YACtCb,MAAOnB,KAAKM,MAAMG,YAAawB,SAAUjC,KAAKU,aAC9CwB,UAAW,GAAIC,UAAWnC,KAAKa,cAAeuB,UAAQ,EAACC,UAAWrC,KAAKF,MAAMuC,YAGvF,EAGF,SAAeC,EAAAA,EAAAA,YAAW3C,E","sources":["webpack://tinode-webapp/./src/widgets/phone-edit.jsx"],"sourcesContent":["// Editor for a phone number.\n\nimport React from 'react';\nimport { injectIntl } from 'react-intl';\nimport * as dcodes from '../dcodes.json';\nimport { flagEmoji } from '../lib/strformat';\n\nclass PhoneEdit extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.codeMap = {};\n dcodes.default.forEach(dc => { this.codeMap[dc.code] = dc.dial; });\n\n this.state = {\n countryCode: props.countryCode || 'US',\n dialCode: this.codeMap[props.countryCode || 'US'],\n localNumber: ''\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleFinished = this.handleFinished.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.showCountrySelector = this.showCountrySelector.bind(this);\n }\n\n handleChange(e) {\n this.setState({localNumber: this.filterNumber(e.target.value)});\n }\n\n handleFinished(e) {\n e.preventDefault();\n this.props.onSubmit(this.state.localNumber.trim());\n }\n\n\n handleKeyDown(e) {\n if (e.key === 'Enter') {\n this.handleFinished(e);\n }\n }\n\n showCountrySelector() {\n this.props.onShowCountrySelector(this.state.countryCode, this.state.dialCode);\n }\n\n // Filter out characters not permitted in a phone number.\n filterNumber(number) {\n if (!number) {\n return number;\n }\n // Leave numbers, space, (, ), -, and .\n // The + is not allowed: it's handled by the country code portion.\n return number.replace(/[^-\\s().\\d]/g, '');\n }\n\n render() {\n return (\n <>\n <span className=\"dial-code\" onClick={this.showCountrySelector}>\n <span className=\"country-flag\">{flagEmoji(this.state.countryCode)} </span>\n +{this.state.dialCode} </span>\n <input type=\"tel\" placeholder={this.state.placeholder}\n value={this.state.localNumber} onChange={this.handleChange}\n maxLength={17} onKeyDown={this.handleKeyDown} required autoFocus={this.props.autoFocus} />\n </>\n );\n }\n}\n\nexport default injectIntl(PhoneEdit);\n"],"names":["PhoneEdit","React","constructor","props","super","this","codeMap","dcodes","dc","code","dial","state","countryCode","dialCode","localNumber","handleChange","bind","handleFinished","handleKeyDown","showCountrySelector","e","setState","filterNumber","target","value","preventDefault","onSubmit","trim","key","onShowCountrySelector","number","replace","render","className","onClick","flagEmoji","type","placeholder","onChange","maxLength","onKeyDown","required","autoFocus","injectIntl"],"sourceRoot":""}
|
|
||||||
@@ -1,284 +0,0 @@
|
|||||||
/******/ (() => { // webpackBootstrap
|
|
||||||
/******/ "use strict";
|
|
||||||
/******/ var __webpack_modules__ = ({});
|
|
||||||
/************************************************************************/
|
|
||||||
/******/ // The module cache
|
|
||||||
/******/ var __webpack_module_cache__ = {};
|
|
||||||
/******/
|
|
||||||
/******/ // The require function
|
|
||||||
/******/ function __webpack_require__(moduleId) {
|
|
||||||
/******/ // Check if module is in cache
|
|
||||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
||||||
/******/ if (cachedModule !== undefined) {
|
|
||||||
/******/ return cachedModule.exports;
|
|
||||||
/******/ }
|
|
||||||
/******/ // Create a new module (and put it into the cache)
|
|
||||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
||||||
/******/ // no module.id needed
|
|
||||||
/******/ // no module.loaded needed
|
|
||||||
/******/ exports: {}
|
|
||||||
/******/ };
|
|
||||||
/******/
|
|
||||||
/******/ // Execute the module function
|
|
||||||
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
||||||
/******/
|
|
||||||
/******/ // Return the exports of the module
|
|
||||||
/******/ return module.exports;
|
|
||||||
/******/ }
|
|
||||||
/******/
|
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
|
||||||
/******/ __webpack_require__.m = __webpack_modules__;
|
|
||||||
/******/
|
|
||||||
/************************************************************************/
|
|
||||||
/******/ /* webpack/runtime/chunk loaded */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ var deferred = [];
|
|
||||||
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
|
|
||||||
/******/ if(chunkIds) {
|
|
||||||
/******/ priority = priority || 0;
|
|
||||||
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
|
|
||||||
/******/ deferred[i] = [chunkIds, fn, priority];
|
|
||||||
/******/ return;
|
|
||||||
/******/ }
|
|
||||||
/******/ var notFulfilled = Infinity;
|
|
||||||
/******/ for (var i = 0; i < deferred.length; i++) {
|
|
||||||
/******/ var [chunkIds, fn, priority] = deferred[i];
|
|
||||||
/******/ var fulfilled = true;
|
|
||||||
/******/ for (var j = 0; j < chunkIds.length; j++) {
|
|
||||||
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
|
|
||||||
/******/ chunkIds.splice(j--, 1);
|
|
||||||
/******/ } else {
|
|
||||||
/******/ fulfilled = false;
|
|
||||||
/******/ if(priority < notFulfilled) notFulfilled = priority;
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ if(fulfilled) {
|
|
||||||
/******/ deferred.splice(i--, 1)
|
|
||||||
/******/ var r = fn();
|
|
||||||
/******/ if (r !== undefined) result = r;
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ return result;
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/compat get default export */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
||||||
/******/ __webpack_require__.n = (module) => {
|
|
||||||
/******/ var getter = module && module.__esModule ?
|
|
||||||
/******/ () => (module['default']) :
|
|
||||||
/******/ () => (module);
|
|
||||||
/******/ __webpack_require__.d(getter, { a: getter });
|
|
||||||
/******/ return getter;
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/define property getters */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // define getter functions for harmony exports
|
|
||||||
/******/ __webpack_require__.d = (exports, definition) => {
|
|
||||||
/******/ for(var key in definition) {
|
|
||||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
||||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/ensure chunk */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ __webpack_require__.f = {};
|
|
||||||
/******/ // This file contains only the entry chunk.
|
|
||||||
/******/ // The chunk loading function for additional chunks
|
|
||||||
/******/ __webpack_require__.e = (chunkId) => {
|
|
||||||
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
||||||
/******/ __webpack_require__.f[key](chunkId, promises);
|
|
||||||
/******/ return promises;
|
|
||||||
/******/ }, []));
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // This function allow to reference async chunks
|
|
||||||
/******/ __webpack_require__.u = (chunkId) => {
|
|
||||||
/******/ // return url for filenames based on template
|
|
||||||
/******/ return "" + chunkId + ".dev.js";
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/global */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ __webpack_require__.g = (function() {
|
|
||||||
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
||||||
/******/ try {
|
|
||||||
/******/ return this || new Function('return this')();
|
|
||||||
/******/ } catch (e) {
|
|
||||||
/******/ if (typeof window === 'object') return window;
|
|
||||||
/******/ }
|
|
||||||
/******/ })();
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/load script */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ var inProgress = {};
|
|
||||||
/******/ var dataWebpackPrefix = "tinode-webapp:";
|
|
||||||
/******/ // loadScript function to load a script via script tag
|
|
||||||
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
|
||||||
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
|
||||||
/******/ var script, needAttach;
|
|
||||||
/******/ if(key !== undefined) {
|
|
||||||
/******/ var scripts = document.getElementsByTagName("script");
|
|
||||||
/******/ for(var i = 0; i < scripts.length; i++) {
|
|
||||||
/******/ var s = scripts[i];
|
|
||||||
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ if(!script) {
|
|
||||||
/******/ needAttach = true;
|
|
||||||
/******/ script = document.createElement('script');
|
|
||||||
/******/
|
|
||||||
/******/ script.charset = 'utf-8';
|
|
||||||
/******/ script.timeout = 120;
|
|
||||||
/******/ if (__webpack_require__.nc) {
|
|
||||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
||||||
/******/ }
|
|
||||||
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
||||||
/******/ script.src = url;
|
|
||||||
/******/ }
|
|
||||||
/******/ inProgress[url] = [done];
|
|
||||||
/******/ var onScriptComplete = (prev, event) => {
|
|
||||||
/******/ // avoid mem leaks in IE.
|
|
||||||
/******/ script.onerror = script.onload = null;
|
|
||||||
/******/ clearTimeout(timeout);
|
|
||||||
/******/ var doneFns = inProgress[url];
|
|
||||||
/******/ delete inProgress[url];
|
|
||||||
/******/ script.parentNode && script.parentNode.removeChild(script);
|
|
||||||
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
|
||||||
/******/ if(prev) return prev(event);
|
|
||||||
/******/ };
|
|
||||||
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
||||||
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
||||||
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
||||||
/******/ needAttach && document.head.appendChild(script);
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/make namespace object */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // define __esModule on exports
|
|
||||||
/******/ __webpack_require__.r = (exports) => {
|
|
||||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
||||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
||||||
/******/ }
|
|
||||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
||||||
/******/ };
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/publicPath */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ __webpack_require__.p = "/umd/";
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
||||||
/******/ (() => {
|
|
||||||
/******/ // no baseURI
|
|
||||||
/******/
|
|
||||||
/******/ // object to store loaded and loading chunks
|
|
||||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
||||||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
||||||
/******/ var installedChunks = {
|
|
||||||
/******/ "runtime": 0
|
|
||||||
/******/ };
|
|
||||||
/******/
|
|
||||||
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
|
||||||
/******/ // JSONP chunk loading for javascript
|
|
||||||
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
||||||
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
||||||
/******/
|
|
||||||
/******/ // a Promise means "currently loading".
|
|
||||||
/******/ if(installedChunkData) {
|
|
||||||
/******/ promises.push(installedChunkData[2]);
|
|
||||||
/******/ } else {
|
|
||||||
/******/ if("runtime" != chunkId) {
|
|
||||||
/******/ // setup Promise in chunk cache
|
|
||||||
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
|
||||||
/******/ promises.push(installedChunkData[2] = promise);
|
|
||||||
/******/
|
|
||||||
/******/ // start chunk loading
|
|
||||||
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
||||||
/******/ // create error before stack unwound to get useful stacktrace later
|
|
||||||
/******/ var error = new Error();
|
|
||||||
/******/ var loadingEnded = (event) => {
|
|
||||||
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
|
||||||
/******/ installedChunkData = installedChunks[chunkId];
|
|
||||||
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
||||||
/******/ if(installedChunkData) {
|
|
||||||
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
||||||
/******/ var realSrc = event && event.target && event.target.src;
|
|
||||||
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
||||||
/******/ error.name = 'ChunkLoadError';
|
|
||||||
/******/ error.type = errorType;
|
|
||||||
/******/ error.request = realSrc;
|
|
||||||
/******/ installedChunkData[1](error);
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ };
|
|
||||||
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
|
||||||
/******/ } else installedChunks[chunkId] = 0;
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ };
|
|
||||||
/******/
|
|
||||||
/******/ // no prefetching
|
|
||||||
/******/
|
|
||||||
/******/ // no preloaded
|
|
||||||
/******/
|
|
||||||
/******/ // no HMR
|
|
||||||
/******/
|
|
||||||
/******/ // no HMR manifest
|
|
||||||
/******/
|
|
||||||
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
|
|
||||||
/******/
|
|
||||||
/******/ // install a JSONP callback for chunk loading
|
|
||||||
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
||||||
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
||||||
/******/ // add "moreModules" to the modules object,
|
|
||||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
||||||
/******/ var moduleId, chunkId, i = 0;
|
|
||||||
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
||||||
/******/ for(moduleId in moreModules) {
|
|
||||||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
||||||
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
||||||
/******/ }
|
|
||||||
/******/ }
|
|
||||||
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
||||||
/******/ }
|
|
||||||
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
||||||
/******/ for(;i < chunkIds.length; i++) {
|
|
||||||
/******/ chunkId = chunkIds[i];
|
|
||||||
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
||||||
/******/ installedChunks[chunkId][0]();
|
|
||||||
/******/ }
|
|
||||||
/******/ installedChunks[chunkId] = 0;
|
|
||||||
/******/ }
|
|
||||||
/******/ return __webpack_require__.O(result);
|
|
||||||
/******/ }
|
|
||||||
/******/
|
|
||||||
/******/ var chunkLoadingGlobal = globalThis["webpackChunktinode_webapp"] = globalThis["webpackChunktinode_webapp"] || [];
|
|
||||||
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
||||||
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
||||||
/******/ })();
|
|
||||||
/******/
|
|
||||||
/************************************************************************/
|
|
||||||
/******/
|
|
||||||
/******/
|
|
||||||
/******/ })()
|
|
||||||
;
|
|
||||||
//# sourceMappingURL=runtime.dev.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
|||||||
(()=>{"use strict";var e,r,t,o={},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var t=n[e]={exports:{}};return o[e].call(t.exports,t,t.exports,a),t.exports}a.m=o,e=[],a.O=(r,t,o,n)=>{if(!t){var i=1/0;for(s=0;s<e.length;s++){for(var[t,o,n]=e[s],l=!0,u=0;u<t.length;u++)(!1&n||i>=n)&&Object.keys(a.O).every((e=>a.O[e](t[u])))?t.splice(u--,1):(l=!1,n<i&&(i=n));if(l){e.splice(s--,1);var d=o();void 0!==d&&(r=d)}}return r}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[t,o,n]},a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>e+".prod.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="tinode-webapp:",a.l=(e,o,n,i)=>{if(r[e])r[e].push(o);else{var l,u;if(void 0!==n)for(var d=document.getElementsByTagName("script"),s=0;s<d.length;s++){var p=d[s];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==t+n){l=p;break}}l||(u=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",t+n),l.src=e),r[e]=[o];var c=(t,o)=>{l.onerror=l.onload=null,clearTimeout(f);var n=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),t)return t(o)},f=setTimeout(c.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=c.bind(null,l.onerror),l.onload=c.bind(null,l.onload),u&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.p="/umd/",(()=>{var e={666:0};a.f.j=(r,t)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(666!=r){var n=new Promise(((t,n)=>o=e[r]=[t,n]));t.push(o[2]=n);var i=a.p+a.u(r),l=new Error;a.l(i,(t=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,o[1](l)}}),"chunk-"+r,r)}else e[r]=0},a.O.j=r=>0===e[r];var r=(r,t)=>{var o,n,[i,l,u]=t,d=0;if(i.some((r=>0!==e[r]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);if(u)var s=u(a)}for(r&&r(t);d<i.length;d++)n=i[d],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(s)},t=globalThis.webpackChunktinode_webapp=globalThis.webpackChunktinode_webapp||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
|
|
||||||
//# sourceMappingURL=runtime.prod.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"src_widgets_phone-edit_jsx.dev.js","mappings":";;;;;;;;;;;;;;;;;;;AAE0B;AACc;AACC;AACI;AAE7C,MAAMI,SAAS,SAASJ,4DAAmB,CAAC;EAC1CM,WAAW,CAACC,KAAK,EAAE;IACjB,KAAK,CAACA,KAAK,CAAC;IAEZ,IAAI,CAACC,OAAO,GAAG,CAAC,CAAC;IACjBN,iDAAsB,CAACS,EAAE,IAAI;MAAE,IAAI,CAACH,OAAO,CAACG,EAAE,CAACC,IAAI,CAAC,GAAGD,EAAE,CAACE,IAAI;IAAE,CAAC,CAAC;IAElE,IAAI,CAACC,KAAK,GAAG;MACXC,WAAW,EAAER,KAAK,CAACQ,WAAW,IAAI,IAAI;MACtCC,QAAQ,EAAE,IAAI,CAACR,OAAO,CAACD,KAAK,CAACQ,WAAW,IAAI,IAAI,CAAC;MACjDE,WAAW,EAAE;IACf,CAAC;IAED,IAAI,CAACC,YAAY,GAAG,IAAI,CAACA,YAAY,CAACC,IAAI,CAAC,IAAI,CAAC;IAChD,IAAI,CAACC,cAAc,GAAG,IAAI,CAACA,cAAc,CAACD,IAAI,CAAC,IAAI,CAAC;IACpD,IAAI,CAACE,aAAa,GAAG,IAAI,CAACA,aAAa,CAACF,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACG,mBAAmB,GAAG,IAAI,CAACA,mBAAmB,CAACH,IAAI,CAAC,IAAI,CAAC;EAChE;EAEAD,YAAY,CAACK,CAAC,EAAE;IACd,IAAI,CAACC,QAAQ,CAAC;MAACP,WAAW,EAAE,IAAI,CAACQ,YAAY,CAACF,CAAC,CAACG,MAAM,CAACC,KAAK;IAAC,CAAC,CAAC;EACjE;EAEAP,cAAc,CAACG,CAAC,EAAE;IAChBA,CAAC,CAACK,cAAc,EAAE;IAClB,IAAI,CAACrB,KAAK,CAACsB,QAAQ,CAAC,IAAI,CAACf,KAAK,CAACG,WAAW,CAACa,IAAI,EAAE,CAAC;EACpD;EAGAT,aAAa,CAACE,CAAC,EAAE;IACf,IAAIA,CAAC,CAACQ,GAAG,KAAK,OAAO,EAAE;MACrB,IAAI,CAACX,cAAc,CAACG,CAAC,CAAC;IACxB;EACF;EAEAD,mBAAmB,GAAG;IACpB,IAAI,CAACf,KAAK,CAACyB,qBAAqB,CAAC,IAAI,CAAClB,KAAK,CAACC,WAAW,EAAE,IAAI,CAACD,KAAK,CAACE,QAAQ,CAAC;EAC/E;EAGAS,YAAY,CAACQ,MAAM,EAAE;IACnB,IAAI,CAACA,MAAM,EAAE;MACX,OAAOA,MAAM;IACf;IAGA,OAAOA,MAAM,CAACC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;EAC3C;EAEAC,MAAM,GAAG;IACP,OACE,0HACE;MAAM,SAAS,EAAC,WAAW;MAAC,OAAO,EAAE,IAAI,CAACb;IAAoB,GAC5D;MAAM,SAAS,EAAC;IAAc,GAAEnB,yDAAS,CAAC,IAAI,CAACW,KAAK,CAACC,WAAW,CAAC,EAAC,MAAM,CAAO,KAC9E,EAAC,IAAI,CAACD,KAAK,CAACE,QAAQ,EAAC,MAAM,CAAO,EACrC;MAAO,IAAI,EAAC,KAAK;MAAC,WAAW,EAAE,IAAI,CAACF,KAAK,CAACsB,WAAY;MAClD,KAAK,EAAE,IAAI,CAACtB,KAAK,CAACG,WAAY;MAAC,QAAQ,EAAE,IAAI,CAACC,YAAa;MAC3D,SAAS,EAAE,EAAG;MAAC,SAAS,EAAE,IAAI,CAACG,aAAc;MAAC,QAAQ;MAAC,SAAS,EAAE,IAAI,CAACd,KAAK,CAAC8B;IAAU,EAAG,CAC7F;EAEP;AACF;AAEA,iEAAepC,sDAAU,CAACG,SAAS,CAAC","sources":["webpack://tinode-webapp/./src/widgets/phone-edit.jsx"],"sourcesContent":["// Editor for a phone number.\n\nimport React from 'react';\nimport { injectIntl } from 'react-intl';\nimport * as dcodes from '../dcodes.json';\nimport { flagEmoji } from '../lib/strformat';\n\nclass PhoneEdit extends React.PureComponent {\n constructor(props) {\n super(props);\n\n this.codeMap = {};\n dcodes.default.forEach(dc => { this.codeMap[dc.code] = dc.dial; });\n\n this.state = {\n countryCode: props.countryCode || 'US',\n dialCode: this.codeMap[props.countryCode || 'US'],\n localNumber: ''\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleFinished = this.handleFinished.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.showCountrySelector = this.showCountrySelector.bind(this);\n }\n\n handleChange(e) {\n this.setState({localNumber: this.filterNumber(e.target.value)});\n }\n\n handleFinished(e) {\n e.preventDefault();\n this.props.onSubmit(this.state.localNumber.trim());\n }\n\n\n handleKeyDown(e) {\n if (e.key === 'Enter') {\n this.handleFinished(e);\n }\n }\n\n showCountrySelector() {\n this.props.onShowCountrySelector(this.state.countryCode, this.state.dialCode);\n }\n\n // Filter out characters not permitted in a phone number.\n filterNumber(number) {\n if (!number) {\n return number;\n }\n // Leave numbers, space, (, ), -, and .\n // The + is not allowed: it's handled by the country code portion.\n return number.replace(/[^-\\s().\\d]/g, '');\n }\n\n render() {\n return (\n <>\n <span className=\"dial-code\" onClick={this.showCountrySelector}>\n <span className=\"country-flag\">{flagEmoji(this.state.countryCode)} </span>\n +{this.state.dialCode} </span>\n <input type=\"tel\" placeholder={this.state.placeholder}\n value={this.state.localNumber} onChange={this.handleChange}\n maxLength={17} onKeyDown={this.handleKeyDown} required autoFocus={this.props.autoFocus} />\n </>\n );\n }\n}\n\nexport default injectIntl(PhoneEdit);\n"],"names":["React","injectIntl","dcodes","flagEmoji","PhoneEdit","PureComponent","constructor","props","codeMap","default","forEach","dc","code","dial","state","countryCode","dialCode","localNumber","handleChange","bind","handleFinished","handleKeyDown","showCountrySelector","e","setState","filterNumber","target","value","preventDefault","onSubmit","trim","key","onShowCountrySelector","number","replace","render","placeholder","autoFocus"],"sourceRoot":""}
|
|
||||||
Reference in New Issue
Block a user