UNPKG

kekule

Version:

Open source JavaScript toolkit for chemoinformatics

1 lines 2.56 MB
!function(){var e;"object"==typeof self?e=self:"object"==typeof window&&window&&window.document?e=window:"object"==typeof global&&(e=global),e.__$kekule_single_min_bundle__=!0}(),function(e){var t;t="object"==typeof window&&window&&window.document?window:"object"==typeof global?global:"object"==typeof self?self:e||{},Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){t||(t=0);var r=this.length;for(t<0&&(t=r+t);t<r;t++)if(this[t]===e)return t;return-1});var r=t.document;r||"undefined"!=typeof window&&(r=window.document);var i="undefined"!=typeof navigator&&"undefined"!=typeof window&&void 0!==r,n="object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node,o=n,a="function"==typeof __webpack_require__,s="undefined"!=typeof exports;if("function"!=typeof __webpack_require__&&o){var l={};try{var u=require("vm"),d=require("fs")}catch(e){}}if(!o)r&&r.readyState,window.attachEvent&&window.opera;o&&"undefined"!=typeof global&&(t=global);var c=[];function h(e,t,r){if(c.indexOf(t)>=0)r&&r(null);else{if(o){var i=function(e){if(o)try{var t=0===e.indexOf("file:///")?e.substr(8):e,r=d.readFileSync(t,"utf8");return u.runInThisContext(r,{filename:e}),!0}catch(e){return e}}(t);return r&&r(!0===i?null:i),i}try{var n=e.createElement("script");return n.src=t,n.onerror=function(e){r&&r(new Error("Loading script file "+t+" failed"))},n.onload=n.onreadystatechange=function(e){if(!n._loaded){var i=n.readyState;void 0!==i&&"loaded"!==i&&"complete"!==i||(n._loaded=!0,n.onload=n.onreadystatechange=null,c.push(t),r&&r(null))}},(e.getElementsByTagName("head")[0]||e.body).appendChild(n),n}catch(e){r&&r(e)}}}function p(e,t,r){!function e(t,r,i,n){if(r.length<=0)return void(i&&(n.length?i(new Error(n.join(", "))):i(null)));var o=r.shift();h(t,o,function(o){o&&n.push(o?o.message||o:""),e(t,r,i,n)})}(e,[].concat(t),r,[])}function g(e,t,i){if(o)p(r,e,function(e){(this.Kekule||l.Kekule)&&(this.Kekule||l.Kekule)._loaded(),i&&i(e)});else if(function(){if(o)return!0;var e=r&&r.readyState,t=window.attachEvent&&!window.opera;return"complete"===e||"loaded"===e||"interactive"===e&&!t}()||t)p(r,e,function(e){e||Kekule._loaded(),i&&i(e)});else try{for(var n=0,a=e.length;n<a;++n)s=r,u=e[n],s.write('<script type="text/javascript" src="'+u+'"><\/script>');r.write('<script type="text/javascript">if (this.Kekule) Kekule._loaded();<\/script>'),i&&i(null)}catch(e){i(e)}var s,u}var f={lan:{files:["lan/classes.js","lan/xmlJsons.js","lan/serializations.js"],category:"lan",minFile:"root.min.js"},root:{files:["core/kekule.root.js"],category:"root",minFile:"root.min.js"},localization:{requires:["lan","root"],files:["localization/kekule.localizations.js"],category:"localization",minFile:"localization.min.js"},localizationData:{requires:["localization"],files:["localization/en/kekule.localize.general.en.js","localization/en/kekule.localize.widget.en.js","localization/en/kekule.localize.objDefines.en.js"],category:"localization",minFile:"localization.min.js"},"localizationData.zh":{requires:["localization"],files:["localization/zh/kekule.localize.general.zh.js","localization/zh/kekule.localize.widget.zh.js"],category:"localizationData.zh",autoCompress:!1},common:{requires:["lan","root","localization"],files:["core/kekule.common.js","core/kekule.exceptions.js","utils/kekule.utils.js","utils/kekule.domHelper.js","utils/kekule.domUtils.js","core/kekule.externalResMgr.js","core/kekule.metrics.js"],category:"common",minFile:"common.min.js"},core:{requires:["lan","root","common","data"],files:["core/kekule.configs.js","core/kekule.elements.js","core/kekule.electrons.js","core/kekule.valences.js","core/kekule.structures.js","core/kekule.structureBuilder.js","core/kekule.reactions.js","core/kekule.chemUtils.js","chemdoc/kekule.glyph.base.js","chemdoc/kekule.glyph.utils.js","chemdoc/kekule.glyph.pathGlyphs.js","chemdoc/kekule.glyph.lines.js","chemdoc/kekule.glyph.chemGlyphs.js","chemdoc/kekule.contentBlocks.js","chemdoc/kekule.attachedMarkers.js","chemdoc/kekule.commonChemMarkers.js"],category:"core"},html:{requires:["lan","root","common"],files:["xbrowsers/kekule.x.js","html/kekule.nativeServices.js","html/kekule.predefinedResLoaders.js","utils/kekule.htmlDomUtils.js"],category:"core"},io:{requires:["lan","root","common","core","algorithm"],files:["utils/kekule.textHelper.js","io/kekule.io.js","io/cml/kekule.io.cml.js","io/mdl/kekule.io.mdlBase.js","io/mdl/kekule.io.mdl2000.js","io/mdl/kekule.io.mdl3000.js","io/mdl/kekule.io.mdlIO.js","io/smiles/kekule.io.smiles.js","io/native/kekule.io.native.js"],category:"io"},render:{requires:["lan","root","common","core","html"],files:["render/kekule.render.extensions.js","render/kekule.render.base.js","render/kekule.render.renderColorData.js","render/kekule.render.utils.js","render/kekule.render.configs.js","render/kekule.render.baseTextRender.js","render/kekule.render.boundInfoRecorder.js","render/2d/kekule.render.renderer2D.js","render/2d/kekule.render.glyphRender2D.js","render/2d/kekule.render.canvasRenderer.js","render/2d/kekule.render.raphaelRenderer.js","render/3d/kekule.render.renderer3D.js","render/3d/kekule.render.threeRenderer.js","render/kekule.render.painter.js"],category:"render"},spectroscopy:{requires:["root","common","io"],files:["spectroscopy/kekule.spectrum.core.js","io/jcamp/kekule.io.jcamp.base.js","io/jcamp/kekule.io.jcamp.labels.js","io/jcamp/kekule.io.jcamp.dx.js","io/jcamp/kekule.io.jcamp.cs.js","io/jcamp/kekule.io.jcampIO.js","io/cmlspect/kekule.io.cmlspect.js","spectroscopy/kekule.spectrum.render.js"]},widget:{requires:["lan","root","common","html"],files:["lib/hammer.js/hammer.min.js","widgets/operation/kekule.operations.js","widgets/operation/kekule.actions.js","widgets/kekule.widget.root.js","widgets/kekule.widget.bindings.js","widgets/kekule.widget.events.js","widgets/kekule.widget.base.js","widgets/kekule.widget.sys.js","widgets/kekule.widget.keys.js","widgets/kekule.widget.clipboards.js","widgets/kekule.widget.helpers.js","widgets/kekule.widget.styleResources.js","widgets/kekule.widget.autoLaunchers.js","widgets/transitions/kekule.widget.transitions.js","widgets/transitions/kekule.widget.transMgr.js","widgets/commonCtrls/kekule.widget.resizers.js","widgets/commonCtrls/kekule.widget.movers.js","widgets/commonCtrls/kekule.widget.images.js","widgets/commonCtrls/kekule.widget.containers.js","widgets/commonCtrls/kekule.widget.menus.js","widgets/commonCtrls/kekule.widget.buttons.js","widgets/commonCtrls/kekule.widget.formControls.js","widgets/commonCtrls/kekule.widget.nestedContainers.js","widgets/commonCtrls/kekule.widget.treeViews.js","widgets/commonCtrls/kekule.widget.listViews.js","widgets/commonCtrls/kekule.widget.dialogs.js","widgets/commonCtrls/kekule.widget.msgPanels.js","widgets/commonCtrls/kekule.widget.tabViews.js","widgets/advCtrls/kekule.widget.valueListEditors.js","widgets/advCtrls/kekule.widget.colorPickers.js","widgets/advCtrls/kekule.widget.textEditors.js","widgets/advCtrls/kekule.widget.widgetGrids.js","widgets/advCtrls/objInspector/kekule.widget.objInspectors.js","widgets/advCtrls/objInspector/kekule.widget.objInspector.propEditors.js","widgets/advCtrls/objInspector/kekule.widget.objInspector.operations.js","widgets/advCtrls/kekule.widget.configurators.js","widgets/advCtrls/grids/kekule.widget.dataSets.js","widgets/advCtrls/grids/kekule.widget.dataGrids.js","widgets/sys/kekule.widget.sysMsgs.js","widgets/operation/kekule.operHistoryTreeViews.js"],category:"widget"},chemWidget:{requires:["lan","root","common","core","html","io","render","algorithm","widget"],files:["widgets/chem/kekule.chemWidget.base.js","widgets/chem/kekule.chemWidget.dialogs.js","widgets/chem/periodicTable/kekule.chemWidget.periodicTables.js","widgets/chem/kekule.chemWidget.chemObjDisplayers.js","widgets/chem/structureTreeView/kekule.chemWidget.structureTreeViews.js","widgets/chem/uiMarker/kekule.chemWidget.uiMarkers.js","widgets/chem/viewer/kekule.chemWidget.viewers.js","widgets/chem/viewer/kekule.chemWidget.spectrumViewers.js","widgets/chem/viewer/kekule.chemWidget.spectrumInspectors.js","widgets/chem/viewer/kekule.chemWidget.viewerGrids.js","widgets/chem/viewer/kekule.chemWidget.chemObjInserters.js","widgets/chem/editor/kekule.chemEditor.extensions.js","widgets/chem/editor/kekule.chemEditor.baseEditors.js","widgets/chem/editor/kekule.chemEditor.operations.js","widgets/chem/editor/kekule.chemEditor.editorUtils.js","widgets/chem/editor/kekule.chemEditor.configs.js","widgets/chem/editor/kekule.chemEditor.repositoryData.js","widgets/chem/editor/kekule.chemEditor.repositories.js","widgets/chem/editor/kekule.chemEditor.utilWidgets.js","widgets/chem/editor/kekule.chemEditor.chemSpaceEditors.js","widgets/chem/editor/kekule.chemEditor.nexus.js","widgets/chem/editor/kekule.chemEditor.actions.js","widgets/chem/editor/kekule.chemEditor.trackParser.js","widgets/chem/editor/kekule.chemEditor.objModifiers.js","widgets/chem/editor/modifiers/kekule.chemEditor.styleModifiers.js","widgets/chem/editor/modifiers/kekule.chemEditor.textModifiers.js","widgets/chem/editor/modifiers/kekule.chemEditor.structureModifiers.js","widgets/chem/editor/modifiers/kekule.chemEditor.glyphModifiers.js","chemdoc/issueCheckers/kekule.issueCheckers.js","widgets/chem/editor/issueInspectors/kekule.chemEditor.issueCheckers.js","widgets/chem/editor/issueInspectors/kekule.chemEditor.issueInspectors.js","widgets/advCtrls/objInspector/kekule.widget.objInspector.chemPropEditors.js","widgets/chem/editor/kekule.chemEditor.composers.js"],category:"chemWidget"},webComponent:{requires:["lan","root","common","core","html","io","render","algorithm","widget","chemWidget"],files:["webComponents/kekule.webComponent.base.js","webComponents/kekule.webComponent.widgetWrappers.js"]},algorithm:{requires:["lan","root","common","core"],files:["algorithm/kekule.graph.js","algorithm/kekule.structures.helpers.js","algorithm/kekule.structures.canonicalizers.js","algorithm/kekule.structures.ringSearches.js","algorithm/kekule.structures.aromatics.js","algorithm/kekule.structures.standardizers.js","algorithm/kekule.structures.searches.js","algorithm/kekule.structures.stereos.js"],category:"algorithm"},calculation:{requires:["lan","root","common","core","algorithm"],files:["calculation/kekule.calc.base.js"]},data:{requires:["root"],files:["data/kekule.chemicalElementsData.js","data/kekule.isotopesData.organSet.js","data/kekule.structGenAtomTypesData.js","data/kekule.dataUtils.js"]},emscripten:{requires:["root","common"],files:["_extras/kekule.emscriptenUtils.js"],category:"extra"},openbabel:{requires:["lan","root","core","emscripten","io"],files:["localization/en/kekule.localize.extras.openbabel.en.js","_extras/OpenBabel/kekule.openbabel.base.js","_extras/OpenBabel/kekule.openbabel.io.js","_extras/OpenBabel/kekule.openbabel.structures.js"],category:"extra"},indigo:{requires:["lan","root","core","emscripten","io"],files:["_extras/Indigo/kekule.indigo.base.js","_extras/Indigo/kekule.indigo.io.js","_extras/Indigo/kekule.indigo.structures.js"],category:"extra"},inchi:{requires:["lan","root","core","emscripten","io"],files:["_extras/InChI/kekule.inchi.js"],category:"extra"}},C=["lan","root","localization","localizationData","common"],m=C.concat(["core","html","io","spectroscopy","render","widget","chemWidget","algorithm","calculation","data"]),T=(m.concat(["emscripten","inchi","openbabel","indigo"]),C.concat(["core","io","spectroscopy","algorithm","calculation","data"])),E=[];function _(e){var t=e||m;t=C.concat(t);for(var r=[],i=function(e,t){if(e.indexOf(t)<0){var r=f[t];if(r&&r.requires)for(var n=0,o=r.requires.length;n<o;++n){var a=r.requires[n];i(e,a)}e.push(t)}},n=0,o=t.length;n<o;++n){var a=t[n];i(r,a)}return r}function S(e,t,r){var i=[],n=f[e];if(n&&n.files)if(t){var o=n.minFile||e+".min.js";r&&(o=r+o),i.indexOf(o)<0&&i.push(o)}else i=i.concat(n.files);return i}function O(e,t,r){for(var i=_(e),n=[],o=0,a=i.length;o<a;++o){var s=i[o];n=n.concat(S(s,t,r))}return n}function y(e,t,r,i,n){void 0!==Kekule&&Kekule.LOADED&&(Kekule.LOADED=!1);for(var o=i.modules||[],a=[],s=_(e),l=0,u=s.length;l<u;++l)o.indexOf(s[l])<0&&a.push(s[l]);if(a.length){var d=[];for(l=0,u=s.length;l<u;++l)d=d.concat(S(a[l],t,i.dividedMinSubPath));var c=[],h=r,p=i.fileUrls||[],f=[];for(l=0,u=d.length;l<u;++l){var C=h+d[l];p.indexOf(C)<0&&(f.push(C),c.push(d[l]))}f.push(h+"kekule.loaded.js"),g(f,null,function(e){i.modules=i.modules.concat(a),i.files=i.files.concat(c),i.fileUrls=i.fileUrls.concat(f),n&&n(e)})}else n();return{modules:a,files:c,fileUrls:f}}a||function(){var e,a="object"==typeof _kekule_environment_?_kekule_environment_:"object"==typeof t._kekule_environment_?t._kekule_environment_:null;if(a&&!(e=a.scriptInfo)&&a.scriptPath&&(e={src:a.scriptSrc,path:a.scriptPath,dividedMinSubPath:a.ScriptdividedMinSubPath,modules:a.scriptModules,useMinFile:a.scriptUseMinFile}),!e){if(i){var u=(e=function(e){var t,r=/^(.*\/?)kekule(.min)?\.js(\?.*)?$/,i=/^domloader\=(.+)$/,n=/^min\=(.+)$/,o=/^modules\=(.+)$/,a=/^locals\=(.+)$/,l=/^language\=(.+)$/;if(!s)if(e&&e.currentScript&&e.currentScript.src)(c=decodeURIComponent(e.currentScript.src))&&(t=c.match(/^(.*[\/\\])([^\/\\]*)\.js(\?.*)?$/));else for(var u=e.getElementsByTagName("script"),d=u.length-1;d>=0;--d){var c,h=u[d];if((c=decodeURIComponent(h.src))&&(t=c.match(r)))break}if(t){t[2];var p=t[3];p&&(p=p.substr(1));var g={src:c,path:t[1],paramStr:p,useMinFile:!0};if(g.paramStr){for(var f=g.paramStr.split("&"),C=0,T=f.length;C<T;++C){var _=f[C].match(n);if(_){var S=_[1].toLowerCase(),O=["false","no","f","n"].indexOf(S)<0;g.useMinFile=O}else{var y=f[C].match(o);if(y)var A=y[1].split(",");else{var I=f[C].match(i);if(I)S=I[1].toLowerCase(),O=["false","no","f","n"].indexOf(S)<0,g.forceDomLoader=O;else{var k=f[C].match(a);if(k){var b=k[1].split(",");g.locals=b}else{var v=f[C].match(l);v&&(S=v[1],g.language=S)}}}}}if(g.modules=A||m,g.locals||(g.locals=E),g.locals||g.language){var R=[].concat(g.locals||[]);if(g.language&&R.indexOf(g.language)<0&&R.push(g.language),R.length){var D=g.modules.indexOf("localizationData");for(D<0&&(D=-1),C=0,T=R.length;C<T;++C){var N=R[C];"en"!==N&&g.modules.splice(D+1,0,"localizationData."+N)}}}}return g}return{src:"",path:"",modules:m,useMinFile:!0}}(r)).src&&e.path;u&&(o=!1),!u&&n&&(e.src=this.__filename||"",e.path=(("undefined"!=typeof __dirname?__dirname:"")||".")+"/",o=!0)}else o&&(e={src:this.__filename||"",path:("undefined"!=typeof __dirname?__dirname:"")+"/",modules:i?m:T,useMinFile:!0,nodeModule:"undefined"!=typeof module?module:this.module,nodeRequire:"undefined"!=typeof require?require:this.require});if(o){var c=e.path+f.root.minFile,g=!1;try{g=d.existsSync(c)}catch(e){g=!1}g||(e.useMinFile=!1)}}e.dividedMinSubPath||(e.dividedMinSubPath="mins/"),e.dividedModuleExporterSubPath||(e.dividedModuleExporterSubPath="jsmods/"),e.modules||(e.modules=i?m:T),void 0===e.useMinFile&&(e.useMinFile=!0),e.singleMinBundle=t&&t.__$kekule_single_min_bundle__,e.explicitModules=e.modules;var C=_(e.modules);e.modules=[],e.files=[],e.fileUrls=[],e.allModuleStructures=f,t.__$kekule_load_info__=e,t.__$kekule_scriptfile_utils__={appendScriptFile:h,appendScriptFiles:p,loadModuleScriptFiles:y,getModuleJsFiles:S,getEssentialFiles:O,getEssentialModules:_},e.manualLoadScriptFiles=a&&a.manualLoadScriptFiles,e.singleMinBundle&&void 0!==e.singleMinBundle||a&&a.manualLoadScriptFiles||y(C,e.useMinFile,e.path||"",e,function(t){"undefined"!=typeof exports&&(exports.Kekule=this.Kekule||l.Kekule,exports.Class=this.Class||l.Class,exports.ClassEx=this.ClassEx||l.ClassEx,exports.ObjectEx=this.ObjectEx||l.ObjectEx,exports.DataType=this.DataType||l.DataType,this.Class=exports.Class,this.ClassEx=exports.ClassEx,this.ObjectEx=exports.ObjectEx,this.DataType=exports.DataType,this&&this.Kekule&&(this.Kekule.scriptSrcInfo=e))})}()}(this),function(e){function t(){}function r(e){if(!e)return[];if(e.toArray)return e.toArray();for(var t=e.length||0,r=new Array(t);t--;)r[t]=e[t];return r}"object"==typeof self?e=self:"object"==typeof window&&window.document?e=window:"object"==typeof global&&(e=global);var i={createCore:function(){var e=null,n=r(arguments),o=n.length>1?n[1]:n[0],a=o&&o.CLASS_NAME;if(!n[0]&&n.length>1)throw"Can not create new class"+(a?" "+a:"")+" , base class not found";function s(){this.initialize.apply(this,arguments)}if(Object.isFunction(n[0])&&(e=n.shift()),Object.extend(s,i.Methods),s.superclass=e,s.subclasses=[],e){var l=function(){};l.prototype=e.prototype,s.prototype=new l,e.subclasses.push(s)}for(var u=0;u<n.length;u++)s.addMethods(n[u]);return s.prototype.initialize||(s.prototype.initialize=t),s.prototype.constructor=s,a&&(i._named_classes[a]=s),s},create:function(){return i.createCore.apply(this,arguments)},free:function(e){e.finalize&&e.finalize(),e=null},findClass:function(e,t){var r=i._named_classes[e];if(!r){var n=Object.getCascadeFieldValue(e,t);r=n&&Object.isFunction(n)&&(n.superclass||n.subclasses)?n:null}return r},_named_classes:{}};i.Methods={addMethods:function(e){if(!e)return this;var t=this.superclass&&this.superclass.prototype,r=Object.keys(e);Object.keys({toString:!0}).length||r.push("toString","valueOf");for(var i=function(){},o=0,a=r.length;o<a;o++){var s=r[o],l=e[s],u=Object.isFunction(l);if(t&&u&&"$super"===n.argumentNames(l)[0]){var d=l;(l=function(e){return function(){return(t[e]||i).apply(this,arguments)}}(s).wrap(d)).valueOf=d.valueOf.bind(d),l.toString=d.toString.bind(d)}this.prototype[s]=l}return this}},Object.extend=function(e,t,r,i){if(r||i)for(var n in t){var o=t[n];r&&null==o||(i&&""===o||(e[n]=o))}else for(var n in t)e[n]=t[n];return e},Object.extendEx=function(e,t,r){var i=r||{};for(var n in t){var o=t[n];if((!i.ignoreUnsetValue||null!=o)&&(!i.ignoreEmptyString||""!==o)){var a=e[n];if(!r.preserveExisted||!a){var s=a&&a.constructor&&a.constructor.prototype,l=o&&o.constructor&&o.constructor.prototype;a&&"object"==typeof a&&s===l?Object.extendEx(a,o,r):e[n]=o}}}return e},Object._extendSupportMethods=function(e,t){return Object.extendEx(e,t,{ignoreUnsetValue:!0,preserveExisted:!0})},Object.getCascadeFieldValue=function(t,r){var i,n;if(n=t.length&&t.splice?t:t.split("."),!r)r=e||this;for(var o=0,a=n.length;o<a&&(i=r[n[o]]);++o)r=i;return i},Object.setCascadeFieldValue=function(e,t,r,i){for(var n,o=r,a=0,s=(n=e.length&&e.splice?e:e.split(".")).length;a<s;++a){var l=n[a];if(a===s-1)return o[l]=t,t;var u=o[l];if(!u&&i&&(u={},o[l]=u),!u)return!1;o=u}},Object._inherit=function(e){null===e&&(e={});var t=typeof e;if(!a.isFunctionType(t)&&!a.isObjectType(t))throw TypeError();function r(){}return r.prototype=e,new r},Object.create||(Object.create=Object._inherit),Object.copyValues=function(e,t,r){if(r){for(var i=0,n=r.length;i<n;++i){var o=r[i],a=t[o];void 0!==a&&(e[o]=a)}return e}return Object.extend(e,t)},Object._extendSupportMethods(Object,{keys:function(e){var t=[];for(var r in e)t.push(r);return t},isFunction:function(e){return"function"==typeof e},isUndefined:function(e){return void 0===e}}),Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t});var n={argumentNames:function(e){var t=((e.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)||[])[1]||"").replace(/\s+/g,"").split(",");return 1!=t.length||t[0]?t:[]}};Object._extendSupportMethods(Function.prototype,{argumentNames:function(){var e=this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1].replace(/\s+/g,"").split(",");return 1!=e.length||e[0]?e:[]},wrap:function(e){var t=this;return function(){return e.apply(this,[t.bind(this)].concat(r(arguments)))}},methodize:function(){if(this._methodized)return this._methodized;var e=this;return this._methodized=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(this),e.apply(null,t)}},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var e=this,t=r(arguments),i=t.shift();return function(){return e.apply(i,t.concat(r(arguments)))}},delay:function(){var t=this,i=r(arguments),n=i.shift();return e.setTimeout(function(){return t.apply(t,i)},n)},defer:function(){var t=this,i=r(arguments);i.shift();return e.setTimeout(function(){return t.apply(t,i)},10)}}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){t||(t=0);var r=this.length;for(t<0&&(t=r+t);t<r;t++)if(this[t]===e)return t;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(e,t){t=isNaN(t)?this.length:(t<0?this.length+t:t)+1;var r=this.slice(0,t).reverse().indexOf(e);return r<0?r:t-r-1}),Array.prototype.map&&(Array.prototype.map=function(e){var t,r,i;if(null==this)throw new TypeError("this is null or not defined");var n=Object(this),o=n.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(t=arguments[1]),r=new Array(o),i=0;i<o;){var a,s;i in n&&(a=n[i],s=e.call(t,a,i,n),r[i]=s),i++}return r}),Object._extendSupportMethods(String.prototype,{gsub:function(e,t){for(var r="",i=this;i.length>0;)void 0===i.match(e)?(r+=i.slice(0,(void 0).index),r+=t,i=i.slice((void 0).index+(void 0)[0].length)):(r+=i,i="");return r},sub:function(e,t,r){return r=Object.isUndefined(r)?1:r,this.gsub(e,function(e){return--r<0?e[0]:t(e)})},scan:function(e,t){return this.gsub(e,t),String(this)},truncate:function(e,t){return e=e||30,t=Object.isUndefined(t)?"...":t,this.length>e?this.slice(0,e-t.length)+t:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var e=new RegExp(Prototype.ScriptFragment,"img"),t=new RegExp(Prototype.ScriptFragment,"im");return(this.match(e)||[]).map(function(e){return(e.match(t)||["",""])[1]})},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br />")},unescapeHTML:function(){return this.replace(/\<br \/\>/g,"\n").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},toQueryParams:function(e){var t=this.strip().match(/([^?#]*)(#.*)?$/);return t?t[1].split(e||"&").inject({},function(e,t){if((t=t.split("="))[0]){var r=decodeURIComponent(t.shift()),i=t.length>1?t.join("="):t[0];null!=i&&(i=decodeURIComponent(i)),r in e?(Object.isArray(e[r])||(e[r]=[e[r]]),e[r].push(i)):e[r]=i}return e}):{}},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(e){return e<1?"":new Array(e+1).join(this)},camelize:function(){var e=this.split("-"),t=e.length;if(1==t)return e[0];for(var r="-"==this.charAt(0)?e[0].charAt(0).toUpperCase()+e[0].substring(1):e[0],i=1;i<t;i++)r+=e[i].charAt(0).toUpperCase()+e[i].substring(1);return r},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},capitalizeFirst:function(){return this.charAt(0).toUpperCase()+this.substring(1)},underscore:function(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()},dasherize:function(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/-/g,"-").toLowerCase()},inspect:function(e){var t=this.gsub(/[\x00-\x1f\\]/,function(e){var t=String.specialChar[e[0]];return t||"\\u00"+e[0].charCodeAt().toPaddedString(2,16)});return e?'"'+t.replace(/"/g,'\\"')+'"':"'"+t.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(!0)},unfilterJSON:function(e){return this.sub(e||Prototype.JSONFilter,"#{1}")},isJSON:function(){var e=this;return!e.blank()&&(e=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""),/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(e))},include:function(e){return this.indexOf(e)>-1},startsWith:function(e){return 0===this.indexOf(e)},endsWith:function(e){var t=this.length-e.length;return t>=0&&this.lastIndexOf(e)===t},empty:function(){return""==this},blank:function(){return/^\s*$/.test(this)},interpolate:function(e,t){return new Template(this,t).evaluate(e)}}),Object._extendSupportMethods(String.prototype,{upperFirst:function(){return this.charAt(0).toUpperCase()+this.substring(1)},format:function(){for(var e=this,t=0;t<arguments.length;t++){var r=new RegExp("\\{"+t+"\\}","gi");e=e.replace(r,arguments[t])}return e},trim:function(){return this.replace(/^\s*|\s*$/g,"")},ltrim:function(){return this.replace(/^\s+/,"")},rtrim:function(){return this.replace(/\s+$/,"")},trimLeft:function(){return this.ltrim()},trimRight:function(){return this.rtrim()},pad:function(e,t,r){for(var i=t||" ",n=[],o=0,a=e-this.length;o<a;++o)n.push(i);return r?this+n.join(""):n.join("")+this},lpad:function(e,t){return this.pad(e,t,!1)},rpad:function(e,t){return this.pad(e,t,!0)},reverse:function(){for(var e=[],t=this.length-1;t>=0;--t)e.push(this.charAt(t));return e.join("")},toCharArray:function(){for(var e=[],t=0,r=this.length;t<r;++t)e.push(this.charAt(t));return e},hyphenize:function(e){e||(e="-");for(var t=this.length,r=[],i=0;i<t;++i){var n=this.charAt(i);0!==i&&n>="A"&&n<="Z"?r.push(e+n.toLowerCase()):r.push(n)}return r.join("")}});var o={STRUE:"$TRUE",SFALSE:"$FALSE",SUNDEFINED:"$UNDEFINED",SNULL:"$NULL",SNAN:"$NAN",SPOSITIVE:"+",SNEGATIVE:"-",SDATEPREFIX:"@",isAllDigitalChar:function(e){for(var t=0,r=e.length;t<r;++t){var i=e.charAt(t);if(!(i>="0"&&i<="9")&&"."!=i)return!1}return!0},isNumbericStr:function(e){var t=Number(e);return!isNaN(t)},serializeValue:function(e,t){var r=t||[],i=a.getType(e);if(r.indexOf(i)>=0)return e.toString();if(null===e)return o.SNULL;if(void 0===e)return o.SUNDEFINED;if(e!=e)return o.SNAN;switch(i){case"boolean":return e?o.STRUE:o.SFALSE;case"number":case a.INT:case a.FLOAT:return(e>=0?o.SPOSITIVE:"")+e;case a.DATE:return o.SDATEPREFIX+e.toString();default:return e.toString()}},deserializeValue:function(e,t){if("string"!=typeof e)return e;switch(e){case o.STRUE:return!0;case o.SFALSE:return!1;case o.SNULL:return null;case o.SUNDEFINED:return;case o.SNAN:return NaN;default:if(t){if(!e&&[a.NUMBER,a.INT,a.FLOAT].indexOf(t)>=0)return;switch(t){case a.FLOAT:return parseFloat(e);case a.INT:return parseInt(e);case"number":return parseFloat(e);case"boolean":return!!e;default:return e}}else{switch(e.charAt(0)){case o.SPOSITIVE:case o.SNEGATIVE:var r=e.substring(1);return o.isNumbericStr(r)?parseFloat(e):e;case o.SDATEPREFIX:r=e.substr(1);try{var i=new Date(r);return isNaN(i.getTime())?e:i}catch(t){return e}default:return e}}}}};Object.extend(Date.prototype,{copyFrom:function(e){this.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),this.setTime(e.getTime())}}),Date.now||(Date.now=function(){return(new Date).getTime()}),Math.sqr||(Math.sqr=function(e){return e*e}),Math.sign||(Math.sign=function(e){return e>0?1:e<0?-1:0}),Math.log10||(Math.log10=function(e){return Math.log(e)*Math.LOG10E}),void 0===e.Node&&(e.Node=function(){}),e.Node.ELEMENT_NODE||Object.extend(e.Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}),i.PropertyScope={DEFAULT:3,PUBLISHED:3,PUBLIC:2,PRIVATE:1},i.PropList=function(){this.props=[]},i.PropList.prototype={addProperty:function(e,t){var r;return t||(t={}),(r=this.getPropInfo(e))||(r={},this.props.push(r)),void 0===(r=Object.extend(r,t)).serializable&&(r.serializable=!0),r.name=e,r},removeProperty:function(e){var t=this.indexOf(e);t>=0&&this.props.splice(t,1)},removePropAt:function(e){e>=0&&(this.props[e]&&this.props.splice(e,1))},getLength:function(){return this.props.length},indexOf:function(e){for(var t=0,r=this.props.length;t<r;++t)if(this.props[t].name===e)return t;return-1},getPropInfoAt:function(e){return e>=0?this.props[e]:null},getPropInfo:function(e){var t=this.indexOf(e);return this.getPropInfoAt(t)},hasProperty:function(e){return this.indexOf(e)>=0},clear:function(){this.props.clear()},clone:function(){var e=new i.PropList;return e.props=this.props.slice(),e},appendList:function(e){for(var t=0,r=e.props.length;t<r;++t)this.props.push(e.props[t])}},i.PropList.prototype.constructor=i.PropList,i.EventHandlerList=function(){this.handlers=[],this._$flag_="KekuleEventList"},i.EventHandlerList.prototype={add:function(e,t){t||(t=null),this.handlers.push({thisArg:t,handler:e})},remove:function(e,t){var r=this.indexesOf(e,t);if(r.length>0)for(var i=r.length-1;i>=0;--i)this.removeAt(r[i])},removeAt:function(e){for(var t=e,r=this.handlers.length;t<r;++t)this.handlers[t]=this.handlers[t+1];this.handlers.length=this.handlers.length-1},clear:function(){this.handlers=[]},getHandlerInfo:function(e){return this.handlers[e]},indexOf:function(e,t){for(var r=0,i=this.handlers.length;r<i;++r)if(this.handlers[r].handler==e){if(void 0!==t&&this.handlers[r].thisArg===t)return r;if(void 0===t)return r}return-1},indexesOf:function(e,t){for(var r=[],i=0,n=this.handlers.length;i<n;++i)this.handlers[i].handler==e&&(void 0!==t&&this.handlers[i].thisArg===t?r.push(i):void 0===t&&r.push(i));return r},getLength:function(){return this.handlers.length}},i.EventHandlerList.constructor=i.EventHandlerList;var a={UNKNOWN:null,VARIANT:null,PRIMARY:"primary",UNDEFINED:"undefined",BOOL:"boolean",BOOLEAN:"boolean",NUMBER:"number",INT:"int",INTEGER:"int",FLOAT:"float",STRING:"string",ARRAY:"array",FUNCTION:"function",DATE:"date",HASH:"object",OBJECT:"object",OBJECTEX:"objectex",CLASS:"class",isSimpleType:function(e){return e==a.STRING||e==a.NUMBER||e==a.INT||e==a.FLOAT||e==a.BOOL||e==a.UNDEFINED||e==a.PRIMARY},isComplexType:function(e){return!(a.isSimpleType(e)||a.isFunctionType(e))},isFunctionType:function(e){return e==a.FUNCTION},isObjectType:function(e){return e==a.OBJECT},isDateType:function(e){return e==a.DATE},isObjectExType:function(e){var t=a.isComplexType(e)&&!a.isObjectType(e)&&!a.isDateType(e);if(t){var r=l.findClass(e);t=r&&l.isOrIsDescendantOf(r,u)}return t},getType:function(e){var t=typeof e;switch(t){case"undefined":return a.UNDEFINED;case"function":return a.FUNCTION;case"boolean":return a.BOOL;case"string":return a.STRING;case"number":return Math.floor(e)==e?a.INT:a.FLOAT;case"object":return this.isDateValue(e)?a.DATE:a.isArrayValue(e)?a.ARRAY:l.isClass(e)?a.CLASS:a.isObjectExValue(e)&&e.getClassName?e.getClassName():a.OBJECT;default:return t}},isSimpleValue:function(e){return a.isSimpleType(typeof e)},isUndefinedValue:function(e){return void 0===e},isNullValue:function(e){return null===e},isFunctionValue:function(e){return"function"==typeof e},isObjectValue:function(e){return!!e&&("object"==typeof e&&!a.isArrayValue(e)&&!a.isDateValue(e))},isDateValue:function(e){return!!e&&("object"==typeof e&&void 0!==e.getFullYear)},isArrayValue:function(e){return!!e&&("object"==typeof e&&void 0!==e.length)},isObjectExValue:function(e){return e instanceof u},createInstance:function(e){switch(e){case a.UNDEFINED:return;case a.DATE:return new Date;case a.ARRAY:return new Array;case a.OBJECT:return new Object;case a.FUNCTION:return function(){};default:return new(l.findClass(e.capitalizeFirst()))}}},s=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}(),l={isClass:function(e){return!!e&&!(!e.superclass&&!e.subclasses)},findClass:function(t,r){return i.findClass(t,r||e)},getClassName:function(e){return e?e.prototype.CLASS_NAME:null},getClassLocalName:function(e){var t=l.getClassName(e),r=t.lastIndexOf(".");return r>=0?t.substring(r+1):t},getPrototype:function(e){return e.prototype},getSuperClass:function(e){return e.superclass||e.constructor.superclass},getSuperClassPrototype:function(e){return e.superclass?e.superclass.prototype:null},_getCommonSuperClass2:function(e,t){for(var r=e;r&&!l.isOrIsDescendantOf(t,r);)r=l.getSuperClass(r);return r},getCommonSuperClass:function(e){if(!e||!e.length)return null;var t=e[0].getClass?e[0].getClass():null;if(!t)return null;for(var r=1,i=e.length;r<i;++r){var n=e[r].getClass?e[r].getClass():null;if(!n)return null;t=l._getCommonSuperClass2(t,n)}return t},isDescendantOf:function(e,t){for(var r=l.getSuperClass(e);r&&r!==t;)r=l.getSuperClass(r);return!!r},isOrIsDescendantOf:function(e,t){return e===t||l.isDescendantOf(e,t)},isOrIsDescendantOfClasses:function(e,t){for(var r=0,i=t.length;r<i;++r)if(l.isOrIsDescendantOf(e,t[r]))return!0;return!1},_ensurePropertySystem:function(e){var t=l.getPrototype(e);if(t&&!t.hasOwnProperty("properties")){var r=l.getSuperClass(e);r&&l._ensurePropertySystem(r),l._createPropertyList(e),l._remapPropGetters(e),t.hasOwnProperty("initProperties")&&t.initProperties.apply(t)}},_createPropertyList:function(e){l.getPrototype(e).hasOwnProperty("properties")||(l.getPrototype(e).properties=new i.PropList)},_remapPropGetters:function(e,t){for(var r=l.getPrototype(e),i=t||Object.getOwnPropertyNames(r),n=0,o=i.length;n<o;++n){var a=i[n];if(a.length>5&&a.startsWith("doGet")){var u=r[a];if("function"==typeof u){var d=a.charAt(5).toLowerCase()+a.substr(6);if(r.hasDirectProperty(d))continue;var c=l.getPropInfo(e,d);if(c&&c.getter)if(r["get"+d.capitalizeFirst()]=u,s){var h=Object.extend({},c.descriptor);h.get=u;try{Object.defineProperty(r,d,h)}catch(e){throw e}}}}}},getOwnPropList:function(e){var t=l.getPrototype(e);return t?(t._initPropertySystem(),t.properties):null},getAllPropList:function(e){var t,r=l.getSuperClassPrototype(e);return r?(t=r.getAllPropList().clone()).appendList(l.getOwnPropList(e)):t=l.getOwnPropList(e),t},getPropListOfScopes:function(e,t){var r,n=function(e,t){var r=l.getOwnPropList(e).clone();if(r)for(var n=r.getLength()-1;n>=0;--n){var o=r.getPropInfoAt(n).scope||i.PropertyScope.DEFAULT;t.indexOf(o)<0&&r.removePropAt(n)}return r},o=l.getSuperClass(e);return o?(r=l.getPropListOfScopes(o,t).clone()).appendList(n(e,t)):r=n(e,t),r},defineProp:function(e,t,r){return l._ensurePropertySystem(e),l.getPrototype(e).defineProp(t,r)},defineProps:function(e,t){l._ensurePropertySystem(e);for(var r=l.getPrototype(e),i=0,n=t.length;i<n;++i){var o=t[i],a=o.name,s=o;r.defineProp(a,s)}},getPropInfo:function(e,t,r){return l.getPrototype(e).getPropInfo(t,r)},defineEvent:function(e,t){return l.getPrototype(e).defineEvent(t)},getUnusedMethodName:function(e,t,r){for(var i=r||0,n=l.getPrototype(e),o=t+Number(i).toString();n[o];)++i,o=t+Number(i).toString();return o},extendMethod:function(e,t,r){var i=l.getPrototype(e),n=i[t],o=l.getUnusedMethodName(e,"__$changed$_"+t+"__");i[o]=n;var a,s=(a=o,function(){return i[a].apply(this,arguments)}).wrap(r);i[t]=s,s.valueOf=r.valueOf.bind(r),s.toString=r.toString.bind(r)},extendMethods:function(e,t){for(var r=Object.keys(t),i=0,n=r.length;i<n;++i){var o=r[i],a=t[o];"function"==typeof a&&l.extendMethod(e,o,a)}},extend:function(e,t){var r=l.getPrototype(e),i=l.getSuperClassPrototype(e),o=Object.keys(t);Object.keys({toString:!0}).length||o.push("toString","valueOf");for(var a=0,s=o.length;a<s;a++){var u=o[a],d=t[u];if("function"==typeof d){var c=n.argumentNames(d),h=c[0];if("$origin"==h){var p=d,g=r[u],f=l.getUnusedMethodName(e,"__$changed$_"+u+"__");r[f]=g,(d=function(e){return function(){return r[e].apply(this,arguments)}}(f).wrap(p)).valueOf=p.valueOf.bind(p),d.toString=p.toString.bind(p),c.shift(),h=c.first()}if("$super"==h){p=d;(d=function(e){return function(){return i[e].apply(this,arguments)}}(u).wrap(p)).valueOf=p.valueOf.bind(p),d.toString=p.toString.bind(p)}}r[u]=d}return l._remapPropGetters(e,o),e}},u=i.create({CLASS_NAME:"ObjectEx",EVENT_HANDLERS_FIELD:"__$__k__eventhandlers__$__",initialize:function(){this._initPropertySystem(),this._updateStatus=0,this._childChangeEventSuppressed=!1,this._modifiedProps=[],this._finalized=!1,this.beginUpdate();try{this.initPropValues()}finally{this.endUpdate()}this.afterInitialization()},afterInitialization:function(){},finalize:function(){this._finalized||(this.doFinalize(),this.invokeEvent("finalize",{obj:this}),this[this.EVENT_HANDLERS_FIELD]=null,this._finalized=!0)},doFinalize:function(){},initProperties:function(){this.defineProp("enablePropValueGetEvent",{dataType:a.BOOL,serializable:!1,scope:i.PropertyScope.PUBLIC}),this.defineProp("enablePropValueSetEvent",{dataType:a.BOOL,serializable:!1,scope:i.PropertyScope.PUBLIC}),this.defineProp("enableObjectChangeEvent",{dataType:a.BOOL,serializable:!1,scope:i.PropertyScope.PUBLIC}),this.defineProp("bubbleEvent",{dataType:a.BOOL,serializable:!1,scope:i.PropertyScope.PUBLIC}),this.defineProp("suppressChildChangeEventInUpdating",{dataType:a.BOOL,serializable:!1,scope:i.PropertyScope.PUBLIC}),this.defineProp("eventHandlers",{dataType:a.HASH,serializable:!1,scope:i.PropertyScope.PRIVATE,setter:null,getter:function(){var e=this[this.EVENT_HANDLERS_FIELD];return e||(e={},this[this.EVENT_HANDLERS_FIELD]=e),e}})},initPropValues:function(){},getHigherLevelObj:function(){return null},saved:function(e){},allSaved:function(e){},loaded:function(e){},allLoaded:function(e){},_initPropertySystem:function(){l._ensurePropertySystem(this.getClass())},_createPropertyList:function(){l._createPropertyList(this.getClass())},_remapPropGetters:function(){l._remapPropGetters(this.getClass())},getClass:function(){return this.constructor},getSuperClass:function(){return this.getClass().superclass},getClassName:function(){return this.getPrototype().CLASS_NAME},getClassLocalName:function(){return l.getClassLocalName(this.getClass())},getSerializationName:function(){return this.getClassName()},getPrototype:function(){return this.prototype?this.prototype:this.constructor.prototype},getSuperClassPrototype:function(){return this.constructor&&this.constructor.superclass?this.constructor.superclass.prototype:null},$super:function(e,t){var r=this.getSuperClassPrototype();return e?this.tryCallSuper.apply(this,arguments):r},applySuper:function(e,t,r){var i=this.__getLastSuperMethodCallTarget__(e),n=this.__getMethodBelongedPrototype__(e,i),o=this.__getMethodBelongedPrototype__(e,i.getSuperClassPrototype());o&&o===n&&(o=this.__getMethodBelongedPrototype__(e,o.getSuperClassPrototype()));var a=o&&o[e];if(a){var s;try{this.__pushSuperMethodCallTargetStack__(e,o),s=t?a.apply(this,t):a.apply(this)}finally{this.__popSuperMethodCallTargetStack__(e)}return s}if(!r)throw"Super method not found: "+e},tryApplySuper:function(e,t){return this.applySuper(e,t,!0)},tryCallSuper:function(){var e=r(arguments),t=e.shift();return this.tryApplySuper(t,e)},__getMethodBelongedPrototype__:function(e,t){if(!t)return null;if(t.hasOwnProperty(e))return t;var r=t.getSuperClassPrototype&&t.getSuperClassPrototype();return r&&r.__getMethodBelongedPrototype__?r.__getMethodBelongedPrototype__(e,r):null},__getSuperMethodCallTargetStack__:function(e){var t=this.__$superMethodCallTargetStacks__;t||(t={},this.__$superMethodCallTargetStacks__=t);var r=t[e];return r||(r=[],t[e]=r),r},__getLastSuperMethodCallTarget__:function(e){var t=this.__getSuperMethodCallTargetStack__(e);return t.length?t[t.length-1]:this.getPrototype()},__pushSuperMethodCallTargetStack__:function(e,t){this.__getSuperMethodCallTargetStack__(e).push(t)},__popSuperMethodCallTargetStack__:function(e){var t=null,r=this.__$superMethodCallTargetStacks__,i=r&&r[e];if(i){t=i.pop();i.length||delete r[e]}return t},__changeClass__:function(e){var t=l.getPrototype(e);return this.prototype=t,this.__proto__=t,this.constructor=e,this.objectChange(["__proto__"]),this},getOwnPropList:function(){return this._initPropertySystem(),this.getPrototype().properties},getAllPropList:function(){var e,t=this.getSuperClassPrototype();return t?(e=t.getAllPropList().clone()).appendList(this.getOwnPropList()):e=this.getOwnPropList().clone(),e},getPropListOfScopes:function(e){return l.getPropListOfScopes(this.getClass(),e)},getPropInfoHashKey:function(e){return u._PROPINFO_HASHKEY_PREFIX+e},getDefPropStoreFieldName:function(e){return u._PROP_STOREFIELD_PREFIX+e},defineProp:function(e,t){var r;void 0===(r=t?Object.extend({},t):{}).serializable&&(r.serializable=!0),r.storeField=this.getDefPropStoreFieldName(e);var i,n,o=this.getOwnPropList().addProperty(e,r);if(null!==r.getter&&!1!==r.getter&&(i=this.createPropGetter(o,r.getter),o.getter=i.doGetterName),null!==r.setter&&!1!==r.setter&&(n=this.createPropSetter(o,r.setter),o.setter=n.doSetterName),this[this.getPropInfoHashKey(e)]=o,s){var a={enumerable:r.enumerable,configurable:!1};void 0===a.enumerable&&(a.enumerable=!0),i&&(a.get=this[i.getterName]),n&&(a.set=this[n.setterName]),o.descriptor=a;try{Object.defineProperty(this,e,a)}catch(e){throw e}}return o},createPropGetter:function(e,t){var r=e.name.toString().upperFirst(),i="get"+r,n="doGet"+r,o=this[n];if(!o){var a=e.storeField;o=t||function(){return this[a]},this.getPrototype()[n]=o}return this.getPrototype()[i]=o,{getterName:i,doGetterName:n}},createPropSetter:function(e,t){var r=e.name.toString(),i=r.upperFirst(),n="set"+i,o="doSet"+i,a=this[o];if(!this[o]){var s=e.storeField;a=t||function(e){this[s]=e},this.getPrototype()[o]=a}return this.getPrototype()[n]=function(){var e=arguments[0];return this[o].apply(this,arguments),this.notifyPropSet(r,e),this},{setterName:n,doSetterName:o}},hasProperty:function(e){return null!=this.getPropInfo(e)},hasDirectProperty:function(e){return null!=this.getPropInfo(e,!0)},getPropInfo:function(e,t){var r,i=e||"";t||(r=this[this.getPropInfoHashKey(i)||""]);if(!r&&!(r=this.getOwnPropList().getPropInfo(i))&&!t){var n=this.getSuperClassPrototype();r=n&&n.getPropInfo?n.getPropInfo(i):null}return r},getPropertyDataType:function(e){var t=this.getPropInfo(e);return t?t.dataType:null},isPropertySerializable:function(e){var t=this.getPropInfo(e),r=t&&t.serializable;return void 0===r||!!r},getPropStoreFieldValue:function(e){return this[u._PROP_STOREFIELD_PREFIX+e]},getPropValue:function(e){var t,r=this.getPropInfo(e);if(r){if(r.getter){var i=Array.prototype.slice.call(arguments);i.shift(),t=this[r.getter].apply(this,i)}else t=this[r.storeField];return t}return null},getCascadePropValue:function(e){for(var t,r,i=this,n=0,o=(r=e.length&&e.splice?e:e.split(".")).length;n<o&&(t=i.getPropValue(r[n]));++n)i=t;return t},getPropValues:function(e){var t={};if(a.isArrayValue(e))for(var r=0,i=e.length;r<i;++r){t[n=e[r]]=this.getPropValue(n)}else if(a.isObjectValue(e))for(var n in e)e.hasOwnProperty(n)&&"function"!=typeof e[n]&&(t[n]=this.getPropValue(n));return t},setPropStoreFieldValue:function(e,t){this[u._PROP_STOREFIELD_PREFIX+e]=t},setPropValue:function(e,t,r){var i=this.getPropInfo(e);return i&&(i.setter?this[i.setter].apply(this,[t]):r&&(this[i.storeField]=t),this.notifyPropSet(e,t)),this},setPropValueX:function(){var e=Array.prototype.slice.call(arguments),t=e.shift(),r=this.getPropInfo(t);return r&&(r.setter&&this[r.setter].apply(this,e),this.notifyPropSet(t,this.getPropValue(t))),this},setPropValues:function(e,t){for(var r in e)if(e.hasOwnProperty(r)&&this.hasProperty(r)){var i=e[r];this.setPropValue(r,i,t)}return this},setCascadePropValue:function(e){for(var t,r=Array.prototype.slice.call(arguments),i=this,n=0,o=(t=(e=r.shift()).length&&e.splice?e:e.split(".")).length-1;n<o&&(i=i.getPropValue(t[n]));++n);return i&&(r.unshift(t[o]),i.setPropValueX.apply(i,r)),this},_isPropGetOrSetEvent:function(e){return"propValueGet"==e||"propValueSet"==e},notifyPropSet:function(e,t,r){this.isUpdating()?this._modifiedProps.indexOf(e)<0&&this._modifiedProps.push(e):this._isPropGetOrSetEvent(e)||this.isEventPropName(e)||(this.doPropChanged(e,t),this.getPropStoreFieldValue("enablePropValueSetEvent")&&this.invokeEvent("propValueSet",{propName:e,propValue:t}),r||this.objectChange([e]))},objectChange:function(e){var t=[].concat(e);if(this.doObjectChange(e),this.getEnableObjectChangeEvent()){var r=t.indexOf("enableObjectChangeEvent");r>=0&&t.splice(r,1),this.invokeEvent("change",{changedPropNames:t})}},doObjectChange:function(e){},doPropChanged:function(e,t){},defineEvent:function(e){},eventNameToPropName:function(e){return"__event_"+e},isEventPropName:function(e){return"string"==typeof e&&e.indexOf("__event_")>=0},isEventHandlerList:function(e){return e&&"object"==typeof e&&e instanceof i.EventHandlerList},getEventHandlerList:function(e){var t=this.getEventHandlers(),r=t[e];return r||(r=new i.EventHandlerList,t[e]=r),r},addEventListener:function(e,t,r){var i=this.getEventHandlerList(e);return this.isEventHandlerList(i)?("change"===e&&this.setEnableObjectChangeEvent(!0),i.add(t,r)):null},addOnceEventListener:function(e,t,r){var i=this,n=function(o){i.removeEventListener(e,n,r),t(o)};return this.addEventListener(e,n,r)},removeEventListener:function(e,t,r){var i=this.getEventHandlerList(e);if(this.isEventHandlerList(i))return i.remove(t,r)},on:function(e,t,r){return this.addEventListener(e,t,r)},once:function(e,t,r){return this.addOnceEventListener(e,t,r)},off:function(e,t,r){return this.removeEventListener(e,t,r)},invokeEvent:function(e,t){t?(t.name=e,t.target=this):t={name:e,target:this},t.stopImmediatePropagation||(t.stopImmediatePropagation=this._eventStopImmediatePropagation),t.stopPropagation||(t.stopPropagation=this._eventCancelBubble),t.preventDefault||(t.preventDefault=this._eventPreventDefault),this.dispatchEvent(e,t),this.dispatchEvent("eventInvoke",{event:t,target:this,name:"eventInvoke"})},_eventStopImmediatePropagation:function(){this._stopImmediatePropagation=!0,this._cancelBubble=!0},_eventCancelBubble:function(){this._cancelBubble=!0},_eventPreventDefault:function(){this._preventDefault=!0},relayEvent:function(e,t){t.currentTarget=this,"change"===e&&this.getSuppressChildChangeEventInUpdating()&&this.isUpdating()?this._childChangeEventSuppressed=!0:this.dispatchEvent(e,t)},dispatchEvent:function(e,t){for(var r=this.getEventHandlerList(e),i=0,n=r.getLength();i<n&&!t._stopImmediatePropagation;++i){var o=r.getHandlerInfo(i);o.handler.apply(o.thisArg,[t])}if(!t._cancelBubble&&this.getBubbleEvent()){var a=this.getHigherLevelObj();a&&a.relayEvent&&a.relayEvent(e,t)}},stopEventPropagation:function(e){e.cancelBubble=!0},overwriteMethod:function(e,t){var r=this,i=this[e];return this[e]=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(i&&i.bind(r)),t.apply(r,e)},this},assign:function(e){return e.assignTo(this)},assignTo:function(e){var t={};this.saveObj(t,"json"),e.loadObj(t,"json")},clone:function(){var e=new(this.getClass());return this.assignTo(e),e},beginUpdate:function(){this.doBeginUpdate()},doBeginUpdate:function(){++this._updateStatus},endUpdate:function(){if(--this._updateStatus,this.checkUpdateStatus(),!this.isUpdating()){var e=this._modifiedProps||[];this._modifiedProps=[],this._childChangeEventSuppressed&&(e.push("[children]"),this._childChangeEventSuppressed=!1),this.doEndUpdate(e)}},doEndUpdate:function(e){if(e.length){if(this.getPropStoreFieldValue("enablePropValueSetEvent"))for(var t=0,r=e.length;t<r;++t){var i=e[t],n=this.getPropValue(i);this.notifyPropSet(i,n,!0)}this.objectChange(e)}},isUpdating:function(){return this._updateStatus>0},isPropUpdated:function(e){return this._modifiedProps.indexOf(e)>=0},checkUpdateStatus:function(){this._updateStatus<=0&&(this._updateStatus=0)},copyPropsTo:function(e){for(var t=this.getAllPropList(),r=0,i=t.getLength();r<i;++r){var n=t.getPropInfoAt(r).name;if(e.hasProperty(n)){var o=this.getPropValue(n);e.setPropValue(n,o,!0)}}}});u._PROPINFO_HASHKEY_PREFIX="__$propInfo__",u._PROP_STOREFIELD_PREFIX="__$__k__p__",e.Class=i,e.ClassEx=l,e.ObjectEx=u,e.DataType=a,a.StringUtils=o}(this),function(e){"use strict";var t={parse:function(e){return JSON.parse(e)},serializeToStr:function(e,t){return t&&t.prettyPrint?JSON.stringify(e,null,t.indentSpaces||2):JSON.stringify(e)}},r={DOM_PARSER:null,DOM_IMPLEMENTATION:null,XML_SERIALIZER:null,DEF_INCLUDE_TAG_NAME:"include",DEF_INCLUDE_SRC_ATTRIB:"src",DEF_LOAD_TIMEOUT:2e4,DEF_BYPASS_ROOT_ELEM:!0,DEF_SERIALIZE_TO_JSCODE_VARNAME:"__xmlStr__",FILE_EXT_XML:".xml",FILE_EXT_XML_JS_WRAPPER:".xmljs",newDocument:function(e,t){if(e||(e=""),t||(t=""),r.DOM_IMPLEMENTATION)return i=(new r.DOM_IMPLEMENTATION).createDocument(t,e,null);if("undefined"!=typeof document){if(document.implementation&&document.implementation.createDocument)return i=document.implementation.createDocument(t,e,null);if("undefined"!=typeof ActiveXObject){var i=new ActiveXObject("MSXML2.DOMDocument");if(e){var n="",o=e,a=e.indexOf(":");-1!=a&&(n=e.substring(0,a),o=e.substring(a+1));var s="<"+(n?n+":":"")+o+(t?(n?" xmlns:":" xmlns")+n+'="'+t+'"':"")+"/>";i.loadXML(s)}return i}}},parse:function(e){if(r.DOM_PARSER)return(new r.DOM_PARSER).parseFromString(e,"application/xml");if("undefined"!=typeof document){if("undefined"!=typeof DOMParser)return(new DOMParser).parseFromString(e,"application/xml");if("undefined"!=typeof ActiveXObject){var t=r.newDocument();return t.loadXML(e),t}var i="data:text/xml;charset=utf-8,"+encodeURIComponent(e),n=new XMLHttpRequest;return n.open("GET",i,!1),n.send(null),n.responseXML}},load:function(e,t,i){return r.loadHelper.loadSimple(e,t,(i||{}).timeout)},loadHelper:{loadSimple:function(e,t,i){var n=null!=t;if(null==i&&(i=r.DEF_LOAD_TIMEOUT),document.implementation&&document.implementation.createDocument){var o=new XMLHttpRequest,a=null;i&&(a=setTimeout(function(){s(null,!1)},i));var s=function(e,r){a&&clearTimeout(a),t&&t(e,r)};n&&(o.onreadystatechange=function(){if(4==o.readyState){var e=o.responseXML;e&&e.documentElement?s(e,!0):s(null,!1)}});try{o.open("get",e,n),o.send(null)}catch(e){s(null,!1)}var l=o.responseXML;return l&&l.documentElement?l:null}return r.loadHelper.loadSimpleViaDoc(e,t)},loadSimpleViaDoc:function(e,t){var i=null!=t,n=r.newDocument("dummy_dummy_dummy_dummy");return n.async=i,i&&(n.onreadystatechange=function(){4==n.readyState&&(n.documentElement&&"dummy_dummy_dummy_dummy"!=n.documentElement.tag?t(n,!0):t(n,!1))}),n.load(e),n}},serializeNode:function(e,t){if(t&&t.prettyPrint)return r.serializeNodePretty(e);if(r.XML_SERIALIZER)return(new r.XML_SERIALIZER).serializeToString(e);if("undefined"!=typeof XMLSerializer)return(new XMLSerializer).serializeToString(e);if(e.xm