| Server IP : 103.48.194.25 / Your IP : 216.73.216.74 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/namduongmarket.com-bk/public_html/skin/js/ |
Upload File : |
(function () { null == window.TurboGraft && (window.TurboGraft = { handlers: {} }), TurboGraft.tgAttribute = function (t) { return "tg-" === t.slice(0, 3) ? "data-" + t : "data-tg-" + t }, TurboGraft.getTGAttribute = function (t, e) { var r; return r = TurboGraft.tgAttribute(e), t.getAttribute(r) || t.getAttribute(e) }, TurboGraft.removeTGAttribute = function (t, e) { var r; return r = TurboGraft.tgAttribute(e), t.removeAttribute(r), t.removeAttribute(e) }, TurboGraft.hasTGAttribute = function (t, e) { var r; return r = TurboGraft.tgAttribute(e), t.hasAttribute(r) || t.hasAttribute(e) }, TurboGraft.querySelectorAllTGAttribute = function (t, e, r) { var n; return null == r && (r = null), n = TurboGraft.tgAttribute(e), r ? t.querySelectorAll("[" + n + "=" + r + "], [" + e + "=" + r + "]") : t.querySelectorAll("[" + n + "], [" + e + "]") } }).call(this), function () { window.Click = function () { function t(t) { this.event = t, this.event.defaultPrevented || (this._extractLink(), this._validForTurbolinks() && (Turbolinks.visit(this.link.href), this.event.preventDefault())) } return t.installHandlerLast = function (e) { if (!e.defaultPrevented) return document.removeEventListener("click", t.handle, !1), document.addEventListener("click", t.handle, !1) }, t.handle = function (e) { return new t(e) }, t.prototype._extractLink = function () { var t; for (t = this.event.target; t.parentNode && "A" !== t.nodeName;)t = t.parentNode; if ("A" === t.nodeName && 0 !== t.href.length) return this.link = new Link(t) }, t.prototype._validForTurbolinks = function () { return null != this.link && !(this.link.shouldIgnore() || this._nonStandardClick()) }, t.prototype._nonStandardClick = function () { return this.event.which > 1 || this.event.metaKey || this.event.ctrlKey || this.event.shiftKey || this.event.altKey }, t }() }.call(this), function () { window.ComponentUrl = function () { function t(e) { if (this.original = null != e ? e : document.location.href, this.original.constructor === t) return this.original; this._parse() } return t.prototype.withoutHash = function () { return this.href.replace(this.hash, "") }, t.prototype.withoutHashForIE10compatibility = function () { return this.withoutHash() }, t.prototype.hasNoHash = function () { return 0 === this.hash.length }, t.prototype._parse = function () { var t; return (null != this.link ? this.link : this.link = document.createElement("a")).href = this.original, t = this.link, this.href = t.href, this.protocol = t.protocol, this.host = t.host, this.hostname = t.hostname, this.port = t.port, this.pathname = t.pathname, this.search = t.search, this.hash = t.hash, this.origin = [this.protocol, "//", this.hostname].join(""), 0 !== this.port.length && (this.origin += ":" + this.port), this.relative = [this.pathname, this.search, this.hash].join(""), this.absolute = this.href }, t }() }.call(this), function () { window.CSRFToken = function () { function t() { } return t.get = function (t) { var e; return null == t && (t = document), { node: e = t.querySelector('meta[name="csrf-token"]'), token: null != e && "function" == typeof e.getAttribute ? e.getAttribute("content") : void 0 } }, t.update = function (t) { var e; if (null != (e = this.get()).token && null != t && e.token !== t) return e.node.setAttribute("content", t) }, t }() }.call(this), function () { TurboGraft.Document = { create: function (t) { var e; return /<(html|body)/i.test(t) ? (e = document.documentElement.cloneNode()).innerHTML = t : (e = document.documentElement.cloneNode(!0)).querySelector("body").innerHTML = t, e.head = e.querySelector("head"), e.body = e.querySelector("body"), e } } }.call(this), function () { var t, e, r; t = function (t, e) { return t.classList.contains(e) }, e = function (e) { return e.getAttribute("disabled") || t(e, "disabled") }, r = function (t, e, r) { var n, o; if (null == r && (r = null), !(n = t.getAttribute("href") || t.getAttribute("action"))) throw new Error("Turbograft developer error: You did not provide a URL ('" + urlAttribute + "' attribute) for data-tg-remote"); return TurboGraft.getTGAttribute(t, "remote-once") && (TurboGraft.removeTGAttribute(t, "remote-once"), TurboGraft.removeTGAttribute(t, "tg-remote")), o = { httpRequestType: e, httpUrl: n, fullRefresh: null != TurboGraft.getTGAttribute(t, "full-refresh"), refreshOnSuccess: TurboGraft.getTGAttribute(t, "refresh-on-success"), refreshOnSuccessExcept: TurboGraft.getTGAttribute(t, "full-refresh-on-success-except"), refreshOnError: TurboGraft.getTGAttribute(t, "refresh-on-error"), refreshOnErrorExcept: TurboGraft.getTGAttribute(t, "full-refresh-on-error-except") }, new TurboGraft.Remote(o, r, t) }, TurboGraft.handlers.remoteMethodHandler = function (t) { var e, n; n = t.clickTarget, (e = TurboGraft.getTGAttribute(n, "tg-remote")) && (t.preventDefault(), r(n, e).submit()) }, TurboGraft.handlers.remoteFormHandler = function (t) { var e, n; e = (n = t.target).getAttribute("method"), TurboGraft.hasTGAttribute(n, "tg-remote") && (t.preventDefault(), r(n, e, n).submit()) }, function (t, r, n) { null == n && (n = !1), document.addEventListener(t, function (t) { var n, o; for (o = t.target; o !== document && null != o;) { if (("A" === o.nodeName || "BUTTON" === o.nodeName) && ((n = e(o)) && t.preventDefault(), !n)) return t.clickTarget = o, void r(t); o = o.parentNode } }) }("click", TurboGraft.handlers.remoteMethodHandler, !0), document.addEventListener("submit", function (t) { return TurboGraft.handlers.remoteFormHandler(t) }) }.call(this), function () { var t = function (t, r) { function n() { this.constructor = t } for (var o in r) e.call(r, o) && (t[o] = r[o]); return n.prototype = r.prototype, t.prototype = new n, t.__super__ = r.prototype, t }, e = {}.hasOwnProperty, r = [].slice; window.Link = function (e) { function n(t) { if (this.link = t, this.link.constructor === n) return this.link; this.original = this.link.href, n.__super__.constructor.apply(this, arguments) } return t(n, e), n.HTML_EXTENSIONS = ["html"], n.allowExtensions = function () { var t, e, o, i; for (o = 0, i = (e = 1 <= arguments.length ? r.call(arguments, 0) : []).length; o < i; o++)t = e[o], n.HTML_EXTENSIONS.push(t); return n.HTML_EXTENSIONS }, n.prototype.shouldIgnore = function () { return this._crossOrigin() || this._anchored() || this._nonHtml() || this._optOut() || this._target() }, n.prototype._crossOrigin = function () { return this.origin !== (new ComponentUrl).origin }, n.prototype._anchored = function () { var t; return (this.hash && this.withoutHash()) === (t = new ComponentUrl).withoutHash() || this.href === t.href + "#" }, n.prototype._nonHtml = function () { return this.pathname.match(/\.[a-z]+$/g) && !this.pathname.match(new RegExp("\\.(?:" + n.HTML_EXTENSIONS.join("|") + ")?$", "g")) }, n.prototype._optOut = function () { var t, e; for (e = this.link; !t && e !== document && null !== e;)t = null != e.getAttribute("data-no-turbolink"), e = e.parentNode; return t }, n.prototype._target = function () { return 0 !== this.link.target.length }, n }(ComponentUrl) }.call(this), function () { var t, e, r; window.Page || (window.Page = {}), Page.visit = function (t, e) { return null == e && (e = {}), e.reload ? window.location = t : Turbolinks.visit(t) }, Page.refresh = function (t, e) { var r, n, o, i; return null == t && (t = {}), r = t.url ? t.url : t.queryParams ? ((n = $.param(t.queryParams)) && (n = "?" + n), location.pathname + n) : location.href, o = { partialReplace: !0, exceptKeys: t.exceptKeys, onlyKeys: t.onlyKeys, updatePushState: t.updatePushState, callback: e }, (i = t.response) ? Turbolinks.loadPage(null, i, o) : Turbolinks.visit(r, o) }, Page.open = function () { return window.open.apply(window, arguments) }, r = [], Page.onReplace = function (t, n) { if (!t || !n) throw new Error("Page.onReplace: Node and callback must both be specified"); if (!e(n)) throw new Error("Page.onReplace: Callback must be a function"); return r.push({ node: t, callback: n }) }, e = function (t) { return !!(t && t.constructor && t.call && t.apply) }, t = function (t, e) { return t.contains ? t.contains(e) : !!(t === e || t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_CONTAINED_BY) }, document.addEventListener("page:before-partial-replace", function (e) { var n, o, i, s, a, u, l, c, h; for (c = e.data, h = [], i = 0, a = r.length; i < a; i++) { for (n = r[i], o = !1, s = 0, u = c.length; s < u; s++)if (l = c[s], t(l, n.node)) { n.callback(), o = !0; break } o || h.push(n) } return r = h }), document.addEventListener("page:before-replace", function () { var t, e; for (t = 0, e = r.length; t < e; t++)r[t].callback(); return r = [] }) }.call(this), function () { var t = function (t, e) { return function () { return t.apply(e, arguments) } }; TurboGraft.Remote = function () { function e(e, r, n) { var o, i, s, a; this.opts = e, this.onError = t(this.onError, this), this.onSuccess = t(this.onSuccess, this), this.initiator = r || n, this.actualRequestType = "get" === (null != (i = this.opts.httpRequestType) ? i.toLowerCase() : void 0) ? "GET" : "POST", this.useNativeEncoding = this.opts.useNativeEncoding, this.formData = this.createPayload(r), this.opts.refreshOnSuccess && (this.refreshOnSuccess = this.opts.refreshOnSuccess.split(" ")), this.opts.refreshOnSuccessExcept && (this.refreshOnSuccessExcept = this.opts.refreshOnSuccessExcept.split(" ")), this.opts.refreshOnError && (this.refreshOnError = this.opts.refreshOnError.split(" ")), this.opts.refreshOnErrorExcept && (this.refreshOnErrorExcept = this.opts.refreshOnErrorExcept.split(" ")), a = new XMLHttpRequest, "GET" === this.actualRequestType ? (s = this.formData ? this.opts.httpUrl + "?" + this.formData : this.opts.httpUrl, a.open(this.actualRequestType, s, !0)) : a.open(this.actualRequestType, this.opts.httpUrl, !0), a.setRequestHeader("X-Requested-With", "XMLHttpRequest"), a.setRequestHeader("Accept", "text/html, application/xhtml+xml, application/xml"), this.contentType && a.setRequestHeader("Content-Type", this.contentType), a.setRequestHeader("X-XHR-Referer", document.location.href), (o = CSRFToken.get().token) && a.setRequestHeader("X-CSRF-Token", o), triggerEventFor("turbograft:remote:init", this.initiator, { xhr: a, initiator: this.initiator }), a.addEventListener("loadstart", function (t) { return function () { return triggerEventFor("turbograft:remote:start", t.initiator, { xhr: a }) } }(this)), a.addEventListener("error", this.onError), a.addEventListener("load", function (t) { return function (e) { return a.status < 400 ? t.onSuccess(e) : t.onError(e) } }(this)), a.addEventListener("loadend", function (t) { return function () { var e; return "function" == typeof (e = t.opts).done && e.done(), triggerEventFor("turbograft:remote:always", t.initiator, { initiator: t.initiator, xhr: a }) } }(this)), this.xhr = a } return e.prototype.submit = function () { return this.xhr.send(this.formData) }, e.prototype.createPayload = function (t) { var e; return (e = t ? this.useNativeEncoding || t.querySelectorAll("[type='file'][name]").length > 0 ? this.nativeEncodeForm(t) : this.uriEncodeForm(t) : "") instanceof FormData || (this.contentType = "application/x-www-form-urlencoded; charset=UTF-8", -1 === e.indexOf("_method") && this.opts.httpRequestType && "GET" !== this.actualRequestType && (e = this.formAppend(e, "_method", this.opts.httpRequestType))), e }, e.prototype.formAppend = function (t, e, r) { return t.length && (t += "&"), t + (encodeURIComponent(e) + "=") + encodeURIComponent(r) }, e.prototype.uriEncodeForm = function (t) { var e; return e = "", this._iterateOverFormInputs(t, function (t) { return function (r) { return e = t.formAppend(e, r.name, r.value) } }(this)), e }, e.prototype.formDataAppend = function (t, e) { var r, n, o, i; if ("file" === e.type) for (n = 0, o = (i = e.files).length; n < o; n++)r = i[n], t.append(e.name, r); else t.append(e.name, e.value); return t }, e.prototype.nativeEncodeForm = function (t) { var e; return e = new FormData, this._iterateOverFormInputs(t, function (t) { return function (r) { return e = t.formDataAppend(e, r) } }(this)), e }, e.prototype._iterateOverFormInputs = function (t, e) { var r, n, o, i, s, a, u; for (u = [], r = 0, s = (i = this._enabledInputs(t)).length; r < s; r++)o = !(n = i[r]).disabled, a = "checkbox" === n.type || "radio" === n.type, o && n.name && (a && n.checked || !a) ? u.push(e(n)) : u.push(void 0); return u }, e.prototype._enabledInputs = function (t) { var e, r, n, o, i, s, a, u, l, c, h; if (h = "input:not([type='reset']):not([type='button']):not([type='submit']):not([type='image']), select, textarea", s = Array.prototype.slice.call(t.querySelectorAll(h)), !(r = Array.prototype.slice.call(TurboGraft.querySelectorAllTGAttribute(t, "tg-remote-noserialize"))).length) return s; for (e = r, o = 0, u = r.length; o < u; o++)c = r[o], e = e.concat(Array.prototype.slice.call(c.querySelectorAll(h))); for (n = [], a = 0, l = s.length; a < l; a++)i = s[a], e.indexOf(i) < 0 && n.push(i); return n }, e.prototype.onSuccess = function (t) { var e, r, n; return "function" == typeof (e = this.opts).success && e.success(), n = t.target, triggerEventFor("turbograft:remote:success", this.initiator, { initiator: this.initiator, xhr: n }), (r = n.getResponseHeader("X-Next-Redirect")) ? void Page.visit(r, { reload: !0 }) : TurboGraft.hasTGAttribute(this.initiator, "tg-remote-norefresh") ? void 0 : this.opts.fullRefresh && this.refreshOnSuccess ? Page.refresh({ onlyKeys: this.refreshOnSuccess }) : this.opts.fullRefresh ? Page.refresh() : this.refreshOnSuccess ? Page.refresh({ response: n, onlyKeys: this.refreshOnSuccess }) : this.refreshOnSuccessExcept ? Page.refresh({ response: n, exceptKeys: this.refreshOnSuccessExcept }) : Page.refresh({ response: n }) }, e.prototype.onError = function (t) { var e, r; return "function" == typeof (e = this.opts).fail && e.fail(), r = t.target, triggerEventFor("turbograft:remote:fail", this.initiator, { initiator: this.initiator, xhr: r }), TurboGraft.hasTGAttribute(this.initiator, "tg-remote-norefresh") ? triggerEventFor("turbograft:remote:fail:unhandled", this.initiator, { xhr: r }) : this.opts.fullRefresh && this.refreshOnError ? Page.refresh({ onlyKeys: this.refreshOnError }) : this.opts.fullRefresh ? Page.refresh() : this.refreshOnError ? Page.refresh({ response: r, onlyKeys: this.refreshOnError }) : this.refreshOnErrorExcept ? Page.refresh({ response: r, exceptKeys: this.refreshOnErrorExcept }) : triggerEventFor("turbograft:remote:fail:unhandled", this.initiator, { xhr: r }) }, e }() }.call(this), function () { TurboGraft.Response = function () { function t(t, e) { var r; this.xhr = t, r = e && e.withoutHash() !== this.xhr.responseURL ? this.xhr.responseURL : this.xhr.getResponseHeader("X-XHR-Redirected-To"), this.finalURL = r || e } return t.prototype.valid = function () { return this.hasRenderableHttpStatus() && this.hasValidContent() }, t.prototype.document = function () { if (this.valid()) return TurboGraft.Document.create(this.xhr.responseText) }, t.prototype.hasRenderableHttpStatus = function () { var t; return 422 === this.xhr.status || !(400 <= (t = this.xhr.status) && t < 600) }, t.prototype.hasValidContent = function () { var t; if (t = this.xhr.getResponseHeader("Content-Type")) return t.match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/); throw new Error("Error encountered for XHR Response: " + this) }, t.prototype.toString = function () { return "URL: " + this.xhr.responseURL + ", ReadyState: " + this.xhr.readyState + ", Headers: " + this.xhr.getAllResponseHeaders() }, t }(), TurboGraft.location = function () { return location.href } }.call(this), function () { var t, e, r, n, o, i, s, a, u, l, c, h, f, p, d = function (t, e) { return function () { return t.apply(e, arguments) } }; e = "turbolinksTrack", t = "true", c = {}, l = null, p = function () { var t; return t = Object.keys(c).map(function (t) { return c[t] }), Promise.all(t) }, TurboGraft.TurboHead = function () { function s(t, e) { this.activeDocument = t, this.upstreamDocument = e, this._insertNewAssets = d(this._insertNewAssets, this), this.activeAssets = i(this.activeDocument), this.upstreamAssets = i(this.upstreamDocument), this.newScripts = this.upstreamAssets.filter(r("nodeName", "SCRIPT")).filter(a("src", this.activeAssets)), this.newLinks = this.upstreamAssets.filter(r("nodeName", "LINK")).filter(a("href", this.activeAssets)) } return s._testAPI = { reset: function () { return c = {}, l = null } }, s.prototype.hasChangedAnonymousAssets = function () { var r, o, i, s; return o = this.upstreamAssets.filter(n(e, t)), (r = this.activeAssets.filter(n(e, t))).length !== o.length || (s = a("src", o), i = a("href", o), r.some(function (t) { return s(t) || i(t) })) }, s.prototype.movingFromTrackedToUntracked = function () { return 0 === this.upstreamAssets.length && this.activeAssets.length > 0 }, s.prototype.hasNamedAssetConflicts = function () { return this.newScripts.concat(this.newLinks).filter(u(e, t)).some(o(e, this.activeAssets)) }, s.prototype.hasAssetConflicts = function () { return this.movingFromTrackedToUntracked() || this.hasNamedAssetConflicts() || this.hasChangedAnonymousAssets() }, s.prototype.waitForAssets = function () { return "function" == typeof l && l({ isCanceled: !0 }), new Promise((t = this, function (e) { return l = e, p().then(t._insertNewAssets).then(p).then(e) })); var t }, s.prototype._insertNewAssets = function () { return h(this.activeDocument, this.newLinks), f(this.activeDocument, this.newScripts) }, s }(), i = function (t) { return [].slice.call(t.querySelectorAll("[data-turbolinks-track]")) }, r = function (t, e) { return function (r) { return r[t] === e } }, a = function (t, e) { return function (r) { return !e.some(function (e) { return r[t] === e[t] }) } }, n = function (t, e) { return function (r) { return r.dataset[t] === e } }, u = function (t, e) { return function (r) { return r.dataset[t] !== e } }, o = function (t, e) { return function (r) { var o; return o = r.dataset[t], e.some(n(t, o)) } }, h = function (t, e) { return e.forEach(function (e) { var r; return r = e.cloneNode(), t.head.appendChild(r), triggerEvent("page:after-link-inserted", r) }) }, f = function (t, e) { var r; return r = Promise.resolve(), e.forEach(function (e) { return r = r.then(function () { return s(t, e) }) }), r }, s = function (t, e) { var r, n, o, i, s, a; if (a = e.src, c[a]) return c[a]; for (i = t.createElement("SCRIPT"), n = 0, o = (s = e.attributes).length; n < o; n++)r = s[n], i.setAttribute(r.name, r.value); return i.appendChild(t.createTextNode(e.innerHTML)), c[a] = new Promise(function (e) { var r; return r = function (t) { return "error" === t.type && triggerEvent("page:#script-error", t), i.removeEventListener("load", r), i.removeEventListener("error", r), e() }, i.addEventListener("load", r), i.addEventListener("error", r), t.head.appendChild(i), triggerEvent("page:after-script-inserted", i) }) } }.call(this), function () { var t, e, r, n, o, i, s, a, u, l, c, h, f, p; t = TurboGraft.Response, e = TurboGraft.TurboHead, u = window.jQuery, p = null, r = document, s = function () { return r.addEventListener("DOMContentLoaded", function () { return triggerEvent("page:change"), triggerEvent("page:update") }, !0) }, a = function () { if (void 0 !== u) return u(r).on("ajaxSuccess", function (t, e) { if (u.trim(e.responseText)) return triggerEvent("page:update") }) }, i = void 0 !== window.history.state || navigator.userAgent.match(/Firefox\/2[6|7]/), n = window.history && window.history.pushState && window.history.replaceState && i, window.triggerEvent = function (t, e) { var n; return n = r.createEvent("Events"), e && (n.data = e), n.initEvent(t, !0, !0), r.dispatchEvent(n) }, window.triggerEventFor = function (t, e, n) { var o; return o = r.createEvent("Events"), n && (o.data = n), o.initEvent(t, !0, !0), e.dispatchEvent(o) }, f = "GET" === (l = function (t) { var e, n; return n = (null != (e = r.cookie.match(new RegExp(t + "=(\\w+)"))) ? e[1].toUpperCase() : void 0) || "", r.cookie = t + "=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/", n }("request_method")) || "" === l, o = n && f, r.addEventListener && r.createEvent && (s(), a()), h = function (t, e) { var r; return r = e.parentNode.replaceChild(t, e), triggerEvent("page:after-node-removed", r) }, c = function (t) { var e; return e = t.parentNode.removeChild(t), triggerEvent("page:after-node-removed", e) }, window.Turbolinks = function () { function n() { } var i, s, a, u, l, f, d, g, v, m, b, y, T, E, w, A, S, k, x, R, G, L, N; return null, A = null, d = function (t, e) { if (null == e && (e = {}), !E(t)) return t = new ComponentUrl(t), R(), g(t, e) }, y = function (t, e) { var r, n; return Boolean(e.partialReplace || (null != (r = e.onlyKeys) ? r.length : void 0) || (null != (n = e.exceptKeys) ? n.length : void 0)) }, n.fullPageNavigate = function (t) { null != t && (t = new ComponentUrl(t).absolute, triggerEvent("page:before-full-refresh", { url: t }), r.location.href = t) }, n.pushState = function (t, e, r) { return window.history.pushState(t, e, r) }, n.replaceState = function (t, e, r) { return window.history.replaceState(t, e, r) }, n.document = function (t) { return t && (r = t), r }, g = function (t, e) { var r, o, i; for (r in triggerEvent("page:fetch", { url: t.absolute }), null != p && (p.readyState = 0, p.statusText = "abort", p.abort()), (p = new XMLHttpRequest).open("GET", t.withoutHashForIE10compatibility(), !0), p.setRequestHeader("Accept", "text/html, application/xhtml+xml, application/xml"), p.setRequestHeader("X-XHR-Referer", A), null == e.headers && (e.headers = {}), o = e.headers) i = o[r], p.setRequestHeader(r, i); p.onload = function () { return p.status >= 500 ? n.fullPageNavigate(t) : n.loadPage(t, p, e), p = null }, p.onerror = function () { return "abort" === p.statusText ? void (p = null) : n.fullPageNavigate(t) }, p.send() }, n.loadPage = function (o, i, s) { var a, u, l; return null == s && (s = {}), triggerEvent("page:receive"), a = new t(i, o), R(), null == s.updatePushState && (s.updatePushState = !0), s.partialReplace = y(0, s), (l = a.document()) ? s.partialReplace ? void N(l, a, s) : (u = new e(r, l)).hasAssetConflicts() ? n.fullPageNavigate(a.finalURL) : u.waitForAssets().then(function (t) { if (!(null != t ? t.isCanceled : void 0)) return N(l, a, s) }) : (triggerEvent("page:error", i), void n.fullPageNavigate(a.finalURL)) }, N = function (t, e, r) { var o, i; return o = a(null != (i = t.querySelector("title")) ? i.textContent : void 0, G(t.querySelector("body")), CSRFToken.get(t).token, "runScripts", r), r.updatePushState && S(e.finalURL), r.partialReplace || n.resetScrollPosition(), "function" == typeof r.callback && r.callback(), triggerEvent("page:load", o) }, a = function (t, e, n, o, s) { var a, l, c, p; if (null == s && (s = {}), t && (r.title = t), null != (c = s.onlyKeys) ? c.length : void 0) return l = [].concat(m(), v(s.onlyKeys)), a = x(l, e), i(a) && L(), a; x(m(), e), w(e), (null != (p = s.exceptKeys) ? p.length : void 0) ? k(s.exceptKeys, e) : u(e), triggerEvent("page:before-replace"), h(e, r.body), null != n && CSRFToken.update(n), L(), o && f(), window.history.state, triggerEvent("page:change"), triggerEvent("page:update") }, v = function (t) { var e, n, o, i, s, a, u, l; for (a = [], e = 0, i = t.length; e < i; e++)for (o = t[e], n = 0, s = (l = TurboGraft.querySelectorAllTGAttribute(r, "refresh", o)).length; n < s; n++)u = l[n], a.push(u); return a }, m = function () { var t, e, n, o, i; for (n = [], t = 0, e = (i = TurboGraft.querySelectorAllTGAttribute(r, "refresh-always")).length; t < e; t++)o = i[t], n.push(o); return n }, i = function (t) { var e, r; for (e = 0, r = t.length; e < r; e++)if (t[e].querySelectorAll("input[autofocus], textarea[autofocus]").length > 0) return !0; return !1 }, L = function () { var t, e; if ((t = (e = r.querySelectorAll("input[autofocus], textarea[autofocus]"))[e.length - 1]) && r.activeElement !== t) return t.focus() }, u = function (t) { var e, r, n, o; for (e = 0, r = (o = TurboGraft.querySelectorAllTGAttribute(t, "refresh-never")).length; e < r; e++)n = o[e], c(n) }, x = function (t, e) { var r, n, o, i, s, a, u; for (triggerEvent("page:before-partial-replace", t), a = function (e) { var r, n, o; for (r = 0, n = t.length; r < n; r++)if (e !== (o = t[r]) && o.contains(e)) return !0; return !1 }, u = [], n = 0, o = t.length; n < o; n++)if (!a(r = t[n])) { if (!(s = r.getAttribute("id"))) throw new Error("Turbolinks refresh: Refresh key elements must have an id."); (i = e.querySelector("#" + s)) ? (i = i.cloneNode(!0), h(i, r), "SCRIPT" === i.nodeName && "false" !== i.dataset.turbolinksEval ? l(i) : u.push(i)) : TurboGraft.hasTGAttribute(r, "refresh-always") || c(r) } return u }, T = function (t, e) { var r, n, o, i, s, a; for (a = [], n = 0, o = e.length; n < o; n++) { if (!(i = (r = e[n]).getAttribute("id"))) throw new Error("TurboGraft refresh: Kept nodes must have an id."); (s = t.querySelector("#" + i)) ? a.push(h(r, s)) : a.push(void 0) } return a }, w = function (t) { var e, n, o, i, s; for (e = [], n = 0, o = (s = TurboGraft.querySelectorAllTGAttribute(r, "tg-static")).length; n < o; n++)i = s[n], e.push(i); T(t, e) }, k = function (t, e) { var n, o, i, s, a, u, l, c; for (n = [], o = 0, a = t.length; o < a; o++)for (s = t[o], i = 0, u = (c = TurboGraft.querySelectorAllTGAttribute(r, "refresh", s)).length; i < u; i++)l = c[i], n.push(l); T(e, n) }, f = function () { var t, e, n, o, i; for (t = 0, e = (i = Array.prototype.slice.call(r.body.querySelectorAll('script:not([data-turbolinks-eval="false"])'))).length; t < e; t++)"" !== (n = (o = i[t]).type) && "text/javascript" !== n || l(o) }, l = function (t) { var e, n, o, i, s, a, u; for (n = r.createElement("script"), o = 0, i = (u = t.attributes).length; o < i; o++)e = u[o], n.setAttribute(e.name, e.value); n.appendChild(r.createTextNode(t.innerHTML)), a = t.parentNode, s = t.nextSibling, a.removeChild(t), a.insertBefore(n, s) }, G = function (t) { return t.innerHTML = t.innerHTML.replace(/<noscript[\S\s]*?<\/noscript>/gi, ""), t }, S = function (t) { (t = new ComponentUrl(t)).absolute !== A && n.pushState({ turbolinks: !0, url: t.absolute }, "", t.absolute) }, R = function () { return A = r.location.href }, n.rememberCurrentUrl = function () { return n.replaceState({ turbolinks: !0, url: r.location.href }, "", r.location.href) }, n.rememberCurrentState = function () { return window.history.state }, n.resetScrollPosition = function () { return r.location.hash ? r.location.href = r.location.href : window.scrollTo(0, 0) }, E = function (t) { return !triggerEvent("page:before-change", t) }, b = function (t) { var e; if (null != (e = t.state) ? e.turbolinks : void 0) return n.visit(t.target.location.href) }, s = function (t) { return setTimeout(t, 500) }, o ? (n.visit = d, n.rememberCurrentUrl(), n.rememberCurrentState(), r.addEventListener("click", Click.installHandlerLast, !0), s(function () { return window.addEventListener("popstate", b, !1) })) : n.visit = function (t) { return r.location.href = t }, n }() }.call(this);