????
Current Path : C:/inetpub/vhost/bcvt.kontum.gov.vn/www/ |
Current File : C:/inetpub/vhost/bcvt.kontum.gov.vn/www/53-es5.js |
(function () { var absMids = { "esri/core/cookie": "./node_modules/arcgis-js-api/core/cookie.js", "esri/identity/Credential": "./node_modules/arcgis-js-api/identity/Credential.js", "esri/identity/IdentityManager": "./node_modules/arcgis-js-api/identity/IdentityManager.js", "esri/identity/IdentityManagerBase": "./node_modules/arcgis-js-api/identity/IdentityManagerBase.js", "esri/identity/IdentityManagerDialog": "./node_modules/arcgis-js-api/identity/IdentityManagerDialog.js", "esri/identity/OAuthCredential": "./node_modules/arcgis-js-api/identity/OAuthCredential.js", "esri/identity/OAuthInfo": "./node_modules/arcgis-js-api/identity/OAuthInfo.js", "esri/identity/OAuthSignInHandler": "./node_modules/arcgis-js-api/identity/OAuthSignInHandler.js", "esri/identity/ServerInfo": "./node_modules/arcgis-js-api/identity/ServerInfo.js", "esri/identity/nls/identity": "./node_modules/arcgis-js-api/identity/nls/identity.js", "esri/identity/nls/vi/identity": "./node_modules/arcgis-js-api/identity/nls/vi/identity.js", "dijit/BackgroundIframe": "./node_modules/dijit/BackgroundIframe.js", "dijit/Destroyable": "./node_modules/dijit/Destroyable.js", "dijit/Dialog": "./node_modules/dijit/Dialog.js", "dijit/DialogUnderlay": "./node_modules/dijit/DialogUnderlay.js", "dijit/Tooltip": "./node_modules/dijit/Tooltip.js", "dijit/Viewport": "./node_modules/dijit/Viewport.js", "dijit/_AttachMixin": "./node_modules/dijit/_AttachMixin.js", "dijit/_BidiMixin": "./node_modules/dijit/_BidiMixin.js", "dijit/_Container": "./node_modules/dijit/_Container.js", "dijit/_CssStateMixin": "./node_modules/dijit/_CssStateMixin.js", "dijit/_DialogMixin": "./node_modules/dijit/_DialogMixin.js", "dijit/_FocusMixin": "./node_modules/dijit/_FocusMixin.js", "dijit/_OnDijitClickMixin": "./node_modules/dijit/_OnDijitClickMixin.js", "dijit/_TemplatedMixin": "./node_modules/dijit/_TemplatedMixin.js", "dijit/_Widget": "./node_modules/dijit/_Widget.js", "dijit/_WidgetBase": "./node_modules/dijit/_WidgetBase.js", "dijit/_base/manager": "./node_modules/dijit/_base/manager.js", "dijit/a11y": "./node_modules/dijit/a11y.js", "dijit/a11yclick": "./node_modules/dijit/a11yclick.js", "dijit/focus": "./node_modules/dijit/focus.js", "dijit/form/Button": "./node_modules/dijit/form/Button.js", "dijit/form/Form": "./node_modules/dijit/form/Form.js", "dijit/form/TextBox": "./node_modules/dijit/form/TextBox.js", "dijit/form/ValidationTextBox": "./node_modules/dijit/form/ValidationTextBox.js", "dijit/form/_ButtonMixin": "./node_modules/dijit/form/_ButtonMixin.js", "dijit/form/_FormMixin": "./node_modules/dijit/form/_FormMixin.js", "dijit/form/_FormValueMixin": "./node_modules/dijit/form/_FormValueMixin.js", "dijit/form/_FormValueWidget": "./node_modules/dijit/form/_FormValueWidget.js", "dijit/form/_FormWidget": "./node_modules/dijit/form/_FormWidget.js", "dijit/form/_FormWidgetMixin": "./node_modules/dijit/form/_FormWidgetMixin.js", "dijit/form/_TextBoxMixin": "./node_modules/dijit/form/_TextBoxMixin.js", "dijit/form/nls/validate": "./node_modules/dijit/form/nls/validate.js", "dijit/form/nls/vi/validate": "./node_modules/dijit/form/nls/vi/validate.js", "dijit/hccss": "./node_modules/dijit/hccss.js", "dijit/layout/ContentPane": "./node_modules/dijit/layout/ContentPane.js", "dijit/layout/_ContentPaneResizeMixin": "./node_modules/dijit/layout/_ContentPaneResizeMixin.js", "dijit/layout/utils": "./node_modules/dijit/layout/utils.js", "dijit/main": "./node_modules/dijit/main.js", "dijit/nls/common": "./node_modules/dijit/nls/common.js", "dijit/nls/loading": "./node_modules/dijit/nls/loading.js", "dijit/nls/vi/common": "./node_modules/dijit/nls/vi/common.js", "dijit/nls/vi/loading": "./node_modules/dijit/nls/vi/loading.js", "dijit/place": "./node_modules/dijit/place.js", "dijit/registry": "./node_modules/dijit/registry.js", "dojo/i18n!esri/identity/nls/identity": "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/arcgis-js-api/identity/nls/identity.js", "dojo/i18n!dijit/form/nls/validate": "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/form/nls/validate.js", "dojo/i18n!dijit/nls/common": "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/nls/common.js", "dojo/i18n!dijit/nls/loading": "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/nls/loading.js", "dojo/text!dijit/form/templates/Button.html": "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/Button.html", "dojo/text!dijit/form/templates/TextBox.html": "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/TextBox.html", "dojo/text!dijit/form/templates/ValidationTextBox.html": "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/ValidationTextBox.html", "dojo/text!dijit/templates/Dialog.html": "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/templates/Dialog.html", "dojo/text!dijit/templates/Tooltip.html": "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/templates/Tooltip.html", "dojo/_base/fx": "./node_modules/dojo/_base/fx.js", "dojo/_base/url": "./node_modules/dojo/_base/url.js", "dojo/cache": "./node_modules/dojo/cache.js", "dojo/date/stamp": "./node_modules/dojo/date/stamp.js", "dojo/dnd/Moveable": "./node_modules/dojo/dnd/Moveable.js", "dojo/dnd/Mover": "./node_modules/dojo/dnd/Mover.js", "dojo/dnd/TimedMoveable": "./node_modules/dojo/dnd/TimedMoveable.js", "dojo/dnd/autoscroll": "./node_modules/dojo/dnd/autoscroll.js", "dojo/dnd/common": "./node_modules/dojo/dnd/common.js", "dojo/dom-class": "./node_modules/dojo/dom-class.js", "dojo/domReady": "./node_modules/dojo/domReady.js", "dojo/hccss": "./node_modules/dojo/hccss.js", "dojo/html": "./node_modules/dojo/html.js", "dojo/parser": "./node_modules/dojo/parser.js", "dojo/query": "./node_modules/dojo/query.js", "dojo/ready": "./node_modules/dojo/ready.js", "dojo/request": "./node_modules/dojo/request.js", "dojo/selector/_loader": "./node_modules/dojo/selector/_loader.js", "dojo/selector/lite": "./node_modules/dojo/selector/lite.js", "dojo/selector/_loader!default": "./node_modules/dojo/selector/lite.js", "dojo/string": "./node_modules/dojo/string.js", "dojo/text": "./node_modules/dojo/text.js", "dojo/touch": "./node_modules/dojo/touch.js", "dojo/uacss": "./node_modules/dojo/uacss.js", "dojo/window": "./node_modules/dojo/window.js" }; var globalObj = this || window; var jsonpArray = globalObj["webpackJsonp"] = globalObj["webpackJsonp"] || []; if (jsonpArray.registerAbsMids) { jsonpArray.registerAbsMids(absMids); } else { var absMidsWaiting = jsonpArray.absMidsWaiting = jsonpArray.absMidsWaiting || []; absMidsWaiting.push(absMids); } })(), (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[53], { /***/ "./node_modules/arcgis-js-api/core/cookie.js": /*!***************************************************!*\ !*** ./node_modules/arcgis-js-api/core/cookie.js ***! \***************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiCoreCookieJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, i) { function o(e, i, o) { void 0 === o && (o = {}); var r = o.expires; if ("number" == typeof r) { var t = new Date(); t.setTime(t.getTime() + 24 * r * 60 * 60 * 1e3), r = o.expires = t; } "string" != typeof r && (o.expires = r.toUTCString()); var n = e + "=" + encodeURIComponent(i); for (var f in o) { n += "; " + f; var p = o[f]; !0 !== p && (n += "=" + p); } document.cookie = n; } Object.defineProperty(i, "__esModule", { value: !0 }), i.writeCookie = o; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/Credential.js": /*!***********************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/Credential.js ***! \***********************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityCredentialJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports, __webpack_require__( /*! ./IdentityManagerBase */ "./node_modules/arcgis-js-api/identity/IdentityManagerBase.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, n, r) { return r.Credential; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/IdentityManager.js": /*!****************************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/IdentityManager.js ***! \****************************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityIdentityManagerJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports, __webpack_require__( /*! ../kernel */ "./node_modules/arcgis-js-api/kernel.js"), __webpack_require__( /*! ../core/declare */ "./node_modules/arcgis-js-api/core/declare.js"), __webpack_require__( /*! ./IdentityManagerDialog */ "./node_modules/arcgis-js-api/identity/IdentityManagerDialog.js"), __webpack_require__( /*! ./OAuthSignInHandler */ "./node_modules/arcgis-js-api/identity/OAuthSignInHandler.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, n, r, i, a, t) { var d = new a(), l = i.safeMixin(d, t); return r.id = l, l; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/IdentityManagerBase.js": /*!********************************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/IdentityManagerBase.js ***! \********************************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityIdentityManagerBaseJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports, __webpack_require__( /*! ../core/tsSupport/assignHelper */ "./node_modules/arcgis-js-api/core/tsSupport/assignHelper.js"), __webpack_require__( /*! ../core/tsSupport/declareExtendsHelper */ "./node_modules/arcgis-js-api/core/tsSupport/declareExtendsHelper.js"), __webpack_require__( /*! ../core/tsSupport/decorateHelper */ "./node_modules/arcgis-js-api/core/tsSupport/decorateHelper.js"), __webpack_require__( /*! ../config */ "./node_modules/arcgis-js-api/config.js"), __webpack_require__( /*! ../kernel */ "./node_modules/arcgis-js-api/kernel.js"), __webpack_require__( /*! ../request */ "./node_modules/arcgis-js-api/request.js"), __webpack_require__( /*! ../core/cookie */ "./node_modules/arcgis-js-api/core/cookie.js"), __webpack_require__( /*! ../core/Error */ "./node_modules/arcgis-js-api/core/Error.js"), __webpack_require__( /*! ../core/Evented */ "./node_modules/arcgis-js-api/core/Evented.js"), __webpack_require__( /*! ../core/global */ "./node_modules/arcgis-js-api/core/global.js"), __webpack_require__( /*! ../core/lang */ "./node_modules/arcgis-js-api/core/lang.js"), __webpack_require__( /*! ../core/object */ "./node_modules/arcgis-js-api/core/object.js"), __webpack_require__( /*! ../core/promiseUtils */ "./node_modules/arcgis-js-api/core/promiseUtils.js"), __webpack_require__( /*! ../core/string */ "./node_modules/arcgis-js-api/core/string.js"), __webpack_require__( /*! ../core/urlUtils */ "./node_modules/arcgis-js-api/core/urlUtils.js"), __webpack_require__( /*! ../core/urlUtils */ "./node_modules/arcgis-js-api/core/urlUtils.js"), __webpack_require__( /*! ../core/accessorSupport/decorators */ "./node_modules/arcgis-js-api/core/accessorSupport/decorators.js"), __webpack_require__( /*! ./OAuthCredential */ "./node_modules/arcgis-js-api/identity/OAuthCredential.js"), __webpack_require__( /*! ./OAuthInfo */ "./node_modules/arcgis-js-api/identity/OAuthInfo.js"), __webpack_require__( /*! ./ServerInfo */ "./node_modules/arcgis-js-api/identity/ServerInfo.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, r, t, i, s, n, o, a, l, h, u, c, p, d, f, v, _, g, m, S, y, w) { Object.defineProperty(r, "__esModule", { value: !0 }); var I = {}, k = function k(e) { var r = new g.Url(e.owningSystemUrl).host, t = new g.Url(e.server).host, i = /.+\.arcgis\.com$/i; return i.test(r) && i.test(t); }, U = function U(e, r) { return !!(k(e) && r && r.some(function (r) { return r.test(e.server); })); }, A = function (e) { function r() { var r = e.call(this) || this; return r._portalConfig = c.esriGeowConfig, r.serverInfos = [], r.oAuthInfos = [], r.credentials = [], r._soReqs = [], r._xoReqs = [], r._portals = [], r.defaultOAuthInfo = null, r.defaultTokenValidity = 60, r.tokenValidity = null, r.signInPage = null, r.useSignInPage = !0, r.normalizeWebTierAuth = !1, r._busy = null, r._rejectOnPersistedPageShow = !1, r._oAuthHash = null, r._gwTokenUrl = "/sharing/rest/generateToken", r._agsRest = "/rest/services", r._agsPortal = /\/sharing(\/|$)/i, r._agsAdmin = /(https?:\/\/[^\/]+\/[^\/]+)\/admin\/?(\/.*)?$/i, r._adminSvcs = /\/rest\/admin\/services(\/|$)/i, r._agolSuffix = ".arcgis.com", r._gwDomains = [{ regex: /^https?:\/\/www\.arcgis\.com/i, tokenServiceUrl: "https://www.arcgis.com/sharing/rest/generateToken" }, { regex: /^https?:\/\/dev\.arcgis\.com/i, tokenServiceUrl: "https://dev.arcgis.com/sharing/rest/generateToken" }, { regex: /^https?:\/\/[\w\.]*dev[^.]*\.arcgis\.com/i, tokenServiceUrl: "https://devext.arcgis.com/sharing/rest/generateToken" }, { regex: /^https?:\/\/[\w\.]*qa[^.]*\.arcgis\.com/i, tokenServiceUrl: "https://qaext.arcgis.com/sharing/rest/generateToken" }, { regex: /^https?:\/\/[\w\.]*\.arcgis\.com/i, tokenServiceUrl: "https://www.arcgis.com/sharing/rest/generateToken" }], r._legacyFed = [], r._regexSDirUrl = /http.+\/rest\/services\/?/gi, r._regexServerType = /(\/(MapServer|GeocodeServer|GPServer|GeometryServer|ImageServer|NAServer|FeatureServer|GeoDataServer|GlobeServer|MobileServer|GeoenrichmentServer|VectorTileServer|SceneServer)).*/gi, r._gwUser = /http.+\/users\/([^\/]+)\/?.*/i, r._gwItem = /http.+\/items\/([^\/]+)\/?.*/i, r._gwGroup = /http.+\/groups\/([^\/]+)\/?.*/i, r._rePortalTokenSvc = /\/sharing(\/rest)?\/generatetoken/i, r._createDefaultOAuthInfo = !0, r._hasTestedIfAppIsOnPortal = !1, r._getOAuthHash(), window.addEventListener("pageshow", function (e) { r._pageShowHandler(e); }), r; } return i(r, e), r.prototype.registerServers = function (e) { var r = this, t = this.serverInfos; t ? (e = e.filter(function (e) { return !r.findServerInfo(e.server); }), this.serverInfos = t.concat(e)) : this.serverInfos = e, e.forEach(function (e) { e.owningSystemUrl && r._portals.push(e.owningSystemUrl), e.hasPortal && r._portals.push(e.server); }); }, r.prototype.registerOAuthInfos = function (e) { var r = this, t = this.oAuthInfos; t ? (e = e.filter(function (e) { return !r.findOAuthInfo(e.portalUrl); }), this.oAuthInfos = t.concat(e)) : this.oAuthInfos = e; }, r.prototype.registerToken = function (e) { e = t({}, e); var r, i = this._sanitizeUrl(e.server), s = this._isServerRsrc(i), n = this.findServerInfo(i), o = !0; n || (n = new w(), n.server = this._getServerInstanceRoot(i), s ? n.hasServer = !0 : (n.tokenServiceUrl = this._getTokenSvcUrl(i), n.hasPortal = !0), this.registerServers([n])), r = this._findCredential(i), r ? (delete e.server, p.mixin(r, e), o = !1) : (r = new T({ userId: e.userId, server: n.server, token: e.token, expires: e.expires, ssl: e.ssl, scope: s ? "server" : "portal" }), r.resources = [i], this.credentials.push(r)), r.emitTokenChange(!1), o || r.refreshServerTokens(); }, r.prototype.toJSON = function () { return p.fixJson({ serverInfos: this.serverInfos.map(function (e) { return e.toJSON(); }), oAuthInfos: this.oAuthInfos.map(function (e) { return e.toJSON(); }), credentials: this.credentials.map(function (e) { return e.toJSON(); }) }); }, r.prototype.initialize = function (e) { var r = this; if (e) { "string" == typeof e && (e = JSON.parse(e)); var t = e.serverInfos, i = e.oAuthInfos, s = e.credentials; if (t) { var n = []; t.forEach(function (e) { e.server && e.tokenServiceUrl && n.push(e.declaredClass ? e : new w(e)); }), n.length && this.registerServers(n); } if (i) { var o = []; i.forEach(function (e) { e.appId && o.push(e.declaredClass ? e : new y(e)); }), o.length && this.registerOAuthInfos(o); } s && s.forEach(function (e) { e.server && e.token && e.expires && e.expires > Date.now() && (e = e.declaredClass ? e : new T(e), e.emitTokenChange(), r.credentials.push(e)); }); } }, r.prototype.findServerInfo = function (e) { var r; e = this._sanitizeUrl(e); for (var t = 0, i = this.serverInfos; t < i.length; t++) { var s = i[t]; if (this._hasSameServerInstance(s.server, e)) { r = s; break; } } return r; }, r.prototype.findOAuthInfo = function (e) { var r; e = this._sanitizeUrl(e); for (var t = 0, i = this.oAuthInfos; t < i.length; t++) { var s = i[t]; if (this._hasSameServerInstance(s.portalUrl, e)) { r = s; break; } } return r; }, r.prototype.findCredential = function (e, r) { var t, i; if (e = this._sanitizeUrl(e), i = this._isServerRsrc(e) ? "server" : "portal", r) for (var s = 0, n = this.credentials; s < n.length; s++) { var o = n[s]; if (this._hasSameServerInstance(o.server, e) && r === o.userId && o.scope === i) { t = o; break; } } else for (var a = 0, l = this.credentials; a < l.length; a++) { var o = l[a]; if (this._hasSameServerInstance(o.server, e) && -1 !== this._getIdenticalSvcIdx(e, o) && o.scope === i) { t = o; break; } } return t; }, r.prototype.getCredential = function (e, r) { var i, s, n = !0; r && (i = !!r.token, s = r.error, n = !1 !== r.prompt), r = t({}, r), e = this._sanitizeUrl(e); var o = f.createAbortController(), a = f.createResolver(function () { o.abort(); }); if (r && r.signal && f.onAbort(r.signal, function () { o.abort(); }), f.onAbort(o, function () { a.reject(new h("identity-manager:user-aborted", "ABORTED")); }), f.isAborted(o)) return a.promise; r.signal = o.signal; var u, c = this._isAdminResource(e), p = i && this._doPortalSignIn(e) ? this._getEsriAuthCookie() : null, d = i ? this.findCredential(e) : null; if (d && s && s.details && 498 === s.details.httpStatus) d.destroy(), p && p.token === r.token && (l.writeCookie("esri_auth", null, { expires: -1, path: "/", domain: document.domain }), v.endsWith(window.location.hostname, ".arcgis.com") && l.writeCookie("esri_auth", null, { expires: -1, path: "/", domain: "arcgis.com" }));else if (p || d) { var _ = p && p.email || d && d.userId; return u = new h("identity-manager:not-authorized", "You are currently signed in as: '" + _ + "'. You do not have access to this resource: " + e, { error: s }), a.reject(u), a.promise; } var g = this._findCredential(e, r); if (g) return a.resolve(g), a.promise; var m = this.findServerInfo(e); if (m) !m.hasServer && this._isServerRsrc(e) && (m._restInfoPms = this._getTokenSvcUrl(e), m.hasServer = !0);else { var S = this._getTokenSvcUrl(e); if (!S) return u = new h("identity-manager:unknown-resource", "Unknown resource - could not find token service endpoint."), a.reject(u), a.promise; m = new w(), m.server = this._getServerInstanceRoot(e), "string" == typeof S ? (m.tokenServiceUrl = S, m.hasPortal = !0) : (m._restInfoPms = S, m.hasServer = !0), this.registerServers([m]); } return n && m.hasPortal && void 0 === m._selfReq && !this._findOAuthInfo(e) && (m._selfReq = { owningTenant: r && r.owningTenant, selfDfd: this._getPortalSelf(m.tokenServiceUrl.replace(this._rePortalTokenSvc, "/sharing/rest/portals/self"), e) }), this._enqueue(e, m, r, a, c); }, r.prototype.getResourceName = function (e) { return this._isRESTService(e) ? e.replace(this._regexSDirUrl, "").replace(this._regexServerType, "") || "" : this._gwUser.test(e) && e.replace(this._gwUser, "$1") || this._gwItem.test(e) && e.replace(this._gwItem, "$1") || this._gwGroup.test(e) && e.replace(this._gwGroup, "$1") || ""; }, r.prototype.generateToken = function (e, r, t) { var i, s, n, l, u, c, d, f, v, m, S = this._rePortalTokenSvc.test(e.tokenServiceUrl), y = new g.Url(window.location.href.toLowerCase()), w = this._getEsriAuthCookie(), k = e.shortLivedTokenValidity; return r && (m = o.id.tokenValidity || k || o.id.defaultTokenValidity) > k && k > 0 && (m = k), t && (s = t.isAdmin, n = t.serverUrl, l = t.token, d = t.signal, f = t.ssl, e.customParameters = t.customParameters), s ? u = e.adminTokenServiceUrl : (u = e.tokenServiceUrl, c = new g.Url(u.toLowerCase()), w && (i = w.auth_tier, i = i && i.toLowerCase()), ("web" === i || e.webTierAuth) && t && t.serverUrl && !f && "http" === y.scheme && (_.hasSameOrigin(y.uri, u, !0) || "https" === c.scheme && y.host === c.host && "7080" === y.port && "7443" === c.port) && (u = u.replace(/^https:/i, "http:").replace(/:7443/i, ":7080"))), v = p.mixin({ query: p.mixin({ request: "getToken", username: r && r.username, password: r && r.password, serverUrl: n, token: l, expiration: m, referer: s || S ? window.location.host : null, client: s ? "referer" : null, f: "json" }, e.customParameters), method: "post", authMode: "anonymous", useProxy: this._useProxy(e, t), responseType: "json", signal: d }, t && t.ioArgs), S || (v.withCredentials = !1), a(u, v).then(function (t) { var i = t.data; if (!i || !i.token) return new h("identity-manager:authentication-failed", "Unable to generate token"); var s = e.server; return I[s] || (I[s] = {}), r && (I[s][r.username] = r.password), i.validity = m, i; }); }, r.prototype.isBusy = function () { return !!this._busy; }, r.prototype.checkSignInStatus = function (e) { return this.checkAppAccess(e, "").then(function (e) { return e.credential; }); }, r.prototype.checkAppAccess = function (e, r, t) { var i = this, s = !1; return this.getCredential(e, { prompt: !1 }).then(function (n) { var o, l = { f: "json" }; if ("portal" === n.scope) { if (r && (i._doPortalSignIn(e, !0) || t && t.force)) o = n.server + "/sharing/rest/oauth2/validateAppAccess", l.client_id = r;else { if (!n.token) return { credential: n }; o = n.server + "/sharing/rest"; } } else { if (!n.token) return { credential: n }; o = n.server + "/rest/services"; } return n.token && (l.token = n.token), a(o, { query: l, authMode: "anonymous" }).then(function (e) { if (!1 === e.data.valid) throw new h("identity-manager:not-authorized", "You are currently signed in as: '" + n.userId + "'."); return s = !!e.data.viewOnlyUserTypeApp, { credential: n }; })["catch"](function (e) { if ("identity-manager:not-authorized" === e.name) throw e; var r = e.details && e.details.httpStatus; if (498 === r) throw n.destroy(), new h("identity-manager:not-authenticated", "User is not signed in."); if (400 === r) throw new h("identity-manager:invalid-request"); return { credential: n }; }); }).then(function (e) { return { credential: e.credential, viewOnly: s }; }); }, r.prototype.setRedirectionHandler = function (e) { this._redirectFunc = e; }, r.prototype.setProtocolErrorHandler = function (e) { this._protocolFunc = e; }, r.prototype.destroyCredentials = function () { if (this.credentials) { this.credentials.slice().forEach(function (e) { e.destroy(); }); } this.emit("credentials-destroy"); }, r.prototype._getOAuthHash = function () { var e = window.location.hash; if (e) { "#" === e.charAt(0) && (e = e.substring(1)); var r = _.queryToObject(e), t = !1; r.access_token && r.expires_in && r.state && r.hasOwnProperty("username") ? (r.state = JSON.parse(r.state), this._oAuthHash = r, t = !0) : r.error && r.error_description && (console.log("IdentityManager OAuth Error: ", r.error, " - ", r.error_description), "access_denied" === r.error && (t = !0)), t && (window.location.hash = "object" == typeof r.state && r.state.hash || ""); } }, r.prototype._pageShowHandler = function (e) { if (e.persisted && this.isBusy() && this._rejectOnPersistedPageShow) { var r = new h("identity-manager:user-aborted", "ABORTED"); this._errbackFunc(r); } }, r.prototype._findCredential = function (e, r) { var t, i, s, n, o = this, a = -1, l = r && r.token, h = r && r.resource, u = this._isServerRsrc(e) ? "server" : "portal", c = this.credentials.filter(function (r) { return o._hasSameServerInstance(r.server, e) && r.scope === u; }); if (e = h || e, c.length) if (1 === c.length) { if (t = c[0], n = this.findServerInfo(t.server), i = n && n.owningSystemUrl, s = i && this.findCredential(i, t.userId), a = this._getIdenticalSvcIdx(e, t), !l) return -1 === a && t.resources.push(e), this._addResource(e, s), t; -1 !== a && (t.resources.splice(a, 1), this._removeResource(e, s)); } else { var p, d; if (c.some(function (r) { return -1 !== (d = o._getIdenticalSvcIdx(e, r)) && (p = r, n = o.findServerInfo(p.server), i = n && n.owningSystemUrl, s = i && o.findCredential(i, p.userId), a = d, !0); }), l) p && (p.resources.splice(a, 1), this._removeResource(e, s));else if (p) return this._addResource(e, s), p; } }, r.prototype._findOAuthInfo = function (e) { var r = this.findOAuthInfo(e); if (!r) for (var t = 0, i = this.oAuthInfos; t < i.length; t++) { var s = i[t]; if (this._isIdProvider(s.portalUrl, e)) { r = s; break; } } return r; }, r.prototype._addResource = function (e, r) { r && -1 === this._getIdenticalSvcIdx(e, r) && r.resources.push(e); }, r.prototype._removeResource = function (e, r) { var t = -1; r && (t = this._getIdenticalSvcIdx(e, r)) > -1 && r.resources.splice(t, 1); }, r.prototype._useProxy = function (e, r) { return r && r.isAdmin && !_.hasSameOrigin(e.adminTokenServiceUrl, window.location.href) || !this._isPortalDomain(e.tokenServiceUrl) && "10.1" === String(e.currentVersion) && !_.hasSameOrigin(e.tokenServiceUrl, window.location.href); }, r.prototype._getOrigin = function (e) { var r = new g.Url(e); return r.scheme + "://" + r.host + (null != r.port ? ":" + r.port : ""); }, r.prototype._getServerInstanceRoot = function (e) { var r = e.toLowerCase(), t = r.indexOf(this._agsRest); return -1 === t && this._isAdminResource(e) && (t = this._agsAdmin.test(e) ? e.replace(this._agsAdmin, "$1").length : e.search(this._adminSvcs)), -1 === t && (t = r.indexOf("/sharing")), -1 === t && "/" === r.substr(-1) && (t = r.length - 1), t > -1 ? e.substring(0, t) : e; }, r.prototype._hasSameServerInstance = function (e, r) { return "/" === e.substr(-1) && (e = e.slice(0, -1)), e = e.toLowerCase(), r = this._getServerInstanceRoot(r).toLowerCase(), e = this._normalizeAGOLorgDomain(e), r = this._normalizeAGOLorgDomain(r), e = e.substr(e.indexOf(":")), r = r.substr(r.indexOf(":")), e === r; }, r.prototype._normalizeAGOLorgDomain = function (e) { var r = /^https?:\/\/.+\.maps\.arcgis\.com/i, t = /^https?:\/\/.+\.mapsdevext\.arcgis\.com/i, i = /^https?:\/\/.+\.mapsqa\.arcgis\.com/i; return r.test(e) ? e = e.replace(r, "https://www.arcgis.com") : t.test(e) ? e = e.replace(t, "https://devext.arcgis.com") : i.test(e) && (e = e.replace(i, "https://qaext.arcgis.com")), e; }, r.prototype._sanitizeUrl = function (e) { var r = (n.request.proxyUrl || "").toLowerCase(), t = r ? e.toLowerCase().indexOf(r + "?") : -1; return -1 !== t && (e = e.substring(t + r.length + 1)), e = _.normalize(e), _.urlToObject(e).path; }, r.prototype._isRESTService = function (e) { return e.indexOf(this._agsRest) > -1; }, r.prototype._isAdminResource = function (e) { return this._agsAdmin.test(e) || this._adminSvcs.test(e); }, r.prototype._isServerRsrc = function (e) { return this._isRESTService(e) || this._isAdminResource(e); }, r.prototype._isIdenticalService = function (e, r) { var t; if (this._isRESTService(e) && this._isRESTService(r)) { var i = this._getSuffix(e).toLowerCase(), s = this._getSuffix(r).toLowerCase(); if (!(t = i === s)) { var n = /(.*)\/(MapServer|FeatureServer).*/gi; t = i.replace(n, "$1") === s.replace(n, "$1"); } } else this._isAdminResource(e) && this._isAdminResource(r) ? t = !0 : this._isServerRsrc(e) || this._isServerRsrc(r) || !this._isPortalDomain(e) || (t = !0); return t; }, r.prototype._isPortalDomain = function (e) { var r = this, t = new g.Url(e.toLowerCase()), i = this._portalConfig, s = t.authority && -1 !== t.authority.indexOf(this._agolSuffix); return !s && i && (s = this._hasSameServerInstance(this._getServerInstanceRoot(i.restBaseUrl), t.uri)), s || n.portalUrl && (s = _.hasSameOrigin(e, n.portalUrl, !0)), s || (s = this._portals.some(function (e) { return r._hasSameServerInstance(e, t.uri); })), s = s || this._agsPortal.test(t.path); }, r.prototype._isIdProvider = function (e, r) { var t = -1, i = -1; this._gwDomains.forEach(function (s, n) { -1 === t && s.regex.test(e) && (t = n), -1 === i && s.regex.test(r) && (i = n); }); var s = !1; if (t > -1 && i > -1 && (0 === t || 4 === t ? 0 !== i && 4 !== i || (s = !0) : 1 === t ? 1 !== i && 2 !== i || (s = !0) : 2 === t ? 2 === i && (s = !0) : 3 === t && 3 === i && (s = !0)), !s) { var n = this.findServerInfo(r), o = n && n.owningSystemUrl; o && k(n) && this._isPortalDomain(o) && this._isIdProvider(e, o) && (s = !0); } return s; }, r.prototype._getIdenticalSvcIdx = function (e, r) { for (var t = -1, i = 0; i < r.resources.length; i++) { var s = r.resources[i]; if (this._isIdenticalService(e, s)) { t = i; break; } } return t; }, r.prototype._getSuffix = function (e) { return e.replace(this._regexSDirUrl, "").replace(this._regexServerType, "$1"); }, r.prototype._getTokenSvcUrl = function (e) { var r, t, i, s = this; if (this._isRESTService(e) || this._isAdminResource(e)) { var n = this._getServerInstanceRoot(e); return r = n + "/admin/generateToken", e = n + "/rest/info", t = a(e, { query: { f: "json" }, responseType: "json" }).then(function (e) { return e.data; }), { adminUrl: r, promise: t }; } if (this._isPortalDomain(e)) { var o = ""; if (this._gwDomains.some(function (r) { return r.regex.test(e) && (o = r.tokenServiceUrl), !!o; }), o || this._portals.some(function (r) { return s._hasSameServerInstance(r, e) && (o = r + s._gwTokenUrl), !!o; }), o || -1 !== (i = e.toLowerCase().indexOf("/sharing")) && (o = e.substring(0, i) + this._gwTokenUrl), o || (o = this._getOrigin(e) + this._gwTokenUrl), o) { var l = new g.Url(e).port; /^http:\/\//i.test(e) && "7080" === l && (o = o.replace(/:7080/i, ":7443")), o = o.replace(/http:/i, "https:"); } return o; } if (-1 !== e.toLowerCase().indexOf("premium.arcgisonline.com")) return "https://premium.arcgisonline.com/server/tokens"; }, r.prototype._getPortalSelf = function (e, r) { return "https:" === window.location.protocol ? e = e.replace(/^http:/i, "https:").replace(/:7080/i, ":7443") : /^http:/i.test(r) && (e = e.replace(/^https:/i, "http:").replace(/:7443/i, ":7080")), a(e, { query: { f: "json" }, authMode: "anonymous", responseType: "json", withCredentials: !0 }).then(function (e) { return e.data; }); }, r.prototype._hasPortalSession = function () { return !!this._getEsriAuthCookie(); }, r.prototype._getEsriAuthCookie = function () { var e = null; if (navigator.cookieEnabled) { for (var r = this._getAllCookies("esri_auth"), t = void 0, i = 0; i < r.length; i++) { var s = JSON.parse(r[i]); if (s.portalApp) { e = s; break; } t ? t.push(s) : t = [s]; } if (!e && t) for (var n = 0, o = t; n < o.length; n++) { var s = o[n]; if (window.location.hostname === s.urlKey + "." + s.customBaseUrl) { e = s; break; } } } if (e) { var a = null; e.expires && ("number" == typeof e.expires ? a = e.expires : "string" == typeof e.expires && (a = Date.parse(e.expires)), isNaN(a) && (a = null), e.expires = a), a && a < Date.now() && (e = null); } return e; }, r.prototype._getAllCookies = function (e) { var r = [], t = document.cookie, i = t.match(new RegExp("(?:^|; )" + v.escapeRegExpString(e) + "=([^;]*)", "g")); if (i) for (var s = 0; s < i.length; s++) { var n = i[s], o = n.indexOf("="); o > -1 && (n = n.substring(o + 1), r.push(decodeURIComponent(n))); } return r; }, r.prototype._doPortalSignIn = function (e, r) { if (navigator.cookieEnabled) { var t = this._getEsriAuthCookie(), i = this._portalConfig, s = window.location.href, n = this.findServerInfo(e); if ((r || this.useSignInPage) && (i || this._isPortalDomain(s) || t) && (n ? n.hasPortal || n.owningSystemUrl && this._isPortalDomain(n.owningSystemUrl) : this._isPortalDomain(e)) && (this._isIdProvider(s, e) || i && (this._hasSameServerInstance(this._getServerInstanceRoot(i.restBaseUrl), e) || this._isIdProvider(i.restBaseUrl, e)) || _.hasSameOrigin(s, e, !0))) return !0; } return !1; }, r.prototype._canUsePortalSignInWorkflow = function (e) { return this._doPortalSignIn(e) && (window === window.top || this._hasPortalSession()); }, r.prototype._checkProtocol = function (e, r, t, i) { var s = !0, n = i ? r.adminTokenServiceUrl : r.tokenServiceUrl; if (0 === n.trim().toLowerCase().indexOf("https:") && 0 !== window.location.href.toLowerCase().indexOf("https:") && _.getProxyRule(n) && !(s = !!this._protocolFunc && !!this._protocolFunc({ resourceUrl: e, serverInfo: r }))) { t(new h("identity-manager:aborted", "Aborted the Sign-In process to avoid sending password over insecure connection.")); } return s; }, r.prototype._enqueue = function (e, r, t, i, s, n) { return i || (i = f.createResolver()), i.resUrl_ = e, i.sinfo_ = r, i.options_ = t, i.admin_ = s, i.refresh_ = n, this._busy ? this._hasSameServerInstance(this._getServerInstanceRoot(e), this._busy.resUrl_) ? (this._oAuthDfd && this._oAuthDfd.oAuthWin_ && this._oAuthDfd.oAuthWin_.focus(), this._soReqs.push(i)) : this._xoReqs.push(i) : this._doSignIn(i), i.promise; }, r.prototype._doSignIn = function (e) { var r = this; this._busy = e, this._rejectOnPersistedPageShow = !1; var t = function t(_t2) { var i = e.options_ && e.options_.resource, s = e.resUrl_, n = e.refresh_, o = !1; -1 === r.credentials.indexOf(_t2) && (n && -1 !== r.credentials.indexOf(n) ? (n.userId = _t2.userId, n.token = _t2.token, n.expires = _t2.expires, n.validity = _t2.validity, n.ssl = _t2.ssl, n.creationTime = _t2.creationTime, o = !0, _t2 = n) : r.credentials.push(_t2)), _t2.resources || (_t2.resources = []), _t2.resources.push(i || s), _t2.scope = r._isServerRsrc(s) ? "server" : "portal", _t2.emitTokenChange(); var a = r._soReqs, l = {}; r._soReqs = [], a.forEach(function (e) { if (!r._isIdenticalService(s, e.resUrl_)) { var i = r._getSuffix(e.resUrl_); l[i] || (l[i] = !0, _t2.resources.push(e.resUrl_)); } }), e.resolve(_t2), a.forEach(function (e) { r._hasSameServerInstance(r._getServerInstanceRoot(s), e.resUrl_) ? e.resolve(_t2) : r._soReqs.push(e); }), r._busy = e.resUrl_ = e.sinfo_ = e.refresh_ = null, o || r.emit("credential-create", { credential: _t2 }), r._soReqs.length ? r._doSignIn(r._soReqs.shift()) : r._xoReqs.length && r._doSignIn(r._xoReqs.shift()); }, i = function i(t) { e.reject(t), r._busy = e.resUrl_ = e.sinfo_ = e.refresh_ = null, r._soReqs.length ? r._doSignIn(r._soReqs.shift()) : r._xoReqs.length && r._doSignIn(r._xoReqs.shift()); }, s = function s(_s, n, o, a) { var l, u, c = e.sinfo_, p = !e.options_ || !1 !== e.options_.prompt, d = c.hasPortal && r._findOAuthInfo(e.resUrl_); if (r._canUsePortalSignInWorkflow(e.resUrl_)) { var f = r._getEsriAuthCookie(), v = r._portalConfig; if (f) { if (!c.webTierAuth) { "web" === (f.auth_tier && f.auth_tier.toLowerCase()) && (c.webTierAuth = !0); } return void t(new T({ userId: f.email, server: c.server, token: c.webTierAuth ? null : f.token, expires: f.expires })); } if (p) { var _ = "", g = window.location.href; return _ = r.signInPage ? r.signInPage : v ? v.baseUrl + v.signin : r._isIdProvider(g, e.resUrl_) ? r._getOrigin(g) + "/home/signin.html" : c.tokenServiceUrl.replace(r._rePortalTokenSvc, "") + "/home/signin.html", _ = _.replace(/http:/i, "https:"), v && !1 === v.useSSL && (_ = _.replace(/https:/i, "http:")), void (0 === g.toLowerCase().replace("https", "http").indexOf(_.toLowerCase().replace("https", "http")) ? (u = new h("identity-manager:unexpected-error", "Cannot redirect to Sign-In page from within Sign-In page. URL of the resource that triggered this workflow: " + e.resUrl_), i(u)) : (r._rejectOnPersistedPageShow = !0, r._redirectFunc ? r._redirectFunc({ signInPage: _, returnUrlParamName: "returnUrl", returnUrl: g, resourceUrl: e.resUrl_, serverInfo: c }) : window.location.href = _ + "?returnUrl=" + encodeURIComponent(g))); } u = new h("identity-manager:not-authenticated", "User is not signed in."), i(u); } else if (_s) t(new T({ userId: _s, server: c.server, token: o, expires: null != a ? Number(a) : null, ssl: !!n }));else if (d) { var m = d._oAuthCred; if (!m) { var y = new S(d, window.localStorage), w = new S(d, window.sessionStorage); y.isValid() && w.isValid() ? y.expires > w.expires ? (m = y, w.destroy()) : (m = w, y.destroy()) : m = y.isValid() ? y : w, d._oAuthCred = m; } if (m.isValid()) t(new T({ userId: m.userId, server: c.server, token: m.token, expires: m.expires, ssl: m.ssl, _oAuthCred: m }));else if (r._oAuthHash && r._oAuthHash.state.portalUrl === d.portalUrl) { var I = r._oAuthHash; l = new T({ userId: I.username, server: c.server, token: I.access_token, expires: Date.now() + 1e3 * Number(I.expires_in), ssl: "true" === I.ssl, oAuthState: I.state, _oAuthCred: m }), m.storage = I.persist ? window.localStorage : window.sessionStorage, m.token = l.token, m.expires = l.expires, m.userId = l.userId, m.ssl = l.ssl, m.save(), r._oAuthHash = null, t(l); } else p ? e._pendingDfd = r.oAuthSignIn(e.resUrl_, c, d, e.options_).then(t, i) : (u = new h("identity-manager:not-authenticated", "User is not signed in."), i(u)); } else if (p) { if (r._checkProtocol(e.resUrl_, c, i, e.admin_)) { var k = e.options_; e.admin_ && (k = k || {}, k.isAdmin = !0), e._pendingDfd = r.signIn(e.resUrl_, c, k).then(t, i); } } else u = new h("identity-manager:not-authenticated", "User is not signed in."), i(u); }, n = function n() { var s, n, o, a, l = e.sinfo_, h = l.owningSystemUrl, u = e.options_; if (u && (s = u.token, n = u.error, o = u.prompt), !(a = r._findCredential(h, { token: s, resource: e.resUrl_ }))) for (var c = 0, p = r.credentials; c < p.length; c++) { var d = p[c]; if (r._isIdProvider(h, d.server)) { a = d; break; } } if (a) { var f = r.findCredential(e.resUrl_, a.userId); if (f) t(f);else if (U(l, r._legacyFed)) { var d = a.toJSON(); d.server = l.server, d.resources = null, t(new T(d)); } else { var v = e._pendingDfd = r.generateToken(r.findServerInfo(a.server), null, { serverUrl: e.resUrl_, token: a.token, signal: e.options_.signal, ssl: a.ssl }); v.then(function (r) { t(new T({ userId: a.userId, server: l.server, token: r.token, expires: null != r.expires ? Number(r.expires) : null, ssl: !!r.ssl, isAdmin: e.admin_, validity: r.validity })); }, i); } } else { r._busy = null, s && (e.options_.token = null); (e._pendingDfd = r.getCredential(h.replace(/\/?$/, "/sharing"), { resource: e.resUrl_, owningTenant: l.owningTenant, signal: e.options_.signal, token: s, error: n, prompt: o })).then(function () { r._enqueue(e.resUrl_, e.sinfo_, e.options_, e, e.admin_); }, function (e) { i(e); }); } }; this._errbackFunc = i; var o = e.sinfo_.owningSystemUrl, a = this._isServerRsrc(e.resUrl_), l = e.sinfo_._restInfoPms; l ? l.promise.then(function (t) { var i = e.sinfo_; if (i._restInfoPms) { i.adminTokenServiceUrl = i._restInfoPms.adminUrl, i._restInfoPms = null, i.tokenServiceUrl = d.getDeepValue("authInfo.tokenServicesUrl", t) || d.getDeepValue("authInfo.tokenServiceUrl", t) || d.getDeepValue("tokenServiceUrl", t), i.shortLivedTokenValidity = d.getDeepValue("authInfo.shortLivedTokenValidity", t), i.currentVersion = t.currentVersion, i.owningTenant = t.owningTenant; var o = i.owningSystemUrl = t.owningSystemUrl; o && r._portals.push(o); } a && i.owningSystemUrl ? n() : s(); }, function () { e.sinfo_._restInfoPms = null; var r = new h("identity-manager:server-identification-failed", "Unknown resource - could not find token service endpoint."); i(r); }) : a && o ? n() : e.sinfo_._selfReq ? e.sinfo_._selfReq.selfDfd.then(function (t) { var i, s, n, o, a = {}; return t && (i = t.user && t.user.username, a.username = i, a.allSSL = t.allSSL, s = t.supportsOAuth, n = t.currentVersion, "multitenant" === t.portalMode && (o = t.customBaseUrl)), e.sinfo_.webTierAuth = !!i, i && r.normalizeWebTierAuth ? r.generateToken(e.sinfo_, null, { ssl: a.allSSL })["catch"](function () { return null; }).then(function (e) { return a.portalToken = e && e.token, a.tokenExpiration = e && e.expires, a; }) : !i && s && parseFloat(n) >= 4.4 && !r._canUsePortalSignInWorkflow(e.resUrl_) ? r._generateOAuthInfo({ portalUrl: e.sinfo_.server, customBaseUrl: o, owningTenant: e.sinfo_._selfReq.owningTenant })["catch"](function () { return null; }).then(function () { return a; }) : a; })["catch"](function () { return null; }).then(function (r) { e.sinfo_._selfReq = null, r ? s(r.username, r.allSSL, r.portalToken, r.tokenExpiration) : s(); }) : s(); }, r.prototype._generateOAuthInfo = function (e) { var r, t, i = this, s = e.portalUrl, n = e.customBaseUrl, o = e.owningTenant, l = !this.defaultOAuthInfo && this._createDefaultOAuthInfo && !this._hasTestedIfAppIsOnPortal; if (l) { t = window.location.href; var h = t.indexOf("?"); h > -1 && (t = t.slice(0, h)), h = t.search(/\/(apps|home)\//), t = h > -1 ? t.slice(0, h) : null; } return l && t ? (this._hasTestedIfAppIsOnPortal = !0, r = a(t + "/sharing/rest", { query: { f: "json" }, responseType: "json" }).then(function () { i.defaultOAuthInfo = new y({ appId: "arcgisonline", popup: !0, popupCallbackUrl: t + "/home/oauth-callback.html" }); })) : r = f.resolve(), r.then(function () { if (i.defaultOAuthInfo) return s = s.replace(/^http:/i, "https:"), a(s + "/sharing/rest/oauth2/validateRedirectUri", { query: { accountId: o, client_id: i.defaultOAuthInfo.appId, redirect_uri: _.makeAbsolute(i.defaultOAuthInfo.popupCallbackUrl), f: "json" }, responseType: "json" }).then(function (e) { if (e.data.valid) { var r = i.defaultOAuthInfo.clone(); e.data.urlKey && n ? r.portalUrl = "https://" + e.data.urlKey + "." + n : r.portalUrl = s, i.oAuthInfos.push(r); } }); }); }, r = s([m.subclass("esri.identity.IdentityManagerBase")], r); }(m.declared(u)); r.IdentityManagerBase = A; var T = function (e) { function r(r) { var t = e.call(this, r) || this; return t._oAuthCred = null, t.tokenRefreshBuffer = 2, r && r._oAuthCred && (t._oAuthCred = r._oAuthCred), t; } return i(r, e), r.prototype.initialize = function () { this.resources = this.resources || [], null == this.creationTime && (this.creationTime = Date.now()); }, r.prototype.refreshToken = function () { var e, r, t = this, i = o.id.findServerInfo(this.server), s = i && i.owningSystemUrl, n = !!s && "server" === this.scope, a = n && U(i, o.id._legacyFed), l = i.webTierAuth, h = l && o.id.normalizeWebTierAuth, u = I[this.server], c = u && u[this.userId], p = this.resources && this.resources[0], d = n && o.id.findServerInfo(s), f = { username: this.userId, password: c }; if ((!l || h) && (n && !d && o.id.serverInfos.some(function (e) { return o.id._isIdProvider(s, e.server) && (d = e), !!d; }), e = d && o.id.findCredential(d.server, this.userId), !n || e)) { if (a) return void e.refreshToken(); if (n) r = { serverUrl: p, token: e && e.token, ssl: e && e.ssl };else if (h) f = null, r = { ssl: this.ssl };else { if (!c) { var v = void 0; return p && (p = o.id._sanitizeUrl(p), this._enqueued = 1, v = o.id._enqueue(p, i, null, null, this.isAdmin, this), v.then(function () { t._enqueued = 0, t.refreshServerTokens(); })["catch"](function () { t._enqueued = 0; })), v; } this.isAdmin && (r = { isAdmin: !0 }); } return o.id.generateToken(n ? d : i, n ? null : f, r).then(function (e) { t.token = e.token, t.expires = null != e.expires ? Number(e.expires) : null, t.creationTime = Date.now(), t.validity = e.validity, t.emitTokenChange(), t.refreshServerTokens(); })["catch"](function () {}); } }, r.prototype.refreshServerTokens = function () { var e = this; "portal" === this.scope && o.id.credentials.forEach(function (r) { var t = o.id.findServerInfo(r.server), i = t && t.owningSystemUrl; r !== e && r.userId === e.userId && i && "server" === r.scope && (o.id._hasSameServerInstance(e.server, i) || o.id._isIdProvider(i, e.server)) && (U(t, o.id._legacyFed) ? (r.token = e.token, r.expires = e.expires, r.creationTime = e.creationTime, r.validity = e.validity, r.emitTokenChange()) : r.refreshToken()); }); }, r.prototype.emitTokenChange = function (e) { clearTimeout(this._refreshTimer); var r = this.server && o.id.findServerInfo(this.server), t = r && r.owningSystemUrl, i = t && o.id.findServerInfo(t); !1 === e || t && "portal" !== this.scope && (!i || !i.webTierAuth || o.id.normalizeWebTierAuth) || null == this.expires && null == this.validity || this._startRefreshTimer(), this.emit("token-change"); }, r.prototype.destroy = function () { this.userId = this.server = this.token = this.expires = this.validity = this.resources = this.creationTime = null, this._oAuthCred && (this._oAuthCred.destroy(), this._oAuthCred = null); var e = o.id.credentials.indexOf(this); e > -1 && o.id.credentials.splice(e, 1), this.emitTokenChange(), this.emit("destroy"); }, r.prototype.toJSON = function () { var e = p.fixJson({ userId: this.userId, server: this.server, token: this.token, expires: this.expires, validity: this.validity, ssl: this.ssl, isAdmin: this.isAdmin, creationTime: this.creationTime, scope: this.scope }), r = this.resources; return r && r.length > 0 && (e.resources = r.slice()), e; }, r.prototype._startRefreshTimer = function () { clearTimeout(this._refreshTimer); var e = 6e4 * this.tokenRefreshBuffer, r = this.validity ? this.creationTime + 6e4 * this.validity : this.expires, t = r - Date.now(); t < 0 && (t = 0), this._refreshTimer = setTimeout(this.refreshToken.bind(this), t > e ? t - e : t); }, s([m.property()], r.prototype, "creationTime", void 0), s([m.property()], r.prototype, "expires", void 0), s([m.property()], r.prototype, "isAdmin", void 0), s([m.property()], r.prototype, "oAuthState", void 0), s([m.property()], r.prototype, "resources", void 0), s([m.property()], r.prototype, "scope", void 0), s([m.property()], r.prototype, "server", void 0), s([m.property()], r.prototype, "ssl", void 0), s([m.property()], r.prototype, "token", void 0), s([m.property()], r.prototype, "tokenRefreshBuffer", void 0), s([m.property()], r.prototype, "userId", void 0), s([m.property()], r.prototype, "validity", void 0), r = s([m.subclass("esri.identity.Credential")], r); }(m.declared(u.EventedAccessor)); r.Credential = T; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/IdentityManagerDialog.js": /*!**********************************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/IdentityManagerDialog.js ***! \**********************************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityIdentityManagerDialogJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../core/declare */ "./node_modules/arcgis-js-api/core/declare.js"), __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), __webpack_require__( /*! dojo/keys */ "./node_modules/dojo/keys.js"), __webpack_require__( /*! dijit/registry */ "./node_modules/dijit/registry.js"), __webpack_require__( /*! dijit/Dialog */ "./node_modules/dijit/Dialog.js"), __webpack_require__( /*! ../kernel */ "./node_modules/arcgis-js-api/kernel.js"), __webpack_require__( /*! ../core/lang */ "./node_modules/arcgis-js-api/core/lang.js"), __webpack_require__( /*! ../core/Error */ "./node_modules/arcgis-js-api/core/Error.js"), __webpack_require__( /*! ../core/domUtils */ "./node_modules/arcgis-js-api/core/domUtils.js"), __webpack_require__( /*! ../core/promiseUtils */ "./node_modules/arcgis-js-api/core/promiseUtils.js"), __webpack_require__( /*! ../intl/substitute */ "./node_modules/arcgis-js-api/intl/substitute.js"), __webpack_require__( /*! ./IdentityManagerBase */ "./node_modules/arcgis-js-api/identity/IdentityManagerBase.js"), __webpack_require__( /*! dojo/i18n!./nls/identity */ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/arcgis-js-api/identity/nls/identity.js"), __webpack_require__( /*! dijit/form/Button */ "./node_modules/dijit/form/Button.js"), __webpack_require__( /*! dijit/form/Form */ "./node_modules/dijit/form/Form.js"), __webpack_require__( /*! dijit/form/ValidationTextBox */ "./node_modules/dijit/form/ValidationTextBox.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, t, i, s, r, n, a, o, d, l, c, g, _) { var u = c.substitute, m = g.IdentityManagerBase, b = g.Credential; return e([m], { declaredClass: "esri.identity.IdentityManager", constructor: function constructor(e) { a.mixin(this, e); }, _dialogContent: "<div data-dojo-type='dijit.form.Form' data-dojo-props='\"class\":\"esriIdForm\"'><div class='dijitDialogPaneContentArea'><div style='padding-bottom: 5px; word-wrap: break-word;'>{info}</div><div style='margin: 0px; padding: 0px; height: 10px;'></div><div class='esriErrorMsg' style='display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'>{invalidUser}</div><div style='margin: 0px; padding: 0px; height: 10px;'></div><table style='width: 100%;'><tr><td>" + '<label>{lblUser}<br/><input data-dojo-type=\'dijit.form.ValidationTextBox\' data-dojo-props=\'type:"text", "class":"esriIdUser", required:true, trim:true, style:"width: 100%;", autocapitalize:"none", autocorrect:"off", spellcheck:false\' /></label></td></tr><tr><td><label>{lblPwd}<br/><input data-dojo-type=\'dijit.form.ValidationTextBox\' data-dojo-props=\'type:"password", "class":"esriIdPwd", required:true, style:"width: 100%;"\' /></label></td></tr></table></div><div class=\'dijitDialogPaneActionBar\'><button data-dojo-type=\'dijit.form.Button\' data-dojo-props=\'type:"button", "class":"esriIdSubmit"\'>{lblOk}</button><button data-dojo-type=\'dijit.form.Button\' data-dojo-props=\'type:"button", "class":"esriIdCancel"\'>{lblCancel}</button></div></div>', signIn: function signIn(e, i, s) { this._nls || (this._nls = _), this._loginDialog || (this._loginDialog = this.dialog = this._createLoginDialog(), this.emit("dialog-create")); var r = this._loginDialog, n = s && s.error, a = s && s.token, c = l.createResolver(); if (s && s.signal && l.onAbort(s.signal, function () { r.onCancel(); }), r.open) { var g = new o("identity-manager:busy", "BUSY"); return c.reject(g), c.promise; } return d.hide(r.errMsg_), n && n.details && 403 == n.details.httpStatus && a && (t.set(r.errMsg_, "innerHTML", this._nls.forbidden), d.show(r.errMsg_)), r.dfd_ = c, r.serverInfo_ = i, r.resUrl_ = e, r.admin_ = s && s.isAdmin, r.signal_ = s && s.signal, t.set(r.resLink_, { title: e, innerHTML: "(" + (this.getResourceName(e) || this._nls.lblItem) + ")" }), t.set(r.serverLink_, { title: i.server, innerHTML: (-1 !== i.server.toLowerCase().indexOf("arcgis.com") ? "ArcGIS Online" : i.server) + " " }), r.txtPwd_.set("value", ""), r.show(), c.promise; }, _createLoginDialog: function _createLoginDialog() { var e = this._nls, a = u(this._dialogContent, e); a = u(a, { resource: "<span class='resLink' style='word-wrap: break-word;'></span>", server: "<span class='serverLink' style='word-wrap: break-word;'></span>" }); var l = new r({ title: e.title, content: a, "class": " esri-widget esriSignInDialog esriIdentityDialog", style: "width: 18em;", esriIdMgr_: this, onShow: function onShow() { this.domNode.classList.add("esriIdentityDialog--visible"); }, onHide: function onHide() { this.domNode.classList.remove("esriIdentityDialog--visible"); }, keypressed_: function keypressed_(e) { e.charOrCode === i.ENTER && this.execute_(); }, execute_: function execute_() { var i = this.txtUser_.get("value"), s = this.txtPwd_.get("value"), a = this.dfd_, o = this; if (this.form_.validate() && i && s) { this.btnSubmit_.set("label", e.lblSigning); var l = n.id.findCredential(o.resUrl_, i), c = function c(t) { o.btnSubmit_.set("label", e.lblOk), o.btnSubmit_.set("disabled", !1), d.hide(o.errMsg_), o.hide(), r._DialogLevelManager.hide(o); var s = o.serverInfo_; o.dfd_ = o.serverInfo_ = o.generateDfd_ = o.resUrl_ = o.signal_ = null; var n, c, g, _ = l; t && (n = t.token, c = null != t.expires ? Number(t.expires) : null, g = !!t.ssl, _ ? (_.userId = i, _.token = n, _.expires = c, _.validity = t.validity, _.ssl = g, _.creationTime = Date.now()) : _ = new b({ userId: i, server: s.server, token: n, expires: c, ssl: g, isAdmin: o.admin_, validity: t.validity })), a.resolve(_); }; if (l && !l._enqueued) return void c(); o.btnSubmit_.set("disabled", !0), o.generateDfd_ = n.id.generateToken(this.serverInfo_, { username: i, password: s }, { isAdmin: this.admin_, signal: this.signal_ }).then(c, function (i) { o.btnSubmit_.set("disabled", !1), o.generateDfd_ = null, o.btnSubmit_.set("label", e.lblOk), t.set(o.errMsg_, "innerHTML", i && i.details && i.details.httpStatus ? e.invalidUser : e.noAuthService), d.show(o.errMsg_); }); } }, cancel_: function cancel_() { var e = l.dfd_, t = l.resUrl_, i = l.serverInfo_; l.btnSubmit_.set("disabled", !1), l.dfd_ = l.serverInfo_ = l.generateDfd_ = l.resUrl_ = l.signal_ = null, d.hide(l.errMsg_), r._DialogLevelManager.hide(l), l.esriIdMgr_.emit("dialog-cancel", { resourceUrl: t, serverInfo: i }); var s = new o("identity-manager:user-aborted", "ABORTED"); e.reject(s); } }), c = l.domNode; return l.form_ = s.byNode(c.getElementsByClassName("esriIdForm")[0]), l.txtUser_ = s.byNode(c.getElementsByClassName("esriIdUser")[0]), l.txtPwd_ = s.byNode(c.getElementsByClassName("esriIdPwd")[0]), l.btnSubmit_ = s.byNode(c.getElementsByClassName("esriIdSubmit")[0]), l.btnCancel_ = s.byNode(c.getElementsByClassName("esriIdCancel")[0]), l.resLink_ = c.getElementsByClassName("resLink")[0], l.serverLink_ = c.getElementsByClassName("serverLink")[0], l.errMsg_ = c.getElementsByClassName("esriErrorMsg")[0], l.connect(l.txtUser_, "onKeyPress", l.keypressed_), l.connect(l.txtPwd_, "onKeyPress", l.keypressed_), l.connect(l.btnSubmit_, "onClick", l.execute_), l.connect(l.btnCancel_, "onClick", l.onCancel), l.connect(l, "onCancel", l.cancel_), l; } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/OAuthCredential.js": /*!****************************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/OAuthCredential.js ***! \****************************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityOAuthCredentialJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports], __WEBPACK_AMD_DEFINE_RESULT__ = function (t, e) { var s = function () { function t(t, e) { this.oAuthInfo = null, this.storage = null, this.expires = null, this.ssl = null, this.token = null, this.userId = null, this.oAuthInfo = t, this.storage = e, this._init(); } return t.prototype.isValid = function () { var t = !1; if (this.oAuthInfo && this.token && this.userId) { var e = Date.now(); if (this.expires > e) { (this.expires - e) / 1e3 > 60 * this.oAuthInfo.minTimeUntilExpiration && (t = !0); } } return t; }, t.prototype.save = function () { if (this.storage) { var t = this._load(), e = this.oAuthInfo; if (e && e.authNamespace && e.portalUrl) { var s = t[e.authNamespace]; s || (s = t[e.authNamespace] = {}), s[e.portalUrl] = { expires: this.expires, ssl: this.ssl, token: this.token, userId: this.userId }; try { this.storage.setItem("esriJSAPIOAuth", JSON.stringify(t)); } catch (t) { console.log(t); } } } }, t.prototype.destroy = function () { var t = this._load(), e = this.oAuthInfo; if (e && e.appId && e.portalUrl && this.token && this.expires > Date.now()) { var s = e.portalUrl.replace(/^http:/i, "https:") + "/sharing/rest/oauth2/revokeToken", i = new FormData(); if (i.append("f", "json"), i.append("auth_token", this.token), i.append("client_id", e.appId), i.append("token_type_hint", "access_token"), "function" == typeof navigator.sendBeacon) navigator.sendBeacon(s, i);else { var o = new XMLHttpRequest(); o.open("POST", s), o.send(i); } } if (e && e.authNamespace && e.portalUrl && this.storage) { var r = t[e.authNamespace]; if (r) { delete r[e.portalUrl]; try { this.storage.setItem("esriJSAPIOAuth", JSON.stringify(t)); } catch (t) { console.log(t); } } } e && (e._oAuthCred = null, this.oAuthInfo = null); }, t.prototype._init = function () { var t = this._load(), e = this.oAuthInfo; if (e && e.authNamespace && e.portalUrl) { var s = t[e.authNamespace]; s && (s = s[e.portalUrl]) && (this.expires = s.expires, this.ssl = s.ssl, this.token = s.token, this.userId = s.userId); } }, t.prototype._load = function () { var t = {}; if (this.storage) { var e = this.storage.getItem("esriJSAPIOAuth"); if (e) try { t = JSON.parse(e); } catch (t) { console.log(t); } } return t; }, t; }(); return s.prototype.declaredClass = "esri.identity.OAuthCredential", s; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/OAuthInfo.js": /*!**********************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/OAuthInfo.js ***! \**********************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityOAuthInfoJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports, __webpack_require__( /*! ../core/tsSupport/declareExtendsHelper */ "./node_modules/arcgis-js-api/core/tsSupport/declareExtendsHelper.js"), __webpack_require__( /*! ../core/tsSupport/decorateHelper */ "./node_modules/arcgis-js-api/core/tsSupport/decorateHelper.js"), __webpack_require__( /*! ../core/JSONSupport */ "./node_modules/arcgis-js-api/core/JSONSupport.js"), __webpack_require__( /*! ../core/accessorSupport/decorators */ "./node_modules/arcgis-js-api/core/accessorSupport/decorators.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (o, r, t, p, e, i) { return function (o) { function r(r) { var t = o.call(this, r) || this; return t._oAuthCred = null, t.appId = null, t.authNamespace = "/", t.expiration = 20160, t.forceLogin = !1, t.locale = null, t.minTimeUntilExpiration = 30, t.popup = !1, t.popupCallbackUrl = "oauth-callback.html", t.popupWindowFeatures = "height=490,width=800,resizable,scrollbars,status", t.portalUrl = "https://www.arcgis.com", t.preserveUrlHash = !1, t; } t(r, o), e = r, r.prototype.clone = function () { return e.fromJSON(this.toJSON()); }; var e; return p([i.property({ json: { write: !0 } })], r.prototype, "appId", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "authNamespace", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "expiration", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "forceLogin", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "locale", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "minTimeUntilExpiration", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "popup", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "popupCallbackUrl", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "popupWindowFeatures", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "portalUrl", void 0), p([i.property({ json: { write: !0 } })], r.prototype, "preserveUrlHash", void 0), r = e = p([i.subclass("esri.identity.OAuthInfo")], r); }(i.declared(e.JSONSupport)); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/OAuthSignInHandler.js": /*!*******************************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/OAuthSignInHandler.js ***! \*******************************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityOAuthSignInHandlerJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./Credential */ "./node_modules/arcgis-js-api/identity/Credential.js"), __webpack_require__( /*! ../core/domUtils */ "./node_modules/arcgis-js-api/core/domUtils.js"), __webpack_require__( /*! ../core/has */ "./node_modules/arcgis-js-api/core/has.js"), __webpack_require__( /*! ../core/Error */ "./node_modules/arcgis-js-api/core/Error.js"), __webpack_require__( /*! ../core/promiseUtils */ "./node_modules/arcgis-js-api/core/promiseUtils.js"), __webpack_require__( /*! ../core/urlUtils */ "./node_modules/arcgis-js-api/core/urlUtils.js"), __webpack_require__( /*! ../intl/substitute */ "./node_modules/arcgis-js-api/intl/substitute.js"), __webpack_require__( /*! dijit/Dialog */ "./node_modules/dijit/Dialog.js"), __webpack_require__( /*! dijit/registry */ "./node_modules/dijit/registry.js"), __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), __webpack_require__( /*! dojo/i18n!./nls/identity */ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/arcgis-js-api/identity/nls/identity.js"), __webpack_require__( /*! dijit/form/Button */ "./node_modules/dijit/form/Button.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, t, i, r, o, n, s, a, l, d, u) { var h = s.substitute; return { _oAuthIntervalId: 0, _oAuthDialogContent: "<div class='dijitDialogPaneContentArea'><div style='padding-bottom: 5px; word-wrap: break-word;'>{oAuthInfo}</div><div style='margin: 0px; padding: 0px; height: 10px;'></div><div class='esriErrorMsg' style='display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'>{invalidUser}</div><div style='margin: 0px; padding: 0px; height: 10px;'></div><div class='dijitDialogPaneActionBar'><button data-dojo-type='dijit.form.Button' data-dojo-props='type:\"button\", \"class\":\"esriIdSubmit\"'>{lblOk}</button><button data-dojo-type='dijit.form.Button' data-dojo-props='type:\"button\", \"class\":\"esriIdCancel\"'>{lblCancel}</button></div>", setOAuthRedirectionHandler: function setOAuthRedirectionHandler(e) { this._oAuthRedirectFunc = e; }, oAuthSignIn: function oAuthSignIn(e, i, r, n) { var s = this._oAuthDfd = o.createResolver(); n && n.signal && o.onAbort(n.signal, function () { var e = this._oAuthDfd && this._oAuthDfd.oAuthWin_; e && !e.closed ? e.close() : this.oAuthDialog && this.oAuthDialog.onCancel(); }.bind(this)), s.resUrl_ = e, s.sinfo_ = i, s.oinfo_ = r; var a = !n || !1 !== n.oAuthPopupConfirmation; if (!r.popup || !a) return this._doOAuthSignIn(e, i, r), s.promise; this._nls || (this._nls = u), this.oAuthDialog || (this.oAuthDialog = this._createOAuthDialog()); var l = this.oAuthDialog, h = n && n.error, c = n && n.token; return t.hide(l.errMsg_), h && h.details && 403 == h.details.httpStatus && c && (d.set(l.errMsg_, "innerHTML", this._nls.forbidden), t.show(l.errMsg_)), d.set(l.serverLink_, { title: i.server, innerHTML: -1 !== i.server.toLowerCase().indexOf("arcgis.com") ? "ArcGIS Online" : i.server }), l.show(), s.promise; }, setOAuthResponseHash: function setOAuthResponseHash(t) { var i = this._oAuthDfd; if (this._oAuthDfd = null, i && t) { clearInterval(this._oAuthIntervalId), "#" === t.charAt(0) && (t = t.substring(1)); var o = n.queryToObject(t); if (o.error) { var s = "access_denied" === o.error, a = new r(s ? "identity-manager:user-aborted" : "identity-manager:authentication-failed", s ? "ABORTED" : "OAuth: " + o.error + " - " + o.error_description); i.reject(a); } else { var l = i.sinfo_, d = i.oinfo_, u = d._oAuthCred, h = new e({ userId: o.username, server: l.server, token: o.access_token, expires: Date.now() + 1e3 * Number(o.expires_in), ssl: "true" === o.ssl, _oAuthCred: u }); u.storage = o.persist ? window.localStorage : window.sessionStorage, u.token = h.token, u.expires = h.expires, u.userId = h.userId, u.ssl = h.ssl, u.save(), i.resolve(h); } } }, _createOAuthDialog: function _createOAuthDialog() { var e = this._nls, i = h(this._oAuthDialogContent, e); i = h(i, { server: "<span class='serverLink' style='word-wrap: break-word;'></span>" }); var o = new a({ title: e.title, content: i, "class": "esri-widget esriOAuthSignInDialog esriIdentityDialog", style: "min-width: 18em;", esriIdMgr_: this, execute_: function execute_() { var e = o.esriIdMgr_._oAuthDfd; o.hide_(), o.esriIdMgr_._doOAuthSignIn(e.resUrl_, e.sinfo_, e.oinfo_); }, cancel_: function cancel_() { var e = o.esriIdMgr_._oAuthDfd; o.esriIdMgr_._oAuthDfd = null, o.hide_(); var t = new r("identity-manager:user-aborted", "ABORTED"); e.reject(t); }, hide_: function hide_() { t.hide(o.errMsg_), o.hide(), a._DialogLevelManager.hide(o); } }), n = o.domNode; return o.btnSubmit_ = l.byNode(n.getElementsByClassName("esriIdSubmit")[0]), o.btnCancel_ = l.byNode(n.getElementsByClassName("esriIdCancel")[0]), o.serverLink_ = n.getElementsByClassName("serverLink")[0], o.errMsg_ = n.getElementsByClassName("esriErrorMsg")[0], o.connect(o.btnSubmit_, "onClick", o.execute_), o.connect(o.btnCancel_, "onClick", o.onCancel), o.connect(o, "onCancel", o.cancel_), o; }, _doOAuthSignIn: function _doOAuthSignIn(e, t, o) { var s = this, a = { portalUrl: o.portalUrl }; !o.popup && o.preserveUrlHash && window.location.hash && (a.hash = window.location.hash); var l = { client_id: o.appId, response_type: "token", state: JSON.stringify(a), expiration: o.expiration, locale: o.locale, redirect_uri: o.popup ? n.makeAbsolute(o.popupCallbackUrl) : window.location.href.replace(/#.*$/, "") }; o.forceLogin && (l.force_login = !0); var d = o.portalUrl.replace(/^http:/i, "https:") + "/sharing/oauth2/authorize", u = d + "?" + n.objectToQuery(l); if (o.popup) { var h; if (7 === i("ie") ? (h = window.open(o.popupCallbackUrl, "esriJSAPIOAuth", o.popupWindowFeatures), h.location = u) : h = window.open(u, "esriJSAPIOAuth", o.popupWindowFeatures), h) h.focus(), this._oAuthDfd.oAuthWin_ = h, this._oAuthIntervalId = setInterval(function () { if (h.closed) { clearInterval(s._oAuthIntervalId); var e = s._oAuthDfd; if (e) { var t = new r("identity-manager:user-aborted", "ABORTED"); e.reject(t); } } }, 500);else { var c = new r("identity-manager:popup-blocked", "ABORTED"); this._oAuthDfd.reject(c); } } else this._rejectOnPersistedPageShow = !0, this._oAuthRedirectFunc ? this._oAuthRedirectFunc({ authorizeParams: l, authorizeUrl: d, resourceUrl: e, serverInfo: t, oAuthInfo: o }) : window.location = u; } }; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/ServerInfo.js": /*!***********************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/ServerInfo.js ***! \***********************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityServerInfoJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports, __webpack_require__( /*! ../core/tsSupport/declareExtendsHelper */ "./node_modules/arcgis-js-api/core/tsSupport/declareExtendsHelper.js"), __webpack_require__( /*! ../core/tsSupport/decorateHelper */ "./node_modules/arcgis-js-api/core/tsSupport/decorateHelper.js"), __webpack_require__( /*! ../core/JSONSupport */ "./node_modules/arcgis-js-api/core/JSONSupport.js"), __webpack_require__( /*! ../core/accessorSupport/decorators */ "./node_modules/arcgis-js-api/core/accessorSupport/decorators.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (r, e, o, t, n, p) { return function (r) { function e(e) { var o = r.call(this, e) || this; return o.adminTokenServiceUrl = null, o.currentVersion = null, o.hasPortal = null, o.hasServer = null, o.owningSystemUrl = null, o.owningTenant = null, o.server = null, o.shortLivedTokenValidity = null, o.tokenServiceUrl = null, o.webTierAuth = null, o; } return o(e, r), t([p.property({ json: { write: !0 } })], e.prototype, "adminTokenServiceUrl", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "currentVersion", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "hasPortal", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "hasServer", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "owningSystemUrl", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "owningTenant", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "server", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "shortLivedTokenValidity", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "tokenServiceUrl", void 0), t([p.property({ json: { write: !0 } })], e.prototype, "webTierAuth", void 0), e = t([p.subclass("esri.identity.ServerInfo")], e); }(p.declared(n.JSONSupport)); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/nls/identity.js": /*!*************************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/nls/identity.js ***! \*************************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityNlsIdentityJs(module, exports, __webpack_require__) { /* * This module was modified by dojo-webpack-plugin to disable some locales * that were excluded by the plugin's 'locales' option */ !(module.exports = { 'root': { 'lblItem': 'item', 'title': 'Sign in', 'info': 'Please sign in to access the item on {server} {resource}', 'oAuthInfo': 'Please sign in to {server}.', 'lblUser': 'Username:', 'lblPwd': 'Password:', 'lblOk': 'OK', 'lblSigning': 'Signing in...', 'lblCancel': 'Cancel', 'errorMsg': 'Invalid username/password. Please try again.', 'invalidUser': 'The username or password you entered is incorrect.', 'forbidden': 'The username and password are valid, but you don\'t have access to this resource.', 'noAuthService': 'Unable to access the authentication service.' }, 'ar': false, 'bs': false, 'ca': false, 'cs': false, 'da': false, 'de': false, 'el': false, 'es': false, 'et': false, 'fi': false, 'fr': false, 'he': false, 'hr': false, 'hu': false, 'id': false, 'it': false, 'ja': false, 'ko': false, 'lv': false, 'lt': false, 'nl': false, 'nb': false, 'pl': false, 'pt-br': false, 'pt-pt': false, 'ro': false, 'ru': false, 'sl': false, 'sr': false, 'sv': false, 'th': false, 'tr': false, 'uk': false, 'vi': 1, 'zh-cn': false, 'zh-hk': false, 'zh-tw': false }); /***/ }, /***/ "./node_modules/arcgis-js-api/identity/nls/vi/identity.js": /*!****************************************************************!*\ !*** ./node_modules/arcgis-js-api/identity/nls/vi/identity.js ***! \****************************************************************/ /*! no static exports found */ /***/ function node_modulesArcgisJsApiIdentityNlsViIdentityJs(module, exports, __webpack_require__) { // COPYRIGHT © 2019 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute and use this code without modification, // provided you adhere to the terms of the MLA and include this // copyright notice. // // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english // // For additional information, contact: // Environmental Systems Research Institute, Inc. // Attn: Contracts and Legal Services Department // 380 New York Street // Redlands, California, USA 92373 // USA // // email: contracts@esri.com // // See http://js.arcgis.com/4.14/esri/copyright.txt for details. !(module.exports = { lblItem: "mục", title: "Đăng nhập", info: "Vui lòng đăng nhập để truy cập mục trên {server} {resource}", oAuthInfo: "Vui lòng đăng nhập vào {server}.", lblUser: "Tên đăng nhập:", lblPwd: "Mật khẩu:", lblOk: "OK", lblSigning: "Đang đăng nhập...", lblCancel: "Hủy", errorMsg: "Tên người dùng/mật khẩu không hợp lệ. Vui lòng thử lại.", invalidUser: "Tên người dùng hoặc mật khẩu bạn nhập không đúng.", forbidden: "Tên người dùng và mật khẩu hợp lệ, nhưng bạn không có quyền truy cập vào tài nguyên này.", noAuthService: "Không thể truy cập dịch vụ xác thực." }); /***/ }, /***/ "./node_modules/dijit/BackgroundIframe.js": /*!************************************************!*\ !*** ./node_modules/dijit/BackgroundIframe.js ***! \************************************************/ /*! no static exports found */ /***/ function node_modulesDijitBackgroundIframeJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), // require.toUrl __webpack_require__( /*! ./main */ "./node_modules/dijit/main.js"), // to export dijit.BackgroundIframe __webpack_require__( /*! dojo/_base/config */ "./node_modules/dojo/_base/config.js"), __webpack_require__( /*! dojo/dom-construct */ "./node_modules/dojo/dom-construct.js"), // domConstruct.create __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.set __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.extend lang.hitch __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js") // has("ie"), has("trident"), has("quirks") ], __WEBPACK_AMD_DEFINE_RESULT__ = function (require, dijit, config, domConstruct, domStyle, lang, on, has) { // module: // dijit/BackgroundIFrame // Flag for whether to create background iframe behind popups like Menus and Dialog. // A background iframe is useful to prevent problems with popups appearing behind applets/pdf files, // and is also useful on older versions of IE (IE6 and IE7) to prevent the "bleed through select" problem. // By default, it's enabled for IE6-11, excluding Windows Phone 8. // TODO: For 2.0, make this false by default. Also, possibly move definition to has.js so that this module can be // conditionally required via dojo/has!bgIfame?dijit/BackgroundIframe has.add("config-bgIframe", (has("ie") || has("trident")) && !/IEMobile\/10\.0/.test(navigator.userAgent)); // No iframe on WP8, to match 1.9 behavior var _frames = new function () { // summary: // cache of iframes var queue = []; this.pop = function () { var iframe; if (queue.length) { iframe = queue.pop(); iframe.style.display = ""; } else { // transparency needed for DialogUnderlay and for tooltips on IE (to see screen near connector) if (has("ie") < 9) { var burl = config["dojoBlankHtmlUrl"] || require.toUrl("dojo/resources/blank.html") || "javascript:\"\""; var html = "<iframe src='" + burl + "' role='presentation'" + " style='position: absolute; left: 0px; top: 0px;" + "z-index: -1; filter:Alpha(Opacity=\"0\");'>"; iframe = document.createElement(html); } else { iframe = domConstruct.create("iframe"); iframe.src = 'javascript:""'; iframe.className = "dijitBackgroundIframe"; iframe.setAttribute("role", "presentation"); domStyle.set(iframe, "opacity", 0.1); } iframe.tabIndex = -1; // Magic to prevent iframe from getting focus on tab keypress - as style didn't work. } return iframe; }; this.push = function (iframe) { iframe.style.display = "none"; queue.push(iframe); }; }(); dijit.BackgroundIframe = function ( /*DomNode*/ node) { // summary: // For IE/FF z-index shenanigans. id attribute is required. // // description: // new dijit.BackgroundIframe(node). // // Makes a background iframe as a child of node, that fills // area (and position) of node if (!node.id) { throw new Error("no id"); } if (has("config-bgIframe")) { var iframe = this.iframe = _frames.pop(); node.appendChild(iframe); if (has("ie") < 7 || has("quirks")) { this.resize(node); this._conn = on(node, 'resize', lang.hitch(this, "resize", node)); } else { domStyle.set(iframe, { width: '100%', height: '100%' }); } } }; lang.extend(dijit.BackgroundIframe, { resize: function resize(node) { // summary: // Resize the iframe so it's the same size as node. // Needed on IE6 and IE/quirks because height:100% doesn't work right. if (this.iframe) { domStyle.set(this.iframe, { width: node.offsetWidth + 'px', height: node.offsetHeight + 'px' }); } }, destroy: function destroy() { // summary: // destroy the iframe if (this._conn) { this._conn.remove(); this._conn = null; } if (this.iframe) { this.iframe.parentNode.removeChild(this.iframe); _frames.push(this.iframe); delete this.iframe; } } }); return dijit.BackgroundIframe; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/Destroyable.js": /*!*******************************************!*\ !*** ./node_modules/dijit/Destroyable.js ***! \*******************************************/ /*! no static exports found */ /***/ function node_modulesDijitDestroyableJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.map __webpack_require__( /*! dojo/aspect */ "./node_modules/dojo/aspect.js"), __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, aspect, declare) { // module: // dijit/Destroyable return declare("dijit.Destroyable", null, { // summary: // Mixin to track handles and release them when instance is destroyed. // description: // Call this.own(...) on list of handles (returned from dojo/aspect, dojo/on, // dojo/Stateful::watch, or any class (including widgets) with a destroyRecursive() or destroy() method. // Then call destroy() later to destroy this instance and release the resources. destroy: function destroy( /*Boolean*/ preserveDom) { // summary: // Destroy this class, releasing any resources registered via own(). this._destroyed = true; }, own: function own() { // summary: // Track specified handles and remove/destroy them when this instance is destroyed, unless they were // already removed/destroyed manually. // tags: // protected // returns: // The array of specified handles, so you can do for example: // | var handle = this.own(on(...))[0]; var cleanupMethods = ["destroyRecursive", "destroy", "remove"]; array.forEach(arguments, function (handle) { // When this.destroy() is called, destroy handle. Since I'm using aspect.before(), // the handle will be destroyed before a subclass's destroy() method starts running, before it calls // this.inherited() or even if it doesn't call this.inherited() at all. If that's an issue, make an // onDestroy() method and connect to that instead. var destroyMethodName; var odh = aspect.before(this, "destroy", function (preserveDom) { handle[destroyMethodName](preserveDom); }); // Callback for when handle is manually destroyed. var hdhs = []; function onManualDestroy() { odh.remove(); array.forEach(hdhs, function (hdh) { hdh.remove(); }); } // Setup listeners for manual destroy of handle. // Also computes destroyMethodName, used in listener above. if (handle.then) { // Special path for Promises. Detect when Promise is resolved, rejected, or // canceled (nb: cancelling a Promise causes it to be rejected). destroyMethodName = "cancel"; handle.then(onManualDestroy, onManualDestroy); } else { // Path for other handles. Just use AOP to detect when handle is manually destroyed. array.forEach(cleanupMethods, function (cleanupMethod) { if (typeof handle[cleanupMethod] === "function") { if (!destroyMethodName) { // Use first matching method name in above listener (prefer destroyRecursive() to destroy()) destroyMethodName = cleanupMethod; } hdhs.push(aspect.after(handle, cleanupMethod, onManualDestroy, true)); } }); } }, this); return arguments; // handle } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/Dialog.js": /*!**************************************!*\ !*** ./node_modules/dijit/Dialog.js ***! \**************************************/ /*! no static exports found */ /***/ function node_modulesDijitDialogJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), __webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.indexOf array.map __webpack_require__( /*! dojo/aspect */ "./node_modules/dojo/aspect.js"), __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/Deferred */ "./node_modules/dojo/Deferred.js"), // Deferred __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // dom.isDescendant __webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), // domClass.add domClass.contains __webpack_require__( /*! dojo/dom-geometry */ "./node_modules/dojo/dom-geometry.js"), // domGeometry.position __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.set __webpack_require__( /*! dojo/_base/fx */ "./node_modules/dojo/_base/fx.js"), // fx.fadeIn fx.fadeOut __webpack_require__( /*! dojo/i18n */ "./node_modules/dojo/i18n.js"), // i18n.getLocalization __webpack_require__( /*! dojo/keys */ "./node_modules/dojo/keys.js"), __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.mixin lang.hitch __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/ready */ "./node_modules/dojo/ready.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie") has("opera") has("dijit-legacy-requires") __webpack_require__( /*! dojo/touch */ "./node_modules/dojo/touch.js"), __webpack_require__( /*! dojo/window */ "./node_modules/dojo/window.js"), // winUtils.getBox, winUtils.get __webpack_require__( /*! dojo/dnd/Moveable */ "./node_modules/dojo/dnd/Moveable.js"), // Moveable __webpack_require__( /*! dojo/dnd/TimedMoveable */ "./node_modules/dojo/dnd/TimedMoveable.js"), // TimedMoveable __webpack_require__( /*! ./focus */ "./node_modules/dijit/focus.js"), __webpack_require__( /*! ./_base/manager */ "./node_modules/dijit/_base/manager.js"), // manager.defaultDuration __webpack_require__( /*! ./_Widget */ "./node_modules/dijit/_Widget.js"), __webpack_require__( /*! ./_TemplatedMixin */ "./node_modules/dijit/_TemplatedMixin.js"), __webpack_require__( /*! ./_CssStateMixin */ "./node_modules/dijit/_CssStateMixin.js"), __webpack_require__( /*! ./form/_FormMixin */ "./node_modules/dijit/form/_FormMixin.js"), __webpack_require__( /*! ./_DialogMixin */ "./node_modules/dijit/_DialogMixin.js"), __webpack_require__( /*! ./DialogUnderlay */ "./node_modules/dijit/DialogUnderlay.js"), __webpack_require__( /*! ./layout/ContentPane */ "./node_modules/dijit/layout/ContentPane.js"), __webpack_require__( /*! ./layout/utils */ "./node_modules/dijit/layout/utils.js"), __webpack_require__( /*! dojo/text!./templates/Dialog.html */ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/templates/Dialog.html"), __webpack_require__( /*! ./a11yclick */ "./node_modules/dijit/a11yclick.js"), // template uses ondijitclick __webpack_require__( /*! dojo/i18n!./nls/common */ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/nls/common.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (require, array, aspect, declare, Deferred, dom, domClass, domGeometry, domStyle, fx, i18n, keys, lang, on, ready, has, touch, winUtils, Moveable, TimedMoveable, _focus, manager, _Widget, _TemplatedMixin, _CssStateMixin, _FormMixin, _DialogMixin, DialogUnderlay, ContentPane, utils, template) { // module: // dijit/Dialog var resolvedDeferred = new Deferred(); resolvedDeferred.resolve(true); function nop() {} var _DialogBase = declare("dijit._DialogBase" + (has("dojo-bidi") ? "_NoBidi" : ""), [_TemplatedMixin, _FormMixin, _DialogMixin, _CssStateMixin], { templateString: template, baseClass: "dijitDialog", cssStateNodes: { closeButtonNode: "dijitDialogCloseIcon" }, // Map widget attributes to DOMNode attributes. _setTitleAttr: { node: "titleNode", type: "innerHTML" }, // open: [readonly] Boolean // True if Dialog is currently displayed on screen. open: false, // duration: Integer // The time in milliseconds it takes the dialog to fade in and out duration: manager.defaultDuration, // refocus: Boolean // A Toggle to modify the default focus behavior of a Dialog, which // is to re-focus the element which had focus before being opened. // False will disable refocusing. Default: true refocus: true, // autofocus: Boolean // A Toggle to modify the default focus behavior of a Dialog, which // is to focus on the first dialog element after opening the dialog. // False will disable autofocusing. Default: true autofocus: true, // _firstFocusItem: [private readonly] DomNode // The pointer to the first focusable node in the dialog. // Set by `dijit/_DialogMixin._getFocusItems()`. _firstFocusItem: null, // _lastFocusItem: [private readonly] DomNode // The pointer to which node has focus prior to our dialog. // Set by `dijit/_DialogMixin._getFocusItems()`. _lastFocusItem: null, // draggable: Boolean // Toggles the movable aspect of the Dialog. If true, Dialog // can be dragged by it's title. If false it will remain centered // in the viewport. draggable: true, _setDraggableAttr: function _setDraggableAttr( /*Boolean*/ val) { // Avoid _WidgetBase behavior of copying draggable attribute to this.domNode, // as that prevents text select on modern browsers (#14452) this._set("draggable", val); }, // maxRatio: Number // Maximum size to allow the dialog to expand to, relative to viewport size maxRatio: 0.9, // closable: Boolean // Dialog show [x] icon to close itself, and ESC key will close the dialog. closable: true, _setClosableAttr: function _setClosableAttr(val) { this.closeButtonNode.style.display = val ? "" : "none"; this._set("closable", val); }, postMixInProperties: function postMixInProperties() { var _nlsResources = i18n.getLocalization("dijit", "common"); lang.mixin(this, _nlsResources); this.inherited(arguments); }, postCreate: function postCreate() { domStyle.set(this.domNode, { display: "none", position: "absolute" }); this.ownerDocumentBody.appendChild(this.domNode); this.inherited(arguments); aspect.after(this, "onExecute", lang.hitch(this, "hide"), true); aspect.after(this, "onCancel", lang.hitch(this, "hide"), true); on(this.closeButtonNode, touch.press, function (e) { e.stopPropagation(); }); this._modalconnects = []; }, onLoad: function onLoad() { // summary: // Called when data has been loaded from an href. // Unlike most other callbacks, this function can be connected to (via `dojo.connect`) // but should *not* be overridden. // tags: // callback // when href is specified we need to reposition the dialog after the data is loaded // and find the focusable elements this.resize(); this._position(); if (this.autofocus && DialogLevelManager.isTop(this)) { this._getFocusItems(); _focus.focus(this._firstFocusItem); } this.inherited(arguments); }, focus: function focus() { this._getFocusItems(); _focus.focus(this._firstFocusItem); }, _endDrag: function _endDrag() { // summary: // Called after dragging the Dialog. Saves the position of the dialog in the viewport, // and also adjust position to be fully within the viewport, so user doesn't lose access to handle var nodePosition = domGeometry.position(this.domNode), viewport = winUtils.getBox(this.ownerDocument); nodePosition.y = Math.min(Math.max(nodePosition.y, 0), viewport.h - nodePosition.h); nodePosition.x = Math.min(Math.max(nodePosition.x, 0), viewport.w - nodePosition.w); this._relativePosition = nodePosition; this._position(); }, _setup: function _setup() { // summary: // Stuff we need to do before showing the Dialog for the first // time (but we defer it until right beforehand, for // performance reasons). // tags: // private var node = this.domNode; if (this.titleBar && this.draggable) { this._moveable = new (has("ie") == 6 ? TimedMoveable // prevent overload, see #5285 : Moveable)(node, { handle: this.titleBar }); aspect.after(this._moveable, "onMoveStop", lang.hitch(this, "_endDrag"), true); } else { domClass.add(node, "dijitDialogFixed"); } this.underlayAttrs = { dialogId: this.id, "class": array.map(this["class"].split(/\s/), function (s) { return s + "_underlay"; }).join(" "), _onKeyDown: lang.hitch(this, "_onKey"), ownerDocument: this.ownerDocument }; }, _size: function _size() { // TODO: remove for 2.0 this.resize(); }, _position: function _position() { // summary: // Position the dialog in the viewport. If no relative offset // in the viewport has been determined (by dragging, for instance), // center the dialog. Otherwise, use the Dialog's stored relative offset, // clipped to fit inside the viewport (which may have been shrunk). // Finally, adjust position according to viewport's scroll. if (!domClass.contains(this.ownerDocumentBody, "dojoMove")) { // don't do anything if called during auto-scroll var node = this.domNode, viewport = winUtils.getBox(this.ownerDocument), p = this._relativePosition, bb = domGeometry.position(node), l = Math.floor(viewport.l + (p ? Math.min(p.x, viewport.w - bb.w) : (viewport.w - bb.w) / 2)), t = Math.floor(viewport.t + (p ? Math.min(p.y, viewport.h - bb.h) : (viewport.h - bb.h) / 2)); domStyle.set(node, { left: l + "px", top: t + "px" }); } }, _onKey: function _onKey( /*Event*/ evt) { // summary: // Handles the keyboard events for accessibility reasons // tags: // private if (evt.keyCode == keys.TAB) { this._getFocusItems(); var node = evt.target; if (this._firstFocusItem == this._lastFocusItem) { // don't move focus anywhere, but don't allow browser to move focus off of dialog either evt.stopPropagation(); evt.preventDefault(); } else if (node == this._firstFocusItem && evt.shiftKey) { // if we are shift-tabbing from first focusable item in dialog, send focus to last item _focus.focus(this._lastFocusItem); evt.stopPropagation(); evt.preventDefault(); } else if (node == this._lastFocusItem && !evt.shiftKey) { // if we are tabbing from last focusable item in dialog, send focus to first item _focus.focus(this._firstFocusItem); evt.stopPropagation(); evt.preventDefault(); } } else if (this.closable && evt.keyCode == keys.ESCAPE) { this.onCancel(); evt.stopPropagation(); evt.preventDefault(); } }, show: function show() { // summary: // Display the dialog // returns: dojo/promise/Promise // Promise object that resolves when the display animation is complete if (this.open) { return resolvedDeferred.promise; } if (!this._started) { this.startup(); } // first time we show the dialog, there's some initialization stuff to do if (!this._alreadyInitialized) { this._setup(); this._alreadyInitialized = true; } if (this._fadeOutDeferred) { // There's a hide() operation in progress, so cancel it, but still call DialogLevelManager.hide() // as though the hide() completed, in preparation for the DialogLevelManager.show() call below. this._fadeOutDeferred.cancel(); DialogLevelManager.hide(this); } // Recenter Dialog if user scrolls browser. Connecting to document doesn't work on IE, need to use window. // Be sure that event object doesn't get passed to resize() method, because it's expecting an optional // {w: ..., h:...} arg. var win = winUtils.get(this.ownerDocument); this._modalconnects.push(on(win, "scroll", lang.hitch(this, "resize", null))); this._modalconnects.push(on(this.domNode, "keydown", lang.hitch(this, "_onKey"))); domStyle.set(this.domNode, { opacity: 0, display: "" }); this._set("open", true); this._onShow(); // lazy load trigger this.resize(); this._position(); // fade-in Animation object, setup below var fadeIn; this._fadeInDeferred = new Deferred(lang.hitch(this, function () { fadeIn.stop(); delete this._fadeInDeferred; })); this._fadeInDeferred.then(undefined, nop); // avoid spurious CancelError message to console // If delay is 0, code below will delete this._fadeInDeferred instantly, so grab promise while we can. var promise = this._fadeInDeferred.promise; fadeIn = fx.fadeIn({ node: this.domNode, duration: this.duration, beforeBegin: lang.hitch(this, function () { DialogLevelManager.show(this, this.underlayAttrs); }), onEnd: lang.hitch(this, function () { if (this.autofocus && DialogLevelManager.isTop(this)) { // find focusable items each time dialog is shown since if dialog contains a widget the // first focusable items can change this._getFocusItems(); _focus.focus(this._firstFocusItem); } this._fadeInDeferred.resolve(true); delete this._fadeInDeferred; }) }).play(); return promise; }, hide: function hide() { // summary: // Hide the dialog // returns: dojo/promise/Promise // Promise object that resolves when the display animation is complete // If we haven't been initialized yet then we aren't showing and we can just return. // Likewise if we are already hidden, or are currently fading out. if (!this._alreadyInitialized || !this.open) { return resolvedDeferred.promise; } if (this._fadeInDeferred) { this._fadeInDeferred.cancel(); } // fade-in Animation object, setup below var fadeOut; this._fadeOutDeferred = new Deferred(lang.hitch(this, function () { fadeOut.stop(); delete this._fadeOutDeferred; })); this._fadeOutDeferred.then(undefined, nop); // avoid spurious CancelError message to console // fire onHide when the promise resolves. this._fadeOutDeferred.then(lang.hitch(this, 'onHide')); // If delay is 0, code below will delete this._fadeOutDeferred instantly, so grab promise while we can. var promise = this._fadeOutDeferred.promise; fadeOut = fx.fadeOut({ node: this.domNode, duration: this.duration, onEnd: lang.hitch(this, function () { this.domNode.style.display = "none"; DialogLevelManager.hide(this); this._fadeOutDeferred.resolve(true); delete this._fadeOutDeferred; }) }).play(); if (this._scrollConnected) { this._scrollConnected = false; } var h; while (h = this._modalconnects.pop()) { h.remove(); } if (this._relativePosition) { delete this._relativePosition; } this._set("open", false); return promise; }, resize: function resize(dim) { // summary: // Called with no argument when viewport scrolled or viewport size changed. Adjusts Dialog as // necessary to keep it visible. // // Can also be called with an argument (by dojox/layout/ResizeHandle etc.) to explicitly set the // size of the dialog. // dim: Object? // Optional dimension object like {w: 200, h: 300} if (this.domNode.style.display != "none") { this._checkIfSingleChild(); if (!dim) { if (this._shrunk) { // If we earlier shrunk the dialog to fit in the viewport, reset it to its natural size if (this._singleChild) { if (typeof this._singleChildOriginalStyle != "undefined") { this._singleChild.domNode.style.cssText = this._singleChildOriginalStyle; delete this._singleChildOriginalStyle; } } array.forEach([this.domNode, this.containerNode, this.titleBar, this.actionBarNode], function (node) { if (node) { // because titleBar may not be defined domStyle.set(node, { position: "static", width: "auto", height: "auto" }); } }); this.domNode.style.position = "absolute"; } // If necessary, shrink Dialog to fit in viewport and have some space around it // to indicate that it's a popup. This will also compensate for possible scrollbars on viewport. var viewport = winUtils.getBox(this.ownerDocument); viewport.w *= this.maxRatio; viewport.h *= this.maxRatio; var bb = domGeometry.position(this.domNode); this._shrunk = false; // First check and limit width, because limiting the width may increase the height due to word wrapping. if (bb.w >= viewport.w) { dim = { w: viewport.w }; domGeometry.setMarginBox(this.domNode, dim); bb = domGeometry.position(this.domNode); this._shrunk = true; } // Now check and limit the height if (bb.h >= viewport.h) { if (!dim) { dim = { w: bb.w }; } dim.h = viewport.h; this._shrunk = true; } if (dim) { if (!dim.w) { dim.w = bb.w; } if (!dim.h) { dim.h = bb.h; } } } // Code to run if user has requested an explicit size, or the shrinking code above set an implicit size if (dim) { // Set this.domNode to specified size domGeometry.setMarginBox(this.domNode, dim); // And then size this.containerNode var layoutNodes = []; if (this.titleBar) { layoutNodes.push({ domNode: this.titleBar, region: "top" }); } if (this.actionBarNode) { layoutNodes.push({ domNode: this.actionBarNode, region: "bottom" }); } var centerSize = { domNode: this.containerNode, region: "center" }; layoutNodes.push(centerSize); var contentDim = utils.marginBox2contentBox(this.domNode, dim); utils.layoutChildren(this.domNode, contentDim, layoutNodes); // And then if this.containerNode has a single layout widget child, size it too. // Otherwise, make this.containerNode show a scrollbar if it's overflowing. if (this._singleChild) { var cb = utils.marginBox2contentBox(this.containerNode, centerSize); // note: if containerNode has padding singleChildSize will have l and t set, // but don't pass them to resize() or it will doubly-offset the child this._singleChild.resize({ w: cb.w, h: cb.h }); // TODO: save original size for restoring it on another show()? } else { this.containerNode.style.overflow = "auto"; this._layoutChildren(); // send resize() event to all child widgets } } else { this._layoutChildren(); // send resize() event to all child widgets } if (!has("touch") && !dim) { // If the user has scrolled the viewport then reposition the Dialog. But don't do it for touch // devices, because it will counteract when a keyboard pops up and then the browser auto-scrolls // the focused node into view. this._position(); } } }, _layoutChildren: function _layoutChildren() { // Override _ContentPaneResizeMixin._layoutChildren because even when there's just a single layout child // widget, sometimes we don't want to size it explicitly (i.e. to pass a dim argument to resize()) array.forEach(this.getChildren(), function (widget) { if (widget.resize) { widget.resize(); } }); }, destroy: function destroy() { if (this._fadeInDeferred) { this._fadeInDeferred.cancel(); } if (this._fadeOutDeferred) { this._fadeOutDeferred.cancel(); } if (this._moveable) { this._moveable.destroy(); } var h; while (h = this._modalconnects.pop()) { h.remove(); } DialogLevelManager.hide(this); this.inherited(arguments); } }); if (has("dojo-bidi")) { _DialogBase = declare("dijit._DialogBase", _DialogBase, { _setTitleAttr: function _setTitleAttr( /*String*/ title) { this._set("title", title); this.titleNode.innerHTML = title; this.applyTextDir(this.titleNode); }, _setTextDirAttr: function _setTextDirAttr(textDir) { if (this._created && this.textDir != textDir) { this._set("textDir", textDir); this.set("title", this.title); } } }); } var Dialog = declare("dijit.Dialog", [ContentPane, _DialogBase], {// summary: // A modal dialog Widget. // description: // Pops up a modal dialog window, blocking access to the screen // and also graying out the screen Dialog is extended from // ContentPane so it supports all the same parameters (href, etc.). // example: // | <div data-dojo-type="dijit/Dialog" data-dojo-props="href: 'test.html'"></div> // example: // | var foo = new Dialog({ title: "test dialog", content: "test content" }); // | foo.placeAt(win.body()); // | foo.startup(); }); Dialog._DialogBase = _DialogBase; // for monkey patching and dojox/widget/DialogSimple var DialogLevelManager = Dialog._DialogLevelManager = { // summary: // Controls the various active "levels" on the page, starting with the // stuff initially visible on the page (at z-index 0), and then having an entry for // each Dialog shown. _beginZIndex: 950, show: function show( /*dijit/_WidgetBase*/ dialog, /*Object*/ underlayAttrs) { // summary: // Call right before fade-in animation for new dialog. // Saves current focus, displays/adjusts underlay for new dialog, // and sets the z-index of the dialog itself. // // New dialog will be displayed on top of all currently displayed dialogs. // // Caller is responsible for setting focus in new dialog after the fade-in // animation completes. // Save current focus ds[ds.length - 1].focus = _focus.curNode; // Set z-index a bit above previous dialog var zIndex = ds[ds.length - 1].dialog ? ds[ds.length - 1].zIndex + 2 : Dialog._DialogLevelManager._beginZIndex; domStyle.set(dialog.domNode, 'zIndex', zIndex); // Display the underlay, or if already displayed then adjust for this new dialog DialogUnderlay.show(underlayAttrs, zIndex - 1); ds.push({ dialog: dialog, underlayAttrs: underlayAttrs, zIndex: zIndex }); }, hide: function hide( /*dijit/_WidgetBase*/ dialog) { // summary: // Called when the specified dialog is hidden/destroyed, after the fade-out // animation ends, in order to reset page focus, fix the underlay, etc. // If the specified dialog isn't open then does nothing. // // Caller is responsible for either setting display:none on the dialog domNode, // or calling dijit/popup.hide(), or removing it from the page DOM. if (ds[ds.length - 1].dialog == dialog) { // Removing the top (or only) dialog in the stack, return focus // to previous dialog ds.pop(); var pd = ds[ds.length - 1]; // the new active dialog (or the base page itself) // Adjust underlay if (ds.length == 1) { // Returning to original page. Hide the underlay. DialogUnderlay.hide(); } else { // Popping back to previous dialog, adjust underlay. DialogUnderlay.show(pd.underlayAttrs, pd.zIndex - 1); } // Adjust focus. // TODO: regardless of setting of dialog.refocus, if the exeucte() method set focus somewhere, // don't shift focus back to button. Note that execute() runs at the start of the fade-out but // this code runs later, at the end of the fade-out. Menu has code like this. if (dialog.refocus) { // If we are returning control to a previous dialog but for some reason // that dialog didn't have a focused field, set focus to first focusable item. // This situation could happen if two dialogs appeared at nearly the same time, // since a dialog doesn't set it's focus until the fade-in is finished. var focus = pd.focus; if (pd.dialog && (!focus || !dom.isDescendant(focus, pd.dialog.domNode))) { pd.dialog._getFocusItems(); focus = pd.dialog._firstFocusItem; } if (focus) { // Refocus the button that spawned the Dialog. This will fail in corner cases including // page unload on IE, because the dijit/form/Button that launched the Dialog may get destroyed // before this code runs. (#15058) try { focus.focus(); } catch (e) {} } } } else { // Removing a dialog out of order (#9944, #10705). // Don't need to mess with underlay or z-index or anything. var idx = array.indexOf(array.map(ds, function (elem) { return elem.dialog; }), dialog); if (idx != -1) { ds.splice(idx, 1); } } }, isTop: function isTop( /*dijit/_WidgetBase*/ dialog) { // summary: // Returns true if specified Dialog is the top in the task return ds[ds.length - 1].dialog == dialog; } }; // Stack representing the various active "levels" on the page, starting with the // stuff initially visible on the page (at z-index 0), and then having an entry for // each Dialog shown. // Each element in stack has form { // dialog: dialogWidget, // focus: returnFromGetFocus(), // underlayAttrs: attributes to set on underlay (when this widget is active) // } var ds = Dialog._dialogStack = [{ dialog: null, focus: null, underlayAttrs: null } // entry for stuff at z-index: 0 ]; // If focus was accidentally removed from the dialog, such as if the user clicked a blank // area of the screen, or clicked the browser's address bar and then tabbed into the page, // then refocus. Won't do anything if focus was removed because the Dialog was closed, or // because a new Dialog popped up on top of the old one, or when focus moves to popups _focus.watch("curNode", function (attr, oldNode, node) { // Note: if no dialogs, ds.length==1 but ds[ds.length-1].dialog is null var topDialog = ds[ds.length - 1].dialog; // If a node was focused, and there's a Dialog currently showing, and not in the process of fading out... // Ignore focus events on other document though because it's likely an Editor inside of the Dialog. if (node && topDialog && !topDialog._fadeOutDeferred && node.ownerDocument == topDialog.ownerDocument) { // If the node that was focused is inside the dialog or in a popup, even a context menu that isn't // technically a descendant of the the dialog, don't do anything. do { if (node == topDialog.domNode || domClass.contains(node, "dijitPopup")) { return; } } while (node = node.parentNode); // Otherwise, return focus to the dialog. Use a delay to avoid confusing dijit/focus code's // own tracking of focus. topDialog.focus(); } }); // Back compat w/1.6, remove for 2.0 if (has("dijit-legacy-requires")) { ready(0, function () { var requires = ["dijit/TooltipDialog"]; require(requires); // use indirection so modules not rolled into a build }); } return Dialog; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/DialogUnderlay.js": /*!**********************************************!*\ !*** ./node_modules/dijit/DialogUnderlay.js ***! \**********************************************/ /*! no static exports found */ /***/ function node_modulesDijitDialogUnderlayJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.hitch __webpack_require__( /*! dojo/aspect */ "./node_modules/dojo/aspect.js"), // aspect.after __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), // domAttr.set __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.getComputedStyle __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/window */ "./node_modules/dojo/window.js"), // winUtils.getBox, winUtils.get __webpack_require__( /*! ./_Widget */ "./node_modules/dijit/_Widget.js"), __webpack_require__( /*! ./_TemplatedMixin */ "./node_modules/dijit/_TemplatedMixin.js"), __webpack_require__( /*! ./BackgroundIframe */ "./node_modules/dijit/BackgroundIframe.js"), __webpack_require__( /*! ./Viewport */ "./node_modules/dijit/Viewport.js"), __webpack_require__( /*! ./main */ "./node_modules/dijit/main.js") // for back-compat, exporting dijit._underlay (remove in 2.0) ], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, lang, aspect, domAttr, domStyle, on, winUtils, _Widget, _TemplatedMixin, BackgroundIframe, Viewport, dijit) { // module: // dijit/DialogUnderlay var DialogUnderlay = declare("dijit.DialogUnderlay", [_Widget, _TemplatedMixin], { // summary: // A component used to block input behind a `dijit/Dialog`. // // Normally this class should not be instantiated directly, but rather shown and hidden via // DialogUnderlay.show() and DialogUnderlay.hide(). And usually the module is not accessed directly // at all, since the underlay is shown and hidden by Dialog.DialogLevelManager. // // The underlay itself can be styled based on and id: // | #myDialog_underlay { background-color:red; } // // In the case of `dijit.Dialog`, this id is based on the id of the Dialog, // suffixed with _underlay. // Template has two divs; outer div is used for fade-in/fade-out, and also to hold background iframe. // Inner div has opacity specified in CSS file. templateString: "<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' tabIndex='-1' data-dojo-attach-point='node'></div></div>", // Parameters on creation or updatable later // dialogId: String // Id of the dialog.... DialogUnderlay's id is based on this id dialogId: "", // class: String // This class name is used on the DialogUnderlay node, in addition to dijitDialogUnderlay "class": "", // This will get overwritten as soon as show() is call, but leave an empty array in case hide() or destroy() // is called first. The array is shared between instances but that's OK because we never write into it. _modalConnects: [], _setDialogIdAttr: function _setDialogIdAttr(id) { domAttr.set(this.node, "id", id + "_underlay"); this._set("dialogId", id); }, _setClassAttr: function _setClassAttr(clazz) { this.node.className = "dijitDialogUnderlay " + clazz; this._set("class", clazz); }, postCreate: function postCreate() { // Append the underlay to the body this.ownerDocumentBody.appendChild(this.domNode); this.own(on(this.domNode, "keydown", lang.hitch(this, "_onKeyDown"))); this.inherited(arguments); }, layout: function layout() { // summary: // Sets the background to the size of the viewport // // description: // Sets the background to the size of the viewport (rather than the size // of the document) since we need to cover the whole browser window, even // if the document is only a few lines long. // tags: // private var is = this.node.style, os = this.domNode.style; // hide the background temporarily, so that the background itself isn't // causing scrollbars to appear (might happen when user shrinks browser // window and then we are called to resize) os.display = "none"; // then resize and show var viewport = winUtils.getBox(this.ownerDocument); os.top = viewport.t + "px"; os.left = viewport.l + "px"; is.width = viewport.w + "px"; is.height = viewport.h + "px"; os.display = "block"; }, show: function show() { // summary: // Show the dialog underlay this.domNode.style.display = "block"; this.open = true; this.layout(); this.bgIframe = new BackgroundIframe(this.domNode); var win = winUtils.get(this.ownerDocument); this._modalConnects = [Viewport.on("resize", lang.hitch(this, "layout")), on(win, "scroll", lang.hitch(this, "layout"))]; }, hide: function hide() { // summary: // Hides the dialog underlay this.bgIframe.destroy(); delete this.bgIframe; this.domNode.style.display = "none"; while (this._modalConnects.length) { this._modalConnects.pop().remove(); } this.open = false; }, destroy: function destroy() { while (this._modalConnects.length) { this._modalConnects.pop().remove(); } this.inherited(arguments); }, _onKeyDown: function _onKeyDown() {// summary: // Extension point so Dialog can monitor keyboard events on the underlay. } }); DialogUnderlay.show = function ( /*Object*/ attrs, /*Number*/ zIndex) { // summary: // Display the underlay with the given attributes set. If the underlay is already displayed, // then adjust it's attributes as specified. // attrs: // The parameters to create DialogUnderlay with. // zIndex: // zIndex of the underlay var underlay = DialogUnderlay._singleton; if (!underlay || underlay._destroyed) { underlay = dijit._underlay = DialogUnderlay._singleton = new DialogUnderlay(attrs); } else { if (attrs) { underlay.set(attrs); } } domStyle.set(underlay.domNode, 'zIndex', zIndex); if (!underlay.open) { underlay.show(); } }; DialogUnderlay.hide = function () { // summary: // Hide the underlay. // Guard code in case the underlay widget has already been destroyed // because we are being called during page unload (when all widgets are destroyed) var underlay = DialogUnderlay._singleton; if (underlay && !underlay._destroyed) { underlay.hide(); } }; return DialogUnderlay; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/Tooltip.js": /*!***************************************!*\ !*** ./node_modules/dijit/Tooltip.js ***! \***************************************/ /*! no static exports found */ /***/ function node_modulesDijitTooltipJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.indexOf array.map __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/_base/fx */ "./node_modules/dojo/_base/fx.js"), // fx.fadeIn fx.fadeOut __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // dom.byId __webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), // domClass.add __webpack_require__( /*! dojo/dom-geometry */ "./node_modules/dojo/dom-geometry.js"), // domGeometry.position __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.set, domStyle.get __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.hitch lang.isArrayLike __webpack_require__( /*! dojo/mouse */ "./node_modules/dojo/mouse.js"), __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie"), has("trident") __webpack_require__( /*! ./_base/manager */ "./node_modules/dijit/_base/manager.js"), // manager.defaultDuration __webpack_require__( /*! ./place */ "./node_modules/dijit/place.js"), __webpack_require__( /*! ./_Widget */ "./node_modules/dijit/_Widget.js"), __webpack_require__( /*! ./_TemplatedMixin */ "./node_modules/dijit/_TemplatedMixin.js"), __webpack_require__( /*! ./BackgroundIframe */ "./node_modules/dijit/BackgroundIframe.js"), __webpack_require__( /*! dojo/text!./templates/Tooltip.html */ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/templates/Tooltip.html"), __webpack_require__( /*! ./main */ "./node_modules/dijit/main.js") // sets dijit.showTooltip etc. for back-compat ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, fx, dom, domClass, domGeometry, domStyle, lang, mouse, on, has, manager, place, _Widget, _TemplatedMixin, BackgroundIframe, template, dijit) { // module: // dijit/Tooltip // TODO: Tooltip should really share more positioning code with TooltipDialog, like: // - the orient() method // - the connector positioning code in show() // - the dijitTooltip[Dialog] class // // The problem is that Tooltip's implementation supplies it's own <iframe> and interacts directly // with dijit/place, rather than going through dijit/popup like TooltipDialog and other popups (ex: Menu). var MasterTooltip = declare("dijit._MasterTooltip", [_Widget, _TemplatedMixin], { // summary: // Internal widget that holds the actual tooltip markup, // which occurs once per page. // Called by Tooltip widgets which are just containers to hold // the markup // tags: // protected // duration: Integer // Milliseconds to fade in/fade out duration: manager.defaultDuration, templateString: template, postCreate: function postCreate() { this.ownerDocumentBody.appendChild(this.domNode); this.bgIframe = new BackgroundIframe(this.domNode); // Setup fade-in and fade-out functions. this.fadeIn = fx.fadeIn({ node: this.domNode, duration: this.duration, onEnd: lang.hitch(this, "_onShow") }); this.fadeOut = fx.fadeOut({ node: this.domNode, duration: this.duration, onEnd: lang.hitch(this, "_onHide") }); }, show: function show(innerHTML, aroundNode, position, rtl, textDir, onMouseEnter, onMouseLeave) { // summary: // Display tooltip w/specified contents to right of specified node // (To left if there's no space on the right, or if rtl == true) // innerHTML: String // Contents of the tooltip // aroundNode: DomNode|dijit/place.__Rectangle // Specifies that tooltip should be next to this node / area // position: String[]? // List of positions to try to position tooltip (ex: ["right", "above"]) // rtl: Boolean? // Corresponds to `WidgetBase.dir` attribute, where false means "ltr" and true // means "rtl"; specifies GUI direction, not text direction. // textDir: String? // Corresponds to `WidgetBase.textdir` attribute; specifies direction of text. // onMouseEnter: Function? // Callback function for mouse enter on tooltip // onMouseLeave: Function? // Callback function for mouse leave on tooltip if (this.aroundNode && this.aroundNode === aroundNode && this.containerNode.innerHTML == innerHTML) { return; } if (this.fadeOut.status() == "playing") { // previous tooltip is being hidden; wait until the hide completes then show new one this._onDeck = arguments; return; } this.containerNode.innerHTML = innerHTML; if (textDir) { this.set("textDir", textDir); } this.containerNode.align = rtl ? "right" : "left"; //fix the text alignment var pos = place.around(this.domNode, aroundNode, position && position.length ? position : Tooltip.defaultPosition, !rtl, lang.hitch(this, "orient")); // Position the tooltip connector for middle alignment. // This could not have been done in orient() since the tooltip wasn't positioned at that time. var aroundNodeCoords = pos.aroundNodePos; if (pos.corner.charAt(0) == 'M' && pos.aroundCorner.charAt(0) == 'M') { this.connectorNode.style.top = aroundNodeCoords.y + (aroundNodeCoords.h - this.connectorNode.offsetHeight >> 1) - pos.y + "px"; this.connectorNode.style.left = ""; } else if (pos.corner.charAt(1) == 'M' && pos.aroundCorner.charAt(1) == 'M') { this.connectorNode.style.left = aroundNodeCoords.x + (aroundNodeCoords.w - this.connectorNode.offsetWidth >> 1) - pos.x + "px"; } else { // Not *-centered, but just above/below/after/before this.connectorNode.style.left = ""; this.connectorNode.style.top = ""; } // show it domStyle.set(this.domNode, "opacity", 0); this.fadeIn.play(); this.isShowingNow = true; this.aroundNode = aroundNode; this.onMouseEnter = onMouseEnter || noop; this.onMouseLeave = onMouseLeave || noop; }, orient: function orient( /*DomNode*/ node, /*String*/ aroundCorner, /*String*/ tooltipCorner, /*Object*/ spaceAvailable, /*Object*/ aroundNodeCoords) { // summary: // Private function to set CSS for tooltip node based on which position it's in. // This is called by the dijit popup code. It will also reduce the tooltip's // width to whatever width is available // tags: // protected this.connectorNode.style.top = ""; //reset to default var heightAvailable = spaceAvailable.h, widthAvailable = spaceAvailable.w; node.className = "dijitTooltip " + { "MR-ML": "dijitTooltipRight", "ML-MR": "dijitTooltipLeft", "TM-BM": "dijitTooltipAbove", "BM-TM": "dijitTooltipBelow", "BL-TL": "dijitTooltipBelow dijitTooltipABLeft", "TL-BL": "dijitTooltipAbove dijitTooltipABLeft", "BR-TR": "dijitTooltipBelow dijitTooltipABRight", "TR-BR": "dijitTooltipAbove dijitTooltipABRight", "BR-BL": "dijitTooltipRight", "BL-BR": "dijitTooltipLeft" }[aroundCorner + "-" + tooltipCorner]; // reset width; it may have been set by orient() on a previous tooltip show() this.domNode.style.width = "auto"; // Reduce tooltip's width to the amount of width available, so that it doesn't overflow screen. // Note that sometimes widthAvailable is negative, but we guard against setting style.width to a // negative number since that causes an exception on IE. var size = domGeometry.position(this.domNode); if (has("ie") || has("trident")) { // workaround strange IE bug where setting width to offsetWidth causes words to wrap size.w += 2; } var width = Math.min(Math.max(widthAvailable, 1), size.w); domGeometry.setMarginBox(this.domNode, { w: width }); // Reposition the tooltip connector. if (tooltipCorner.charAt(0) == 'B' && aroundCorner.charAt(0) == 'B') { var bb = domGeometry.position(node); var tooltipConnectorHeight = this.connectorNode.offsetHeight; if (bb.h > heightAvailable) { // The tooltip starts at the top of the page and will extend past the aroundNode var aroundNodePlacement = heightAvailable - (aroundNodeCoords.h + tooltipConnectorHeight >> 1); this.connectorNode.style.top = aroundNodePlacement + "px"; this.connectorNode.style.bottom = ""; } else { // Align center of connector with center of aroundNode, except don't let bottom // of connector extend below bottom of tooltip content, or top of connector // extend past top of tooltip content this.connectorNode.style.bottom = Math.min(Math.max(aroundNodeCoords.h / 2 - tooltipConnectorHeight / 2, 0), bb.h - tooltipConnectorHeight) + "px"; this.connectorNode.style.top = ""; } } else { // reset the tooltip back to the defaults this.connectorNode.style.top = ""; this.connectorNode.style.bottom = ""; } return Math.max(0, size.w - widthAvailable); }, _onShow: function _onShow() { // summary: // Called at end of fade-in operation // tags: // protected if (has("ie")) { // the arrow won't show up on a node w/an opacity filter this.domNode.style.filter = ""; } }, hide: function hide(aroundNode) { // summary: // Hide the tooltip if (this._onDeck && this._onDeck[1] == aroundNode) { // this hide request is for a show() that hasn't even started yet; // just cancel the pending show() this._onDeck = null; } else if (this.aroundNode === aroundNode) { // this hide request is for the currently displayed tooltip this.fadeIn.stop(); this.isShowingNow = false; this.aroundNode = null; this.fadeOut.play(); } else {// just ignore the call, it's for a tooltip that has already been erased } this.onMouseEnter = this.onMouseLeave = noop; }, _onHide: function _onHide() { // summary: // Called at end of fade-out operation // tags: // protected this.domNode.style.cssText = ""; // to position offscreen again this.containerNode.innerHTML = ""; if (this._onDeck) { // a show request has been queued up; do it now this.show.apply(this, this._onDeck); this._onDeck = null; } } }); if (has("dojo-bidi")) { MasterTooltip.extend({ _setAutoTextDir: function _setAutoTextDir( /*Object*/ node) { // summary: // Resolve "auto" text direction for children nodes // tags: // private this.applyTextDir(node); array.forEach(node.children, function (child) { this._setAutoTextDir(child); }, this); }, _setTextDirAttr: function _setTextDirAttr( /*String*/ textDir) { // summary: // Setter for textDir. // description: // Users shouldn't call this function; they should be calling // set('textDir', value) // tags: // private this._set("textDir", textDir); if (textDir == "auto") { this._setAutoTextDir(this.containerNode); } else { this.containerNode.dir = this.textDir; } } }); } dijit.showTooltip = function (innerHTML, aroundNode, position, rtl, textDir, onMouseEnter, onMouseLeave) { // summary: // Static method to display tooltip w/specified contents in specified position. // See description of dijit/Tooltip.defaultPosition for details on position parameter. // If position is not specified then dijit/Tooltip.defaultPosition is used. // innerHTML: String // Contents of the tooltip // aroundNode: place.__Rectangle // Specifies that tooltip should be next to this node / area // position: String[]? // List of positions to try to position tooltip (ex: ["right", "above"]) // rtl: Boolean? // Corresponds to `WidgetBase.dir` attribute, where false means "ltr" and true // means "rtl"; specifies GUI direction, not text direction. // textDir: String? // Corresponds to `WidgetBase.textdir` attribute; specifies direction of text. // onMouseEnter: Function? // Callback function for mouse over on tooltip // onMouseLeave: Function? // Callback function for mouse leave on tooltip // After/before don't work, but for back-compat convert them to the working after-centered, before-centered. // Possibly remove this in 2.0. Alternately, get before/after to work. if (position) { position = array.map(position, function (val) { return { after: "after-centered", before: "before-centered" }[val] || val; }); } if (!Tooltip._masterTT) { dijit._masterTT = Tooltip._masterTT = new MasterTooltip(); } return Tooltip._masterTT.show(innerHTML, aroundNode, position, rtl, textDir, onMouseEnter, onMouseLeave); }; dijit.hideTooltip = function (aroundNode) { // summary: // Static method to hide the tooltip displayed via showTooltip() return Tooltip._masterTT && Tooltip._masterTT.hide(aroundNode); }; // Possible states for a tooltip, see Tooltip.state property for definitions var DORMANT = "DORMANT", SHOW_TIMER = "SHOW TIMER", SHOWING = "SHOWING", HIDE_TIMER = "HIDE TIMER"; function noop() {} var Tooltip = declare("dijit.Tooltip", _Widget, { // summary: // Pops up a tooltip (a help message) when you hover over a node. // Also provides static show() and hide() methods that can be used without instantiating a dijit/Tooltip. // label: String // HTML to display in the tooltip. // Specified as innerHTML when creating the widget from markup. label: "", // showDelay: Integer // Number of milliseconds to wait after hovering over/focusing on the object, before // the tooltip is displayed. showDelay: 400, // hideDelay: Integer // Number of milliseconds to wait after unhovering the object, before // the tooltip is hidden. Note that blurring an object hides the tooltip immediately. hideDelay: 400, // connectId: String|String[]|DomNode|DomNode[] // Id of domNode(s) to attach the tooltip to. // When user hovers over specified dom node(s), the tooltip will appear. connectId: [], // position: String[] // See description of `dijit/Tooltip.defaultPosition` for details on position parameter. position: [], // selector: String? // CSS expression to apply this Tooltip to descendants of connectIds, rather than to // the nodes specified by connectIds themselves. Useful for applying a Tooltip to // a range of rows in a table, tree, etc. Use in conjunction with getContent() parameter. // Ex: connectId: myTable, selector: "tr", getContent: function(node){ return ...; } // // The application must require() an appropriate level of dojo/query to handle the selector. selector: "", // TODO: in 2.0 remove support for multiple connectIds. selector gives the same effect. // So, change connectId to a "", remove addTarget()/removeTarget(), etc. _setConnectIdAttr: function _setConnectIdAttr( /*String|String[]|DomNode|DomNode[]*/ newId) { // summary: // Connect to specified node(s) // Remove connections to old nodes (if there are any) array.forEach(this._connections || [], function (nested) { array.forEach(nested, function (handle) { handle.remove(); }); }, this); // Make array of id's to connect to, excluding entries for nodes that don't exist yet, see startup() this._connectIds = array.filter(lang.isArrayLike(newId) ? newId : newId ? [newId] : [], function (id) { return dom.byId(id, this.ownerDocument); }, this); // Make connections this._connections = array.map(this._connectIds, function (id) { var node = dom.byId(id, this.ownerDocument), selector = this.selector, delegatedEvent = selector ? function (eventType) { return on.selector(selector, eventType); } : function (eventType) { return eventType; }, self = this; return [on(node, delegatedEvent(mouse.enter), function () { self._onHover(this); }), on(node, delegatedEvent("focusin"), function () { self._onHover(this); }), on(node, delegatedEvent(mouse.leave), lang.hitch(self, "_onUnHover")), on(node, delegatedEvent("focusout"), lang.hitch(self, "set", "state", DORMANT))]; }, this); this._set("connectId", newId); }, addTarget: function addTarget( /*DomNode|String*/ node) { // summary: // Attach tooltip to specified node if it's not already connected // TODO: remove in 2.0 and just use set("connectId", ...) interface var id = node.id || node; if (array.indexOf(this._connectIds, id) == -1) { this.set("connectId", this._connectIds.concat(id)); } }, removeTarget: function removeTarget( /*DomNode|String*/ node) { // summary: // Detach tooltip from specified node // TODO: remove in 2.0 and just use set("connectId", ...) interface var id = node.id || node, // map from DOMNode back to plain id string idx = array.indexOf(this._connectIds, id); if (idx >= 0) { // remove id (modifies original this._connectIds but that's OK in this case) this._connectIds.splice(idx, 1); this.set("connectId", this._connectIds); } }, buildRendering: function buildRendering() { this.inherited(arguments); domClass.add(this.domNode, "dijitTooltipData"); }, startup: function startup() { this.inherited(arguments); // If this tooltip was created in a template, or for some other reason the specified connectId[s] // didn't exist during the widget's initialization, then connect now. var ids = this.connectId; array.forEach(lang.isArrayLike(ids) ? ids : [ids], this.addTarget, this); }, getContent: function getContent( /*DomNode*/ node) { // summary: // User overridable function that return the text to display in the tooltip. // tags: // extension return this.label || this.domNode.innerHTML; }, // state: [private readonly] String // One of: // // - DORMANT: tooltip not SHOWING // - SHOW TIMER: tooltip not SHOWING but timer set to show it // - SHOWING: tooltip displayed // - HIDE TIMER: tooltip displayed, but timer set to hide it state: DORMANT, _setStateAttr: function _setStateAttr(val) { if (this.state == val || val == SHOW_TIMER && this.state == SHOWING || val == HIDE_TIMER && this.state == DORMANT) { return; } if (this._hideTimer) { this._hideTimer.remove(); delete this._hideTimer; } if (this._showTimer) { this._showTimer.remove(); delete this._showTimer; } switch (val) { case DORMANT: if (this._connectNode) { Tooltip.hide(this._connectNode); delete this._connectNode; this.onHide(); } break; case SHOW_TIMER: // set timer to show tooltip // should only get here from a DORMANT state, i.e. tooltip can't be already SHOWING if (this.state != SHOWING) { this._showTimer = this.defer(function () { this.set("state", SHOWING); }, this.showDelay); } break; case SHOWING: // show tooltip and clear timers var content = this.getContent(this._connectNode); if (!content) { this.set("state", DORMANT); return; } // Show tooltip and setup callbacks for mouseenter/mouseleave of tooltip itself Tooltip.show(content, this._connectNode, this.position, !this.isLeftToRight(), this.textDir, lang.hitch(this, "set", "state", SHOWING), lang.hitch(this, "set", "state", HIDE_TIMER)); this.onShow(this._connectNode, this.position); break; case HIDE_TIMER: // set timer set to hide tooltip this._hideTimer = this.defer(function () { this.set("state", DORMANT); }, this.hideDelay); break; } this._set("state", val); }, _onHover: function _onHover( /*DomNode*/ target) { // summary: // Despite the name of this method, it actually handles both hover and focus // events on the target node, setting a timer to show the tooltip. // tags: // private if (this._connectNode && target != this._connectNode) { // Tooltip is displaying for another node this.set("state", DORMANT); } this._connectNode = target; // _connectNode means "tooltip currently displayed for this node" this.set("state", SHOW_TIMER); // no-op if show-timer already set, or if already showing }, _onUnHover: function _onUnHover( /*DomNode*/ target) { // summary: // Handles mouseleave event on the target node, hiding the tooltip. // tags: // private this.set("state", HIDE_TIMER); // no-op if already dormant, or if hide-timer already set }, // open() and close() aren't used anymore, except from the _BidiSupport/misc/Tooltip test. // Should probably remove for 2.0, but leaving for now. open: function open( /*DomNode*/ target) { // summary: // Display the tooltip; usually not called directly. // tags: // private this.set("state", DORMANT); this._connectNode = target; // _connectNode means "tooltip currently displayed for this node" this.set("state", SHOWING); }, close: function close() { // summary: // Hide the tooltip or cancel timer for show of tooltip // tags: // private this.set("state", DORMANT); }, onShow: function onShow() {// summary: // Called when the tooltip is shown // tags: // callback }, onHide: function onHide() {// summary: // Called when the tooltip is hidden // tags: // callback }, destroy: function destroy() { this.set("state", DORMANT); // Remove connections manually since they aren't registered to be removed by _WidgetBase array.forEach(this._connections || [], function (nested) { array.forEach(nested, function (handle) { handle.remove(); }); }, this); this.inherited(arguments); } }); Tooltip._MasterTooltip = MasterTooltip; // for monkey patching Tooltip.show = dijit.showTooltip; // export function through module return value Tooltip.hide = dijit.hideTooltip; // export function through module return value Tooltip.defaultPosition = ["after-centered", "before-centered"]; /*===== lang.mixin(Tooltip, { // defaultPosition: String[] // This variable controls the position of tooltips, if the position is not specified to // the Tooltip widget or *TextBox widget itself. It's an array of strings with the values // possible for `dijit/place.around()`. The recommended values are: // // - before-centered: centers tooltip to the left of the anchor node/widget, or to the right // in the case of RTL scripts like Hebrew and Arabic // - after-centered: centers tooltip to the right of the anchor node/widget, or to the left // in the case of RTL scripts like Hebrew and Arabic // - above-centered: tooltip is centered above anchor node // - below-centered: tooltip is centered above anchor node // // The list is positions is tried, in order, until a position is found where the tooltip fits // within the viewport. // // Be careful setting this parameter. A value of "above-centered" may work fine until the user scrolls // the screen so that there's no room above the target node. Nodes with drop downs, like // DropDownButton or FilteringSelect, are especially problematic, in that you need to be sure // that the drop down and tooltip don't overlap, even when the viewport is scrolled so that there // is only room below (or above) the target node, but not both. }); =====*/ return Tooltip; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/Viewport.js": /*!****************************************!*\ !*** ./node_modules/dijit/Viewport.js ***! \****************************************/ /*! no static exports found */ /***/ function node_modulesDijitViewportJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/Evented */ "./node_modules/dojo/Evented.js"), __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/domReady */ "./node_modules/dojo/domReady.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie"), has("ios") __webpack_require__( /*! dojo/window */ "./node_modules/dojo/window.js") // getBox() ], __WEBPACK_AMD_DEFINE_RESULT__ = function (Evented, on, domReady, has, winUtils) { // module: // dijit/Viewport /*===== return { // summary: // Utility singleton to watch for viewport resizes, avoiding duplicate notifications // which can lead to infinite loops. // description: // Usage: Viewport.on("resize", myCallback). // // myCallback() is called without arguments in case it's _WidgetBase.resize(), // which would interpret the argument as the size to make the widget. }; =====*/ var Viewport = new Evented(); var focusedNode; domReady(function () { var oldBox = winUtils.getBox(); Viewport._rlh = on(window, "resize", function () { var newBox = winUtils.getBox(); if (oldBox.h == newBox.h && oldBox.w == newBox.w) { return; } oldBox = newBox; Viewport.emit("resize"); }); // Also catch zoom changes on IE8, since they don't naturally generate resize events if (has("ie") == 8) { var deviceXDPI = screen.deviceXDPI; setInterval(function () { if (screen.deviceXDPI != deviceXDPI) { deviceXDPI = screen.deviceXDPI; Viewport.emit("resize"); } }, 500); } // On iOS, keep track of the focused node so we can guess when the keyboard is/isn't being displayed. if (has("ios")) { on(document, "focusin", function (evt) { focusedNode = evt.target; }); on(document, "focusout", function (evt) { focusedNode = null; }); } }); Viewport.getEffectiveBox = function ( /*Document*/ doc) { // summary: // Get the size of the viewport, or on mobile devices, the part of the viewport not obscured by the // virtual keyboard. var box = winUtils.getBox(doc); // Account for iOS virtual keyboard, if it's being shown. Unfortunately no direct way to check or measure. var tag = focusedNode && focusedNode.tagName && focusedNode.tagName.toLowerCase(); if (has("ios") && focusedNode && !focusedNode.readOnly && (tag == "textarea" || tag == "input" && /^(color|email|number|password|search|tel|text|url)$/.test(focusedNode.type))) { // Box represents the size of the viewport. Some of the viewport is likely covered by the keyboard. // Estimate height of visible viewport assuming viewport goes to bottom of screen, but is covered by keyboard. box.h *= orientation == 0 || orientation == 180 ? 0.66 : 0.40; // Above measurement will be inaccurate if viewport was scrolled up so far that it ends before the bottom // of the screen. In this case, keyboard isn't covering as much of the viewport as we thought. // We know the visible size is at least the distance from the top of the viewport to the focused node. var rect = focusedNode.getBoundingClientRect(); box.h = Math.max(box.h, rect.top + rect.height); } return box; }; return Viewport; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_AttachMixin.js": /*!********************************************!*\ !*** ./node_modules/dijit/_AttachMixin.js ***! \********************************************/ /*! no static exports found */ /***/ function node_modulesDijit_AttachMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), __webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach __webpack_require__( /*! dojo/_base/connect */ "./node_modules/dojo/_base/connect.js"), // remove for 2.0 __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.getObject __webpack_require__( /*! dojo/mouse */ "./node_modules/dojo/mouse.js"), __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/touch */ "./node_modules/dojo/touch.js"), __webpack_require__( /*! ./_WidgetBase */ "./node_modules/dijit/_WidgetBase.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (require, array, connect, declare, lang, mouse, on, touch, _WidgetBase) { // module: // dijit/_AttachMixin // Map from string name like "mouseenter" to synthetic event like mouse.enter var synthEvents = lang.delegate(touch, { "mouseenter": mouse.enter, "mouseleave": mouse.leave, "keypress": connect._keypress // remove for 2.0 }); // To be lightweight, _AttachMixin doesn't require() dijit/a11yclick. // If the subclass has a template using "ondijitclick", it must load dijit/a11yclick itself. // In that case, the a11yclick variable below will get set to point to that synthetic event. var a11yclick; var _AttachMixin = declare("dijit._AttachMixin", null, { // summary: // Mixin for widgets to attach to dom nodes and setup events via // convenient data-dojo-attach-point and data-dojo-attach-event DOM attributes. // // Superclass of _TemplatedMixin, and can also be used standalone when templates are pre-rendered on the // server. // // Does not [yet] handle widgets like ContentPane with this.containerNode set. It should skip // scanning for data-dojo-attach-point and data-dojo-attach-event inside this.containerNode, but it // doesn't. /*===== // _attachPoints: [private] String[] // List of widget attribute names associated with data-dojo-attach-point=... in the // template, ex: ["containerNode", "labelNode"] _attachPoints: [], // _attachEvents: [private] Handle[] // List of connections associated with data-dojo-attach-event=... in the // template _attachEvents: [], // attachScope: [public] Object // Object to which attach points and events will be scoped. Defaults // to 'this'. attachScope: undefined, // searchContainerNode: [protected] Boolean // Search descendants of this.containerNode for data-dojo-attach-point and data-dojo-attach-event. // Should generally be left false (the default value) both for performance and to avoid failures when // this.containerNode holds other _AttachMixin instances with their own attach points and events. searchContainerNode: false, =====*/ constructor: function constructor() { // summary: // Create the widget. // params: Object|null // Hash of initialization parameters for widget, including scalar values (like title, duration etc.) // and functions, typically callbacks like onClick. // The hash can contain any of the widget's properties, excluding read-only properties. // srcNodeRef: DOMNode|String? // If a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree. this._attachPoints = []; this._attachEvents = []; }, buildRendering: function buildRendering() { // summary: // Attach to DOM nodes marked with special attributes. // tags: // protected this.inherited(arguments); // recurse through the node, looking for, and attaching to, our // attachment points and events, which should be defined on the template node. this._attachTemplateNodes(this.domNode); this._beforeFillContent(); // hook for _WidgetsInTemplateMixin }, _beforeFillContent: function _beforeFillContent() {}, _attachTemplateNodes: function _attachTemplateNodes(rootNode) { // summary: // Iterate through the dom nodes and attach functions and nodes accordingly. // description: // Map widget properties and functions to the handlers specified in // the dom node and it's descendants. This function iterates over all // nodes and looks for these properties: // // - dojoAttachPoint/data-dojo-attach-point // - dojoAttachEvent/data-dojo-attach-event // rootNode: DomNode // The node to search for properties. All descendants will be searched. // tags: // private // DFS to process all nodes except those inside of this.containerNode var node = rootNode; while (true) { if (node.nodeType == 1 && (this._processTemplateNode(node, function (n, p) { return n.getAttribute(p); }, this._attach) || this.searchContainerNode) && node.firstChild) { node = node.firstChild; } else { if (node == rootNode) { return; } while (!node.nextSibling) { node = node.parentNode; if (node == rootNode) { return; } } node = node.nextSibling; } } }, _processTemplateNode: function _processTemplateNode( /*DOMNode|Widget*/ baseNode, getAttrFunc, attachFunc) { // summary: // Process data-dojo-attach-point and data-dojo-attach-event for given node or widget. // Returns true if caller should process baseNode's children too. var ret = true; // Process data-dojo-attach-point var _attachScope = this.attachScope || this, attachPoint = getAttrFunc(baseNode, "dojoAttachPoint") || getAttrFunc(baseNode, "data-dojo-attach-point"); if (attachPoint) { var point, points = attachPoint.split(/\s*,\s*/); while (point = points.shift()) { if (lang.isArray(_attachScope[point])) { _attachScope[point].push(baseNode); } else { _attachScope[point] = baseNode; } ret = point != "containerNode"; this._attachPoints.push(point); } } // Process data-dojo-attach-event var attachEvent = getAttrFunc(baseNode, "dojoAttachEvent") || getAttrFunc(baseNode, "data-dojo-attach-event"); if (attachEvent) { // NOTE: we want to support attributes that have the form // "domEvent: nativeEvent, ..." var event, events = attachEvent.split(/\s*,\s*/); var trim = lang.trim; while (event = events.shift()) { if (event) { var thisFunc = null; if (event.indexOf(":") != -1) { // oh, if only JS had tuple assignment var funcNameArr = event.split(":"); event = trim(funcNameArr[0]); thisFunc = trim(funcNameArr[1]); } else { event = trim(event); } if (!thisFunc) { thisFunc = event; } this._attachEvents.push(attachFunc(baseNode, event, lang.hitch(_attachScope, thisFunc))); } } } return ret; }, _attach: function _attach(node, type, func) { // summary: // Roughly corresponding to dojo/on, this is the default function for processing a // data-dojo-attach-event. Meant to attach to DOMNodes, not to widgets. // node: DOMNode // The node to setup a listener on. // type: String // Event name like "click". // getAttrFunc: Function // Function to get the specified property for a given DomNode/Widget. // attachFunc: Function? // Attaches an event handler from the specified node/widget to specified function. // Map special type names like "mouseenter" to synthetic events. // Subclasses are responsible to require() dijit/a11yclick if they want to use it. type = type.replace(/^on/, "").toLowerCase(); if (type == "dijitclick") { type = a11yclick || (a11yclick = require("./a11yclick")); } else { type = synthEvents[type] || type; } return on(node, type, func); }, _detachTemplateNodes: function _detachTemplateNodes() { // summary: // Detach and clean up the attachments made in _attachtempalteNodes. // Delete all attach points to prevent IE6 memory leaks. var _attachScope = this.attachScope || this; array.forEach(this._attachPoints, function (point) { delete _attachScope[point]; }); this._attachPoints = []; // And same for event handlers array.forEach(this._attachEvents, function (handle) { handle.remove(); }); this._attachEvents = []; }, destroyRendering: function destroyRendering() { this._detachTemplateNodes(); this.inherited(arguments); } }); // These arguments can be specified for widgets which are used in templates. // Since any widget can be specified as sub widgets in template, mix it // into the base widget class. (This is a hack, but it's effective.). // Remove for 2.0. Also, hide from API doc parser. lang.extend(_WidgetBase, /*===== {} || =====*/ { dojoAttachEvent: "", dojoAttachPoint: "" }); return _AttachMixin; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_BidiMixin.js": /*!******************************************!*\ !*** ./node_modules/dijit/_BidiMixin.js ***! \******************************************/ /*! no static exports found */ /***/ function node_modulesDijit_BidiMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () { // module: // dijit/_BidiMixin // UCC - constants that will be used by bidi support. var bidi_const = { LRM: "\u200E", LRE: "\u202A", PDF: "\u202C", RLM: "\u200F", RLE: "\u202B" }; return { // summary: // When has("dojo-bidi") is true, _WidgetBase will mixin this class. It enables support for the textdir // property to control text direction independently from the GUI direction. // description: // There's a special need for displaying BIDI text in rtl direction // in ltr GUI, sometimes needed auto support. // In creation of widget, if it's want to activate this class, // the widget should define the "textDir". getTextDir: function getTextDir( /*String*/ text) { // summary: // Gets the right direction of text. // description: // If textDir is ltr or rtl returns the value. // If it's auto, calls to another function that responsible // for checking the value, and defining the direction. // tags: // protected. return this.textDir == "auto" ? this._checkContextual(text) : this.textDir; }, _checkContextual: function _checkContextual(text) { // summary: // Finds the first strong (directional) character, return ltr if isLatin // or rtl if isBidiChar. // tags: // private. // look for strong (directional) characters var fdc = /[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(text); // if found return the direction that defined by the character, else return widgets dir as defult. return fdc ? fdc[0] <= 'z' ? "ltr" : "rtl" : this.dir ? this.dir : this.isLeftToRight() ? "ltr" : "rtl"; }, applyTextDir: function applyTextDir( /*DOMNode*/ element, /*String?*/ text) { // summary: // Set element.dir according to this.textDir, assuming this.textDir has a value. // element: // The text element to be set. Should have dir property. // text: // If specified, and this.textDir is "auto", for calculating the right transformation // Otherwise text read from element. // description: // If textDir is ltr or rtl returns the value. // If it's auto, calls to another function that responsible // for checking the value, and defining the direction. // tags: // protected. if (this.textDir) { var textDir = this.textDir; if (textDir == "auto") { // convert "auto" to either "ltr" or "rtl" if (typeof text === "undefined") { // text not specified, get text from element var tagName = element.tagName.toLowerCase(); text = tagName == "input" || tagName == "textarea" ? element.value : element.innerText || element.textContent || ""; } textDir = this._checkContextual(text); } if (element.dir != textDir) { // set element's dir to match textDir, but not when textDir is null and not when it already matches element.dir = textDir; } } }, enforceTextDirWithUcc: function enforceTextDirWithUcc(option, text) { // summary: // Wraps by UCC (Unicode control characters) option's text according to this.textDir // option: // The element (`<option>`) we wrapping the text for. // text: // The text to be wrapped. // description: // There's a dir problem with some HTML elements. For some elements (e.g. `<option>`, `<select>`) // defining the dir in different direction then the GUI orientation, won't display correctly. // FF 3.6 will change the alignment of the text in option - this doesn't follow the bidi standards (static text // should be aligned following GUI direction). IE8 and Opera11.10 completely ignore dir setting for `<option>`. // Therefore the only solution is to use UCC (Unicode control characters) to display the text in correct orientation. // This function saves the original text value for later restoration if needed, for example if the textDir will change etc. if (this.textDir) { if (option) { option.originalText = text; } var dir = this.textDir == "auto" ? this._checkContextual(text) : this.textDir; return (dir == "ltr" ? bidi_const.LRE : bidi_const.RLE) + text + bidi_const.PDF; } return text; }, restoreOriginalText: function restoreOriginalText(origObj) { // summary: // Restores the text of origObj, if needed, after enforceTextDirWithUcc, e.g. set("textDir", textDir). // origObj: // The element (`<option>`) to restore. // description: // Sets the text of origObj to origObj.originalText, which is the original text, without the UCCs. // The function than removes the originalText from origObj! if (origObj.originalText) { origObj.text = origObj.originalText; delete origObj.originalText; } return origObj; }, _setTextDirAttr: function _setTextDirAttr( /*String*/ textDir) { // summary: // Setter for textDir. // description: // Users shouldn't call this function; they should be calling // set('textDir', value) if (!this._created || this.textDir != textDir) { this._set("textDir", textDir); var node = null; if (this.displayNode) { node = this.displayNode; this.displayNode.align = this.dir == "rtl" ? "right" : "left"; } else { node = this.textDirNode || this.focusNode || this.textbox; } if (node) { this.applyTextDir(node); } } } }; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_Container.js": /*!******************************************!*\ !*** ./node_modules/dijit/_Container.js ***! \******************************************/ /*! no static exports found */ /***/ function node_modulesDijit_ContainerJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.indexOf __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom-construct */ "./node_modules/dojo/dom-construct.js"), // domConstruct.place __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js") // kernel.deprecated ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, domConstruct, kernel) { // module: // dijit/_Container return declare("dijit._Container", null, { // summary: // Mixin for widgets that contain HTML and/or a set of widget children. buildRendering: function buildRendering() { this.inherited(arguments); if (!this.containerNode) { // All widgets with descendants must set containerNode. // NB: this code doesn't quite work right because for TabContainer it runs before // _TemplatedMixin::buildRendering(), and thus // sets this.containerNode to this.domNode, later to be overridden by the assignment in the template. this.containerNode = this.domNode; } }, addChild: function addChild( /*dijit/_WidgetBase*/ widget, /*int?*/ insertIndex) { // summary: // Makes the given widget a child of this widget. // description: // Inserts specified child widget's dom node as a child of this widget's // container node, and possibly does other processing (such as layout). // I want to just call domConstruct.place(widget.domNode, this.containerNode, insertIndex), but the counting // is thrown off by text nodes and comment nodes that show up when constructed by markup. // In the future consider stripping those nodes on construction, either in the parser or this widget code. var refNode = this.containerNode; if (insertIndex > 0) { // Old-school way to get nth child; dojo.query would be easier but _Container was weened from dojo.query // in #10087 to minimize download size. Not sure if that's still and issue with new smaller dojo/query. refNode = refNode.firstChild; while (insertIndex > 0) { if (refNode.nodeType == 1) { insertIndex--; } refNode = refNode.nextSibling; } if (refNode) { insertIndex = "before"; } else { // to support addChild(child, n-1) where there are n children (should add child at end) refNode = this.containerNode; insertIndex = "last"; } } domConstruct.place(widget.domNode, refNode, insertIndex); // If I've been started but the child widget hasn't been started, // start it now. Make sure to do this after widget has been // inserted into the DOM tree, so it can see that it's being controlled by me, // so it doesn't try to size itself. if (this._started && !widget._started) { widget.startup(); } }, removeChild: function removeChild( /*Widget|int*/ widget) { // summary: // Removes the passed widget instance from this widget but does // not destroy it. You can also pass in an integer indicating // the index within the container to remove (ie, removeChild(5) removes the sixth widget). if (typeof widget == "number") { widget = this.getChildren()[widget]; } if (widget) { var node = widget.domNode; if (node && node.parentNode) { node.parentNode.removeChild(node); // detach but don't destroy } } }, hasChildren: function hasChildren() { // summary: // Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. return this.getChildren().length > 0; // Boolean }, _getSiblingOfChild: function _getSiblingOfChild( /*dijit/_WidgetBase*/ child, /*int*/ dir) { // summary: // Get the next or previous widget sibling of child // dir: // if 1, get the next sibling // if -1, get the previous sibling // tags: // private var children = this.getChildren(), idx = array.indexOf(children, child); // int return children[idx + dir]; }, getIndexOfChild: function getIndexOfChild( /*dijit/_WidgetBase*/ child) { // summary: // Gets the index of the child in this container or -1 if not found return array.indexOf(this.getChildren(), child); // int } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_CssStateMixin.js": /*!**********************************************!*\ !*** ./node_modules/dijit/_CssStateMixin.js ***! \**********************************************/ /*! no static exports found */ /***/ function node_modulesDijit_CssStateMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.map __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // dom.isDescendant() __webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), // domClass.toggle __webpack_require__( /*! dojo/has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.hitch __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/domReady */ "./node_modules/dojo/domReady.js"), __webpack_require__( /*! dojo/touch */ "./node_modules/dojo/touch.js"), __webpack_require__( /*! dojo/_base/window */ "./node_modules/dojo/_base/window.js"), // win.body __webpack_require__( /*! ./a11yclick */ "./node_modules/dijit/a11yclick.js"), __webpack_require__( /*! ./registry */ "./node_modules/dijit/registry.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, dom, domClass, has, lang, on, domReady, touch, win, a11yclick, registry) { // module: // dijit/_CssStateMixin var CssStateMixin = declare("dijit._CssStateMixin", [], { // summary: // Mixin for widgets to set CSS classes on the widget DOM nodes depending on hover/mouse press/focus // state changes, and also higher-level state changes such becoming disabled or selected. // // description: // By mixing this class into your widget, and setting the this.baseClass attribute, it will automatically // maintain CSS classes on the widget root node (this.domNode) depending on hover, // active, focus, etc. state. Ex: with a baseClass of dijitButton, it will apply the classes // dijitButtonHovered and dijitButtonActive, as the user moves the mouse over the widget and clicks it. // // It also sets CSS like dijitButtonDisabled based on widget semantic state. // // By setting the cssStateNodes attribute, a widget can also track events on subnodes (like buttons // within the widget). /*===== // cssStateNodes: [protected] Object // Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that // need CSS classes applied on mouse hover/press and focus. // // Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name // (like "dijitUpArrowButton"). Example: // | { // | "upArrowButton": "dijitUpArrowButton", // | "downArrowButton": "dijitDownArrowButton" // | } // The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it // is hovered, etc. cssStateNodes: {}, =====*/ // hovering: [readonly] Boolean // True if cursor is over this widget hovering: false, // active: [readonly] Boolean // True if mouse was pressed while over this widget, and hasn't been released yet active: false, _applyAttributes: function _applyAttributes() { // This code would typically be in postCreate(), but putting in _applyAttributes() for // performance: so the class changes happen before DOM is inserted into the document. // Change back to postCreate() in 2.0. See #11635. this.inherited(arguments); // Monitoring changes to disabled, readonly, etc. state, and update CSS class of root node array.forEach(["disabled", "readOnly", "checked", "selected", "focused", "state", "hovering", "active", "_opened"], function (attr) { this.watch(attr, lang.hitch(this, "_setStateClass")); }, this); // Track hover and active mouse events on widget root node, plus possibly on subnodes for (var ap in this.cssStateNodes || {}) { this._trackMouseState(this[ap], this.cssStateNodes[ap]); } this._trackMouseState(this.domNode, this.baseClass); // Set state initially; there's probably no hover/active/focus state but widget might be // disabled/readonly/checked/selected so we want to set CSS classes for those conditions. this._setStateClass(); }, _cssMouseEvent: function _cssMouseEvent( /*Event*/ event) { // summary: // Handler for CSS event on this.domNode. Sets hovering and active properties depending on mouse state, // which triggers _setStateClass() to set appropriate CSS classes for this.domNode. if (!this.disabled) { switch (event.type) { case "mouseover": case "MSPointerOver": case "pointerover": this._set("hovering", true); this._set("active", this._mouseDown); break; case "mouseout": case "MSPointerOut": case "pointerout": this._set("hovering", false); this._set("active", false); break; case "mousedown": case "touchstart": case "MSPointerDown": case "pointerdown": case "keydown": this._set("active", true); break; case "mouseup": case "dojotouchend": case "MSPointerUp": case "pointerup": case "keyup": this._set("active", false); break; } } }, _setStateClass: function _setStateClass() { // summary: // Update the visual state of the widget by setting the css classes on this.domNode // (or this.stateNode if defined) by combining this.baseClass with // various suffixes that represent the current widget state(s). // // description: // In the case where a widget has multiple // states, it sets the class based on all possible // combinations. For example, an invalid form widget that is being hovered // will be "dijitInput dijitInputInvalid dijitInputHover dijitInputInvalidHover". // // The widget may have one or more of the following states, determined // by this.state, this.checked, this.valid, and this.selected: // // - Error - ValidationTextBox sets this.state to "Error" if the current input value is invalid // - Incomplete - ValidationTextBox sets this.state to "Incomplete" if the current input value is not finished yet // - Checked - ex: a checkmark or a ToggleButton in a checked state, will have this.checked==true // - Selected - ex: currently selected tab will have this.selected==true // // In addition, it may have one or more of the following states, // based on this.disabled and flags set in _onMouse (this.active, this.hovering) and from focus manager (this.focused): // // - Disabled - if the widget is disabled // - Active - if the mouse (or space/enter key?) is being pressed down // - Focused - if the widget has focus // - Hover - if the mouse is over the widget // Compute new set of classes var newStateClasses = this.baseClass.split(" "); function multiply(modifier) { newStateClasses = newStateClasses.concat(array.map(newStateClasses, function (c) { return c + modifier; }), "dijit" + modifier); } if (!this.isLeftToRight()) { // For RTL mode we need to set an addition class like dijitTextBoxRtl. multiply("Rtl"); } var checkedState = this.checked == "mixed" ? "Mixed" : this.checked ? "Checked" : ""; if (this.checked) { multiply(checkedState); } if (this.state) { multiply(this.state); } if (this.selected) { multiply("Selected"); } if (this._opened) { multiply("Opened"); } if (this.disabled) { multiply("Disabled"); } else if (this.readOnly) { multiply("ReadOnly"); } else { if (this.active) { multiply("Active"); } else if (this.hovering) { multiply("Hover"); } } if (this.focused) { multiply("Focused"); } // Remove old state classes and add new ones. // For performance concerns we only write into domNode.className once. var tn = this.stateNode || this.domNode, classHash = {}; // set of all classes (state and otherwise) for node array.forEach(tn.className.split(" "), function (c) { classHash[c] = true; }); if ("_stateClasses" in this) { array.forEach(this._stateClasses, function (c) { delete classHash[c]; }); } array.forEach(newStateClasses, function (c) { classHash[c] = true; }); var newClasses = []; for (var c in classHash) { newClasses.push(c); } tn.className = newClasses.join(" "); this._stateClasses = newStateClasses; }, _subnodeCssMouseEvent: function _subnodeCssMouseEvent(node, clazz, evt) { // summary: // Handler for hover/active mouse event on widget's subnode if (this.disabled || this.readOnly) { return; } function hover(isHovering) { domClass.toggle(node, clazz + "Hover", isHovering); } function active(isActive) { domClass.toggle(node, clazz + "Active", isActive); } function focused(isFocused) { domClass.toggle(node, clazz + "Focused", isFocused); } switch (evt.type) { case "mouseover": case "MSPointerOver": case "pointerover": hover(true); break; case "mouseout": case "MSPointerOut": case "pointerout": hover(false); active(false); break; case "mousedown": case "touchstart": case "MSPointerDown": case "pointerdown": case "keydown": active(true); break; case "mouseup": case "MSPointerUp": case "pointerup": case "dojotouchend": case "keyup": active(false); break; case "focus": case "focusin": focused(true); break; case "blur": case "focusout": focused(false); break; } }, _trackMouseState: function _trackMouseState( /*DomNode*/ node, /*String*/ clazz) { // summary: // Track mouse/focus events on specified node and set CSS class on that node to indicate // current state. Usually not called directly, but via cssStateNodes attribute. // description: // Given class=foo, will set the following CSS class on the node // // - fooActive: if the user is currently pressing down the mouse button while over the node // - fooHover: if the user is hovering the mouse over the node, but not pressing down a button // - fooFocus: if the node is focused // // Note that it won't set any classes if the widget is disabled. // node: DomNode // Should be a sub-node of the widget, not the top node (this.domNode), since the top node // is handled specially and automatically just by mixing in this class. // clazz: String // CSS class name (ex: dijitSliderUpArrow) // Flag for listener code below to call this._cssMouseEvent() or this._subnodeCssMouseEvent() // when node is hovered/active node._cssState = clazz; } }); domReady(function () { // Document level listener to catch hover etc. events on widget root nodes and subnodes. // Note that when the mouse is moved quickly, a single onmouseenter event could signal that multiple widgets // have been hovered or unhovered (try test_Accordion.html) function pointerHandler(evt, target, relatedTarget) { // Handler for mouseover, mouseout, a11yclick.press and a11click.release events // Poor man's event propagation. Don't propagate event to ancestors of evt.relatedTarget, // to avoid processing mouseout events moving from a widget's domNode to a descendant node; // such events shouldn't be interpreted as a mouseleave on the widget. if (relatedTarget && dom.isDescendant(relatedTarget, target)) { return; } for (var node = target; node && node != relatedTarget; node = node.parentNode) { // Process any nodes with _cssState property. They are generally widget root nodes, // but could also be sub-nodes within a widget if (node._cssState) { var widget = registry.getEnclosingWidget(node); if (widget) { if (node == widget.domNode) { // event on the widget's root node widget._cssMouseEvent(evt); } else { // event on widget's sub-node widget._subnodeCssMouseEvent(node, node._cssState, evt); } } } } } var body = win.body(), activeNode; // Handle pointer related events (i.e. mouse or touch) on(body, touch.over, function (evt) { // Using touch.over rather than mouseover mainly to ignore phantom mouse events on iOS. pointerHandler(evt, evt.target, evt.relatedTarget); }); on(body, touch.out, function (evt) { // Using touch.out rather than mouseout mainly to ignore phantom mouse events on iOS. pointerHandler(evt, evt.target, evt.relatedTarget); }); on(body, a11yclick.press, function (evt) { // Save the a11yclick.press target to reference when the a11yclick.release comes. activeNode = evt.target; pointerHandler(evt, activeNode); }); on(body, a11yclick.release, function (evt) { // The release event could come on a separate node than the press event, if for example user slid finger. // Reference activeNode to reset the state of the node that got state set in the a11yclick.press handler. pointerHandler(evt, activeNode); activeNode = null; }); // Track focus events on widget sub-nodes that have been registered via _trackMouseState(). // However, don't track focus events on the widget root nodes, because focus is tracked via the // focus manager (and it's not really tracking focus, but rather tracking that focus is on one of the widget's // nodes or a subwidget's node or a popup node, etc.) // Remove for 2.0 (if focus CSS needed, just use :focus pseudo-selector). on(body, "focusin, focusout", function (evt) { var node = evt.target; if (node._cssState && !node.getAttribute("widgetId")) { var widget = registry.getEnclosingWidget(node); if (widget) { widget._subnodeCssMouseEvent(node, node._cssState, evt); } } }); }); return CssStateMixin; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_DialogMixin.js": /*!********************************************!*\ !*** ./node_modules/dijit/_DialogMixin.js ***! \********************************************/ /*! no static exports found */ /***/ function node_modulesDijit_DialogMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! ./a11y */ "./node_modules/dijit/a11y.js") // _getTabNavigable ], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, a11y) { // module: // dijit/_DialogMixin return declare("dijit._DialogMixin", null, { // summary: // This provides functions useful to Dialog and TooltipDialog // actionBarTemplate: String // HTML snippet to show the action bar (gray bar with OK/cancel buttons). // Blank by default, but used by ConfirmDialog/ConfirmTooltipDialog subclasses. actionBarTemplate: "", execute: function execute() {// summary: // Callback when the user hits the submit button. // Override this method to handle Dialog execution. // description: // After the user has pressed the submit button, the Dialog // first calls onExecute() to notify the container to hide the // dialog and restore focus to wherever it used to be. // // *Then* this method is called. // type: // callback }, onCancel: function onCancel() {// summary: // Called when user has pressed the Dialog's cancel button, to notify container. // description: // Developer shouldn't override or connect to this method; // it's a private communication device between the TooltipDialog // and the thing that opened it (ex: `dijit/form/DropDownButton`) // type: // protected }, onExecute: function onExecute() {// summary: // Called when user has pressed the dialog's OK button, to notify container. // description: // Developer shouldn't override or connect to this method; // it's a private communication device between the TooltipDialog // and the thing that opened it (ex: `dijit/form/DropDownButton`) // type: // protected }, _onSubmit: function _onSubmit() { // summary: // Callback when user hits submit button // type: // protected this.onExecute(); // notify container that we are about to execute this.execute(this.get('value')); }, _getFocusItems: function _getFocusItems() { // summary: // Finds focusable items in dialog, // and sets this._firstFocusItem and this._lastFocusItem // tags: // protected var elems = a11y._getTabNavigable(this.domNode); this._firstFocusItem = elems.lowest || elems.first || this.closeButtonNode || this.domNode; this._lastFocusItem = elems.last || elems.highest || this._firstFocusItem; } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_FocusMixin.js": /*!*******************************************!*\ !*** ./node_modules/dijit/_FocusMixin.js ***! \*******************************************/ /*! no static exports found */ /***/ function node_modulesDijit_FocusMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./focus */ "./node_modules/dijit/focus.js"), __webpack_require__( /*! ./_WidgetBase */ "./node_modules/dijit/_WidgetBase.js"), __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js") // lang.extend ], __WEBPACK_AMD_DEFINE_RESULT__ = function (focus, _WidgetBase, declare, lang) { // module: // dijit/_FocusMixin // We don't know where _FocusMixin will occur in the inheritance chain, but we need the _onFocus()/_onBlur() below // to be last in the inheritance chain, so mixin to _WidgetBase. lang.extend(_WidgetBase, { // focused: [readonly] Boolean // This widget or a widget it contains has focus, or is "active" because // it was recently clicked. focused: false, onFocus: function onFocus() {// summary: // Called when the widget becomes "active" because // it or a widget inside of it either has focus, or has recently // been clicked. // tags: // callback }, onBlur: function onBlur() {// summary: // Called when the widget stops being "active" because // focus moved to something outside of it, or the user // clicked somewhere outside of it, or the widget was // hidden. // tags: // callback }, _onFocus: function _onFocus() { // summary: // This is where widgets do processing for when they are active, // such as changing CSS classes. See onFocus() for more details. // tags: // protected this.onFocus(); }, _onBlur: function _onBlur() { // summary: // This is where widgets do processing for when they stop being active, // such as changing CSS classes. See onBlur() for more details. // tags: // protected this.onBlur(); } }); return declare("dijit._FocusMixin", null, { // summary: // Mixin to widget to provide _onFocus() and _onBlur() methods that // fire when a widget or its descendants get/lose focus // flag that I want _onFocus()/_onBlur() notifications from focus manager _focusManager: focus }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_OnDijitClickMixin.js": /*!**************************************************!*\ !*** ./node_modules/dijit/_OnDijitClickMixin.js ***! \**************************************************/ /*! no static exports found */ /***/ function node_modulesDijit_OnDijitClickMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach __webpack_require__( /*! dojo/keys */ "./node_modules/dojo/keys.js"), // keys.ENTER keys.SPACE __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/has */ "./node_modules/dojo/has.js"), // has("dom-addeventlistener") __webpack_require__( /*! ./a11yclick */ "./node_modules/dijit/a11yclick.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (on, array, keys, declare, has, a11yclick) { // module: // dijit/_OnDijitClickMixin var ret = declare("dijit._OnDijitClickMixin", null, { // summary: // Deprecated. New code should access the dijit/a11yclick event directly, ex: // | this.own(on(node, a11yclick, function(){ ... })); // // Mixing in this class will make _WidgetBase.connect(node, "ondijitclick", ...) work. // It also used to be necessary to make templates with ondijitclick work, but now you can just require // dijit/a11yclick. connect: function connect(obj, event, method) { // override _WidgetBase.connect() to make this.connect(node, "ondijitclick", ...) work return this.inherited(arguments, [obj, event == "ondijitclick" ? a11yclick : event, method]); } }); ret.a11yclick = a11yclick; // back compat return ret; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_TemplatedMixin.js": /*!***********************************************!*\ !*** ./node_modules/dijit/_TemplatedMixin.js ***! \***********************************************/ /*! no static exports found */ /***/ function node_modulesDijit_TemplatedMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/cache */ "./node_modules/dojo/cache.js"), // dojo.cache __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom-construct */ "./node_modules/dojo/dom-construct.js"), // domConstruct.destroy, domConstruct.toDom __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.getObject __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie") __webpack_require__( /*! dojo/string */ "./node_modules/dojo/string.js"), // string.substitute string.trim __webpack_require__( /*! ./_AttachMixin */ "./node_modules/dijit/_AttachMixin.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (cache, declare, domConstruct, lang, on, has, string, _AttachMixin) { // module: // dijit/_TemplatedMixin var _TemplatedMixin = declare("dijit._TemplatedMixin", _AttachMixin, { // summary: // Mixin for widgets that are instantiated from a template // templateString: [protected] String // A string that represents the widget template. // Use in conjunction with dojo.cache() to load from a file. templateString: null, // templatePath: [protected deprecated] String // Path to template (HTML file) for this widget relative to dojo.baseUrl. // Deprecated: use templateString with require([... "dojo/text!..."], ...) instead templatePath: null, // skipNodeCache: [protected] Boolean // If using a cached widget template nodes poses issues for a // particular widget class, it can set this property to ensure // that its template is always re-built from a string _skipNodeCache: false, /*===== // _rendered: Boolean // Not normally use, but this flag can be set by the app if the server has already rendered the template, // i.e. already inlining the template for the widget into the main page. Reduces _TemplatedMixin to // just function like _AttachMixin. _rendered: false, =====*/ // Set _AttachMixin.searchContainerNode to true for back-compat for widgets that have data-dojo-attach-point's // and events inside this.containerNode. Remove for 2.0. searchContainerNode: true, _stringRepl: function _stringRepl(tmpl) { // summary: // Does substitution of ${foo} type properties in template string // tags: // private var className = this.declaredClass, _this = this; // Cache contains a string because we need to do property replacement // do the property replacement return string.substitute(tmpl, this, function (value, key) { if (key.charAt(0) == '!') { value = lang.getObject(key.substr(1), false, _this); } if (typeof value == "undefined") { throw new Error(className + " template:" + key); } // a debugging aide if (value == null) { return ""; } // Substitution keys beginning with ! will skip the transform step, // in case a user wishes to insert unescaped markup, e.g. ${!foo} return key.charAt(0) == "!" ? value : this._escapeValue("" + value); }, this); }, _escapeValue: function _escapeValue( /*String*/ val) { // summary: // Escape a value to be inserted into the template, either into an attribute value // (ex: foo="${bar}") or as inner text of an element (ex: <span>${foo}</span>) // Safer substitution, see heading "Attribute values" in // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2 // and also https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content return val.replace(/["'<>&]/g, function (val) { return { "&": "&", "<": "<", ">": ">", "\"": """, "'": "'" }[val]; }); }, buildRendering: function buildRendering() { // summary: // Construct the UI for this widget from a template, setting this.domNode. // tags: // protected if (!this._rendered) { if (!this.templateString) { this.templateString = cache(this.templatePath, { sanitize: true }); } // Lookup cached version of template, and download to cache if it // isn't there already. Returns either a DomNode or a string, depending on // whether or not the template contains ${foo} replacement parameters. var cached = _TemplatedMixin.getCachedTemplate(this.templateString, this._skipNodeCache, this.ownerDocument); var node; if (lang.isString(cached)) { node = domConstruct.toDom(this._stringRepl(cached), this.ownerDocument); if (node.nodeType != 1) { // Flag common problems such as templates with multiple top level nodes (nodeType == 11) throw new Error("Invalid template: " + cached); } } else { // if it's a node, all we have to do is clone it node = cached.cloneNode(true); } this.domNode = node; } // Call down to _WidgetBase.buildRendering() to get base classes assigned // TODO: change the baseClass assignment to _setBaseClassAttr this.inherited(arguments); if (!this._rendered) { this._fillContent(this.srcNodeRef); } this._rendered = true; }, _fillContent: function _fillContent( /*DomNode*/ source) { // summary: // Relocate source contents to templated container node. // this.containerNode must be able to receive children, or exceptions will be thrown. // tags: // protected var dest = this.containerNode; if (source && dest) { while (source.hasChildNodes()) { dest.appendChild(source.firstChild); } } } }); // key is templateString; object is either string or DOM tree _TemplatedMixin._templateCache = {}; _TemplatedMixin.getCachedTemplate = function (templateString, alwaysUseString, doc) { // summary: // Static method to get a template based on the templatePath or // templateString key // templateString: String // The template // alwaysUseString: Boolean // Don't cache the DOM tree for this template, even if it doesn't have any variables // doc: Document? // The target document. Defaults to document global if unspecified. // returns: Mixed // Either string (if there are ${} variables that need to be replaced) or just // a DOM tree (if the node can be cloned directly) // is it already cached? var tmplts = _TemplatedMixin._templateCache; var key = templateString; var cached = tmplts[key]; if (cached) { try { // if the cached value is an innerHTML string (no ownerDocument) or a DOM tree created within the // current document, then use the current cached value if (!cached.ownerDocument || cached.ownerDocument == (doc || document)) { // string or node of the same document return cached; } } catch (e) { /* squelch */ } // IE can throw an exception if cached.ownerDocument was reloaded domConstruct.destroy(cached); } templateString = string.trim(templateString); if (alwaysUseString || templateString.match(/\$\{([^\}]+)\}/g)) { // there are variables in the template so all we can do is cache the string return tmplts[key] = templateString; //String } else { // there are no variables in the template so we can cache the DOM tree var node = domConstruct.toDom(templateString, doc); if (node.nodeType != 1) { throw new Error("Invalid template: " + templateString); } return tmplts[key] = node; //Node } }; if (has("ie")) { on(window, "unload", function () { var cache = _TemplatedMixin._templateCache; for (var key in cache) { var value = cache[key]; if (typeof value == "object") { // value is either a string or a DOM node template domConstruct.destroy(value); } delete cache[key]; } }); } return _TemplatedMixin; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_Widget.js": /*!***************************************!*\ !*** ./node_modules/dijit/_Widget.js ***! \***************************************/ /*! no static exports found */ /***/ function node_modulesDijit_WidgetJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/aspect */ "./node_modules/dojo/aspect.js"), // aspect.around __webpack_require__( /*! dojo/_base/config */ "./node_modules/dojo/_base/config.js"), // config.isDebug __webpack_require__( /*! dojo/_base/connect */ "./node_modules/dojo/_base/connect.js"), // connect.connect __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.hitch __webpack_require__( /*! dojo/query */ "./node_modules/dojo/query.js"), __webpack_require__( /*! dojo/ready */ "./node_modules/dojo/ready.js"), __webpack_require__( /*! ./registry */ "./node_modules/dijit/registry.js"), // registry.byNode __webpack_require__( /*! ./_WidgetBase */ "./node_modules/dijit/_WidgetBase.js"), __webpack_require__( /*! ./_OnDijitClickMixin */ "./node_modules/dijit/_OnDijitClickMixin.js"), __webpack_require__( /*! ./_FocusMixin */ "./node_modules/dijit/_FocusMixin.js"), __webpack_require__( /*! dojo/uacss */ "./node_modules/dojo/uacss.js"), // browser sniffing (included for back-compat; subclasses may be using) __webpack_require__( /*! ./hccss */ "./node_modules/dijit/hccss.js") // high contrast mode sniffing (included to set CSS classes on <body>, module ret value unused) ], __WEBPACK_AMD_DEFINE_RESULT__ = function (aspect, config, connect, declare, has, kernel, lang, query, ready, registry, _WidgetBase, _OnDijitClickMixin, _FocusMixin) { // module: // dijit/_Widget function connectToDomNode() {// summary: // If user connects to a widget method === this function, then they will // instead actually be connecting the equivalent event on this.domNode } // Trap dojo.connect() calls to connectToDomNode methods, and redirect to _Widget.on() function aroundAdvice(originalConnect) { return function (obj, event, scope, method) { if (obj && typeof event == "string" && obj[event] == connectToDomNode) { return obj.on(event.substring(2).toLowerCase(), lang.hitch(scope, method)); } return originalConnect.apply(connect, arguments); }; } aspect.around(connect, "connect", aroundAdvice); if (kernel.connect) { aspect.around(kernel, "connect", aroundAdvice); } var _Widget = declare("dijit._Widget", [_WidgetBase, _OnDijitClickMixin, _FocusMixin], { // summary: // Old base class for widgets. New widgets should extend `dijit/_WidgetBase` instead // description: // Old Base class for Dijit widgets. // // Extends _WidgetBase, adding support for: // // - declaratively/programatically specifying widget initialization parameters like // onMouseMove="foo" that call foo when this.domNode gets a mousemove event // - ondijitclick: // Support new data-dojo-attach-event="ondijitclick: ..." that is triggered by a mouse click or a SPACE/ENTER keypress // - focus related functions: // In particular, the onFocus()/onBlur() callbacks. Driven internally by // dijit/_base/focus.js. // - deprecated methods // - onShow(), onHide(), onClose() // // Also, by loading code in dijit/_base, turns on: // // - browser sniffing (putting browser class like `dj_ie` on `<html>` node) // - high contrast mode sniffing (add `dijit_a11y` class to `<body>` if machine is in high contrast mode) ////////////////// DEFERRED CONNECTS /////////////////// onClick: connectToDomNode, /*===== onClick: function(event){ // summary: // Connect to this function to receive notifications of mouse click events. // event: // mouse Event // tags: // callback }, =====*/ onDblClick: connectToDomNode, /*===== onDblClick: function(event){ // summary: // Connect to this function to receive notifications of mouse double click events. // event: // mouse Event // tags: // callback }, =====*/ onKeyDown: connectToDomNode, /*===== onKeyDown: function(event){ // summary: // Connect to this function to receive notifications of keys being pressed down. // event: // key Event // tags: // callback }, =====*/ onKeyPress: connectToDomNode, /*===== onKeyPress: function(event){ // summary: // Connect to this function to receive notifications of printable keys being typed. // event: // key Event // tags: // callback }, =====*/ onKeyUp: connectToDomNode, /*===== onKeyUp: function(event){ // summary: // Connect to this function to receive notifications of keys being released. // event: // key Event // tags: // callback }, =====*/ onMouseDown: connectToDomNode, /*===== onMouseDown: function(event){ // summary: // Connect to this function to receive notifications of when the mouse button is pressed down. // event: // mouse Event // tags: // callback }, =====*/ onMouseMove: connectToDomNode, /*===== onMouseMove: function(event){ // summary: // Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. // event: // mouse Event // tags: // callback }, =====*/ onMouseOut: connectToDomNode, /*===== onMouseOut: function(event){ // summary: // Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. // event: // mouse Event // tags: // callback }, =====*/ onMouseOver: connectToDomNode, /*===== onMouseOver: function(event){ // summary: // Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. // event: // mouse Event // tags: // callback }, =====*/ onMouseLeave: connectToDomNode, /*===== onMouseLeave: function(event){ // summary: // Connect to this function to receive notifications of when the mouse moves off of this widget. // event: // mouse Event // tags: // callback }, =====*/ onMouseEnter: connectToDomNode, /*===== onMouseEnter: function(event){ // summary: // Connect to this function to receive notifications of when the mouse moves onto this widget. // event: // mouse Event // tags: // callback }, =====*/ onMouseUp: connectToDomNode, /*===== onMouseUp: function(event){ // summary: // Connect to this function to receive notifications of when the mouse button is released. // event: // mouse Event // tags: // callback }, =====*/ constructor: function constructor(params /*===== ,srcNodeRef =====*/ ) { // summary: // Create the widget. // params: Object|null // Hash of initialization parameters for widget, including scalar values (like title, duration etc.) // and functions, typically callbacks like onClick. // The hash can contain any of the widget's properties, excluding read-only properties. // srcNodeRef: DOMNode|String? // If a srcNodeRef (DOM node) is specified: // // - use srcNodeRef.innerHTML as my contents // - if this is a behavioral widget then apply behavior to that srcNodeRef // - otherwise, replace srcNodeRef with my generated DOM tree // extract parameters like onMouseMove that should connect directly to this.domNode this._toConnect = {}; for (var name in params) { if (this[name] === connectToDomNode) { this._toConnect[name.replace(/^on/, "").toLowerCase()] = params[name]; delete params[name]; } } }, postCreate: function postCreate() { this.inherited(arguments); // perform connection from this.domNode to user specified handlers (ex: onMouseMove) for (var name in this._toConnect) { this.on(name, this._toConnect[name]); } delete this._toConnect; }, on: function on( /*String|Function*/ type, /*Function*/ func) { if (this[this._onMap(type)] === connectToDomNode) { // Use connect.connect() rather than on() to get handling for "onmouseenter" on non-IE, // normalization of onkeypress/onkeydown to behave like firefox, etc. // Also, need to specify context as "this" rather than the default context of the DOMNode // Remove in 2.0. return connect.connect(this.domNode, type.toLowerCase(), this, func); } return this.inherited(arguments); }, _setFocusedAttr: function _setFocusedAttr(val) { // Remove this method in 2.0 (or sooner), just here to set _focused == focused, for back compat // (but since it's a private variable we aren't required to keep supporting it). this._focused = val; this._set("focused", val); }, ////////////////// DEPRECATED METHODS /////////////////// setAttribute: function setAttribute( /*String*/ attr, /*anything*/ value) { // summary: // Deprecated. Use set() instead. // tags: // deprecated kernel.deprecated(this.declaredClass + "::setAttribute(attr, value) is deprecated. Use set() instead.", "", "2.0"); this.set(attr, value); }, attr: function attr( /*String|Object*/ name, /*Object?*/ value) { // summary: // This method is deprecated, use get() or set() directly. // name: // The property to get or set. If an object is passed here and not // a string, its keys are used as names of attributes to be set // and the value of the object as values to set in the widget. // value: // Optional. If provided, attr() operates as a setter. If omitted, // the current value of the named property is returned. // tags: // deprecated var args = arguments.length; if (args >= 2 || typeof name === "object") { // setter return this.set.apply(this, arguments); } else { // getter return this.get(name); } }, getDescendants: function getDescendants() { // summary: // Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. // This method should generally be avoided as it returns widgets declared in templates, which are // supposed to be internal/hidden, but it's left here for back-compat reasons. kernel.deprecated(this.declaredClass + "::getDescendants() is deprecated. Use getChildren() instead.", "", "2.0"); return this.containerNode ? query('[widgetId]', this.containerNode).map(registry.byNode) : []; // dijit/_WidgetBase[] }, ////////////////// MISCELLANEOUS METHODS /////////////////// _onShow: function _onShow() { // summary: // Internal method called when this widget is made visible. // See `onShow` for details. this.onShow(); }, onShow: function onShow() {// summary: // Called when this widget becomes the selected pane in a // `dijit/layout/TabContainer`, `dijit/layout/StackContainer`, // `dijit/layout/AccordionContainer`, etc. // // Also called to indicate display of a `dijit.Dialog`, `dijit.TooltipDialog`, or `dijit.TitlePane`. // tags: // callback }, onHide: function onHide() {// summary: // Called when another widget becomes the selected pane in a // `dijit/layout/TabContainer`, `dijit/layout/StackContainer`, // `dijit/layout/AccordionContainer`, etc. // // Also called to indicate hide of a `dijit.Dialog`, `dijit.TooltipDialog`, or `dijit.TitlePane`. // tags: // callback }, onClose: function onClose() { // summary: // Called when this widget is being displayed as a popup (ex: a Calendar popped // up from a DateTextBox), and it is hidden. // This is called from the dijit.popup code, and should not be called directly. // // Also used as a parameter for children of `dijit/layout/StackContainer` or subclasses. // Callback if a user tries to close the child. Child will be closed if this function returns true. // tags: // extension return true; // Boolean } }); // For back-compat, remove in 2.0. if (has("dijit-legacy-requires")) { ready(0, function () { var requires = ["dijit/_base"]; require(requires); // use indirection so modules not rolled into a build }); } return _Widget; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_WidgetBase.js": /*!*******************************************!*\ !*** ./node_modules/dijit/_WidgetBase.js ***! \*******************************************/ /*! no static exports found */ /***/ function node_modulesDijit_WidgetBaseJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), // require.toUrl __webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.map __webpack_require__( /*! dojo/aspect */ "./node_modules/dojo/aspect.js"), __webpack_require__( /*! dojo/_base/config */ "./node_modules/dojo/_base/config.js"), // config.blankGif __webpack_require__( /*! dojo/_base/connect */ "./node_modules/dojo/_base/connect.js"), // connect.connect __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // dom.byId __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), // domAttr.set domAttr.remove __webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), // domClass.add domClass.replace __webpack_require__( /*! dojo/dom-construct */ "./node_modules/dojo/dom-construct.js"), // domConstruct.destroy domConstruct.place __webpack_require__( /*! dojo/dom-geometry */ "./node_modules/dojo/dom-geometry.js"), // isBodyLtr __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.set, domStyle.get __webpack_require__( /*! dojo/has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // mixin(), isArray(), etc. __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/ready */ "./node_modules/dojo/ready.js"), __webpack_require__( /*! dojo/Stateful */ "./node_modules/dojo/Stateful.js"), // Stateful __webpack_require__( /*! dojo/topic */ "./node_modules/dojo/topic.js"), __webpack_require__( /*! dojo/_base/window */ "./node_modules/dojo/_base/window.js"), // win.body() __webpack_require__( /*! ./Destroyable */ "./node_modules/dijit/Destroyable.js"), __webpack_require__.dj.h("dojo-bidi?./node_modules/dijit/_BidiMixin.js"), __webpack_require__( /*! ./registry */ "./node_modules/dijit/registry.js") // registry.getUniqueId(), registry.findWidgets() ], __WEBPACK_AMD_DEFINE_RESULT__ = function (require, array, aspect, config, _connect, declare, dom, domAttr, domClass, domConstruct, domGeometry, domStyle, has, kernel, lang, _on, ready, Stateful, topic, win, Destroyable, _BidiMixin, registry) { // module: // dijit/_WidgetBase // Flag to make dijit load modules the app didn't explicitly request, for backwards compatibility has.add("dijit-legacy-requires", !kernel.isAsync); // Flag to enable support for textdir attribute has.add("dojo-bidi", false); // For back-compat, remove in 2.0. if (has("dijit-legacy-requires")) { ready(0, function () { var requires = ["dijit/_base/manager"]; require(requires); // use indirection so modules not rolled into a build }); } // Nested hash listing attributes for each tag, all strings in lowercase. // ex: {"div": {"style": true, "tabindex" true}, "form": { ... var tagAttrs = {}; function getAttrs(obj) { var ret = {}; for (var attr in obj) { ret[attr.toLowerCase()] = true; } return ret; } function nonEmptyAttrToDom(attr) { // summary: // Returns a setter function that copies the attribute to this.domNode, // or removes the attribute from this.domNode, depending on whether the // value is defined or not. return function (val) { domAttr[val ? "set" : "remove"](this.domNode, attr, val); this._set(attr, val); }; } function isEqual(a, b) { // summary: // Function that determines whether two values are identical, // taking into account that NaN is not normally equal to itself // in JS. return a === b || /* a is NaN */ a !== a && /* b is NaN */ b !== b; } var _WidgetBase = declare("dijit._WidgetBase", [Stateful, Destroyable], { // summary: // Future base class for all Dijit widgets. // description: // Future base class for all Dijit widgets. // _Widget extends this class adding support for various features needed by desktop. // // Provides stubs for widget lifecycle methods for subclasses to extend, like postMixInProperties(), buildRendering(), // postCreate(), startup(), and destroy(), and also public API methods like set(), get(), and watch(). // // Widgets can provide custom setters/getters for widget attributes, which are called automatically by set(name, value). // For an attribute XXX, define methods _setXXXAttr() and/or _getXXXAttr(). // // _setXXXAttr can also be a string/hash/array mapping from a widget attribute XXX to the widget's DOMNodes: // // - DOM node attribute // | _setFocusAttr: {node: "focusNode", type: "attribute"} // | _setFocusAttr: "focusNode" (shorthand) // | _setFocusAttr: "" (shorthand, maps to this.domNode) // Maps this.focus to this.focusNode.focus, or (last example) this.domNode.focus // // - DOM node innerHTML // | _setTitleAttr: { node: "titleNode", type: "innerHTML" } // Maps this.title to this.titleNode.innerHTML // // - DOM node innerText // | _setTitleAttr: { node: "titleNode", type: "innerText" } // Maps this.title to this.titleNode.innerText // // - DOM node CSS class // | _setMyClassAttr: { node: "domNode", type: "class" } // Maps this.myClass to this.domNode.className // // - Toggle DOM node CSS class // | _setMyClassAttr: { node: "domNode", type: "toggleClass" } // Toggles myClass on this.domNode by this.myClass // // If the value of _setXXXAttr is an array, then each element in the array matches one of the // formats of the above list. // // If the custom setter is null, no action is performed other than saving the new value // in the widget (in this). // // If no custom setter is defined for an attribute, then it will be copied // to this.focusNode (if the widget defines a focusNode), or this.domNode otherwise. // That's only done though for attributes that match DOMNode attributes (title, // alt, aria-labelledby, etc.) // id: [const] String // A unique, opaque ID string that can be assigned by users or by the // system. If the developer passes an ID which is known not to be // unique, the specified ID is ignored and the system-generated ID is // used instead. id: "", _setIdAttr: "domNode", // to copy to this.domNode even for auto-generated id's // lang: [const] String // Rarely used. Overrides the default Dojo locale used to render this widget, // as defined by the [HTML LANG](http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang) attribute. // Value must be among the list of locales specified during by the Dojo bootstrap, // formatted according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt) (like en-us). lang: "", // set on domNode even when there's a focus node. but don't set lang="", since that's invalid. _setLangAttr: nonEmptyAttrToDom("lang"), // dir: [const] String // Bi-directional support, as defined by the [HTML DIR](http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir) // attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's // default direction. dir: "", // set on domNode even when there's a focus node. but don't set dir="", since that's invalid. _setDirAttr: nonEmptyAttrToDom("dir"), // to set on domNode even when there's a focus node // class: String // HTML class attribute "class": "", _setClassAttr: { node: "domNode", type: "class" }, // Override automatic assigning type --> focusNode, it causes exception on IE6-8. // Instead, type must be specified as ${type} in the template, as part of the original DOM. _setTypeAttr: null, // style: String||Object // HTML style attributes as cssText string or name/value hash style: "", // title: String // HTML title attribute. // // For form widgets this specifies a tooltip to display when hovering over // the widget (just like the native HTML title attribute). // // For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, // etc., it's used to specify the tab label, accordion pane title, etc. In this case it's // interpreted as HTML. title: "", // tooltip: String // When this widget's title attribute is used to for a tab label, accordion pane title, etc., // this specifies the tooltip to appear when the mouse is hovered over that text. tooltip: "", // baseClass: [protected] String // Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate // widget state. baseClass: "", // srcNodeRef: [readonly] DomNode // pointer to original DOM node srcNodeRef: null, // domNode: [readonly] DomNode // This is our visible representation of the widget! Other DOM // Nodes may by assigned to other properties, usually through the // template system's data-dojo-attach-point syntax, but the domNode // property is the canonical "top level" node in widget UI. domNode: null, // containerNode: [readonly] DomNode // Designates where children of the source DOM node will be placed. // "Children" in this case refers to both DOM nodes and widgets. // For example, for myWidget: // // | <div data-dojo-type=myWidget> // | <b> here's a plain DOM node // | <span data-dojo-type=subWidget>and a widget</span> // | <i> and another plain DOM node </i> // | </div> // // containerNode would point to: // // | <b> here's a plain DOM node // | <span data-dojo-type=subWidget>and a widget</span> // | <i> and another plain DOM node </i> // // In templated widgets, "containerNode" is set via a // data-dojo-attach-point assignment. // // containerNode must be defined for any widget that accepts innerHTML // (like ContentPane or BorderContainer or even Button), and conversely // is null for widgets that don't, like TextBox. containerNode: null, // ownerDocument: [const] Document? // The document this widget belongs to. If not specified to constructor, will default to // srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global ownerDocument: null, _setOwnerDocumentAttr: function _setOwnerDocumentAttr(val) { // this setter is merely to avoid automatically trying to set this.domNode.ownerDocument this._set("ownerDocument", val); }, /*===== // _started: [readonly] Boolean // startup() has completed. _started: false, =====*/ // attributeMap: [protected] Object // Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute // for each XXX attribute to be mapped to the DOM. // // attributeMap sets up a "binding" between attributes (aka properties) // of the widget and the widget's DOM. // Changes to widget attributes listed in attributeMap will be // reflected into the DOM. // // For example, calling set('title', 'hello') // on a TitlePane will automatically cause the TitlePane's DOM to update // with the new title. // // attributeMap is a hash where the key is an attribute of the widget, // and the value reflects a binding to a: // // - DOM node attribute // | focus: {node: "focusNode", type: "attribute"} // Maps this.focus to this.focusNode.focus // // - DOM node innerHTML // | title: { node: "titleNode", type: "innerHTML" } // Maps this.title to this.titleNode.innerHTML // // - DOM node innerText // | title: { node: "titleNode", type: "innerText" } // Maps this.title to this.titleNode.innerText // // - DOM node CSS class // | myClass: { node: "domNode", type: "class" } // Maps this.myClass to this.domNode.className // // If the value is an array, then each element in the array matches one of the // formats of the above list. // // There are also some shorthands for backwards compatibility: // // - string --> { node: string, type: "attribute" }, for example: // // | "focusNode" ---> { node: "focusNode", type: "attribute" } // // - "" --> { node: "domNode", type: "attribute" } attributeMap: {}, // _blankGif: [protected] String // Path to a blank 1x1 image. // Used by `<img>` nodes in templates that really get their image via CSS background-image. _blankGif: config.blankGif || require.toUrl("dojo/resources/blank.gif"), // textDir: String // Bi-directional support, the main variable which is responsible for the direction of the text. // The text direction can be different than the GUI direction by using this parameter in creation // of a widget. // // This property is only effective when `has("dojo-bidi")` is defined to be true. // // Allowed values: // // 1. "" - default value; text is same direction as widget // 2. "ltr" // 3. "rtl" // 4. "auto" - contextual the direction of a text defined by first strong letter. textDir: "", //////////// INITIALIZATION METHODS /////////////////////////////////////// /*===== constructor: function(params, srcNodeRef){ // summary: // Create the widget. // params: Object|null // Hash of initialization parameters for widget, including scalar values (like title, duration etc.) // and functions, typically callbacks like onClick. // The hash can contain any of the widget's properties, excluding read-only properties. // srcNodeRef: DOMNode|String? // If a srcNodeRef (DOM node) is specified: // // - use srcNodeRef.innerHTML as my contents // - if this is a behavioral widget then apply behavior to that srcNodeRef // - otherwise, replace srcNodeRef with my generated DOM tree }, =====*/ _introspect: function _introspect() { // summary: // Collect metadata about this widget (only once per class, not once per instance): // // - list of attributes with custom setters, storing in this.constructor._setterAttrs // - generate this.constructor._onMap, mapping names like "mousedown" to functions like onMouseDown var ctor = this.constructor; if (!ctor._setterAttrs) { var proto = ctor.prototype, attrs = ctor._setterAttrs = [], // attributes with custom setters onMap = ctor._onMap = {}; // Items in this.attributeMap are like custom setters. For back-compat, remove for 2.0. for (var name in proto.attributeMap) { attrs.push(name); } // Loop over widget properties, collecting properties with custom setters and filling in ctor._onMap. for (name in proto) { if (/^on/.test(name)) { onMap[name.substring(2).toLowerCase()] = name; } if (/^_set[A-Z](.*)Attr$/.test(name)) { name = name.charAt(4).toLowerCase() + name.substr(5, name.length - 9); if (!proto.attributeMap || !(name in proto.attributeMap)) { attrs.push(name); } } } // Note: this isn't picking up info on properties like aria-label and role, that don't have custom setters // but that set() maps to attributes on this.domNode or this.focusNode } }, postscript: function postscript( /*Object?*/ params, /*DomNode|String*/ srcNodeRef) { // summary: // Kicks off widget instantiation. See create() for details. // tags: // private // Note that we skip calling this.inherited(), i.e. dojo/Stateful::postscript(), because 1.x widgets don't // expect their custom setters to get called until after buildRendering(). Consider changing for 2.0. this.create(params, srcNodeRef); }, create: function create(params, srcNodeRef) { // summary: // Kick off the life-cycle of a widget // description: // Create calls a number of widget methods (postMixInProperties, buildRendering, postCreate, // etc.), some of which of you'll want to override. See http://dojotoolkit.org/reference-guide/dijit/_WidgetBase.html // for a discussion of the widget creation lifecycle. // // Of course, adventurous developers could override create entirely, but this should // only be done as a last resort. // params: Object|null // Hash of initialization parameters for widget, including scalar values (like title, duration etc.) // and functions, typically callbacks like onClick. // The hash can contain any of the widget's properties, excluding read-only properties. // srcNodeRef: DOMNode|String? // If a srcNodeRef (DOM node) is specified: // // - use srcNodeRef.innerHTML as my contents // - if this is a behavioral widget then apply behavior to that srcNodeRef // - otherwise, replace srcNodeRef with my generated DOM tree // tags: // private // First time widget is instantiated, scan prototype to figure out info about custom setters etc. this._introspect(); // store pointer to original DOM tree this.srcNodeRef = dom.byId(srcNodeRef); // No longer used, remove for 2.0. this._connects = []; this._supportingWidgets = []; // this is here for back-compat, remove in 2.0 (but check NodeList-instantiate.html test) if (this.srcNodeRef && this.srcNodeRef.id && typeof this.srcNodeRef.id == "string") { this.id = this.srcNodeRef.id; } // mix in our passed parameters if (params) { this.params = params; lang.mixin(this, params); } this.postMixInProperties(); // Generate an id for the widget if one wasn't specified, or it was specified as id: undefined. // Do this before buildRendering() because it might expect the id to be there. if (!this.id) { this.id = registry.getUniqueId(this.declaredClass.replace(/\./g, "_")); if (this.params) { // if params contains {id: undefined}, prevent _applyAttributes() from processing it delete this.params.id; } } // The document and <body> node this widget is associated with this.ownerDocument = this.ownerDocument || (this.srcNodeRef ? this.srcNodeRef.ownerDocument : document); this.ownerDocumentBody = win.body(this.ownerDocument); registry.add(this); this.buildRendering(); var deleteSrcNodeRef; if (this.domNode) { // Copy attributes listed in attributeMap into the [newly created] DOM for the widget. // Also calls custom setters for all attributes with custom setters. this._applyAttributes(); // If srcNodeRef was specified, then swap out original srcNode for this widget's DOM tree. // For 2.0, move this after postCreate(). postCreate() shouldn't depend on the // widget being attached to the DOM since it isn't when a widget is created programmatically like // new MyWidget({}). See #11635. var source = this.srcNodeRef; if (source && source.parentNode && this.domNode !== source) { source.parentNode.replaceChild(this.domNode, source); deleteSrcNodeRef = true; } // Note: for 2.0 may want to rename widgetId to dojo._scopeName + "_widgetId", // assuming that dojo._scopeName even exists in 2.0 this.domNode.setAttribute("widgetId", this.id); } this.postCreate(); // If srcNodeRef has been processed and removed from the DOM (e.g. TemplatedWidget) then delete it to allow GC. // I think for back-compatibility it isn't deleting srcNodeRef until after postCreate() has run. if (deleteSrcNodeRef) { delete this.srcNodeRef; } this._created = true; }, _applyAttributes: function _applyAttributes() { // summary: // Step during widget creation to copy widget attributes to the // DOM according to attributeMap and _setXXXAttr objects, and also to call // custom _setXXXAttr() methods. // // Skips over blank/false attribute values, unless they were explicitly specified // as parameters to the widget, since those are the default anyway, // and setting tabIndex="" is different than not setting tabIndex at all. // // For backwards-compatibility reasons attributeMap overrides _setXXXAttr when // _setXXXAttr is a hash/string/array, but _setXXXAttr as a functions override attributeMap. // tags: // private // Call this.set() for each property that was either specified as parameter to constructor, // or is in the list found above. For correlated properties like value and displayedValue, the one // specified as a parameter should take precedence. // Particularly important for new DateTextBox({displayedValue: ...}) since DateTextBox's default value is // NaN and thus is not ignored like a default value of "". // Step 1: Save the current values of the widget properties that were specified as parameters to the constructor. // Generally this.foo == this.params.foo, except if postMixInProperties() changed the value of this.foo. var params = {}; for (var key in this.params || {}) { params[key] = this._get(key); } // Step 2: Call set() for each property with a non-falsy value that wasn't passed as a parameter to the constructor array.forEach(this.constructor._setterAttrs, function (key) { if (!(key in params)) { var val = this._get(key); if (val) { this.set(key, val); } } }, this); // Step 3: Call set() for each property that was specified as parameter to constructor. // Use params hash created above to ignore side effects from step #2 above. for (key in params) { this.set(key, params[key]); } }, postMixInProperties: function postMixInProperties() {// summary: // Called after the parameters to the widget have been read-in, // but before the widget template is instantiated. Especially // useful to set properties that are referenced in the widget // template. // tags: // protected }, buildRendering: function buildRendering() { // summary: // Construct the UI for this widget, setting this.domNode. // Most widgets will mixin `dijit._TemplatedMixin`, which implements this method. // tags: // protected if (!this.domNode) { // Create root node if it wasn't created by _TemplatedMixin this.domNode = this.srcNodeRef || this.ownerDocument.createElement("div"); } // baseClass is a single class name or occasionally a space-separated list of names. // Add those classes to the DOMNode. If RTL mode then also add with Rtl suffix. // TODO: make baseClass custom setter if (this.baseClass) { var classes = this.baseClass.split(" "); if (!this.isLeftToRight()) { classes = classes.concat(array.map(classes, function (name) { return name + "Rtl"; })); } domClass.add(this.domNode, classes); } }, postCreate: function postCreate() {// summary: // Processing after the DOM fragment is created // description: // Called after the DOM fragment has been created, but not necessarily // added to the document. Do not include any operations which rely on // node dimensions or placement. // tags: // protected }, startup: function startup() { // summary: // Processing after the DOM fragment is added to the document // description: // Called after a widget and its children have been created and added to the page, // and all related widgets have finished their create() cycle, up through postCreate(). // // Note that startup() may be called while the widget is still hidden, for example if the widget is // inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. // For widgets that need to do layout, it's best to put that layout code inside resize(), and then // extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. if (this._started) { return; } this._started = true; array.forEach(this.getChildren(), function (obj) { if (!obj._started && !obj._destroyed && lang.isFunction(obj.startup)) { obj.startup(); obj._started = true; } }); }, //////////// DESTROY FUNCTIONS //////////////////////////////// destroyRecursive: function destroyRecursive( /*Boolean?*/ preserveDom) { // summary: // Destroy this widget and its descendants // description: // This is the generic "destructor" function that all widget users // should call to cleanly discard with a widget. Once a widget is // destroyed, it is removed from the manager object. // preserveDom: // If true, this method will leave the original DOM structure // alone of descendant Widgets. Note: This will NOT work with // dijit._TemplatedMixin widgets. this._beingDestroyed = true; this.destroyDescendants(preserveDom); this.destroy(preserveDom); }, destroy: function destroy( /*Boolean*/ preserveDom) { // summary: // Destroy this widget, but not its descendants. Descendants means widgets inside of // this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). // // This method will also destroy internal widgets such as those created from a template, // assuming those widgets exist inside of this.domNode but outside of this.containerNode. // // For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not // depend on the current ability to destroy a widget without destroying its descendants. Generally // they should use destroyRecursive() for widgets with children. // preserveDom: Boolean // If true, this method will leave the original DOM structure alone. // Note: This will not yet work with _TemplatedMixin widgets this._beingDestroyed = true; this.uninitialize(); function destroy(w) { if (w.destroyRecursive) { w.destroyRecursive(preserveDom); } else if (w.destroy) { w.destroy(preserveDom); } } // Back-compat, remove for 2.0 array.forEach(this._connects, lang.hitch(this, "disconnect")); array.forEach(this._supportingWidgets, destroy); // Destroy supporting widgets, but not child widgets under this.containerNode (for 2.0, destroy child widgets // here too). if() statement is to guard against exception if destroy() called multiple times (see #15815). if (this.domNode) { array.forEach(registry.findWidgets(this.domNode, this.containerNode), destroy); } this.destroyRendering(preserveDom); registry.remove(this.id); this._destroyed = true; }, destroyRendering: function destroyRendering( /*Boolean?*/ preserveDom) { // summary: // Destroys the DOM nodes associated with this widget. // preserveDom: // If true, this method will leave the original DOM structure alone // during tear-down. Note: this will not work with _Templated // widgets yet. // tags: // protected if (this.bgIframe) { this.bgIframe.destroy(preserveDom); delete this.bgIframe; } if (this.domNode) { if (preserveDom) { domAttr.remove(this.domNode, "widgetId"); } else { domConstruct.destroy(this.domNode); } delete this.domNode; } if (this.srcNodeRef) { if (!preserveDom) { domConstruct.destroy(this.srcNodeRef); } delete this.srcNodeRef; } }, destroyDescendants: function destroyDescendants( /*Boolean?*/ preserveDom) { // summary: // Recursively destroy the children of this widget and their // descendants. // preserveDom: // If true, the preserveDom attribute is passed to all descendant // widget's .destroy() method. Not for use with _Templated // widgets. // get all direct descendants and destroy them recursively array.forEach(this.getChildren(), function (widget) { if (widget.destroyRecursive) { widget.destroyRecursive(preserveDom); } }); }, uninitialize: function uninitialize() { // summary: // Deprecated. Override destroy() instead to implement custom widget tear-down // behavior. // tags: // protected return false; }, ////////////////// GET/SET, CUSTOM SETTERS, ETC. /////////////////// _setStyleAttr: function _setStyleAttr( /*String||Object*/ value) { // summary: // Sets the style attribute of the widget according to value, // which is either a hash like {height: "5px", width: "3px"} // or a plain string // description: // Determines which node to set the style on based on style setting // in attributeMap. // tags: // protected var mapNode = this.domNode; // Note: technically we should revert any style setting made in a previous call // to his method, but that's difficult to keep track of. if (lang.isObject(value)) { domStyle.set(mapNode, value); } else { if (mapNode.style.cssText) { mapNode.style.cssText += "; " + value; } else { mapNode.style.cssText = value; } } this._set("style", value); }, _attrToDom: function _attrToDom( /*String*/ attr, /*String*/ value, /*Object?*/ commands) { // summary: // Reflect a widget attribute (title, tabIndex, duration etc.) to // the widget DOM, as specified by commands parameter. // If commands isn't specified then it's looked up from attributeMap. // Note some attributes like "type" // cannot be processed this way as they are not mutable. // attr: // Name of member variable (ex: "focusNode" maps to this.focusNode) pointing // to DOMNode inside the widget, or alternately pointing to a subwidget // tags: // private commands = arguments.length >= 3 ? commands : this.attributeMap[attr]; array.forEach(lang.isArray(commands) ? commands : [commands], function (command) { // Get target node and what we are doing to that node var mapNode = this[command.node || command || "domNode"]; // DOM node var type = command.type || "attribute"; // class, innerHTML, innerText, or attribute switch (type) { case "attribute": if (lang.isFunction(value)) { // functions execute in the context of the widget value = lang.hitch(this, value); } // Get the name of the DOM node attribute; usually it's the same // as the name of the attribute in the widget (attr), but can be overridden. // Also maps handler names to lowercase, like onSubmit --> onsubmit var attrName = command.attribute ? command.attribute : /^on[A-Z][a-zA-Z]*$/.test(attr) ? attr.toLowerCase() : attr; if (mapNode.tagName) { // Normal case, mapping to a DOMNode. Note that modern browsers will have a mapNode.set() // method, but for consistency we still call domAttr domAttr.set(mapNode, attrName, value); } else { // mapping to a sub-widget mapNode.set(attrName, value); } break; case "innerText": // Deprecated, use "textContent" instead. mapNode.innerHTML = ""; mapNode.appendChild(this.ownerDocument.createTextNode(value)); break; case "textContent": mapNode.textContent = value; break; case "innerHTML": mapNode.innerHTML = value; break; case "class": domClass.replace(mapNode, value, this[attr]); break; case "toggleClass": domClass.toggle(mapNode, command.className || attr, value); break; } }, this); }, get: function get(name) { // summary: // Get a property from a widget. // name: // The property to get. // description: // Get a named property from a widget. The property may // potentially be retrieved via a getter method. If no getter is defined, this // just retrieves the object's property. // // For example, if the widget has properties `foo` and `bar` // and a method named `_getFooAttr()`, calling: // `myWidget.get("foo")` would be equivalent to calling // `widget._getFooAttr()` and `myWidget.get("bar")` // would be equivalent to the expression // `widget.bar2` var names = this._getAttrNames(name); return this[names.g] ? this[names.g]() : this._get(name); }, set: function set(name, value) { // summary: // Set a property on a widget // name: // The property to set. // value: // The value to set in the property. // description: // Sets named properties on a widget which may potentially be handled by a // setter in the widget. // // For example, if the widget has properties `foo` and `bar` // and a method named `_setFooAttr()`, calling // `myWidget.set("foo", "Howdy!")` would be equivalent to calling // `widget._setFooAttr("Howdy!")` and `myWidget.set("bar", 3)` // would be equivalent to the statement `widget.bar = 3;` // // set() may also be called with a hash of name/value pairs, ex: // // | myWidget.set({ // | foo: "Howdy", // | bar: 3 // | }); // // This is equivalent to calling `set(foo, "Howdy")` and `set(bar, 3)` if (typeof name === "object") { for (var x in name) { this.set(x, name[x]); } return this; } var names = this._getAttrNames(name), setter = this[names.s]; if (lang.isFunction(setter)) { // use the explicit setter var result = setter.apply(this, Array.prototype.slice.call(arguments, 1)); } else { // Mapping from widget attribute to DOMNode/subwidget attribute/value/etc. // Map according to: // 1. attributeMap setting, if one exists (TODO: attributeMap deprecated, remove in 2.0) // 2. _setFooAttr: {...} type attribute in the widget (if one exists) // 3. apply to focusNode or domNode if standard attribute name, excluding funcs like onClick. // Checks if an attribute is a "standard attribute" by whether the DOMNode JS object has a similar // attribute name (ex: accept-charset attribute matches jsObject.acceptCharset). // Note also that Tree.focusNode() is a function not a DOMNode, so test for that. var defaultNode = this.focusNode && !lang.isFunction(this.focusNode) ? "focusNode" : "domNode", tag = this[defaultNode] && this[defaultNode].tagName, attrsForTag = tag && (tagAttrs[tag] || (tagAttrs[tag] = getAttrs(this[defaultNode]))), map = name in this.attributeMap ? this.attributeMap[name] : names.s in this ? this[names.s] : attrsForTag && names.l in attrsForTag && typeof value != "function" || /^aria-|^data-|^role$/.test(name) ? defaultNode : null; if (map != null) { this._attrToDom(name, value, map); } this._set(name, value); } return result || this; }, _attrPairNames: {}, // shared between all widgets _getAttrNames: function _getAttrNames(name) { // summary: // Helper function for get() and set(). // Caches attribute name values so we don't do the string ops every time. // tags: // private var apn = this._attrPairNames; if (apn[name]) { return apn[name]; } var uc = name.replace(/^[a-z]|-[a-zA-Z]/g, function (c) { return c.charAt(c.length - 1).toUpperCase(); }); return apn[name] = { n: name + "Node", s: "_set" + uc + "Attr", // converts dashes to camel case, ex: accept-charset --> _setAcceptCharsetAttr g: "_get" + uc + "Attr", l: uc.toLowerCase() // lowercase name w/out dashes, ex: acceptcharset }; }, _set: function _set( /*String*/ name, /*anything*/ value) { // summary: // Helper function to set new value for specified property, and call handlers // registered with watch() if the value has changed. var oldValue = this[name]; this[name] = value; if (this._created && !isEqual(oldValue, value)) { if (this._watchCallbacks) { this._watchCallbacks(name, oldValue, value); } this.emit("attrmodified-" + name, { detail: { prevValue: oldValue, newValue: value } }); } }, _get: function _get( /*String*/ name) { // summary: // Helper function to get value for specified property stored by this._set(), // i.e. for properties with custom setters. Used mainly by custom getters. // // For example, CheckBox._getValueAttr() calls this._get("value"). // future: return name in this.props ? this.props[name] : this[name]; return this[name]; }, emit: function emit( /*String*/ type, /*Object?*/ eventObj, /*Array?*/ callbackArgs) { // summary: // Used by widgets to signal that a synthetic event occurred, ex: // | myWidget.emit("attrmodified-selectedChildWidget", {}). // // Emits an event on this.domNode named type.toLowerCase(), based on eventObj. // Also calls onType() method, if present, and returns value from that method. // By default passes eventObj to callback, but will pass callbackArgs instead, if specified. // Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). // tags: // protected // Specify fallback values for bubbles, cancelable in case they are not set in eventObj. // Also set pointer to widget, although since we can't add a pointer to the widget for native events // (see #14729), maybe we shouldn't do it here? eventObj = eventObj || {}; if (eventObj.bubbles === undefined) { eventObj.bubbles = true; } if (eventObj.cancelable === undefined) { eventObj.cancelable = true; } if (!eventObj.detail) { eventObj.detail = {}; } eventObj.detail.widget = this; var ret, callback = this["on" + type]; if (callback) { ret = callback.apply(this, callbackArgs ? callbackArgs : [eventObj]); } // Emit event, but avoid spurious emit()'s as parent sets properties on child during startup/destroy if (this._started && !this._beingDestroyed) { _on.emit(this.domNode, type.toLowerCase(), eventObj); } return ret; }, on: function on( /*String|Function*/ type, /*Function*/ func) { // summary: // Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). // type: // Name of event (ex: "click") or extension event like touch.press. // description: // Call specified function when event `type` occurs, ex: `myWidget.on("click", function(){ ... })`. // Note that the function is not run in any particular scope, so if (for example) you want it to run in the // widget's scope you must do `myWidget.on("click", lang.hitch(myWidget, func))`. // For backwards compatibility, if there's an onType() method in the widget then connect to that. // Remove in 2.0. var widgetMethod = this._onMap(type); if (widgetMethod) { return aspect.after(this, widgetMethod, func, true); } // Otherwise, just listen for the event on this.domNode. return this.own(_on(this.domNode, type, func))[0]; }, _onMap: function _onMap( /*String|Function*/ type) { // summary: // Maps on() type parameter (ex: "mousemove") to method name (ex: "onMouseMove"). // If type is a synthetic event like touch.press then returns undefined. var ctor = this.constructor, map = ctor._onMap; if (!map) { map = ctor._onMap = {}; for (var attr in ctor.prototype) { if (/^on/.test(attr)) { map[attr.replace(/^on/, "").toLowerCase()] = attr; } } } return map[typeof type == "string" && type.toLowerCase()]; // String }, toString: function toString() { // summary: // Returns a string that represents the widget. // description: // When a widget is cast to a string, this method will be used to generate the // output. Currently, it does not implement any sort of reversible // serialization. return '[Widget ' + this.declaredClass + ', ' + (this.id || 'NO ID') + ']'; // String }, getChildren: function getChildren() { // summary: // Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent // is this widget. Note that it does not return all descendants, but rather just direct children. // Analogous to [Node.childNodes](https://developer.mozilla.org/en-US/docs/DOM/Node.childNodes), // except containing widgets rather than DOMNodes. // // The result intentionally excludes internally created widgets (a.k.a. supporting widgets) // outside of this.containerNode. // // Note that the array returned is a simple array. Application code should not assume // existence of methods like forEach(). return this.containerNode ? registry.findWidgets(this.containerNode) : []; // dijit/_WidgetBase[] }, getParent: function getParent() { // summary: // Returns the parent widget of this widget. return registry.getEnclosingWidget(this.domNode.parentNode); }, connect: function connect( /*Object|null*/ obj, /*String|Function*/ event, /*String|Function*/ method) { // summary: // Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. // // Connects specified obj/event to specified method of this object // and registers for disconnect() on widget destroy. // // Provide widget-specific analog to dojo.connect, except with the // implicit use of this widget as the target object. // Events connected with `this.connect` are disconnected upon // destruction. // returns: // A handle that can be passed to `disconnect` in order to disconnect before // the widget is destroyed. // example: // | var btn = new Button(); // | // when foo.bar() is called, call the listener we're going to // | // provide in the scope of btn // | btn.connect(foo, "bar", function(){ // | console.debug(this.toString()); // | }); // tags: // protected return this.own(_connect.connect(obj, event, this, method))[0]; // handle }, disconnect: function disconnect(handle) { // summary: // Deprecated, will be removed in 2.0, use handle.remove() instead. // // Disconnects handle created by `connect`. // tags: // protected handle.remove(); }, subscribe: function subscribe(t, method) { // summary: // Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. // // Subscribes to the specified topic and calls the specified method // of this object and registers for unsubscribe() on widget destroy. // // Provide widget-specific analog to dojo.subscribe, except with the // implicit use of this widget as the target object. // t: String // The topic // method: Function // The callback // example: // | var btn = new Button(); // | // when /my/topic is published, this button changes its label to // | // be the parameter of the topic. // | btn.subscribe("/my/topic", function(v){ // | this.set("label", v); // | }); // tags: // protected return this.own(topic.subscribe(t, lang.hitch(this, method)))[0]; // handle }, unsubscribe: function unsubscribe( /*Object*/ handle) { // summary: // Deprecated, will be removed in 2.0, use handle.remove() instead. // // Unsubscribes handle created by this.subscribe. // Also removes handle from this widget's list of subscriptions // tags: // protected handle.remove(); }, isLeftToRight: function isLeftToRight() { // summary: // Return this widget's explicit or implicit orientation (true for LTR, false for RTL) // tags: // protected return this.dir ? this.dir.toLowerCase() == "ltr" : domGeometry.isBodyLtr(this.ownerDocument); //Boolean }, isFocusable: function isFocusable() { // summary: // Return true if this widget can currently be focused // and false if not return this.focus && domStyle.get(this.domNode, "display") != "none"; }, placeAt: function placeAt( /*String|DomNode|DocumentFragment|dijit/_WidgetBase*/ reference, /*String|Int?*/ position) { // summary: // Place this widget somewhere in the DOM based // on standard domConstruct.place() conventions. // description: // A convenience function provided in all _Widgets, providing a simple // shorthand mechanism to put an existing (or newly created) Widget // somewhere in the dom, and allow chaining. // reference: // Widget, DOMNode, DocumentFragment, or id of widget or DOMNode // position: // If reference is a widget (or id of widget), and that widget has an ".addChild" method, // it will be called passing this widget instance into that method, supplying the optional // position index passed. In this case position (if specified) should be an integer. // // If reference is a DOMNode (or id matching a DOMNode but not a widget), // the position argument can be a numeric index or a string // "first", "last", "before", or "after", same as dojo/dom-construct::place(). // returns: dijit/_WidgetBase // Provides a useful return of the newly created dijit._Widget instance so you // can "chain" this function by instantiating, placing, then saving the return value // to a variable. // example: // | // create a Button with no srcNodeRef, and place it in the body: // | var button = new Button({ label:"click" }).placeAt(win.body()); // | // now, 'button' is still the widget reference to the newly created button // | button.on("click", function(e){ console.log('click'); })); // example: // | // create a button out of a node with id="src" and append it to id="wrapper": // | var button = new Button({},"src").placeAt("wrapper"); // example: // | // place a new button as the first element of some div // | var button = new Button({ label:"click" }).placeAt("wrapper","first"); // example: // | // create a contentpane and add it to a TabContainer // | var tc = dijit.byId("myTabs"); // | new ContentPane({ href:"foo.html", title:"Wow!" }).placeAt(tc) var refWidget = !reference.tagName && registry.byId(reference); if (refWidget && refWidget.addChild && (!position || typeof position === "number")) { // Adding this to refWidget and can use refWidget.addChild() to handle everything. refWidget.addChild(this, position); } else { // "reference" is a plain DOMNode, or we can't use refWidget.addChild(). Use domConstruct.place() and // target refWidget.containerNode for nested placement (position==number, "first", "last", "only"), and // refWidget.domNode otherwise ("after"/"before"/"replace"). (But not supported officially, see #14946.) var ref = refWidget && "domNode" in refWidget ? refWidget.containerNode && !/after|before|replace/.test(position || "") ? refWidget.containerNode : refWidget.domNode : dom.byId(reference, this.ownerDocument); domConstruct.place(this.domNode, ref, position); // Start this iff it has a parent widget that's already started. // TODO: for 2.0 maybe it should also start the widget when this.getParent() returns null?? if (!this._started && (this.getParent() || {})._started) { this.startup(); } } return this; }, defer: function defer(fcn, delay) { // summary: // Wrapper to setTimeout to avoid deferred functions executing // after the originating widget has been destroyed. // Returns an object handle with a remove method (that returns null) (replaces clearTimeout). // fcn: Function // Function reference. // delay: Number? // Delay, defaults to 0. // tags: // protected var timer = setTimeout(lang.hitch(this, function () { if (!timer) { return; } timer = null; if (!this._destroyed) { lang.hitch(this, fcn)(); } }), delay || 0); return { remove: function remove() { if (timer) { clearTimeout(timer); timer = null; } return null; // so this works well: handle = handle.remove(); } }; } }); if (has("dojo-bidi")) { _WidgetBase.extend(_BidiMixin); } return _WidgetBase; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/_base/manager.js": /*!*********************************************!*\ !*** ./node_modules/dijit/_base/manager.js ***! \*********************************************/ /*! no static exports found */ /***/ function node_modulesDijit_baseManagerJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), __webpack_require__( /*! dojo/_base/config */ "./node_modules/dojo/_base/config.js"), // defaultDuration __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ../registry */ "./node_modules/dijit/registry.js"), __webpack_require__( /*! ../main */ "./node_modules/dijit/main.js") // for setting exports to dijit namespace ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, config, lang, registry, dijit) { // module: // dijit/_base/manager var exports = {// summary: // Deprecated. Shim to methods on registry, plus a few other declarations. // New code should access dijit/registry directly when possible. }; array.forEach(["byId", "getUniqueId", "findWidgets", "_destroyAll", "byNode", "getEnclosingWidget"], function (name) { exports[name] = registry[name]; }); lang.mixin(exports, { // defaultDuration: Integer // The default fx.animation speed (in ms) to use for all Dijit // transitional fx.animations, unless otherwise specified // on a per-instance basis. Defaults to 200, overrided by // `djConfig.defaultDuration` defaultDuration: config["defaultDuration"] || 200 }); lang.mixin(dijit, exports); /*===== return exports; =====*/ return dijit; // for back compat :-( }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/a11y.js": /*!************************************!*\ !*** ./node_modules/dijit/a11y.js ***! \************************************/ /*! no static exports found */ /***/ function node_modulesDijitA11yJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.map __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // dom.byId __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), // domAttr.attr domAttr.has __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.style __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.mixin() __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie") has("extend-dojo") __webpack_require__( /*! ./main */ "./node_modules/dijit/main.js") // for exporting methods to dijit namespace ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, dom, domAttr, domStyle, lang, has, dijit) { // module: // dijit/a11y var undefined; var a11y = { // summary: // Accessibility utility functions (keyboard, tab stops, etc.) _isElementShown: function _isElementShown( /*Element*/ elem) { var s = domStyle.get(elem); return s.visibility != "hidden" && s.visibility != "collapsed" && s.display != "none" && domAttr.get(elem, "type") != "hidden"; }, hasDefaultTabStop: function hasDefaultTabStop( /*Element*/ elem) { // summary: // Tests if element is tab-navigable even without an explicit tabIndex setting // No explicit tabIndex setting, need to investigate node type switch (elem.nodeName.toLowerCase()) { case "a": // An <a> w/out a tabindex is only navigable if it has an href return domAttr.has(elem, "href"); case "area": case "button": case "input": case "object": case "select": case "textarea": // These are navigable by default return true; case "iframe": // If it's an editor <iframe> then it's tab navigable. var body; try { // non-IE var contentDocument = elem.contentDocument; if ("designMode" in contentDocument && contentDocument.designMode == "on") { return true; } body = contentDocument.body; } catch (e1) { // contentWindow.document isn't accessible within IE7/8 // if the iframe.src points to a foreign url and this // page contains an element, that could get focus try { body = elem.contentWindow.document.body; } catch (e2) { return false; } } return body && (body.contentEditable == 'true' || body.firstChild && body.firstChild.contentEditable == 'true'); default: return elem.contentEditable == 'true'; } }, effectiveTabIndex: function effectiveTabIndex( /*Element*/ elem) { // summary: // Returns effective tabIndex of an element, either a number, or undefined if element isn't focusable. if (domAttr.get(elem, "disabled")) { return undefined; } else if (domAttr.has(elem, "tabIndex")) { // Explicit tab index setting return +domAttr.get(elem, "tabIndex"); // + to convert string --> number } else { // No explicit tabIndex setting, so depends on node type return a11y.hasDefaultTabStop(elem) ? 0 : undefined; } }, isTabNavigable: function isTabNavigable( /*Element*/ elem) { // summary: // Tests if an element is tab-navigable return a11y.effectiveTabIndex(elem) >= 0; }, isFocusable: function isFocusable( /*Element*/ elem) { // summary: // Tests if an element is focusable by tabbing to it, or clicking it with the mouse. return a11y.effectiveTabIndex(elem) >= -1; }, _getTabNavigable: function _getTabNavigable( /*DOMNode*/ root) { // summary: // Finds descendants of the specified root node. // description: // Finds the following descendants of the specified root node: // // - the first tab-navigable element in document order // without a tabIndex or with tabIndex="0" // - the last tab-navigable element in document order // without a tabIndex or with tabIndex="0" // - the first element in document order with the lowest // positive tabIndex value // - the last element in document order with the highest // positive tabIndex value var first, last, lowest, lowestTabindex, highest, highestTabindex, radioSelected = {}; function radioName(node) { // If this element is part of a radio button group, return the name for that group. return node && node.tagName.toLowerCase() == "input" && node.type && node.type.toLowerCase() == "radio" && node.name && node.name.toLowerCase(); } var shown = a11y._isElementShown, effectiveTabIndex = a11y.effectiveTabIndex; var walkTree = function walkTree( /*DOMNode*/ parent) { for (var child = parent.firstChild; child; child = child.nextSibling) { // Skip text elements, hidden elements, and also non-HTML elements (those in custom namespaces) in IE, // since show() invokes getAttribute("type"), which crash on VML nodes in IE. if (child.nodeType != 1 || has("ie") <= 9 && child.scopeName !== "HTML" || !shown(child)) { continue; } var tabindex = effectiveTabIndex(child); if (tabindex >= 0) { if (tabindex == 0) { if (!first) { first = child; } last = child; } else if (tabindex > 0) { if (!lowest || tabindex < lowestTabindex) { lowestTabindex = tabindex; lowest = child; } if (!highest || tabindex >= highestTabindex) { highestTabindex = tabindex; highest = child; } } var rn = radioName(child); if (domAttr.get(child, "checked") && rn) { radioSelected[rn] = child; } } if (child.nodeName.toUpperCase() != 'SELECT') { walkTree(child); } } }; if (shown(root)) { walkTree(root); } function rs(node) { // substitute checked radio button for unchecked one, if there is a checked one with the same name. return radioSelected[radioName(node)] || node; } return { first: rs(first), last: rs(last), lowest: rs(lowest), highest: rs(highest) }; }, getFirstInTabbingOrder: function getFirstInTabbingOrder( /*String|DOMNode*/ root, /*Document?*/ doc) { // summary: // Finds the descendant of the specified root node // that is first in the tabbing order var elems = a11y._getTabNavigable(dom.byId(root, doc)); return elems.lowest ? elems.lowest : elems.first; // DomNode }, getLastInTabbingOrder: function getLastInTabbingOrder( /*String|DOMNode*/ root, /*Document?*/ doc) { // summary: // Finds the descendant of the specified root node // that is last in the tabbing order var elems = a11y._getTabNavigable(dom.byId(root, doc)); return elems.last ? elems.last : elems.highest; // DomNode } }; true && lang.mixin(dijit, a11y); return a11y; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/a11yclick.js": /*!*****************************************!*\ !*** ./node_modules/dijit/a11yclick.js ***! \*****************************************/ /*! no static exports found */ /***/ function node_modulesDijitA11yclickJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/keys */ "./node_modules/dojo/keys.js"), // keys.ENTER keys.SPACE __webpack_require__( /*! dojo/mouse */ "./node_modules/dojo/mouse.js"), __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/touch */ "./node_modules/dojo/touch.js") // touch support for click is now there ], __WEBPACK_AMD_DEFINE_RESULT__ = function (keys, mouse, on, touch) { // module: // dijit/a11yclick /*===== return { // summary: // Custom press, release, and click synthetic events // which trigger on a left mouse click, touch, or space/enter keyup. click: function(node, listener){ // summary: // Logical click operation for mouse, touch, or keyboard (space/enter key) }, press: function(node, listener){ // summary: // Mousedown (left button), touchstart, or keydown (space or enter) corresponding to logical click operation. }, release: function(node, listener){ // summary: // Mouseup (left button), touchend, or keyup (space or enter) corresponding to logical click operation. }, move: function(node, listener){ // summary: // Mouse cursor or a finger is dragged over the given node. } }; =====*/ function clickKey( /*Event*/ e) { // Test if this keyboard event should be tracked as the start (if keydown) or end (if keyup) of a click event. // Only track for nodes marked to be tracked, and not for buttons or inputs, // since buttons handle keyboard click natively, and text inputs should not // prevent typing spaces or newlines. if ((e.keyCode === keys.ENTER || e.keyCode === keys.SPACE) && !/input|button|textarea/i.test(e.target.nodeName)) { // Test if a node or its ancestor has been marked with the dojoClick property to indicate special processing for (var node = e.target; node; node = node.parentNode) { if (node.dojoClick) { return true; } } } } var lastKeyDownNode; on(document, "keydown", function (e) { //console.log("a11yclick: onkeydown, e.target = ", e.target, ", lastKeyDownNode was ", lastKeyDownNode, ", equality is ", (e.target === lastKeyDownNode)); if (clickKey(e)) { // needed on IE for when focus changes between keydown and keyup - otherwise dropdown menus do not work lastKeyDownNode = e.target; // Prevent viewport scrolling on space key in IE<9. // (Reproducible on test_Button.html on any of the first dijit/form/Button examples) e.preventDefault(); } else { lastKeyDownNode = null; } }); on(document, "keyup", function (e) { //console.log("a11yclick: onkeyup, e.target = ", e.target, ", lastKeyDownNode was ", lastKeyDownNode, ", equality is ", (e.target === lastKeyDownNode)); if (clickKey(e) && e.target == lastKeyDownNode) { // === breaks greasemonkey //need reset here or have problems in FF when focus returns to trigger element after closing popup/alert lastKeyDownNode = null; on.emit(e.target, "click", { cancelable: true, bubbles: true, ctrlKey: e.ctrlKey, shiftKey: e.shiftKey, metaKey: e.metaKey, altKey: e.altKey, _origType: e.type }); } }); // I want to return a hash of the synthetic events, but for backwards compatibility the main return value // needs to be the click event. Change for 2.0. var click = function click(node, listener) { // Set flag on node so that keydown/keyup above emits click event. // Also enables fast click processing from dojo/touch. node.dojoClick = true; return on(node, "click", listener); }; click.click = click; // forward compatibility with 2.0 click.press = function (node, listener) { var touchListener = on(node, touch.press, function (evt) { if (evt.type == "mousedown" && !mouse.isLeft(evt)) { // Ignore right click return; } listener(evt); }), keyListener = on(node, "keydown", function (evt) { if (evt.keyCode === keys.ENTER || evt.keyCode === keys.SPACE) { listener(evt); } }); return { remove: function remove() { touchListener.remove(); keyListener.remove(); } }; }; click.release = function (node, listener) { var touchListener = on(node, touch.release, function (evt) { if (evt.type == "mouseup" && !mouse.isLeft(evt)) { // Ignore right click return; } listener(evt); }), keyListener = on(node, "keyup", function (evt) { if (evt.keyCode === keys.ENTER || evt.keyCode === keys.SPACE) { listener(evt); } }); return { remove: function remove() { touchListener.remove(); keyListener.remove(); } }; }; click.move = touch.move; // just for convenience return click; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/focus.js": /*!*************************************!*\ !*** ./node_modules/dijit/focus.js ***! \*************************************/ /*! no static exports found */ /***/ function node_modulesDijitFocusJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/aspect */ "./node_modules/dojo/aspect.js"), __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // domAttr.get dom.isDescendant __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), // domAttr.get dom.isDescendant __webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), __webpack_require__( /*! dojo/dom-construct */ "./node_modules/dojo/dom-construct.js"), // connect to domConstruct.empty, domConstruct.destroy __webpack_require__( /*! dojo/Evented */ "./node_modules/dojo/Evented.js"), __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.hitch __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/domReady */ "./node_modules/dojo/domReady.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie") __webpack_require__( /*! dojo/Stateful */ "./node_modules/dojo/Stateful.js"), __webpack_require__( /*! dojo/_base/window */ "./node_modules/dojo/_base/window.js"), // win.body __webpack_require__( /*! dojo/window */ "./node_modules/dojo/window.js"), // winUtils.get __webpack_require__( /*! ./a11y */ "./node_modules/dijit/a11y.js"), // a11y.isTabNavigable __webpack_require__( /*! ./registry */ "./node_modules/dijit/registry.js"), // registry.byId __webpack_require__( /*! ./main */ "./node_modules/dijit/main.js") // to set dijit.focus ], __WEBPACK_AMD_DEFINE_RESULT__ = function (aspect, declare, dom, domAttr, domClass, domConstruct, Evented, lang, on, domReady, has, Stateful, win, winUtils, a11y, registry, dijit) { // module: // dijit/focus // Time of the last focusin event var lastFocusin; // Time of the last touch/mousedown or focusin event var lastTouchOrFocusin; var FocusManager = declare([Stateful, Evented], { // summary: // Tracks the currently focused node, and which widgets are currently "active". // Access via require(["dijit/focus"], function(focus){ ... }). // // A widget is considered active if it or a descendant widget has focus, // or if a non-focusable node of this widget or a descendant was recently clicked. // // Call focus.watch("curNode", callback) to track the current focused DOMNode, // or focus.watch("activeStack", callback) to track the currently focused stack of widgets. // // Call focus.on("widget-blur", func) or focus.on("widget-focus", ...) to monitor when // when widgets become active/inactive // // Finally, focus(node) will focus a node, suppressing errors if the node doesn't exist. // curNode: DomNode // Currently focused item on screen curNode: null, // activeStack: dijit/_WidgetBase[] // List of currently active widgets (focused widget and it's ancestors) activeStack: [], constructor: function constructor() { // Don't leave curNode/prevNode pointing to bogus elements var check = lang.hitch(this, function (node) { if (dom.isDescendant(this.curNode, node)) { this.set("curNode", null); } if (dom.isDescendant(this.prevNode, node)) { this.set("prevNode", null); } }); aspect.before(domConstruct, "empty", check); aspect.before(domConstruct, "destroy", check); }, registerIframe: function registerIframe( /*DomNode*/ iframe) { // summary: // Registers listeners on the specified iframe so that any click // or focus event on that iframe (or anything in it) is reported // as a focus/click event on the `<iframe>` itself. // description: // Currently only used by editor. // returns: // Handle with remove() method to deregister. return this.registerWin(iframe.contentWindow, iframe); }, registerWin: function registerWin( /*Window?*/ targetWindow, /*DomNode?*/ effectiveNode) { // summary: // Registers listeners on the specified window (either the main // window or an iframe's window) to detect when the user has clicked somewhere // or focused somewhere. // description: // Users should call registerIframe() instead of this method. // targetWindow: // If specified this is the window associated with the iframe, // i.e. iframe.contentWindow. // effectiveNode: // If specified, report any focus events inside targetWindow as // an event on effectiveNode, rather than on evt.target. // returns: // Handle with remove() method to deregister. // TODO: make this function private in 2.0; Editor/users should call registerIframe(), // Listen for blur and focus events on targetWindow's document. var _this = this, body = targetWindow.document && targetWindow.document.body; if (body) { // Listen for touches or mousedowns... could also use dojo/touch.press here. var event = has("pointer-events") ? "pointerdown" : false ? undefined : has("touch-events") ? "mousedown, touchstart" : "mousedown"; var mdh = on(targetWindow.document, event, function (evt) { // workaround weird IE bug where the click is on an orphaned node // (first time clicking a Select/DropDownButton inside a TooltipDialog). // actually, strangely this is happening on latest chrome too. if (evt && evt.target && evt.target.parentNode == null) { return; } _this._onTouchNode(effectiveNode || evt.target, "mouse"); }); var fih = on(body, 'focusin', function (evt) { // When you refocus the browser window, IE gives an event with an empty srcElement if (!evt.target.tagName) { return; } // IE reports that nodes like <body> have gotten focus, even though they have tabIndex=-1, // ignore those events var tag = evt.target.tagName.toLowerCase(); if (tag == "#document" || tag == "body") { return; } if (a11y.isFocusable(evt.target)) { _this._onFocusNode(effectiveNode || evt.target); } else { // Previous code called _onTouchNode() for any activate event on a non-focusable node. Can // probably just ignore such an event as it will be handled by onmousedown handler above, but // leaving the code for now. _this._onTouchNode(effectiveNode || evt.target); } }); var foh = on(body, 'focusout', function (evt) { _this._onBlurNode(effectiveNode || evt.target); }); return { remove: function remove() { mdh.remove(); fih.remove(); foh.remove(); mdh = fih = foh = null; body = null; // prevent memory leak (apparent circular reference via closure) } }; } }, _onBlurNode: function _onBlurNode( /*DomNode*/ node) { // summary: // Called when focus leaves a node. // Usually ignored, _unless_ it *isn't* followed by touching another node, // which indicates that we tabbed off the last field on the page, // in which case every widget is marked inactive var now = new Date().getTime(); // IE9+ and chrome have a problem where focusout events come after the corresponding focusin event. // For chrome problem see https://bugs.dojotoolkit.org/ticket/17668. // IE problem happens when moving focus from the Editor's <iframe> to a normal DOMNode. if (now < lastFocusin + 100) { return; } // If the blur event isn't followed by a focus event, it means the user clicked on something unfocusable, // so clear focus. if (this._clearFocusTimer) { clearTimeout(this._clearFocusTimer); } this._clearFocusTimer = setTimeout(lang.hitch(this, function () { this.set("prevNode", this.curNode); this.set("curNode", null); }), 0); // Unset timer to zero-out widget stack; we'll reset it below if appropriate. if (this._clearActiveWidgetsTimer) { clearTimeout(this._clearActiveWidgetsTimer); } if (now < lastTouchOrFocusin + 100) { // This blur event is coming late (after the call to _onTouchNode() rather than before. // So let _onTouchNode() handle setting the widget stack. // See https://bugs.dojotoolkit.org/ticket/17668 return; } // If the blur event isn't followed (or preceded) by a focus or touch event then mark all widgets as inactive. this._clearActiveWidgetsTimer = setTimeout(lang.hitch(this, function () { delete this._clearActiveWidgetsTimer; this._setStack([]); }), 0); }, _onTouchNode: function _onTouchNode( /*DomNode*/ node, /*String*/ by) { // summary: // Callback when node is focused or touched. // Note that _onFocusNode() calls _onTouchNode(). // node: // The node that was touched. // by: // "mouse" if the focus/touch was caused by a mouse down event // Keep track of time of last focusin or touch event. lastTouchOrFocusin = new Date().getTime(); if (this._clearActiveWidgetsTimer) { // forget the recent blur event clearTimeout(this._clearActiveWidgetsTimer); delete this._clearActiveWidgetsTimer; } // if the click occurred on the scrollbar of a dropdown, treat it as a click on the dropdown, // even though the scrollbar is technically on the popup wrapper (see #10631) if (domClass.contains(node, "dijitPopup")) { node = node.firstChild; } // compute stack of active widgets (ex: ComboButton --> Menu --> MenuItem) var newStack = []; try { while (node) { var popupParent = domAttr.get(node, "dijitPopupParent"); if (popupParent) { node = registry.byId(popupParent).domNode; } else if (node.tagName && node.tagName.toLowerCase() == "body") { // is this the root of the document or just the root of an iframe? if (node === win.body()) { // node is the root of the main document break; } // otherwise, find the iframe this node refers to (can't access it via parentNode, // need to do this trick instead). window.frameElement is supported in IE/FF/Webkit node = winUtils.get(node.ownerDocument).frameElement; } else { // if this node is the root node of a widget, then add widget id to stack, // except ignore clicks on disabled widgets (actually focusing a disabled widget still works, // to support MenuItem) var id = node.getAttribute && node.getAttribute("widgetId"), widget = id && registry.byId(id); if (widget && !(by == "mouse" && widget.get("disabled"))) { newStack.unshift(id); } node = node.parentNode; } } } catch (e) { /* squelch */ } this._setStack(newStack, by); }, _onFocusNode: function _onFocusNode( /*DomNode*/ node) { // summary: // Callback when node is focused if (!node) { return; } if (node.nodeType == 9) { // Ignore focus events on the document itself. This is here so that // (for example) clicking the up/down arrows of a spinner // (which don't get focus) won't cause that widget to blur. (FF issue) return; } // Keep track of time of last focusin event. lastFocusin = new Date().getTime(); // There was probably a blur event right before this event, but since we have a new focus, // forget about the blur if (this._clearFocusTimer) { clearTimeout(this._clearFocusTimer); delete this._clearFocusTimer; } this._onTouchNode(node); if (node == this.curNode) { return; } this.set("prevNode", this.curNode); this.set("curNode", node); }, _setStack: function _setStack( /*String[]*/ newStack, /*String*/ by) { // summary: // The stack of active widgets has changed. Send out appropriate events and records new stack. // newStack: // array of widget id's, starting from the top (outermost) widget // by: // "mouse" if the focus/touch was caused by a mouse down event var oldStack = this.activeStack, lastOldIdx = oldStack.length - 1, lastNewIdx = newStack.length - 1; if (newStack[lastNewIdx] == oldStack[lastOldIdx]) { // no changes, return now to avoid spurious notifications about changes to activeStack return; } this.set("activeStack", newStack); var widget, i; // for all elements that have gone out of focus, set focused=false for (i = lastOldIdx; i >= 0 && oldStack[i] != newStack[i]; i--) { widget = registry.byId(oldStack[i]); if (widget) { widget._hasBeenBlurred = true; // TODO: used by form widgets, should be moved there widget.set("focused", false); if (widget._focusManager == this) { widget._onBlur(by); } this.emit("widget-blur", widget, by); } } // for all element that have come into focus, set focused=true for (i++; i <= lastNewIdx; i++) { widget = registry.byId(newStack[i]); if (widget) { widget.set("focused", true); if (widget._focusManager == this) { widget._onFocus(by); } this.emit("widget-focus", widget, by); } } }, focus: function focus(node) { // summary: // Focus the specified node, suppressing errors if they occur if (node) { try { node.focus(); } catch (e) { /*quiet*/ } } } }); var singleton = new FocusManager(); // register top window and all the iframes it contains domReady(function () { var handle = singleton.registerWin(winUtils.get(document)); if (has("ie")) { on(window, "unload", function () { if (handle) { // because this gets called twice when doh.robot is running handle.remove(); handle = null; } }); } }); // Setup dijit.focus as a pointer to the singleton but also (for backwards compatibility) // as a function to set focus. Remove for 2.0. dijit.focus = function (node) { singleton.focus(node); // indirection here allows dijit/_base/focus.js to override behavior }; for (var attr in singleton) { if (!/^_/.test(attr)) { dijit.focus[attr] = typeof singleton[attr] == "function" ? lang.hitch(singleton, attr) : singleton[attr]; } } singleton.watch(function (attr, oldVal, newVal) { dijit.focus[attr] = newVal; }); return singleton; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/Button.js": /*!*******************************************!*\ !*** ./node_modules/dijit/form/Button.js ***! \*******************************************/ /*! no static exports found */ /***/ function node_modulesDijitFormButtonJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), // domClass.toggle __webpack_require__( /*! dojo/has */ "./node_modules/dojo/has.js"), // has("dijit-legacy-requires") __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.trim __webpack_require__( /*! dojo/ready */ "./node_modules/dojo/ready.js"), __webpack_require__( /*! ./_FormWidget */ "./node_modules/dijit/form/_FormWidget.js"), __webpack_require__( /*! ./_ButtonMixin */ "./node_modules/dijit/form/_ButtonMixin.js"), __webpack_require__( /*! dojo/text!./templates/Button.html */ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/Button.html"), __webpack_require__( /*! ../a11yclick */ "./node_modules/dijit/a11yclick.js") // template uses ondijitclick ], __WEBPACK_AMD_DEFINE_RESULT__ = function (require, declare, domClass, has, kernel, lang, ready, _FormWidget, _ButtonMixin, template) { // module: // dijit/form/Button // Back compat w/1.6, remove for 2.0 if (has("dijit-legacy-requires")) { ready(0, function () { var requires = ["dijit/form/DropDownButton", "dijit/form/ComboButton", "dijit/form/ToggleButton"]; require(requires); // use indirection so modules not rolled into a build }); } var Button = declare("dijit.form.Button" + (has("dojo-bidi") ? "_NoBidi" : ""), [_FormWidget, _ButtonMixin], { // summary: // Basically the same thing as a normal HTML button, but with special styling. // description: // Buttons can display a label, an icon, or both. // A label should always be specified (through innerHTML) or the label // attribute. It can be hidden via showLabel=false. // example: // | <button data-dojo-type="dijit/form/Button" onClick="...">Hello world</button> // // example: // | var button1 = new Button({label: "hello world", onClick: foo}); // | dojo.body().appendChild(button1.domNode); // showLabel: Boolean // Set this to true to hide the label text and display only the icon. // (If showLabel=false then iconClass must be specified.) // Especially useful for toolbars. // If showLabel=true, the label will become the title (a.k.a. tooltip/hint) of the icon. // // The exception case is for computers in high-contrast mode, where the label // will still be displayed, since the icon doesn't appear. showLabel: true, // iconClass: String // Class to apply to DOMNode in button to make it display an icon iconClass: "dijitNoIcon", _setIconClassAttr: { node: "iconNode", type: "class" }, baseClass: "dijitButton", templateString: template, // Map widget attributes to DOMNode attributes. _setValueAttr: "valueNode", _setNameAttr: function _setNameAttr(name) { // avoid breaking existing subclasses where valueNode undefined. Perhaps in 2.0 require it to be defined? if (this.valueNode) { this.valueNode.setAttribute("name", name); } }, postCreate: function postCreate() { this.inherited(arguments); this._setLabelFromContainer(); }, _setLabelFromContainer: function _setLabelFromContainer() { if (this.containerNode && !this.label) { // When markup was set as srcNodeRef.innerHTML, copy it to this.label, in case someone tries to // reference that variable. Alternately, could have a _getLabelAttr() method to return // this.containerNode.innerHTML. this.label = lang.trim(this.containerNode.innerHTML); this.onLabelSet(); // set this.titleNode.title etc. according to label } }, _setShowLabelAttr: function _setShowLabelAttr(val) { if (this.containerNode) { domClass.toggle(this.containerNode, "dijitDisplayNone", !val); } this._set("showLabel", val); }, setLabel: function setLabel( /*String*/ content) { // summary: // Deprecated. Use set('label', ...) instead. kernel.deprecated("dijit.form.Button.setLabel() is deprecated. Use set('label', ...) instead.", "", "2.0"); this.set("label", content); }, onLabelSet: function onLabelSet() { this.inherited(arguments); if (!this.showLabel && !("title" in this.params)) { this.titleNode.title = lang.trim(this.containerNode.innerText || this.containerNode.textContent || ''); } } }); if (has("dojo-bidi")) { Button = declare("dijit.form.Button", Button, { onLabelSet: function onLabelSet() { this.inherited(arguments); if (this.titleNode.title) { this.applyTextDir(this.titleNode, this.titleNode.title); } }, _setTextDirAttr: function _setTextDirAttr( /*String*/ textDir) { if (this._created && this.textDir != textDir) { this._set("textDir", textDir); this._setLabelAttr(this.label); // call applyTextDir on both focusNode and titleNode } } }); } return Button; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/Form.js": /*!*****************************************!*\ !*** ./node_modules/dijit/form/Form.js ***! \*****************************************/ /*! no static exports found */ /***/ function node_modulesDijitFormFormJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), // domAttr.set __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie") __webpack_require__( /*! ../_Widget */ "./node_modules/dijit/_Widget.js"), __webpack_require__( /*! ../_TemplatedMixin */ "./node_modules/dijit/_TemplatedMixin.js"), __webpack_require__( /*! ./_FormMixin */ "./node_modules/dijit/form/_FormMixin.js"), __webpack_require__( /*! ../layout/_ContentPaneResizeMixin */ "./node_modules/dijit/layout/_ContentPaneResizeMixin.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, domAttr, kernel, has, _Widget, _TemplatedMixin, _FormMixin, _ContentPaneResizeMixin) { // module: // dijit/form/Form return declare("dijit.form.Form", [_Widget, _TemplatedMixin, _FormMixin, _ContentPaneResizeMixin], { // summary: // Widget corresponding to HTML form tag, for validation and serialization // // example: // | <form data-dojo-type="dijit/form/Form" id="myForm"> // | Name: <input type="text" name="name" /> // | </form> // | // Example assumes you have required dijit/registry // | myObj = {name: "John Doe"}; // | registry.byId('myForm').set('value', myObj); // | // | myObj=registry.byId('myForm').get('value'); // HTML <FORM> attributes // name: String? // Name of form for scripting. name: "", // action: String? // Server-side form handler. action: "", // method: String? // HTTP method used to submit the form, either "GET" or "POST". method: "", // encType: String? // Encoding type for the form, ex: application/x-www-form-urlencoded. encType: "", // accept-charset: String? // List of supported charsets. "accept-charset": "", // accept: String? // List of MIME types for file upload. accept: "", // target: String? // Target frame for the document to be opened in. target: "", templateString: "<form data-dojo-attach-point='containerNode' data-dojo-attach-event='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>", postMixInProperties: function postMixInProperties() { // Setup name=foo string to be referenced from the template (but only if a name has been specified) // Unfortunately we can't use _setNameAttr to set the name due to IE limitations, see #8660 this.nameAttrSetting = this.name ? "name='" + this.name + "'" : ""; this.inherited(arguments); }, execute: function execute() {// summary: // Deprecated: use submit() // tags: // deprecated }, onExecute: function onExecute() {// summary: // Deprecated: use onSubmit() // tags: // deprecated }, _setEncTypeAttr: function _setEncTypeAttr( /*String*/ value) { domAttr.set(this.domNode, "encType", value); if (has("ie")) { this.domNode.encoding = value; } this._set("encType", value); }, reset: function reset( /*Event?*/ e) { // summary: // restores all widget values back to their init values, // calls onReset() which can cancel the reset by returning false // create fake event so we can know if preventDefault() is called var faux = { returnValue: true, // the IE way preventDefault: function preventDefault() { // not IE this.returnValue = false; }, stopPropagation: function stopPropagation() {}, currentTarget: e ? e.target : this.domNode, target: e ? e.target : this.domNode }; // if return value is not exactly false, and haven't called preventDefault(), then reset if (!(this.onReset(faux) === false) && faux.returnValue) { this.inherited(arguments, []); } }, onReset: function onReset() { // summary: // Callback when user resets the form. This method is intended // to be over-ridden. When the `reset` method is called // programmatically, the return value from `onReset` is used // to compute whether or not resetting should proceed // tags: // callback return true; // Boolean }, _onReset: function _onReset(e) { this.reset(e); e.stopPropagation(); e.preventDefault(); return false; }, _onSubmit: function _onSubmit(e) { var fp = this.constructor.prototype; // TODO: remove this if statement beginning with 2.0 if (this.execute != fp.execute || this.onExecute != fp.onExecute) { kernel.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.", "", "2.0"); this.onExecute(); this.execute(this.getValues()); } if (this.onSubmit(e) === false) { // only exactly false stops submit e.stopPropagation(); e.preventDefault(); } }, onSubmit: function onSubmit() { // summary: // Callback when user submits the form. // description: // This method is intended to be over-ridden, but by default it checks and // returns the validity of form elements. When the `submit` // method is called programmatically, the return value from // `onSubmit` is used to compute whether or not submission // should proceed // tags: // extension return this.isValid(); // Boolean }, submit: function submit() { // summary: // programmatically submit form if and only if the `onSubmit` returns true if (!(this.onSubmit() === false)) { this.containerNode.submit(); } } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/TextBox.js": /*!********************************************!*\ !*** ./node_modules/dijit/form/TextBox.js ***! \********************************************/ /*! no static exports found */ /***/ function node_modulesDijitFormTextBoxJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom-construct */ "./node_modules/dojo/dom-construct.js"), // domConstruct.create __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.getComputedStyle __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.hitch __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie") has("mozilla") __webpack_require__( /*! ./_FormValueWidget */ "./node_modules/dijit/form/_FormValueWidget.js"), __webpack_require__( /*! ./_TextBoxMixin */ "./node_modules/dijit/form/_TextBoxMixin.js"), __webpack_require__( /*! dojo/text!./templates/TextBox.html */ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/TextBox.html"), __webpack_require__( /*! ../main */ "./node_modules/dijit/main.js") // to export dijit._setSelectionRange, remove in 2.0 ], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, domConstruct, domStyle, kernel, lang, on, has, _FormValueWidget, _TextBoxMixin, template, dijit) { // module: // dijit/form/TextBox var TextBox = declare("dijit.form.TextBox" + (has("dojo-bidi") ? "_NoBidi" : ""), [_FormValueWidget, _TextBoxMixin], { // summary: // A base class for textbox form inputs templateString: template, _singleNodeTemplate: '<input class="dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />', _buttonInputDisabled: has("ie") ? "disabled" : "", // allows IE to disallow focus, but Firefox cannot be disabled for mousedown events baseClass: "dijitTextBox", postMixInProperties: function postMixInProperties() { var type = this.type.toLowerCase(); if (this.templateString && this.templateString.toLowerCase() == "input" || (type == "hidden" || type == "file") && this.templateString == this.constructor.prototype.templateString) { this.templateString = this._singleNodeTemplate; } this.inherited(arguments); }, postCreate: function postCreate() { this.inherited(arguments); if (has("ie") < 9) { // IE INPUT tag fontFamily has to be set directly using STYLE // the defer gives IE a chance to render the TextBox and to deal with font inheritance this.defer(function () { try { var s = domStyle.getComputedStyle(this.domNode); // can throw an exception if widget is immediately destroyed if (s) { var ff = s.fontFamily; if (ff) { var inputs = this.domNode.getElementsByTagName("INPUT"); if (inputs) { for (var i = 0; i < inputs.length; i++) { inputs[i].style.fontFamily = ff; } } } } } catch (e) { /*when used in a Dialog, and this is called before the dialog is shown, s.fontFamily would trigger "Invalid Argument" error.*/ } }); } }, _setPlaceHolderAttr: function _setPlaceHolderAttr(v) { this._set("placeHolder", v); if (!this._phspan) { this._attachPoints.push('_phspan'); this._phspan = domConstruct.create('span', { // dijitInputField class gives placeHolder same padding as the input field // parent node already has dijitInputField class but it doesn't affect this <span> // since it's position: absolute. className: 'dijitPlaceHolder dijitInputField' }, this.textbox, 'after'); this.own(on(this._phspan, "mousedown", function (evt) { evt.preventDefault(); }), on(this._phspan, "touchend, pointerup, MSPointerUp", lang.hitch(this, function () { // If the user clicks placeholder rather than the <input>, need programmatic focus. Normally this // is done in _FormWidgetMixin._onFocus() but after [30663] it's done on a delay, which is ineffective. this.focus(); }))); } this._phspan.innerHTML = ""; this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(v)); this._updatePlaceHolder(); }, _onInput: function _onInput( /*Event*/ evt) { // summary: // Called AFTER the input event has happened // See if the placeHolder text should be removed or added while editing. this.inherited(arguments); this._updatePlaceHolder(); }, _updatePlaceHolder: function _updatePlaceHolder() { if (this._phspan) { this._phspan.style.display = this.placeHolder && !this.textbox.value ? "" : "none"; } }, _setValueAttr: function _setValueAttr(value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue) { this.inherited(arguments); this._updatePlaceHolder(); }, getDisplayedValue: function getDisplayedValue() { // summary: // Deprecated. Use get('displayedValue') instead. // tags: // deprecated kernel.deprecated(this.declaredClass + "::getDisplayedValue() is deprecated. Use get('displayedValue') instead.", "", "2.0"); return this.get('displayedValue'); }, setDisplayedValue: function setDisplayedValue( /*String*/ value) { // summary: // Deprecated. Use set('displayedValue', ...) instead. // tags: // deprecated kernel.deprecated(this.declaredClass + "::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.", "", "2.0"); this.set('displayedValue', value); }, _onBlur: function _onBlur(e) { if (this.disabled) { return; } this.inherited(arguments); this._updatePlaceHolder(); if (has("mozilla")) { if (this.selectOnClick) { // clear selection so that the next mouse click doesn't reselect this.textbox.selectionStart = this.textbox.selectionEnd = undefined; } } }, _onFocus: function _onFocus( /*String*/ by) { if (this.disabled || this.readOnly) { return; } this.inherited(arguments); this._updatePlaceHolder(); } }); if (has("ie") < 9) { TextBox.prototype._isTextSelected = function () { var range = this.ownerDocument.selection.createRange(); var parent = range.parentElement(); return parent == this.textbox && range.text.length > 0; }; // Overrides definition of _setSelectionRange from _TextBoxMixin (TODO: move to _TextBoxMixin.js?) dijit._setSelectionRange = _TextBoxMixin._setSelectionRange = function ( /*DomNode*/ element, /*Number?*/ start, /*Number?*/ stop) { if (element.createTextRange) { var r = element.createTextRange(); r.collapse(true); r.moveStart("character", -99999); // move to 0 r.moveStart("character", start); // delta from 0 is the correct position r.moveEnd("character", stop - start); r.select(); } }; } if (has("dojo-bidi")) { TextBox = declare("dijit.form.TextBox", TextBox, { _setPlaceHolderAttr: function _setPlaceHolderAttr(v) { this.inherited(arguments); this.applyTextDir(this._phspan); } }); } return TextBox; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/ValidationTextBox.js": /*!******************************************************!*\ !*** ./node_modules/dijit/form/ValidationTextBox.js ***! \******************************************************/ /*! no static exports found */ /***/ function node_modulesDijitFormValidationTextBoxJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! dojo/i18n */ "./node_modules/dojo/i18n.js"), // i18n.getLocalization __webpack_require__( /*! ./TextBox */ "./node_modules/dijit/form/TextBox.js"), __webpack_require__( /*! ../Tooltip */ "./node_modules/dijit/Tooltip.js"), __webpack_require__( /*! dojo/text!./templates/ValidationTextBox.html */ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/ValidationTextBox.html"), __webpack_require__( /*! dojo/i18n!./nls/validate */ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/form/nls/validate.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, kernel, lang, i18n, TextBox, Tooltip, template) { // module: // dijit/form/ValidationTextBox var ValidationTextBox = declare("dijit.form.ValidationTextBox", TextBox, { // summary: // Base class for textbox widgets with the ability to validate content of various types and provide user feedback. templateString: template, // required: Boolean // User is required to enter data into this field. required: false, // promptMessage: String // If defined, display this hint string immediately on focus to the textbox, if empty. // Also displays if the textbox value is Incomplete (not yet valid but will be with additional input). // Think of this like a tooltip that tells the user what to do, not an error message // that tells the user what they've done wrong. // // Message disappears when user starts typing. promptMessage: "", // invalidMessage: String // The message to display if value is invalid. // The translated string value is read from the message file by default. // Set to "" to use the promptMessage instead. invalidMessage: "$_unset_$", // missingMessage: String // The message to display if value is empty and the field is required. // The translated string value is read from the message file by default. // Set to "" to use the invalidMessage instead. missingMessage: "$_unset_$", // message: String // Currently error/prompt message. // When using the default tooltip implementation, this will only be // displayed when the field is focused. message: "", // constraints: ValidationTextBox.__Constraints // Despite the name, this parameter specifies both constraints on the input as well as // formatting options. See `dijit/form/ValidationTextBox.__Constraints` for details. constraints: {}, // pattern: [extension protected] String|Function(constraints) returning a string. // This defines the regular expression used to validate the input. // Do not add leading ^ or $ characters since the widget adds these. // A function may be used to generate a valid pattern when dependent on constraints or other runtime factors. // set('pattern', String|Function). pattern: ".*", // regExp: Deprecated [extension protected] String. Use "pattern" instead. regExp: "", regExpGen: function regExpGen() {// summary: // Deprecated. Use set('pattern', Function) instead. }, // state: [readonly] String // Shows current state (ie, validation result) of input (""=Normal, Incomplete, or Error) state: "", // tooltipPosition: String[] // See description of `dijit/Tooltip.defaultPosition` for details on this parameter. tooltipPosition: [], _deprecateRegExp: function _deprecateRegExp(attr, value) { if (value != ValidationTextBox.prototype[attr]) { kernel.deprecated("ValidationTextBox id=" + this.id + ", set('" + attr + "', ...) is deprecated. Use set('pattern', ...) instead.", "", "2.0"); this.set('pattern', value); } }, _setRegExpGenAttr: function _setRegExpGenAttr( /*Function*/ newFcn) { this._deprecateRegExp("regExpGen", newFcn); this._set("regExpGen", this._computeRegexp); // backward compat with this.regExpGen(this.constraints) }, _setRegExpAttr: function _setRegExpAttr( /*String*/ value) { this._deprecateRegExp("regExp", value); }, _setValueAttr: function _setValueAttr() { // summary: // Hook so set('value', ...) works. this.inherited(arguments); this._refreshState(); }, validator: function validator( /*anything*/ value, /*__Constraints*/ constraints) { // summary: // Overridable function used to validate the text input against the regular expression. // tags: // protected return new RegExp("^(?:" + this._computeRegexp(constraints) + ")" + (this.required ? "" : "?") + "$").test(value) && (!this.required || !this._isEmpty(value)) && (this._isEmpty(value) || this.parse(value, constraints) !== undefined); // Boolean }, _isValidSubset: function _isValidSubset() { // summary: // Returns true if the value is either already valid or could be made valid by appending characters. // This is used for validation while the user [may be] still typing. return this.textbox.value.search(this._partialre) == 0; }, isValid: function isValid() { // summary: // Tests if value is valid. // Can override with your own routine in a subclass. // tags: // protected return this.validator(this.textbox.value, this.get('constraints')); }, _isEmpty: function _isEmpty(value) { // summary: // Checks for whitespace return (this.trim ? /^\s*$/ : /^$/).test(value); // Boolean }, getErrorMessage: function getErrorMessage() { // summary: // Return an error message to show if appropriate // tags: // protected var invalid = this.invalidMessage == "$_unset_$" ? this.messages.invalidMessage : !this.invalidMessage ? this.promptMessage : this.invalidMessage; var missing = this.missingMessage == "$_unset_$" ? this.messages.missingMessage : !this.missingMessage ? invalid : this.missingMessage; return this.required && this._isEmpty(this.textbox.value) ? missing : invalid; // String }, getPromptMessage: function getPromptMessage() { // summary: // Return a hint message to show when widget is first focused // tags: // protected return this.promptMessage; // String }, _maskValidSubsetError: true, validate: function validate( /*Boolean*/ isFocused) { // summary: // Called by oninit, onblur, and onkeypress. // description: // Show missing or invalid messages if appropriate, and highlight textbox field. // tags: // protected var message = ""; var isValid = this.disabled || this.isValid(isFocused); if (isValid) { this._maskValidSubsetError = true; } var isEmpty = this._isEmpty(this.textbox.value); var isValidSubset = !isValid && isFocused && this._isValidSubset(); this._set("state", isValid ? "" : ((!this._hasBeenBlurred || isFocused) && isEmpty || isValidSubset) && (this._maskValidSubsetError || isValidSubset && !this._hasBeenBlurred && isFocused) ? "Incomplete" : "Error"); this.focusNode.setAttribute("aria-invalid", this.state == "Error" ? "true" : "false"); if (this.state == "Error") { this._maskValidSubsetError = isFocused && isValidSubset; // we want the error to show up after a blur and refocus message = this.getErrorMessage(isFocused); } else if (this.state == "Incomplete") { message = this.getPromptMessage(isFocused); // show the prompt whenever the value is not yet complete this._maskValidSubsetError = !this._hasBeenBlurred || isFocused; // no Incomplete warnings while focused } else if (isEmpty) { message = this.getPromptMessage(isFocused); // show the prompt whenever there's no error and no text } this.set("message", message); return isValid; }, displayMessage: function displayMessage( /*String*/ message) { // summary: // Overridable method to display validation errors/hints. // By default uses a tooltip. // tags: // extension if (message && this.focused) { Tooltip.show(message, this.domNode, this.tooltipPosition, !this.isLeftToRight()); } else { Tooltip.hide(this.domNode); } }, _refreshState: function _refreshState() { // Overrides TextBox._refreshState() if (this._created) { // should instead be this._started but that would require all programmatic ValidationTextBox instantiations to call startup() this.validate(this.focused); } this.inherited(arguments); }, //////////// INITIALIZATION METHODS /////////////////////////////////////// constructor: function constructor(params /*===== , srcNodeRef =====*/ ) { // summary: // Create the widget. // params: Object|null // Hash of initialization parameters for widget, including scalar values (like title, duration etc.) // and functions, typically callbacks like onClick. // The hash can contain any of the widget's properties, excluding read-only properties. // srcNodeRef: DOMNode|String? // If a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree. this.constraints = lang.clone(this.constraints); this.baseClass += ' dijitValidationTextBox'; }, startup: function startup() { this.inherited(arguments); this._refreshState(); // after all _set* methods have run }, _setConstraintsAttr: function _setConstraintsAttr( /*__Constraints*/ constraints) { if (!constraints.locale && this.lang) { constraints.locale = this.lang; } this._set("constraints", constraints); this._refreshState(); }, _setPatternAttr: function _setPatternAttr( /*String|Function*/ pattern) { this._set("pattern", pattern); // don't set on INPUT to avoid native HTML5 validation this._refreshState(); }, _computeRegexp: function _computeRegexp( /*__Constraints*/ constraints) { // summary: // Hook to get the current regExp and to compute the partial validation RE. var p = this.pattern; if (typeof p == "function") { p = p.call(this, constraints); } if (p != this._lastRegExp) { var partialre = ""; this._lastRegExp = p; // parse the regexp and produce a new regexp that matches valid subsets // if the regexp is .* then there's no use in matching subsets since everything is valid if (p != ".*") { p.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g, function (re) { switch (re.charAt(0)) { case '{': case '+': case '?': case '*': case '^': case '$': case '|': case '(': partialre += re; break; case ")": partialre += "|$)"; break; default: partialre += "(?:" + re + "|$)"; break; } }); } try { // this is needed for now since the above regexp parsing needs more test verification "".search(partialre); } catch (e) { // should never be here unless the original RE is bad or the parsing is bad partialre = this.pattern; console.warn('RegExp error in ' + this.declaredClass + ': ' + this.pattern); } // should never be here unless the original RE is bad or the parsing is bad this._partialre = "^(?:" + partialre + ")$"; } return p; }, postMixInProperties: function postMixInProperties() { this.inherited(arguments); this.messages = i18n.getLocalization("dijit.form", "validate", this.lang); this._setConstraintsAttr(this.constraints); // this needs to happen now (and later) due to codependency on _set*Attr calls attachPoints }, _setDisabledAttr: function _setDisabledAttr( /*Boolean*/ value) { this.inherited(arguments); // call FormValueWidget._setDisabledAttr() this._refreshState(); }, _setRequiredAttr: function _setRequiredAttr( /*Boolean*/ value) { this._set("required", value); this.focusNode.setAttribute("aria-required", value); this._refreshState(); }, _setMessageAttr: function _setMessageAttr( /*String*/ message) { this._set("message", message); this.displayMessage(message); }, reset: function reset() { // Overrides dijit/form/TextBox.reset() by also // hiding errors about partial matches this._maskValidSubsetError = true; this.inherited(arguments); }, _onBlur: function _onBlur() { // the message still exists but for back-compat, and to erase the tooltip // (if the message is being displayed as a tooltip), call displayMessage('') this.displayMessage(''); this.inherited(arguments); }, destroy: function destroy() { Tooltip.hide(this.domNode); // in case tooltip show when ValidationTextBox (or enclosing Dialog) destroyed this.inherited(arguments); } }); /*===== ValidationTextBox.__Constraints = { // locale: String // locale used for validation, picks up value from this widget's lang attribute // _flags_: anything // various flags passed to pattern function }; =====*/ return ValidationTextBox; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/_ButtonMixin.js": /*!*************************************************!*\ !*** ./node_modules/dijit/form/_ButtonMixin.js ***! \*************************************************/ /*! no static exports found */ /***/ function node_modulesDijitForm_ButtonMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // dom.setSelectable __webpack_require__( /*! dojo/has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! ../registry */ "./node_modules/dijit/registry.js") // registry.byNode ], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, dom, has, registry) { // module: // dijit/form/_ButtonMixin var ButtonMixin = declare("dijit.form._ButtonMixin" + (has("dojo-bidi") ? "_NoBidi" : ""), null, { // summary: // A mixin to add a thin standard API wrapper to a normal HTML button // description: // A label should always be specified (through innerHTML) or the label attribute. // // Attach points: // // - focusNode (required): this node receives focus // - valueNode (optional): this node's value gets submitted with FORM elements // - containerNode (optional): this node gets the innerHTML assignment for label // example: // | <button data-dojo-type="dijit/form/Button" onClick="...">Hello world</button> // example: // | var button1 = new Button({label: "hello world", onClick: foo}); // | dojo.body().appendChild(button1.domNode); // label: HTML String // Content to display in button. label: "", // type: [const] String // Type of button (submit, reset, button, checkbox, radio) type: "button", __onClick: function __onClick( /*Event*/ e) { // summary: // Internal function to divert the real click onto the hidden INPUT that has a native default action associated with it // type: // private e.stopPropagation(); e.preventDefault(); if (!this.disabled) { // cannot use on.emit since button default actions won't occur this.valueNode.click(e); } return false; }, _onClick: function _onClick( /*Event*/ e) { // summary: // Internal function to handle click actions if (this.disabled) { e.stopPropagation(); e.preventDefault(); return false; } if (this.onClick(e) === false) { e.preventDefault(); } var cancelled = e.defaultPrevented; // Signal Form/Dialog to submit/close. For 2.0, consider removing this code and instead making the Form/Dialog // listen for bubbled click events where evt.target.type == "submit" && !evt.defaultPrevented. if (!cancelled && this.type == "submit" && !(this.valueNode || this.focusNode).form) { for (var node = this.domNode; node.parentNode; node = node.parentNode) { var widget = registry.byNode(node); if (widget && typeof widget._onSubmit == "function") { widget._onSubmit(e); e.preventDefault(); // action has already occurred cancelled = true; break; } } } return !cancelled; }, postCreate: function postCreate() { this.inherited(arguments); dom.setSelectable(this.focusNode, false); }, onClick: function onClick() { // summary: // Callback for when button is clicked. // If type="submit", return true to perform submit, or false to cancel it. // type: // callback return true; // Boolean }, _setLabelAttr: function _setLabelAttr( /*String*/ content) { // summary: // Hook for set('label', ...) to work. // description: // Set the label (text) of the button; takes an HTML string. this._set("label", content); var labelNode = this.containerNode || this.focusNode; labelNode.innerHTML = content; this.onLabelSet(); }, onLabelSet: function onLabelSet() {} }); if (has("dojo-bidi")) { ButtonMixin = declare("dijit.form._ButtonMixin", ButtonMixin, { onLabelSet: function onLabelSet() { this.inherited(arguments); var labelNode = this.containerNode || this.focusNode; this.applyTextDir(labelNode); } }); } return ButtonMixin; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/_FormMixin.js": /*!***********************************************!*\ !*** ./node_modules/dijit/form/_FormMixin.js ***! \***********************************************/ /*! no static exports found */ /***/ function node_modulesDijitForm_FormMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.every array.filter array.forEach array.indexOf array.map __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.hitch lang.isArray __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/window */ "./node_modules/dojo/window.js") // winUtils.scrollIntoView ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, kernel, lang, on, winUtils) { // module: // dijit/form/_FormMixin return declare("dijit.form._FormMixin", null, { // summary: // Mixin for containers of form widgets (i.e. widgets that represent a single value // and can be children of a `<form>` node or `dijit/form/Form` widget) // description: // Can extract all the form widgets // values and combine them into a single javascript object, or alternately // take such an object and set the values for all the contained // form widgets /*===== // value: Object // Name/value hash for each child widget with a name and value. // Child widgets without names are not part of the hash. // // If there are multiple child widgets w/the same name, value is an array, // unless they are radio buttons in which case value is a scalar (since only // one radio button can be checked at a time). // // If a child widget's name is a dot separated list (like a.b.c.d), it's a nested structure. // // Example: // | { name: "John Smith", interests: ["sports", "movies"] } =====*/ // state: [readonly] String // Will be "Error" if one or more of the child widgets has an invalid value, // "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", // which indicates that the form is ready to be submitted. state: "", // TODO: // * Repeater // * better handling for arrays. Often form elements have names with [] like // * people[3].sex (for a list of people [{name: Bill, sex: M}, ...]) _getDescendantFormWidgets: function _getDescendantFormWidgets( /*dijit/_WidgetBase[]?*/ children) { // summary: // Returns all form widget descendants, searching through non-form child widgets like BorderContainer var res = []; array.forEach(children || this.getChildren(), function (child) { if ("value" in child) { res.push(child); } else { res = res.concat(this._getDescendantFormWidgets(child.getChildren())); } }, this); return res; }, reset: function reset() { array.forEach(this._getDescendantFormWidgets(), function (widget) { if (widget.reset) { widget.reset(); } }); }, validate: function validate() { // summary: // returns if the form is valid - same as isValid - but // provides a few additional (ui-specific) features: // // 1. it will highlight any sub-widgets that are not valid // 2. it will call focus() on the first invalid sub-widget var didFocus = false; return array.every(array.map(this._getDescendantFormWidgets(), function (widget) { // Need to set this so that "required" widgets get their // state set. widget._hasBeenBlurred = true; var valid = widget.disabled || !widget.validate || widget.validate(); if (!valid && !didFocus) { // Set focus of the first non-valid widget winUtils.scrollIntoView(widget.containerNode || widget.domNode); widget.focus(); didFocus = true; } return valid; }), function (item) { return item; }); }, setValues: function setValues(val) { kernel.deprecated(this.declaredClass + "::setValues() is deprecated. Use set('value', val) instead.", "", "2.0"); return this.set('value', val); }, _setValueAttr: function _setValueAttr( /*Object*/ obj) { // summary: // Fill in form values from according to an Object (in the format returned by get('value')) // generate map from name --> [list of widgets with that name] var map = {}; array.forEach(this._getDescendantFormWidgets(), function (widget) { if (!widget.name) { return; } var entry = map[widget.name] || (map[widget.name] = []); entry.push(widget); }); for (var name in map) { if (!map.hasOwnProperty(name)) { continue; } var widgets = map[name], // array of widgets w/this name values = lang.getObject(name, false, obj); // list of values for those widgets if (values === undefined) { continue; } values = [].concat(values); if (typeof widgets[0].checked == 'boolean') { // for checkbox/radio, values is a list of which widgets should be checked array.forEach(widgets, function (w) { w.set('value', array.indexOf(values, w._get('value')) != -1); }); } else if (widgets[0].multiple) { // it takes an array (e.g. multi-select) widgets[0].set('value', values); } else { // otherwise, values is a list of values to be assigned sequentially to each widget array.forEach(widgets, function (w, i) { w.set('value', values[i]); }); } } /*** * TODO: code for plain input boxes (this shouldn't run for inputs that are part of widgets) array.forEach(this.containerNode.elements, function(element){ if(element.name == ''){return}; // like "continue" var namePath = element.name.split("."); var myObj=obj; var name=namePath[namePath.length-1]; for(var j=1,len2=namePath.length;j<len2;++j){ var p=namePath[j - 1]; // repeater support block var nameA=p.split("["); if(nameA.length > 1){ if(typeof(myObj[nameA[0]]) == "undefined"){ myObj[nameA[0]]=[ ]; } // if nameIndex=parseInt(nameA[1]); if(typeof(myObj[nameA[0]][nameIndex]) == "undefined"){ myObj[nameA[0]][nameIndex] = { }; } myObj=myObj[nameA[0]][nameIndex]; continue; } // repeater support ends if(typeof(myObj[p]) == "undefined"){ myObj=undefined; break; }; myObj=myObj[p]; } if(typeof(myObj) == "undefined"){ return; // like "continue" } if(typeof(myObj[name]) == "undefined" && this.ignoreNullValues){ return; // like "continue" } // TODO: widget values (just call set('value', ...) on the widget) // TODO: maybe should call dojo.getNodeProp() instead switch(element.type){ case "checkbox": element.checked = (name in myObj) && array.some(myObj[name], function(val){ return val == element.value; }); break; case "radio": element.checked = (name in myObj) && myObj[name] == element.value; break; case "select-multiple": element.selectedIndex=-1; array.forEach(element.options, function(option){ option.selected = array.some(myObj[name], function(val){ return option.value == val; }); }); break; case "select-one": element.selectedIndex="0"; array.forEach(element.options, function(option){ option.selected = option.value == myObj[name]; }); break; case "hidden": case "text": case "textarea": case "password": element.value = myObj[name] || ""; break; } }); */ // Note: no need to call this._set("value", ...) as the child updates will trigger onChange events // which I am monitoring. }, getValues: function getValues() { kernel.deprecated(this.declaredClass + "::getValues() is deprecated. Use get('value') instead.", "", "2.0"); return this.get('value'); }, _getValueAttr: function _getValueAttr() { // summary: // Returns Object representing form values. See description of `value` for details. // description: // The value is updated into this.value every time a child has an onChange event, // so in the common case this function could just return this.value. However, // that wouldn't work when: // // 1. User presses return key to submit a form. That doesn't fire an onchange event, // and even if it did it would come too late due to the defer(...) in _handleOnChange() // // 2. app for some reason calls this.get("value") while the user is typing into a // form field. Not sure if that case needs to be supported or not. // get widget values var obj = {}; array.forEach(this._getDescendantFormWidgets(), function (widget) { var name = widget.name; if (!name || widget.disabled) { return; } // Single value widget (checkbox, radio, or plain <input> type widget) var value = widget.get('value'); // Store widget's value(s) as a scalar, except for checkboxes which are automatically arrays if (typeof widget.checked == 'boolean') { if (/Radio/.test(widget.declaredClass)) { // radio button if (value !== false) { lang.setObject(name, value, obj); } else { // give radio widgets a default of null value = lang.getObject(name, false, obj); if (value === undefined) { lang.setObject(name, null, obj); } } } else { // checkbox/toggle button var ary = lang.getObject(name, false, obj); if (!ary) { ary = []; lang.setObject(name, ary, obj); } if (value !== false) { ary.push(value); } } } else { var prev = lang.getObject(name, false, obj); if (typeof prev != "undefined") { if (lang.isArray(prev)) { prev.push(value); } else { lang.setObject(name, [prev, value], obj); } } else { // unique name lang.setObject(name, value, obj); } } }); /*** * code for plain input boxes (see also domForm.formToObject, can we use that instead of this code? * but it doesn't understand [] notation, presumably) var obj = { }; array.forEach(this.containerNode.elements, function(elm){ if(!elm.name) { return; // like "continue" } var namePath = elm.name.split("."); var myObj=obj; var name=namePath[namePath.length-1]; for(var j=1,len2=namePath.length;j<len2;++j){ var nameIndex = null; var p=namePath[j - 1]; var nameA=p.split("["); if(nameA.length > 1){ if(typeof(myObj[nameA[0]]) == "undefined"){ myObj[nameA[0]]=[ ]; } // if nameIndex=parseInt(nameA[1]); if(typeof(myObj[nameA[0]][nameIndex]) == "undefined"){ myObj[nameA[0]][nameIndex] = { }; } }else if(typeof(myObj[nameA[0]]) == "undefined"){ myObj[nameA[0]] = { } } // if if(nameA.length == 1){ myObj=myObj[nameA[0]]; }else{ myObj=myObj[nameA[0]][nameIndex]; } // if } // for if((elm.type != "select-multiple" && elm.type != "checkbox" && elm.type != "radio") || (elm.type == "radio" && elm.checked)){ if(name == name.split("[")[0]){ myObj[name]=elm.value; }else{ // can not set value when there is no name } }else if(elm.type == "checkbox" && elm.checked){ if(typeof(myObj[name]) == 'undefined'){ myObj[name]=[ ]; } myObj[name].push(elm.value); }else if(elm.type == "select-multiple"){ if(typeof(myObj[name]) == 'undefined'){ myObj[name]=[ ]; } for(var jdx=0,len3=elm.options.length; jdx<len3; ++jdx){ if(elm.options[jdx].selected){ myObj[name].push(elm.options[jdx].value); } } } // if name=undefined; }); // forEach ***/ return obj; }, isValid: function isValid() { // summary: // Returns true if all of the widgets are valid. // Deprecated, will be removed in 2.0. Use get("state") instead. return this.state == ""; }, onValidStateChange: function onValidStateChange() {// summary: // Stub function to connect to if you want to do something // (like disable/enable a submit button) when the valid // state changes on the form as a whole. // // Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. }, _getState: function _getState() { // summary: // Compute what this.state should be based on state of children var states = array.map(this._descendants, function (w) { return w.get("state") || ""; }); return array.indexOf(states, "Error") >= 0 ? "Error" : array.indexOf(states, "Incomplete") >= 0 ? "Incomplete" : ""; }, disconnectChildren: function disconnectChildren() {// summary: // Deprecated method. Applications no longer need to call this. Remove for 2.0. }, connectChildren: function connectChildren( /*Boolean*/ inStartup) { // summary: // You can call this function directly, ex. in the event that you // programmatically add a widget to the form *after* the form has been // initialized. // TODO: rename for 2.0 this._descendants = this._getDescendantFormWidgets(); // To get notifications from children they need to be started. Children didn't used to need to be started, // so for back-compat, start them here array.forEach(this._descendants, function (child) { if (!child._started) { child.startup(); } }); if (!inStartup) { this._onChildChange(); } }, _onChildChange: function _onChildChange( /*String*/ attr) { // summary: // Called when child's value or disabled state changes // The unit tests expect state update to be synchronous, so update it immediately. if (!attr || attr == "state" || attr == "disabled") { this._set("state", this._getState()); } // Use defer() to collapse value changes in multiple children into a single // update to my value. Multiple updates will occur on: // 1. Form.set() // 2. Form.reset() // 3. user selecting a radio button (which will de-select another radio button, // causing two onChange events) if (!attr || attr == "value" || attr == "disabled" || attr == "checked") { if (this._onChangeDelayTimer) { this._onChangeDelayTimer.remove(); } this._onChangeDelayTimer = this.defer(function () { delete this._onChangeDelayTimer; this._set("value", this.get("value")); }, 10); } }, startup: function startup() { this.inherited(arguments); // Set initial this.value and this.state. Don't emit watch() notifications. this._descendants = this._getDescendantFormWidgets(); this.value = this.get("value"); this.state = this._getState(); // Initialize value and valid/invalid state tracking. var self = this; this.own(on(this.containerNode, "attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked", function (evt) { if (evt.target == self.domNode) { return; // ignore events that I fire on myself because my children changed } self._onChildChange(evt.type.replace("attrmodified-", "")); })); // Make state change call onValidStateChange(), will be removed in 2.0 this.watch("state", function (attr, oldVal, newVal) { this.onValidStateChange(newVal == ""); }); }, destroy: function destroy() { this.inherited(arguments); } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/_FormValueMixin.js": /*!****************************************************!*\ !*** ./node_modules/dijit/form/_FormValueMixin.js ***! \****************************************************/ /*! no static exports found */ /***/ function node_modulesDijitForm_FormValueMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), // domAttr.set __webpack_require__( /*! dojo/keys */ "./node_modules/dojo/keys.js"), // keys.ESCAPE __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("webkit") __webpack_require__( /*! ./_FormWidgetMixin */ "./node_modules/dijit/form/_FormWidgetMixin.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, domAttr, keys, lang, on, has, _FormWidgetMixin) { // module: // dijit/form/_FormValueMixin return declare("dijit.form._FormValueMixin", _FormWidgetMixin, { // summary: // Mixin for widgets corresponding to native HTML elements such as `<input>` or `<select>` // that have user changeable values. // description: // Each _FormValueMixin represents a single input value, and has a (possibly hidden) `<input>` element, // to which it serializes it's input value, so that form submission (either normal submission or via FormBind?) // works as expected. // readOnly: Boolean // Should this widget respond to user input? // In markup, this is specified as "readOnly". // Similar to disabled except readOnly form values are submitted. readOnly: false, _setReadOnlyAttr: function _setReadOnlyAttr( /*Boolean*/ value) { // IE has a Caret Browsing mode (hit F7 to activate) where disabled textboxes can be modified // focusNode enforced readonly if currently disabled to avoid this issue. if (has('trident') && 'disabled' in this) { domAttr.set(this.focusNode, 'readOnly', value || this.disabled); } else { domAttr.set(this.focusNode, 'readOnly', value); } this._set("readOnly", value); }, postCreate: function postCreate() { this.inherited(arguments); // Update our reset value if it hasn't yet been set (because this.set() // is only called when there *is* a value) if (this._resetValue === undefined) { this._lastValueReported = this._resetValue = this.value; } }, _setValueAttr: function _setValueAttr( /*anything*/ newValue, /*Boolean?*/ priorityChange) { // summary: // Hook so set('value', value) works. // description: // Sets the value of the widget. // If the value has changed, then fire onChange event, unless priorityChange // is specified as null (or false?) this._handleOnChange(newValue, priorityChange); }, _handleOnChange: function _handleOnChange( /*anything*/ newValue, /*Boolean?*/ priorityChange) { // summary: // Called when the value of the widget has changed. Saves the new value in this.value, // and calls onChange() if appropriate. See _FormWidget._handleOnChange() for details. this._set("value", newValue); this.inherited(arguments); }, undo: function undo() { // summary: // Restore the value to the last value passed to onChange this._setValueAttr(this._lastValueReported, false); }, reset: function reset() { // summary: // Reset the widget's value to what it was at initialization time this._hasBeenBlurred = false; this._setValueAttr(this._resetValue, true); } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/_FormValueWidget.js": /*!*****************************************************!*\ !*** ./node_modules/dijit/form/_FormValueWidget.js ***! \*****************************************************/ /*! no static exports found */ /***/ function node_modulesDijitForm_FormValueWidgetJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie") __webpack_require__( /*! ./_FormWidget */ "./node_modules/dijit/form/_FormWidget.js"), __webpack_require__( /*! ./_FormValueMixin */ "./node_modules/dijit/form/_FormValueMixin.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, has, _FormWidget, _FormValueMixin) { // module: // dijit/form/_FormValueWidget return declare("dijit.form._FormValueWidget", [_FormWidget, _FormValueMixin], { // summary: // Base class for widgets corresponding to native HTML elements such as `<input>` or `<select>` // that have user changeable values. // description: // Each _FormValueWidget represents a single input value, and has a (possibly hidden) `<input>` element, // to which it serializes it's input value, so that form submission (either normal submission or via FormBind?) // works as expected. // Don't attempt to mixin the 'type', 'name' attributes here programatically -- they must be declared // directly in the template as read by the parser in order to function. IE is known to specifically // require the 'name' attribute at element creation time. See #8484, #8660. _layoutHackIE7: function _layoutHackIE7() { // summary: // Work around table sizing bugs on IE7 by forcing redraw if (has("ie") == 7) { // fix IE7 layout bug when the widget is scrolled out of sight var domNode = this.domNode; var parent = domNode.parentNode; var pingNode = domNode.firstChild || domNode; // target node most unlikely to have a custom filter var origFilter = pingNode.style.filter; // save custom filter, most likely nothing var _this = this; while (parent && parent.clientHeight == 0) { // search for parents that haven't rendered yet (function ping() { var disconnectHandle = _this.connect(parent, "onscroll", function () { _this.disconnect(disconnectHandle); // only call once pingNode.style.filter = new Date().getMilliseconds(); // set to anything that's unique _this.defer(function () { pingNode.style.filter = origFilter; }); // restore custom filter, if any }); })(); parent = parent.parentNode; } } } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/_FormWidget.js": /*!************************************************!*\ !*** ./node_modules/dijit/form/_FormWidget.js ***! \************************************************/ /*! no static exports found */ /***/ function node_modulesDijitForm_FormWidgetJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("dijit-legacy-requires"), has("msapp") __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/ready */ "./node_modules/dojo/ready.js"), __webpack_require__( /*! ../_Widget */ "./node_modules/dijit/_Widget.js"), __webpack_require__( /*! ../_CssStateMixin */ "./node_modules/dijit/_CssStateMixin.js"), __webpack_require__( /*! ../_TemplatedMixin */ "./node_modules/dijit/_TemplatedMixin.js"), __webpack_require__( /*! ./_FormWidgetMixin */ "./node_modules/dijit/form/_FormWidgetMixin.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, has, kernel, ready, _Widget, _CssStateMixin, _TemplatedMixin, _FormWidgetMixin) { // module: // dijit/form/_FormWidget // Back compat w/1.6, remove for 2.0 if (has("dijit-legacy-requires")) { ready(0, function () { var requires = ["dijit/form/_FormValueWidget"]; require(requires); // use indirection so modules not rolled into a build }); } return declare("dijit.form._FormWidget", [_Widget, _TemplatedMixin, _CssStateMixin, _FormWidgetMixin], { // summary: // Base class for widgets corresponding to native HTML elements such as `<checkbox>` or `<button>`, // which can be children of a `<form>` node or a `dijit/form/Form` widget. // // description: // Represents a single HTML element. // All these widgets should have these attributes just like native HTML input elements. // You can set them during widget construction or afterwards, via `dijit/_WidgetBase.set()`. // // They also share some common methods. setDisabled: function setDisabled( /*Boolean*/ disabled) { // summary: // Deprecated. Use set('disabled', ...) instead. kernel.deprecated("setDisabled(" + disabled + ") is deprecated. Use set('disabled'," + disabled + ") instead.", "", "2.0"); this.set('disabled', disabled); }, setValue: function setValue( /*String*/ value) { // summary: // Deprecated. Use set('value', ...) instead. kernel.deprecated("dijit.form._FormWidget:setValue(" + value + ") is deprecated. Use set('value'," + value + ") instead.", "", "2.0"); this.set('value', value); }, getValue: function getValue() { // summary: // Deprecated. Use get('value') instead. kernel.deprecated(this.declaredClass + "::getValue() is deprecated. Use get('value') instead.", "", "2.0"); return this.get('value'); }, postMixInProperties: function postMixInProperties() { // Setup name=foo string to be referenced from the template (but only if a name has been specified). // Unfortunately we can't use _setNameAttr to set the name in IE due to IE limitations, see #8484, #8660. // But when IE6 and IE7 are desupported, then we probably don't need this anymore, so should remove it in 2.0. // Also, don't do this for Windows 8 Store Apps because it causes a security exception (see #16452). // Regarding escaping, see heading "Attribute values" in // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2 this.nameAttrSetting = this.name && !has("msapp") ? 'name="' + this.name.replace(/"/g, """) + '"' : ''; this.inherited(arguments); } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/_FormWidgetMixin.js": /*!*****************************************************!*\ !*** ./node_modules/dijit/form/_FormWidgetMixin.js ***! \*****************************************************/ /*! no static exports found */ /***/ function node_modulesDijitForm_FormWidgetMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), // domAttr.set __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.get __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.hitch lang.isArray __webpack_require__( /*! dojo/mouse */ "./node_modules/dojo/mouse.js"), // mouse.isLeft __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("webkit") __webpack_require__( /*! dojo/window */ "./node_modules/dojo/window.js"), // winUtils.scrollIntoView __webpack_require__( /*! ../a11y */ "./node_modules/dijit/a11y.js") // a11y.hasDefaultTabStop ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, domAttr, domStyle, lang, mouse, on, has, winUtils, a11y) { // module: // dijit/form/_FormWidgetMixin return declare("dijit.form._FormWidgetMixin", null, { // summary: // Mixin for widgets corresponding to native HTML elements such as `<checkbox>` or `<button>`, // which can be children of a `<form>` node or a `dijit/form/Form` widget. // // description: // Represents a single HTML element. // All these widgets should have these attributes just like native HTML input elements. // You can set them during widget construction or afterwards, via `dijit/_WidgetBase.set()`. // // They also share some common methods. // name: [const] String // Name used when submitting form; same as "name" attribute or plain HTML elements name: "", // alt: String // Corresponds to the native HTML `<input>` element's attribute. alt: "", // value: String // Corresponds to the native HTML `<input>` element's attribute. value: "", // type: [const] String // Corresponds to the native HTML `<input>` element's attribute. type: "text", // type: String // Apply aria-label in markup to the widget's focusNode "aria-label": "focusNode", // tabIndex: String // Order fields are traversed when user hits the tab key tabIndex: "0", _setTabIndexAttr: "focusNode", // force copy even when tabIndex default value, needed since Button is <span> // disabled: Boolean // Should this widget respond to user input? // In markup, this is specified as "disabled='disabled'", or just "disabled". disabled: false, // intermediateChanges: Boolean // Fires onChange for each value change or only on demand intermediateChanges: false, // scrollOnFocus: Boolean // On focus, should this widget scroll into view? scrollOnFocus: true, // Override _WidgetBase mapping id to this.domNode, needs to be on focusNode so <label> etc. // works with screen reader _setIdAttr: "focusNode", _setDisabledAttr: function _setDisabledAttr( /*Boolean*/ value) { this._set("disabled", value); // Set disabled property if focusNode is an <input>, but aria-disabled attribute if focusNode is a <span>. // Can't use "disabled" in this.focusNode as a test because on IE, that's true for all nodes. if (/^(button|input|select|textarea|optgroup|option|fieldset)$/i.test(this.focusNode.tagName)) { domAttr.set(this.focusNode, 'disabled', value); // IE has a Caret Browsing mode (hit F7 to activate) where disabled textboxes can be modified // textboxes marked readonly if disabled to avoid this issue. if (has('trident') && 'readOnly' in this) { domAttr.set(this.focusNode, 'readonly', value || this.readOnly); } } else { this.focusNode.setAttribute("aria-disabled", value ? "true" : "false"); } // And also set disabled on the hidden <input> node if (this.valueNode) { domAttr.set(this.valueNode, 'disabled', value); } if (value) { // reset these, because after the domNode is disabled, we can no longer receive // mouse related events, see #4200 this._set("hovering", false); this._set("active", false); // clear tab stop(s) on this widget's focusable node(s) (ComboBox has two focusable nodes) var attachPointNames = "tabIndex" in this.attributeMap ? this.attributeMap.tabIndex : "_setTabIndexAttr" in this ? this._setTabIndexAttr : "focusNode"; array.forEach(lang.isArray(attachPointNames) ? attachPointNames : [attachPointNames], function (attachPointName) { var node = this[attachPointName]; // complex code because tabIndex=-1 on a <div> doesn't work on FF if (has("webkit") || a11y.hasDefaultTabStop(node)) { // see #11064 about webkit bug node.setAttribute('tabIndex', "-1"); } else { node.removeAttribute('tabIndex'); } }, this); } else { if (this.tabIndex != "") { this.set('tabIndex', this.tabIndex); } } }, _onFocus: function _onFocus( /*String*/ by) { // If user clicks on the widget, even if the mouse is released outside of it, // this widget's focusNode should get focus (to mimic native browser behavior). // Browsers often need help to make sure the focus via mouse actually gets to the focusNode. // TODO: consider removing all of this for 2.0 or sooner, see #16622 etc. if (by == "mouse" && this.isFocusable()) { // IE exhibits strange scrolling behavior when refocusing a node so only do it when !focused. var focusHandle = this.own(on(this.focusNode, "focus", function () { mouseUpHandle.remove(); focusHandle.remove(); }))[0]; // Set a global event to handle mouseup, so it fires properly // even if the cursor leaves this.domNode before the mouse up event. var event = has("pointer-events") ? "pointerup" : false ? undefined : has("touch-events") ? "touchend, mouseup" : // seems like overkill but see #16622, #16725 "mouseup"; var mouseUpHandle = this.own(on(this.ownerDocumentBody, event, lang.hitch(this, function (evt) { mouseUpHandle.remove(); focusHandle.remove(); // if here, then the mousedown did not focus the focusNode as the default action if (this.focused) { if (evt.type == "touchend") { this.defer("focus"); // native focus hasn't occurred yet } else { this.focus(); // native focus already occurred on mousedown } } })))[0]; } if (this.scrollOnFocus) { this.defer(function () { winUtils.scrollIntoView(this.domNode); }); // without defer, the input caret position can change on mouse click } this.inherited(arguments); }, isFocusable: function isFocusable() { // summary: // Tells if this widget is focusable or not. Used internally by dijit. // tags: // protected return !this.disabled && this.focusNode && domStyle.get(this.domNode, "display") != "none"; }, focus: function focus() { // summary: // Put focus on this widget if (!this.disabled && this.focusNode.focus) { try { this.focusNode.focus(); } catch (e) {} /*squelch errors from hidden nodes*/ } }, compare: function compare( /*anything*/ val1, /*anything*/ val2) { // summary: // Compare 2 values (as returned by get('value') for this widget). // tags: // protected if (typeof val1 == "number" && typeof val2 == "number") { return isNaN(val1) && isNaN(val2) ? 0 : val1 - val2; } else if (val1 > val2) { return 1; } else if (val1 < val2) { return -1; } else { return 0; } }, onChange: function onChange() {// summary: // Callback when this widget's value is changed. // tags: // callback }, // _onChangeActive: [private] Boolean // Indicates that changes to the value should call onChange() callback. // This is false during widget initialization, to avoid calling onChange() // when the initial value is set. _onChangeActive: false, _handleOnChange: function _handleOnChange( /*anything*/ newValue, /*Boolean?*/ priorityChange) { // summary: // Called when the value of the widget is set. Calls onChange() if appropriate // newValue: // the new value // priorityChange: // For a slider, for example, dragging the slider is priorityChange==false, // but on mouse up, it's priorityChange==true. If intermediateChanges==false, // onChange is only called form priorityChange=true events. // tags: // private if (this._lastValueReported == undefined && (priorityChange === null || !this._onChangeActive)) { // this block executes not for a change, but during initialization, // and is used to store away the original value (or for ToggleButton, the original checked state) this._resetValue = this._lastValueReported = newValue; } this._pendingOnChange = this._pendingOnChange || typeof newValue != typeof this._lastValueReported || this.compare(newValue, this._lastValueReported) != 0; if ((this.intermediateChanges || priorityChange || priorityChange === undefined) && this._pendingOnChange) { this._lastValueReported = newValue; this._pendingOnChange = false; if (this._onChangeActive) { if (this._onChangeHandle) { this._onChangeHandle.remove(); } // defer allows hidden value processing to run and // also the onChange handler can safely adjust focus, etc this._onChangeHandle = this.defer(function () { this._onChangeHandle = null; this.onChange(newValue); }); // try to collapse multiple onChange's fired faster than can be processed } } }, create: function create() { // Overrides _Widget.create() this.inherited(arguments); this._onChangeActive = true; }, destroy: function destroy() { if (this._onChangeHandle) { // destroy called before last onChange has fired this._onChangeHandle.remove(); this.onChange(this._lastValueReported); } this.inherited(arguments); } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/_TextBoxMixin.js": /*!**************************************************!*\ !*** ./node_modules/dijit/form/_TextBoxMixin.js ***! \**************************************************/ /*! no static exports found */ /***/ function node_modulesDijitForm_TextBoxMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // dom.byId __webpack_require__( /*! dojo/sniff */ "./node_modules/dojo/sniff.js"), // has("ie"), has("dojo-bidi") __webpack_require__( /*! dojo/keys */ "./node_modules/dojo/keys.js"), // keys.ALT keys.CAPS_LOCK keys.CTRL keys.META keys.SHIFT __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.mixin __webpack_require__( /*! dojo/on */ "./node_modules/dojo/on.js"), // on __webpack_require__( /*! ../main */ "./node_modules/dijit/main.js") // for exporting dijit._setSelectionRange, dijit.selectInputText ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, dom, has, keys, lang, on, dijit) { // module: // dijit/form/_TextBoxMixin var _TextBoxMixin = declare("dijit.form._TextBoxMixin" + (has("dojo-bidi") ? "_NoBidi" : ""), null, { // summary: // A mixin for textbox form input widgets // trim: Boolean // Removes leading and trailing whitespace if true. Default is false. trim: false, // uppercase: Boolean // Converts all characters to uppercase if true. Default is false. uppercase: false, // lowercase: Boolean // Converts all characters to lowercase if true. Default is false. lowercase: false, // propercase: Boolean // Converts the first character of each word to uppercase if true. propercase: false, // maxLength: String // HTML INPUT tag maxLength declaration. maxLength: "", // selectOnClick: [const] Boolean // If true, all text will be selected when focused with mouse selectOnClick: false, // placeHolder: String // Defines a hint to help users fill out the input field (as defined in HTML 5). // This should only contain plain text (no html markup). placeHolder: "", _getValueAttr: function _getValueAttr() { // summary: // Hook so get('value') works as we like. // description: // For `dijit/form/TextBox` this basically returns the value of the `<input>`. // // For `dijit/form/MappedTextBox` subclasses, which have both // a "displayed value" and a separate "submit value", // This treats the "displayed value" as the master value, computing the // submit value from it via this.parse(). return this.parse(this.get('displayedValue'), this.constraints); }, _setValueAttr: function _setValueAttr(value, /*Boolean?*/ priorityChange, /*String?*/ formattedValue) { // summary: // Hook so set('value', ...) works. // // description: // Sets the value of the widget to "value" which can be of // any type as determined by the widget. // // value: // The visual element value is also set to a corresponding, // but not necessarily the same, value. // // formattedValue: // If specified, used to set the visual element value, // otherwise a computed visual value is used. // // priorityChange: // If true, an onChange event is fired immediately instead of // waiting for the next blur event. var filteredValue; if (value !== undefined) { // TODO: this is calling filter() on both the display value and the actual value. // I added a comment to the filter() definition about this, but it should be changed. filteredValue = this.filter(value); if (typeof formattedValue != "string") { if (filteredValue !== null && (typeof filteredValue != "number" || !isNaN(filteredValue))) { formattedValue = this.filter(this.format(filteredValue, this.constraints)); } else { formattedValue = ''; } // Ensure the filtered value does not change after being formatted. See track #17955. // // This check is only applied when the formatted value is not specified by the caller in order to allow the // behavior to be overriden. This is needed whenever value synonyms cannot be determined using parse/compare. For // example, dijit/form/FilteringSelect determines the formatted value asynchronously and applies it using a // callback to this method. // // TODO: Should developers be warned that they broke the round trip on format? if (this.compare(filteredValue, this.filter(this.parse(formattedValue, this.constraints))) != 0) { formattedValue = null; } } } if (formattedValue != null /* and !undefined */ && (typeof formattedValue != "number" || !isNaN(formattedValue)) && this.textbox.value != formattedValue) { this.textbox.value = formattedValue; this._set("displayedValue", this.get("displayedValue")); } this.inherited(arguments, [filteredValue, priorityChange]); }, // displayedValue: String // For subclasses like ComboBox where the displayed value // (ex: Kentucky) and the serialized value (ex: KY) are different, // this represents the displayed value. // // Setting 'displayedValue' through set('displayedValue', ...) // updates 'value', and vice-versa. Otherwise 'value' is updated // from 'displayedValue' periodically, like onBlur etc. // // TODO: move declaration to MappedTextBox? // Problem is that ComboBox references displayedValue, // for benefit of FilteringSelect. displayedValue: "", _getDisplayedValueAttr: function _getDisplayedValueAttr() { // summary: // Hook so get('displayedValue') works. // description: // Returns the displayed value (what the user sees on the screen), // after filtering (ie, trimming spaces etc.). // // For some subclasses of TextBox (like ComboBox), the displayed value // is different from the serialized value that's actually // sent to the server (see `dijit/form/ValidationTextBox.serialize()`) // TODO: maybe we should update this.displayedValue on every keystroke so that we don't need // this method // TODO: this isn't really the displayed value when the user is typing return this.filter(this.textbox.value); }, _setDisplayedValueAttr: function _setDisplayedValueAttr( /*String*/ value) { // summary: // Hook so set('displayedValue', ...) works. // description: // Sets the value of the visual element to the string "value". // The widget value is also set to a corresponding, // but not necessarily the same, value. if (value == null /* or undefined */ ) { value = ''; } else if (typeof value != "string") { value = String(value); } this.textbox.value = value; // sets the serialized value to something corresponding to specified displayedValue // (if possible), and also updates the textbox.value, for example converting "123" // to "123.00" this._setValueAttr(this.get('value'), undefined); this._set("displayedValue", this.get('displayedValue')); }, format: function format(value /*=====, constraints =====*/ ) { // summary: // Replaceable function to convert a value to a properly formatted string. // value: String // constraints: Object // tags: // protected extension return value == null /* or undefined */ ? "" : value.toString ? value.toString() : value; }, parse: function parse(value /*=====, constraints =====*/ ) { // summary: // Replaceable function to convert a formatted string to a value // value: String // constraints: Object // tags: // protected extension return value; // String }, _refreshState: function _refreshState() {// summary: // After the user types some characters, etc., this method is // called to check the field for validity etc. The base method // in `dijit/form/TextBox` does nothing, but subclasses override. // tags: // protected }, onInput: function onInput() {// summary: // Connect to this function to receive notifications of various user data-input events. // Return false to cancel the event and prevent it from being processed. // Note that although for historical reasons this method is called `onInput()`, it doesn't // correspond to the standard DOM "input" event, because it occurs before the input has been processed. // event: // keydown | keypress | cut | paste | compositionend // tags: // callback }, _onInput: function _onInput( /*Event*/ evt) { // summary: // Called AFTER the input event has happened and this.textbox.value has new value. this._lastInputEventValue = this.textbox.value; // For Combobox, this needs to be called w/the keydown/keypress event that was passed to onInput(). // As a backup, use the "input" event itself. this._processInput(this._lastInputProducingEvent || evt); delete this._lastInputProducingEvent; if (this.intermediateChanges) { this._handleOnChange(this.get('value'), false); } }, _processInput: function _processInput() { // summary: // Default action handler for user input events. // Called after the "input" event (i.e. after this.textbox.value has been updated), // but `evt` is the keydown/keypress/etc. event that triggered the "input" event. // tags: // protected this._refreshState(); // In case someone is watch()'ing for changes to displayedValue this._set("displayedValue", this.get("displayedValue")); }, postCreate: function postCreate() { // setting the value here is needed since value="" in the template causes "undefined" // and setting in the DOM (instead of the JS object) helps with form reset actions this.textbox.setAttribute("value", this.textbox.value); // DOM and JS values should be the same this.inherited(arguments); // normalize input events to reduce spurious event processing // keydown: do not forward modifier keys // set charOrCode to numeric keycode // keypress: do not forward numeric charOrCode keys (already sent through onkeydown) // paste, cut, compositionend: set charOrCode to 229 (IME) function handleEvent(e) { var charOrCode; // Filter out keydown events that will be followed by keypress events. Note that chrome/android // w/word suggestion has keydown/229 events on typing with no corresponding keypress events. if (e.type == "keydown" && e.keyCode != 229) { charOrCode = e.keyCode; switch (charOrCode) { // ignore state keys case keys.SHIFT: case keys.ALT: case keys.CTRL: case keys.META: case keys.CAPS_LOCK: case keys.NUM_LOCK: case keys.SCROLL_LOCK: return; } if (!e.ctrlKey && !e.metaKey && !e.altKey) { // no modifiers switch (charOrCode) { // ignore location keys case keys.NUMPAD_0: case keys.NUMPAD_1: case keys.NUMPAD_2: case keys.NUMPAD_3: case keys.NUMPAD_4: case keys.NUMPAD_5: case keys.NUMPAD_6: case keys.NUMPAD_7: case keys.NUMPAD_8: case keys.NUMPAD_9: case keys.NUMPAD_MULTIPLY: case keys.NUMPAD_PLUS: case keys.NUMPAD_ENTER: case keys.NUMPAD_MINUS: case keys.NUMPAD_PERIOD: case keys.NUMPAD_DIVIDE: return; } if (charOrCode >= 65 && charOrCode <= 90 || charOrCode >= 48 && charOrCode <= 57 || charOrCode == keys.SPACE) { return; // keypress will handle simple non-modified printable keys } var named = false; for (var i in keys) { if (keys[i] === e.keyCode) { named = true; break; } } if (!named) { return; } // only allow named ones through } } charOrCode = e.charCode >= 32 ? String.fromCharCode(e.charCode) : e.charCode; if (!charOrCode) { charOrCode = e.keyCode >= 65 && e.keyCode <= 90 || e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode == keys.SPACE ? String.fromCharCode(e.keyCode) : e.keyCode; } if (!charOrCode) { charOrCode = 229; // IME } if (e.type == "keypress") { if (typeof charOrCode != "string") { return; } if (charOrCode >= 'a' && charOrCode <= 'z' || charOrCode >= 'A' && charOrCode <= 'Z' || charOrCode >= '0' && charOrCode <= '9' || charOrCode === ' ') { if (e.ctrlKey || e.metaKey || e.altKey) { return; } // can only be stopped reliably in keydown } } // create fake event to set charOrCode and to know if preventDefault() was called var faux = { faux: true }, attr; for (attr in e) { if (!/^(layer[XY]|returnValue|keyLocation)$/.test(attr)) { // prevent WebKit warnings var v = e[attr]; if (typeof v != "function" && typeof v != "undefined") { faux[attr] = v; } } } lang.mixin(faux, { charOrCode: charOrCode, _wasConsumed: false, preventDefault: function preventDefault() { faux._wasConsumed = true; e.preventDefault(); }, stopPropagation: function stopPropagation() { e.stopPropagation(); } }); this._lastInputProducingEvent = faux; // Give web page author a chance to consume the event. Note that onInput() may be called multiple times // for same keystroke: once for keypress event and once for input event. //console.log(faux.type + ', charOrCode = (' + (typeof charOrCode) + ') ' + charOrCode + ', ctrl ' + !!faux.ctrlKey + ', alt ' + !!faux.altKey + ', meta ' + !!faux.metaKey + ', shift ' + !!faux.shiftKey); if (this.onInput(faux) === false) { // return false means stop faux.preventDefault(); faux.stopPropagation(); } if (faux._wasConsumed) { return; } // if preventDefault was called // IE8 doesn't emit the "input" event at all, and IE9 doesn't emit it for backspace, delete, cut, etc. // Since the code below (and perhaps user code) depends on that event, emit it synthetically. // See http://benalpert.com/2013/06/18/a-near-perfect-oninput-shim-for-ie-8-and-9.html. if (has("ie") <= 9) { switch (e.keyCode) { case keys.TAB: case keys.ESCAPE: case keys.DOWN_ARROW: case keys.UP_ARROW: case keys.LEFT_ARROW: case keys.RIGHT_ARROW: // These keys may alter the <input>'s value indirectly, but we don't want to emit an "input" // event. For example, the up/down arrows in TimeTextBox or ComboBox will cause the next // dropdown item's value to be copied to the <input>. break; default: if (e.keyCode == keys.ENTER && this.textbox.tagName.toLowerCase() != "textarea") { break; } this.defer(function () { if (this.textbox.value !== this._lastInputEventValue) { on.emit(this.textbox, "input", { bubbles: true }); } }); } } } this.own(on(this.textbox, "keydown, keypress, paste, cut, compositionend", lang.hitch(this, handleEvent)), on(this.textbox, "input", lang.hitch(this, "_onInput")), // Allow keypress to bubble to this.domNode, so that TextBox.on("keypress", ...) works, // but prevent it from further propagating, so that typing into a TextBox inside a Toolbar doesn't // trigger the Toolbar's letter key navigation. on(this.domNode, "keypress", function (e) { e.stopPropagation(); })); }, _blankValue: '', // if the textbox is blank, what value should be reported filter: function filter(val) { // summary: // Auto-corrections (such as trimming) that are applied to textbox // value on blur or form submit. // description: // For MappedTextBox subclasses, this is called twice // // - once with the display value // - once the value as set/returned by set('value', ...) // // and get('value'), ex: a Number for NumberTextBox. // // In the latter case it does corrections like converting null to NaN. In // the former case the NumberTextBox.filter() method calls this.inherited() // to execute standard trimming code in TextBox.filter(). // // TODO: break this into two methods in 2.0 // // tags: // protected extension if (val === null) { return this._blankValue; } if (typeof val != "string") { return val; } if (this.trim) { val = lang.trim(val); } if (this.uppercase) { val = val.toUpperCase(); } if (this.lowercase) { val = val.toLowerCase(); } if (this.propercase) { val = val.replace(/[^\s]+/g, function (word) { return word.substring(0, 1).toUpperCase() + word.substring(1); }); } return val; }, _setBlurValue: function _setBlurValue() { // Format the displayed value, for example (for NumberTextBox) convert 1.4 to 1.400, // or (for CurrencyTextBox) 2.50 to $2.50 this._setValueAttr(this.get('value'), true); }, _onBlur: function _onBlur(e) { if (this.disabled) { return; } this._setBlurValue(); this.inherited(arguments); }, _isTextSelected: function _isTextSelected() { return this.textbox.selectionStart != this.textbox.selectionEnd; }, _onFocus: function _onFocus( /*String*/ by) { if (this.disabled || this.readOnly) { return; } // Select all text on focus via click if nothing already selected. // Since mouse-up will clear the selection, need to defer selection until after mouse-up. // Don't do anything on focus by tabbing into the widget since there's no associated mouse-up event. if (this.selectOnClick && by == "mouse") { // Use on.once() to only select all text on first click only; otherwise users would have no way to clear // the selection. this._selectOnClickHandle = on.once(this.domNode, "mouseup, touchend", lang.hitch(this, function (evt) { // Check if the user selected some text manually (mouse-down, mouse-move, mouse-up) // and if not, then select all the text if (!this._isTextSelected()) { _TextBoxMixin.selectInputText(this.textbox); } })); this.own(this._selectOnClickHandle); // in case the mouseup never comes this.defer(function () { if (this._selectOnClickHandle) { this._selectOnClickHandle.remove(); this._selectOnClickHandle = null; } }, 500); // if mouseup not received soon, then treat it as some gesture } // call this.inherited() before refreshState(), since this.inherited() will possibly scroll the viewport // (to scroll the TextBox into view), which will affect how _refreshState() positions the tooltip this.inherited(arguments); this._refreshState(); }, reset: function reset() { // Overrides `dijit/_FormWidget/reset()`. // Additionally resets the displayed textbox value to '' this.textbox.value = ''; this.inherited(arguments); } }); if (has("dojo-bidi")) { _TextBoxMixin = declare("dijit.form._TextBoxMixin", _TextBoxMixin, { _setValueAttr: function _setValueAttr() { this.inherited(arguments); this.applyTextDir(this.focusNode); }, _setDisplayedValueAttr: function _setDisplayedValueAttr() { this.inherited(arguments); this.applyTextDir(this.focusNode); }, _onInput: function _onInput() { this.applyTextDir(this.focusNode); this.inherited(arguments); } }); } _TextBoxMixin._setSelectionRange = dijit._setSelectionRange = function ( /*DomNode*/ element, /*Number?*/ start, /*Number?*/ stop) { if (element.setSelectionRange) { element.setSelectionRange(start, stop); } }; _TextBoxMixin.selectInputText = dijit.selectInputText = function ( /*DomNode*/ element, /*Number?*/ start, /*Number?*/ stop) { // summary: // Select text in the input element argument, from start (default 0), to stop (default end). // TODO: use functions in _editor/selection.js? element = dom.byId(element); if (isNaN(start)) { start = 0; } if (isNaN(stop)) { stop = element.value ? element.value.length : 0; } try { element.focus(); _TextBoxMixin._setSelectionRange(element, start, stop); } catch (e) { /* squelch random errors (esp. on IE) from unexpected focus changes or DOM nodes being hidden */ } }; return _TextBoxMixin; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/form/nls/validate.js": /*!*************************************************!*\ !*** ./node_modules/dijit/form/nls/validate.js ***! \*************************************************/ /*! no static exports found */ /***/ function node_modulesDijitFormNlsValidateJs(module, exports, __webpack_require__) { /* * This module was modified by dojo-webpack-plugin to disable some locales * that were excluded by the plugin's 'locales' option */ !(module.exports = { 'root': { 'invalidMessage': 'The value entered is not valid.', 'missingMessage': 'This value is required.', 'rangeMessage': 'This value is out of range.' }, 'bs': false, 'mk': false, 'sr': false, 'zh': false, 'zh-tw': false, 'vi': true, 'uk': false, 'tr': false, 'th': false, 'sv': false, 'sl': false, 'sk': false, 'ru': false, 'ro': false, 'pt': false, 'pt-pt': false, 'pl': false, 'nl': false, 'nb': false, 'lv': false, 'lt': false, 'ko': false, 'kk': false, 'ja': false, 'it': false, 'id': false, 'hu': false, 'hr': false, 'hi': false, 'he': false, 'fr': false, 'fi': false, 'eu': false, 'et': false, 'es': false, 'el': false, 'de': false, 'da': false, 'cs': false, 'ca': false, 'bg': false, 'az': false, 'ar': false }); /***/ }, /***/ "./node_modules/dijit/form/nls/vi/validate.js": /*!****************************************************!*\ !*** ./node_modules/dijit/form/nls/vi/validate.js ***! \****************************************************/ /*! no static exports found */ /***/ function node_modulesDijitFormNlsViValidateJs(module, exports, __webpack_require__) { !(module.exports = { invalidMessage: "Giá trị được nhập không hợp lệ.", missingMessage: "Giá trị này là bắt buộc.", rangeMessage: "Giá trị này ngoài phạm vi." }); /***/ }, /***/ "./node_modules/dijit/hccss.js": /*!*************************************!*\ !*** ./node_modules/dijit/hccss.js ***! \*************************************/ /*! no static exports found */ /***/ function node_modulesDijitHccssJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), __webpack_require__( /*! dojo/hccss */ "./node_modules/dojo/hccss.js"), __webpack_require__( /*! dojo/domReady */ "./node_modules/dojo/domReady.js"), __webpack_require__( /*! dojo/_base/window */ "./node_modules/dojo/_base/window.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (domClass, has, domReady, win) { // module: // dijit/hccss /*===== return function(){ // summary: // Test if computer is in high contrast mode, and sets `dijit_a11y` flag on `<body>` if it is. // Deprecated, use ``dojo/hccss`` instead. }; =====*/ domReady(function () { if (has("highcontrast")) { domClass.add(win.body(), "dijit_a11y"); } }); return has; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/layout/ContentPane.js": /*!**************************************************!*\ !*** ./node_modules/dijit/layout/ContentPane.js ***! \**************************************************/ /*! no static exports found */ /***/ function node_modulesDijitLayoutContentPaneJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.mixin lang.delegate lang.hitch lang.isFunction lang.isObject __webpack_require__( /*! ../_Widget */ "./node_modules/dijit/_Widget.js"), __webpack_require__( /*! ../_Container */ "./node_modules/dijit/_Container.js"), __webpack_require__( /*! ./_ContentPaneResizeMixin */ "./node_modules/dijit/layout/_ContentPaneResizeMixin.js"), __webpack_require__( /*! dojo/string */ "./node_modules/dojo/string.js"), // string.substitute __webpack_require__( /*! dojo/html */ "./node_modules/dojo/html.js"), // html._ContentSetter __webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/_base/Deferred */ "./node_modules/dojo/_base/Deferred.js"), // Deferred __webpack_require__( /*! dojo/dom */ "./node_modules/dojo/dom.js"), // dom.byId __webpack_require__( /*! dojo/dom-attr */ "./node_modules/dojo/dom-attr.js"), // domAttr.attr __webpack_require__( /*! dojo/dom-construct */ "./node_modules/dojo/dom-construct.js"), // empty() __webpack_require__( /*! dojo/_base/xhr */ "./node_modules/dojo/_base/xhr.js"), // xhr.get __webpack_require__( /*! dojo/i18n */ "./node_modules/dojo/i18n.js"), // i18n.getLocalization __webpack_require__( /*! dojo/when */ "./node_modules/dojo/when.js"), __webpack_require__( /*! dojo/i18n!../nls/loading */ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/nls/loading.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (kernel, lang, _Widget, _Container, _ContentPaneResizeMixin, string, html, array, declare, Deferred, dom, domAttr, domConstruct, xhr, i18n, when) { // module: // dijit/layout/ContentPane return declare("dijit.layout.ContentPane", [_Widget, _Container, _ContentPaneResizeMixin], { // summary: // A widget containing an HTML fragment, specified inline // or by uri. Fragment may include widgets. // // description: // This widget embeds a document fragment in the page, specified // either by uri, javascript generated markup or DOM reference. // Any widgets within this content are instantiated and managed, // but laid out according to the HTML structure. Unlike IFRAME, // ContentPane embeds a document fragment as would be found // inside the BODY tag of a full HTML document. It should not // contain the HTML, HEAD, or BODY tags. // For more advanced functionality with scripts and // stylesheets, see dojox/layout/ContentPane. This widget may be // used stand alone or as a base class for other widgets. // ContentPane is useful as a child of other layout containers // such as BorderContainer or TabContainer, but note that those // widgets can contain any widget as a child. // // example: // Some quick samples: // To change the innerHTML: // | cp.set('content', '<b>new content</b>')` // Or you can send it a NodeList: // | cp.set('content', dojo.query('div [class=selected]', userSelection)) // To do an ajax update: // | cp.set('href', url) // href: String // The href of the content that displays now. // Set this at construction if you want to load data externally when the // pane is shown. (Set preload=true to load it immediately.) // Changing href after creation doesn't have any effect; Use set('href', ...); href: "", // content: String|DomNode|NodeList|dijit/_Widget // The innerHTML of the ContentPane. // Note that the initialization parameter / argument to set("content", ...) // can be a String, DomNode, Nodelist, or _Widget. content: "", // extractContent: Boolean // Extract visible content from inside of `<body> .... </body>`. // I.e., strip `<html>` and `<head>` (and it's contents) from the href extractContent: false, // parseOnLoad: Boolean // Parse content and create the widgets, if any. parseOnLoad: true, // parserScope: String // Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, // will search for data-dojo-type (or dojoType). For backwards compatibility // reasons defaults to dojo._scopeName (which is "dojo" except when // multi-version support is used, when it will be something like dojo16, dojo20, etc.) parserScope: kernel._scopeName, // preventCache: Boolean // Prevent caching of data from href's by appending a timestamp to the href. preventCache: false, // preload: Boolean // Force load of data on initialization even if pane is hidden. preload: false, // refreshOnShow: Boolean // Refresh (re-download) content when pane goes from hidden to shown refreshOnShow: false, // loadingMessage: String // Message that shows while downloading loadingMessage: "<span class='dijitContentPaneLoading'><span class='dijitInline dijitIconLoading'></span>${loadingState}</span>", // errorMessage: String // Message that shows if an error occurs errorMessage: "<span class='dijitContentPaneError'><span class='dijitInline dijitIconError'></span>${errorState}</span>", // isLoaded: [readonly] Boolean // True if the ContentPane has data in it, either specified // during initialization (via href or inline content), or set // via set('content', ...) / set('href', ...) // // False if it doesn't have any content, or if ContentPane is // still in the process of downloading href. isLoaded: false, baseClass: "dijitContentPane", /*====== // ioMethod: dojo/_base/xhr.get|dojo._base/xhr.post // Function that should grab the content specified via href. ioMethod: dojo.xhrGet, ======*/ // ioArgs: Object // Parameters to pass to xhrGet() request, for example: // | <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="href: './bar', ioArgs: {timeout: 500}"> ioArgs: {}, // onLoadDeferred: [readonly] dojo.Deferred // This is the `dojo.Deferred` returned by set('href', ...) and refresh(). // Calling onLoadDeferred.then() registers your // callback to be called only once, when the prior set('href', ...) call or // the initial href parameter to the constructor finishes loading. // // This is different than an onLoad() handler which gets called any time any href // or content is loaded. onLoadDeferred: null, // Cancel _WidgetBase's _setTitleAttr because we don't want the title attribute (used to specify // tab labels) to be copied to ContentPane.domNode... otherwise a tooltip shows up over the // entire pane. _setTitleAttr: null, // Flag to parser that I'll parse my contents, so it shouldn't. stopParser: true, // template: [private] Boolean // Flag from the parser that this ContentPane is inside a template // so the contents are pre-parsed. // TODO: this declaration can be commented out in 2.0 template: false, markupFactory: function markupFactory(params, node, ctor) { var self = new ctor(params, node); // If a parse has started but is waiting for modules to load, then return a Promise for when the parser // finishes. Don't return a promise though for the case when content hasn't started loading because the // ContentPane is hidden and it has an href (ex: hidden pane of a TabContainer). In that case we consider // that initialization has already finished. return !self.href && self._contentSetter && self._contentSetter.parseDeferred && !self._contentSetter.parseDeferred.isFulfilled() ? self._contentSetter.parseDeferred.then(function () { return self; }) : self; }, create: function create(params, srcNodeRef) { // Convert a srcNodeRef argument into a content parameter, so that the original contents are // processed in the same way as contents set via set("content", ...), calling the parser etc. // Avoid modifying original params object since that breaks NodeList instantiation, see #11906. if ((!params || !params.template) && srcNodeRef && !("href" in params) && !("content" in params)) { srcNodeRef = dom.byId(srcNodeRef); var df = srcNodeRef.ownerDocument.createDocumentFragment(); while (srcNodeRef.firstChild) { df.appendChild(srcNodeRef.firstChild); } params = lang.delegate(params, { content: df }); } this.inherited(arguments, [params, srcNodeRef]); }, postMixInProperties: function postMixInProperties() { this.inherited(arguments); var messages = i18n.getLocalization("dijit", "loading", this.lang); this.loadingMessage = string.substitute(this.loadingMessage, messages); this.errorMessage = string.substitute(this.errorMessage, messages); }, buildRendering: function buildRendering() { this.inherited(arguments); // Since we have no template we need to set this.containerNode ourselves, to make getChildren() work. // For subclasses of ContentPane that do have a template, does nothing. if (!this.containerNode) { this.containerNode = this.domNode; } // remove the title attribute so it doesn't show up when hovering // over a node (TODO: remove in 2.0, no longer needed after #11490) this.domNode.removeAttribute("title"); }, startup: function startup() { // summary: // Call startup() on all children including non _Widget ones like dojo/dnd/Source objects // This starts all the widgets this.inherited(arguments); // And this catches stuff like dojo/dnd/Source if (this._contentSetter) { array.forEach(this._contentSetter.parseResults, function (obj) { if (!obj._started && !obj._destroyed && lang.isFunction(obj.startup)) { obj.startup(); obj._started = true; } }, this); } }, _startChildren: function _startChildren() { // summary: // Called when content is loaded. Calls startup on each child widget. Similar to ContentPane.startup() // itself, but avoids marking the ContentPane itself as "restarted" (see #15581). // This starts all the widgets array.forEach(this.getChildren(), function (obj) { if (!obj._started && !obj._destroyed && lang.isFunction(obj.startup)) { obj.startup(); obj._started = true; } }); // And this catches stuff like dojo/dnd/Source if (this._contentSetter) { array.forEach(this._contentSetter.parseResults, function (obj) { if (!obj._started && !obj._destroyed && lang.isFunction(obj.startup)) { obj.startup(); obj._started = true; } }, this); } }, setHref: function setHref( /*String|Uri*/ href) { // summary: // Deprecated. Use set('href', ...) instead. kernel.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.", "", "2.0"); return this.set("href", href); }, _setHrefAttr: function _setHrefAttr( /*String|Uri*/ href) { // summary: // Hook so set("href", ...) works. // description: // Reset the (external defined) content of this pane and replace with new url // Note: It delays the download until widget is shown if preload is false. // href: // url to the page you want to get, must be within the same domain as your mainpage // Cancel any in-flight requests (a set('href', ...) will cancel any in-flight set('href', ...)) this.cancel(); this.onLoadDeferred = new Deferred(lang.hitch(this, "cancel")); this.onLoadDeferred.then(lang.hitch(this, "onLoad")); this._set("href", href); // _setHrefAttr() is called during creation and by the user, after creation. // Assuming preload == false, only in the second case do we actually load the URL; // otherwise it's done in startup(), and only if this widget is shown. if (this.preload || this._created && this._isShown()) { this._load(); } else { // Set flag to indicate that href needs to be loaded the next time the // ContentPane is made visible this._hrefChanged = true; } return this.onLoadDeferred; // Deferred }, setContent: function setContent( /*String|DomNode|Nodelist*/ data) { // summary: // Deprecated. Use set('content', ...) instead. kernel.deprecated("dijit.layout.ContentPane.setContent() is deprecated. Use set('content', ...) instead.", "", "2.0"); this.set("content", data); }, _setContentAttr: function _setContentAttr( /*String|DomNode|Nodelist*/ data) { // summary: // Hook to make set("content", ...) work. // Replaces old content with data content, include style classes from old content // data: // the new Content may be String, DomNode or NodeList // // if data is a NodeList (or an array of nodes) nodes are copied // so you can import nodes from another document implicitly // clear href so we can't run refresh and clear content // refresh should only work if we downloaded the content this._set("href", ""); // Cancel any in-flight requests (a set('content', ...) will cancel any in-flight set('href', ...)) this.cancel(); // Even though user is just setting content directly, still need to define an onLoadDeferred // because the _onLoadHandler() handler is still getting called from setContent() this.onLoadDeferred = new Deferred(lang.hitch(this, "cancel")); if (this._created) { // For back-compat reasons, call onLoad() for set('content', ...) // calls but not for content specified in srcNodeRef (ie: <div data-dojo-type=ContentPane>...</div>) // or as initialization parameter (ie: new ContentPane({content: ...}) this.onLoadDeferred.then(lang.hitch(this, "onLoad")); } this._setContent(data || ""); this._isDownloaded = false; // mark that content is from a set('content') not a set('href') return this.onLoadDeferred; // Deferred }, _getContentAttr: function _getContentAttr() { // summary: // Hook to make get("content") work return this.containerNode.innerHTML; }, cancel: function cancel() { // summary: // Cancels an in-flight download of content if (this._xhrDfd && this._xhrDfd.fired == -1) { this._xhrDfd.cancel(); } delete this._xhrDfd; // garbage collect this.onLoadDeferred = null; }, destroy: function destroy() { this.cancel(); this.inherited(arguments); }, destroyRecursive: function destroyRecursive( /*Boolean*/ preserveDom) { // summary: // Destroy the ContentPane and its contents // if we have multiple controllers destroying us, bail after the first if (this._beingDestroyed) { return; } this.inherited(arguments); }, _onShow: function _onShow() { // summary: // Called when the ContentPane is made visible // description: // For a plain ContentPane, this is called on initialization, from startup(). // If the ContentPane is a hidden pane of a TabContainer etc., then it's // called whenever the pane is made visible. // // Does necessary processing, including href download and layout/resize of // child widget(s) this.inherited(arguments); if (this.href) { if (!this._xhrDfd && ( // if there's an href that isn't already being loaded !this.isLoaded || this._hrefChanged || this.refreshOnShow)) { return this.refresh(); // If child has an href, promise that fires when the load is complete } } }, refresh: function refresh() { // summary: // [Re]download contents of href and display // description: // 1. cancels any currently in-flight requests // 2. posts "loading..." message // 3. sends XHR to download new data // Cancel possible prior in-flight request this.cancel(); this.onLoadDeferred = new Deferred(lang.hitch(this, "cancel")); this.onLoadDeferred.then(lang.hitch(this, "onLoad")); this._load(); return this.onLoadDeferred; // If child has an href, promise that fires when refresh is complete }, _load: function _load() { // summary: // Load/reload the href specified in this.href // display loading message this._setContent(this.onDownloadStart(), true); var self = this; var getArgs = { preventCache: this.preventCache || this.refreshOnShow, url: this.href, handleAs: "text" }; if (lang.isObject(this.ioArgs)) { lang.mixin(getArgs, this.ioArgs); } var hand = this._xhrDfd = (this.ioMethod || xhr.get)(getArgs), returnedHtml; hand.then(function (html) { returnedHtml = html; try { self._isDownloaded = true; return self._setContent(html, false); } catch (err) { self._onError('Content', err); // onContentError } }, function (err) { if (!hand.canceled) { // show error message in the pane self._onError('Download', err); // onDownloadError } delete self._xhrDfd; return err; }).then(function () { self.onDownloadEnd(); delete self._xhrDfd; return returnedHtml; }); // Remove flag saying that a load is needed delete this._hrefChanged; }, _onLoadHandler: function _onLoadHandler(data) { // summary: // This is called whenever new content is being loaded this._set("isLoaded", true); try { this.onLoadDeferred.resolve(data); } catch (e) { console.error('Error ' + (this.widgetId || this.id) + ' running custom onLoad code: ' + e.message); } }, _onUnloadHandler: function _onUnloadHandler() { // summary: // This is called whenever the content is being unloaded this._set("isLoaded", false); try { this.onUnload(); } catch (e) { console.error('Error ' + this.widgetId + ' running custom onUnload code: ' + e.message); } }, destroyDescendants: function destroyDescendants( /*Boolean*/ preserveDom) { // summary: // Destroy all the widgets inside the ContentPane and empty containerNode // Make sure we call onUnload (but only when the ContentPane has real content) if (this.isLoaded) { this._onUnloadHandler(); } // Even if this.isLoaded == false there might still be a "Loading..." message // to erase, so continue... // For historical reasons we need to delete all widgets under this.containerNode, // even ones that the user has created manually. var setter = this._contentSetter; array.forEach(this.getChildren(), function (widget) { if (widget.destroyRecursive) { // All widgets will hit this branch widget.destroyRecursive(preserveDom); } else if (widget.destroy) { // Things like dojo/dnd/Source have destroy(), not destroyRecursive() widget.destroy(preserveDom); } widget._destroyed = true; }); if (setter) { // Most of the widgets in setter.parseResults have already been destroyed, but // things like Menu that have been moved to <body> haven't yet array.forEach(setter.parseResults, function (widget) { if (!widget._destroyed) { if (widget.destroyRecursive) { // All widgets will hit this branch widget.destroyRecursive(preserveDom); } else if (widget.destroy) { // Things like dojo/dnd/Source have destroy(), not destroyRecursive() widget.destroy(preserveDom); } widget._destroyed = true; } }); delete setter.parseResults; } // And then clear away all the DOM nodes if (!preserveDom) { domConstruct.empty(this.containerNode); } // Delete any state information we have about current contents delete this._singleChild; }, _setContent: function _setContent( /*String|DocumentFragment*/ cont, /*Boolean*/ isFakeContent) { // summary: // Insert the content into the container node // returns: // Returns a Deferred promise that is resolved when the content is parsed. cont = this.preprocessContent(cont); // first get rid of child widgets this.destroyDescendants(); // html.set will take care of the rest of the details // we provide an override for the error handling to ensure the widget gets the errors // configure the setter instance with only the relevant widget instance properties // NOTE: unless we hook into attr, or provide property setters for each property, // we need to re-configure the ContentSetter with each use var setter = this._contentSetter; if (!(setter && setter instanceof html._ContentSetter)) { setter = this._contentSetter = new html._ContentSetter({ node: this.containerNode, _onError: lang.hitch(this, this._onError), onContentError: lang.hitch(this, function (e) { // fires if a domfault occurs when we are appending this.errorMessage // like for instance if domNode is a UL and we try append a DIV var errMess = this.onContentError(e); try { this.containerNode.innerHTML = errMess; } catch (e) { console.error('Fatal ' + this.id + ' could not change content due to ' + e.message, e); } }) /*, _onError */ }); } var setterParams = lang.mixin({ cleanContent: this.cleanContent, extractContent: this.extractContent, parseContent: !cont.domNode && this.parseOnLoad, parserScope: this.parserScope, startup: false, dir: this.dir, lang: this.lang, textDir: this.textDir }, this._contentSetterParams || {}); var p = setter.set(lang.isObject(cont) && cont.domNode ? cont.domNode : cont, setterParams); // dojox/layout/html/_base::_ContentSetter.set() returns a Promise that indicates when everything is completed. // dojo/html::_ContentSetter.set() currently returns the DOMNode, but that will be changed for 2.0. // So, if set() returns a promise then use it, otherwise fallback to waiting on setter.parseDeferred var self = this; return when(p && p.then ? p : setter.parseDeferred, function () { // setter params must be pulled afresh from the ContentPane each time delete self._contentSetterParams; if (!isFakeContent) { if (self._started) { // Startup each top level child widget (and they will start their children, recursively) self._startChildren(); // Call resize() on each of my child layout widgets, // or resize() on my single child layout widget... // either now (if I'm currently visible) or when I become visible self._scheduleLayout(); } self._onLoadHandler(cont); } }); }, preprocessContent: function preprocessContent( /*String|DocumentFragment*/ content) { // summary: // Hook, called after content has loaded, before being processed. // description: // A subclass should preprocess the content and return the preprocessed content. // See https://bugs.dojotoolkit.org/ticket/9622 // returns: // Returns preprocessed content, either a String or DocumentFragment return content; }, _onError: function _onError(type, err, consoleText) { this.onLoadDeferred.reject(err); // shows user the string that is returned by on[type]Error // override on[type]Error and return your own string to customize var errText = this['on' + type + 'Error'].call(this, err); if (consoleText) { console.error(consoleText, err); } else if (errText) { // a empty string won't change current content this._setContent(errText, true); } }, // EVENT's, should be overide-able onLoad: function onLoad() {// summary: // Event hook, is called after everything is loaded and widgetified // tags: // callback }, onUnload: function onUnload() {// summary: // Event hook, is called before old content is cleared // tags: // callback }, onDownloadStart: function onDownloadStart() { // summary: // Called before download starts. // description: // The string returned by this function will be the html // that tells the user we are loading something. // Override with your own function if you want to change text. // tags: // extension return this.loadingMessage; }, onContentError: function onContentError() {// summary: // Called on DOM faults, require faults etc. in content. // // In order to display an error message in the pane, return // the error message from this method, as an HTML string. // // By default (if this method is not overriden), it returns // nothing, so the error message is just printed to the console. // tags: // extension }, onDownloadError: function onDownloadError() { // summary: // Called when download error occurs. // // In order to display an error message in the pane, return // the error message from this method, as an HTML string. // // Default behavior (if this method is not overriden) is to display // the error message inside the pane. // tags: // extension return this.errorMessage; }, onDownloadEnd: function onDownloadEnd() {// summary: // Called when download is finished. // tags: // callback } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/layout/_ContentPaneResizeMixin.js": /*!**************************************************************!*\ !*** ./node_modules/dijit/layout/_ContentPaneResizeMixin.js ***! \**************************************************************/ /*! no static exports found */ /***/ function node_modulesDijitLayout_ContentPaneResizeMixinJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.filter array.forEach __webpack_require__( /*! dojo/_base/declare */ "./node_modules/dojo/_base/declare.js"), // declare __webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), // domClass.contains domClass.toggle __webpack_require__( /*! dojo/dom-geometry */ "./node_modules/dojo/dom-geometry.js"), // domGeometry.contentBox domGeometry.marginBox __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js"), // lang.mixin __webpack_require__( /*! dojo/query */ "./node_modules/dojo/query.js"), // query __webpack_require__( /*! ../registry */ "./node_modules/dijit/registry.js"), // registry.byId __webpack_require__( /*! ../Viewport */ "./node_modules/dijit/Viewport.js"), __webpack_require__( /*! ./utils */ "./node_modules/dijit/layout/utils.js") // marginBox2contextBox ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, domClass, domGeometry, domStyle, lang, query, registry, Viewport, layoutUtils) { // module: // dijit/layout/_ContentPaneResizeMixin return declare("dijit.layout._ContentPaneResizeMixin", null, { // summary: // Resize() functionality of ContentPane. If there's a single layout widget // child then it will call resize() with the same dimensions as the ContentPane. // Otherwise just calls resize on each child. // // Also implements basic startup() functionality, where starting the parent // will start the children // doLayout: Boolean // - false - don't adjust size of children // - true - if there is a single visible child widget, set it's size to however big the ContentPane is doLayout: true, // isLayoutContainer: [protected] Boolean // Indicates that this widget will call resize() on it's child widgets // when they become visible. isLayoutContainer: true, startup: function startup() { // summary: // See `dijit/layout/_LayoutWidget.startup()` for description. // Although ContentPane doesn't extend _LayoutWidget, it does implement // the same API. if (this._started) { return; } var parent = this.getParent(); this._childOfLayoutWidget = parent && parent.isLayoutContainer; // I need to call resize() on my child/children (when I become visible), unless // I'm the child of a layout widget in which case my parent will call resize() on me and I'll do it then. this._needLayout = !this._childOfLayoutWidget; this.inherited(arguments); if (this._isShown()) { this._onShow(); } if (!this._childOfLayoutWidget) { // Since my parent isn't a layout container, and my style *may be* width=height=100% // or something similar (either set directly or via a CSS class), // monitor when viewport size changes so that I can re-layout. // This is more for subclasses of ContentPane than ContentPane itself, although it // could be useful for a ContentPane if it has a single child widget inheriting ContentPane's size. this.own(Viewport.on("resize", lang.hitch(this, "resize"))); } }, _checkIfSingleChild: function _checkIfSingleChild() { // summary: // Test if we have exactly one visible widget as a child, // and if so assume that we are a container for that widget, // and should propagate startup() and resize() calls to it. // Skips over things like data stores since they aren't visible. if (!this.doLayout) { return; } var candidateWidgets = [], otherVisibleNodes = false; query("> *", this.containerNode).some(function (node) { var widget = registry.byNode(node); if (widget && widget.resize) { candidateWidgets.push(widget); } else if (!/script|link|style/i.test(node.nodeName) && node.offsetHeight) { otherVisibleNodes = true; } }); this._singleChild = candidateWidgets.length == 1 && !otherVisibleNodes ? candidateWidgets[0] : null; // So we can set overflow: hidden to avoid a safari bug w/scrollbars showing up (#9449) domClass.toggle(this.containerNode, this.baseClass + "SingleChild", !!this._singleChild); }, resize: function resize(changeSize, resultSize) { // summary: // See `dijit/layout/_LayoutWidget.resize()` for description. // Although ContentPane doesn't extend _LayoutWidget, it does implement // the same API. this._resizeCalled = true; this._scheduleLayout(changeSize, resultSize); }, _scheduleLayout: function _scheduleLayout(changeSize, resultSize) { // summary: // Resize myself, and call resize() on each of my child layout widgets, either now // (if I'm currently visible) or when I become visible if (this._isShown()) { this._layout(changeSize, resultSize); } else { this._needLayout = true; this._changeSize = changeSize; this._resultSize = resultSize; } }, _layout: function _layout(changeSize, resultSize) { // summary: // Resize myself according to optional changeSize/resultSize parameters, like a layout widget. // Also, since I am an isLayoutContainer widget, each of my children expects me to // call resize() or layout() on it. // // Should be called on initialization and also whenever we get new content // (from an href, or from set('content', ...))... but deferred until // the ContentPane is visible delete this._needLayout; // For the TabContainer --> BorderContainer --> ContentPane case, _onShow() is // never called directly, so resize() is our trigger to do the initial href download (see [20099]). // However, don't load href for closed TitlePanes. if (!this._wasShown && this.open !== false) { this._onShow(); } // Set margin box size, unless it wasn't specified, in which case use current size. if (changeSize) { domGeometry.setMarginBox(this.domNode, changeSize); } // Compute content box size of containerNode in case we [later] need to size our single child. var cn = this.containerNode; if (cn === this.domNode) { // If changeSize or resultSize was passed to this method and this.containerNode == // this.domNode then we can compute the content-box size without querying the node, // which is more reliable (similar to LayoutWidget.resize) (see for example #9449). var mb = resultSize || {}; lang.mixin(mb, changeSize || {}); // changeSize overrides resultSize if (!("h" in mb) || !("w" in mb)) { mb = lang.mixin(domGeometry.getMarginBox(cn), mb); // just use domGeometry.setMarginBox() to fill in missing values } this._contentBox = layoutUtils.marginBox2contentBox(cn, mb); } else { this._contentBox = domGeometry.getContentBox(cn); } this._layoutChildren(); }, _layoutChildren: function _layoutChildren() { // Call _checkIfSingleChild() again in case app has manually mucked w/the content // of the ContentPane (rather than changing it through the set("content", ...) API. this._checkIfSingleChild(); if (this._singleChild && this._singleChild.resize) { var cb = this._contentBox || domGeometry.getContentBox(this.containerNode); // note: if widget has padding this._contentBox will have l and t set, // but don't pass them to resize() or it will doubly-offset the child this._singleChild.resize({ w: cb.w, h: cb.h }); } else { // All my child widgets are independently sized (rather than matching my size), // but I still need to call resize() on each child to make it layout. var children = this.getChildren(), widget, i = 0; while (widget = children[i++]) { if (widget.resize) { widget.resize(); } } } }, _isShown: function _isShown() { // summary: // Returns true if the content is currently shown. // description: // If I am a child of a layout widget then it actually returns true if I've ever been visible, // not whether I'm currently visible, since that's much faster than tracing up the DOM/widget // tree every call, and at least solves the performance problem on page load by deferring loading // hidden ContentPanes until they are first shown if (this._childOfLayoutWidget) { // If we are TitlePane, etc - we return that only *IF* we've been resized if (this._resizeCalled && "open" in this) { return this.open; } return this._resizeCalled; } else if ("open" in this) { return this.open; // for TitlePane, etc. } else { var node = this.domNode, parent = this.domNode.parentNode; return node.style.display != 'none' && node.style.visibility != 'hidden' && !domClass.contains(node, "dijitHidden") && parent && parent.style && parent.style.display != 'none'; } }, _onShow: function _onShow() { // summary: // Called when the ContentPane is made visible // description: // For a plain ContentPane, this is called on initialization, from startup(). // If the ContentPane is a hidden pane of a TabContainer etc., then it's // called whenever the pane is made visible. // // Does layout/resize of child widget(s) // Need to keep track of whether ContentPane has been shown (which is different than // whether or not it's currently visible). this._wasShown = true; if (this._needLayout) { // If a layout has been scheduled for when we become visible, do it now this._layout(this._changeSize, this._resultSize); } this.inherited(arguments); } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/layout/utils.js": /*!********************************************!*\ !*** ./node_modules/dijit/layout/utils.js ***! \********************************************/ /*! no static exports found */ /***/ function node_modulesDijitLayoutUtilsJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.filter array.forEach __webpack_require__( /*! dojo/dom-class */ "./node_modules/dojo/dom-class.js"), // domClass.add domClass.remove __webpack_require__( /*! dojo/dom-geometry */ "./node_modules/dojo/dom-geometry.js"), // domGeometry.marginBox __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.getComputedStyle __webpack_require__( /*! dojo/_base/lang */ "./node_modules/dojo/_base/lang.js") // lang.mixin, lang.setObject ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, domClass, domGeometry, domStyle, lang) { // module: // dijit/layout/utils function capitalize(word) { return word.substring(0, 1).toUpperCase() + word.substring(1); } function size(widget, dim) { // size the child var newSize = widget.resize ? widget.resize(dim) : domGeometry.setMarginBox(widget.domNode, dim); // record child's size if (newSize) { // if the child returned it's new size then use that lang.mixin(widget, newSize); } else { // otherwise, call getMarginBox(), but favor our own numbers when we have them. // the browser lies sometimes lang.mixin(widget, domGeometry.getMarginBox(widget.domNode)); lang.mixin(widget, dim); } } var utils = { // summary: // Utility functions for doing layout marginBox2contentBox: function marginBox2contentBox( /*DomNode*/ node, /*Object*/ mb) { // summary: // Given the margin-box size of a node, return its content box size. // Functions like domGeometry.contentBox() but is more reliable since it doesn't have // to wait for the browser to compute sizes. var cs = domStyle.getComputedStyle(node); var me = domGeometry.getMarginExtents(node, cs); var pb = domGeometry.getPadBorderExtents(node, cs); return { l: domStyle.toPixelValue(node, cs.paddingLeft), t: domStyle.toPixelValue(node, cs.paddingTop), w: mb.w - (me.w + pb.w), h: mb.h - (me.h + pb.h) }; }, layoutChildren: function layoutChildren( /*DomNode*/ container, /*Object*/ dim, /*Widget[]*/ children, /*String?*/ changedRegionId, /*Number?*/ changedRegionSize) { // summary: // Layout a bunch of child dom nodes within a parent dom node // container: // parent node // dim: // {l, t, w, h} object specifying dimensions of container into which to place children // children: // An array of Widgets or at least objects containing: // // - domNode: pointer to DOM node to position // - region or layoutAlign: position to place DOM node // - resize(): (optional) method to set size of node // - id: (optional) Id of widgets, referenced from resize object, below. // // The widgets in this array should be ordered according to how they should be laid out // (each element will be processed in order, and take up as much remaining space as needed), // with the center widget last. // changedRegionId: // If specified, the slider for the region with the specified id has been dragged, and thus // the region's height or width should be adjusted according to changedRegionSize // changedRegionSize: // See changedRegionId. // copy dim because we are going to modify it dim = lang.mixin({}, dim); domClass.add(container, "dijitLayoutContainer"); // Move "client" elements to the end of the array for layout. a11y dictates that the author // needs to be able to put them in the document in tab-order, but this algorithm requires that // client be last. TODO: remove for 2.0, all dijit client code already sends children as last item. children = array.filter(children, function (item) { return item.region != "center" && item.layoutAlign != "client"; }).concat(array.filter(children, function (item) { return item.region == "center" || item.layoutAlign == "client"; })); // set positions/sizes array.forEach(children, function (child) { var elm = child.domNode, pos = child.region || child.layoutAlign; if (!pos) { throw new Error("No region setting for " + child.id); } // set elem to upper left corner of unused space; may move it later var elmStyle = elm.style; elmStyle.left = dim.l + "px"; elmStyle.top = dim.t + "px"; elmStyle.position = "absolute"; domClass.add(elm, "dijitAlign" + capitalize(pos)); // Size adjustments to make to this child widget var sizeSetting = {}; // Check for optional size adjustment due to splitter drag (height adjustment for top/bottom align // panes and width adjustment for left/right align panes. if (changedRegionId && changedRegionId == child.id) { sizeSetting[child.region == "top" || child.region == "bottom" ? "h" : "w"] = changedRegionSize; } if (pos == "leading") { pos = child.isLeftToRight() ? "left" : "right"; } if (pos == "trailing") { pos = child.isLeftToRight() ? "right" : "left"; } // set size && adjust record of remaining space. // note that setting the width of a <div> may affect its height. if (pos == "top" || pos == "bottom") { sizeSetting.w = dim.w; size(child, sizeSetting); dim.h -= child.h; if (pos == "top") { dim.t += child.h; } else { elmStyle.top = dim.t + dim.h + "px"; } } else if (pos == "left" || pos == "right") { sizeSetting.h = dim.h; size(child, sizeSetting); dim.w -= child.w; if (pos == "left") { dim.l += child.w; } else { elmStyle.left = dim.l + dim.w + "px"; } } else if (pos == "client" || pos == "center") { size(child, dim); } }); } }; lang.setObject("dijit.layout.utils", utils); // remove for 2.0 return utils; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/main.js": /*!************************************!*\ !*** ./node_modules/dijit/main.js ***! \************************************/ /*! no static exports found */ /***/ function node_modulesDijitMainJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (dojo) { // module: // dijit/main /*===== return { // summary: // The dijit package main module. // Deprecated. Users should access individual modules (ex: dijit/registry) directly. }; =====*/ return dojo.dijit; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/nls/common.js": /*!******************************************!*\ !*** ./node_modules/dijit/nls/common.js ***! \******************************************/ /*! no static exports found */ /***/ function node_modulesDijitNlsCommonJs(module, exports, __webpack_require__) { /* * This module was modified by dojo-webpack-plugin to disable some locales * that were excluded by the plugin's 'locales' option */ !(module.exports = { 'root': { 'buttonOk': 'OK', 'buttonCancel': 'Cancel', 'buttonSave': 'Save', 'itemClose': 'Close' }, 'bs': false, 'mk': false, 'sr': false, 'zh': false, 'zh-tw': false, 'vi': true, 'uk': false, 'tr': false, 'th': false, 'sv': false, 'sl': false, 'sk': false, 'ru': false, 'ro': false, 'pt': false, 'pt-pt': false, 'pl': false, 'nl': false, 'nb': false, 'lv': false, 'lt': false, 'ko': false, 'kk': false, 'ja': false, 'it': false, 'id': false, 'hu': false, 'hr': false, 'hi': false, 'he': false, 'fr': false, 'fi': false, 'eu': false, 'et': false, 'es': false, 'el': false, 'de': false, 'da': false, 'cs': false, 'ca': false, 'bg': false, 'az': false, 'ar': false }); /***/ }, /***/ "./node_modules/dijit/nls/loading.js": /*!*******************************************!*\ !*** ./node_modules/dijit/nls/loading.js ***! \*******************************************/ /*! no static exports found */ /***/ function node_modulesDijitNlsLoadingJs(module, exports, __webpack_require__) { /* * This module was modified by dojo-webpack-plugin to disable some locales * that were excluded by the plugin's 'locales' option */ !(module.exports = { 'root': { 'loadingState': 'Loading...', 'errorState': 'Sorry, an error occurred' }, 'bs': false, 'mk': false, 'sr': false, 'zh': false, 'zh-tw': false, 'vi': true, 'uk': false, 'tr': false, 'th': false, 'sv': false, 'sl': false, 'sk': false, 'ru': false, 'ro': false, 'pt': false, 'pt-pt': false, 'pl': false, 'nl': false, 'nb': false, 'lv': false, 'lt': false, 'ko': false, 'kk': false, 'ja': false, 'it': false, 'id': false, 'hu': false, 'hr': false, 'hi': false, 'he': false, 'fr': false, 'fi': false, 'eu': false, 'et': false, 'es': false, 'el': false, 'de': false, 'da': false, 'cs': false, 'ca': false, 'bg': false, 'az': false, 'ar': false }); /***/ }, /***/ "./node_modules/dijit/nls/vi/common.js": /*!*********************************************!*\ !*** ./node_modules/dijit/nls/vi/common.js ***! \*********************************************/ /*! no static exports found */ /***/ function node_modulesDijitNlsViCommonJs(module, exports, __webpack_require__) { !(module.exports = { buttonOk: "OK", buttonCancel: "Hủy", buttonSave: "Lưu", itemClose: "Đóng" }); /***/ }, /***/ "./node_modules/dijit/nls/vi/loading.js": /*!**********************************************!*\ !*** ./node_modules/dijit/nls/vi/loading.js ***! \**********************************************/ /*! no static exports found */ /***/ function node_modulesDijitNlsViLoadingJs(module, exports, __webpack_require__) { !(module.exports = { loadingState: "Đang tải...", errorState: "Rất tiếc, đã xảy ra lỗi" }); /***/ }, /***/ "./node_modules/dijit/place.js": /*!*************************************!*\ !*** ./node_modules/dijit/place.js ***! \*************************************/ /*! no static exports found */ /***/ function node_modulesDijitPlaceJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.map array.some __webpack_require__( /*! dojo/dom-geometry */ "./node_modules/dojo/dom-geometry.js"), // domGeometry.position __webpack_require__( /*! dojo/dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.getComputedStyle __webpack_require__( /*! dojo/_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.deprecated __webpack_require__( /*! dojo/_base/window */ "./node_modules/dojo/_base/window.js"), // win.body __webpack_require__( /*! ./Viewport */ "./node_modules/dijit/Viewport.js"), // getEffectiveBox __webpack_require__( /*! ./main */ "./node_modules/dijit/main.js") // dijit (defining dijit.place to match API doc) ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, domGeometry, domStyle, kernel, win, Viewport, dijit) { // module: // dijit/place function _place( /*DomNode*/ node, choices, layoutNode, aroundNodeCoords) { // summary: // Given a list of spots to put node, put it at the first spot where it fits, // of if it doesn't fit anywhere then the place with the least overflow // choices: Array // Array of elements like: {corner: 'TL', pos: {x: 10, y: 20} } // Above example says to put the top-left corner of the node at (10,20) // layoutNode: Function(node, aroundNodeCorner, nodeCorner, size) // for things like tooltip, they are displayed differently (and have different dimensions) // based on their orientation relative to the parent. This adjusts the popup based on orientation. // It also passes in the available size for the popup, which is useful for tooltips to // tell them that their width is limited to a certain amount. layoutNode() may return a value expressing // how much the popup had to be modified to fit into the available space. This is used to determine // what the best placement is. // aroundNodeCoords: Object // Size of aroundNode, ex: {w: 200, h: 50} // get {x: 10, y: 10, w: 100, h:100} type obj representing position of // viewport over document var view = Viewport.getEffectiveBox(node.ownerDocument); // This won't work if the node is inside a <div style="position: relative">, // so reattach it to <body>. (Otherwise, the positioning will be wrong // and also it might get cutoff.) if (!node.parentNode || String(node.parentNode.tagName).toLowerCase() != "body") { win.body(node.ownerDocument).appendChild(node); } var best = null; array.some(choices, function (choice) { var corner = choice.corner; var pos = choice.pos; var overflow = 0; // calculate amount of space available given specified position of node var spaceAvailable = { w: { 'L': view.l + view.w - pos.x, 'R': pos.x - view.l, 'M': view.w }[corner.charAt(1)], h: { 'T': view.t + view.h - pos.y, 'B': pos.y - view.t, 'M': view.h }[corner.charAt(0)] }; // Clear left/right position settings set earlier so they don't interfere with calculations, // specifically when layoutNode() (a.k.a. Tooltip.orient()) measures natural width of Tooltip var s = node.style; s.left = s.right = "auto"; // configure node to be displayed in given position relative to button // (need to do this in order to get an accurate size for the node, because // a tooltip's size changes based on position, due to triangle) if (layoutNode) { var res = layoutNode(node, choice.aroundCorner, corner, spaceAvailable, aroundNodeCoords); overflow = typeof res == "undefined" ? 0 : res; } // get node's size var style = node.style; var oldDisplay = style.display; var oldVis = style.visibility; if (style.display == "none") { style.visibility = "hidden"; style.display = ""; } var bb = domGeometry.position(node); style.display = oldDisplay; style.visibility = oldVis; // coordinates and size of node with specified corner placed at pos, // and clipped by viewport var startXpos = { 'L': pos.x, 'R': pos.x - bb.w, 'M': Math.max(view.l, Math.min(view.l + view.w, pos.x + (bb.w >> 1)) - bb.w) // M orientation is more flexible }[corner.charAt(1)], startYpos = { 'T': pos.y, 'B': pos.y - bb.h, 'M': Math.max(view.t, Math.min(view.t + view.h, pos.y + (bb.h >> 1)) - bb.h) }[corner.charAt(0)], startX = Math.max(view.l, startXpos), startY = Math.max(view.t, startYpos), endX = Math.min(view.l + view.w, startXpos + bb.w), endY = Math.min(view.t + view.h, startYpos + bb.h), width = endX - startX, height = endY - startY; overflow += bb.w - width + (bb.h - height); if (best == null || overflow < best.overflow) { best = { corner: corner, aroundCorner: choice.aroundCorner, x: startX, y: startY, w: width, h: height, overflow: overflow, spaceAvailable: spaceAvailable }; } return !overflow; }); // In case the best position is not the last one we checked, need to call // layoutNode() again. if (best.overflow && layoutNode) { layoutNode(node, best.aroundCorner, best.corner, best.spaceAvailable, aroundNodeCoords); } // And then position the node. Do this last, after the layoutNode() above // has sized the node, due to browser quirks when the viewport is scrolled // (specifically that a Tooltip will shrink to fit as though the window was // scrolled to the left). var top = best.y, side = best.x, body = win.body(node.ownerDocument); if (/relative|absolute/.test(domStyle.get(body, "position"))) { // compensate for margin on <body>, see #16148 top -= domStyle.get(body, "marginTop"); side -= domStyle.get(body, "marginLeft"); } var s = node.style; s.top = top + "px"; s.left = side + "px"; s.right = "auto"; // needed for FF or else tooltip goes to far left return best; } var reverse = { // Map from corner to kitty-corner "TL": "BR", "TR": "BL", "BL": "TR", "BR": "TL" }; var place = { // summary: // Code to place a DOMNode relative to another DOMNode. // Load using require(["dijit/place"], function(place){ ... }). at: function at(node, pos, corners, padding, layoutNode) { // summary: // Positions node kitty-corner to the rectangle centered at (pos.x, pos.y) with width and height of // padding.x * 2 and padding.y * 2, or zero if padding not specified. Picks first corner in corners[] // where node is fully visible, or the corner where it's most visible. // // Node is assumed to be absolutely or relatively positioned. // node: DOMNode // The node to position // pos: dijit/place.__Position // Object like {x: 10, y: 20} // corners: String[] // Array of Strings representing order to try corners of the node in, like ["TR", "BL"]. // Possible values are: // // - "BL" - bottom left // - "BR" - bottom right // - "TL" - top left // - "TR" - top right // padding: dijit/place.__Position? // Optional param to set padding, to put some buffer around the element you want to position. // Defaults to zero. // layoutNode: Function(node, aroundNodeCorner, nodeCorner) // For things like tooltip, they are displayed differently (and have different dimensions) // based on their orientation relative to the parent. This adjusts the popup based on orientation. // example: // Try to place node's top right corner at (10,20). // If that makes node go (partially) off screen, then try placing // bottom left corner at (10,20). // | place(node, {x: 10, y: 20}, ["TR", "BL"]) var choices = array.map(corners, function (corner) { var c = { corner: corner, aroundCorner: reverse[corner], // so TooltipDialog.orient() gets aroundCorner argument set pos: { x: pos.x, y: pos.y } }; if (padding) { c.pos.x += corner.charAt(1) == 'L' ? padding.x : -padding.x; c.pos.y += corner.charAt(0) == 'T' ? padding.y : -padding.y; } return c; }); return _place(node, choices, layoutNode); }, around: function around( /*DomNode*/ node, /*DomNode|dijit/place.__Rectangle*/ anchor, /*String[]*/ positions, /*Boolean*/ leftToRight, /*Function?*/ layoutNode) { // summary: // Position node adjacent or kitty-corner to anchor // such that it's fully visible in viewport. // description: // Place node such that corner of node touches a corner of // aroundNode, and that node is fully visible. // anchor: // Either a DOMNode or a rectangle (object with x, y, width, height). // positions: // Ordered list of positions to try matching up. // // - before: places drop down to the left of the anchor node/widget, or to the right in the case // of RTL scripts like Hebrew and Arabic; aligns either the top of the drop down // with the top of the anchor, or the bottom of the drop down with bottom of the anchor. // - after: places drop down to the right of the anchor node/widget, or to the left in the case // of RTL scripts like Hebrew and Arabic; aligns either the top of the drop down // with the top of the anchor, or the bottom of the drop down with bottom of the anchor. // - before-centered: centers drop down to the left of the anchor node/widget, or to the right // in the case of RTL scripts like Hebrew and Arabic // - after-centered: centers drop down to the right of the anchor node/widget, or to the left // in the case of RTL scripts like Hebrew and Arabic // - above-centered: drop down is centered above anchor node // - above: drop down goes above anchor node, left sides aligned // - above-alt: drop down goes above anchor node, right sides aligned // - below-centered: drop down is centered above anchor node // - below: drop down goes below anchor node // - below-alt: drop down goes below anchor node, right sides aligned // layoutNode: Function(node, aroundNodeCorner, nodeCorner) // For things like tooltip, they are displayed differently (and have different dimensions) // based on their orientation relative to the parent. This adjusts the popup based on orientation. // leftToRight: // True if widget is LTR, false if widget is RTL. Affects the behavior of "above" and "below" // positions slightly. // example: // | placeAroundNode(node, aroundNode, ['below', 'above-alt']); // This will try to position node such that node's top-left corner is at the same position // as the bottom left corner of the aroundNode (ie, put node below // aroundNode, with left edges aligned). If that fails it will try to put // the bottom-right corner of node where the top right corner of aroundNode is // (ie, put node above aroundNode, with right edges aligned) // // If around is a DOMNode (or DOMNode id), convert to coordinates. var aroundNodePos; if (typeof anchor == "string" || "offsetWidth" in anchor || "ownerSVGElement" in anchor) { aroundNodePos = domGeometry.position(anchor, true); // For above and below dropdowns, subtract width of border so that popup and aroundNode borders // overlap, preventing a double-border effect. Unfortunately, difficult to measure the border // width of either anchor or popup because in both cases the border may be on an inner node. if (/^(above|below)/.test(positions[0])) { var anchorBorder = domGeometry.getBorderExtents(anchor), anchorChildBorder = anchor.firstChild ? domGeometry.getBorderExtents(anchor.firstChild) : { t: 0, l: 0, b: 0, r: 0 }, nodeBorder = domGeometry.getBorderExtents(node), nodeChildBorder = node.firstChild ? domGeometry.getBorderExtents(node.firstChild) : { t: 0, l: 0, b: 0, r: 0 }; aroundNodePos.y += Math.min(anchorBorder.t + anchorChildBorder.t, nodeBorder.t + nodeChildBorder.t); aroundNodePos.h -= Math.min(anchorBorder.t + anchorChildBorder.t, nodeBorder.t + nodeChildBorder.t) + Math.min(anchorBorder.b + anchorChildBorder.b, nodeBorder.b + nodeChildBorder.b); } } else { aroundNodePos = anchor; } // Compute position and size of visible part of anchor (it may be partially hidden by ancestor nodes w/scrollbars) if (anchor.parentNode) { // ignore nodes between position:relative and position:absolute var sawPosAbsolute = domStyle.getComputedStyle(anchor).position == "absolute"; var parent = anchor.parentNode; while (parent && parent.nodeType == 1 && parent.nodeName != "BODY") { //ignoring the body will help performance var parentPos = domGeometry.position(parent, true), pcs = domStyle.getComputedStyle(parent); if (/relative|absolute/.test(pcs.position)) { sawPosAbsolute = false; } if (!sawPosAbsolute && /hidden|auto|scroll/.test(pcs.overflow)) { var bottomYCoord = Math.min(aroundNodePos.y + aroundNodePos.h, parentPos.y + parentPos.h); var rightXCoord = Math.min(aroundNodePos.x + aroundNodePos.w, parentPos.x + parentPos.w); aroundNodePos.x = Math.max(aroundNodePos.x, parentPos.x); aroundNodePos.y = Math.max(aroundNodePos.y, parentPos.y); aroundNodePos.h = bottomYCoord - aroundNodePos.y; aroundNodePos.w = rightXCoord - aroundNodePos.x; } if (pcs.position == "absolute") { sawPosAbsolute = true; } parent = parent.parentNode; } } var x = aroundNodePos.x, y = aroundNodePos.y, width = "w" in aroundNodePos ? aroundNodePos.w : aroundNodePos.w = aroundNodePos.width, height = "h" in aroundNodePos ? aroundNodePos.h : (kernel.deprecated("place.around: dijit/place.__Rectangle: { x:" + x + ", y:" + y + ", height:" + aroundNodePos.height + ", width:" + width + " } has been deprecated. Please use { x:" + x + ", y:" + y + ", h:" + aroundNodePos.height + ", w:" + width + " }", "", "2.0"), aroundNodePos.h = aroundNodePos.height); // Convert positions arguments into choices argument for _place() var choices = []; function push(aroundCorner, corner) { choices.push({ aroundCorner: aroundCorner, corner: corner, pos: { x: { 'L': x, 'R': x + width, 'M': x + (width >> 1) }[aroundCorner.charAt(1)], y: { 'T': y, 'B': y + height, 'M': y + (height >> 1) }[aroundCorner.charAt(0)] } }); } array.forEach(positions, function (pos) { var ltr = leftToRight; switch (pos) { case "above-centered": push("TM", "BM"); break; case "below-centered": push("BM", "TM"); break; case "after-centered": ltr = !ltr; // fall through case "before-centered": push(ltr ? "ML" : "MR", ltr ? "MR" : "ML"); break; case "after": ltr = !ltr; // fall through case "before": push(ltr ? "TL" : "TR", ltr ? "TR" : "TL"); push(ltr ? "BL" : "BR", ltr ? "BR" : "BL"); break; case "below-alt": ltr = !ltr; // fall through case "below": // first try to align left borders, next try to align right borders (or reverse for RTL mode) push(ltr ? "BL" : "BR", ltr ? "TL" : "TR"); push(ltr ? "BR" : "BL", ltr ? "TR" : "TL"); break; case "above-alt": ltr = !ltr; // fall through case "above": // first try to align left borders, next try to align right borders (or reverse for RTL mode) push(ltr ? "TL" : "TR", ltr ? "BL" : "BR"); push(ltr ? "TR" : "TL", ltr ? "BR" : "BL"); break; default: // To assist dijit/_base/place, accept arguments of type {aroundCorner: "BL", corner: "TL"}. // Not meant to be used directly. Remove for 2.0. push(pos.aroundCorner, pos.corner); } }); var position = _place(node, choices, layoutNode, { w: width, h: height }); position.aroundNodePos = aroundNodePos; return position; } }; /*===== place.__Position = { // x: Integer // horizontal coordinate in pixels, relative to document body // y: Integer // vertical coordinate in pixels, relative to document body }; place.__Rectangle = { // x: Integer // horizontal offset in pixels, relative to document body // y: Integer // vertical offset in pixels, relative to document body // w: Integer // width in pixels. Can also be specified as "width" for backwards-compatibility. // h: Integer // height in pixels. Can also be specified as "height" for backwards-compatibility. }; =====*/ return dijit.place = place; // setting dijit.place for back-compat, remove for 2.0 }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dijit/registry.js": /*!****************************************!*\ !*** ./node_modules/dijit/registry.js ***! \****************************************/ /*! no static exports found */ /***/ function node_modulesDijitRegistryJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/_base/array */ "./node_modules/dojo/_base/array.js"), // array.forEach array.map __webpack_require__( /*! dojo/_base/window */ "./node_modules/dojo/_base/window.js"), // win.body __webpack_require__( /*! ./main */ "./node_modules/dijit/main.js") // dijit._scopeName ], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, win, dijit) { // module: // dijit/registry var _widgetTypeCtr = {}, hash = {}; var registry = { // summary: // Registry of existing widget on page, plus some utility methods. // length: Number // Number of registered widgets length: 0, add: function add(widget) { // summary: // Add a widget to the registry. If a duplicate ID is detected, a error is thrown. // widget: dijit/_WidgetBase // Any dijit/_WidgetBase subclass. if (hash[widget.id]) { throw new Error("Tried to register widget with id==" + widget.id + " but that id is already registered"); } hash[widget.id] = widget; this.length++; }, remove: function remove( /*String*/ id) { // summary: // Remove a widget from the registry. Does not destroy the widget; simply // removes the reference. if (hash[id]) { delete hash[id]; this.length--; } }, byId: function byId( /*String|Widget*/ id) { // summary: // Find a widget by it's id. // If passed a widget then just returns the widget. return typeof id == "string" ? hash[id] : id; // dijit/_WidgetBase }, byNode: function byNode( /*DOMNode*/ node) { // summary: // Returns the widget corresponding to the given DOMNode return hash[node.getAttribute("widgetId")]; // dijit/_WidgetBase }, toArray: function toArray() { // summary: // Convert registry into a true Array // // example: // Work with the widget .domNodes in a real Array // | array.map(registry.toArray(), function(w){ return w.domNode; }); var ar = []; for (var id in hash) { ar.push(hash[id]); } return ar; // dijit/_WidgetBase[] }, getUniqueId: function getUniqueId( /*String*/ widgetType) { // summary: // Generates a unique id for a given widgetType var id; do { id = widgetType + "_" + (widgetType in _widgetTypeCtr ? ++_widgetTypeCtr[widgetType] : _widgetTypeCtr[widgetType] = 0); } while (hash[id]); return dijit._scopeName == "dijit" ? id : dijit._scopeName + "_" + id; // String }, findWidgets: function findWidgets(root, skipNode) { // summary: // Search subtree under root returning widgets found. // Doesn't search for nested widgets (ie, widgets inside other widgets). // root: DOMNode // Node to search under. // skipNode: DOMNode // If specified, don't search beneath this node (usually containerNode). var outAry = []; function getChildrenHelper(root) { for (var node = root.firstChild; node; node = node.nextSibling) { if (node.nodeType == 1) { var widgetId = node.getAttribute("widgetId"); if (widgetId) { var widget = hash[widgetId]; if (widget) { // may be null on page w/multiple dojo's loaded outAry.push(widget); } } else if (node !== skipNode) { getChildrenHelper(node); } } } } getChildrenHelper(root); return outAry; }, _destroyAll: function _destroyAll() { // summary: // Code to destroy all widgets and do other cleanup on page unload // Clean up focus manager lingering references to widgets and nodes dijit._curFocus = null; dijit._prevFocus = null; dijit._activeStack = []; // Destroy all the widgets, top down array.forEach(registry.findWidgets(win.body()), function (widget) { // Avoid double destroy of widgets like Menu that are attached to <body> // even though they are logically children of other widgets. if (!widget._destroyed) { if (widget.destroyRecursive) { widget.destroyRecursive(); } else if (widget.destroy) { widget.destroy(); } } }); }, getEnclosingWidget: function getEnclosingWidget( /*DOMNode*/ node) { // summary: // Returns the widget whose DOM tree contains the specified DOMNode, or null if // the node is not contained within the DOM tree of any widget while (node) { var id = node.nodeType == 1 && node.getAttribute("widgetId"); if (id) { return hash[id]; } node = node.parentNode; } return null; }, // In case someone needs to access hash. // Actually, this is accessed from WidgetSet back-compatibility code _hash: hash }; dijit.registry = registry; return registry; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/arcgis-js-api/identity/nls/identity.js": /*!******************************************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/i18n!./node_modules/arcgis-js-api/identity/nls/identity.js ***! \******************************************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoI18nIndexJsNode_modulesArcgisJsApiIdentityNlsIdentityJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/i18n */ "./node_modules/dojo/i18n.js"), __webpack_require__( /*! ./node_modules/dojo-webpack-plugin/loaders/dojo/runner.js */ "./node_modules/dojo-webpack-plugin/loaders/dojo/runner.js"), __webpack_require__( /*! esri/identity/nls/vi/identity */ "./node_modules/arcgis-js-api/identity/nls/vi/identity.js"), __webpack_require__( /*! ./node_modules/arcgis-js-api/identity/nls/identity.js?absMid=esri/identity/nls/identity */ "./node_modules/arcgis-js-api/identity/nls/identity.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (loader, runner) { return runner(loader, "esri/identity/nls/identity", __webpack_require__.dj.c(), false); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/form/nls/validate.js": /*!******************************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/i18n!./node_modules/dijit/form/nls/validate.js ***! \******************************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoI18nIndexJsNode_modulesDijitFormNlsValidateJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/i18n */ "./node_modules/dojo/i18n.js"), __webpack_require__( /*! ./node_modules/dojo-webpack-plugin/loaders/dojo/runner.js */ "./node_modules/dojo-webpack-plugin/loaders/dojo/runner.js"), __webpack_require__( /*! dijit/form/nls/vi/validate */ "./node_modules/dijit/form/nls/vi/validate.js"), __webpack_require__( /*! ./node_modules/dijit/form/nls/validate.js?absMid=dijit/form/nls/validate */ "./node_modules/dijit/form/nls/validate.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (loader, runner) { return runner(loader, "dijit/form/nls/validate", __webpack_require__.dj.c(), false); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/nls/common.js": /*!***********************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/i18n!./node_modules/dijit/nls/common.js ***! \***********************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoI18nIndexJsNode_modulesDijitNlsCommonJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/i18n */ "./node_modules/dojo/i18n.js"), __webpack_require__( /*! ./node_modules/dojo-webpack-plugin/loaders/dojo/runner.js */ "./node_modules/dojo-webpack-plugin/loaders/dojo/runner.js"), __webpack_require__( /*! dijit/nls/vi/common */ "./node_modules/dijit/nls/vi/common.js"), __webpack_require__( /*! ./node_modules/dijit/nls/common.js?absMid=dijit/nls/common */ "./node_modules/dijit/nls/common.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (loader, runner) { return runner(loader, "dijit/nls/common", __webpack_require__.dj.c(), false); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/i18n/index.js!./node_modules/dijit/nls/loading.js": /*!************************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/i18n!./node_modules/dijit/nls/loading.js ***! \************************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoI18nIndexJsNode_modulesDijitNlsLoadingJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! dojo/i18n */ "./node_modules/dojo/i18n.js"), __webpack_require__( /*! ./node_modules/dojo-webpack-plugin/loaders/dojo/runner.js */ "./node_modules/dojo-webpack-plugin/loaders/dojo/runner.js"), __webpack_require__( /*! dijit/nls/vi/loading */ "./node_modules/dijit/nls/vi/loading.js"), __webpack_require__( /*! ./node_modules/dijit/nls/loading.js?absMid=dijit/nls/loading */ "./node_modules/dijit/nls/loading.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (loader, runner) { return runner(loader, "dijit/nls/loading", __webpack_require__.dj.c(), false); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/Button.html": /*!************************************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/text!./node_modules/dijit/form/templates/Button.html ***! \************************************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoTextIndexJsNode_modulesDijitFormTemplatesButtonHtml(module, exports) { module.exports = "<span class=\"dijit dijitReset dijitInline\" role=\"presentation\"\n\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\tdata-dojo-attach-event=\"ondijitclick:__onClick\" role=\"presentation\"\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\tdata-dojo-attach-point=\"titleNode,focusNode\"\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\" data-dojo-attach-point=\"iconNode\"></span\n\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">●</span\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\tid=\"${id}_label\"\n\t\t\t\tdata-dojo-attach-point=\"containerNode\"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\n\t\tdata-dojo-attach-event=\"onclick:_onClick\"\n\t\ttabIndex=\"-1\" aria-hidden=\"true\" data-dojo-attach-point=\"valueNode\"\n/></span>\n"; /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/TextBox.html": /*!*************************************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/text!./node_modules/dijit/form/templates/TextBox.html ***! \*************************************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoTextIndexJsNode_modulesDijitFormTemplatesTextBoxHtml(module, exports) { module.exports = "<div class=\"dijit dijitReset dijitInline dijitLeft\" id=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class=\"dijitReset dijitInputInner\" data-dojo-attach-point='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${!nameAttrSetting} type='${type}'\n\t/></div\n></div>\n"; /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/form/templates/ValidationTextBox.html": /*!***********************************************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/text!./node_modules/dijit/form/templates/ValidationTextBox.html ***! \***********************************************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoTextIndexJsNode_modulesDijitFormTemplatesValidationTextBoxHtml(module, exports) { module.exports = "<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"Χ \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class=\"dijitReset dijitInputInner\" data-dojo-attach-point='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${!nameAttrSetting} type='${type}'\n\t/></div\n></div>\n"; /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/templates/Dialog.html": /*!*******************************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/text!./node_modules/dijit/templates/Dialog.html ***! \*******************************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoTextIndexJsNode_modulesDijitTemplatesDialogHtml(module, exports) { module.exports = "<div class=\"dijitDialog\" role=\"dialog\" aria-labelledby=\"${id}_title\">\n\t<div data-dojo-attach-point=\"titleBar\" class=\"dijitDialogTitleBar\">\n\t\t<span data-dojo-attach-point=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"\n\t\t\t\trole=\"heading\" level=\"1\"></span>\n\t\t<span data-dojo-attach-point=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" data-dojo-attach-event=\"ondijitclick: onCancel\" title=\"${buttonCancel}\" role=\"button\" tabindex=\"-1\">\n\t\t\t<span data-dojo-attach-point=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\n\t\t</span>\n\t</div>\n\t<div data-dojo-attach-point=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\n\t${!actionBarTemplate}\n</div>\n\n"; /***/ }, /***/ "./node_modules/dojo-webpack-plugin/loaders/dojo/text/index.js!./node_modules/dijit/templates/Tooltip.html": /*!********************************************************************************************************!*\ !*** ./node_modules/dojo-webpack-plugin/loaders/dojo/text!./node_modules/dijit/templates/Tooltip.html ***! \********************************************************************************************************/ /*! no static exports found */ /***/ function node_modulesDojoWebpackPluginLoadersDojoTextIndexJsNode_modulesDijitTemplatesTooltipHtml(module, exports) { module.exports = "<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\" data-dojo-attach-event=\"mouseenter:onMouseEnter,mouseleave:onMouseLeave\"\n\t><div class=\"dijitTooltipConnector\" data-dojo-attach-point=\"connectorNode\"></div\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" data-dojo-attach-point=\"containerNode\" role='alert'></div\n></div>\n"; /***/ }, /***/ "./node_modules/dojo/_base/fx.js": /*!***************************************!*\ !*** ./node_modules/dojo/_base/fx.js ***! \***************************************/ /*! no static exports found */ /***/ function node_modulesDojo_baseFxJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! ./config */ "./node_modules/dojo/_base/config.js"), /*===== "./declare", =====*/ __webpack_require__( /*! ./lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ../Evented */ "./node_modules/dojo/Evented.js"), __webpack_require__( /*! ./Color */ "./node_modules/dojo/_base/Color.js"), __webpack_require__( /*! ../aspect */ "./node_modules/dojo/aspect.js"), __webpack_require__( /*! ../sniff */ "./node_modules/dojo/sniff.js"), __webpack_require__( /*! ../dom */ "./node_modules/dojo/dom.js"), __webpack_require__( /*! ../dom-style */ "./node_modules/dojo/dom-style.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (dojo, config, /*===== declare, =====*/ lang, Evented, Color, aspect, has, dom, style) { // module: // dojo/_base/fx // notes: // Animation loosely package based on Dan Pupius' work, contributed under CLA; see // http://pupius.co.uk/js/Toolkit.Drawing.js var _mixin = lang.mixin; // Module export var basefx = {// summary: // This module defines the base dojo/_base/fx implementation. }; var _Line = basefx._Line = function ( /*int*/ start, /*int*/ end) { // summary: // Object used to generate values from a start value to an end value // start: int // Beginning value for range // end: int // Ending value for range this.start = start; this.end = end; }; _Line.prototype.getValue = function ( /*float*/ n) { // summary: // Returns the point on the line // n: // a floating point number greater than 0 and less than 1 return (this.end - this.start) * n + this.start; // Decimal }; var Animation = basefx.Animation = function (args) { // summary: // A generic animation class that fires callbacks into its handlers // object at various states. // description: // A generic animation class that fires callbacks into its handlers // object at various states. Nearly all dojo animation functions // return an instance of this method, usually without calling the // .play() method beforehand. Therefore, you will likely need to // call .play() on instances of `Animation` when one is // returned. // args: Object // The 'magic argument', mixing all the properties into this // animation instance. _mixin(this, args); if (lang.isArray(this.curve)) { this.curve = new _Line(this.curve[0], this.curve[1]); } }; Animation.prototype = new Evented(); lang.extend(Animation, { // duration: Integer // The time in milliseconds the animation will take to run duration: 350, /*===== // curve: _Line|Array // A two element array of start and end values, or a `_Line` instance to be // used in the Animation. curve: null, // easing: Function? // A Function to adjust the acceleration (or deceleration) of the progress // across a _Line easing: null, =====*/ // repeat: Integer? // The number of times to loop the animation repeat: 0, // rate: Integer? // the time in milliseconds to wait before advancing to next frame // (used as a fps timer: 1000/rate = fps) rate: 20 /* 50 fps */ , /*===== // delay: Integer? // The time in milliseconds to wait before starting animation after it // has been .play()'ed delay: null, // beforeBegin: Event? // Synthetic event fired before a Animation begins playing (synchronous) beforeBegin: null, // onBegin: Event? // Synthetic event fired as a Animation begins playing (useful?) onBegin: null, // onAnimate: Event? // Synthetic event fired at each interval of the Animation onAnimate: null, // onEnd: Event? // Synthetic event fired after the final frame of the Animation onEnd: null, // onPlay: Event? // Synthetic event fired any time the Animation is play()'ed onPlay: null, // onPause: Event? // Synthetic event fired when the Animation is paused onPause: null, // onStop: Event // Synthetic event fires when the Animation is stopped onStop: null, =====*/ _percent: 0, _startRepeatCount: 0, _getStep: function _getStep() { var _p = this._percent, _e = this.easing; return _e ? _e(_p) : _p; }, _fire: function _fire( /*Event*/ evt, /*Array?*/ args) { // summary: // Convenience function. Fire event "evt" and pass it the // arguments specified in "args". // description: // Convenience function. Fire event "evt" and pass it the // arguments specified in "args". // Fires the callback in the scope of this Animation // instance. // evt: // The event to fire. // args: // The arguments to pass to the event. var a = args || []; if (this[evt]) { if (config.debugAtAllCosts) { this[evt].apply(this, a); } else { try { this[evt].apply(this, a); } catch (e) { // squelch and log because we shouldn't allow exceptions in // synthetic event handlers to cause the internal timer to run // amuck, potentially pegging the CPU. I'm not a fan of this // squelch, but hopefully logging will make it clear what's // going on console.error("exception in animation handler for:", evt); console.error(e); } } } return this; // Animation }, play: function play( /*int?*/ delay, /*Boolean?*/ gotoStart) { // summary: // Start the animation. // delay: // How many milliseconds to delay before starting. // gotoStart: // If true, starts the animation from the beginning; otherwise, // starts it from its current position. // returns: Animation // The instance to allow chaining. var _t = this; if (_t._delayTimer) { _t._clearTimer(); } if (gotoStart) { _t._stopTimer(); _t._active = _t._paused = false; _t._percent = 0; } else if (_t._active && !_t._paused) { return _t; } _t._fire("beforeBegin", [_t.node]); var de = delay || _t.delay, _p = lang.hitch(_t, "_play", gotoStart); if (de > 0) { _t._delayTimer = setTimeout(_p, de); return _t; } _p(); return _t; // Animation }, _play: function _play(gotoStart) { var _t = this; if (_t._delayTimer) { _t._clearTimer(); } _t._startTime = new Date().valueOf(); if (_t._paused) { _t._startTime -= _t.duration * _t._percent; } _t._active = true; _t._paused = false; var value = _t.curve.getValue(_t._getStep()); if (!_t._percent) { if (!_t._startRepeatCount) { _t._startRepeatCount = _t.repeat; } _t._fire("onBegin", [value]); } _t._fire("onPlay", [value]); _t._cycle(); return _t; // Animation }, pause: function pause() { // summary: // Pauses a running animation. var _t = this; if (_t._delayTimer) { _t._clearTimer(); } _t._stopTimer(); if (!_t._active) { return _t; /*Animation*/ } _t._paused = true; _t._fire("onPause", [_t.curve.getValue(_t._getStep())]); return _t; // Animation }, gotoPercent: function gotoPercent( /*Decimal*/ percent, /*Boolean?*/ andPlay) { // summary: // Sets the progress of the animation. // percent: // A percentage in decimal notation (between and including 0.0 and 1.0). // andPlay: // If true, play the animation after setting the progress. var _t = this; _t._stopTimer(); _t._active = _t._paused = true; _t._percent = percent; if (andPlay) { _t.play(); } return _t; // Animation }, stop: function stop( /*boolean?*/ gotoEnd) { // summary: // Stops a running animation. // gotoEnd: // If true, the animation will end. var _t = this; if (_t._delayTimer) { _t._clearTimer(); } if (!_t._timer) { return _t; /* Animation */ } _t._stopTimer(); if (gotoEnd) { _t._percent = 1; } _t._fire("onStop", [_t.curve.getValue(_t._getStep())]); _t._active = _t._paused = false; return _t; // Animation }, destroy: function destroy() { // summary: // cleanup the animation this.stop(); }, status: function status() { // summary: // Returns a string token representation of the status of // the animation, one of: "paused", "playing", "stopped" if (this._active) { return this._paused ? "paused" : "playing"; // String } return "stopped"; // String }, _cycle: function _cycle() { var _t = this; if (_t._active) { var curr = new Date().valueOf(); // Allow durations of 0 (instant) by setting step to 1 - see #13798 var step = _t.duration === 0 ? 1 : (curr - _t._startTime) / _t.duration; if (step >= 1) { step = 1; } _t._percent = step; // Perform easing if (_t.easing) { step = _t.easing(step); } _t._fire("onAnimate", [_t.curve.getValue(step)]); if (_t._percent < 1) { _t._startTimer(); } else { _t._active = false; if (_t.repeat > 0) { _t.repeat--; _t.play(null, true); } else if (_t.repeat == -1) { _t.play(null, true); } else { if (_t._startRepeatCount) { _t.repeat = _t._startRepeatCount; _t._startRepeatCount = 0; } } _t._percent = 0; _t._fire("onEnd", [_t.node]); !_t.repeat && _t._stopTimer(); } } return _t; // Animation }, _clearTimer: function _clearTimer() { // summary: // Clear the play delay timer clearTimeout(this._delayTimer); delete this._delayTimer; } }); // the local timer, stubbed into all Animation instances var ctr = 0, timer = null, runner = { run: function run() {} }; lang.extend(Animation, { _startTimer: function _startTimer() { if (!this._timer) { this._timer = aspect.after(runner, "run", lang.hitch(this, "_cycle"), true); ctr++; } if (!timer) { timer = setInterval(lang.hitch(runner, "run"), this.rate); } }, _stopTimer: function _stopTimer() { if (this._timer) { this._timer.remove(); this._timer = null; ctr--; } if (ctr <= 0) { clearInterval(timer); timer = null; ctr = 0; } } }); var _makeFadeable = has("ie") ? function (node) { // only set the zoom if the "tickle" value would be the same as the // default var ns = node.style; // don't set the width to auto if it didn't already cascade that way. // We don't want to f anyones designs if (!ns.width.length && style.get(node, "width") == "auto") { ns.width = "auto"; } } : function () {}; basefx._fade = function ( /*Object*/ args) { // summary: // Returns an animation that will fade the node defined by // args.node from the start to end values passed (args.start // args.end) (end is mandatory, start is optional) args.node = dom.byId(args.node); var fArgs = _mixin({ properties: {} }, args), props = fArgs.properties.opacity = {}; props.start = !("start" in fArgs) ? function () { return +style.get(fArgs.node, "opacity") || 0; } : fArgs.start; props.end = fArgs.end; var anim = basefx.animateProperty(fArgs); aspect.after(anim, "beforeBegin", lang.partial(_makeFadeable, fArgs.node), true); return anim; // Animation }; /*===== var __FadeArgs = declare(null, { // node: DOMNode|String // The node referenced in the animation // duration: Integer? // Duration of the animation in milliseconds. // easing: Function? // An easing function. }); =====*/ basefx.fadeIn = function ( /*__FadeArgs*/ args) { // summary: // Returns an animation that will fade node defined in 'args' from // its current opacity to fully opaque. return basefx._fade(_mixin({ end: 1 }, args)); // Animation }; basefx.fadeOut = function ( /*__FadeArgs*/ args) { // summary: // Returns an animation that will fade node defined in 'args' // from its current opacity to fully transparent. return basefx._fade(_mixin({ end: 0 }, args)); // Animation }; basefx._defaultEasing = function ( /*Decimal?*/ n) { // summary: // The default easing function for Animation(s) return 0.5 + Math.sin((n + 1.5) * Math.PI) / 2; // Decimal }; var PropLine = function PropLine(properties) { // PropLine is an internal class which is used to model the values of // an a group of CSS properties across an animation lifecycle. In // particular, the "getValue" function handles getting interpolated // values between start and end for a particular CSS value. this._properties = properties; for (var p in properties) { var prop = properties[p]; if (prop.start instanceof Color) { // create a reusable temp color object to keep intermediate results prop.tempColor = new Color(); } } }; PropLine.prototype.getValue = function (r) { var ret = {}; for (var p in this._properties) { var prop = this._properties[p], start = prop.start; if (start instanceof Color) { ret[p] = Color.blendColors(start, prop.end, r, prop.tempColor).toCss(); } else if (!lang.isArray(start)) { ret[p] = (prop.end - start) * r + start + (p != "opacity" ? prop.units || "px" : 0); } } return ret; }; /*===== var __AnimArgs = declare(__FadeArgs, { // properties: Object? // A hash map of style properties to Objects describing the transition, // such as the properties of _Line with an additional 'units' property properties: {} //TODOC: add event callbacks }); =====*/ basefx.animateProperty = function ( /*__AnimArgs*/ args) { // summary: // Returns an animation that will transition the properties of // node defined in `args` depending how they are defined in // `args.properties` // // description: // Foundation of most `dojo/_base/fx` // animations. It takes an object of "properties" corresponding to // style properties, and animates them in parallel over a set // duration. // // example: // A simple animation that changes the width of the specified node. // | basefx.animateProperty({ // | node: "nodeId", // | properties: { width: 400 }, // | }).play(); // Dojo figures out the start value for the width and converts the // integer specified for the width to the more expressive but // verbose form `{ width: { end: '400', units: 'px' } }` which you // can also specify directly. Defaults to 'px' if omitted. // // example: // Animate width, height, and padding over 2 seconds... the // pedantic way: // | basefx.animateProperty({ node: node, duration:2000, // | properties: { // | width: { start: '200', end: '400', units:"px" }, // | height: { start:'200', end: '400', units:"px" }, // | paddingTop: { start:'5', end:'50', units:"px" } // | } // | }).play(); // Note 'paddingTop' is used over 'padding-top'. Multi-name CSS properties // are written using "mixed case", as the hyphen is illegal as an object key. // // example: // Plug in a different easing function and register a callback for // when the animation ends. Easing functions accept values between // zero and one and return a value on that basis. In this case, an // exponential-in curve. // | basefx.animateProperty({ // | node: "nodeId", // | // dojo figures out the start value // | properties: { width: { end: 400 } }, // | easing: function(n){ // | return (n==0) ? 0 : Math.pow(2, 10 * (n - 1)); // | }, // | onEnd: function(node){ // | // called when the animation finishes. The animation // | // target is passed to this function // | } // | }).play(500); // delay playing half a second // // example: // Like all `Animation`s, animateProperty returns a handle to the // Animation instance, which fires the events common to Dojo FX. Use `aspect.after` // to access these events outside of the Animation definition: // | var anim = basefx.animateProperty({ // | node:"someId", // | properties:{ // | width:400, height:500 // | } // | }); // | aspect.after(anim, "onEnd", function(){ // | console.log("animation ended"); // | }, true); // | // play the animation now: // | anim.play(); // // example: // Each property can be a function whose return value is substituted along. // Additionally, each measurement (eg: start, end) can be a function. The node // reference is passed directly to callbacks. // | basefx.animateProperty({ // | node:"mine", // | properties:{ // | height:function(node){ // | // shrink this node by 50% // | return domGeom.position(node).h / 2 // | }, // | width:{ // | start:function(node){ return 100; }, // | end:function(node){ return 200; } // | } // | } // | }).play(); // var n = args.node = dom.byId(args.node); if (!args.easing) { args.easing = dojo._defaultEasing; } var anim = new Animation(args); aspect.after(anim, "beforeBegin", lang.hitch(anim, function () { var _this2 = this; var pm = {}; var _loop = function _loop() { // Make shallow copy of properties into pm because we overwrite // some values below. In particular if start/end are functions // we don't want to overwrite them or the functions won't be // called if the animation is reused. if (p == "width" || p == "height") { _this2.node.display = "block"; } prop = _this2.properties[p]; if (lang.isFunction(prop)) { prop = prop(n); } prop = pm[p] = _mixin({}, lang.isObject(prop) ? prop : { end: prop }); if (lang.isFunction(prop.start)) { prop.start = prop.start(n); } if (lang.isFunction(prop.end)) { prop.end = prop.end(n); } isColor = p.toLowerCase().indexOf("color") >= 0; function getStyle(node, p) { // domStyle.get(node, "height") can return "auto" or "" on IE; this is more reliable: var v = { height: node.offsetHeight, width: node.offsetWidth }[p]; if (v !== undefined) { return v; } v = style.get(node, p); return p == "opacity" ? +v : isColor ? v : parseFloat(v); } if (!("end" in prop)) { prop.end = getStyle(n, p); } else if (!("start" in prop)) { prop.start = getStyle(n, p); } if (isColor) { prop.start = new Color(prop.start); prop.end = new Color(prop.end); } else { prop.start = p == "opacity" ? +prop.start : parseFloat(prop.start); } }; for (var p in this.properties) { var prop, isColor; _loop(); } this.curve = new PropLine(pm); }), true); aspect.after(anim, "onAnimate", lang.hitch(style, "set", anim.node), true); return anim; // Animation }; basefx.anim = function ( /*DOMNode|String*/ node, /*Object*/ properties, /*Integer?*/ duration, /*Function?*/ easing, /*Function?*/ onEnd, /*Integer?*/ delay) { // summary: // A simpler interface to `animateProperty()`, also returns // an instance of `Animation` but begins the animation // immediately, unlike nearly every other Dojo animation API. // description: // Simpler (but somewhat less powerful) version // of `animateProperty`. It uses defaults for many basic properties // and allows for positional parameters to be used in place of the // packed "property bag" which is used for other Dojo animation // methods. // // The `Animation` object returned will be already playing, so // calling play() on it again is (usually) a no-op. // node: // a DOM node or the id of a node to animate CSS properties on // duration: // The number of milliseconds over which the animation // should run. Defaults to the global animation default duration // (350ms). // easing: // An easing function over which to calculate acceleration // and deceleration of the animation through its duration. // A default easing algorithm is provided, but you may // plug in any you wish. A large selection of easing algorithms // are available in `dojo/fx/easing`. // onEnd: // A function to be called when the animation finishes // running. // delay: // The number of milliseconds to delay beginning the // animation by. The default is 0. // example: // Fade out a node // | basefx.anim("id", { opacity: 0 }); // example: // Fade out a node over a full second // | basefx.anim("id", { opacity: 0 }, 1000); return basefx.animateProperty({ // Animation node: node, duration: duration || Animation.prototype.duration, properties: properties, easing: easing, onEnd: onEnd }).play(delay || 0); }; if (true) { _mixin(dojo, basefx); // Alias to drop come 2.0: dojo._Animation = Animation; } return basefx; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/_base/url.js": /*!****************************************!*\ !*** ./node_modules/dojo/_base/url.js ***! \****************************************/ /*! no static exports found */ /***/ function node_modulesDojo_baseUrlJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./kernel */ "./node_modules/dojo/_base/kernel.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (dojo) { // module: // dojo/url var ore = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"), ire = new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"), _Url = function _Url() { var n = null, _a = arguments, uri = [_a[0]]; // resolve uri components relative to each other for (var i = 1; i < _a.length; i++) { if (!_a[i]) { continue; } // Safari doesn't support this.constructor so we have to be explicit // FIXME: Tracked (and fixed) in Webkit bug 3537. // http://bugs.webkit.org/show_bug.cgi?id=3537 var relobj = new _Url(_a[i] + ""), uriobj = new _Url(uri[0] + ""); if (relobj.path == "" && !relobj.scheme && !relobj.authority && !relobj.query) { if (relobj.fragment != n) { uriobj.fragment = relobj.fragment; } relobj = uriobj; } else if (!relobj.scheme) { relobj.scheme = uriobj.scheme; if (!relobj.authority) { relobj.authority = uriobj.authority; if (relobj.path.charAt(0) != "/") { var path = uriobj.path.substring(0, uriobj.path.lastIndexOf("/") + 1) + relobj.path; var segs = path.split("/"); for (var j = 0; j < segs.length; j++) { if (segs[j] == ".") { // flatten "./" references if (j == segs.length - 1) { segs[j] = ""; } else { segs.splice(j, 1); j--; } } else if (j > 0 && !(j == 1 && segs[0] == "") && segs[j] == ".." && segs[j - 1] != "..") { // flatten "../" references if (j == segs.length - 1) { segs.splice(j, 1); segs[j - 1] = ""; } else { segs.splice(j - 1, 2); j -= 2; } } } relobj.path = segs.join("/"); } } } uri = []; if (relobj.scheme) { uri.push(relobj.scheme, ":"); } if (relobj.authority) { uri.push("//", relobj.authority); } uri.push(relobj.path); if (relobj.query) { uri.push("?", relobj.query); } if (relobj.fragment) { uri.push("#", relobj.fragment); } } this.uri = uri.join(""); // break the uri into its main components var r = this.uri.match(ore); this.scheme = r[2] || (r[1] ? "" : n); this.authority = r[4] || (r[3] ? "" : n); this.path = r[5]; // can never be undefined this.query = r[7] || (r[6] ? "" : n); this.fragment = r[9] || (r[8] ? "" : n); if (this.authority != n) { // server based naming authority r = this.authority.match(ire); this.user = r[3] || n; this.password = r[4] || n; this.host = r[6] || r[7]; // ipv6 || ipv4 this.port = r[9] || n; } }; _Url.prototype.toString = function () { return this.uri; }; return dojo._Url = _Url; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/cache.js": /*!************************************!*\ !*** ./node_modules/dojo/cache.js ***! \************************************/ /*! no static exports found */ /***/ function node_modulesDojoCacheJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! ./text */ "./node_modules/dojo/text.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (dojo) { // module: // dojo/cache // dojo.cache is defined in dojo/text return dojo.cache; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/date/stamp.js": /*!*****************************************!*\ !*** ./node_modules/dojo/date/stamp.js ***! \*****************************************/ /*! no static exports found */ /***/ function node_modulesDojoDateStampJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ../_base/array */ "./node_modules/dojo/_base/array.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (lang, array) { // module: // dojo/date/stamp var stamp = {// summary: // TODOC }; lang.setObject("dojo.date.stamp", stamp); // Methods to convert dates to or from a wire (string) format using well-known conventions stamp.fromISOString = function ( /*String*/ formattedString, /*Number?*/ defaultTime) { // summary: // Returns a Date object given a string formatted according to a subset of the ISO-8601 standard. // // description: // Accepts a string formatted according to a profile of ISO8601 as defined by // [RFC3339](http://www.ietf.org/rfc/rfc3339.txt), except that partial input is allowed. // Can also process dates as specified [by the W3C](http://www.w3.org/TR/NOTE-datetime) // The following combinations are valid: // // - dates only // - yyyy // - yyyy-MM // - yyyy-MM-dd // - times only, with an optional time zone appended // - THH:mm // - THH:mm:ss // - THH:mm:ss.SSS // - and "datetimes" which could be any combination of the above // // timezones may be specified as Z (for UTC) or +/- followed by a time expression HH:mm // Assumes the local time zone if not specified. Does not validate. Improperly formatted // input may return null. Arguments which are out of bounds will be handled // by the Date constructor (e.g. January 32nd typically gets resolved to February 1st) // Only years between 100 and 9999 are supported. // formattedString: // A string such as 2005-06-30T08:05:00-07:00 or 2005-06-30 or T08:05:00 // defaultTime: // Used for defaults for fields omitted in the formattedString. // Uses 1970-01-01T00:00:00.0Z by default. if (!stamp._isoRegExp) { stamp._isoRegExp = //TODO: could be more restrictive and check for 00-59, etc. /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/; } var match = stamp._isoRegExp.exec(formattedString), result = null; if (match) { match.shift(); if (match[1]) { match[1]--; } // Javascript Date months are 0-based if (match[6]) { match[6] *= 1000; } // Javascript Date expects fractional seconds as milliseconds if (defaultTime) { // mix in defaultTime. Relatively expensive, so use || operators for the fast path of defaultTime === 0 defaultTime = new Date(defaultTime); array.forEach(array.map(["FullYear", "Month", "Date", "Hours", "Minutes", "Seconds", "Milliseconds"], function (prop) { return defaultTime["get" + prop](); }), function (value, index) { match[index] = match[index] || value; }); } result = new Date(match[0] || 1970, match[1] || 0, match[2] || 1, match[3] || 0, match[4] || 0, match[5] || 0, match[6] || 0); //TODO: UTC defaults if (match[0] < 100) { result.setFullYear(match[0] || 1970); } var offset = 0, zoneSign = match[7] && match[7].charAt(0); if (zoneSign != 'Z') { offset = (match[8] || 0) * 60 + (Number(match[9]) || 0); if (zoneSign != '-') { offset *= -1; } } if (zoneSign) { offset -= result.getTimezoneOffset(); } if (offset) { result.setTime(result.getTime() + offset * 60000); } } return result; // Date or null }; /*===== var __Options = { // selector: String // "date" or "time" for partial formatting of the Date object. // Both date and time will be formatted by default. // zulu: Boolean // if true, UTC/GMT is used for a timezone // milliseconds: Boolean // if true, output milliseconds }; =====*/ stamp.toISOString = function ( /*Date*/ dateObject, /*__Options?*/ options) { // summary: // Format a Date object as a string according a subset of the ISO-8601 standard // // description: // When options.selector is omitted, output follows [RFC3339](http://www.ietf.org/rfc/rfc3339.txt) // The local time zone is included as an offset from GMT, except when selector=='time' (time without a date) // Does not check bounds. Only years between 100 and 9999 are supported. // // dateObject: // A Date object var _ = function _(n) { return n < 10 ? "0" + n : n; }; options = options || {}; var formattedDate = [], getter = options.zulu ? "getUTC" : "get", date = ""; if (options.selector != "time") { var year = dateObject[getter + "FullYear"](); date = ["0000".substr((year + "").length) + year, _(dateObject[getter + "Month"]() + 1), _(dateObject[getter + "Date"]())].join('-'); } formattedDate.push(date); if (options.selector != "date") { var time = [_(dateObject[getter + "Hours"]()), _(dateObject[getter + "Minutes"]()), _(dateObject[getter + "Seconds"]())].join(':'); var millis = dateObject[getter + "Milliseconds"](); if (options.milliseconds) { time += "." + (millis < 100 ? "0" : "") + _(millis); } if (options.zulu) { time += "Z"; } else if (options.selector != "time") { var timezoneOffset = dateObject.getTimezoneOffset(); var absOffset = Math.abs(timezoneOffset); time += (timezoneOffset > 0 ? "-" : "+") + _(Math.floor(absOffset / 60)) + ":" + _(absOffset % 60); } formattedDate.push(time); } return formattedDate.join('T'); // String }; return stamp; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/dnd/Moveable.js": /*!*******************************************!*\ !*** ./node_modules/dojo/dnd/Moveable.js ***! \*******************************************/ /*! no static exports found */ /***/ function node_modulesDojoDndMoveableJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../_base/array */ "./node_modules/dojo/_base/array.js"), __webpack_require__( /*! ../_base/declare */ "./node_modules/dojo/_base/declare.js"), __webpack_require__( /*! ../_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ../dom */ "./node_modules/dojo/dom.js"), __webpack_require__( /*! ../dom-class */ "./node_modules/dojo/dom-class.js"), __webpack_require__( /*! ../Evented */ "./node_modules/dojo/Evented.js"), __webpack_require__( /*! ../has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! ../on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! ../topic */ "./node_modules/dojo/topic.js"), __webpack_require__( /*! ../touch */ "./node_modules/dojo/touch.js"), __webpack_require__( /*! ./common */ "./node_modules/dojo/dnd/common.js"), __webpack_require__( /*! ./Mover */ "./node_modules/dojo/dnd/Mover.js"), __webpack_require__( /*! ../_base/window */ "./node_modules/dojo/_base/window.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, lang, dom, domClass, Evented, has, on, topic, touch, dnd, Mover, win) { // module: // dojo/dnd/Moveable var touchActionPropertyName; var setTouchAction = function setTouchAction() {}; function setTouchActionPropertyName() { if ("touchAction" in document.body.style) { touchActionPropertyName = "touchAction"; } else if ("msTouchAction" in document.body.style) { touchActionPropertyName = "msTouchAction"; } setTouchAction = function setTouchAction( /* Node */ node, /* string */ action) { node.style[touchActionPropertyName] = action; }; setTouchAction(arguments[0], arguments[1]); } if (true) { // Ensure that the logic to determine "touchActionPropertyName" runs setTouchAction = setTouchActionPropertyName; } var Moveable = declare("dojo.dnd.Moveable", [Evented], { // summary: // an object, which makes a node movable // object attributes (for markup) handle: "", delay: 0, skip: false, constructor: function constructor(node, params) { // node: Node // a node (or node's id) to be moved // params: Moveable.__MoveableArgs? // optional parameters this.node = dom.byId(node); setTouchAction(this.node, "none"); if (!params) { params = {}; } this.handle = params.handle ? dom.byId(params.handle) : null; if (!this.handle) { this.handle = this.node; } this.delay = params.delay > 0 ? params.delay : 0; this.skip = params.skip; this.mover = params.mover ? params.mover : Mover; this.events = [on(this.handle, touch.press, lang.hitch(this, "onMouseDown")), // cancel text selection and text dragging on(this.handle, "dragstart", lang.hitch(this, "onSelectStart")), on(this.handle, "selectstart", lang.hitch(this, "onSelectStart"))]; }, // markup methods markupFactory: function markupFactory(params, node, Ctor) { return new Ctor(node, params); }, // methods destroy: function destroy() { // summary: // stops watching for possible move, deletes all references, so the object can be garbage-collected array.forEach(this.events, function (handle) { handle.remove(); }); setTouchAction(this.node, ""); this.events = this.node = this.handle = null; }, // mouse event processors onMouseDown: function onMouseDown(e) { // summary: // event processor for onmousedown/ontouchstart, creates a Mover for the node // e: Event // mouse/touch event if (this.skip && dnd.isFormElement(e)) { return; } if (this.delay) { this.events.push(on(this.handle, touch.move, lang.hitch(this, "onMouseMove")), on(this.handle.ownerDocument, touch.release, lang.hitch(this, "onMouseUp"))); this._lastX = e.pageX; this._lastY = e.pageY; } else { this.onDragDetected(e); } e.stopPropagation(); e.preventDefault(); }, onMouseMove: function onMouseMove(e) { // summary: // event processor for onmousemove/ontouchmove, used only for delayed drags // e: Event // mouse/touch event if (Math.abs(e.pageX - this._lastX) > this.delay || Math.abs(e.pageY - this._lastY) > this.delay) { this.onMouseUp(e); this.onDragDetected(e); } e.stopPropagation(); e.preventDefault(); }, onMouseUp: function onMouseUp(e) { // summary: // event processor for onmouseup, used only for delayed drags // e: Event // mouse event for (var i = 0; i < 2; ++i) { this.events.pop().remove(); } e.stopPropagation(); e.preventDefault(); }, onSelectStart: function onSelectStart(e) { // summary: // event processor for onselectevent and ondragevent // e: Event // mouse event if (!this.skip || !dnd.isFormElement(e)) { e.stopPropagation(); e.preventDefault(); } }, // local events onDragDetected: function onDragDetected( /*Event*/ e) { // summary: // called when the drag is detected; // responsible for creation of the mover new this.mover(this.node, e, this); }, onMoveStart: function onMoveStart( /*Mover*/ mover) { // summary: // called before every move operation topic.publish("/dnd/move/start", mover); domClass.add(win.body(), "dojoMove"); domClass.add(this.node, "dojoMoveItem"); }, onMoveStop: function onMoveStop( /*Mover*/ mover) { // summary: // called after every move operation topic.publish("/dnd/move/stop", mover); domClass.remove(win.body(), "dojoMove"); domClass.remove(this.node, "dojoMoveItem"); }, onFirstMove: function onFirstMove() {// summary: // called during the very first move notification; // can be used to initialize coordinates, can be overwritten. // mover: Mover // e: Event // default implementation does nothing }, onMove: function onMove(mover, leftTop /*=====, e =====*/ ) { // summary: // called during every move notification; // should actually move the node; can be overwritten. // mover: Mover // leftTop: Object // e: Event this.onMoving(mover, leftTop); var s = mover.node.style; s.left = leftTop.l + "px"; s.top = leftTop.t + "px"; this.onMoved(mover, leftTop); }, onMoving: function onMoving() {// summary: // called before every incremental move; can be overwritten. // mover: Mover // leftTop: Object // default implementation does nothing }, onMoved: function onMoved() {// summary: // called after every incremental move; can be overwritten. // mover: Mover // leftTop: Object // default implementation does nothing } }); /*===== Moveable.__MoveableArgs = declare([], { // handle: Node||String // A node (or node's id), which is used as a mouse handle. // If omitted, the node itself is used as a handle. handle: null, // delay: Number // delay move by this number of pixels delay: 0, // skip: Boolean // skip move of form elements skip: false, // mover: Object // a constructor of custom Mover mover: dnd.Mover }); =====*/ return Moveable; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/dnd/Mover.js": /*!****************************************!*\ !*** ./node_modules/dojo/dnd/Mover.js ***! \****************************************/ /*! no static exports found */ /***/ function node_modulesDojoDndMoverJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../_base/array */ "./node_modules/dojo/_base/array.js"), __webpack_require__( /*! ../_base/declare */ "./node_modules/dojo/_base/declare.js"), __webpack_require__( /*! ../_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ../sniff */ "./node_modules/dojo/sniff.js"), __webpack_require__( /*! ../_base/window */ "./node_modules/dojo/_base/window.js"), __webpack_require__( /*! ../dom */ "./node_modules/dojo/dom.js"), __webpack_require__( /*! ../dom-geometry */ "./node_modules/dojo/dom-geometry.js"), __webpack_require__( /*! ../dom-style */ "./node_modules/dojo/dom-style.js"), __webpack_require__( /*! ../Evented */ "./node_modules/dojo/Evented.js"), __webpack_require__( /*! ../on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! ../touch */ "./node_modules/dojo/touch.js"), __webpack_require__( /*! ./common */ "./node_modules/dojo/dnd/common.js"), __webpack_require__( /*! ./autoscroll */ "./node_modules/dojo/dnd/autoscroll.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (array, declare, lang, has, win, dom, domGeom, domStyle, Evented, on, touch, dnd, autoscroll) { // module: // dojo/dnd/Mover return declare("dojo.dnd.Mover", [Evented], { // summary: // an object which makes a node follow the mouse, or touch-drag on touch devices. // Used as a default mover, and as a base class for custom movers. constructor: function constructor(node, e, host) { // node: Node // a node (or node's id) to be moved // e: Event // a mouse event, which started the move; // only pageX and pageY properties are used // host: Object? // object which implements the functionality of the move, // and defines proper events (onMoveStart and onMoveStop) this.node = dom.byId(node); this.marginBox = { l: e.pageX, t: e.pageY }; this.mouseButton = e.button; var h = this.host = host, d = node.ownerDocument; function stopEvent(e) { e.preventDefault(); e.stopPropagation(); } this.events = [// At the start of a drag, onFirstMove is called, and then the following // listener is disconnected. on(d, touch.move, lang.hitch(this, "onFirstMove")), // These are called continually during the drag on(d, touch.move, lang.hitch(this, "onMouseMove")), // And these are called at the end of the drag on(d, touch.release, lang.hitch(this, "onMouseUp")), // cancel text selection and text dragging on(d, "dragstart", stopEvent), on(d.body, "selectstart", stopEvent)]; // Tell autoscroll that a drag is starting autoscroll.autoScrollStart(d); // notify that the move has started if (h && h.onMoveStart) { h.onMoveStart(this); } }, // mouse event processors onMouseMove: function onMouseMove(e) { // summary: // event processor for onmousemove/ontouchmove // e: Event // mouse/touch event autoscroll.autoScroll(e); var m = this.marginBox; this.host.onMove(this, { l: m.l + e.pageX, t: m.t + e.pageY }, e); e.preventDefault(); e.stopPropagation(); }, onMouseUp: function onMouseUp(e) { if (has("webkit") && has("mac") && this.mouseButton == 2 ? e.button == 0 : this.mouseButton == e.button) { // TODO Should condition be met for touch devices, too? this.destroy(); } e.preventDefault(); e.stopPropagation(); }, // utilities onFirstMove: function onFirstMove(e) { // summary: // makes the node absolute; it is meant to be called only once. // relative and absolutely positioned nodes are assumed to use pixel units var s = this.node.style, l, t, h = this.host; switch (s.position) { case "relative": case "absolute": // assume that left and top values are in pixels already l = Math.round(parseFloat(s.left)) || 0; t = Math.round(parseFloat(s.top)) || 0; break; default: s.position = "absolute"; // enforcing the absolute mode var m = domGeom.getMarginBox(this.node); // event.pageX/pageY (which we used to generate the initial // margin box) includes padding and margin set on the body. // However, setting the node's position to absolute and then // doing domGeom.marginBox on it *doesn't* take that additional // space into account - so we need to subtract the combined // padding and margin. We use getComputedStyle and // _getMarginBox/_getContentBox to avoid the extra lookup of // the computed style. var b = win.doc.body; var bs = domStyle.getComputedStyle(b); var bm = domGeom.getMarginBox(b, bs); var bc = domGeom.getContentBox(b, bs); l = m.l - (bc.l - bm.l); t = m.t - (bc.t - bm.t); break; } this.marginBox.l = l - this.marginBox.l; this.marginBox.t = t - this.marginBox.t; if (h && h.onFirstMove) { h.onFirstMove(this, e); } // Disconnect touch.move that call this function this.events.shift().remove(); }, destroy: function destroy() { // summary: // stops the move, deletes all references, so the object can be garbage-collected array.forEach(this.events, function (handle) { handle.remove(); }); // undo global settings var h = this.host; if (h && h.onMoveStop) { h.onMoveStop(this); } // destroy objects this.events = this.node = this.host = null; } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/dnd/TimedMoveable.js": /*!************************************************!*\ !*** ./node_modules/dojo/dnd/TimedMoveable.js ***! \************************************************/ /*! no static exports found */ /***/ function node_modulesDojoDndTimedMoveableJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../_base/declare */ "./node_modules/dojo/_base/declare.js"), __webpack_require__( /*! ./Moveable */ "./node_modules/dojo/dnd/Moveable.js") /*=====, "./Mover" =====*/ ], __WEBPACK_AMD_DEFINE_RESULT__ = function (declare, Moveable /*=====, Mover =====*/ ) { // module: // dojo/dnd/TimedMoveable /*===== var __TimedMoveableArgs = declare([Moveable.__MoveableArgs], { // timeout: Number // delay move by this number of ms, // accumulating position changes during the timeout timeout: 0 }); =====*/ // precalculate long expressions var oldOnMove = Moveable.prototype.onMove; return declare("dojo.dnd.TimedMoveable", Moveable, { // summary: // A specialized version of Moveable to support an FPS throttling. // This class puts an upper restriction on FPS, which may reduce // the CPU load. The additional parameter "timeout" regulates // the delay before actually moving the moveable object. // object attributes (for markup) timeout: 40, // in ms, 40ms corresponds to 25 fps constructor: function constructor(node, params) { // summary: // an object that makes a node moveable with a timer // node: Node||String // a node (or node's id) to be moved // params: __TimedMoveableArgs // object with additional parameters. // sanitize parameters if (!params) { params = {}; } if (params.timeout && typeof params.timeout == "number" && params.timeout >= 0) { this.timeout = params.timeout; } }, onMoveStop: function onMoveStop( /*Mover*/ mover) { if (mover._timer) { // stop timer clearTimeout(mover._timer); // reflect the last received position oldOnMove.call(this, mover, mover._leftTop); } Moveable.prototype.onMoveStop.apply(this, arguments); }, onMove: function onMove( /*Mover*/ mover, /*Object*/ leftTop) { mover._leftTop = leftTop; if (!mover._timer) { var _t = this; // to avoid using dojo.hitch() mover._timer = setTimeout(function () { // we don't have any pending requests mover._timer = null; // reflect the last received position oldOnMove.call(_t, mover, mover._leftTop); }, this.timeout); } } }); }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/dnd/autoscroll.js": /*!*********************************************!*\ !*** ./node_modules/dojo/dnd/autoscroll.js ***! \*********************************************/ /*! no static exports found */ /***/ function node_modulesDojoDndAutoscrollJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ../sniff */ "./node_modules/dojo/sniff.js"), __webpack_require__( /*! ../_base/window */ "./node_modules/dojo/_base/window.js"), __webpack_require__( /*! ../dom-geometry */ "./node_modules/dojo/dom-geometry.js"), __webpack_require__( /*! ../dom-style */ "./node_modules/dojo/dom-style.js"), __webpack_require__( /*! ../window */ "./node_modules/dojo/window.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (lang, has, win, domGeom, domStyle, winUtils) { // module: // dojo/dnd/autoscroll var exports = {// summary: // Used by dojo/dnd/Manager to scroll document or internal node when the user // drags near the edge of the viewport or a scrollable node }; lang.setObject("dojo.dnd.autoscroll", exports); exports.getViewport = winUtils.getBox; exports.V_TRIGGER_AUTOSCROLL = 32; exports.H_TRIGGER_AUTOSCROLL = 32; exports.V_AUTOSCROLL_VALUE = 16; exports.H_AUTOSCROLL_VALUE = 16; // These are set by autoScrollStart(). // Set to default values in case autoScrollStart() isn't called. (back-compat, remove for 2.0) var viewport, doc = win.doc, maxScrollTop = Infinity, maxScrollLeft = Infinity; exports.autoScrollStart = function (d) { // summary: // Called at the start of a drag. // d: Document // The document of the node being dragged. doc = d; viewport = winUtils.getBox(doc); // Save height/width of document at start of drag, before it gets distorted by a user dragging an avatar past // the document's edge var html = win.body(doc).parentNode; maxScrollTop = Math.max(html.scrollHeight - viewport.h, 0); maxScrollLeft = Math.max(html.scrollWidth - viewport.w, 0); // usually 0 }; exports.autoScroll = function (e) { // summary: // a handler for mousemove and touchmove events, which scrolls the window, if // necessary // e: Event // mousemove/touchmove event // FIXME: needs more docs! var v = viewport || winUtils.getBox(doc), // getBox() call for back-compat, in case autoScrollStart() wasn't called html = win.body(doc).parentNode, dx = 0, dy = 0; if (e.clientX < exports.H_TRIGGER_AUTOSCROLL) { dx = -exports.H_AUTOSCROLL_VALUE; } else if (e.clientX > v.w - exports.H_TRIGGER_AUTOSCROLL) { dx = Math.min(exports.H_AUTOSCROLL_VALUE, maxScrollLeft - html.scrollLeft); // don't scroll past edge of doc } if (e.clientY < exports.V_TRIGGER_AUTOSCROLL) { dy = -exports.V_AUTOSCROLL_VALUE; } else if (e.clientY > v.h - exports.V_TRIGGER_AUTOSCROLL) { dy = Math.min(exports.V_AUTOSCROLL_VALUE, maxScrollTop - html.scrollTop); // don't scroll past edge of doc } window.scrollBy(dx, dy); }; exports._validNodes = { "div": 1, "p": 1, "td": 1 }; exports._validOverflow = { "auto": 1, "scroll": 1 }; exports.autoScrollNodes = function (e) { // summary: // a handler for mousemove and touchmove events, which scrolls the first available // Dom element, it falls back to exports.autoScroll() // e: Event // mousemove/touchmove event // FIXME: needs more docs! var b, t, w, h, rx, ry, dx = 0, dy = 0, oldLeft, oldTop; for (var n = e.target; n;) { if (n.nodeType == 1 && n.tagName.toLowerCase() in exports._validNodes) { var s = domStyle.getComputedStyle(n), overflowX = (s.overflowX.toLowerCase() in exports._validOverflow), overflowY = (s.overflowY.toLowerCase() in exports._validOverflow); if (overflowX || overflowY) { b = domGeom.getContentBox(n, s); t = domGeom.position(n, true); } // overflow-x if (overflowX) { w = Math.min(exports.H_TRIGGER_AUTOSCROLL, b.w / 2); rx = e.pageX - t.x; if (has("webkit") || has("opera")) { // FIXME: this code should not be here, it should be taken into account // either by the event fixing code, or the domGeom.position() // FIXME: this code doesn't work on Opera 9.5 Beta rx += win.body().scrollLeft; } dx = 0; if (rx > 0 && rx < b.w) { if (rx < w) { dx = -w; } else if (rx > b.w - w) { dx = w; } oldLeft = n.scrollLeft; n.scrollLeft = n.scrollLeft + dx; } } // overflow-y if (overflowY) { //console.log(b.l, b.t, t.x, t.y, n.scrollLeft, n.scrollTop); h = Math.min(exports.V_TRIGGER_AUTOSCROLL, b.h / 2); ry = e.pageY - t.y; if (has("webkit") || has("opera")) { // FIXME: this code should not be here, it should be taken into account // either by the event fixing code, or the domGeom.position() // FIXME: this code doesn't work on Opera 9.5 Beta ry += win.body().scrollTop; } dy = 0; if (ry > 0 && ry < b.h) { if (ry < h) { dy = -h; } else if (ry > b.h - h) { dy = h; } oldTop = n.scrollTop; n.scrollTop = n.scrollTop + dy; } } if (dx || dy) { return; } } try { n = n.parentNode; } catch (x) { n = null; } } exports.autoScroll(e); }; return exports; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/dnd/common.js": /*!*****************************************!*\ !*** ./node_modules/dojo/dnd/common.js ***! \*****************************************/ /*! no static exports found */ /***/ function node_modulesDojoDndCommonJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../sniff */ "./node_modules/dojo/sniff.js"), __webpack_require__( /*! ../_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! ../_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ../dom */ "./node_modules/dojo/dom.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (has, kernel, lang, dom) { // module: // dojo/dnd/common var exports = lang.getObject("dojo.dnd", true); /*===== // TODO: for 2.0, replace line above with this code. var exports = { // summary: // TODOC }; =====*/ exports.getCopyKeyState = function (evt) { return evt[has("mac") ? "metaKey" : "ctrlKey"]; }; exports._uniqueId = 0; exports.getUniqueId = function () { // summary: // returns a unique string for use with any DOM element var id; do { id = kernel._scopeName + "Unique" + ++exports._uniqueId; } while (dom.byId(id)); return id; }; exports._empty = {}; exports.isFormElement = function ( /*Event*/ e) { // summary: // returns true if user clicked on a form element var t = e.target; if (t.nodeType == 3 /*TEXT_NODE*/ ) { t = t.parentNode; } return " a button textarea input select option ".indexOf(" " + t.tagName.toLowerCase() + " ") >= 0; // Boolean }; return exports; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/dom-class.js": /*!****************************************!*\ !*** ./node_modules/dojo/dom-class.js ***! \****************************************/ /*! no static exports found */ /***/ function node_modulesDojoDomClassJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ./_base/array */ "./node_modules/dojo/_base/array.js"), __webpack_require__( /*! ./dom */ "./node_modules/dojo/dom.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (lang, array, dom) { // module: // dojo/dom-class var className = "className"; /* Part I of classList-based implementation is preserved here for posterity var classList = "classList"; has.add("dom-classList", function(){ return classList in document.createElement("p"); }); */ // ============================= // (CSS) Class Functions // ============================= var cls, // exports object spaces = /\s+/, a1 = [""]; function str2array(s) { if (typeof s == "string" || s instanceof String) { if (s && !spaces.test(s)) { a1[0] = s; return a1; } var a = s.split(spaces); if (a.length && !a[0]) { a.shift(); } if (a.length && !a[a.length - 1]) { a.pop(); } return a; } // assumed to be an array if (!s) { return []; } return array.filter(s, function (x) { return x; }); } /* Part II of classList-based implementation is preserved here for posterity if(has("dom-classList")){ // new classList version cls = { contains: function containsClass(node, classStr){ var clslst = classStr && dom.byId(node)[classList]; return clslst && clslst.contains(classStr); // Boolean }, add: function addClass(node, classStr){ node = dom.byId(node); classStr = str2array(classStr); for(var i = 0, len = classStr.length; i < len; ++i){ node[classList].add(classStr[i]); } }, remove: function removeClass(node, classStr){ node = dom.byId(node); if(classStr === undefined){ node[className] = ""; }else{ classStr = str2array(classStr); for(var i = 0, len = classStr.length; i < len; ++i){ node[classList].remove(classStr[i]); } } }, replace: function replaceClass(node, addClassStr, removeClassStr){ node = dom.byId(node); if(removeClassStr === undefined){ node[className] = ""; }else{ removeClassStr = str2array(removeClassStr); for(var i = 0, len = removeClassStr.length; i < len; ++i){ node[classList].remove(removeClassStr[i]); } } addClassStr = str2array(addClassStr); for(i = 0, len = addClassStr.length; i < len; ++i){ node[classList].add(addClassStr[i]); } }, toggle: function toggleClass(node, classStr, condition){ node = dom.byId(node); if(condition === undefined){ classStr = str2array(classStr); for(var i = 0, len = classStr.length; i < len; ++i){ node[classList].toggle(classStr[i]); } }else{ cls[condition ? "add" : "remove"](node, classStr); } return condition; // Boolean } } } */ // regular DOM version var fakeNode = {}; // for effective replacement cls = { // summary: // This module defines the core dojo DOM class API. contains: function containsClass( /*DomNode|String*/ node, /*String*/ classStr) { // summary: // Returns whether or not the specified classes are a portion of the // class list currently applied to the node. // node: String|DOMNode // String ID or DomNode reference to check the class for. // classStr: String // A string class name to look for. // example: // Do something if a node with id="someNode" has class="aSillyClassName" present // | if(domClass.contains("someNode","aSillyClassName")){ ... } return (" " + dom.byId(node)[className] + " ").indexOf(" " + classStr + " ") >= 0; // Boolean }, add: function addClass( /*DomNode|String*/ node, /*String|Array*/ classStr) { // summary: // Adds the specified classes to the end of the class list on the // passed node. Will not re-apply duplicate classes. // // node: String|DOMNode // String ID or DomNode reference to add a class string too // // classStr: String|Array // A String class name to add, or several space-separated class names, // or an array of class names. // // example: // Add a class to some node: // | require(["dojo/dom-class"], function(domClass){ // | domClass.add("someNode", "anewClass"); // | }); // // example: // Add two classes at once: // | require(["dojo/dom-class"], function(domClass){ // | domClass.add("someNode", "firstClass secondClass"); // | }); // // example: // Add two classes at once (using array): // | require(["dojo/dom-class"], function(domClass){ // | domClass.add("someNode", ["firstClass", "secondClass"]); // | }); // // example: // Available in `dojo/NodeList` for multiple additions // | require(["dojo/query"], function(query){ // | query("ul > li").addClass("firstLevel"); // | }); node = dom.byId(node); classStr = str2array(classStr); var cls = node[className], oldLen; cls = cls ? " " + cls + " " : " "; oldLen = cls.length; for (var i = 0, len = classStr.length, c; i < len; ++i) { c = classStr[i]; if (c && cls.indexOf(" " + c + " ") < 0) { cls += c + " "; } } if (oldLen < cls.length) { node[className] = cls.substr(1, cls.length - 2); } }, remove: function removeClass( /*DomNode|String*/ node, /*String|Array?*/ classStr) { // summary: // Removes the specified classes from node. No `contains()` // check is required. // // node: String|DOMNode // String ID or DomNode reference to remove the class from. // // classStr: String|Array // An optional String class name to remove, or several space-separated // class names, or an array of class names. If omitted, all class names // will be deleted. // // example: // Remove a class from some node: // | require(["dojo/dom-class"], function(domClass){ // | domClass.remove("someNode", "firstClass"); // | }); // // example: // Remove two classes from some node: // | require(["dojo/dom-class"], function(domClass){ // | domClass.remove("someNode", "firstClass secondClass"); // | }); // // example: // Remove two classes from some node (using array): // | require(["dojo/dom-class"], function(domClass){ // | domClass.remove("someNode", ["firstClass", "secondClass"]); // | }); // // example: // Remove all classes from some node: // | require(["dojo/dom-class"], function(domClass){ // | domClass.remove("someNode"); // | }); // // example: // Available in `dojo/NodeList` for multiple removal // | require(["dojo/query"], function(query){ // | query("ul > li").removeClass("foo"); // | }); node = dom.byId(node); var cls; if (classStr !== undefined) { classStr = str2array(classStr); cls = " " + node[className] + " "; for (var i = 0, len = classStr.length; i < len; ++i) { cls = cls.replace(" " + classStr[i] + " ", " "); } cls = lang.trim(cls); } else { cls = ""; } if (node[className] != cls) { node[className] = cls; } }, replace: function replaceClass( /*DomNode|String*/ node, /*String|Array*/ addClassStr, /*String|Array?*/ removeClassStr) { // summary: // Replaces one or more classes on a node if not present. // Operates more quickly than calling domClass.remove and domClass.add // // node: String|DOMNode // String ID or DomNode reference to remove the class from. // // addClassStr: String|Array // A String class name to add, or several space-separated class names, // or an array of class names. // // removeClassStr: String|Array? // A String class name to remove, or several space-separated class names, // or an array of class names. // // example: // | require(["dojo/dom-class"], function(domClass){ // | domClass.replace("someNode", "add1 add2", "remove1 remove2"); // | }); // // example: // Replace all classes with addMe // | require(["dojo/dom-class"], function(domClass){ // | domClass.replace("someNode", "addMe"); // | }); // // example: // Available in `dojo/NodeList` for multiple toggles // | require(["dojo/query"], function(query){ // | query(".findMe").replaceClass("addMe", "removeMe"); // | }); node = dom.byId(node); fakeNode[className] = node[className]; cls.remove(fakeNode, removeClassStr); cls.add(fakeNode, addClassStr); if (node[className] !== fakeNode[className]) { node[className] = fakeNode[className]; } }, toggle: function toggleClass( /*DomNode|String*/ node, /*String|Array*/ classStr, /*Boolean?*/ condition) { // summary: // Adds a class to node if not present, or removes if present. // Pass a boolean condition if you want to explicitly add or remove. // Returns the condition that was specified directly or indirectly. // // node: String|DOMNode // String ID or DomNode reference to toggle a class string // // classStr: String|Array // A String class name to toggle, or several space-separated class names, // or an array of class names. // // condition: // If passed, true means to add the class, false means to remove. // Otherwise domClass.contains(node, classStr) is used to detect the class presence. // // example: // | require(["dojo/dom-class"], function(domClass){ // | domClass.toggle("someNode", "hovered"); // | }); // // example: // Forcefully add a class // | require(["dojo/dom-class"], function(domClass){ // | domClass.toggle("someNode", "hovered", true); // | }); // // example: // Available in `dojo/NodeList` for multiple toggles // | require(["dojo/query"], function(query){ // | query(".toggleMe").toggleClass("toggleMe"); // | }); node = dom.byId(node); if (condition === undefined) { classStr = str2array(classStr); for (var i = 0, len = classStr.length, c; i < len; ++i) { c = classStr[i]; cls[cls.contains(node, c) ? "remove" : "add"](node, c); } } else { cls[condition ? "add" : "remove"](node, classStr); } return condition; // Boolean } }; return cls; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/domReady.js": /*!***************************************!*\ !*** ./node_modules/dojo/domReady.js ***! \***************************************/ /*! no static exports found */ /***/ function node_modulesDojoDomReadyJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./global */ "./node_modules/dojo/global.js"), __webpack_require__( /*! ./has */ "./node_modules/dojo/has.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (global, has) { var doc = document, readyStates = { 'loaded': 1, 'complete': 1 }, fixReadyState = typeof doc.readyState != "string", ready = !!readyStates[doc.readyState], readyQ = [], recursiveGuard; function domReady(callback) { // summary: // Plugin to delay require()/define() callback from firing until the DOM has finished loading. readyQ.push(callback); if (ready) { processQ(); } } domReady.load = function (id, req, load) { domReady(load); }; // Export queue so that ready() can check if it's empty or not. domReady._Q = readyQ; domReady._onQEmpty = function () {// summary: // Private method overridden by dojo/ready, to notify when everything in the // domReady queue has been processed. Do not use directly. // Will be removed in 2.0, along with domReady._Q. }; // For FF <= 3.5 if (fixReadyState) { doc.readyState = "loading"; } function processQ() { // Calls all functions in the queue in order, unless processQ() is already running, in which case just return if (recursiveGuard) { return; } recursiveGuard = true; while (readyQ.length) { try { readyQ.shift()(doc); } catch (err) { console.error(err, "in domReady callback", err.stack); } } recursiveGuard = false; // Notification for dojo/ready. Remove for 2.0. // Note that this could add more tasks to the ready queue. domReady._onQEmpty(); } if (!ready) { var tests = [], detectReady = function detectReady(evt) { evt = evt || global.event; if (ready || evt.type == "readystatechange" && !readyStates[doc.readyState]) { return; } // For FF <= 3.5 if (fixReadyState) { doc.readyState = "complete"; } ready = 1; processQ(); }, on = function on(node, event) { node.addEventListener(event, detectReady, false); readyQ.push(function () { node.removeEventListener(event, detectReady, false); }); }; if (false) { var div; } on(doc, "DOMContentLoaded"); on(global, "load"); if ("onreadystatechange" in doc) { on(doc, "readystatechange"); } else if (!fixReadyState) { // if the ready state property exists and there's // no readystatechange event, poll for the state // to change tests.push(function () { return readyStates[doc.readyState]; }); } if (tests.length) { var poller = function poller() { if (ready) { return; } var i = tests.length; while (i--) { if (tests[i]()) { detectReady("poller"); return; } } setTimeout(poller, 30); }; poller(); } } return domReady; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/hccss.js": /*!************************************!*\ !*** ./node_modules/dojo/hccss.js ***! \************************************/ /*! no static exports found */ /***/ function node_modulesDojoHccssJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), // require, require.toUrl __webpack_require__( /*! ./_base/config */ "./node_modules/dojo/_base/config.js"), // config.blankGif __webpack_require__( /*! ./dom-class */ "./node_modules/dojo/dom-class.js"), // domClass.add __webpack_require__( /*! ./dom-style */ "./node_modules/dojo/dom-style.js"), // domStyle.getComputedStyle __webpack_require__( /*! ./has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! ./domReady */ "./node_modules/dojo/domReady.js"), __webpack_require__( /*! ./_base/window */ "./node_modules/dojo/_base/window.js") // win.body ], __WEBPACK_AMD_DEFINE_RESULT__ = function (require, config, domClass, domStyle, has, domReady, win) { // module: // dojo/hccss /*===== return function(){ // summary: // Test if computer is in high contrast mode (i.e. if browser is not displaying background images). // Defines `has("highcontrast")` and sets `dj_a11y` CSS class on `<body>` if machine is in high contrast mode. // Returns `has()` method; }; =====*/ // Has() test for when background images aren't displayed. Don't call has("highcontrast") before dojo/domReady!. has.add("highcontrast", function () { // note: if multiple documents, doesn't matter which one we use var div = win.doc.createElement("div"); try { div.style.cssText = "border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;" + "background-image: url(\"" + (config.blankGif || require.toUrl("./resources/blank.gif")) + "\");"; win.body().appendChild(div); var cs = domStyle.getComputedStyle(div), bkImg = cs.backgroundImage; return cs.borderTopColor == cs.borderRightColor || bkImg && (bkImg == "none" || bkImg == "url(invalid-url:)"); } catch (e) { console.warn("hccss: exception detecting high-contrast mode, document is likely hidden: " + e.toString()); return false; } finally { if (has("ie") <= 8) { div.outerHTML = ""; // prevent mixed-content warning, see http://support.microsoft.com/kb/925014 } else { win.body().removeChild(div); } } }); domReady(function () { if (has("highcontrast")) { domClass.add(win.body(), "dj_a11y"); } }); return has; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/html.js": /*!***********************************!*\ !*** ./node_modules/dojo/html.js ***! \***********************************/ /*! no static exports found */ /***/ function node_modulesDojoHtmlJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ./_base/array */ "./node_modules/dojo/_base/array.js"), __webpack_require__( /*! ./_base/declare */ "./node_modules/dojo/_base/declare.js"), __webpack_require__( /*! ./dom */ "./node_modules/dojo/dom.js"), __webpack_require__( /*! ./dom-construct */ "./node_modules/dojo/dom-construct.js"), __webpack_require__( /*! ./parser */ "./node_modules/dojo/parser.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (kernel, lang, darray, declare, dom, domConstruct, parser) { // module: // dojo/html // the parser might be needed.. // idCounter is incremented with each instantiation to allow assignment of a unique id for tracking, logging purposes var idCounter = 0; var html = { // summary: // TODOC _secureForInnerHtml: function _secureForInnerHtml( /*String*/ cont) { // summary: // removes !DOCTYPE and title elements from the html string. // // khtml is picky about dom faults, you can't attach a style or `<title>` node as child of body // must go into head, so we need to cut out those tags // cont: // An html string for insertion into the dom // return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig, ""); // String }, // Deprecated, should use dojo/dom-constuct.empty() directly, remove in 2.0. _emptyNode: domConstruct.empty, _setNodeContent: function _setNodeContent( /*DomNode*/ node, /*String|DomNode|NodeList*/ cont) { // summary: // inserts the given content into the given node // node: // the parent element // content: // the content to be set on the parent element. // This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes // always empty domConstruct.empty(node); if (cont) { if (typeof cont == "number") { cont = cont.toString(); } if (typeof cont == "string") { cont = domConstruct.toDom(cont, node.ownerDocument); } if (!cont.nodeType && lang.isArrayLike(cont)) { // handle as enumerable, but it may shrink as we enumerate it for (var startlen = cont.length, i = 0; i < cont.length; i = startlen == cont.length ? i + 1 : 0) { domConstruct.place(cont[i], node, "last"); } } else { // pass nodes, documentFragments and unknowns through to dojo.place domConstruct.place(cont, node, "last"); } } // return DomNode return node; }, // we wrap up the content-setting operation in a object _ContentSetter: declare("dojo.html._ContentSetter", null, { // node: DomNode|String // An node which will be the parent element that we set content into node: "", // content: String|DomNode|DomNode[] // The content to be placed in the node. Can be an HTML string, a node reference, or a enumerable list of nodes content: "", // id: String? // Usually only used internally, and auto-generated with each instance id: "", // cleanContent: Boolean // Should the content be treated as a full html document, // and the real content stripped of <html>, <body> wrapper before injection cleanContent: false, // extractContent: Boolean // Should the content be treated as a full html document, // and the real content stripped of `<html> <body>` wrapper before injection extractContent: false, // parseContent: Boolean // Should the node by passed to the parser after the new content is set parseContent: false, // parserScope: String // Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, // will search for data-dojo-type (or dojoType). For backwards compatibility // reasons defaults to dojo._scopeName (which is "dojo" except when // multi-version support is used, when it will be something like dojo16, dojo20, etc.) parserScope: kernel._scopeName, // startup: Boolean // Start the child widgets after parsing them. Only obeyed if parseContent is true. startup: true, // lifecycle methods constructor: function constructor( /*Object*/ params, /*String|DomNode*/ node) { // summary: // Provides a configurable, extensible object to wrap the setting on content on a node // call the set() method to actually set the content.. // the original params are mixed directly into the instance "this" lang.mixin(this, params || {}); // give precedence to params.node vs. the node argument // and ensure its a node, not an id string node = this.node = dom.byId(this.node || node); if (!this.id) { this.id = ["Setter", node ? node.id || node.tagName : "", idCounter++].join("_"); } }, set: function set( /* String|DomNode|NodeList? */ cont, /*Object?*/ params) { // summary: // front-end to the set-content sequence // cont: // An html string, node or enumerable list of nodes for insertion into the dom // If not provided, the object's content property will be used if (undefined !== cont) { this.content = cont; } if (typeof cont == 'number') { cont = cont.toString(); } // in the re-use scenario, set needs to be able to mixin new configuration if (params) { this._mixin(params); } this.onBegin(); this.setContent(); var ret = this.onEnd(); if (ret && ret.then) { // Make dojox/html/_ContentSetter.set() return a Promise that resolves when load and parse complete. return ret; } else { // Vanilla dojo/html._ContentSetter.set() returns a DOMNode for back compat. For 2.0, switch it to // return a Deferred like above. return this.node; } }, setContent: function setContent() { // summary: // sets the content on the node var node = this.node; if (!node) { // can't proceed throw new Error(this.declaredClass + ": setContent given no node"); } try { node = html._setNodeContent(node, this.content); } catch (e) { // check if a domfault occurs when we are appending this.errorMessage // like for instance if domNode is a UL and we try append a DIV // FIXME: need to allow the user to provide a content error message string var errMess = this.onContentError(e); try { node.innerHTML = errMess; } catch (e) { console.error('Fatal ' + this.declaredClass + '.setContent could not change content due to ' + e.message, e); } } // always put back the node for the next method this.node = node; // DomNode }, empty: function empty() { // summary: // cleanly empty out existing content // If there is a parse in progress, cancel it. if (this.parseDeferred) { if (!this.parseDeferred.isResolved()) { this.parseDeferred.cancel(); } delete this.parseDeferred; } // destroy any widgets from a previous run // NOTE: if you don't want this you'll need to empty // the parseResults array property yourself to avoid bad things happening if (this.parseResults && this.parseResults.length) { darray.forEach(this.parseResults, function (w) { if (w.destroy) { w.destroy(); } }); delete this.parseResults; } // this is fast, but if you know its already empty or safe, you could // override empty to skip this step domConstruct.empty(this.node); }, onBegin: function onBegin() { // summary: // Called after instantiation, but before set(); // It allows modification of any of the object properties - // including the node and content provided - before the set operation actually takes place // This default implementation checks for cleanContent and extractContent flags to // optionally pre-process html string content var cont = this.content; if (lang.isString(cont)) { if (this.cleanContent) { cont = html._secureForInnerHtml(cont); } if (this.extractContent) { var match = cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im); if (match) { cont = match[1]; } } } // clean out the node and any cruft associated with it - like widgets this.empty(); this.content = cont; return this.node; // DomNode }, onEnd: function onEnd() { // summary: // Called after set(), when the new content has been pushed into the node // It provides an opportunity for post-processing before handing back the node to the caller // This default implementation checks a parseContent flag to optionally run the dojo parser over the new content if (this.parseContent) { // populates this.parseResults and this.parseDeferred if you need those.. this._parse(); } return this.node; // DomNode // TODO: for 2.0 return a Promise indicating that the parse completed. }, tearDown: function tearDown() { // summary: // manually reset the Setter instance if its being re-used for example for another set() // description: // tearDown() is not called automatically. // In normal use, the Setter instance properties are simply allowed to fall out of scope // but the tearDown method can be called to explicitly reset this instance. delete this.parseResults; delete this.parseDeferred; delete this.node; delete this.content; }, onContentError: function onContentError(err) { return "Error occurred setting content: " + err; }, onExecError: function onExecError(err) { return "Error occurred executing scripts: " + err; }, _mixin: function _mixin(params) { // mix properties/methods into the instance // TODO: the intention with tearDown is to put the Setter's state // back to that of the original constructor (vs. deleting/resetting everything regardless of ctor params) // so we could do something here to move the original properties aside for later restoration var empty = {}, key; for (key in params) { if (key in empty) { continue; } // TODO: here's our opportunity to mask the properties we don't consider configurable/overridable // .. but history shows we'll almost always guess wrong this[key] = params[key]; } }, _parse: function _parse() { // summary: // runs the dojo parser over the node contents, storing any results in this.parseResults // and the parse promise in this.parseDeferred // Any errors resulting from parsing are passed to _onError for handling var rootNode = this.node; try { // store the results (widgets, whatever) for potential retrieval var inherited = {}; darray.forEach(["dir", "lang", "textDir"], function (name) { if (this[name]) { inherited[name] = this[name]; } }, this); var self = this; this.parseDeferred = parser.parse({ rootNode: rootNode, noStart: !this.startup, inherited: inherited, scope: this.parserScope }).then(function (results) { return self.parseResults = results; }, function (e) { self._onError('Content', e, "Error parsing in _ContentSetter#" + self.id); }); } catch (e) { this._onError('Content', e, "Error parsing in _ContentSetter#" + this.id); } }, _onError: function _onError(type, err, consoleText) { // summary: // shows user the string that is returned by on[type]Error // override/implement on[type]Error and return your own string to customize var errText = this['on' + type + 'Error'].call(this, err); if (consoleText) { console.error(consoleText, err); } else if (errText) { // a empty string won't change current content html._setNodeContent(this.node, errText, true); } } }), // end declare() set: function set( /*DomNode*/ node, /*String|DomNode|NodeList*/ cont, /*Object?*/ params) { // summary: // inserts (replaces) the given content into the given node. dojo/dom-construct.place(cont, node, "only") // may be a better choice for simple HTML insertion. // description: // Unless you need to use the params capabilities of this method, you should use // dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct..place() has more robust support for injecting // an HTML string into the DOM, but it only handles inserting an HTML string as DOM // elements, or inserting a DOM node. dojo/dom-construct..place does not handle NodeList insertions // dojo/dom-construct.place(cont, node, "only"). dojo/dom-construct.place() has more robust support for injecting // an HTML string into the DOM, but it only handles inserting an HTML string as DOM // elements, or inserting a DOM node. dojo/dom-construct.place does not handle NodeList insertions // or the other capabilities as defined by the params object for this method. // node: // the parent element that will receive the content // cont: // the content to be set on the parent element. // This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes // params: // Optional flags/properties to configure the content-setting. See dojo/html/_ContentSetter // example: // A safe string/node/nodelist content replacement/injection with hooks for extension // Example Usage: // | html.set(node, "some string"); // | html.set(node, contentNode, {options}); // | html.set(node, myNode.childNodes, {options}); if (undefined == cont) { console.warn("dojo.html.set: no cont argument provided, using empty string"); cont = ""; } if (typeof cont == 'number') { cont = cont.toString(); } if (!params) { // simple and fast return html._setNodeContent(node, cont, true); } else { // more options but slower // note the arguments are reversed in order, to match the convention for instantiation via the parser var op = new html._ContentSetter(lang.mixin(params, { content: cont, node: node })); return op.set(); } } }; lang.setObject("dojo.html", html); return html; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/parser.js": /*!*************************************!*\ !*** ./node_modules/dojo/parser.js ***! \*************************************/ /*! no static exports found */ /***/ function node_modulesDojoParserJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var require; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), __webpack_require__( /*! ./_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ./_base/array */ "./node_modules/dojo/_base/array.js"), __webpack_require__( /*! ./_base/config */ "./node_modules/dojo/_base/config.js"), __webpack_require__( /*! ./dom */ "./node_modules/dojo/dom.js"), __webpack_require__( /*! ./_base/window */ "./node_modules/dojo/_base/window.js"), __webpack_require__( /*! ./_base/url */ "./node_modules/dojo/_base/url.js"), __webpack_require__( /*! ./aspect */ "./node_modules/dojo/aspect.js"), __webpack_require__( /*! ./promise/all */ "./node_modules/dojo/promise/all.js"), __webpack_require__( /*! ./date/stamp */ "./node_modules/dojo/date/stamp.js"), __webpack_require__( /*! ./Deferred */ "./node_modules/dojo/Deferred.js"), __webpack_require__( /*! ./has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! ./query */ "./node_modules/dojo/query.js"), __webpack_require__( /*! ./on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! ./ready */ "./node_modules/dojo/ready.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (require, dojo, dlang, darray, config, dom, dwindow, _Url, aspect, all, dates, Deferred, has, query, don, ready) { // module: // dojo/parser new Date("X"); // workaround for #11279, new Date("") == NaN // data-dojo-props etc. is not restricted to JSON, it can be any javascript function myEval(text) { return eval("(" + text + ")"); } // Widgets like BorderContainer add properties to _Widget via dojo.extend(). // If BorderContainer is loaded after _Widget's parameter list has been cached, // we need to refresh that parameter list (for _Widget and all widgets that extend _Widget). var extendCnt = 0; aspect.after(dlang, "extend", function () { extendCnt++; }, true); function getNameMap(ctor) { // summary: // Returns map from lowercase name to attribute name in class, ex: {onclick: "onClick"} var map = ctor._nameCaseMap, proto = ctor.prototype; // Create the map if it's undefined. // Refresh the map if a superclass was possibly extended with new methods since the map was created. if (!map || map._extendCnt < extendCnt) { map = ctor._nameCaseMap = {}; for (var name in proto) { if (name.charAt(0) === "_") { continue; } // skip internal properties map[name.toLowerCase()] = name; } map._extendCnt = extendCnt; } return map; } function getCtor( /*String[]*/ types, /*Function?*/ contextRequire) { // summary: // Retrieves a constructor. If the types array contains more than one class/MID then the // subsequent classes will be mixed into the first class and a unique constructor will be // returned for that array. if (!contextRequire) { contextRequire = require; } // Map from widget name or list of widget names(ex: "dijit/form/Button,acme/MyMixin") to a constructor. // Keep separate map for each requireContext to avoid false matches (ex: "./Foo" can mean different things // depending on context.) var ctorMap = contextRequire._dojoParserCtorMap || (contextRequire._dojoParserCtorMap = {}); var ts = types.join(); if (!ctorMap[ts]) { var mixins = []; for (var i = 0, l = types.length; i < l; i++) { var t = types[i]; // TODO: Consider swapping getObject and require in the future mixins[mixins.length] = ctorMap[t] = ctorMap[t] || dlang.getObject(t) || ~t.indexOf('/') && contextRequire(t); } var ctor = mixins.shift(); ctorMap[ts] = mixins.length ? ctor.createSubclass ? ctor.createSubclass(mixins) : ctor.extend.apply(ctor, mixins) : ctor; } return ctorMap[ts]; } var parser = { // summary: // The Dom/Widget parsing package _clearCache: function _clearCache() { // summary: // Clear cached data. Used mainly for benchmarking. extendCnt++; _ctorMap = {}; }, _functionFromScript: function _functionFromScript(script, attrData) { // summary: // Convert a `<script type="dojo/method" args="a, b, c"> ... </script>` // into a function // script: DOMNode // The `<script>` DOMNode // attrData: String // For HTML5 compliance, searches for attrData + "args" (typically // "data-dojo-args") instead of "args" var preamble = "", suffix = "", argsStr = script.getAttribute(attrData + "args") || script.getAttribute("args"), withStr = script.getAttribute("with"); // Convert any arguments supplied in script tag into an array to be passed to the var fnArgs = (argsStr || "").split(/\s*,\s*/); if (withStr && withStr.length) { darray.forEach(withStr.split(/\s*,\s*/), function (part) { preamble += "with(" + part + "){"; suffix += "}"; }); } return new Function(fnArgs, preamble + script.innerHTML + suffix); }, instantiate: function instantiate(nodes, mixin, options) { // summary: // Takes array of nodes, and turns them into class instances and // potentially calls a startup method to allow them to connect with // any children. // nodes: Array // Array of DOM nodes // mixin: Object? // An object that will be mixed in with each node in the array. // Values in the mixin will override values in the node, if they // exist. // options: Object? // An object used to hold kwArgs for instantiation. // See parse.options argument for details. // returns: // Array of instances. mixin = mixin || {}; options = options || {}; var dojoType = (options.scope || dojo._scopeName) + "Type", // typically "dojoType" attrData = "data-" + (options.scope || dojo._scopeName) + "-", // typically "data-dojo-" dataDojoType = attrData + "type", // typically "data-dojo-type" dataDojoMixins = attrData + "mixins"; // typically "data-dojo-mixins" var list = []; darray.forEach(nodes, function (node) { var type = dojoType in mixin ? mixin[dojoType] : node.getAttribute(dataDojoType) || node.getAttribute(dojoType); if (type) { var mixinsValue = node.getAttribute(dataDojoMixins), types = mixinsValue ? [type].concat(mixinsValue.split(/\s*,\s*/)) : [type]; list.push({ node: node, types: types }); } }); // Instantiate the nodes and return the list of instances. return this._instantiate(list, mixin, options); }, _instantiate: function _instantiate(nodes, mixin, options, returnPromise) { // summary: // Takes array of objects representing nodes, and turns them into class instances and // potentially calls a startup method to allow them to connect with // any children. // nodes: Array // Array of objects like // | { // | ctor: Function (may be null) // | types: ["dijit/form/Button", "acme/MyMixin"] (used if ctor not specified) // | node: DOMNode, // | scripts: [ ... ], // array of <script type="dojo/..."> children of node // | inherited: { ... } // settings inherited from ancestors like dir, theme, etc. // | } // mixin: Object // An object that will be mixed in with each node in the array. // Values in the mixin will override values in the node, if they // exist. // options: Object // An options object used to hold kwArgs for instantiation. // See parse.options argument for details. // returnPromise: Boolean // Return a Promise rather than the instance; supports asynchronous widget creation. // returns: // Array of instances, or if returnPromise is true, a promise for array of instances // that resolves when instances have finished initializing. // Call widget constructors. Some may be asynchronous and return promises. var thelist = darray.map(nodes, function (obj) { var ctor = obj.ctor || getCtor(obj.types, options.contextRequire); // If we still haven't resolved a ctor, it is fatal now if (!ctor) { throw new Error("Unable to resolve constructor for: '" + obj.types.join() + "'"); } return this.construct(ctor, obj.node, mixin, options, obj.scripts, obj.inherited); }, this); // After all widget construction finishes, call startup on each top level instance if it makes sense (as for // widgets). Parent widgets will recursively call startup on their (non-top level) children function onConstruct(thelist) { if (!mixin._started && !options.noStart) { darray.forEach(thelist, function (instance) { if (typeof instance.startup === "function" && !instance._started) { instance.startup(); } }); } return thelist; } if (returnPromise) { return all(thelist).then(onConstruct); } else { // Back-compat path, remove for 2.0 return onConstruct(thelist); } }, construct: function construct(ctor, node, mixin, options, scripts, inherited) { // summary: // Calls new ctor(params, node), where params is the hash of parameters specified on the node, // excluding data-dojo-type and data-dojo-mixins. Does not call startup(). // ctor: Function // Widget constructor. // node: DOMNode // This node will be replaced/attached to by the widget. It also specifies the arguments to pass to ctor. // mixin: Object? // Attributes in this object will be passed as parameters to ctor, // overriding attributes specified on the node. // options: Object? // An options object used to hold kwArgs for instantiation. See parse.options argument for details. // scripts: DomNode[]? // Array of `<script type="dojo/*">` DOMNodes. If not specified, will search for `<script>` tags inside node. // inherited: Object? // Settings from dir=rtl or lang=... on a node above this node. Overrides options.inherited. // returns: // Instance or Promise for the instance, if markupFactory() itself returned a promise var proto = ctor && ctor.prototype; options = options || {}; // Setup hash to hold parameter settings for this widget. Start with the parameter // settings inherited from ancestors ("dir" and "lang"). // Inherited setting may later be overridden by explicit settings on node itself. var params = {}; if (options.defaults) { // settings for the document itself (or whatever subtree is being parsed) dlang.mixin(params, options.defaults); } if (inherited) { // settings from dir=rtl or lang=... on a node above this node dlang.mixin(params, inherited); } // Get list of attributes explicitly listed in the markup var attributes; if (true) { // Standard path to get list of user specified attributes attributes = node.attributes; } else { var clone, attrs; } // Hash to convert scoped attribute name (ex: data-dojo17-params) to something friendly (ex: data-dojo-params) // TODO: remove scope for 2.0 var scope = options.scope || dojo._scopeName, attrData = "data-" + scope + "-", // typically "data-dojo-" hash = {}; if (scope !== "dojo") { hash[attrData + "props"] = "data-dojo-props"; hash[attrData + "type"] = "data-dojo-type"; hash[attrData + "mixins"] = "data-dojo-mixins"; hash[scope + "type"] = "dojotype"; hash[attrData + "id"] = "data-dojo-id"; } // Read in attributes and process them, including data-dojo-props, data-dojo-type, // dojoAttachPoint, etc., as well as normal foo=bar attributes. var i = 0, item, funcAttrs = [], jsname, extra; while (item = attributes[i++]) { var name = item.name, lcName = name.toLowerCase(), value = item.value; switch (hash[lcName] || lcName) { // Already processed, just ignore case "data-dojo-type": case "dojotype": case "data-dojo-mixins": break; // Data-dojo-props. Save for later to make sure it overrides direct foo=bar settings case "data-dojo-props": extra = value; break; // data-dojo-id or jsId. TODO: drop jsId in 2.0 case "data-dojo-id": case "jsid": jsname = value; break; // For the benefit of _Templated case "data-dojo-attach-point": case "dojoattachpoint": params.dojoAttachPoint = value; break; case "data-dojo-attach-event": case "dojoattachevent": params.dojoAttachEvent = value; break; // Special parameter handling needed for IE case "class": params["class"] = node.className; break; case "style": params["style"] = node.style && node.style.cssText; break; default: // Normal attribute, ex: value="123" // Find attribute in widget corresponding to specified name. // May involve case conversion, ex: onclick --> onClick if (!(name in proto)) { var map = getNameMap(ctor); name = map[lcName] || name; } // Set params[name] to value, doing type conversion if (name in proto) { switch (typeof proto[name]) { case "string": params[name] = value; break; case "number": params[name] = value.length ? Number(value) : NaN; break; case "boolean": // for checked/disabled value might be "" or "checked". interpret as true. params[name] = value.toLowerCase() != "false"; break; case "function": if (value === "" || value.search(/[^\w\.]+/i) != -1) { // The user has specified some text for a function like "return x+5" params[name] = new Function(value); } else { // The user has specified the name of a global function like "myOnClick" // or a single word function "return" params[name] = dlang.getObject(value, false) || new Function(value); } funcAttrs.push(name); // prevent "double connect", see #15026 break; default: var pVal = proto[name]; params[name] = pVal && "length" in pVal ? value ? value.split(/\s*,\s*/) : [] : // array pVal instanceof Date ? value == "" ? new Date("") : // the NaN of dates value == "now" ? new Date() : // current date dates.fromISOString(value) : pVal instanceof _Url ? dojo.baseUrl + value : myEval(value); } } else { params[name] = value; } } } // Remove function attributes from DOMNode to prevent "double connect" problem, see #15026. // Do this as a separate loop since attributes[] is often a live collection (depends on the browser though). for (var j = 0; j < funcAttrs.length; j++) { var lcfname = funcAttrs[j].toLowerCase(); node.removeAttribute(lcfname); node[lcfname] = null; } // Mix things found in data-dojo-props into the params, overriding any direct settings if (extra) { try { extra = myEval.call(options.propsThis, "{" + extra + "}"); dlang.mixin(params, extra); } catch (e) { // give the user a pointer to their invalid parameters. FIXME: can we kill this in production? throw new Error(e.toString() + " in data-dojo-props='" + extra + "'"); } } // Any parameters specified in "mixin" override everything else. dlang.mixin(params, mixin); // Get <script> nodes associated with this widget, if they weren't specified explicitly if (!scripts) { scripts = ctor && (ctor._noScript || proto._noScript) ? [] : query("> script[type^='dojo/']", node); } // Process <script type="dojo/*"> script tags // <script type="dojo/method" data-dojo-event="foo"> tags are added to params, and passed to // the widget on instantiation. // <script type="dojo/method"> tags (with no event) are executed after instantiation // <script type="dojo/connect" data-dojo-event="foo"> tags are dojo.connected after instantiation, // and likewise with <script type="dojo/aspect" data-dojo-method="foo"> // <script type="dojo/watch" data-dojo-prop="foo"> tags are dojo.watch after instantiation // <script type="dojo/on" data-dojo-event="foo"> tags are dojo.on after instantiation // note: dojo/* script tags cannot exist in self closing widgets, like <input /> var aspects = [], // aspects to connect after instantiation calls = [], // functions to call after instantiation watches = [], // functions to watch after instantiation ons = []; // functions to on after instantiation if (scripts) { for (i = 0; i < scripts.length; i++) { var script = scripts[i]; node.removeChild(script); // FIXME: drop event="" support in 2.0. use data-dojo-event="" instead var event = script.getAttribute(attrData + "event") || script.getAttribute("event"), prop = script.getAttribute(attrData + "prop"), method = script.getAttribute(attrData + "method"), advice = script.getAttribute(attrData + "advice"), scriptType = script.getAttribute("type"), nf = this._functionFromScript(script, attrData); if (event) { if (scriptType == "dojo/connect") { aspects.push({ method: event, func: nf }); } else if (scriptType == "dojo/on") { ons.push({ event: event, func: nf }); } else { // <script type="dojo/method" data-dojo-event="foo"> // TODO for 2.0: use data-dojo-method="foo" instead (also affects dijit/Declaration) params[event] = nf; } } else if (scriptType == "dojo/aspect") { aspects.push({ method: method, advice: advice, func: nf }); } else if (scriptType == "dojo/watch") { watches.push({ prop: prop, func: nf }); } else { calls.push(nf); } } } // create the instance var markupFactory = ctor.markupFactory || proto.markupFactory; var instance = markupFactory ? markupFactory(params, node, ctor) : new ctor(params, node); function onInstantiate(instance) { // map it to the JS namespace if that makes sense if (jsname) { dlang.setObject(jsname, instance); } // process connections and startup functions for (i = 0; i < aspects.length; i++) { aspect[aspects[i].advice || "after"](instance, aspects[i].method, dlang.hitch(instance, aspects[i].func), true); } for (i = 0; i < calls.length; i++) { calls[i].call(instance); } for (i = 0; i < watches.length; i++) { instance.watch(watches[i].prop, watches[i].func); } for (i = 0; i < ons.length; i++) { don(instance, ons[i].event, ons[i].func); } return instance; } if (instance.then) { return instance.then(onInstantiate); } else { return onInstantiate(instance); } }, scan: function scan(root, options) { // summary: // Scan a DOM tree and return an array of objects representing the DOMNodes // that need to be turned into widgets. // description: // Search specified node (or document root node) recursively for class instances // and return an array of objects that represent potential widgets to be // instantiated. Searches for either data-dojo-type="MID" or dojoType="MID" where // "MID" is a module ID like "dijit/form/Button" or a fully qualified Class name // like "dijit/form/Button". If the MID is not currently available, scan will // attempt to require() in the module. // // See parser.parse() for details of markup. // root: DomNode? // A default starting root node from which to start the parsing. Can be // omitted, defaulting to the entire document. If omitted, the `options` // object can be passed in this place. If the `options` object has a // `rootNode` member, that is used. // options: Object // a kwArgs options object, see parse() for details // // returns: Promise // A promise that is resolved with the nodes that have been parsed. var list = [], // Output List mids = [], // An array of modules that are not yet loaded midsHash = {}; // Used to keep the mids array unique var dojoType = (options.scope || dojo._scopeName) + "Type", // typically "dojoType" attrData = "data-" + (options.scope || dojo._scopeName) + "-", // typically "data-dojo-" dataDojoType = attrData + "type", // typically "data-dojo-type" dataDojoTextDir = attrData + "textdir", // typically "data-dojo-textdir" dataDojoMixins = attrData + "mixins"; // typically "data-dojo-mixins" // Info on DOMNode currently being processed var node = root.firstChild; // Info on parent of DOMNode currently being processed // - inherited: dir, lang, and textDir setting of parent, or inherited by parent // - parent: pointer to identical structure for my parent (or null if no parent) // - scripts: if specified, collects <script type="dojo/..."> type nodes from children var inherited = options.inherited; if (!inherited) { var findAncestorAttr = function findAncestorAttr(node, attr) { return node.getAttribute && node.getAttribute(attr) || node.parentNode && findAncestorAttr(node.parentNode, attr); }; inherited = { dir: findAncestorAttr(root, "dir"), lang: findAncestorAttr(root, "lang"), textDir: findAncestorAttr(root, dataDojoTextDir) }; for (var key in inherited) { if (!inherited[key]) { delete inherited[key]; } } } // Metadata about parent node var parent = { inherited: inherited }; // For collecting <script type="dojo/..."> type nodes (when null, we don't need to collect) var scripts; // when true, only look for <script type="dojo/..."> tags, and don't recurse to children var scriptsOnly; function getEffective(parent) { // summary: // Get effective dir, lang, textDir settings for specified obj // (matching "parent" object structure above), and do caching. // Take care not to return null entries. if (!parent.inherited) { parent.inherited = {}; var node = parent.node, grandparent = getEffective(parent.parent); var inherited = { dir: node.getAttribute("dir") || grandparent.dir, lang: node.getAttribute("lang") || grandparent.lang, textDir: node.getAttribute(dataDojoTextDir) || grandparent.textDir }; for (var key in inherited) { if (inherited[key]) { parent.inherited[key] = inherited[key]; } } } return parent.inherited; } // DFS on DOM tree, collecting nodes with data-dojo-type specified. while (true) { if (!node) { // Finished this level, continue to parent's next sibling if (!parent || !parent.node) { break; } node = parent.node.nextSibling; scriptsOnly = false; parent = parent.parent; scripts = parent.scripts; continue; } if (node.nodeType != 1) { // Text or comment node, skip to next sibling node = node.nextSibling; continue; } if (scripts && node.nodeName.toLowerCase() == "script") { // Save <script type="dojo/..."> for parent, then continue to next sibling type = node.getAttribute("type"); if (type && /^dojo\/\w/i.test(type)) { scripts.push(node); } node = node.nextSibling; continue; } if (scriptsOnly) { // scriptsOnly flag is set, we have already collected scripts if the parent wants them, so now we shouldn't // continue further analysis of the node and will continue to the next sibling node = node.nextSibling; continue; } // Check for data-dojo-type attribute, fallback to backward compatible dojoType // TODO: Remove dojoType in 2.0 var type = node.getAttribute(dataDojoType) || node.getAttribute(dojoType); // Short circuit for leaf nodes containing nothing [but text] var firstChild = node.firstChild; if (!type && (!firstChild || firstChild.nodeType == 3 && !firstChild.nextSibling)) { node = node.nextSibling; continue; } // Meta data about current node var current; var ctor = null; if (type) { // If dojoType/data-dojo-type specified, add to output array of nodes to instantiate. var mixinsValue = node.getAttribute(dataDojoMixins), types = mixinsValue ? [type].concat(mixinsValue.split(/\s*,\s*/)) : [type]; // Note: won't find classes declared via dojo/Declaration or any modules that haven't been // loaded yet so use try/catch to avoid throw from require() try { ctor = getCtor(types, options.contextRequire); } catch (e) {} // If the constructor was not found, check to see if it has modules that can be loaded if (!ctor) { darray.forEach(types, function (t) { if (~t.indexOf('/') && !midsHash[t]) { // If the type looks like a MID and it currently isn't in the array of MIDs to load, add it. midsHash[t] = true; mids[mids.length] = t; } }); } var childScripts = ctor && !ctor.prototype._noScript ? [] : null; // <script> nodes that are parent's children // Setup meta data about this widget node, and save it to list of nodes to instantiate current = { types: types, ctor: ctor, parent: parent, node: node, scripts: childScripts }; current.inherited = getEffective(current); // dir & lang settings for current node, explicit or inherited list.push(current); } else { // Meta data about this non-widget node current = { node: node, scripts: scripts, parent: parent }; } // Recurse, collecting <script type="dojo/..."> children, and also looking for // descendant nodes with dojoType specified (unless the widget has the stopParser flag). // When finished with children, go to my next sibling. scripts = childScripts; scriptsOnly = node.stopParser || ctor && ctor.prototype.stopParser && !options.template; parent = current; node = firstChild; } var d = new Deferred(); // If there are modules to load then require them in if (mids.length) { // Warn that there are modules being auto-required if (false) {} var r = options.contextRequire || require; r(mids, function () { // Go through list of widget nodes, filling in missing constructors, and filtering out nodes that shouldn't // be instantiated due to a stopParser flag on an ancestor that we belatedly learned about due to // auto-require of a module like ContentPane. Assumes list is in DFS order. d.resolve(darray.filter(list, function (widget) { if (!widget.ctor) { // Attempt to find the constructor again. Still won't find classes defined via // dijit/Declaration so need to try/catch. try { widget.ctor = getCtor(widget.types, options.contextRequire); } catch (e) {} } // Get the parent widget var parent = widget.parent; while (parent && !parent.types) { parent = parent.parent; } // Return false if this node should be skipped due to stopParser on an ancestor. // Since list[] is in DFS order, this loop will always set parent.instantiateChildren before // trying to compute widget.instantiate. var proto = widget.ctor && widget.ctor.prototype; widget.instantiateChildren = !(proto && proto.stopParser && !options.template); widget.instantiate = !parent || parent.instantiate && parent.instantiateChildren; return widget.instantiate; })); }); } else { // There were no modules to load, so just resolve with the parsed nodes. This separate code path is for // efficiency, to avoid running the require() and the callback code above. d.resolve(list); } // Return the promise return d.promise; }, _require: function _require( /*DOMNode*/ script, /*Object?*/ options) { // summary: // Helper for _scanAMD(). Takes a `<script type=dojo/require>bar: "acme/bar", ...</script>` node, // calls require() to load the specified modules and (asynchronously) assign them to the specified global // variables, and returns a Promise for when that operation completes. // // In the example above, it is effectively doing a require(["acme/bar", ...], function(a){ bar = a; }). var hash = myEval("{" + script.innerHTML + "}"), // can't use dojo/json::parse() because maybe no quotes vars = [], mids = [], d = new Deferred(); var contextRequire = options && options.contextRequire || require; for (var name in hash) { vars.push(name); mids.push(hash[name]); } contextRequire(mids, function () { for (var i = 0; i < vars.length; i++) { dlang.setObject(vars[i], arguments[i]); } d.resolve(arguments); }); return d.promise; }, _scanAmd: function _scanAmd(root, options) { // summary: // Scans the DOM for any declarative requires and returns their values. // description: // Looks for `<script type=dojo/require>bar: "acme/bar", ...</script>` node, calls require() to load the // specified modules and (asynchronously) assign them to the specified global variables, // and returns a Promise for when those operations complete. // root: DomNode // The node to base the scan from. // options: Object? // a kwArgs options object, see parse() for details // Promise that resolves when all the <script type=dojo/require> nodes have finished loading. var deferred = new Deferred(), promise = deferred.promise; deferred.resolve(true); var self = this; query("script[type='dojo/require']", root).forEach(function (node) { // Fire off require() call for specified modules. Chain this require to fire after // any previous requires complete, so that layers can be loaded before individual module require()'s fire. promise = promise.then(function () { return self._require(node, options); }); // Remove from DOM so it isn't seen again node.parentNode.removeChild(node); }); return promise; }, parse: function parse(rootNode, options) { // summary: // Scan the DOM for class instances, and instantiate them. // description: // Search specified node (or root node) recursively for class instances, // and instantiate them. Searches for either data-dojo-type="Class" or // dojoType="Class" where "Class" is a a fully qualified class name, // like `dijit/form/Button` // // Using `data-dojo-type`: // Attributes using can be mixed into the parameters used to instantiate the // Class by using a `data-dojo-props` attribute on the node being converted. // `data-dojo-props` should be a string attribute to be converted from JSON. // // Using `dojoType`: // Attributes are read from the original domNode and converted to appropriate // types by looking up the Class prototype values. This is the default behavior // from Dojo 1.0 to Dojo 1.5. `dojoType` support is deprecated, and will // go away in Dojo 2.0. // rootNode: DomNode? // A default starting root node from which to start the parsing. Can be // omitted, defaulting to the entire document. If omitted, the `options` // object can be passed in this place. If the `options` object has a // `rootNode` member, that is used. // options: Object? // A hash of options. // // - noStart: Boolean?: // when set will prevent the parser from calling .startup() // when locating the nodes. // - rootNode: DomNode?: // identical to the function's `rootNode` argument, though // allowed to be passed in via this `options object. // - template: Boolean: // If true, ignores ContentPane's stopParser flag and parses contents inside of // a ContentPane inside of a template. This allows dojoAttachPoint on widgets/nodes // nested inside the ContentPane to work. // - inherited: Object: // Hash possibly containing dir and lang settings to be applied to // parsed widgets, unless there's another setting on a sub-node that overrides // - scope: String: // Root for attribute names to search for. If scopeName is dojo, // will search for data-dojo-type (or dojoType). For backwards compatibility // reasons defaults to dojo._scopeName (which is "dojo" except when // multi-version support is used, when it will be something like dojo16, dojo20, etc.) // - propsThis: Object: // If specified, "this" referenced from data-dojo-props will refer to propsThis. // Intended for use from the widgets-in-template feature of `dijit._WidgetsInTemplateMixin` // - contextRequire: Function: // If specified, this require is utilised for looking resolving modules instead of the // `dojo/parser` context `require()`. Intended for use from the widgets-in-template feature of // `dijit._WidgetsInTemplateMixin`. // returns: Mixed // Returns a blended object that is an array of the instantiated objects, but also can include // a promise that is resolved with the instantiated objects. This is done for backwards // compatibility. If the parser auto-requires modules, it will always behave in a promise // fashion and `parser.parse().then(function(instances){...})` should be used. // example: // Parse all widgets on a page: // | parser.parse(); // example: // Parse all classes within the node with id="foo" // | parser.parse(dojo.byId('foo')); // example: // Parse all classes in a page, but do not call .startup() on any // child // | parser.parse({ noStart: true }) // example: // Parse all classes in a node, but do not call .startup() // | parser.parse(someNode, { noStart:true }); // | // or // | parser.parse({ noStart:true, rootNode: someNode }); // determine the root node and options based on the passed arguments. if (rootNode && typeof rootNode != "string" && !("nodeType" in rootNode)) { // If called as parse(options) rather than parse(), parse(rootNode), or parse(rootNode, options)... options = rootNode; rootNode = options.rootNode; } var root = rootNode ? dom.byId(rootNode) : dwindow.body(); options = options || {}; var mixin = options.template ? { template: true } : {}, instances = [], self = this; // First scan for any <script type=dojo/require> nodes, and execute. // Then scan for all nodes with data-dojo-type, and load any unloaded modules. // Then build the object instances. Add instances to already existing (but empty) instances[] array, // which may already have been returned to caller. Also, use otherwise to collect and throw any errors // that occur during the parse(). var p = this._scanAmd(root, options).then(function () { return self.scan(root, options); }).then(function (parsedNodes) { return self._instantiate(parsedNodes, mixin, options, true); }).then(function (_instances) { // Copy the instances into the instances[] array we declared above, and are accessing as // our return value. return instances = instances.concat(_instances); }).otherwise(function (e) { // TODO Modify to follow better pattern for promise error management when available console.error("dojo/parser::parse() error", e); throw e; }); // Blend the array with the promise dlang.mixin(instances, p); return instances; } }; if (true) { dojo.parser = parser; } // Register the parser callback. It should be the first callback // after the a11y test. if (config.parseOnLoad) { ready(100, parser, "parse"); } return parser; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/query.js": /*!************************************!*\ !*** ./node_modules/dojo/query.js ***! \************************************/ /*! no static exports found */ /***/ function node_modulesDojoQueryJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! ./has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! ./dom */ "./node_modules/dojo/dom.js"), __webpack_require__( /*! ./on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! ./_base/array */ "./node_modules/dojo/_base/array.js"), __webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ./selector/_loader */ "./node_modules/dojo/selector/_loader.js"), __webpack_require__( /*! ./selector/_loader!default */ "./node_modules/dojo/selector/lite.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (dojo, has, dom, _on2, array, lang, loader, defaultEngine) { "use strict"; has.add("array-extensible", function () { // test to see if we can extend an array (not supported in old IE) return lang.delegate([], { length: 1 }).length == 1 && !has("bug-for-in-skips-shadowed"); }); var ap = Array.prototype, aps = ap.slice, apc = ap.concat, _forEach = array.forEach; var tnl = function tnl( /*Array*/ a, /*dojo/NodeList?*/ parent, /*Function?*/ NodeListCtor) { // summary: // decorate an array to make it look like a `dojo/NodeList`. // a: // Array of nodes to decorate. // parent: // An optional parent NodeList that generated the current // list of nodes. Used to call _stash() so the parent NodeList // can be accessed via end() later. // NodeListCtor: // An optional constructor function to use for any // new NodeList calls. This allows a certain chain of // NodeList calls to use a different object than dojo/NodeList. var nodeList = new (NodeListCtor || this._NodeListCtor || nl)(a); return parent ? nodeList._stash(parent) : nodeList; }; var loopBody = function loopBody(f, a, o) { a = [0].concat(aps.call(a, 0)); o = o || dojo.global; return function (node) { a[0] = node; return f.apply(o, a); }; }; // adapters var adaptAsForEach = function adaptAsForEach(f, o) { // summary: // adapts a single node function to be used in the forEach-type // actions. The initial object is returned from the specialized // function. // f: Function // a function to adapt // o: Object? // an optional context for f return function () { this.forEach(loopBody(f, arguments, o)); return this; // Object }; }; var adaptAsMap = function adaptAsMap(f, o) { // summary: // adapts a single node function to be used in the map-type // actions. The return is a new array of values, as via `dojo/_base/array.map` // f: Function // a function to adapt // o: Object? // an optional context for f return function () { return this.map(loopBody(f, arguments, o)); }; }; var adaptAsFilter = function adaptAsFilter(f, o) { // summary: // adapts a single node function to be used in the filter-type actions // f: Function // a function to adapt // o: Object? // an optional context for f return function () { return this.filter(loopBody(f, arguments, o)); }; }; var adaptWithCondition = function adaptWithCondition(f, g, o) { // summary: // adapts a single node function to be used in the map-type // actions, behaves like forEach() or map() depending on arguments // f: Function // a function to adapt // g: Function // a condition function, if true runs as map(), otherwise runs as forEach() // o: Object? // an optional context for f and g return function () { var a = arguments, body = loopBody(f, a, o); if (g.call(o || dojo.global, a)) { return this.map(body); // self } this.forEach(body); return this; // self }; }; var NodeList = function NodeList(array) { // summary: // Array-like object which adds syntactic // sugar for chaining, common iteration operations, animation, and // node manipulation. NodeLists are most often returned as the // result of dojo/query() calls. // description: // NodeList instances provide many utilities that reflect // core Dojo APIs for Array iteration and manipulation, DOM // manipulation, and event handling. Instead of needing to dig up // functions in the dojo package, NodeLists generally make the // full power of Dojo available for DOM manipulation tasks in a // simple, chainable way. // example: // create a node list from a node // | require(["dojo/query", "dojo/dom" // | ], function(query, dom){ // | query.NodeList(dom.byId("foo")); // | }); // example: // get a NodeList from a CSS query and iterate on it // | require(["dojo/on", "dojo/dom" // | ], function(on, dom){ // | var l = query(".thinger"); // | l.forEach(function(node, index, nodeList){ // | console.log(index, node.innerHTML); // | }); // | }); // example: // use native and Dojo-provided array methods to manipulate a // NodeList without needing to use dojo.* functions explicitly: // | require(["dojo/query", "dojo/dom-construct", "dojo/dom" // | ], function(query, domConstruct, dom){ // | var l = query(".thinger"); // | // since NodeLists are real arrays, they have a length // | // property that is both readable and writable and // | // push/pop/shift/unshift methods // | console.log(l.length); // | l.push(domConstruct.create("span")); // | // | // dojo's normalized array methods work too: // | console.log( l.indexOf(dom.byId("foo")) ); // | // ...including the special "function as string" shorthand // | console.log( l.every("item.nodeType == 1") ); // | // | // NodeLists can be [..] indexed, or you can use the at() // | // function to get specific items wrapped in a new NodeList: // | var node = l[3]; // the 4th element // | var newList = l.at(1, 3); // the 2nd and 4th elements // | }); // example: // chainability is a key advantage of NodeLists: // | require(["dojo/query", "dojo/NodeList-dom" // | ], function(query){ // | query(".thinger") // | .onclick(function(e){ /* ... */ }) // | .at(1, 3, 8) // get a subset // | .style("padding", "5px") // | .forEach(console.log); // | }); var isNew = this instanceof nl && has("array-extensible"); if (typeof array == "number") { array = Array(array); } var nodeArray = array && "length" in array ? array : arguments; if (isNew || !nodeArray.sort) { // make sure it's a real array before we pass it on to be wrapped var target = isNew ? this : [], l = target.length = nodeArray.length; for (var i = 0; i < l; i++) { target[i] = nodeArray[i]; } if (isNew) { // called with new operator, this means we are going to use this instance and push // the nodes on to it. This is usually much faster since the NodeList properties // don't need to be copied (unless the list of nodes is extremely large). return target; } nodeArray = target; } // called without new operator, use a real array and copy prototype properties, // this is slower and exists for back-compat. Should be removed in 2.0. lang._mixin(nodeArray, nlp); nodeArray._NodeListCtor = function (array) { // call without new operator to preserve back-compat behavior return nl(array); }; return nodeArray; }; var nl = NodeList, nlp = nl.prototype = true ? [] : undefined; // extend an array if it is extensible // expose adapters and the wrapper as private functions nl._wrap = nlp._wrap = tnl; nl._adaptAsMap = adaptAsMap; nl._adaptAsForEach = adaptAsForEach; nl._adaptAsFilter = adaptAsFilter; nl._adaptWithCondition = adaptWithCondition; // mass assignment // add array redirectors _forEach(["slice", "splice"], function (name) { var f = ap[name]; //Use a copy of the this array via this.slice() to allow .end() to work right in the splice case. // CANNOT apply ._stash()/end() to splice since it currently modifies // the existing this array -- it would break backward compatibility if we copy the array before // the splice so that we can use .end(). So only doing the stash option to this._wrap for slice. nlp[name] = function () { return this._wrap(f.apply(this, arguments), name == "slice" ? this : null); }; }); // concat should be here but some browsers with native NodeList have problems with it // add array.js redirectors _forEach(["indexOf", "lastIndexOf", "every", "some"], function (name) { var f = array[name]; nlp[name] = function () { return f.apply(dojo, [this].concat(aps.call(arguments, 0))); }; }); lang.extend(NodeList, { // copy the constructors constructor: nl, _NodeListCtor: nl, toString: function toString() { // Array.prototype.toString can't be applied to objects, so we use join return this.join(","); }, _stash: function _stash(parent) { // summary: // private function to hold to a parent NodeList. end() to return the parent NodeList. // // example: // How to make a `dojo/NodeList` method that only returns the third node in // the dojo/NodeList but allows access to the original NodeList by using this._stash: // | require(["dojo/query", "dojo/_base/lang", "dojo/NodeList", "dojo/NodeList-dom" // | ], function(query, lang){ // | lang.extend(NodeList, { // | third: function(){ // | var newNodeList = NodeList(this[2]); // | return newNodeList._stash(this); // | } // | }); // | // then see how _stash applies a sub-list, to be .end()'ed out of // | query(".foo") // | .third() // | .addClass("thirdFoo") // | .end() // | // access to the orig .foo list // | .removeClass("foo") // | }); // this._parent = parent; return this; // dojo/NodeList }, on: function on(eventName, listener) { // summary: // Listen for events on the nodes in the NodeList. Basic usage is: // // example: // | require(["dojo/query" // | ], function(query){ // | query(".my-class").on("click", listener); // This supports event delegation by using selectors as the first argument with the event names as // pseudo selectors. For example: // | query("#my-list").on("li:click", listener); // This will listen for click events within `<li>` elements that are inside the `#my-list` element. // Because on supports CSS selector syntax, we can use comma-delimited events as well: // | query("#my-list").on("li button:mouseover, li:click", listener); // | }); var handles = this.map(function (node) { return _on2(node, eventName, listener); // TODO: apply to the NodeList so the same selector engine is used for matches }); handles.remove = function () { for (var i = 0; i < handles.length; i++) { handles[i].remove(); } }; return handles; }, end: function end() { // summary: // Ends use of the current `NodeList` by returning the previous NodeList // that generated the current NodeList. // description: // Returns the `NodeList` that generated the current `NodeList`. If there // is no parent NodeList, an empty NodeList is returned. // example: // | require(["dojo/query", "dojo/NodeList-dom" // | ], function(query){ // | query("a") // | .filter(".disabled") // | // operate on the anchors that only have a disabled class // | .style("color", "grey") // | .end() // | // jump back to the list of anchors // | .style(...) // | }); // if (this._parent) { return this._parent; } else { //Just return empty list. return new this._NodeListCtor(0); } }, // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array#Methods // FIXME: handle return values for #3244 // http://trac.dojotoolkit.org/ticket/3244 // FIXME: // need to wrap or implement: // join (perhaps w/ innerHTML/outerHTML overload for toString() of items?) // reduce // reduceRight /*===== slice: function(begin, end){ // summary: // Returns a new NodeList, maintaining this one in place // description: // This method behaves exactly like the Array.slice method // with the caveat that it returns a `dojo/NodeList` and not a // raw Array. For more details, see Mozilla's [slice // documentation](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/slice) // begin: Integer // Can be a positive or negative integer, with positive // integers noting the offset to begin at, and negative // integers denoting an offset from the end (i.e., to the left // of the end) // end: Integer? // Optional parameter to describe what position relative to // the NodeList's zero index to end the slice at. Like begin, // can be positive or negative. return this._wrap(a.slice.apply(this, arguments)); }, splice: function(index, howmany, item){ // summary: // Returns a new NodeList, manipulating this NodeList based on // the arguments passed, potentially splicing in new elements // at an offset, optionally deleting elements // description: // This method behaves exactly like the Array.splice method // with the caveat that it returns a `dojo/NodeList` and not a // raw Array. For more details, see Mozilla's [splice // documentation](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice) // For backwards compatibility, calling .end() on the spliced NodeList // does not return the original NodeList -- splice alters the NodeList in place. // index: Integer // begin can be a positive or negative integer, with positive // integers noting the offset to begin at, and negative // integers denoting an offset from the end (i.e., to the left // of the end) // howmany: Integer? // Optional parameter to describe what position relative to // the NodeList's zero index to end the slice at. Like begin, // can be positive or negative. // item: Object...? // Any number of optional parameters may be passed in to be // spliced into the NodeList return this._wrap(a.splice.apply(this, arguments)); // dojo/NodeList }, indexOf: function(value, fromIndex){ // summary: // see `dojo/_base/array.indexOf()`. The primary difference is that the acted-on // array is implicitly this NodeList // value: Object // The value to search for. // fromIndex: Integer? // The location to start searching from. Optional. Defaults to 0. // description: // For more details on the behavior of indexOf, see Mozilla's // [indexOf // docs](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) // returns: // Positive Integer or 0 for a match, -1 of not found. return d.indexOf(this, value, fromIndex); // Integer }, lastIndexOf: function(value, fromIndex){ // summary: // see `dojo/_base/array.lastIndexOf()`. The primary difference is that the // acted-on array is implicitly this NodeList // description: // For more details on the behavior of lastIndexOf, see // Mozilla's [lastIndexOf // docs](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) // value: Object // The value to search for. // fromIndex: Integer? // The location to start searching from. Optional. Defaults to 0. // returns: // Positive Integer or 0 for a match, -1 of not found. return d.lastIndexOf(this, value, fromIndex); // Integer }, every: function(callback, thisObject){ // summary: // see `dojo/_base/array.every()` and the [Array.every // docs](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every). // Takes the same structure of arguments and returns as // dojo/_base/array.every() with the caveat that the passed array is // implicitly this NodeList // callback: Function // the callback // thisObject: Object? // the context return d.every(this, callback, thisObject); // Boolean }, some: function(callback, thisObject){ // summary: // Takes the same structure of arguments and returns as // `dojo/_base/array.some()` with the caveat that the passed array is // implicitly this NodeList. See `dojo/_base/array.some()` and Mozilla's // [Array.some // documentation](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some). // callback: Function // the callback // thisObject: Object? // the context return d.some(this, callback, thisObject); // Boolean }, =====*/ concat: function concat(item) { // summary: // Returns a new NodeList comprised of items in this NodeList // as well as items passed in as parameters // description: // This method behaves exactly like the Array.concat method // with the caveat that it returns a `NodeList` and not a // raw Array. For more details, see the [Array.concat // docs](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/concat) // item: Object? // Any number of optional parameters may be passed in to be // spliced into the NodeList //return this._wrap(apc.apply(this, arguments)); // the line above won't work for the native NodeList, or for Dojo NodeLists either :-( // implementation notes: // Array.concat() doesn't recognize native NodeLists or Dojo NodeLists // as arrays, and so does not inline them into a unioned array, but // appends them as single entities. Both the original NodeList and the // items passed in as parameters must be converted to raw Arrays // and then the concatenation result may be re-_wrap()ed as a Dojo NodeList. var t = aps.call(this, 0), m = array.map(arguments, function (a) { return aps.call(a, 0); }); return this._wrap(apc.apply(t, m), this); // dojo/NodeList }, map: function map( /*Function*/ func, /*Function?*/ obj) { // summary: // see `dojo/_base/array.map()`. The primary difference is that the acted-on // array is implicitly this NodeList and the return is a // NodeList (a subclass of Array) return this._wrap(array.map(this, func, obj), this); // dojo/NodeList }, forEach: function forEach(callback, thisObj) { // summary: // see `dojo/_base/array.forEach()`. The primary difference is that the acted-on // array is implicitly this NodeList. If you want the option to break out // of the forEach loop, use every() or some() instead. _forEach(this, callback, thisObj); // non-standard return to allow easier chaining return this; // dojo/NodeList }, filter: function filter( /*String|Function*/ _filter) { // summary: // "masks" the built-in javascript filter() method (supported // in Dojo via `dojo/_base/array.filter`) to support passing a simple // string filter in addition to supporting filtering function // objects. // filter: // If a string, a CSS rule like ".thinger" or "div > span". // example: // "regular" JS filter syntax as exposed in `dojo/_base/array.filter`: // | require(["dojo/query", "dojo/NodeList-dom" // | ], function(query){ // | query("*").filter(function(item){ // | // highlight every paragraph // | return (item.nodeName == "p"); // | }).style("backgroundColor", "yellow"); // | }); // example: // the same filtering using a CSS selector // | require(["dojo/query", "dojo/NodeList-dom" // | ], function(query){ // | query("*").filter("p").styles("backgroundColor", "yellow"); // | }); var a = arguments, items = this, start = 0; if (typeof _filter == "string") { // inline'd type check items = query._filterResult(this, a[0]); if (a.length == 1) { // if we only got a string query, pass back the filtered results return items._stash(this); // dojo/NodeList } // if we got a callback, run it over the filtered items start = 1; } return this._wrap(array.filter(items, a[start], a[start + 1]), this); // dojo/NodeList }, instantiate: function instantiate( /*String|Object*/ declaredClass, /*Object?*/ properties) { // summary: // Create a new instance of a specified class, using the // specified properties and each node in the NodeList as a // srcNodeRef. // example: // Grabs all buttons in the page and converts them to dijit/form/Button's. // | var buttons = query("button").instantiate(Button, {showLabel: true}); var c = lang.isFunction(declaredClass) ? declaredClass : lang.getObject(declaredClass); properties = properties || {}; return this.forEach(function (node) { new c(properties, node); }); // dojo/NodeList }, at: function at() { // summary: // Returns a new NodeList comprised of items in this NodeList // at the given index or indices. // // index: Integer... // One or more 0-based indices of items in the current // NodeList. A negative index will start at the end of the // list and go backwards. // // example: // Shorten the list to the first, second, and third elements // | require(["dojo/query" // | ], function(query){ // | query("a").at(0, 1, 2).forEach(fn); // | }); // // example: // Retrieve the first and last elements of a unordered list: // | require(["dojo/query" // | ], function(query){ // | query("ul > li").at(0, -1).forEach(cb); // | }); // // example: // Do something for the first element only, but end() out back to // the original list and continue chaining: // | require(["dojo/query" // | ], function(query){ // | query("a").at(0).onclick(fn).end().forEach(function(n){ // | console.log(n); // all anchors on the page. // | }) // | }); var t = new this._NodeListCtor(0); _forEach(arguments, function (i) { if (i < 0) { i = this.length + i; } if (this[i]) { t.push(this[i]); } }, this); return t._stash(this); // dojo/NodeList } }); function queryForEngine(engine, NodeList) { var query = function query( /*String*/ _query, /*String|DOMNode?*/ root) { // summary: // Returns nodes which match the given CSS selector, searching the // entire document by default but optionally taking a node to scope // the search by. Returns an instance of NodeList. if (typeof root == "string") { root = dom.byId(root); if (!root) { return new NodeList([]); } } var results = typeof _query == "string" ? engine(_query, root) : _query ? _query.end && _query.on ? _query : [_query] : []; if (results.end && results.on) { // already wrapped return results; } return new NodeList(results); }; query.matches = engine.match || function (node, selector, root) { // summary: // Test to see if a node matches a selector return query.filter([node], selector, root).length > 0; }; // the engine provides a filtering function, use it to for matching query.filter = engine.filter || function (nodes, selector, root) { // summary: // Filters an array of nodes. Note that this does not guarantee to return a NodeList, just an array. return query(selector, root).filter(function (node) { return array.indexOf(nodes, node) > -1; }); }; if (typeof engine != "function") { var search = engine.search; engine = function engine(selector, root) { // Slick does it backwards (or everyone else does it backwards, probably the latter) return search(root || document, selector); }; } return query; } var query = queryForEngine(defaultEngine, NodeList); /*===== query = function(selector, context){ // summary: // This modules provides DOM querying functionality. The module export is a function // that can be used to query for DOM nodes by CSS selector and returns a NodeList // representing the matching nodes. // selector: String // A CSS selector to search for. // context: String|DomNode? // An optional context to limit the searching scope. Only nodes under `context` will be // scanned. // example: // add an onclick handler to every submit button in the document // which causes the form to be sent via Ajax instead: // | require(["dojo/query", "dojo/request", "dojo/dom-form", "dojo/dom-construct", "dojo/dom-style" // | ], function(query, request, domForm, domConstruct, domStyle){ // | query("input[type='submit']").on("click", function(e){ // | e.preventDefault(); // prevent sending the form // | var btn = e.target; // | request.post("http://example.com/", { // | data: domForm.toObject(btn.form) // | }).then(function(response){ // | // replace the form with the response // | domConstruct.create(div, {innerHTML: response}, btn.form, "after"); // | domStyle.set(btn.form, "display", "none"); // | }); // | }); // | }); // // description: // dojo/query is responsible for loading the appropriate query engine and wrapping // its results with a `NodeList`. You can use dojo/query with a specific selector engine // by using it as a plugin. For example, if you installed the sizzle package, you could // use it as the selector engine with: // | require(["dojo/query!sizzle"], function(query){ // | query("div")... // // The id after the ! can be a module id of the selector engine or one of the following values: // // - acme: This is the default engine used by Dojo base, and will ensure that the full // Acme engine is always loaded. // // - css2: If the browser has a native selector engine, this will be used, otherwise a // very minimal lightweight selector engine will be loaded that can do simple CSS2 selectors // (by #id, .class, tag, and [name=value] attributes, with standard child or descendant (>) // operators) and nothing more. // // - css2.1: If the browser has a native selector engine, this will be used, otherwise the // full Acme engine will be loaded. // // - css3: If the browser has a native selector engine with support for CSS3 pseudo // selectors (most modern browsers except IE8), this will be used, otherwise the // full Acme engine will be loaded. // // - Or the module id of a selector engine can be used to explicitly choose the selector engine // // For example, if you are using CSS3 pseudo selectors in module, you can specify that // you will need support them with: // | require(["dojo/query!css3"], function(query){ // | query('#t > h3:nth-child(odd)')... // // You can also choose the selector engine/load configuration by setting the query-selector: // For example: // | <script data-dojo-config="query-selector:'css3'" src="dojo.js"></script> // return new NodeList(); // dojo/NodeList }; =====*/ // the query that is returned from this module is slightly different than dojo.query, // because dojo.query has to maintain backwards compatibility with returning a // true array which has performance problems. The query returned from the module // does not use true arrays, but rather inherits from Array, making it much faster to // instantiate. dojo.query = queryForEngine(defaultEngine, function (array) { // call it without the new operator to invoke the back-compat behavior that returns a true array return NodeList(array); // dojo/NodeList }); query.load = function (id, parentRequire, loaded) { // summary: // can be used as AMD plugin to conditionally load new query engine // example: // | require(["dojo/query!custom"], function(qsa){ // | // loaded selector/custom.js as engine // | qsa("#foobar").forEach(...); // | }); loader.load(id, parentRequire, function (engine) { loaded(queryForEngine(engine, NodeList)); }); }; dojo._filterQueryResult = query._filterResult = function (nodes, selector, root) { return new NodeList(query.filter(nodes, selector, root)); }; dojo.NodeList = query.NodeList = NodeList; return query; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/ready.js": /*!************************************!*\ !*** ./node_modules/dojo/ready.js ***! \************************************/ /*! no static exports found */ /***/ function node_modulesDojoReadyJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! ./has */ "./node_modules/dojo/has.js"), __webpack_require__.dj.c(module.i), __webpack_require__( /*! ./domReady */ "./node_modules/dojo/domReady.js"), __webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (dojo, has, require, domReady, lang) { // module: // dojo/ready // note: // This module should be unnecessary in dojo 2.0 var // truthy if DOMContentLoaded or better (e.g., window.onload fired) has been achieved isDomReady = 0, // The queue of functions waiting to execute as soon as dojo.ready conditions satisfied loadQ = [], // prevent recursion in onLoad onLoadRecursiveGuard = 0, handleDomReady = function handleDomReady() { isDomReady = 1; dojo._postLoad = dojo.config.afterOnLoad = true; onEvent(); }, onEvent = function onEvent() { // Called when some state changes: // - dom ready // - dojo/domReady has finished processing everything in its queue // - task added to loadQ // - require() has finished loading all currently requested modules // // Run the functions queued with dojo.ready if appropriate. //guard against recursions into this function if (onLoadRecursiveGuard) { return; } onLoadRecursiveGuard = 1; // Run tasks in queue if require() is finished loading modules, the dom is ready, and there are no // pending tasks registered via domReady(). // The last step is necessary so that a user defined dojo.ready() callback is delayed until after the // domReady() calls inside of dojo. Failure can be seen on dijit/tests/robot/Dialog_ally.html on IE8 // because the dijit/focus.js domReady() callback doesn't execute until after the test starts running. while (isDomReady && (!domReady || domReady._Q.length == 0) && (require.idle ? require.idle() : true) && loadQ.length) { var f = loadQ.shift(); try { f(); } catch (e) { // force the dojo.js on("error") handler do display the message e.info = e.message; if (require.signal) { require.signal("error", e); } else { throw e; } } } onLoadRecursiveGuard = 0; }; // Check if we should run the next queue operation whenever require() finishes loading modules or domReady // finishes processing it's queue. require.on && require.on("idle", onEvent); if (domReady) { domReady._onQEmpty = onEvent; } var ready = dojo.ready = dojo.addOnLoad = function (priority, context, callback) { // summary: // Add a function to execute on DOM content loaded and all requested modules have arrived and been evaluated. // In most cases, the `domReady` plug-in should suffice and this method should not be needed. // // When called in a non-browser environment, just checks that all requested modules have arrived and been // evaluated. // priority: Integer? // The order in which to exec this callback relative to other callbacks, defaults to 1000 // context: Object?|Function // The context in which to run execute callback, or a callback if not using context // callback: Function? // The function to execute. // // example: // Simple DOM and Modules ready syntax // | require(["dojo/ready"], function(ready){ // | ready(function(){ alert("Dom ready!"); }); // | }); // // example: // Using a priority // | require(["dojo/ready"], function(ready){ // | ready(2, function(){ alert("low priority ready!"); }) // | }); // // example: // Using context // | require(["dojo/ready"], function(ready){ // | ready(foo, function(){ // | // in here, this == foo // | }); // | }); // // example: // Using dojo/hitch style args: // | require(["dojo/ready"], function(ready){ // | var foo = { dojoReady: function(){ console.warn(this, "dojo dom and modules ready."); } }; // | ready(foo, "dojoReady"); // | }); var hitchArgs = lang._toArray(arguments); if (typeof priority != "number") { callback = context; context = priority; priority = 1000; } else { hitchArgs.shift(); } callback = callback ? lang.hitch.apply(dojo, hitchArgs) : function () { context(); }; callback.priority = priority; for (var i = 0; i < loadQ.length && priority >= loadQ[i].priority; i++) {} loadQ.splice(i, 0, callback); onEvent(); }; has.add("dojo-config-addOnLoad", 1); if (has("dojo-config-addOnLoad")) { var dca = dojo.config.addOnLoad; if (dca) { ready[lang.isArray(dca) ? "apply" : "call"](dojo, dca); } } if (false) {} if (domReady) { domReady(handleDomReady); } else { handleDomReady(); } return ready; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/request.js": /*!**************************************!*\ !*** ./node_modules/dojo/request.js ***! \**************************************/ /*! no static exports found */ /***/ function node_modulesDojoRequestJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./request/default */ "./node_modules/dojo/request/xhr.js") /*=====, './_base/declare', './promise/Promise' =====*/ ], __WEBPACK_AMD_DEFINE_RESULT__ = function (request /*=====, declare, Promise =====*/ ) { /*===== request = function(url, options){ // summary: // Send a request using the default transport for the current platform. // url: String // The URL to request. // options: dojo/request.__Options? // Options for the request. // returns: dojo/request.__Promise }; request.__Promise = declare(Promise, { // response: dojo/promise/Promise // A promise resolving to an object representing // the response from the server. }); request.__BaseOptions = declare(null, { // query: String|Object? // Query parameters to append to the URL. // data: String|Object? // Data to transfer. This is ignored for GET and DELETE // requests. // preventCache: Boolean? // Whether to append a cache-busting parameter to the URL. // timeout: Integer? // Milliseconds to wait for the response. If this time // passes, the then the promise is rejected. // handleAs: String? // How to handle the response from the server. Default is // 'text'. Other values are 'json', 'javascript', and 'xml'. }); request.__MethodOptions = declare(null, { // method: String? // The HTTP method to use to make the request. Must be // uppercase. }); request.__Options = declare([request.__BaseOptions, request.__MethodOptions]); request.get = function(url, options){ // summary: // Send an HTTP GET request using the default transport for the current platform. // url: String // URL to request // options: dojo/request.__BaseOptions? // Options for the request. // returns: dojo/request.__Promise }; request.post = function(url, options){ // summary: // Send an HTTP POST request using the default transport for the current platform. // url: String // URL to request // options: dojo/request.__BaseOptions? // Options for the request. // returns: dojo/request.__Promise }; request.put = function(url, options){ // summary: // Send an HTTP POST request using the default transport for the current platform. // url: String // URL to request // options: dojo/request.__BaseOptions? // Options for the request. // returns: dojo/request.__Promise }; request.del = function(url, options){ // summary: // Send an HTTP DELETE request using the default transport for the current platform. // url: String // URL to request // options: dojo/request.__BaseOptions? // Options for the request. // returns: dojo/request.__Promise }; =====*/ return request; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/selector/_loader.js": /*!***********************************************!*\ !*** ./node_modules/dojo/selector/_loader.js ***! \***********************************************/ /*! no static exports found */ /***/ function node_modulesDojoSelector_loaderJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; var require; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../has */ "./node_modules/dojo/has.js"), __webpack_require__.dj.c(module.i)], __WEBPACK_AMD_DEFINE_RESULT__ = function (has, require) { "use strict"; if (typeof document !== "undefined") { var testDiv = document.createElement("div"); has.add("dom-qsa2.1", !!testDiv.querySelectorAll); has.add("dom-qsa3", function () { // test to see if we have a reasonable native selector engine available try { testDiv.innerHTML = "<p class='TEST'></p>"; // test kind of from sizzle // Safari can't handle uppercase or unicode characters when // in quirks mode, IE8 can't handle pseudos like :empty return testDiv.querySelectorAll(".TEST:empty").length == 1; } catch (e) {} }); } var fullEngine; var acme = "./acme", lite = "./lite"; return { // summary: // This module handles loading the appropriate selector engine for the given browser load: function load(id, parentRequire, loaded, config) { if (config && config.isBuild) { //Indicate that the optimizer should not wait //for this resource any more and complete optimization. //This resource will be resolved dynamically during //run time in the web browser. loaded(); return; } var req = require; // here we implement the default logic for choosing a selector engine id = id == "default" ? has("config-selectorEngine") || "css3" : id; id = id == "css2" || id == "lite" ? lite : id == "css2.1" ? true ? lite : undefined : id == "css3" ? true ? lite : undefined : id == "acme" ? acme : (req = parentRequire) && id; if (id.charAt(id.length - 1) == '?') { id = id.substring(0, id.length - 1); var optionalLoad = true; } // the query engine is optional, only load it if a native one is not available or existing one has not been loaded if (optionalLoad && (has("dom-compliant-qsa") || fullEngine)) { return loaded(fullEngine); } // load the referenced selector engine req([id], function (engine) { if (id != "./lite") { fullEngine = engine; } loaded(engine); }); } }; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/selector/lite.js": /*!********************************************!*\ !*** ./node_modules/dojo/selector/lite.js ***! \********************************************/ /*! no static exports found */ /***/ function node_modulesDojoSelectorLiteJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ../has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! ../_base/kernel */ "./node_modules/dojo/_base/kernel.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (has, dojo) { "use strict"; var testDiv = document.createElement("div"); var matchesSelector = testDiv.matches || testDiv.webkitMatchesSelector || testDiv.mozMatchesSelector || testDiv.msMatchesSelector || testDiv.oMatchesSelector; var querySelectorAll = testDiv.querySelectorAll; var unionSplit = /([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g; has.add("dom-matches-selector", !!matchesSelector); has.add("dom-qsa", !!querySelectorAll); // this is a simple query engine. It has handles basic selectors, and for simple // common selectors is extremely fast var liteEngine = function liteEngine(selector, root) { // summary: // A small lightweight query selector engine that implements CSS2.1 selectors // minus pseudo-classes and the sibling combinator, plus CSS3 attribute selectors if (combine && selector.indexOf(',') > -1) { return combine(selector, root); } // use the root's ownerDocument if provided, otherwise try to use dojo.doc. Note // that we don't use dojo/_base/window's doc to reduce dependencies, and // fallback to plain document if dojo.doc hasn't been defined (by dojo/_base/window). // presumably we will have a better way to do this in 2.0 var doc = root ? root.ownerDocument || root : dojo.doc || document, match = (querySelectorAll ? /^([\w]*)#([\w\-]+$)|^(\.)([\w\-\*]+$)|^(\w+$)/ : // this one only matches on simple queries where we can beat qSA with specific methods /^([\w]*)#([\w\-]+)(?:\s+(.*))?$|(?:^|(>|.+\s+))([\w\-\*]+)(\S*$)/ // this one matches parts of the query that we can use to speed up manual filtering ).exec(selector); root = root || doc; if (match) { var isInsideDomTree = has('ie') === 8 && has('quirks') ? root.nodeType === doc.nodeType : root.parentNode !== null && root.nodeType !== 9 && root.parentNode === doc; // fast path regardless of whether or not querySelectorAll exists if (match[2] && isInsideDomTree) { // an #id // use dojo.byId if available as it fixes the id retrieval in IE, note that we can't use the dojo namespace in 2.0, but if there is a conditional module use, we will use that var found = dojo.byId ? dojo.byId(match[2], doc) : doc.getElementById(match[2]); if (!found || match[1] && match[1] != found.tagName.toLowerCase()) { // if there is a tag qualifer and it doesn't match, no matches return []; } if (root != doc) { // there is a root element, make sure we are a child of it var parent = found; while (parent != root) { parent = parent.parentNode; if (!parent) { return []; } } } return match[3] ? liteEngine(match[3], found) : [found]; } if (match[3] && root.getElementsByClassName) { // a .class return root.getElementsByClassName(match[4]); } var found; if (match[5]) { // a tag found = root.getElementsByTagName(match[5]); if (match[4] || match[6]) { selector = (match[4] || "") + match[6]; } else { // that was the entirety of the query, return results return found; } } } if (querySelectorAll) { // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements if (root.nodeType === 1 && root.nodeName.toLowerCase() !== "object") { return useRoot(root, selector, root.querySelectorAll); } else { // we can use the native qSA return root.querySelectorAll(selector); } } else if (!found) { // search all children and then filter found = root.getElementsByTagName("*"); } // now we filter the nodes that were found using the matchesSelector var results = []; for (var i = 0, l = found.length; i < l; i++) { var node = found[i]; if (node.nodeType == 1 && jsMatchesSelector(node, selector, root)) { // keep the nodes that match the selector results.push(node); } } return results; }; var useRoot = function useRoot(context, query, method) { // this function creates a temporary id so we can do rooted qSA queries, this is taken from sizzle var oldContext = context, old = context.getAttribute("id"), nid = old || "__dojo__", hasParent = context.parentNode, relativeHierarchySelector = /^\s*[+~]/.test(query); if (relativeHierarchySelector && !hasParent) { return []; } if (!old) { context.setAttribute("id", nid); } else { nid = nid.replace(/'/g, "\\$&"); } if (relativeHierarchySelector && hasParent) { context = context.parentNode; } var selectors = query.match(unionSplit); for (var i = 0; i < selectors.length; i++) { selectors[i] = "[id='" + nid + "'] " + selectors[i]; } query = selectors.join(","); try { return method.call(context, query); } finally { if (!old) { oldContext.removeAttribute("id"); } } }; if (false) { var jsMatchesSelector; } if (false) { var combine; } liteEngine.match = matchesSelector ? function (node, selector, root) { if (root && root.nodeType != 9) { // doesn't support three args, use rooted id trick return useRoot(root, selector, function (query) { return matchesSelector.call(node, query); }); } // we have a native matchesSelector, use that return matchesSelector.call(node, selector); } : jsMatchesSelector; // otherwise use the JS matches impl return liteEngine; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/string.js": /*!*************************************!*\ !*** ./node_modules/dojo/string.js ***! \*************************************/ /*! no static exports found */ /***/ function node_modulesDojoStringJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/kernel */ "./node_modules/dojo/_base/kernel.js"), // kernel.global __webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (kernel, lang) { // module: // dojo/string var ESCAPE_REGEXP = /[&<>'"\/]/g; var ESCAPE_MAP = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '/': '/' }; var string = {// summary: // String utilities for Dojo }; lang.setObject("dojo.string", string); string.escape = function ( /*String*/ str) { // summary: // Efficiently escape a string for insertion into HTML (innerHTML or attributes), replacing &, <, >, ", ', and / characters. // str: // the string to escape if (!str) { return ""; } return str.replace(ESCAPE_REGEXP, function (c) { return ESCAPE_MAP[c]; }); }; string.rep = function ( /*String*/ str, /*Integer*/ num) { // summary: // Efficiently replicate a string `n` times. // str: // the string to replicate // num: // number of times to replicate the string if (num <= 0 || !str) { return ""; } var buf = []; for (;;) { if (num & 1) { buf.push(str); } if (!(num >>= 1)) { break; } str += str; } return buf.join(""); // String }; string.pad = function ( /*String*/ text, /*Integer*/ size, /*String?*/ ch, /*Boolean?*/ end) { // summary: // Pad a string to guarantee that it is at least `size` length by // filling with the character `ch` at either the start or end of the // string. Pads at the start, by default. // text: // the string to pad // size: // length to provide padding // ch: // character to pad, defaults to '0' // end: // adds padding at the end if true, otherwise pads at start // example: // | // Fill the string to length 10 with "+" characters on the right. Yields "Dojo++++++". // | string.pad("Dojo", 10, "+", true); if (!ch) { ch = '0'; } var out = String(text), pad = string.rep(ch, Math.ceil((size - out.length) / ch.length)); return end ? out + pad : pad + out; // String }; string.substitute = function ( /*String*/ template, /*Object|Array*/ map, /*Function?*/ transform, /*Object?*/ thisObject) { // summary: // Performs parameterized substitutions on a string. Throws an // exception if any parameter is unmatched. // template: // a string with expressions in the form `${key}` to be replaced or // `${key:format}` which specifies a format function. keys are case-sensitive. // The special sequence `${}` can be used escape `$`. // map: // hash to search for substitutions // transform: // a function to process all parameters before substitution takes // place, e.g. mylib.encodeXML // thisObject: // where to look for optional format function; default to the global // namespace // example: // Substitutes two expressions in a string from an Array or Object // | // returns "File 'foo.html' is not found in directory '/temp'." // | // by providing substitution data in an Array // | string.substitute( // | "File '${0}' is not found in directory '${1}'.", // | ["foo.html","/temp"] // | ); // | // | // also returns "File 'foo.html' is not found in directory '/temp'." // | // but provides substitution data in an Object structure. Dotted // | // notation may be used to traverse the structure. // | string.substitute( // | "File '${name}' is not found in directory '${info.dir}'.", // | { name: "foo.html", info: { dir: "/temp" } } // | ); // example: // Use a transform function to modify the values: // | // returns "file 'foo.html' is not found in directory '/temp'." // | string.substitute( // | "${0} is not found in ${1}.", // | ["foo.html","/temp"], // | function(str){ // | // try to figure out the type // | var prefix = (str.charAt(0) == "/") ? "directory": "file"; // | return prefix + " '" + str + "'"; // | } // | ); // example: // Use a formatter // | // returns "thinger -- howdy" // | string.substitute( // | "${0:postfix}", ["thinger"], null, { // | postfix: function(value, key){ // | return value + " -- howdy"; // | } // | } // | ); thisObject = thisObject || kernel.global; transform = transform ? lang.hitch(thisObject, transform) : function (v) { return v; }; return template.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g, function (match, key, format) { if (key == '') { return '$'; } var value = lang.getObject(key, false, map); if (format) { value = lang.getObject(format, false, thisObject).call(thisObject, value, key); } var result = transform(value, key); if (typeof result === 'undefined') { throw new Error('string.substitute could not find key "' + key + '" in template'); } return result.toString(); }); // String }; string.trim = String.prototype.trim ? lang.trim : // aliasing to the native function function (str) { str = str.replace(/^\s+/, ''); for (var i = str.length - 1; i >= 0; i--) { if (/\S/.test(str.charAt(i))) { str = str.substring(0, i + 1); break; } } return str; }; /*===== string.trim = function(str){ // summary: // Trims whitespace from both sides of the string // str: String // String to be trimmed // returns: String // Returns the trimmed string // description: // This version of trim() was taken from [Steven Levithan's blog](http://blog.stevenlevithan.com/archives/faster-trim-javascript). // The short yet performant version of this function is dojo/_base/lang.trim(), // which is part of Dojo base. Uses String.prototype.trim instead, if available. return ""; // String }; =====*/ return string; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/text.js": /*!***********************************!*\ !*** ./node_modules/dojo/text.js ***! \***********************************/ /*! no static exports found */ /***/ function node_modulesDojoTextJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__.dj.c(module.i), __webpack_require__( /*! ./has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! ./request */ "./node_modules/dojo/request.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (dojo, require, has, request) { // module: // dojo/text var getText; if (true) { getText = function getText(url, sync, load) { request(url, { sync: !!sync, headers: { 'X-Requested-With': null } }).then(load); }; } else {} var theCache = {}, strip = function strip(text) { //Strips <?xml ...?> declarations so that external SVG and XML //documents can be added to a document without worry. Also, if the string //is an HTML document, only the part inside the body tag is returned. if (text) { text = text.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, ""); var matches = text.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im); if (matches) { text = matches[1]; } } else { text = ""; } return text; }, notFound = {}, pending = {}; dojo.cache = function ( /*String||Object*/ module, /*String*/ url, /*String||Object?*/ value) { // summary: // A getter and setter for storing the string content associated with the // module and url arguments. // description: // If module is a string that contains slashes, then it is interpretted as a fully // resolved path (typically a result returned by require.toUrl), and url should not be // provided. This is the preferred signature. If module is a string that does not // contain slashes, then url must also be provided and module and url are used to // call `dojo.moduleUrl()` to generate a module URL. This signature is deprecated. // If value is specified, the cache value for the moduleUrl will be set to // that value. Otherwise, dojo.cache will fetch the moduleUrl and store it // in its internal cache and return that cached value for the URL. To clear // a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the // the URL contents, only modules on the same domain of the page can use this capability. // The build system can inline the cache values though, to allow for xdomain hosting. // module: String||Object // If a String with slashes, a fully resolved path; if a String without slashes, the // module name to use for the base part of the URL, similar to module argument // to `dojo.moduleUrl`. If an Object, something that has a .toString() method that // generates a valid path for the cache item. For example, a dojo._Url object. // url: String // The rest of the path to append to the path derived from the module argument. If // module is an object, then this second argument should be the "value" argument instead. // value: String||Object? // If a String, the value to use in the cache for the module/url combination. // If an Object, it can have two properties: value and sanitize. The value property // should be the value to use in the cache, and sanitize can be set to true or false, // to indicate if XML declarations should be removed from the value and if the HTML // inside a body tag in the value should be extracted as the real value. The value argument // or the value property on the value argument are usually only used by the build system // as it inlines cache content. // example: // To ask dojo.cache to fetch content and store it in the cache (the dojo["cache"] style // of call is used to avoid an issue with the build system erroneously trying to intern // this example. To get the build system to intern your dojo.cache calls, use the // "dojo.cache" style of call): // | //If template.html contains "<h1>Hello</h1>" that will be // | //the value for the text variable. // | //Note: This is pre-AMD, deprecated syntax // | var text = dojo["cache"]("my.module", "template.html"); // example: // To ask dojo.cache to fetch content and store it in the cache, and sanitize the input // (the dojo["cache"] style of call is used to avoid an issue with the build system // erroneously trying to intern this example. To get the build system to intern your // dojo.cache calls, use the "dojo.cache" style of call): // | //If template.html contains "<html><body><h1>Hello</h1></body></html>", the // | //text variable will contain just "<h1>Hello</h1>". // | //Note: This is pre-AMD, deprecated syntax // | var text = dojo["cache"]("my.module", "template.html", {sanitize: true}); // example: // Same example as previous, but demonstrates how an object can be passed in as // the first argument, then the value argument can then be the second argument. // | //If template.html contains "<html><body><h1>Hello</h1></body></html>", the // | //text variable will contain just "<h1>Hello</h1>". // | //Note: This is pre-AMD, deprecated syntax // | var text = dojo["cache"](new dojo._Url("my/module/template.html"), {sanitize: true}); // * (string string [value]) => (module, url, value) // * (object [value]) => (module, value), url defaults to "" // // * if module is an object, then it must be convertable to a string // * (module, url) module + (url ? ("/" + url) : "") must be a legal argument to require.toUrl // * value may be a string or an object; if an object then may have the properties "value" and/or "sanitize" var key; if (typeof module == "string") { if (/\//.test(module)) { // module is a version 1.7+ resolved path key = module; value = url; } else { // module is a version 1.6- argument to dojo.moduleUrl key = require.toUrl(module.replace(/\./g, "/") + (url ? "/" + url : "")); } } else { key = module + ""; value = url; } var val = value != undefined && typeof value != "string" ? value.value : value, sanitize = value && value.sanitize; if (typeof val == "string") { //We have a string, set cache value theCache[key] = val; return sanitize ? strip(val) : val; } else if (val === null) { //Remove cached value delete theCache[key]; return null; } else { //Allow cache values to be empty strings. If key property does //not exist, fetch it. if (!(key in theCache)) { getText(key, true, function (text) { theCache[key] = text; }); } return sanitize ? strip(theCache[key]) : theCache[key]; } }; return { // summary: // This module implements the dojo/text! plugin and the dojo.cache API. // description: // We choose to include our own plugin to leverage functionality already contained in dojo // and thereby reduce the size of the plugin compared to various foreign loader implementations. // Also, this allows foreign AMD loaders to be used without their plugins. // // CAUTION: this module is designed to optionally function synchronously to support the dojo v1.x synchronous // loader. This feature is outside the scope of the CommonJS plugins specification. // the dojo/text caches it's own resources because of dojo.cache dynamic: true, normalize: function normalize(id, toAbsMid) { // id is something like (path may be relative): // // "path/to/text.html" // "path/to/text.html!strip" var parts = id.split("!"), url = parts[0]; return (/^\./.test(url) ? toAbsMid(url) : url) + (parts[1] ? "!" + parts[1] : ""); }, load: function load(id, require, _load2) { // id: String // Path to the resource. // require: Function // Object that include the function toUrl with given id returns a valid URL from which to load the text. // load: Function // Callback function which will be called, when the loading finished. // id is something like (path is always absolute): // // "path/to/text.html" // "path/to/text.html!strip" var parts = id.split("!"), stripFlag = parts.length > 1, absMid = parts[0], url = require.toUrl(parts[0]), requireCacheUrl = "url:" + url, text = notFound, finish = function finish(text) { _load2(stripFlag ? strip(text) : text); }; if (absMid in theCache) { text = theCache[absMid]; } else if (require.cache && requireCacheUrl in require.cache) { text = require.cache[requireCacheUrl]; } else if (url in theCache) { text = theCache[url]; } if (text === notFound) { if (pending[url]) { pending[url].push(finish); } else { var pendingList = pending[url] = [finish]; getText(url, !require.async, function (text) { theCache[absMid] = theCache[url] = text; for (var i = 0; i < pendingList.length;) { pendingList[i++](text); } delete pending[url]; }); } } else { finish(text); } } }; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/touch.js": /*!************************************!*\ !*** ./node_modules/dojo/touch.js ***! \************************************/ /*! no static exports found */ /***/ function node_modulesDojoTouchJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/kernel */ "./node_modules/dojo/_base/kernel.js"), __webpack_require__( /*! ./aspect */ "./node_modules/dojo/aspect.js"), __webpack_require__( /*! ./dom */ "./node_modules/dojo/dom.js"), __webpack_require__( /*! ./dom-class */ "./node_modules/dojo/dom-class.js"), __webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ./on */ "./node_modules/dojo/on.js"), __webpack_require__( /*! ./has */ "./node_modules/dojo/has.js"), __webpack_require__( /*! ./mouse */ "./node_modules/dojo/mouse.js"), __webpack_require__( /*! ./domReady */ "./node_modules/dojo/domReady.js"), __webpack_require__( /*! ./_base/window */ "./node_modules/dojo/_base/window.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (dojo, aspect, dom, domClass, lang, on, has, mouse, domReady, win) { // module: // dojo/touch var ios4 = has("ios") < 5; // Detect if platform supports Pointer Events, and if so, the names of the events (pointerdown vs. MSPointerDown). var hasPointer = has("pointer-events") || has("MSPointer"), pointer = function () { var pointer = {}; for (var type in { down: 1, move: 1, up: 1, cancel: 1, over: 1, out: 1 }) { pointer[type] = false ? undefined : "pointer" + type; } return pointer; }(); // Detect if platform supports the webkit touchstart/touchend/... events var hasTouch = has("touch-events"); // Click generation variables var clicksInited, clickTracker, useTarget = false, clickTarget, clickX, clickY, clickDx, clickDy, clickTime; // Time of most recent touchstart, touchmove, or touchend event var lastTouch; function dualEvent(mouseType, touchType, pointerType) { // Returns synthetic event that listens for both the specified mouse event and specified touch event. // But ignore fake mouse events that were generated due to the user touching the screen. if (hasPointer && pointerType) { // IE10+: MSPointer* events are designed to handle both mouse and touch in a uniform way, // so just use that regardless of hasTouch. return function (node, listener) { return on(node, pointerType, listener); }; } else if (hasTouch) { return function (node, listener) { var handle1 = on(node, touchType, function (evt) { listener.call(this, evt); // On slow mobile browsers (see https://bugs.dojotoolkit.org/ticket/17634), // a handler for a touch event may take >1s to run. That time shouldn't // be included in the calculation for lastTouch. lastTouch = new Date().getTime(); }), handle2 = on(node, mouseType, function (evt) { if (!lastTouch || new Date().getTime() > lastTouch + 1000) { listener.call(this, evt); } }); return { remove: function remove() { handle1.remove(); handle2.remove(); } }; }; } else { // Avoid creating listeners for touch events on performance sensitive older browsers like IE6 return function (node, listener) { return on(node, mouseType, listener); }; } } function marked( /*DOMNode*/ node) { // Search for node ancestor has been marked with the dojoClick property to indicate special processing. // Returns marked ancestor. do { if (node.dojoClick !== undefined) { return node; } } while (node = node.parentNode); } function doClicks(e, moveType, endType) { // summary: // Setup touch listeners to generate synthetic clicks immediately (rather than waiting for the browser // to generate clicks after the double-tap delay) and consistently (regardless of whether event.preventDefault() // was called in an event listener. Synthetic clicks are generated only if a node or one of its ancestors has // its dojoClick property set to truthy. If a node receives synthetic clicks because one of its ancestors has its // dojoClick property set to truthy, you can disable synthetic clicks on this node by setting its own dojoClick property // to falsy. if (mouse.isRight(e)) { return; // avoid spurious dojoclick event on IE10+; right click is just for context menu } var markedNode = marked(e.target); clickTracker = !e.target.disabled && markedNode && markedNode.dojoClick; // click threshold = true, number, x/y object, or "useTarget" if (clickTracker) { useTarget = clickTracker == "useTarget"; clickTarget = useTarget ? markedNode : e.target; if (useTarget) { // We expect a click, so prevent any other // default action on "touchpress" e.preventDefault(); } clickX = e.changedTouches ? e.changedTouches[0].pageX - win.global.pageXOffset : e.clientX; clickY = e.changedTouches ? e.changedTouches[0].pageY - win.global.pageYOffset : e.clientY; clickDx = (typeof clickTracker == "object" ? clickTracker.x : typeof clickTracker == "number" ? clickTracker : 0) || 4; clickDy = (typeof clickTracker == "object" ? clickTracker.y : typeof clickTracker == "number" ? clickTracker : 0) || 4; // add move/end handlers only the first time a node with dojoClick is seen, // so we don't add too much overhead when dojoClick is never set. if (!clicksInited) { var updateClickTracker = function updateClickTracker(e) { if (useTarget) { clickTracker = dom.isDescendant(win.doc.elementFromPoint(e.changedTouches ? e.changedTouches[0].pageX - win.global.pageXOffset : e.clientX, e.changedTouches ? e.changedTouches[0].pageY - win.global.pageYOffset : e.clientY), clickTarget); } else { clickTracker = clickTracker && (e.changedTouches ? e.changedTouches[0].target : e.target) == clickTarget && Math.abs((e.changedTouches ? e.changedTouches[0].pageX - win.global.pageXOffset : e.clientX) - clickX) <= clickDx && Math.abs((e.changedTouches ? e.changedTouches[0].pageY - win.global.pageYOffset : e.clientY) - clickY) <= clickDy; } }; var stopNativeEvents = function stopNativeEvents(type) { win.doc.addEventListener(type, function (e) { // Stop native events when we emitted our own click event. Note that the native click may occur // on a different node than the synthetic click event was generated on. For example, // click on a menu item, causing the menu to disappear, and then (~300ms later) the browser // sends a click event to the node that was *underneath* the menu. So stop all native events // sent shortly after ours, similar to what is done in dualEvent. // The INPUT.dijitOffScreen test is for offscreen inputs used in dijit/form/Button, on which // we call click() explicitly, we don't want to stop this event. var target = e.target; if (clickTracker && !e._dojo_click && new Date().getTime() <= clickTime + 1000 && !(target.tagName == "INPUT" && domClass.contains(target, "dijitOffScreen"))) { e.stopPropagation(); e.stopImmediatePropagation && e.stopImmediatePropagation(); if (type == "click" && (target.tagName != "INPUT" || target.type == "radio" && ( // #18352 Do not preventDefault for radios that are not dijit or // dojox/mobile widgets. // (The CSS class dijitCheckBoxInput holds for both checkboxes and radio buttons.) domClass.contains(target, "dijitCheckBoxInput") || domClass.contains(target, "mblRadioButton")) || target.type == "checkbox" && ( // #18352 Do not preventDefault for checkboxes that are not dijit or // dojox/mobile widgets. domClass.contains(target, "dijitCheckBoxInput") || domClass.contains(target, "mblCheckBox"))) && target.tagName != "TEXTAREA" && target.tagName != "AUDIO" && target.tagName != "VIDEO") { // preventDefault() breaks textual <input>s on android, keyboard doesn't popup, // but it is still needed for checkboxes and radio buttons, otherwise in some cases // the checked state becomes inconsistent with the widget's state e.preventDefault(); } } }, true); }; clicksInited = true; win.doc.addEventListener(moveType, function (e) { if (mouse.isRight(e)) { return; // avoid spurious dojoclick event on IE10+; right click is just for context menu } updateClickTracker(e); if (useTarget) { // prevent native scroll event and ensure touchend is // fire after touch moves between press and release. e.preventDefault(); } }, true); win.doc.addEventListener(endType, function (e) { if (mouse.isRight(e)) { return; // avoid spurious dojoclick event on IE10+; right click is just for context menu } updateClickTracker(e); if (clickTracker) { var createMouseEvent = function createMouseEvent(type) { //create the synthetic event. //http://www.w3.org/TR/DOM-Level-3-Events/#widl-MouseEvent-initMouseEvent var evt = document.createEvent("MouseEvents"); evt._dojo_click = true; evt.initMouseEvent(type, true, //bubbles true, //cancelable e.view, e.detail, src.screenX, src.screenY, src.clientX, src.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, 0, //button null //related target ); return evt; }; clickTime = new Date().getTime(); var target = useTarget ? clickTarget : e.target; if (target.tagName === "LABEL") { // when clicking on a label, forward click to its associated input if any target = dom.byId(target.getAttribute("for")) || target; } //some attributes can be on the Touch object, not on the Event: //http://www.w3.org/TR/touch-events/#touch-interface var src = e.changedTouches ? e.changedTouches[0] : e; var mouseDownEvt = createMouseEvent("mousedown"); var mouseUpEvt = createMouseEvent("mouseup"); var clickEvt = createMouseEvent("click"); setTimeout(function () { on.emit(target, "mousedown", mouseDownEvt); on.emit(target, "mouseup", mouseUpEvt); on.emit(target, "click", clickEvt); // refresh clickTime in case app-defined click handler took a long time to run clickTime = new Date().getTime(); }, 0); } }, true); stopNativeEvents("click"); // We also stop mousedown/up since these would be sent well after with our "fast" click (300ms), // which can confuse some dijit widgets. stopNativeEvents("mousedown"); stopNativeEvents("mouseup"); } } } var hoveredNode; if (has("touch")) { if (hasPointer) { // MSPointer (IE10+) already has support for over and out, so we just need to init click support domReady(function () { win.doc.addEventListener(pointer.down, function (evt) { doClicks(evt, pointer.move, pointer.up); }, true); }); } else { domReady(function () { // Keep track of currently hovered node hoveredNode = win.body(); // currently hovered node win.doc.addEventListener("touchstart", function (evt) { lastTouch = new Date().getTime(); // Precede touchstart event with touch.over event. DnD depends on this. // Use addEventListener(cb, true) to run cb before any touchstart handlers on node run, // and to ensure this code runs even if the listener on the node does event.stop(). var oldNode = hoveredNode; hoveredNode = evt.target; on.emit(oldNode, "dojotouchout", { relatedTarget: hoveredNode, bubbles: true }); on.emit(hoveredNode, "dojotouchover", { relatedTarget: oldNode, bubbles: true }); doClicks(evt, "touchmove", "touchend"); // init click generation }, true); function copyEventProps(evt) { // Make copy of event object and also set bubbles:true. Used when calling on.emit(). var props = lang.delegate(evt, { bubbles: true }); if (has("ios") >= 6) { // On iOS6 "touches" became a non-enumerable property, which // is not hit by for...in. Ditto for the other properties below. props.touches = evt.touches; props.altKey = evt.altKey; props.changedTouches = evt.changedTouches; props.ctrlKey = evt.ctrlKey; props.metaKey = evt.metaKey; props.shiftKey = evt.shiftKey; props.targetTouches = evt.targetTouches; } return props; } on(win.doc, "touchmove", function (evt) { lastTouch = new Date().getTime(); var newNode = win.doc.elementFromPoint(evt.pageX - (ios4 ? 0 : win.global.pageXOffset), // iOS 4 expects page coords evt.pageY - (ios4 ? 0 : win.global.pageYOffset)); if (newNode) { // Fire synthetic touchover and touchout events on nodes since the browser won't do it natively. if (hoveredNode !== newNode) { // touch out on the old node on.emit(hoveredNode, "dojotouchout", { relatedTarget: newNode, bubbles: true }); // touchover on the new node on.emit(newNode, "dojotouchover", { relatedTarget: hoveredNode, bubbles: true }); hoveredNode = newNode; } // Unlike a listener on "touchmove", on(node, "dojotouchmove", listener) fires when the finger // drags over the specified node, regardless of which node the touch started on. if (!on.emit(newNode, "dojotouchmove", copyEventProps(evt))) { // emit returns false when synthetic event "dojotouchmove" is cancelled, so we prevent the // default behavior of the underlying native event "touchmove". evt.preventDefault(); } } }); // Fire a dojotouchend event on the node where the finger was before it was removed from the screen. // This is different than the native touchend, which fires on the node where the drag started. on(win.doc, "touchend", function (evt) { lastTouch = new Date().getTime(); var node = win.doc.elementFromPoint(evt.pageX - (ios4 ? 0 : win.global.pageXOffset), // iOS 4 expects page coords evt.pageY - (ios4 ? 0 : win.global.pageYOffset)) || win.body(); // if out of the screen on.emit(node, "dojotouchend", copyEventProps(evt)); }); }); } } //device neutral events - touch.press|move|release|cancel/over/out var touch = { press: dualEvent("mousedown", "touchstart", pointer.down), move: dualEvent("mousemove", "dojotouchmove", pointer.move), release: dualEvent("mouseup", "dojotouchend", pointer.up), cancel: dualEvent(mouse.leave, "touchcancel", hasPointer ? pointer.cancel : null), over: dualEvent("mouseover", "dojotouchover", pointer.over), out: dualEvent("mouseout", "dojotouchout", pointer.out), enter: mouse._eventHandler(dualEvent("mouseover", "dojotouchover", pointer.over)), leave: mouse._eventHandler(dualEvent("mouseout", "dojotouchout", pointer.out)) }; /*===== touch = { // summary: // This module provides unified touch event handlers by exporting // press, move, release and cancel which can also run well on desktop. // Based on http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html // Also, if the dojoClick property is set to truthy on a DOM node, dojo/touch generates // click events immediately for this node and its descendants (except for descendants that // have a dojoClick property set to falsy), to avoid the delay before native browser click events, // and regardless of whether evt.preventDefault() was called in a touch.press event listener. // // example: // Used with dojo/on // | define(["dojo/on", "dojo/touch"], function(on, touch){ // | on(node, touch.press, function(e){}); // | on(node, touch.move, function(e){}); // | on(node, touch.release, function(e){}); // | on(node, touch.cancel, function(e){}); // example: // Used with touch.* directly // | touch.press(node, function(e){}); // | touch.move(node, function(e){}); // | touch.release(node, function(e){}); // | touch.cancel(node, function(e){}); // example: // Have dojo/touch generate clicks without delay, with a default move threshold of 4 pixels // | node.dojoClick = true; // example: // Have dojo/touch generate clicks without delay, with a move threshold of 10 pixels horizontally and vertically // | node.dojoClick = 10; // example: // Have dojo/touch generate clicks without delay, with a move threshold of 50 pixels horizontally and 10 pixels vertically // | node.dojoClick = {x:50, y:5}; // example: // Disable clicks without delay generated by dojo/touch on a node that has an ancestor with property dojoClick set to truthy // | node.dojoClick = false; press: function(node, listener){ // summary: // Register a listener to 'touchstart'|'mousedown' for the given node // node: Dom // Target node to listen to // listener: Function // Callback function // returns: // A handle which will be used to remove the listener by handle.remove() }, move: function(node, listener){ // summary: // Register a listener that fires when the mouse cursor or a finger is dragged over the given node. // node: Dom // Target node to listen to // listener: Function // Callback function // returns: // A handle which will be used to remove the listener by handle.remove() }, release: function(node, listener){ // summary: // Register a listener to releasing the mouse button while the cursor is over the given node // (i.e. "mouseup") or for removing the finger from the screen while touching the given node. // node: Dom // Target node to listen to // listener: Function // Callback function // returns: // A handle which will be used to remove the listener by handle.remove() }, cancel: function(node, listener){ // summary: // Register a listener to 'touchcancel'|'mouseleave' for the given node // node: Dom // Target node to listen to // listener: Function // Callback function // returns: // A handle which will be used to remove the listener by handle.remove() }, over: function(node, listener){ // summary: // Register a listener to 'mouseover' or touch equivalent for the given node // node: Dom // Target node to listen to // listener: Function // Callback function // returns: // A handle which will be used to remove the listener by handle.remove() }, out: function(node, listener){ // summary: // Register a listener to 'mouseout' or touch equivalent for the given node // node: Dom // Target node to listen to // listener: Function // Callback function // returns: // A handle which will be used to remove the listener by handle.remove() }, enter: function(node, listener){ // summary: // Register a listener to mouse.enter or touch equivalent for the given node // node: Dom // Target node to listen to // listener: Function // Callback function // returns: // A handle which will be used to remove the listener by handle.remove() }, leave: function(node, listener){ // summary: // Register a listener to mouse.leave or touch equivalent for the given node // node: Dom // Target node to listen to // listener: Function // Callback function // returns: // A handle which will be used to remove the listener by handle.remove() } }; =====*/ true && (dojo.touch = touch); return touch; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/uacss.js": /*!************************************!*\ !*** ./node_modules/dojo/uacss.js ***! \************************************/ /*! no static exports found */ /***/ function node_modulesDojoUacssJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./dom-geometry */ "./node_modules/dojo/dom-geometry.js"), __webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ./domReady */ "./node_modules/dojo/domReady.js"), __webpack_require__( /*! ./sniff */ "./node_modules/dojo/sniff.js"), __webpack_require__( /*! ./_base/window */ "./node_modules/dojo/_base/window.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (geometry, lang, domReady, has, baseWindow) { // module: // dojo/uacss /*===== return { // summary: // Applies pre-set CSS classes to the top-level HTML node, based on: // // - browser (ex: dj_ie) // - browser version (ex: dj_ie6) // - box model (ex: dj_contentBox) // - text direction (ex: dijitRtl) // // In addition, browser, browser version, and box model are // combined with an RTL flag when browser text is RTL. ex: dj_ie-rtl. // // Returns the has() method. }; =====*/ var html = baseWindow.doc.documentElement, ie = has("ie"), trident = has("trident"), opera = has("opera"), maj = Math.floor, ff = has("ff"), boxModel = geometry.boxModel.replace(/-/, ''), classes = { "dj_quirks": has("quirks"), // NOTE: Opera not supported by dijit "dj_opera": opera, "dj_khtml": has("khtml"), "dj_webkit": has("webkit"), "dj_safari": has("safari"), "dj_chrome": has("chrome"), "dj_edge": has("edge"), "dj_gecko": has("mozilla"), "dj_ios": has("ios"), "dj_android": has("android") }; // no dojo unsupported browsers if (ie) { classes["dj_ie"] = true; classes["dj_ie" + maj(ie)] = true; classes["dj_iequirks"] = has("quirks"); } if (trident) { classes["dj_trident"] = true; classes["dj_trident" + maj(trident)] = true; } if (ff) { classes["dj_ff" + maj(ff)] = true; } classes["dj_" + boxModel] = true; // apply browser, browser version, and box model class names var classStr = ""; for (var clz in classes) { if (classes[clz]) { classStr += clz + " "; } } html.className = lang.trim(html.className + " " + classStr); // If RTL mode, then add dj_rtl flag plus repeat existing classes with -rtl extension. // We can't run the code below until the <body> tag has loaded (so we can check for dir=rtl). domReady(function () { if (!geometry.isBodyLtr()) { var rtlClassStr = "dj_rtl dijitRtl " + classStr.replace(/ /g, "-rtl "); html.className = lang.trim(html.className + " " + rtlClassStr + "dj_rtl dijitRtl " + classStr.replace(/ /g, "-rtl ")); } }); return has; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, /***/ "./node_modules/dojo/window.js": /*!*************************************!*\ !*** ./node_modules/dojo/window.js ***! \*************************************/ /*! no static exports found */ /***/ function node_modulesDojoWindowJs(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__( /*! ./_base/lang */ "./node_modules/dojo/_base/lang.js"), __webpack_require__( /*! ./sniff */ "./node_modules/dojo/sniff.js"), __webpack_require__( /*! ./_base/window */ "./node_modules/dojo/_base/window.js"), __webpack_require__( /*! ./dom */ "./node_modules/dojo/dom.js"), __webpack_require__( /*! ./dom-geometry */ "./node_modules/dojo/dom-geometry.js"), __webpack_require__( /*! ./dom-style */ "./node_modules/dojo/dom-style.js"), __webpack_require__( /*! ./dom-construct */ "./node_modules/dojo/dom-construct.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (lang, has, baseWindow, dom, geom, style, domConstruct) { // feature detection /* not needed but included here for future reference has.add("rtl-innerVerticalScrollBar-on-left", function(win, doc){ var body = baseWindow.body(doc), scrollable = domConstruct.create('div', { style: {overflow:'scroll', overflowX:'hidden', direction:'rtl', visibility:'hidden', position:'absolute', left:'0', width:'64px', height:'64px'} }, body, "last"), center = domConstruct.create('center', { style: {overflow:'hidden', direction:'ltr'} }, scrollable, "last"), inner = domConstruct.create('div', { style: {overflow:'visible', display:'inline' } }, center, "last"); inner.innerHTML=" "; var midPoint = Math.max(inner.offsetLeft, geom.position(inner).x); var ret = midPoint >= 32; center.removeChild(inner); scrollable.removeChild(center); body.removeChild(scrollable); return ret; }); */ has.add("rtl-adjust-position-for-verticalScrollBar", function (win, doc) { var body = baseWindow.body(doc), scrollable = domConstruct.create('div', { style: { overflow: 'scroll', overflowX: 'visible', direction: 'rtl', visibility: 'hidden', position: 'absolute', left: '0', top: '0', width: '64px', height: '64px' } }, body, "last"), div = domConstruct.create('div', { style: { overflow: 'hidden', direction: 'ltr' } }, scrollable, "last"), ret = geom.position(div).x != 0; scrollable.removeChild(div); body.removeChild(scrollable); return ret; }); has.add("position-fixed-support", function (win, doc) { // IE6, IE7+quirks, and some older mobile browsers don't support position:fixed var body = baseWindow.body(doc), outer = domConstruct.create('span', { style: { visibility: 'hidden', position: 'fixed', left: '1px', top: '1px' } }, body, "last"), inner = domConstruct.create('span', { style: { position: 'fixed', left: '0', top: '0' } }, outer, "last"), ret = geom.position(inner).x != geom.position(outer).x; outer.removeChild(inner); body.removeChild(outer); return ret; }); // module: // dojo/window var window = { // summary: // TODOC getBox: function getBox( /*Document?*/ doc) { // summary: // Returns the dimensions and scroll position of the viewable area of a browser window doc = doc || baseWindow.doc; var scrollRoot = doc.compatMode == 'BackCompat' ? baseWindow.body(doc) : doc.documentElement, // get scroll position scroll = geom.docScroll(doc), // scrollRoot.scrollTop/Left should work w, h; if (has("touch")) { // if(scrollbars not supported) var uiWindow = window.get(doc); // use UI window, not dojo.global window // on mobile, scrollRoot.clientHeight <= uiWindow.innerHeight <= scrollRoot.offsetHeight, return uiWindow.innerHeight w = uiWindow.innerWidth || scrollRoot.clientWidth; // || scrollRoot.clientXXX probably never evaluated h = uiWindow.innerHeight || scrollRoot.clientHeight; } else { // on desktops, scrollRoot.clientHeight <= scrollRoot.offsetHeight <= uiWindow.innerHeight, return scrollRoot.clientHeight // uiWindow.innerWidth/Height includes the scrollbar and cannot be used w = scrollRoot.clientWidth; h = scrollRoot.clientHeight; } return { l: scroll.x, t: scroll.y, w: w, h: h }; }, get: function get( /*Document*/ doc) { // summary: // Get window object associated with document doc. // doc: // The document to get the associated window for. // In some IE versions (at least 6.0), document.parentWindow does not return a // reference to the real window object (maybe a copy), so we must fix it as well // We use IE specific execScript to attach the real window reference to // document._parentWindow for later use if (has("ie") && window !== document.parentWindow) { /* In IE 6, only the variable "window" can be used to connect events (others may be only copies). */ doc.parentWindow.execScript("document._parentWindow = window;", "Javascript"); //to prevent memory leak, unset it after use //another possibility is to add an onUnload handler which seems overkill to me (liucougar) var win = doc._parentWindow; doc._parentWindow = null; return win; // Window } return doc.parentWindow || doc.defaultView; // Window }, scrollIntoView: function scrollIntoView( /*DomNode*/ node, /*Object?*/ pos) { // summary: // Scroll the passed node into view using minimal movement, if it is not already. // Don't rely on node.scrollIntoView working just because the function is there since // it forces the node to the page's bottom or top (and left or right in IE) without consideration for the minimal movement. // WebKit's node.scrollIntoViewIfNeeded doesn't work either for inner scrollbars in right-to-left mode // and when there's a fixed position scrollable element try { // catch unexpected/unrecreatable errors (#7808) since we can recover using a semi-acceptable native method node = dom.byId(node); var doc = node.ownerDocument || baseWindow.doc, // TODO: why baseWindow.doc? Isn't node.ownerDocument always defined? body = baseWindow.body(doc), html = doc.documentElement || body.parentNode, isIE = has("ie") || has("trident"), isWK = has("webkit"); // if an untested browser, then use the native method if (node == body || node == html) { return; } if (!(has("mozilla") || isIE || isWK || has("opera") || has("trident") || has("edge")) && "scrollIntoView" in node) { node.scrollIntoView(false); // short-circuit to native if possible return; } var backCompat = doc.compatMode == 'BackCompat', rootWidth = Math.min(body.clientWidth || html.clientWidth, html.clientWidth || body.clientWidth), rootHeight = Math.min(body.clientHeight || html.clientHeight, html.clientHeight || body.clientHeight), scrollRoot = isWK || backCompat ? body : html, nodePos = pos || geom.position(node), el = node.parentNode, isFixed = function isFixed(el) { return isIE <= 6 || isIE == 7 && backCompat ? false : has("position-fixed-support") && style.get(el, 'position').toLowerCase() == "fixed"; }, self = this, scrollElementBy = function scrollElementBy(el, x, y) { if (el.tagName == "BODY" || el.tagName == "HTML") { self.get(el.ownerDocument).scrollBy(x, y); } else { x && (el.scrollLeft += x); y && (el.scrollTop += y); } }; if (isFixed(node)) { return; } // nothing to do while (el) { if (el == body) { el = scrollRoot; } var elPos = geom.position(el), fixedPos = isFixed(el), rtl = style.getComputedStyle(el).direction.toLowerCase() == "rtl"; if (el == scrollRoot) { elPos.w = rootWidth; elPos.h = rootHeight; if (scrollRoot == html && (isIE || has("trident")) && rtl) { elPos.x += scrollRoot.offsetWidth - elPos.w; // IE workaround where scrollbar causes negative x } elPos.x = 0; elPos.y = 0; } else { var pb = geom.getPadBorderExtents(el); elPos.w -= pb.w; elPos.h -= pb.h; elPos.x += pb.l; elPos.y += pb.t; var clientSize = el.clientWidth, scrollBarSize = elPos.w - clientSize; if (clientSize > 0 && scrollBarSize > 0) { if (rtl && has("rtl-adjust-position-for-verticalScrollBar")) { elPos.x += scrollBarSize; } elPos.w = clientSize; } clientSize = el.clientHeight; scrollBarSize = elPos.h - clientSize; if (clientSize > 0 && scrollBarSize > 0) { elPos.h = clientSize; } } if (fixedPos) { // bounded by viewport, not parents if (elPos.y < 0) { elPos.h += elPos.y; elPos.y = 0; } if (elPos.x < 0) { elPos.w += elPos.x; elPos.x = 0; } if (elPos.y + elPos.h > rootHeight) { elPos.h = rootHeight - elPos.y; } if (elPos.x + elPos.w > rootWidth) { elPos.w = rootWidth - elPos.x; } } // calculate overflow in all 4 directions var l = nodePos.x - elPos.x, // beyond left: < 0 // t = nodePos.y - Math.max(elPos.y, 0), // beyond top: < 0 t = nodePos.y - elPos.y, // beyond top: < 0 r = l + nodePos.w - elPos.w, // beyond right: > 0 bot = t + nodePos.h - elPos.h; // beyond bottom: > 0 var s, old; if (r * l > 0 && (!!el.scrollLeft || el == scrollRoot || el.scrollWidth > el.offsetHeight)) { s = Math[l < 0 ? "max" : "min"](l, r); if (rtl && (isIE == 8 && !backCompat || has("trident") >= 5)) { s = -s; } old = el.scrollLeft; scrollElementBy(el, s, 0); s = el.scrollLeft - old; nodePos.x -= s; } if (bot * t > 0 && (!!el.scrollTop || el == scrollRoot || el.scrollHeight > el.offsetHeight)) { s = Math.ceil(Math[t < 0 ? "max" : "min"](t, bot)); old = el.scrollTop; scrollElementBy(el, 0, s); s = el.scrollTop - old; nodePos.y -= s; } el = el != scrollRoot && !fixedPos && el.parentNode; } } catch (error) { console.error('scrollIntoView: ' + error); node.scrollIntoView(false); } } }; true && lang.setObject("dojo.window", window); return window; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ } }]); //# sourceMappingURL=53-es5.js.map