storyPointIsNew) { this._ignoreIFrame = true; this._historyPointIsNew = false; var frameDoc = this._historyFrame.contentWindow.document; frameDoc.open("javascript:''"); frameDoc.write("" + (title || document.title) + "parent.Sys.Application._onIFrameLoad('" + entry + "');"); frameDoc.close(); } this._ignoreTimer = false; var currentHash = this.get_stateString(); this._currentEntry = entry; if (entry !== currentHash) { var loc = document.location; if (loc.href.length - loc.hash.length + entry.length > 1024) { throw Error.invalidOperation(Sys.Res.urlMustBeLessThan1024chars); } if (this._isSafari2()) { var history = this._getHistory(); history[window.history.length - this._historyInitialLength + 1] = entry; this._setHistory(history); this._historyLength = window.history.length + 1; var form = document.createElement('form'); form.method = 'get'; form.action = '#' + entry; document.appendChild(form); form.submit(); document.removeChild(form); } else { window.location.hash = entry; } if ((typeof(title) !== 'undefined') && (title !== null)) { document.title = title; } } } } function Sys$_Application$_unloadHandler(event) { this.dispose(); } function Sys$_Application$_updateHiddenField(value) { if (this._clientId) { var serverStateField = document.getElementById(this._clientId); if (serverStateField) { serverStateField.value = value; } } } Sys._Application.prototype = { _creatingComponents: false, _disposing: false, get_isCreatingComponents: Sys$_Application$get_isCreatingComponents, get_stateString: Sys$_Application$get_stateString, get_enableHistory: Sys$_Application$get_enableHistory, set_enableHistory: Sys$_Application$set_enableHistory, add_init: Sys$_Application$add_init, remove_init: Sys$_Application$remove_init, add_load: Sys$_Application$add_load, remove_load: Sys$_Application$remove_load, add_navigate: Sys$_Application$add_navigate, remove_navigate: Sys$_Application$remove_navigate, add_unload: Sys$_Application$add_unload, remove_unload: Sys$_Application$remove_unload, addComponent: Sys$_Application$addComponent, addHistoryPoint: Sys$_Application$addHistoryPoint, beginCreateComponents: Sys$_Application$beginCreateComponents, dispose: Sys$_Application$dispose, endCreateComponents: Sys$_Application$endCreateComponents, findComponent: Sys$_Application$findComponent, getComponents: Sys$_Application$getComponents, initialize: Sys$_Application$initialize, notifyScriptLoaded: Sys$_Application$notifyScriptLoaded, registerDisposableObject: Sys$_Application$registerDisposableObject, raiseLoad: Sys$_Application$raiseLoad, removeComponent: Sys$_Application$removeComponent, setServerId: Sys$_Application$setServerId, setServerState: Sys$_Application$setServerState, unregisterDisposableObject: Sys$_Application$unregisterDisposableObject, _addComponentToSecondPass: Sys$_Application$_addComponentToSecondPass, _deserializeState: Sys$_Application$_deserializeState, _doInitialize: Sys$_Application$_doInitialize, _enableHistoryInScriptManager: Sys$_Application$_enableHistoryInScriptManager, _ensureHistory: Sys$_Application$_ensureHistory, _getHistory: Sys$_Application$_getHistory, _isSafari2: Sys$_Application$_isSafari2, _loadHandler: Sys$_Application$_loadHandler, _navigate: Sys$_Application$_navigate, _onIdle: Sys$_Application$_onIdle, _onIFrameLoad: Sys$_Application$_onIFrameLoad, _onPageRequestManagerBeginRequest: Sys$_Application$_onPageRequestManagerBeginRequest, _onPageRequestManagerEndRequest: Sys$_Application$_onPageRequestManagerEndRequest, _raiseNavigate: Sys$_Application$_raiseNavigate, _serializeState: Sys$_Application$_serializeState, _setHistory: Sys$_Application$_setHistory, _setState: Sys$_Application$_setState, _unloadHandler: Sys$_Application$_unloadHandler, _updateHiddenField: Sys$_Application$_updateHiddenField } Sys._Application.registerClass('Sys._Application', Sys.Component, Sys.IContainer); Sys.Application = new Sys._Application(); var $find = Sys.Application.findComponent; Type.registerNamespace('Sys.Net'); Sys.Net.WebRequestExecutor = function Sys$Net$WebRequestExecutor() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._webRequest = null; this._resultObject = null; } function Sys$Net$WebRequestExecutor$get_webRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._webRequest; } function Sys$Net$WebRequestExecutor$_set_webRequest(value) { if (this.get_started()) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'set_webRequest')); } this._webRequest = value; } function Sys$Net$WebRequestExecutor$get_started() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_responseAvailable() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_timedOut() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_aborted() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_responseData() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_statusCode() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_statusText() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_xml() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_object() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._resultObject) { this._resultObject = Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData()); } return this._resultObject; } function Sys$Net$WebRequestExecutor$executeRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$abort() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$getResponseHeader(header) { /// /// var e = Function._validateParams(arguments, [ {name: "header", type: String} ]); if (e) throw e; throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$getAllResponseHeaders() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } Sys.Net.WebRequestExecutor.prototype = { get_webRequest: Sys$Net$WebRequestExecutor$get_webRequest, _set_webRequest: Sys$Net$WebRequestExecutor$_set_webRequest, get_started: Sys$Net$WebRequestExecutor$get_started, get_responseAvailable: Sys$Net$WebRequestExecutor$get_responseAvailable, get_timedOut: Sys$Net$WebRequestExecutor$get_timedOut, get_aborted: Sys$Net$WebRequestExecutor$get_aborted, get_responseData: Sys$Net$WebRequestExecutor$get_responseData, get_statusCode: Sys$Net$WebRequestExecutor$get_statusCode, get_statusText: Sys$Net$WebRequestExecutor$get_statusText, get_xml: Sys$Net$WebRequestExecutor$get_xml, get_object: Sys$Net$WebRequestExecutor$get_object, executeRequest: Sys$Net$WebRequestExecutor$executeRequest, abort: Sys$Net$WebRequestExecutor$abort, getResponseHeader: Sys$Net$WebRequestExecutor$getResponseHeader, getAllResponseHeaders: Sys$Net$WebRequestExecutor$getAllResponseHeaders } Sys.Net.WebRequestExecutor.registerClass('Sys.Net.WebRequestExecutor'); Sys.Net.XMLDOM = function Sys$Net$XMLDOM(markup) { /// /// var e = Function._validateParams(arguments, [ {name: "markup", type: String} ]); if (e) throw e; if (!window.DOMParser) { var progIDs = [ 'Msxml2.DOMDocument.3.0', 'Msxml2.DOMDocument' ]; for (var i = 0, l = progIDs.length; i < l; i++) { try { var xmlDOM = new ActiveXObject(progIDs[i]); xmlDOM.async = false; xmlDOM.loadXML(markup); xmlDOM.setProperty('SelectionLanguage', 'XPath'); return xmlDOM; } catch (ex) { } } } else { try { var domParser = new window.DOMParser(); return domParser.parseFromString(markup, 'text/xml'); } catch (ex) { } } return null; } Sys.Net.XMLHttpExecutor = function Sys$Net$XMLHttpExecutor() { /// if (arguments.length !== 0) throw Error.parameterCount(); Sys.Net.XMLHttpExecutor.initializeBase(this); var _this = this; this._xmlHttpRequest = null; this._webRequest = null; this._responseAvailable = false; this._timedOut = false; this._timer = null; this._aborted = false; this._started = false; this._onReadyStateChange = (function () { if (_this._xmlHttpRequest.readyState === 4 ) { try { if (typeof(_this._xmlHttpRequest.status) === "undefined") { return; } } catch(ex) { return; } _this._clearTimer(); _this._responseAvailable = true; try { _this._webRequest.completed(Sys.EventArgs.Empty); } finally { if (_this._xmlHttpRequest != null) { _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; _this._xmlHttpRequest = null; } } } }); this._clearTimer = (function() { if (_this._timer != null) { window.clearTimeout(_this._timer); _this._timer = null; } }); this._onTimeout = (function() { if (!_this._responseAvailable) { _this._clearTimer(); _this._timedOut = true; _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; _this._xmlHttpRequest.abort(); _this._webRequest.completed(Sys.EventArgs.Empty); _this._xmlHttpRequest = null; } }); } function Sys$Net$XMLHttpExecutor$get_timedOut() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._timedOut; } function Sys$Net$XMLHttpExecutor$get_started() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._started; } function Sys$Net$XMLHttpExecutor$get_responseAvailable() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._responseAvailable; } function Sys$Net$XMLHttpExecutor$get_aborted() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._aborted; } function Sys$Net$XMLHttpExecutor$executeRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._webRequest = this.get_webRequest(); if (this._started) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'executeRequest')); } if (this._webRequest === null) { throw Error.invalidOperation(Sys.Res.nullWebRequest); } var body = this._webRequest.get_body(); var headers = this._webRequest.get_headers(); this._xmlHttpRequest = new XMLHttpRequest(); this._xmlHttpRequest.onreadystatechange = this._onReadyStateChange; var verb = this._webRequest.get_httpVerb(); this._xmlHttpRequest.open(verb, this._webRequest.getResolvedUrl(), true ); if (headers) { for (var header in headers) { var val = headers[header]; if (typeof(val) !== "function") this._xmlHttpRequest.setRequestHeader(header, val); } } if (verb.toLowerCase() === "post") { if ((headers === null) || !headers['Content-Type']) { this._xmlHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8'); } if (!body) { body = ""; } } var timeout = this._webRequest.get_timeout(); if (timeout > 0) { this._timer = window.setTimeout(Function.createDelegate(this, this._onTimeout), timeout); } this._xmlHttpRequest.send(body); this._started = true; } function Sys$Net$XMLHttpExecutor$getResponseHeader(header) { /// /// /// var e = Function._validateParams(arguments, [ {name: "header", type: String} ]); if (e) throw e; if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getResponseHeader')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getResponseHeader')); } var result; try { result = this._xmlHttpRequest.getResponseHeader(header); } catch (e) { } if (!result) result = ""; return result; } function Sys$Net$XMLHttpExecutor$getAllResponseHeaders() { /// /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getAllResponseHeaders')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getAllResponseHeaders')); } return this._xmlHttpRequest.getAllResponseHeaders(); } function Sys$Net$XMLHttpExecutor$get_responseData() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_responseData')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_responseData')); } return this._xmlHttpRequest.responseText; } function Sys$Net$XMLHttpExecutor$get_statusCode() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusCode')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusCode')); } var result = 0; try { result = this._xmlHttpRequest.status; } catch(ex) { } return result; } function Sys$Net$XMLHttpExecutor$get_statusText() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusText')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusText')); } return this._xmlHttpRequest.statusText; } function Sys$Net$XMLHttpExecutor$get_xml() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_xml')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_xml')); } var xml = this._xmlHttpRequest.responseXML; if (!xml || !xml.documentElement) { xml = Sys.Net.XMLDOM(this._xmlHttpRequest.responseText); if (!xml || !xml.documentElement) return null; } else if (navigator.userAgent.indexOf('MSIE') !== -1) { xml.setProperty('SelectionLanguage', 'XPath'); } if (xml.documentElement.namespaceURI === "http://www.mozilla.org/newlayout/xml/parsererror.xml" && xml.documentElement.tagName === "parsererror") { return null; } if (xml.documentElement.firstChild && xml.documentElement.firstChild.tagName === "parsererror") { return null; } return xml; } function Sys$Net$XMLHttpExecutor$abort() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._started) { throw Error.invalidOperation(Sys.Res.cannotAbortBeforeStart); } if (this._aborted || this._responseAvailable || this._timedOut) return; this._aborted = true; this._clearTimer(); if (this._xmlHttpRequest && !this._responseAvailable) { this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; this._xmlHttpRequest.abort(); this._xmlHttpRequest = null; this._webRequest.completed(Sys.EventArgs.Empty); } } Sys.Net.XMLHttpExecutor.prototype = { get_timedOut: Sys$Net$XMLHttpExecutor$get_timedOut, get_started: Sys$Net$XMLHttpExecutor$get_started, get_responseAvailable: Sys$Net$XMLHttpExecutor$get_responseAvailable, get_aborted: Sys$Net$XMLHttpExecutor$get_aborted, executeRequest: Sys$Net$XMLHttpExecutor$executeRequest, getResponseHeader: Sys$Net$XMLHttpExecutor$getResponseHeader, getAllResponseHeaders: Sys$Net$XMLHttpExecutor$getAllResponseHeaders, get_responseData: Sys$Net$XMLHttpExecutor$get_responseData, get_statusCode: Sys$Net$XMLHttpExecutor$get_statusCode, get_statusText: Sys$Net$XMLHttpExecutor$get_statusText, get_xml: Sys$Net$XMLHttpExecutor$get_xml, abort: Sys$Net$XMLHttpExecutor$abort } Sys.Net.XMLHttpExecutor.registerClass('Sys.Net.XMLHttpExecutor', Sys.Net.WebRequestExecutor); Sys.Net._WebRequestManager = function Sys$Net$_WebRequestManager() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._defaultTimeout = 0; this._defaultExecutorType = "Sys.Net.XMLHttpExecutor"; } function Sys$Net$_WebRequestManager$add_invokingRequest(handler) { /// var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("invokingRequest", handler); } function Sys$Net$_WebRequestManager$remove_invokingRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("invokingRequest", handler); } function Sys$Net$_WebRequestManager$add_completedRequest(handler) { /// var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("completedRequest", handler); } function Sys$Net$_WebRequestManager$remove_completedRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("completedRequest", handler); } function Sys$Net$_WebRequestManager$_get_eventHandlerList() { if (!this._events) { this._events = new Sys.EventHandlerList(); } return this._events; } function Sys$Net$_WebRequestManager$get_defaultTimeout() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultTimeout; } function Sys$Net$_WebRequestManager$set_defaultTimeout(value) { var e = Function._validateParams(arguments, [{name: "value", type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange("value", value, Sys.Res.invalidTimeout); } this._defaultTimeout = value; } function Sys$Net$_WebRequestManager$get_defaultExecutorType() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultExecutorType; } function Sys$Net$_WebRequestManager$set_defaultExecutorType(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; this._defaultExecutorType = value; } function Sys$Net$_WebRequestManager$executeRequest(webRequest) { /// /// var e = Function._validateParams(arguments, [ {name: "webRequest", type: Sys.Net.WebRequest} ]); if (e) throw e; var executor = webRequest.get_executor(); if (!executor) { var failed = false; try { var executorType = eval(this._defaultExecutorType); executor = new executorType(); } catch (e) { failed = true; } if (failed || !Sys.Net.WebRequestExecutor.isInstanceOfType(executor) || !executor) { throw Error.argument("defaultExecutorType", String.format(Sys.Res.invalidExecutorType, this._defaultExecutorType)); } webRequest.set_executor(executor); } if (executor.get_aborted()) { return; } var evArgs = new Sys.Net.NetworkRequestEventArgs(webRequest); var handler = this._get_eventHandlerList().getHandler("invokingRequest"); if (handler) { handler(this, evArgs); } if (!evArgs.get_cancel()) { executor.executeRequest(); } } Sys.Net._WebRequestManager.prototype = { add_invokingRequest: Sys$Net$_WebRequestManager$add_invokingRequest, remove_invokingRequest: Sys$Net$_WebRequestManager$remove_invokingRequest, add_completedRequest: Sys$Net$_WebRequestManager$add_completedRequest, remove_completedRequest: Sys$Net$_WebRequestManager$remove_completedRequest, _get_eventHandlerList: Sys$Net$_WebRequestManager$_get_eventHandlerList, get_defaultTimeout: Sys$Net$_WebRequestManager$get_defaultTimeout, set_defaultTimeout: Sys$Net$_WebRequestManager$set_defaultTimeout, get_defaultExecutorType: Sys$Net$_WebRequestManager$get_defaultExecutorType, set_defaultExecutorType: Sys$Net$_WebRequestManager$set_defaultExecutorType, executeRequest: Sys$Net$_WebRequestManager$executeRequest } Sys.Net._WebRequestManager.registerClass('Sys.Net._WebRequestManager'); Sys.Net.WebRequestManager = new Sys.Net._WebRequestManager(); Sys.Net.NetworkRequestEventArgs = function Sys$Net$NetworkRequestEventArgs(webRequest) { /// /// var e = Function._validateParams(arguments, [ {name: "webRequest", type: Sys.Net.WebRequest} ]); if (e) throw e; Sys.Net.NetworkRequestEventArgs.initializeBase(this); this._webRequest = webRequest; } function Sys$Net$NetworkRequestEventArgs$get_webRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._webRequest; } Sys.Net.NetworkRequestEventArgs.prototype = { get_webRequest: Sys$Net$NetworkRequestEventArgs$get_webRequest } Sys.Net.NetworkRequestEventArgs.registerClass('Sys.Net.NetworkRequestEventArgs', Sys.CancelEventArgs); Sys.Net.WebRequest = function Sys$Net$WebRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._url = ""; this._headers = { }; this._body = null; this._userContext = null; this._httpVerb = null; this._executor = null; this._invokeCalled = false; this._timeout = 0; } function Sys$Net$WebRequest$add_completed(handler) { /// var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("completed", handler); } function Sys$Net$WebRequest$remove_completed(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("completed", handler); } function Sys$Net$WebRequest$completed(eventArgs) { /// /// var e = Function._validateParams(arguments, [ {name: "eventArgs", type: Sys.EventArgs} ]); if (e) throw e; var handler = Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest"); if (handler) { handler(this._executor, eventArgs); } handler = this._get_eventHandlerList().getHandler("completed"); if (handler) { handler(this._executor, eventArgs); } } function Sys$Net$WebRequest$_get_eventHandlerList() { if (!this._events) { this._events = new Sys.EventHandlerList(); } return this._events; } function Sys$Net$WebRequest$get_url() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._url; } function Sys$Net$WebRequest$set_url(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; this._url = value; } function Sys$Net$WebRequest$get_headers() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._headers; } function Sys$Net$WebRequest$get_httpVerb() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (this._httpVerb === null) { if (this._body === null) { return "GET"; } return "POST"; } return this._httpVerb; } function Sys$Net$WebRequest$set_httpVerb(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; if (value.length === 0) { throw Error.argument('value', Sys.Res.invalidHttpVerb); } this._httpVerb = value; } function Sys$Net$WebRequest$get_body() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._body; } function Sys$Net$WebRequest$set_body(value) { var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); if (e) throw e; this._body = value; } function Sys$Net$WebRequest$get_userContext() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._userContext; } function Sys$Net$WebRequest$set_userContext(value) { var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); if (e) throw e; this._userContext = value; } function Sys$Net$WebRequest$get_executor() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._executor; } function Sys$Net$WebRequest$set_executor(value) { var e = Function._validateParams(arguments, [{name: "value", type: Sys.Net.WebRequestExecutor}]); if (e) throw e; if (this._executor !== null && this._executor.get_started()) { throw Error.invalidOperation(Sys.Res.setExecutorAfterActive); } this._executor = value; this._executor._set_webRequest(this); } function Sys$Net$WebRequest$get_timeout() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (this._timeout === 0) { return Sys.Net.WebRequestManager.get_defaultTimeout(); } return this._timeout; } function Sys$Net$WebRequest$set_timeout(value) { var e = Function._validateParams(arguments, [{name: "value", type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange("value", value, Sys.Res.invalidTimeout); } this._timeout = value; } function Sys$Net$WebRequest$getResolvedUrl() { /// /// if (arguments.length !== 0) throw Error.parameterCount(); return Sys.Net.WebRequest._resolveUrl(this._url); } function Sys$Net$WebRequest$invoke() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (this._invokeCalled) { throw Error.invalidOperation(Sys.Res.invokeCalledTwice); } Sys.Net.WebRequestManager.executeRequest(this); this._invokeCalled = true; } Sys.Net.WebRequest.prototype = { add_completed: Sys$Net$WebRequest$add_completed, remove_completed: Sys$Net$WebRequest$remove_completed, completed: Sys$Net$WebRequest$completed, _get_eventHandlerList: Sys$Net$WebRequest$_get_eventHandlerList, get_url: Sys$Net$WebRequest$get_url, set_url: Sys$Net$WebRequest$set_url, get_headers: Sys$Net$WebRequest$get_headers, get_httpVerb: Sys$Net$WebRequest$get_httpVerb, set_httpVerb: Sys$Net$WebRequest$set_httpVerb, get_body: Sys$Net$WebRequest$get_body, set_body: Sys$Net$WebRequest$set_body, get_userContext: Sys$Net$WebRequest$get_userContext, set_userContext: Sys$Net$WebRequest$set_userContext, get_executor: Sys$Net$WebRequest$get_executor, set_executor: Sys$Net$WebRequest$set_executor, get_timeout: Sys$Net$WebRequest$get_timeout, set_timeout: Sys$Net$WebRequest$set_timeout, getResolvedUrl: Sys$Net$WebRequest$getResolvedUrl, invoke: Sys$Net$WebRequest$invoke } Sys.Net.WebRequest._resolveUrl = function Sys$Net$WebRequest$_resolveUrl(url, baseUrl) { if (url && url.indexOf('://') !== -1) { return url; } if (!baseUrl || baseUrl.length === 0) { var baseElement = document.getElementsByTagName('base')[0]; if (baseElement && baseElement.href && baseElement.href.length > 0) { baseUrl = baseElement.href; } else { baseUrl = document.URL; } } var qsStart = baseUrl.indexOf('?'); if (qsStart !== -1) { baseUrl = baseUrl.substr(0, qsStart); } qsStart = baseUrl.indexOf('#'); if (qsStart !== -1) { baseUrl = baseUrl.substr(0, qsStart); } baseUrl = baseUrl.substr(0, baseUrl.lastIndexOf('/') + 1); if (!url || url.length === 0) { return baseUrl; } if (url.charAt(0) === '/') { var slashslash = baseUrl.indexOf('://'); if (slashslash === -1) { throw Error.argument("baseUrl", Sys.Res.badBaseUrl1); } var nextSlash = baseUrl.indexOf('/', slashslash + 3); if (nextSlash === -1) { throw Error.argument("baseUrl", Sys.Res.badBaseUrl2); } return baseUrl.substr(0, nextSlash) + url; } else { var lastSlash = baseUrl.lastIndexOf('/'); if (lastSlash === -1) { throw Error.argument("baseUrl", Sys.Res.badBaseUrl3); } return baseUrl.substr(0, lastSlash+1) + url; } } Sys.Net.WebRequest._createQueryString = function Sys$Net$WebRequest$_createQueryString(queryString, encodeMethod) { if (!encodeMethod) encodeMethod = encodeURIComponent; var sb = new Sys.StringBuilder(); var i = 0; for (var arg in queryString) { var obj = queryString[arg]; if (typeof(obj) === "function") continue; var val = Sys.Serialization.JavaScriptSerializer.serialize(obj); if (i !== 0) { sb.append('&'); } sb.append(arg); sb.append('='); sb.append(encodeMethod(val)); i++; } return sb.toString(); } Sys.Net.WebRequest._createUrl = function Sys$Net$WebRequest$_createUrl(url, queryString) { if (!queryString) { return url; } var qs = Sys.Net.WebRequest._createQueryString(queryString); if (qs.length > 0) { var sep = '?'; if (url && url.indexOf('?') !== -1) sep = '&'; return url + sep + qs; } else { return url; } } Sys.Net.WebRequest.registerClass('Sys.Net.WebRequest'); Sys.Net.WebServiceProxy = function Sys$Net$WebServiceProxy() { } function Sys$Net$WebServiceProxy$get_timeout() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._timeout; } function Sys$Net$WebServiceProxy$set_timeout(value) { var e = Function._validateParams(arguments, [{name: "value", type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange('value', value, Sys.Res.invalidTimeout); } this._timeout = value; } function Sys$Net$WebServiceProxy$get_defaultUserContext() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._userContext; } function Sys$Net$WebServiceProxy$set_defaultUserContext(value) { var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); if (e) throw e; this._userContext = value; } function Sys$Net$WebServiceProxy$get_defaultSucceededCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._succeeded; } function Sys$Net$WebServiceProxy$set_defaultSucceededCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._succeeded = value; } function Sys$Net$WebServiceProxy$get_defaultFailedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._failed; } function Sys$Net$WebServiceProxy$set_defaultFailedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._failed = value; } function Sys$Net$WebServiceProxy$get_path() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._path; } function Sys$Net$WebServiceProxy$set_path(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; this._path = value; } function Sys$Net$WebServiceProxy$_invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext) { /// /// /// /// /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "servicePath", type: String}, {name: "methodName", type: String}, {name: "useGet", type: Boolean}, {name: "params"}, {name: "onSuccess", type: Function, mayBeNull: true, optional: true}, {name: "onFailure", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; if (onSuccess === null || typeof onSuccess === 'undefined') onSuccess = this.get_defaultSucceededCallback(); if (onFailure === null || typeof onFailure === 'undefined') onFailure = this.get_defaultFailedCallback(); if (userContext === null || typeof userContext === 'undefined') userContext = this.get_defaultUserContext(); return Sys.Net.WebServiceProxy.invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext, this.get_timeout()); } Sys.Net.WebServiceProxy.prototype = { get_timeout: Sys$Net$WebServiceProxy$get_timeout, set_timeout: Sys$Net$WebServiceProxy$set_timeout, get_defaultUserContext: Sys$Net$WebServiceProxy$get_defaultUserContext, set_defaultUserContext: Sys$Net$WebServiceProxy$set_defaultUserContext, get_defaultSucceededCallback: Sys$Net$WebServiceProxy$get_defaultSucceededCallback, set_defaultSucceededCallback: Sys$Net$WebServiceProxy$set_defaultSucceededCallback, get_defaultFailedCallback: Sys$Net$WebServiceProxy$get_defaultFailedCallback, set_defaultFailedCallback: Sys$Net$WebServiceProxy$set_defaultFailedCallback, get_path: Sys$Net$WebServiceProxy$get_path, set_path: Sys$Net$WebServiceProxy$set_path, _invoke: Sys$Net$WebServiceProxy$_invoke } Sys.Net.WebServiceProxy.registerClass('Sys.Net.WebServiceProxy'); Sys.Net.WebServiceProxy.invoke = function Sys$Net$WebServiceProxy$invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext, timeout) { /// /// /// /// /// /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "servicePath", type: String}, {name: "methodName", type: String}, {name: "useGet", type: Boolean, optional: true}, {name: "params", mayBeNull: true, optional: true}, {name: "onSuccess", type: Function, mayBeNull: true, optional: true}, {name: "onFailure", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true}, {name: "timeout", type: Number, optional: true} ]); if (e) throw e; var request = new Sys.Net.WebRequest(); request.get_headers()['Content-Type'] = 'application/json; charset=utf-8'; if (!params) params = {}; var urlParams = params; if (!useGet || !urlParams) urlParams = {}; request.set_url(Sys.Net.WebRequest._createUrl(servicePath+"/"+encodeURIComponent(methodName), urlParams)); var body = null; if (!useGet) { body = Sys.Serialization.JavaScriptSerializer.serialize(params); if (body === "{}") body = ""; } request.set_body(body); request.add_completed(onComplete); if (timeout && timeout > 0) request.set_timeout(timeout); request.invoke(); function onComplete(response, eventArgs) { if (response.get_responseAvailable()) { var statusCode = response.get_statusCode(); var result = null; try { var contentType = response.getResponseHeader("Content-Type"); if (contentType.startsWith("application/json")) { result = response.get_object(); } else if (contentType.startsWith("text/xml")) { result = response.get_xml(); } else { result = response.get_responseData(); } } catch (ex) { } var error = response.getResponseHeader("jsonerror"); var errorObj = (error === "true"); if (errorObj) { if (result) { result = new Sys.Net.WebServiceError(false, result.Message, result.StackTrace, result.ExceptionType); } } else if (contentType.startsWith("application/json")) { if (!result || typeof(result.d) === "undefined") { throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceInvalidJsonWrapper, methodName)); } result = result.d; } if (((statusCode < 200) || (statusCode >= 300)) || errorObj) { if (onFailure) { if (!result || !errorObj) { result = new Sys.Net.WebServiceError(false , String.format(Sys.Res.webServiceFailedNoMsg, methodName), "", ""); } result._statusCode = statusCode; onFailure(result, userContext, methodName); } else { var error; if (result && errorObj) { error = result.get_exceptionType() + "-- " + result.get_message(); } else { error = response.get_responseData(); } throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error)); } } else if (onSuccess) { onSuccess(result, userContext, methodName); } } else { var msg; if (response.get_timedOut()) { msg = String.format(Sys.Res.webServiceTimedOut, methodName); } else { msg = String.format(Sys.Res.webServiceFailedNoMsg, methodName) } if (onFailure) { onFailure(new Sys.Net.WebServiceError(response.get_timedOut(), msg, "", ""), userContext, methodName); } else { throw Sys.Net.WebServiceProxy._createFailedError(methodName, msg); } } } return request; } Sys.Net.WebServiceProxy._createFailedError = function Sys$Net$WebServiceProxy$_createFailedError(methodName, errorMessage) { var displayMessage = "Sys.Net.WebServiceFailedException: " + errorMessage; var e = Error.create(displayMessage, { 'name': 'Sys.Net.WebServiceFailedException', 'methodName': methodName }); e.popStackFrame(); return e; } Sys.Net.WebServiceProxy._defaultFailedCallback = function Sys$Net$WebServiceProxy$_defaultFailedCallback(err, methodName) { var error = err.get_exceptionType() + "-- " + err.get_message(); throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error)); } Sys.Net.WebServiceProxy._generateTypedConstructor = function Sys$Net$WebServiceProxy$_generateTypedConstructor(type) { return function(properties) { if (properties) { for (var name in properties) { this[name] = properties[name]; } } this.__type = type; } } Sys.Net.WebServiceError = function Sys$Net$WebServiceError(timedOut, message, stackTrace, exceptionType) { /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "timedOut", type: Boolean}, {name: "message", type: String, mayBeNull: true}, {name: "stackTrace", type: String, mayBeNull: true}, {name: "exceptionType", type: String, mayBeNull: true} ]); if (e) throw e; this._timedOut = timedOut; this._message = message; this._stackTrace = stackTrace; this._exceptionType = exceptionType; this._statusCode = -1; } function Sys$Net$WebServiceError$get_timedOut() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._timedOut; } function Sys$Net$WebServiceError$get_statusCode() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._statusCode; } function Sys$Net$WebServiceError$get_message() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._message; } function Sys$Net$WebServiceError$get_stackTrace() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._stackTrace; } function Sys$Net$WebServiceError$get_exceptionType() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._exceptionType; } Sys.Net.WebServiceError.prototype = { get_timedOut: Sys$Net$WebServiceError$get_timedOut, get_statusCode: Sys$Net$WebServiceError$get_statusCode, get_message: Sys$Net$WebServiceError$get_message, get_stackTrace: Sys$Net$WebServiceError$get_stackTrace, get_exceptionType: Sys$Net$WebServiceError$get_exceptionType } Sys.Net.WebServiceError.registerClass('Sys.Net.WebServiceError'); Type.registerNamespace('Sys.Services'); Sys.Services._ProfileService = function Sys$Services$_ProfileService() { /// if (arguments.length !== 0) throw Error.parameterCount(); Sys.Services._ProfileService.initializeBase(this); this.properties = {}; } Sys.Services._ProfileService.DefaultWebServicePath = ''; function Sys$Services$_ProfileService$get_defaultLoadCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultLoadCompletedCallback; } function Sys$Services$_ProfileService$set_defaultLoadCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultLoadCompletedCallback = value; } function Sys$Services$_ProfileService$get_defaultSaveCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultSaveCompletedCallback; } function Sys$Services$_ProfileService$set_defaultSaveCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultSaveCompletedCallback = value; } function Sys$Services$_ProfileService$get_path() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._path || ''; } function Sys$Services$_ProfileService$load(propertyNames, loadCompletedCallback, failedCallback, userContext) { /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "propertyNames", type: Array, mayBeNull: true, optional: true, elementType: String}, {name: "loadCompletedCallback", type: Function, mayBeNull: true, optional: true}, {name: "failedCallback", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; var parameters; var methodName; if (!propertyNames) { methodName = "GetAllPropertiesForCurrentUser"; parameters = { authenticatedUserOnly: false }; } else { methodName = "GetPropertiesForCurrentUser"; parameters = { properties: this._clonePropertyNames(propertyNames), authenticatedUserOnly: false }; } this._invoke(this._get_path(), methodName, false, parameters, Function.createDelegate(this, this._onLoadComplete), Function.createDelegate(this, this._onLoadFailed), [loadCompletedCallback, failedCallback, userContext]); } function Sys$Services$_ProfileService$save(propertyNames, saveCompletedCallback, failedCallback, userContext) { /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "propertyNames", type: Array, mayBeNull: true, optional: true, elementType: String}, {name: "saveCompletedCallback", type: Function, mayBeNull: true, optional: true}, {name: "failedCallback", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; var flattenedProperties = this._flattenProperties(propertyNames, this.properties); this._invoke(this._get_path(), "SetPropertiesForCurrentUser", false, { values: flattenedProperties.value, authenticatedUserOnly: false }, Function.createDelegate(this, this._onSaveComplete), Function.createDelegate(this, this._onSaveFailed), [saveCompletedCallback, failedCallback, userContext, flattenedProperties.count]); } function Sys$Services$_ProfileService$_clonePropertyNames(arr) { var nodups = []; var seen = {}; for (var i=0; i < arr.length; i++) { var prop = arr[i]; if(!seen[prop]) { Array.add(nodups, prop); seen[prop]=true; }; } return nodups; } function Sys$Services$_ProfileService$_flattenProperties(propertyNames, properties, groupName) { var flattenedProperties = {}; var val; var key; var count = 0; if (propertyNames && propertyNames.length === 0) { return { value: flattenedProperties, count: 0 }; } for (var property in properties) { val = properties[property]; key = groupName ? groupName + "." + property : property; if(Sys.Services.ProfileGroup.isInstanceOfType(val)) { var obj = this._flattenProperties(propertyNames, val, key); var groupProperties = obj.value; count += obj.count; for(var subKey in groupProperties) { var subVal = groupProperties[subKey]; flattenedProperties[subKey] = subVal; } } else { if(!propertyNames || Array.indexOf(propertyNames, key) !== -1) { flattenedProperties[key] = val; count++; } } } return { value: flattenedProperties, count: count }; } function Sys$Services$_ProfileService$_get_path() { var path = this.get_path(); if (!path.length) { path = Sys.Services._ProfileService.DefaultWebServicePath; } if (!path || !path.length) { throw Error.invalidOperation(Sys.Res.servicePathNotSet); } return path; } function Sys$Services$_ProfileService$_onLoadComplete(result, context, methodName) { if (typeof(result) !== "object") { throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType, methodName, "Object")); } var unflattened = this._unflattenProperties(result); for (var name in unflattened) { this.properties[name] = unflattened[name]; } var callback = context[0] || this.get_defaultLoadCompletedCallback() || this.get_defaultSucceededCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(result.length, userContext, "Sys.Services.ProfileService.load"); } } function Sys$Services$_ProfileService$_onLoadFailed(err, context, methodName) { var callback = context[1] || this.get_defaultFailedCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(err, userContext, "Sys.Services.ProfileService.load"); } else { Sys.Net.WebServiceProxy._defaultFailedCallback(err, methodName); } } function Sys$Services$_ProfileService$_onSaveComplete(result, context, methodName) { var count = context[3]; if (result !== null) { if (result instanceof Array) { count -= result.length; } else if (typeof(result) === 'number') { count = result; } else { throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType, methodName, "Array")); } } var callback = context[0] || this.get_defaultSaveCompletedCallback() || this.get_defaultSucceededCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(count, userContext, "Sys.Services.ProfileService.save"); } } function Sys$Services$_ProfileService$_onSaveFailed(err, context, methodName) { var callback = context[1] || this.get_defaultFailedCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(err, userContext, "Sys.Services.ProfileService.save"); } else { Sys.Net.WebServiceProxy._defaultFailedCallback(err, methodName); } } function Sys$Services$_ProfileService$_unflattenProperties(properties) { var unflattenedProperties = {}; var dotIndex; var val; var count = 0; for (var key in properties) { count++; val = properties[key]; dotIndex = key.indexOf('.'); if (dotIndex !== -1) { var groupName = key.substr(0, dotIndex); key = key.substr(dotIndex+1); var group = unflattenedProperties[groupName]; if (!group || !Sys.Services.ProfileGroup.isInstanceOfType(group)) { group = new Sys.Services.ProfileGroup(); unflattenedProperties[groupName] = group; } group[key] = val; } else { unflattenedProperties[key] = val; } } properties.length = count; return unflattenedProperties; } Sys.Services._ProfileService.prototype = { _defaultLoadCompletedCallback: null, _defaultSaveCompletedCallback: null, _path: '', _timeout: 0, get_defaultLoadCompletedCallback: Sys$Services$_ProfileService$get_defaultLoadCompletedCallback, set_defaultLoadCompletedCallback: Sys$Services$_ProfileService$set_defaultLoadCompletedCallback, get_defaultSaveCompletedCallback: Sys$Services$_ProfileService$get_defaultSaveCompletedCallback, set_defaultSaveCompletedCallback: Sys$Services$_ProfileService$set_defaultSaveCompletedCallback, get_path: Sys$Services$_ProfileService$get_path, load: Sys$Services$_ProfileService$load, save: Sys$Services$_ProfileService$save, _clonePropertyNames: Sys$Services$_ProfileService$_clonePropertyNames, _flattenProperties: Sys$Services$_ProfileService$_flattenProperties, _get_path: Sys$Services$_ProfileService$_get_path, _onLoadComplete: Sys$Services$_ProfileService$_onLoadComplete, _onLoadFailed: Sys$Services$_ProfileService$_onLoadFailed, _onSaveComplete: Sys$Services$_ProfileService$_onSaveComplete, _onSaveFailed: Sys$Services$_ProfileService$_onSaveFailed, _unflattenProperties: Sys$Services$_ProfileService$_unflattenProperties } Sys.Services._ProfileService.registerClass('Sys.Services._ProfileService', Sys.Net.WebServiceProxy); Sys.Services.ProfileService = new Sys.Services._ProfileService(); Sys.Services.ProfileGroup = function Sys$Services$ProfileGroup(properties) { /// /// var e = Function._validateParams(arguments, [ {name: "properties", mayBeNull: true, optional: true} ]); if (e) throw e; if (properties) { for (var property in properties) { this[property] = properties[property]; } } } Sys.Services.ProfileGroup.registerClass('Sys.Services.ProfileGroup'); Sys.Services._AuthenticationService = function Sys$Services$_AuthenticationService() { /// if (arguments.length !== 0) throw Error.parameterCount(); Sys.Services._AuthenticationService.initializeBase(this); } Sys.Services._AuthenticationService.DefaultWebServicePath = ''; function Sys$Services$_AuthenticationService$get_defaultLoginCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultLoginCompletedCallback; } function Sys$Services$_AuthenticationService$set_defaultLoginCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultLoginCompletedCallback = value; } function Sys$Services$_AuthenticationService$get_defaultLogoutCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultLogoutCompletedCallback; } function Sys$Services$_AuthenticationService$set_defaultLogoutCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultLogoutCompletedCallback = value; } function Sys$Services$_AuthenticationService$get_isLoggedIn() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._authenticated; } function Sys$Services$_AuthenticationService$get_path() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._path || ''; } function Sys$Services$_AuthenticationService$login(username, password, isPersistent, customInfo, redirectUrl, loginCompletedCallback, failedCallback, userContext) { /// /// /// /// /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "username", type: String}, {name: "password", type: String, mayBeNull: true}, {name: "isPersistent", type: Boolean, mayBeNull: true, optional: true}, {name: "customInfo", type: String, mayBeNull: true, optional: true}, {name: "redirectUrl", type: String, mayBeNull: true, optional: true}, {name: "loginCompletedCallback", type: Function, mayBeNull: true, optional: true}, {name: "failedCallback", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; this._invoke(this._get_path(), "Login", false, { userName: username, password: password, createPersistentCookie: isPersistent }, Function.createDelegate(this, this._onLoginComplete), Function.createDelegate(this, this._onLoginFailed), [username, password, isPersistent, customInfo, redirectUrl, loginCompletedCallback, failedCallback, userContext]); } function Sys$Services$_AuthenticationService$logout(redirectUrl, logoutCompletedCallback, failedCallback, userContext) { /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "redirectUrl", type: String, mayBeNull: true, optional: true}, {name: "logoutCompletedCallback", type: Function, mayBeNull: true, optional: true}, {name: "failedCallback", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; this._invoke(this._get_path(), "Logout", false, {}, Function.createDelegate(this, this._onLogoutComplete), Function.createDelegate(this, this._onLogoutFailed), [redirectUrl, logoutCompletedCallback, failedCallback, userContext]); } function Sys$Services$_AuthenticationService$_get_path() { var path = this.get_path(); if(!path.length) { path = Sys.Services._AuthenticationService.DefaultWebServicePath; } if(!path || !path.length) { throw Error.invalidOperation(Sys.Res.servicePathNotSet); } return path; } function Sys$Services$_AuthenticationService$_onLoginComplete(result, context, methodName) { if(typeof(result) !== "boolean") { throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType, methodName, "Boolean")); } var redirectUrl = context[4]; var userContext = context[7] || this.get_defaultUserContext(); var callback = context[5] || this.get_defaultLoginCompletedCallback() || this.get_defaultSucceededCallback(); if(result) { this._authenticated = true; if (callback) { callback(true, userContext, "Sys.Services.AuthenticationService.login"); } if (typeof(redirectUrl) !== "undefined" && redirectUrl !== null) { window.location.href = redirectUrl; } } else if (callback) { callback(false, userContext, "Sys.Services.AuthenticationService.login"); } } function Sys$Services$_AuthenticationService$_onLoginFailed(err, context, methodName) { var callback = context[6] || this.get_defaultFailedCallback(); if (callback) { var userContext = context[7] || this.get_defaultUserContext(); callback(err, userContext, "Sys.Services.AuthenticationService.login"); } else { Sys.Net.WebServiceProxy._defaultFailedCallback(err, methodName); } } function Sys$Services$_AuthenticationService$_onLogoutComplete(result, context, methodName) { if(result !== null) { throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType, methodName, "null")); } var redirectUrl = context[0]; var userContext = context[3] || this.get_defaultUserContext(); var callback = context[1] || this.get_defaultLogoutCompletedCallback() || this.get_defaultSucceededCallback(); this._authenticated = false; if (callback) { callback(null, userContext, "Sys.Services.AuthenticationService.logout"); } if(!redirectUrl) { window.location.reload(); } else { window.location.href = redirectUrl; } } function Sys$Services$_AuthenticationService$_onLogoutFailed(err, context, methodName) { var callback = context[2] || this.get_defaultFailedCallback(); if (callback) { callback(err, context[3], "Sys.Services.AuthenticationService.logout"); } else { Sys.Net.WebServiceProxy._defaultFailedCallback(err, methodName); } } function Sys$Services$_AuthenticationService$_setAuthenticated(authenticated) { this._authenticated = authenticated; } Sys.Services._AuthenticationService.prototype = { _defaultLoginCompletedCallback: null, _defaultLogoutCompletedCallback: null, _path: '', _timeout: 0, _authenticated: false, get_defaultLoginCompletedCallback: Sys$Services$_AuthenticationService$get_defaultLoginCompletedCallback, set_defaultLoginCompletedCallback: Sys$Services$_AuthenticationService$set_defaultLoginCompletedCallback, get_defaultLogoutCompletedCallback: Sys$Services$_AuthenticationService$get_defaultLogoutCompletedCallback, set_defaultLogoutCompletedCallback: Sys$Services$_AuthenticationService$set_defaultLogoutCompletedCallback, get_isLoggedIn: Sys$Services$_AuthenticationService$get_isLoggedIn, get_path: Sys$Services$_AuthenticationService$get_path, login: Sys$Services$_AuthenticationService$login, logout: Sys$Services$_AuthenticationService$logout, _get_path: Sys$Services$_AuthenticationService$_get_path, _onLoginComplete: Sys$Services$_AuthenticationService$_onLoginComplete, _onLoginFailed: Sys$Services$_AuthenticationService$_onLoginFailed, _onLogoutComplete: Sys$Services$_AuthenticationService$_onLogoutComplete, _onLogoutFailed: Sys$Services$_AuthenticationService$_onLogoutFailed, _setAuthenticated: Sys$Services$_AuthenticationService$_setAuthenticated } Sys.Services._AuthenticationService.registerClass('Sys.Services._AuthenticationService', Sys.Net.WebServiceProxy); Sys.Services.AuthenticationService = new Sys.Services._AuthenticationService(); Sys.Services._RoleService = function Sys$Services$_RoleService() { /// if (arguments.length !== 0) throw Error.parameterCount(); Sys.Services._RoleService.initializeBase(this); this._roles = []; } Sys.Services._RoleService.DefaultWebServicePath = ''; function Sys$Services$_RoleService$get_defaultLoadCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultLoadCompletedCallback; } function Sys$Services$_RoleService$set_defaultLoadCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultLoadCompletedCallback = value; } function Sys$Services$_RoleService$get_path() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._path || ''; } function Sys$Services$_RoleService$get_roles() { /// if (arguments.length !== 0) throw Error.parameterCount(); return Array.clone(this._roles); } function Sys$Services$_RoleService$isUserInRole(role) { /// /// /// var e = Function._validateParams(arguments, [ {name: "role", type: String} ]); if (e) throw e; var v = this._get_rolesIndex()[role.trim().toLowerCase()]; return !!v; } function Sys$Services$_RoleService$load(loadCompletedCallback, failedCallback, userContext) { /// /// /// /// var e = Function._validateParams(arguments, [ {name: "loadCompletedCallback", type: Function, mayBeNull: true, optional: true}, {name: "failedCallback", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; Sys.Net.WebServiceProxy.invoke( this._get_path(), "GetRolesForCurrentUser", false, {} , Function.createDelegate(this, this._onLoadComplete), Function.createDelegate(this, this._onLoadFailed), [loadCompletedCallback, failedCallback, userContext], this.get_timeout()); } function Sys$Services$_RoleService$_get_path() { var path = this.get_path(); if(!path || !path.length) { path = Sys.Services._RoleService.DefaultWebServicePath; } if(!path || !path.length) { throw Error.invalidOperation(Sys.Res.servicePathNotSet); } return path; } function Sys$Services$_RoleService$_get_rolesIndex() { if (!this._rolesIndex) { var index = {}; for(var i=0; i < this._roles.length; i++) { index[this._roles[i].toLowerCase()] = true; } this._rolesIndex = index; } return this._rolesIndex; } function Sys$Services$_RoleService$_onLoadComplete(result, context, methodName) { if(result && !(result instanceof Array)) { throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType, methodName, "Array")); } this._roles = result; this._rolesIndex = null; var callback = context[0] || this.get_defaultLoadCompletedCallback() || this.get_defaultSucceededCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); var clonedResult = Array.clone(result); callback(clonedResult, userContext, "Sys.Services.RoleService.load"); } } function Sys$Services$_RoleService$_onLoadFailed(err, context, methodName) { var callback = context[1] || this.get_defaultFailedCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(err, userContext, "Sys.Services.RoleService.load"); } else { Sys.Net.WebServiceProxy._defaultFailedCallback(err, methodName); } } Sys.Services._RoleService.prototype = { _defaultLoadCompletedCallback: null, _rolesIndex: null, _timeout: 0, _path: '', get_defaultLoadCompletedCallback: Sys$Services$_RoleService$get_defaultLoadCompletedCallback, set_defaultLoadCompletedCallback: Sys$Services$_RoleService$set_defaultLoadCompletedCallback, get_path: Sys$Services$_RoleService$get_path, get_roles: Sys$Services$_RoleService$get_roles, isUserInRole: Sys$Services$_RoleService$isUserInRole, load: Sys$Services$_RoleService$load, _get_path: Sys$Services$_RoleService$_get_path, _get_rolesIndex: Sys$Services$_RoleService$_get_rolesIndex, _onLoadComplete: Sys$Services$_RoleService$_onLoadComplete, _onLoadFailed: Sys$Services$_RoleService$_onLoadFailed } Sys.Services._RoleService.registerClass('Sys.Services._RoleService', Sys.Net.WebServiceProxy); Sys.Services.RoleService = new Sys.Services._RoleService(); Type.registerNamespace('Sys.Serialization'); Sys.Serialization.JavaScriptSerializer = function Sys$Serialization$JavaScriptSerializer() { /// if (arguments.length !== 0) throw Error.parameterCount(); } Sys.Serialization.JavaScriptSerializer.registerClass('Sys.Serialization.JavaScriptSerializer'); Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs = []; Sys.Serialization.JavaScriptSerializer._charsToEscape = []; Sys.Serialization.JavaScriptSerializer._dateRegEx = new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)\\\\/\\"', 'g'); Sys.Serialization.JavaScriptSerializer._escapeChars = {}; Sys.Serialization.JavaScriptSerializer._escapeRegEx = new RegExp('["\\\\\\x00-\\x1F]', 'i'); Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal = new RegExp('["\\\\\\x00-\\x1F]', 'g'); Sys.Serialization.JavaScriptSerializer._jsonRegEx = new RegExp('[^,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]', 'g'); Sys.Serialization.JavaScriptSerializer._jsonStringRegEx = new RegExp('"(\\\\.|[^"\\\\])*"', 'g'); Sys.Serialization.JavaScriptSerializer._serverTypeFieldName = '__type'; Sys.Serialization.JavaScriptSerializer._init = function Sys$Serialization$JavaScriptSerializer$_init() { var replaceChars = ['\\u0000','\\u0001','\\u0002','\\u0003','\\u0004','\\u0005','\\u0006','\\u0007', '\\b','\\t','\\n','\\u000b','\\f','\\r','\\u000e','\\u000f','\\u0010','\\u0011', '\\u0012','\\u0013','\\u0014','\\u0015','\\u0016','\\u0017','\\u0018','\\u0019', '\\u001a','\\u001b','\\u001c','\\u001d','\\u001e','\\u001f']; Sys.Serialization.JavaScriptSerializer._charsToEscape[0] = '\\'; Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['\\'] = new RegExp('\\\\', 'g'); Sys.Serialization.JavaScriptSerializer._escapeChars['\\'] = '\\\\'; Sys.Serialization.JavaScriptSerializer._charsToEscape[1] = '"'; Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['"'] = new RegExp('"', 'g'); Sys.Serialization.JavaScriptSerializer._escapeChars['"'] = '\\"'; for (var i = 0; i < 32; i++) { var c = String.fromCharCode(i); Sys.Serialization.JavaScriptSerializer._charsToEscape[i+2] = c; Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[c] = new RegExp(c, 'g'); Sys.Serialization.JavaScriptSerializer._escapeChars[c] = replaceChars[i]; } } Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeBooleanWithBuilder(object, stringBuilder) { stringBuilder.append(object.toString()); } Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeNumberWithBuilder(object, stringBuilder) { if (isFinite(object)) { stringBuilder.append(String(object)); } else { throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers); } } Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeStringWithBuilder(string, stringBuilder) { stringBuilder.append('"'); if (Sys.Serialization.JavaScriptSerializer._escapeRegEx.test(string)) { if (Sys.Serialization.JavaScriptSerializer._charsToEscape.length === 0) { Sys.Serialization.JavaScriptSerializer._init(); } if (string.length < 128) { string = string.replace(Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal, function(x) { return Sys.Serialization.JavaScriptSerializer._escapeChars[x]; }); } else { for (var i = 0; i < 34; i++) { var c = Sys.Serialization.JavaScriptSerializer._charsToEscape[i]; if (string.indexOf(c) !== -1) { if (Sys.Browser.agent === Sys.Browser.Opera || Sys.Browser.agent === Sys.Browser.FireFox) { string = string.split(c).join(Sys.Serialization.JavaScriptSerializer._escapeChars[c]); } else { string = string.replace(Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[c], Sys.Serialization.JavaScriptSerializer._escapeChars[c]); } } } } } stringBuilder.append(string); stringBuilder.append('"'); } Sys.Serialization.JavaScriptSerializer._serializeWithBuilder = function Sys$Serialization$JavaScriptSerializer$_serializeWithBuilder(object, stringBuilder, sort, prevObjects) { var i; switch (typeof object) { case 'object': if (object) { if (prevObjects){ for( var j = 0; j < prevObjects.length; j++) { if (prevObjects[j] === object) { throw Error.invalidOperation(Sys.Res.cannotSerializeObjectWithCycle); } } } else { prevObjects = new Array(); } try { Array.add(prevObjects, object); if (Number.isInstanceOfType(object)){ Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(object, stringBuilder); } else if (Boolean.isInstanceOfType(object)){ Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(object, stringBuilder); } else if (String.isInstanceOfType(object)){ Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(object, stringBuilder); } else if (Array.isInstanceOfType(object)) { stringBuilder.append('['); for (i = 0; i < object.length; ++i) { if (i > 0) { stringBuilder.append(','); } Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(object[i], stringBuilder,false,prevObjects); } stringBuilder.append(']'); } else { if (Date.isInstanceOfType(object)) { stringBuilder.append('"\\/Date('); stringBuilder.append(object.getTime()); stringBuilder.append(')\\/"'); break; } var properties = []; var propertyCount = 0; for (var name in object) { if (name.startsWith('$')) { continue; } if (name === Sys.Serialization.JavaScriptSerializer._serverTypeFieldName && propertyCount !== 0){ properties[propertyCount++] = properties[0]; properties[0] = name; } else{ properties[propertyCount++] = name; } } if (sort) properties.sort(); stringBuilder.append('{'); var needComma = false; for (i=0; i /// /// var e = Function._validateParams(arguments, [ {name: "object", mayBeNull: true} ]); if (e) throw e; var stringBuilder = new Sys.StringBuilder(); Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(object, stringBuilder, false); return stringBuilder.toString(); } Sys.Serialization.JavaScriptSerializer.deserialize = function Sys$Serialization$JavaScriptSerializer$deserialize(data, secure) { /// /// /// /// var e = Function._validateParams(arguments, [ {name: "data", type: String}, {name: "secure", type: Boolean, optional: true} ]); if (e) throw e; if (data.length === 0) throw Error.argument('data', Sys.Res.cannotDeserializeEmptyString); try { var exp = data.replace(Sys.Serialization.JavaScriptSerializer._dateRegEx, "$1new Date($2)"); if (secure && Sys.Serialization.JavaScriptSerializer._jsonRegEx.test( exp.replace(Sys.Serialization.JavaScriptSerializer._jsonStringRegEx, ''))) throw null; return eval('(' + exp + ')'); } catch (e) { throw Error.argument('data', Sys.Res.cannotDeserializeInvalidJson); } } Sys.CultureInfo = function Sys$CultureInfo(name, numberFormat, dateTimeFormat) { /// /// /// /// var e = Function._validateParams(arguments, [ {name: "name", type: String}, {name: "numberFormat", type: Object}, {name: "dateTimeFormat", type: Object} ]); if (e) throw e; this.name = name; this.numberFormat = numberFormat; this.dateTimeFormat = dateTimeFormat; } function Sys$CultureInfo$_getDateTimeFormats() { if (! this._dateTimeFormats) { var dtf = this.dateTimeFormat; this._dateTimeFormats = [ dtf.MonthDayPattern, dtf.YearMonthPattern, dtf.ShortDatePattern, dtf.ShortTimePattern, dtf.LongDatePattern, dtf.LongTimePattern, dtf.FullDateTimePattern, dtf.RFC1123Pattern, dtf.SortableDateTimePattern, dtf.UniversalSortableDateTimePattern ]; } return this._dateTimeFormats; } function Sys$CultureInfo$_getMonthIndex(value) { if (!this._upperMonths) { this._upperMonths = this._toUpperArray(this.dateTimeFormat.MonthNames); } return Array.indexOf(this._upperMonths, this._toUpper(value)); } function Sys$CultureInfo$_getAbbrMonthIndex(value) { if (!this._upperAbbrMonths) { this._upperAbbrMonths = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames); } return Array.indexOf(this._upperAbbrMonths, this._toUpper(value)); } function Sys$CultureInfo$_getDayIndex(value) { if (!this._upperDays) { this._upperDays = this._toUpperArray(this.dateTimeFormat.DayNames); } return Array.indexOf(this._upperDays, this._toUpper(value)); } function Sys$CultureInfo$_getAbbrDayIndex(value) { if (!this._upperAbbrDays) { this._upperAbbrDays = this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames); } return Array.indexOf(this._upperAbbrDays, this._toUpper(value)); } function Sys$CultureInfo$_toUpperArray(arr) { var result = []; for (var i = 0, il = arr.length; i < il; i++) { result[i] = this._toUpper(arr[i]); } return result; } function Sys$CultureInfo$_toUpper(value) { return value.split("\u00A0").join(' ').toUpperCase(); } Sys.CultureInfo.prototype = { _getDateTimeFormats: Sys$CultureInfo$_getDateTimeFormats, _getMonthIndex: Sys$CultureInfo$_getMonthIndex, _getAbbrMonthIndex: Sys$CultureInfo$_getAbbrMonthIndex, _getDayIndex: Sys$CultureInfo$_getDayIndex, _getAbbrDayIndex: Sys$CultureInfo$_getAbbrDayIndex, _toUpperArray: Sys$CultureInfo$_toUpperArray, _toUpper: Sys$CultureInfo$_toUpper } Sys.CultureInfo._parse = function Sys$CultureInfo$_parse(value) { var cultureInfo = Sys.Serialization.JavaScriptSerializer.deserialize(value); return new Sys.CultureInfo(cultureInfo.name, cultureInfo.numberFormat, cultureInfo.dateTimeFormat); } Sys.CultureInfo.registerClass('Sys.CultureInfo'); Sys.CultureInfo.InvariantCulture = Sys.CultureInfo._parse('{"name":"","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":true,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"\u00A4","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":true},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, dd MMMM yyyy HH:mm:ss","LongDatePattern":"dddd, dd MMMM yyyy","LongTimePattern":"HH:mm:ss","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"MM/dd/yyyy","ShortTimePattern":"HH:mm","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"yyyy MMMM","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":true,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}'); if (typeof(__cultureInfo) === 'undefined') { var __cultureInfo = '{"name":"en-US","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":false,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"$","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":false},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, MMMM dd, yyyy h:mm:ss tt","LongDatePattern":"dddd, MMMM dd, yyyy","LongTimePattern":"h:mm:ss tt","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"M/d/yyyy","ShortTimePattern":"h:mm tt","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"MMMM, yyyy","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":false,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}'; } Sys.CultureInfo.CurrentCulture = Sys.CultureInfo._parse(__cultureInfo); delete __cultureInfo; Sys.UI.Behavior = function Sys$UI$Behavior(element) { /// /// var e = Function._validateParams(arguments, [ {name: "element", domElement: true} ]); if (e) throw e; Sys.UI.Behavior.initializeBase(this); this._element = element; var behaviors = element._behaviors; if (!behaviors) { element._behaviors = [this]; } else { behaviors[behaviors.length] = this; } } function Sys$UI$Behavior$get_element() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._element; } function Sys$UI$Behavior$get_id() { /// if (arguments.length !== 0) throw Error.parameterCount(); var baseId = Sys.UI.Behavior.callBaseMethod(this, 'get_id'); if (baseId) return baseId; if (!this._element || !this._element.id) return ''; return this._element.id + '$' + this.get_name(); } function Sys$UI$Behavior$get_name() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (this._name) return this._name; var name = Object.getTypeName(this); var i = name.lastIndexOf('.'); if (i != -1) name = name.substr(i + 1); if (!this.get_isInitialized()) this._name = name; return name; } function Sys$UI$Behavior$set_name(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; if ((value === '') || (value.charAt(0) === ' ') || (value.charAt(value.length - 1) === ' ')) throw Error.argument('value', Sys.Res.invalidId); if (typeof(this._element[value]) !== 'undefined') throw Error.invalidOperation(String.format(Sys.Res.behaviorDuplicateName, value)); if (this.get_isInitialized()) throw Error.invalidOperation(Sys.Res.cantSetNameAfterInit); this._name = value; } function Sys$UI$Behavior$initialize() { Sys.UI.Behavior.callBaseMethod(this, 'initialize'); var name = this.get_name(); if (name) this._element[name] = this; } function Sys$UI$Behavior$dispose() { Sys.UI.Behavior.callBaseMethod(this, 'dispose'); if (this._element) { var name = this.get_name(); if (name) { this._element[name] = null; } Array.remove(this._element._behaviors, this); delete this._element; } } Sys.UI.Behavior.prototype = { _name: null, get_element: Sys$UI$Behavior$get_element, get_id: Sys$UI$Behavior$get_id, get_name: Sys$UI$Behavior$get_name, set_name: Sys$UI$Behavior$set_name, initialize: Sys$UI$Behavior$initialize, dispose: Sys$UI$Behavior$dispose } Sys.UI.Behavior.registerClass('Sys.UI.Behavior', Sys.Component); Sys.UI.Behavior.getBehaviorByName = function Sys$UI$Behavior$getBehaviorByName(element, name) { /// /// /// /// var e = Function._validateParams(arguments, [ {name: "element", domElement: true}, {name: "name", type: String} ]); if (e) throw e; var b = element[name]; return (b && Sys.UI.Behavior.isInstanceOfType(b)) ? b : null; } Sys.UI.Behavior.getBehaviors = function Sys$UI$Behavior$getBehaviors(element) { /// /// /// var e = Function._validateParams(arguments, [ {name: "element", domElement: true} ]); if (e) throw e; if (!element._behaviors) return []; return Array.clone(element._behaviors); } Sys.UI.Behavior.getBehaviorsByType = function Sys$UI$Behavior$getBehaviorsByType(element, type) { /// /// /// /// var e = Function._validateParams(arguments, [ {name: "element", domElement: true}, {name: "type", type: Type} ]); if (e) throw e; var behaviors = element._behaviors; var results = []; if (behaviors) { for (var i = 0, l = behaviors.length; i < l; i++) { if (type.isInstanceOfType(behaviors[i])) { results[results.length] = behaviors[i]; } } } return results; } Sys.UI.VisibilityMode = function Sys$UI$VisibilityMode() { /// /// /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } Sys.UI.VisibilityMode.prototype = { hide: 0, collapse: 1 } Sys.UI.VisibilityMode.registerEnum("Sys.UI.VisibilityMode"); Sys.UI.Control = function Sys$UI$Control(element) { /// /// var e = Function._validateParams(arguments, [ {name: "element", domElement: true} ]); if (e) throw e; if (typeof(element.control) != 'undefined') throw Error.invalidOperation(Sys.Res.controlAlreadyDefined); Sys.UI.Control.initializeBase(this); this._element = element; element.control = this; } function Sys$UI$Control$get_element() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._element; } function Sys$UI$Control$get_id() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._element) return ''; return this._element.id; } function Sys$UI$Control$set_id(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; throw Error.invalidOperation(Sys.Res.cantSetId); } function Sys$UI$Control$get_parent() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (this._parent) return this._parent; if (!this._element) return null; var parentElement = this._element.parentNode; while (parentElement) { if (parentElement.control) { return parentElement.control; } parentElement = parentElement.parentNode; } return null; } function Sys$UI$Control$set_parent(value) { var e = Function._validateParams(arguments, [{name: "value", type: Sys.UI.Control}]); if (e) throw e; if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); var parents = [this]; var current = value; while (current) { if (Array.contains(parents, current)) throw Error.invalidOperation(Sys.Res.circularParentChain); parents[parents.length] = current; current = current.get_parent(); } this._parent = value; } function Sys$UI$Control$get_visibilityMode() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); return Sys.UI.DomElement.getVisibilityMode(this._element); } function Sys$UI$Control$set_visibilityMode(value) { var e = Function._validateParams(arguments, [{name: "value", type: Sys.UI.VisibilityMode}]); if (e) throw e; if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); Sys.UI.DomElement.setVisibilityMode(this._element, value); } function Sys$UI$Control$get_visible() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); return Sys.UI.DomElement.getVisible(this._element); } function Sys$UI$Control$set_visible(value) { var e = Function._validateParams(arguments, [{name: "value", type: Boolean}]); if (e) throw e; if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); Sys.UI.DomElement.setVisible(this._element, value) } function Sys$UI$Control$addCssClass(className) { /// /// var e = Function._validateParams(arguments, [ {name: "className", type: String} ]); if (e) throw e; if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); Sys.UI.DomElement.addCssClass(this._element, className); } function Sys$UI$Control$dispose() { Sys.UI.Control.callBaseMethod(this, 'dispose'); if (this._element) { this._element.control = undefined; delete this._element; } if (this._parent) delete this._parent; } function Sys$UI$Control$onBubbleEvent(source, args) { /// /// /// /// var e = Function._validateParams(arguments, [ {name: "source"}, {name: "args", type: Sys.EventArgs} ]); if (e) throw e; return false; } function Sys$UI$Control$raiseBubbleEvent(source, args) { /// /// /// var e = Function._validateParams(arguments, [ {name: "source"}, {name: "args", type: Sys.EventArgs} ]); if (e) throw e; var currentTarget = this.get_parent(); while (currentTarget) { if (currentTarget.onBubbleEvent(source, args)) { return; } currentTarget = currentTarget.get_parent(); } } function Sys$UI$Control$removeCssClass(className) { /// /// var e = Function._validateParams(arguments, [ {name: "className", type: String} ]); if (e) throw e; if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); Sys.UI.DomElement.removeCssClass(this._element, className); } function Sys$UI$Control$toggleCssClass(className) { /// /// var e = Function._validateParams(arguments, [ {name: "className", type: String} ]); if (e) throw e; if (!this._element) throw Error.invalidOperation(Sys.Res.cantBeCalledAfterDispose); Sys.UI.DomElement.toggleCssClass(this._element, className); } Sys.UI.Control.prototype = { _parent: null, _visibilityMode: Sys.UI.VisibilityMode.hide, get_element: Sys$UI$Control$get_element, get_id: Sys$UI$Control$get_id, set_id: Sys$UI$Control$set_id, get_parent: Sys$UI$Control$get_parent, set_parent: Sys$UI$Control$set_parent, get_visibilityMode: Sys$UI$Control$get_visibilityMode, set_visibilityMode: Sys$UI$Control$set_visibilityMode, get_visible: Sys$UI$Control$get_visible, set_visible: Sys$UI$Control$set_visible, addCssClass: Sys$UI$Control$addCssClass, dispose: Sys$UI$Control$dispose, onBubbleEvent: Sys$UI$Control$onBubbleEvent, raiseBubbleEvent: Sys$UI$Control$raiseBubbleEvent, removeCssClass: Sys$UI$Control$removeCssClass, toggleCssClass: Sys$UI$Control$toggleCssClass } Sys.UI.Control.registerClass('Sys.UI.Control', Sys.Component);