You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
97 KiB

1 year ago
//----------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------
// MicrosoftAjax.js
Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};Function.createDelegate=function(a,b){return function(){return b.apply(a,arguments)}};Function.emptyFunction=Function.emptyMethod=function(){};Function._validateParams=function(e,c){var a;a=Function._validateParameterCount(e,c);if(a){a.popStackFrame();return a}for(var b=0;b<e.length;b++){var d=c[Math.min(b,c.length-1)],f=d.name;if(d.parameterArray)f+="["+(b-c.length+1)+"]";a=Function._validateParameter(e[b],d,f);if(a){a.popStackFrame();return a}}return null};Function._validateParameterCount=function(e,a){var c=a.length,d=0;for(var b=0;b<a.length;b++)if(a[b].parameterArray)c=Number.MAX_VALUE;else if(!a[b].optional)d++;if(e.length<d||e.length>c){var f=Error.parameterCount();f.popStackFrame();return f}return null};Function._validateParameter=function(c,a,h){var b,g=a.type,l=!!a.integer,k=!!a.domElement,m=!!a.mayBeNull;b=Function._validateParameterType(c,g,l,k,m,h);if(b){b.popStackFrame();return b}var e=a.elementType,f=!!a.elementMayBeNull;if(g===Array&&typeof c!=="undefined"&&c!==null&&(e||!f)){var j=!!a.elementInteger,i=!!a.elementDomElement;for(var d=0;d<c.length;d++){var n=c[d];b=Function._validateParameterType(n,e,j,i,f,h+"["+d+"]");if(b){b.popStackFrame();return b}}}return null};Function._validateParameterType=function(a,c,n,m,k,d){var b;if(typeof a==="undefined")if(k)return null;else{b=Error.argumentUndefined(d);b.popStackFrame();return b}if(a===null)if(k)return null;else{b=Error.argumentNull(d);b.popStackFrame();return b}if(c&&c.__enum){if(typeof a!=="number"){b=Error.argumentType(d,Object.getType(a),c);b.popStackFrame();return b}if(a%1===0){var e=c.prototype;if(!c.__flags||a===0){for(var i in e)if(e[i]===a)return null}else{var l=a;for(var i in e){var f=e[i];if(f===0)continue;if((f&a)===f)l-=f;if(l===0)return null}}}b=Error.argumentOutOfRange(d,a,String.format(Sys.Res.enumInvalidValue,a,c.getName()));b.popStackFrame();return b}if(m){var h;if(typeof a.nodeType!=="number"){var g=a.ownerDocument||a.document||a;if(g!=a){var j=g.defaultView||g.parentWindow;h=j!=a&&!(j.document&&a.document&&j.document===a.document)}else h=typeof g.body==="undefined"}else h=a.nodeType===3;if(h){b=Error.argument(d,Sys.Res.argumentDomElement);b.popStackFrame();return b}}if(c&&!c.isInstanceOfType(a)){b=Error.argumentType(d,Object.getType(a),c);b.popStackFrame();return b}if(c===Number&&n)if(a%1!==0){b=Error.argumentOutOfRange(d,a,Sys.Res.argumentInteger);b.popStackFrame();return b}return null};Error.__typeName="Error";Error.__class=true;Error.create=function(d,b){var a=new Error(d);a.message=d;if(b)for(var c in b)a[c]=b[c];a.popStackFrame();return a};Error.argument=function(a,c){var b="Sys.ArgumentException: "+(c?c:Sys.Res.argument);if(a)b+="\n"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:"Sys.ArgumentException",paramName:a});d.popStackFrame();return d};Error.argumentNull=function(a,c){var b="Sys.ArgumentNullException: "+(c?c:Sys.Res.argumentNull);if(a)b+="\n"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:"Sys.ArgumentNullException",paramName:a});d.popStackFrame();return d};Error.argumentOutOfRange=function(c,a,d){var b="Sys.ArgumentOutOfRangeException: "+(d?d:Sys.Res.argumentOutOfRange);if(c)b+="\n"+String.format(Sys.Res.paramName,c);if(typeof a!=="undefined"&&a!==null)b+="\n"+String.format(Sys.Res.actualValue,a);var e=Error.create(b,{name:"Sys.ArgumentOutOfRangeException",paramName:c,actualValue:a});e.popStackFrame();return e};Error.argumentType=function(d,c,b,e){var a="Sys.ArgumentTypeException: ";if(e)a+=e;else if(c&&b)a+=String.format(Sys.Res.argumentTypeWithTypes,c.getName(),b.getName());else a+=Sys.Res.argumentType;if(d)a+="\n"+String.format(Sys.Res.paramName,d);var f=Error.create(a,{name:"Sys.ArgumentTypeException",paramName:d,actualType:c,expectedType:b});f.popStackFrame();return f};Error.argumentUndefined=function(a,c){var b="Sys.ArgumentUndefinedException: "+(c?c
Type.registerNamespace('Sys');Sys.Res={"argumentInteger":"值必须为整数。","scriptLoadMultipleCallbacks":"脚本“{0}”包含对 Sys.Application.notifyScriptLoaded() 的多个调用。只允许一个调用。","invokeCalledTwice":"无法调用 invoke 多次。","webServiceFailed":"服务器方法“{0}”失败,并发生以下错误: {1}","webServiceInvalidJsonWrapper":"服务器方法“{0}”返回的数据无效。JSON 包装缺少“d”属性。","argumentType":"无法将对象转换为所需类型。","argumentNull":"值不能为 null。","controlCantSetId":"无法在控件上设置 ID 属性。","formatBadFormatSpecifier":"格式说明符无效。","webServiceFailedNoMsg":"服务器方法“{0}”失败。","argumentDomElement":"值必须为 DOM 元素。","invalidExecutorType":"无法从 {0} 中创建有效的 Sys.Net.WebRequestExecutor。","cannotCallBeforeResponse":"responseAvailable 为 false 时无法调用 {0}。","actualValue":"实际值是 {0}。","enumInvalidValue":"“{0}”对于枚举 {1} 不是有效的值。","scriptLoadFailed":"无法加载脚本“{0}”。","parameterCount":"参数计数不匹配。","cannotDeserializeEmptyString":"无法反序列化空字符串。","formatInvalidString":"输入字符串的格式不正确。","invalidTimeout":"值必须大于或等于零。","cannotAbortBeforeStart":"执行器尚未启动时无法中止。","argument":"值不在预期的范围内。","cannotDeserializeInvalidJson":"无法反序列化。数据未对应于有效的 JSON。","invalidHttpVerb":"httpVerb 不能设置为空字符串或 null 字符串。","nullWebRequest":"无法调用带有 null webRequest 的 executeRequest。","eventHandlerInvalid":"未通过 Sys.UI.DomEvent.addHandler 方法添加处理程序。","cannotSerializeNonFiniteNumbers":"无法序列化无限数。","argumentUndefined":"值不能是未定义的。","webServiceInvalidReturnType":"服务器方法“{0}”返回了无效类型。期望的类型: {1}","servicePathNotSet":"尚未设置 Web 服务的路径。","argumentTypeWithTypes":"类型“{0}”的对象无法转换为类型“{1}”。","cannotCallOnceStarted":"启动后将无法调用 {0}。","badBaseUrl1":"基 URL 不包含 ://。","badBaseUrl2":"基 URL 不包含另一个 /。","badBaseUrl3":"在基 URL 中找不到最后一个 /。","setExecutorAfterActive":"无法在执行器已激活之后对其进行设置。","paramName":"参数名: {0}","cannotCallOutsideHandler":"无法在完成的事件处理程序外部调用 {0}。","cannotSerializeObjectWithCycle":"无法序列化子属性中具有循环引用的对象。","format":"已标识项中有一项的格式无效。","assertFailedCaller":"断言失败: {0}\r\n位置为 {1}","argumentOutOfRange":"指定的参数已超出有效值的范围。","webServiceTimedOut":"服务器方法“{0}”已超时。","notImplemented":"方法或操作未实现。","assertFailed":"断言失败: {0}","invalidOperation":"对象的当前状态使该操作无效。","breakIntoDebugger":"{0}\r\n\r\n是否中断至调试器?"};
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();