var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(W,Z,Y){W instanceof String&&(W=String(W));for(var aa=W.length,ba=0;ba<aa;ba++){var wa=W[ba];if(Z.call(Y,wa,ba,W))return{i:ba,v:wa}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(W,Z,Y){if(W==Array.prototype||W==Object.prototype)return W;W[Z]=Y.value;return W};$jscomp.getGlobal=function(W){W=["object"==typeof globalThis&&globalThis,W,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var Z=0;Z<W.length;++Z){var Y=W[Z];if(Y&&Y.Math==Math)return Y}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(W,Z){var Y=$jscomp.propertyToPolyfillSymbol[Z];if(null==Y)return W[Z];Y=W[Y];return void 0!==Y?Y:W[Z]};
$jscomp.polyfill=function(W,Z,Y,aa){Z&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(W,Z,Y,aa):$jscomp.polyfillUnisolated(W,Z,Y,aa))};$jscomp.polyfillUnisolated=function(W,Z,Y,aa){Y=$jscomp.global;W=W.split(".");for(aa=0;aa<W.length-1;aa++){var ba=W[aa];if(!(ba in Y))return;Y=Y[ba]}W=W[W.length-1];aa=Y[W];Z=Z(aa);Z!=aa&&null!=Z&&$jscomp.defineProperty(Y,W,{configurable:!0,writable:!0,value:Z})};
$jscomp.polyfillIsolated=function(W,Z,Y,aa){var ba=W.split(".");W=1===ba.length;aa=ba[0];aa=!W&&aa in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var wa=0;wa<ba.length-1;wa++){var Ja=ba[wa];if(!(Ja in aa))return;aa=aa[Ja]}ba=ba[ba.length-1];Y=$jscomp.IS_SYMBOL_NATIVE&&"es6"===Y?aa[ba]:null;Z=Z(Y);null!=Z&&(W?$jscomp.defineProperty($jscomp.polyfills,ba,{configurable:!0,writable:!0,value:Z}):Z!==Y&&(void 0===$jscomp.propertyToPolyfillSymbol[ba]&&(Y=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[ba]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(ba):$jscomp.POLYFILL_PREFIX+Y+"$"+ba),$jscomp.defineProperty(aa,$jscomp.propertyToPolyfillSymbol[ba],{configurable:!0,writable:!0,value:Z})))};$jscomp.polyfill("Array.prototype.find",function(W){return W?W:function(Z,Y){return $jscomp.findInternal(this,Z,Y).v}},"es6","es3");
(function(){function W(){var N=this,z,C,c,a,l,n,x,h,m,v;this.getId=function(){return z};this.setId=function(t){z=t};this.getSourceName=function(){return C};this.setSourceName=function(t){C=t};this.getModelSetId=function(){return c};this.setModelSetId=function(t){c=t};this.getSourceType=function(){return a};this.setSourceType=function(t){a=t};this.getModelerSource=function(){return l};this.setModelerSource=function(t){l=t};this.getRefSourceType=function(){return n};this.getRefSourceName=function(){return x};
this.getErrorMessage=function(){return h};this.getCreatorName=function(){return m};this.getCreateTime=function(){return v};this.copy=function(){var t=new W;t.fromJsonObject(N.toJsonObject());return t};this.fromJsonObject=function(t){z=t.id;a=t.sourceType;var F=t.source;if(F){if(a==da.ModelerSourceType.ERPCloudEntity)l=new E,n=ca.get("ERPCloudBusinessEntity","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79-\u4e1a\u52a1\u5b9e\u4f53");else if(a==da.ModelerSourceType.ERPCloudDBCenter)l=new E,n=ca.get("ERPCloudDBCenter",
"\u91d1\u8776\u4e91\u00b7\u82cd\u7a79-\u6570\u636e\u4e2d\u5fc3");else if(a==da.ModelerSourceType.PublicDBSource)l=new ia,n=ca.get("publicDBSource","\u516c\u5171\u6570\u636e\u6e90-\u6570\u636e\u5e93");else if(a==da.ModelerSourceType.ModelSet)l=new Ka,n=ca.get("modelSet","\u6a21\u578b\u96c6");else if(a==da.ModelerSourceType.FileSource)switch(F.fileType){case ba.TYPE_EXCEL:l=new wa;break;case ba.TYPE_XML:l=new Ja;break;case ba.TYPE_TXT:case ba.TYPE_CSV:l=new Ca;break;default:throw Error("do not support this file type!");
}else if(a==da.ModelerSourceType.DBSource)l=new aa;else if(a==da.ModelerSourceType.OpenAPI)switch(l=new pa,F.openAPIType){case pa.TYPE_RESTFUL_DATA_SET:n=ca.get("RESTfulDataSet","RESTful\u6570\u636e\u96c6");break;case pa.TYPE_PROGRAM_DATA_SET:n=ca.get("programDataSet","\u7a0b\u5e8f\u6570\u636e\u96c6")}l.fromJsonObject(F)}t.sourceName?C=t.sourceName:a==da.ModelerSourceType.ERPCloudEntity?C=ca.get("businessEntity","\u4e1a\u52a1\u5b9e\u4f53"):a==da.ModelerSourceType.ERPCloudDBCenter&&(C=ca.get("DBCenter",
"\u6570\u636e\u4e2d\u5fc3"));x=t.refSourceName;h=t.errorMessage;m=t.creatorName;v=new Date(t.createTime)};this.toJsonObject=function(){var t={};t.id=z;t.sourceName=C;t.modelSetId=c;t.sourceType=a;l&&(t.source=l.toJsonObject());return t};this.getSearchContent=function(){var t=[];if(h)return t;C&&t.push(C);m&&t.push(m);n&&t.push(n);a==da.ModelerSourceType.PublicDBSource?l.getRefSourceDBName()&&t.push(l.getRefSourceDBName()):a==da.ModelerSourceType.DBSource&&(l.getDbAddress()&&t.push(l.getDbAddress().toUpperCase()),
l.getDbName()&&t.push(l.getDbName()),l.getSchema()&&t.push(l.getSchema()));return t}}function Z(){var N,z,C,c;this.getId=function(){return N};this.getFromType=function(){return z};this.getFromId=function(){return C};this.getModelName=function(){return c};this.fromJsonObject=function(a){N=a.id;z=a.fromType;C=a.fromId;c=a.modelName}}function Y(){var N=this,z;this.setType=function(C){z=C};this.getType=function(){return z};this.clone=function(){throw Error("Override me.");};this.toJsonObject=function(){var C=
{};C.type=z;N.protectedToJsonObject(C);return C};this.fromJsonObject=function(C){z=C.type;N.protectedFromJsonObject(C)};this.protectedToJsonObject=function(){throw Error("Override me.");};this.protectedFromJsonObject=function(C){throw Error("Override me.");}}function aa(){Y.call(this);var N=this,z,C,c,a,l,n,x,h,m,v=!0,t=new qa;this.getTypeName=function(){return N.getDbType()};this.getAdvanceSetting=function(){return t};this.setAdvanceSetting=function(F){t=F};this.getDbAddress=function(){return C};
this.setDbType=function(F){z=F};this.getDbType=function(){return z};this.setDbAddress=function(F){C=F};this.getDbAddress=function(){return C};this.setDbPort=function(F){c=F};this.getDbPort=function(){return c};this.setDbName=function(F){a=F};this.getDbName=function(){return a};this.setUserName=function(F){l=F};this.getUserName=function(){return l};this.setPassword=function(F){n=F};this.getPassword=function(){return n};this.setIsPasswordUpdated=function(F){v=F};this.isPasswordUpdated=function(){return v};
this.setSchema=function(F){x=F};this.getSchema=function(){return x};this.setDbVersion=function(F){h=F};this.getDbVersion=function(){return h};this.setConnectType=function(F){m=F};this.getConnectType=function(){return m};this.clone=function(){var F=new aa;F.setType(N.getType());F.setDbType(z);F.setDbAddress(C);F.setDbPort(c);F.setDbName(a);F.setUserName(l);F.setPassword(n);F.setSchema(x);F.setDbVersion(h);F.setConnectType(m);var xa=new qa;xa.setTimezone(t.getTimezone());xa.setCharset(t.getCharset());
xa.setOtherSetting(t.getOtherSetting());F.setAdvanceSetting(xa);return F};this.protectedFromJsonObject=function(F){z=F.dbType;C=F.dbAddress;c=F.dbPort;a=F.dbName;l=F.userName;n=ja.decode(F.password);F.schema&&(x=F.schema);F.dbVersion&&(h=F.dbVersion);F.connectType&&(m=F.connectType);F.advanceSetting&&t.fromJsonObject(F.advanceSetting)};this.protectedToJsonObject=function(F){F.type=da.ModelerSourceType.DBSource;F.dbType=z;F.dbAddress=C;F.dbPort=c;F.dbName=a;F.userName=l;F.password=ja.encode(n);x&&
(F.schema=x);h&&(F.dbVersion=h);m&&(F.connectType=m);F.advanceSetting=t.toJsonObject();return F}}function ba(){Y.call(this);var N=this,z,C,c,a,l;this.setFileName=function(n){z=n};this.getFileName=function(){return z};this.setFileType=function(n){C=n};this.getFileType=function(){return C};this.setFileUrl=function(n){c=n};this.getFileUrl=function(){return c};this.setCharacterSet=function(n){a=n};this.getCharacterSet=function(){return a};this.setDefineTypeRowCount=function(n){l=n};this.getDefineTypeRowCount=
function(){return l};this.clone=function(){var n=new ba;n.setFileType(C);n.setFileName(z);n.setFileUrl(c);return n};this.protectedToJsonObject=function(n){n.fileType=C;n.fileName=z;n.fileUrl=c;n.characterSet=a;n.defineTypeRowCount=l;N.protectedToFileJsonObject(n);return n};this.protectedFromJsonObject=function(n){C=n.fileType;z=n.fileName;c=n.fileUrl;a=n.characterSet;l=n.defineTypeRowCount;N.protectedFromFileJsonObject(n)};this.protectedToFileJsonObject=function(n){};this.protectedFromFileJsonObject=
function(n){}}function wa(){ba.call(this);var N=this;this.clone=function(){var z=new wa;z.setFileType(N.getFileType());z.setFileName(N.getFileName());z.setFileUrl(N.getFileUrl());z.setCharacterSet(N.getCharacterSet());z.setDefineTypeRowCount(N.getDefineTypeRowCount());return z};this.getDisplayName=function(){return"Excel"}}function Ja(){ba.call(this);var N=this;this.clone=function(){var z=new Ja;z.setFileType(N.getFileType());z.setFileName(N.getFileName());z.setFileUrl(N.getFileUrl());z.setCharacterSet(N.getCharacterSet());
z.setDefineTypeRowCount(N.getDefineTypeRowCount());return z};this.getDisplayName=function(){return"XML"}}function Ca(){ba.call(this);var N=this,z,C;this.setSplitSign=function(c){z=c};this.getSplitSign=function(){return z};this.setTextLimitSign=function(c){C=c};this.getTextLimitSign=function(){return C};this.clone=function(){var c=new Ca;c.setFileType(N.getFileType());c.setFileName(N.getFileName());c.setFileUrl(N.getFileUrl());c.setCharacterSet(N.getCharacterSet());c.setDefineTypeRowCount(N.getDefineTypeRowCount());
c.setSplitSign(z);c.setTextLimitSign(C);return c};this.protectedToFileJsonObject=function(c){c.splitSign=z;c.textLimitSign=C};this.protectedFromFileJsonObject=function(c){z=c.splitSign;C=c.textLimitSign};this.getDisplayName=function(){return"TXT"}}function E(){Y.call(this);var N=this;this.clone=function(){var z=new E;z.setType(N.getType());return z};this.protectedToJsonObject=function(z){return z};this.protectedFromJsonObject=function(z){}}function ia(){Y.call(this);var N,z,C,c,a;this.setRefId=function(l){N=
l};this.getRefId=function(){return N};this.getSourceType=function(){return z};this.getPublicSourceType=function(){return C};this.getPublicSourceCreator=function(){return c};this.getRefSourceDBName=function(){return a};this.protectedToJsonObject=function(l){l.refId=N;l.sourceType=z;l.publicSourceType=C;l.publicSourceCreator=c;return l};this.protectedFromJsonObject=function(l){N=l.refId;z=l.sourceType;C=l.publicSourceType;c=l.publicSourceCreator;a=l.refSourceDBName}}function Ka(){Y.call(this);var N=
this,z,C,c;this.setRefId=function(a){z=a};this.getRefId=function(){return z};this.setRefType=function(a){C=a};this.getRefType=function(){return C};this.setModelSetCreator=function(a){c=a};this.getModelSetCreator=function(){return c};this.clone=function(){var a=new Ka;a.setType(N.getType());a.setRefId(z);a.setRefType(C);a.setModelSetCreator(c);return a};this.protectedToJsonObject=function(a){a.refId=z;a.refType=C;a.modelSetCreator=c;return a};this.protectedFromJsonObject=function(a){z=a.refId;C=a.refType;
c=a.modelSetCreator}}function pa(){Y.call(this);var N=this,z,C,c;this.setUrl=function(a){z=a};this.getUrl=function(){return z};this.setAuthModel=function(a){c=a};this.getAuthModel=function(){return c};this.setOpenAPIType=function(a){C=a};this.getOpenAPIType=function(){return C};this.getTypeName=function(){return N.getOpenAPIType()};this.toJsonObject=function(){var a={};a.url=z;a.openAPIType=C;c&&(a.authModel=c);return a};this.fromJsonObject=function(a){z=a.url;C=a.openAPIType;c=a.authModel};this.clone=
function(){var a=new pa;a.setUrl(z);a.setOpenAPIType(C);a.setAuthModel(c);return a}}function sa(){var N;this.getAuthType=function(){return N};this.setAuthType=function(z){N=z};this.protectedToJsonObject=function(){throw Error("Override me.");};this.protectedFromJsonObject=function(z){throw Error("Override me.");}}function V(){sa.call(this);var N=this,z,C;this.getUserName=function(){return z};this.setUserName=function(c){z=c};this.getPassword=function(){return C};this.setPassword=function(c){C=c};
this.protectedToJsonObject=function(){var c={};c.userName=z;c.psw=C;c.authType=X.BASIC;return c};this.protectedFromJsonObject=function(c){z=c.userName;C=c.psw;N.setAuthType(c.authType)}}function na(){sa.call(this);var N=this,z,C,c,a;this.getClientId=function(){return z};this.setClientId=function(l){z=l};this.getClientSecret=function(){return C};this.setClientSecret=function(l){C=l};this.getScope=function(){return c};this.setScope=function(l){c=l};this.getAuthURL=function(){return a};this.setAuthURL=
function(l){a=l};this.protectedToJsonObject=function(){var l={};l.clientId=z;l.clientSecret=C;c&&(l.scope=c);l.authURL=a;l.authType=X.BEARER;return l};this.protectedFromJsonObject=function(l){z=l.clientId;C=l.clientSecret;c=l.scope;a=l.authURL;N.setAuthType(l.authType)}}function Ra(){sa.call(this);var N=this,z,C;this.getUserName=function(){return z};this.setUserName=function(c){z=c};this.getPassword=function(){return C};this.setPassword=function(c){C=c};this.protectedToJsonObject=function(){var c=
{};c.userName=z;c.psw=C;c.authType=X.DIGEST;return c};this.protectedFromJsonObject=function(c){z=c.userName;C=c.psw;N.setAuthType(c.authType)}}function Aa(){sa.call(this);var N=this,z,C,c,a,l,n,x,h,m,v;this.getTokenEnhanced=function(){return z};this.setTokenEnhanced=function(t){z=t};this.getAppId=function(){return C};this.setAppId=function(t){C=t};this.getAppSecret=function(){return c};this.setAppSecret=function(t){c=t};this.getUserType=function(){return a};this.setUserType=function(t){a=t};this.getUserTypeValue=
function(){return l};this.setUserTypeValue=function(t){l=t};this.getProxyUser=function(){return n};this.setProxyUser=function(t){n=t};this.getCosmicType=function(){return x};this.setCosmicType=function(t){x=t};this.getAccountId=function(){return m};this.setAccountId=function(t){m=t};this.getTenantId=function(){return v};this.setTenantId=function(t){v=t};this.getCosmicServerAddress=function(){return h};this.setCosmicServerAddress=function(t){h=t};this.protectedToJsonObject=function(){var t={};t.appId=
C;t.appSecret=c;t.userType=a;t.userTypeValue=l;t.proxyUser=n;t.cosmicType=x;h&&(t.accountId=m,t.tenantId=v,t.cosmicServerAddress=h);t.authType=X.COSMIC;t.tokenEnhanced=z;return t};this.protectedFromJsonObject=function(t){z=t.tokenEnhanced;C=t.appId;c=t.appSecret;a=t.userType;l=t.userTypeValue;n=t.proxyUser;x=t.cosmicType;m=t.accountId;v=t.tenantId;h=t.cosmicServerAddress;N.setAuthType(t.authType)}}function ya(N,z,C,c,a){this.getName=function(){return N};this.getText=function(){return z};this.getIconName=
function(){return a?La.handleIconName(C):C};this.isDisabled=function(){return c}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.modeler&&(com.kingdee.bos.qing.modeler={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset&&(com.kingdee.bos.qing.modeler.modelset={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.source&&
(com.kingdee.bos.qing.modeler.modelset.source={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.source.model&&(com.kingdee.bos.qing.modeler.modelset.source.model={});var da=com.kingdee.bos.qing.modeler.modelset.source.model;da.ModelSetSourceVO=W;da.ModelRefSourceVO=Z;da.ModelSetDBSource=aa;da.ModelSetFileSource=ba;da.ExcelSource=wa;da.XMLSource=Ja;da.TextSource=Ca;da.ERPCloudSource=E;da.PublicDataSource=ia;da.ModelSetSource=Ka;da.ModelSetVO=function(){var N,z;this.setModelSetId=function(C){N=
C};this.getModelSetId=function(){return N};this.setModelSetName=function(C){z=C};this.getModelSetName=function(){return z};this.fromJsonObject=function(C){N=C.modelSetId;z=C.modelSetName}};da.OpenAPISource=pa;da.SourceType=ya;da.BasicAuthModel=V;da.BearerAuthModel=na;da.DigestAuthModel=Ra;da.CosmicAuthModel=Aa;var ja,ca,qa;(function(){var N=com.kingdee.bos.qing.common;ja=N.Base64Util;N=com.kingdee.bos.qing.framework.common;ca=N.MultilanguageManager.createPackageAccessor(da);N=com.kingdee.bos.qing.data;
qa=N.DBAdvanceSetting})();da.I18nIconUtil=new function(){this.handleIconName=function(N){return"en"==com.kingdee.bos.qing.Seer.getUrlParamValue("language")?N+"_EN":N}};var La=da.I18nIconUtil;Z.FROM_TYPE_MODEL="MODEL";Z.FROM_TYPE_DEPLOY="DEPLOY";da.ModelerSourceType={ERPCloudEntity:"ERPCloudEntity",ERPCloudDBCenter:"ERPCloudDBCenter",DBSource:"DBSource",FileSource:"FileSource",PublicDBSource:"PublicDBSource",ModelSet:"ModelSet",OpenAPI:"OpenAPI"};ba.TYPE_EXCEL="EXCEL";ba.TYPE_CSV="CSV";ba.TYPE_TXT=
"TXT";ba.TYPE_XML="XML";ia.DB_SOURCE_TYPE="DB";Ka.TYPE_CURRENT="Current";Ka.TYPE_OTHER="Other";pa.TYPE_RESTFUL_DATA_SET="RESTFUL_DATA_SET";pa.TYPE_PROGRAM_DATA_SET="PROGRAM_DATA_SET";pa.TYPE_OPENAPI="OpenAPI";da.AuthModelFactory=new function(){var N={};this.getImpl=function(z){if(z=N[z])return new z};this.registImpl=function(z,C){N[z]=C}};var X=da.AuthModelFactory;X.BASIC="BASIC";X.BEARER="BEARER";X.DIGEST="DIGEST";X.COSMIC="COSMIC";X.registImpl(X.BASIC,V);X.registImpl(X.BEARER,na);X.registImpl(X.DIGEST,
Ra);X.registImpl(X.COSMIC,Aa);ya.DBSource="DBSource";ya.FileSource="FileSource";ya.ERPCloud="ERPCloud";ya.PublicSource="PublicSource";ya.ModelSet="ModelSet";ya.OpenAPI="OpenAPI"})();(function(){function W(){wa.call(this);var c;this.getRemoteUrl=function(){return c};this.setRemoteUrl=function(a){c=a}}function Z(c){var a,l=this,n,x,h,m,v,t,F,xa;this.setMessageCurtain=function(Q){};this.setSelected=function(Q){(xa=Q)?(h(c),a.addClass("source-manage-content-card-selected")):a.removeClass("source-manage-content-card-selected")};this.getSearchStatus=function(){return t};this.setSelectedListener=function(Q){h=Q};this.setEditListener=function(Q){v=Q};this.setDeleteListener=function(Q){m=
Q};this.setSearchTarget=function(Q,ea){t=Q;F=ea};this.getTitleJqUi=function(){return n};this.getCreateNameJqUi=function(){return x};this.setSearchTarget=function(Q,ea){t=Q;F=ea};this.getJqUi=function(){a||(a=$("<div class='source-manage-content-card'>"),n=$("<span class='source-manage-content-card-head-title'>"),x=$("<div class='source-manage-content-card-text'>"),l.protectedInitUi(a),a.on("click",G));ra();return a};this.protectedInitUi=function(Q){throw Error("Override me");};var ra=function(){if(!c.getErrorMessage()){c.getSourceName()&&
(t?l.doHighLightText(n,c.getSourceName(),null):n.text(c.getSourceName()),n.attr("title",c.getSourceName()));if(c.getCreatorName()){var Q=E.get("creator","\u521b\u5efa\u4eba\uff1a")+c.getCreatorName();t?l.doHighLightText(x,c.getCreatorName(),E.get("creator","\u521b\u5efa\u4eba\uff1a")):x.text(Q);x.attr("title",Q)}l.protectedUpdateUi()}};this.protectedUpdateUi=function(){throw Error("Override me");};this.getOperationJqUi=function(){if("true"==aa.Integration.getIsPreset())return $("<div>");var Q=$("<span class='source-manage-content-card-head-operator'>"),
ea=function(){h(c);v&&v();ra()};if(!c.getErrorMessage()){var T=$("<span>");T.addClass("source-manage-content-card-head-operator-edit edit-icon");T.attr("title",E.get("editSource","\u7f16\u8f91"));T.on("click",ea);z.backgroundWithHover(T,"btn-edit");T.appendTo(Q)}ea=$("<span>");ea.addClass("source-manage-content-card-head-operator-delete delete-icon");ea.attr("title",E.get("deleteSource","\u5220\u9664"));ea.on("click",function(Da){h(c);m&&m()});z.backgroundWithHover(ea,"btn-delete");ea.appendTo(Q);
return Q};this.doHighLightText=function(Q,ea,T){if(Q&&ea){var Da=F.toUpperCase(),g=ea.toUpperCase(),za=g.split(Da),Ia=Da.length;Q.text("");if(T){var ha=$("<span>");ha.text(T);Q.append(ha)}T=$("<span>");for(var ta in za){ha=g.indexOf(za[ta]);var Sa=ea.substr(0,za[ta].length);ha+=za[ta].length;var ua=g.length-ha;g=g.substr(ha,ua);ea=ea.substr(ha,ua);ha=$("<span>");ha.text(Sa);ha.appendTo(T);if(ta!==za.length-1&&1<za.length){ua=g.indexOf(Da);Sa=ea.substr(ua,Ia);ua+=Ia;var Ba=g.length-ua;g=g.substr(ua,
Ba);ea=ea.substr(ua,Ba);ua=$("<span>");ua.text(Sa);ua.css("color","#FF0000");ua.appendTo(ha)}}Q.append(T)}};var G=function(Q){c&&l.setSelected(!0)}}function Y(c){var a=this,l;this.getJqUi=function(){l=$("<div>");a.protectedInitUi(l);c&&a.protectedUpdateModelToUI(c);return l};this.protectedInitUi=function(){throw Error("Override me");};this.protectedUpdateModelToUI=function(n){throw Error("Override me");};this.protectedGetModelFromUI=function(){throw Error("Override me");};this.protectedCheckParams=
function(){throw Error("Override me");}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.modeler&&(com.kingdee.bos.qing.modeler={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset&&(com.kingdee.bos.qing.modeler.modelset={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.source&&
(com.kingdee.bos.qing.modeler.modelset.source={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.source.common&&(com.kingdee.bos.qing.modeler.modelset.source.common={});var aa=com.kingdee.bos.qing.modeler.modelset.source.common;aa.SourceManageFacade=function(c,a,l,n){ba.call(this,c,a,l,n);var x=this.protectedMethod;this.isDisabledSource=function(){x.remote("isDisabledSource",{})};this.loadModelSetSources=function(h){x.remote("loadModelSetSources",{modelSetId:h,orderBySourceType:!1})};this.saveModelSetSource=
function(h){h={model:JSON.stringify(h.toJsonObject())};x.remote("saveModelSetSource",h)};this.updateModelSetSource=function(h){var m=h.getModelerSource();h={model:JSON.stringify(h.toJsonObject()),actualPassword:m.isPasswordUpdated?m.isPasswordUpdated():!0};x.remote("updateModelSetSource",h)};this.deleteModelSetSource=function(h,m){x.remote("deleteModelSetSource",{sourceId:h,modelSetId:m})};this.loadDBConnections=function(){x.remote("loadPermissionDBConnections",{})};this.loadPermissionModelSet=function(h){x.remote("loadPermissionModelSet",
{modelSetId:h})};this.uploadFile=function(h){var m=com.kingdee.bos.qing.framework.common.RemoteFrameworkRegister.getUploadUrl();h.open("post",m,!0)};this.getFileSize=function(h){x.remote("getFileSize",{fileUrl:h})};this.guessFileEncoding=function(h){x.remote("guessFileEncoding",{filePath:h})};this.loadRefModelInfos=function(h){x.remote("loadRefModelInfos",{sourceId:h})};this.openAPIInitialCheck=function(h){h={source:JSON.stringify(h.toJsonObject())};x.remote("openAPIInitialCheck",h)}};aa.RemoteImpl=
W;var ba,wa,Ja,Ca,E,ia,Ka,pa,sa,V,na,Ra,Aa,ya,da,ja,ca,qa,La,X,N;(function(){var c=com.kingdee.bos.qing.framework.common;ba=c.AbstractFacade;wa=c.AbstractRemoteCall;Ja=c.AbstractIcons;E=c.MultilanguageManager.createPackageAccessor(aa);c=com.kingdee.bos.qing.modeler.modelset.source.model;Ca=c.ModelerSourceType;ca=c.BasicAuthModel;qa=c.BearerAuthModel;La=c.DigestAuthModel;X=c.CosmicAuthModel;ja=c.AuthModelFactory;c=com.kingdee.bos.qing.data;pa=c.DBSource;c=com.kingdee.bos.qing.dbmanage;Ka=c.DBSourceDisplayNameFactory;
c=com.kingdee.bos.qing.ui.component;ia=c.HelpIcon;sa=c.TextField;ya=c.PasswordField;Ra=c.ComboBox;na=c.Label;da=c.CheckBox;c=com.kingdee.bos.qing.common;V=c.DomUtil;Aa=c.Base64Util;c=com.kingdee.bos.qing.modeler.modelset.source.model;N=c.I18nIconUtil})();aa.Integration=new function(){var c=new W,a,l;this.getRemoteImpl=function(){return c};this.setRemoteUrl=function(n){c.setRemoteUrl(n)};this.setModelSetId=function(n){a=n};this.getModelSetId=function(){return a};this.setIsPreset=function(n){l=n};this.getIsPreset=
function(){return l}};aa.Icons=new function(){Ja.call(this);var c=this.protectedMethod;this.protectedInit=function(x,h){x=com.kingdee.bos.qing.modeler.modelset.source.ComboIcon;if(!x)throw Error("com.kingdee.bos.qing.modeler.modelset.source.ComboIcon not found.");x.define(h,"dm");l(8,0,"checked");l(6,13,"upload_success");l(6,12,"upload_running");l(6,11,"upload_fail");l(6,10,"upload_pause");l(6,9,"upload_again");l(6,8,"refresh");l(6,2,"upload_icon");l(7,3,"download_icon");l(8,14,"up_move");l(8,15,
"down_move");x.define(h,"source");a(0,0,"MYSQL");a(1,0,"SQLSERVER");a(2,0,"ORACLE");a(3,0,"POSTGRESQL");a(4,0,"DB2");a(5,0,"ACCESS");a(6,0,"SQLITE");a(3,1,"HIVE");a(4,1,"HANA");a(5,1,"ODPS");a(6,1,"source_unsupported");a(0,1,"EXCEL");a(1,1,"CSV");a(2,1,"TXT");a(0,2,"SYBASE");a(1,2,"REDSHIFT");a(2,2,"TIDB");a(3,2,"DM");a(4,2,"source_openAPI");a(5,2,"GREENPLUM");a(6,2,"GAUSSDB");a(0,3,"APACHEDRILL");a(1,3,"SPARKSQL");a(2,3,"SYBASEIQ");a(3,3,"IMPALA");a(4,3,"KYLIN");a(5,3,"XML");a(0,4,"biz_source");
a(1,4,"public_source");a(2,4,"modelSet_source");a(3,4,"db_source");a(4,4,"file_source");a(6,4,"COSMIC");a(6,3,"DORIS");a(7,0,"KINGBASE");a(7,1,"TDSQL");a(7,2,"GBASE");a(7,3,"VASTBASE");a(7,4,"YASHANDB");a(8,0,"TXT_EN");a(8,1,"COSMIC_EN");x.define(h,"file");h.setStartPosition(1,37);h.setIconSize(15,18);a(0,0,"file_csv");a(0,1,"file_excel");a(0,2,"file_txt");a(0,3,"file_xml");x.define(h,"source-error");h.setIconSize(90,45);a(0,0,"source-error");h.setStartPosition(210,-10);h.setIconSize(170,98);a(0,
0,"no-public-source");x.define(h,"source-round");h.setStartPosition(0,0);h.setGap(0);h.setIconSize(100,100);a(0,0,"ACCESS-ROUND");a(0,1,"REDSHIFT-ROUND");a(0,2,"APACHEDRILL-ROUND");a(0,3,"HIVE-ROUND");a(0,4,"IMPALA-ROUND");a(0,5,"KYLIN-ROUND");a(0,6,"DB2-ROUND");a(0,7,"DM-ROUND");a(1,0,"GAUSSDB-ROUND");a(1,1,"GREENPLUM-ROUND");a(1,2,"HANA-ROUND");a(1,3,"MYSQL-ROUND");a(1,4,"ODPS-ROUND");a(1,5,"ORACLE-ROUND");a(1,6,"POSTGRESQL-ROUND");a(1,7,"SPARKSQL-ROUND");a(2,0,"SQLSERVER-ROUND");a(2,1,"SQLITE-ROUND");
a(2,2,"SYBASEIQ-ROUND");a(2,3,"SYBASE-ROUND");a(2,4,"TIDB-ROUND");a(2,5,"DORIS-ROUND");a(2,6,"KINGBASE-ROUND");a(2,7,"TDSQL-ROUND");a(3,0,"COSMIC-ROUND");a(3,1,"OPENAPI-ROUND");a(3,2,"EXCEL-ROUND");a(3,3,"CSV-ROUND");a(3,4,"ENTITY-ROUND");a(3,5,"DATACENTER-ROUND");a(3,6,"MODELSET-ROUND");a(3,7,"TXT-ROUND");a(4,2,"VASTBASE-ROUND");a(4,3,"COSMIC-ROUND_EN");a(4,4,"XML-ROUND");a(4,5,"YASHANDB-ROUND");a(4,7,"GBASE-ROUND");h.setStartPosition(0,502);h.setIconSize(16,16);n(0,0,"btn-delete");n(0,1,"btn-edit");
h.setStartPosition(0,500);h.setIconSize(17,17);n(0,3,"btn-search");h.setStartPosition(0,590);h.setIconSize(52,52);n(0,0,"CreatorIcon")};var a=function(x,h,m){c.registIcon(x,h,m)},l=function(x,h,m){a(x,h,m);a(x+1,h,m+"_selected")},n=function(x,h,m){a(x+1,h,m);a(x,h,m+"_hover")}};var z=aa.Icons;aa.SourceCardUIFactory=new function(){var c={};this.getImpl=function(a){var l=c[a.getSourceType()];if(l)return new l(a)};this.registImpl=function(a,l){c[a]=l}};var C=aa.SourceCardUIFactory;C.registImpl(Ca.DBSource,
function(c){Z.call(this,c);var a=this,l,n,x;this.protectedInitUi=function(m){var v=$("<div class='source-manage-content-card-icon'>");z.background(v,c.getModelerSource().getDbType()+"-ROUND");v.attr("title",Ka.getDisplayName(c.getModelerSource().getDbType()));m.append(v);v=$("<div class='source-manage-content-card-head'>");v.append(a.getTitleJqUi());v.append(a.getOperationJqUi());m.append(v);v=$("<div class='source-manage-content-card-body'>");v.append(a.getCreateNameJqUi());l=$("<div class='source-manage-content-card-text'>");
v.append(l);h(c.getModelerSource().getTypeName())&&(x=$("<div class='source-manage-content-card-text'>"),v.append(x));n=$("<div class='source-manage-content-card-text'>");v.append(n);m.append(v)};var h=function(m){return m==pa.TYPE_POSTGRESQL||m==pa.TYPE_DB2||m==pa.TYPE_HANA||m==pa.TYPE_REDSHIFT||m==pa.TYPE_GREENPLUM||m==pa.TYPE_KYLIN||m==pa.TYPE_VASTBASE||m==pa.TYPE_GBASE||m==pa.TYPE_KINGBASE?!0:!1};this.protectedUpdateUi=function(){var m=c.getModelerSource().getTypeName()==pa.TYPE_ORACLE?E.get("SIDOrserverNameWithColon",
"SID/\u5b9e\u4f8b\u540d\uff1a"):E.get("dbWithColon","\u6570\u636e\u5e93\uff1a");var v=c.getModelerSource().getDbName();a.getSearchStatus()?a.doHighLightText(l,v,m):l.text(m+v);l.attr("title",m+v);h(c.getModelerSource().getTypeName())&&(m=E.get("modeWithColon","\u6a21\u5f0f\uff1a")+c.getModelerSource().getSchema(),a.getSearchStatus()?a.doHighLightText(x,c.getModelerSource().getSchema(),E.get("modeWithColon","\u6a21\u5f0f\uff1a")):x.text(m),x.attr("title",m));c.getModelerSource().getDbAddress()&&(m=
E.get("serverWithColon","\u670d\u52a1\u5668\uff1a")+c.getModelerSource().getDbAddress(),a.getSearchStatus()?a.doHighLightText(n,c.getModelerSource().getDbAddress(),E.get("serverWithColon","\u670d\u52a1\u5668\uff1a")):n.text(m),n.attr("title",m))}});C.registImpl(Ca.FileSource,function(c){Z.call(this,c);var a=this;this.protectedInitUi=function(l){var n=$("<div class='source-manage-content-card-icon'>");z.background(n,c.getModelerSource().getFileType()+"-ROUND");n.attr("title",c.getModelerSource().getDisplayName());
l.append(n);n=$("<div class='source-manage-content-card-head'>");n.append(a.getTitleJqUi());n.append(a.getOperationJqUi());l.append(n);n=$("<div class='source-manage-content-card-body'>");n.append(a.getCreateNameJqUi());l.append(n)};this.protectedUpdateUi=function(){}});C.registImpl(Ca.ERPCloudEntity,function(c){Z.call(this,c);var a=this,l;this.protectedInitUi=function(n){var x=N.handleIconName("COSMIC-ROUND"),h=$("<div class='source-manage-content-card-icon'>");z.background(h,x);h.attr("title",E.get("businessEntity",
"\u4e1a\u52a1\u5b9e\u4f53"));n.append(h);x=$("<div class='source-manage-content-card-head'>");x.append(a.getTitleJqUi());x.append(a.getOperationJqUi());n.append(x);x=$("<div class='source-manage-content-card-body'>");x.append(a.getCreateNameJqUi());l=$("<div class='source-manage-content-card-text'>");x.append(l);n.append(x)};this.protectedUpdateUi=function(){if(c.getRefSourceType()){var n=E.get("sourceType","\u7c7b\u578b\uff1a")+c.getRefSourceType();a.getSearchStatus()?a.doHighLightText(l,n):l.text(n);
l.attr("title",n)}}});C.registImpl(Ca.ERPCloudDBCenter,function(c){Z.call(this,c);var a=this,l;this.protectedInitUi=function(n){var x=$("<div class='source-manage-content-card-head'>");if(c.getErrorMessage()){var h=$("<div>");v=$("<div class='source-manage-content-card-notice-icon'>");z.background(v,"DATACENTER-ROUND");v.appendTo(h);v=$("<span class='source-manage-content-card-notice-title'>");v.text(c.getSourceName());v.attr("title",c.getSourceName());v.appendTo(h);v=E.get("creator","\u521b\u5efa\u4eba\uff1a")+
c.getCreatorName();var m=$("<span class='source-manage-content-card-notice-body-creator'>");m.text(v);m.attr("title",v);m.appendTo(h);v=$("<span class='source-manage-content-card-body-ref-source-creator'>");m=E.get("source","\u6765\u6e90")+"\uff1a"+E.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79")+"/"+E.get("DBCenter","\u6570\u636e\u4e2d\u5fc3");v.text(m);v.attr("title",m);v.appendTo(h);v=new ia;v.setIconType(ia.ICON_TYPE_INFO);v.setTipsSize(300,145);v.setTipsHtml(h[0]);h=v.getJqUi();h.css("left",
10);h.css("top",12);n.append(h);v=$("<div class='source-manage-content-card-error-icon'>");z.background(v,"source-error");v.appendTo(n);h=$("<div class='source-manage-content-card-error-message'>");h.text(c.getErrorMessage());h.attr("title",c.getErrorMessage());h.appendTo(n)}else{h=N.handleIconName("COSMIC-ROUND");var v=$("<div class='source-manage-content-card-icon'>");z.background(v,h);v.attr("title",E.get("DBCenter","\u6570\u636e\u4e2d\u5fc3"));n.append(v);x.append(a.getTitleJqUi());h=$("<div class='source-manage-content-card-body'>");
h.append(a.getCreateNameJqUi());l=$("<div class='source-manage-content-card-text'>");h.append(l);n.append(h)}x.append(a.getOperationJqUi());n.append(x)};this.protectedUpdateUi=function(){if(c.getRefSourceType()){var n=E.get("sourceType","\u7c7b\u578b\uff1a")+c.getRefSourceType();a.getSearchStatus()?a.doHighLightText(l,n):l.text(n);l.attr("title",n)}}});C.registImpl(Ca.PublicDBSource,function(c){Z.call(this,c);var a=this,l,n;this.protectedInitUi=function(x){var h=$("<div class='source-manage-content-card-head'>");
if(c.getErrorMessage()){var m=$("<div>");t=$("<div class='source-manage-content-card-notice-icon'>");z.background(t,c.getModelerSource().getPublicSourceType()+"-ROUND");t.appendTo(m);t=$("<span class='source-manage-content-card-notice-title'>");t.text(c.getSourceName());t.attr("title",c.getSourceName());t.appendTo(m);t=E.get("creator","\u521b\u5efa\u4eba\uff1a")+c.getCreatorName();var v=$("<span class='source-manage-content-card-notice-body-creator'>");v.text(t);v.attr("title",t);v.appendTo(m);t=
E.get("publicSourceCreator","\u8be5\u516c\u5171\u6570\u636e\u6e90\u521b\u5efa\u4eba\uff1a")+c.getModelerSource().getPublicSourceCreator();v=$("<span class='source-manage-content-card-body-ref-source-creator'>");v.text(t);v.attr("title",t);v.appendTo(m);t=c.getRefSourceName();v=E.get("publicDataSource","\u516c\u5171\u6570\u636e\u6e90")+"/";v=E.get("source","\u6765\u6e90")+"\uff1a"+v+t;t=$("<span class='source-manage-content-card-body-source'>");t.text(v);t.attr("title",v);t.appendTo(m);t=new ia;t.setIconType(ia.ICON_TYPE_INFO);
t.setTipsSize(300,145);t.setTipsHtml(m[0]);m=t.getJqUi();m.css("left",10);m.css("top",12);x.append(m);t=$("<div class='source-manage-content-card-error-icon'>");z.background(t,"source-error");t.appendTo(x);m=$("<div class='source-manage-content-card-error-message'>");m.text(c.getErrorMessage());m.attr("title",c.getErrorMessage());m.appendTo(x)}else{var t=$("<div class='source-manage-content-card-icon'>");z.background(t,c.getModelerSource().getPublicSourceType()+"-ROUND");t.attr("title",Ka.getDisplayName(c.getModelerSource().getPublicSourceType()));
x.append(t);h.append(a.getTitleJqUi());m=$("<div class='source-manage-content-card-body'>");m.append(a.getCreateNameJqUi());l=$("<div class='source-manage-content-card-text'>");m.append(l);n=$("<div class='source-manage-content-card-text'>");m.append(n);x.append(m)}h.append(a.getOperationJqUi());x.append(h)};this.protectedUpdateUi=function(){if(c.getRefSourceType()){var x=E.get("sourceType","\u7c7b\u578b\uff1a")+c.getRefSourceType();a.getSearchStatus()?a.doHighLightText(l,x):l.text(x);l.attr("title",
x)}if(c.getModelerSource().getRefSourceDBName()){x=c.getModelerSource().getPublicSourceType()==pa.TYPE_ORACLE?E.get("SIDOrserverNameWithColon","SID/\u5b9e\u4f8b\u540d\uff1a"):E.get("dbWithColon","\u6570\u636e\u5e93\uff1a");var h=x+c.getModelerSource().getRefSourceDBName();a.getSearchStatus()?a.doHighLightText(n,c.getModelerSource().getRefSourceDBName(),x):n.text(h);n.attr("title",h)}}});C.registImpl(Ca.ModelSet,function(c){Z.call(this,c);var a=this,l;this.protectedInitUi=function(n){var x=$("<div class='source-manage-content-card-head'>");
if(c.getErrorMessage()){var h=$("<div>");v=$("<div class='source-manage-content-card-notice-icon'>");z.background(v,"MODELSET-ROUND");v.appendTo(h);v=$("<span class='source-manage-content-card-notice-title'>");v.text(c.getSourceName());v.attr("title",c.getSourceName());v.appendTo(h);v=E.get("creator","\u521b\u5efa\u4eba\uff1a")+c.getCreatorName();var m=$("<span class='source-manage-content-card-notice-body-creator'>");m.text(v);m.attr("title",v);m.appendTo(h);v=E.get("modelSetCreator","\u8be5\u6a21\u578b\u96c6\u521b\u5efa\u4eba\uff1a")+
c.getModelerSource().getModelSetCreator();m=$("<span class='source-manage-content-card-body-ref-source-creator'>");m.text(v);m.attr("title",v);m.appendTo(h);v=c.getRefSourceName();m=E.get("modelSet","\u6a21\u578b\u96c6")+"/";m=E.get("source","\u6765\u6e90")+"\uff1a"+m+v;v=$("<span class='source-manage-content-card-body-source'>");v.text(m);v.attr("title",m);v.appendTo(h);v=new ia;v.setIconType(ia.ICON_TYPE_INFO);v.setTipsSize(300,145);v.setTipsHtml(h[0]);h=v.getJqUi();h.css("left",10);h.css("top",
12);n.append(h);v=$("<div class='source-manage-content-card-error-icon'>");z.background(v,"source-error");v.appendTo(n);h=$("<div class='source-manage-content-card-error-message'>");h.text(c.getErrorMessage());h.attr("title",c.getErrorMessage());h.appendTo(n)}else{var v=$("<div class='source-manage-content-card-icon'>");z.background(v,"MODELSET-ROUND");v.attr("title",E.get("modelSet","\u6a21\u578b\u96c6"));n.append(v);x.append(a.getTitleJqUi());h=$("<div class='source-manage-content-card-body'>");
h.append(a.getCreateNameJqUi());l=$("<div class='source-manage-content-card-text'>");h.append(l);n.append(h)}x.append(a.getOperationJqUi());n.append(x)};this.protectedUpdateUi=function(){if(c.getRefSourceType()){var n=E.get("sourceType","\u7c7b\u578b\uff1a")+c.getRefSourceType();a.getSearchStatus()?a.doHighLightText(l,n):l.text(n);l.attr("title",n)}}});C.registImpl(Ca.OpenAPI,function(c){Z.call(this,c);var a=this,l;this.protectedInitUi=function(n){var x=$("<div class='source-manage-content-card-head'>");
if(c.getErrorMessage()){var h=$("<div>");v=$("<div class='source-manage-content-card-notice-icon'>");z.background(v,"OPENAPI-ROUND");v.appendTo(h);v=$("<span class='source-manage-content-card-notice-title'>");v.text(c.getSourceName());v.attr("title",c.getSourceName());v.appendTo(h);v=E.get("creator","\u521b\u5efa\u4eba\uff1a")+c.getCreatorName();var m=$("<span class='source-manage-content-card-notice-body-creator'>");m.text(v);m.attr("title",v);m.appendTo(h);v=new ia;v.setIconType(ia.ICON_TYPE_INFO);
v.setTipsSize(300,145);v.setTipsHtml(h[0]);h=v.getJqUi();h.css("left",10);h.css("top",12);n.append(h);v=$("<div class='source-manage-content-card-error-icon'>");z.background(v,"source-error");v.appendTo(n);h=$("<div class='source-manage-content-card-error-message'>");h.text(c.getErrorMessage());h.attr("title",c.getErrorMessage());h.appendTo(n)}else{var v=$("<div class='source-manage-content-card-icon'>");z.background(v,"OPENAPI-ROUND");v.attr("title",E.get("OpenAPI","OpenAPI"));n.append(v);x.append(a.getTitleJqUi());
h=$("<div class='source-manage-content-card-body'>");h.append(a.getCreateNameJqUi());l=$("<div class='source-manage-content-card-text'>");h.append(l);n.append(h)}x.append(a.getOperationJqUi());n.append(x)};this.protectedUpdateUi=function(){if(c.getRefSourceType()){var n=E.get("sourceType","\u7c7b\u578b\uff1a")+c.getRefSourceType();a.getSearchStatus()?a.doHighLightText(l,n):l.text(n);l.attr("title",n)}}});aa.ProductLineEnvironment=new function(){var c;this.getEnvironment=function(){return c};this.setEnvironment=
function(a){c=a};this.checkEnvironment=function(a){return a&&c&&c==a?!0:!1}};aa.ProductLineEnvironment.COSMIC="COSMIC";aa.OpenAPIAuthFactory=new function(){var c={};this.getImpl=function(a,l){if(a=c[a])return new a(l)};this.registImpl=function(a,l){c[a]=l}};C=aa.OpenAPIAuthFactory;C.registImpl(ja.BASIC,function(c){Y.call(this,c);var a,l,n=/^[a-zA-Z0-9_]{1,}$/;this.protectedInitUi=function(x){var h=new na(E.get("userName","\u7528\u6237\u540d"));h.setRequired(!0);h=h.getJqUi();V.layoutCtrl(h,10,0,80,
23);h.appendTo(x);a=new sa;a.setTabindex(1);h=a.getJqUi();V.layoutCtrl(h,110,0,170,23);h.appendTo(x);h=new na(E.get("mima","\u5bc6\u7801"));h.setRequired(!0);h=h.getJqUi();V.layoutCtrl(h,10,30,80,23);h.appendTo(x);l=new ya;l.setTabindex(2);h=l.getJqUi();V.layoutCtrl(h,110,30,170,23);h.appendTo(x)};this.protectedUpdateModelToUI=function(){a.setText(c.getUserName());l.setPassword(Aa.decode(c.getPassword()))};this.protectedGetModelFromUI=function(){var x=new ca;x.setUserName($.trim(a.getText()));x.setPassword(Aa.encode($.trim(l.getPassword())));
return x};this.protectedCheckParams=function(){return $.trim(a.getText())?$.trim(l.getPassword())?$.trim(a.getText()).match(n)?50<$.trim(a.getText()).length?E.get("userNameTooLong","\u7528\u6237\u540d\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):100<$.trim(l.getPassword()).length?E.get("mimaTooLong","\u5bc6\u7801\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7100\u4e2a\u5b57\u7b26\u3002"):null:E.get("userNameNotSpecial","\u7528\u6237\u540d\u53ea\u80fd\u7531\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\u3002"):
E.get("mimaNotNull","\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\u3002"):E.get("userNameNotNull","\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\u3002")}});C.registImpl(ja.BEARER,function(c){Y.call(this,c);var a,l,n,x;this.protectedInitUi=function(h){var m=new na(E.get("clientId","\u5ba2\u6237\u7aef\u7f16\u7801"));m.setRequired(!0);m=m.getJqUi();m.attr("title",E.get("clientId","\u5ba2\u6237\u7aef\u7f16\u7801"));V.layoutCtrl(m,10,0,68,23);m.appendTo(h);m=new ia;m.setIconType(ia.ICON_TYPE_QUESTION);m.setTipsText("client_id");
m=m.getJqUi();m.addClass("dm-notice-icon");V.layoutCtrl(m,78,4,16,16);m.appendTo(h);a=new sa;a.setTabindex(1);m=a.getJqUi();V.layoutCtrl(m,110,0,170,23);m.appendTo(h);m=new na(E.get("clientSecret","\u5ba2\u6237\u7aef\u5bc6\u94a5"));m.setRequired(!0);m=m.getJqUi();V.layoutCtrl(m,10,30,80,23);m.appendTo(h);m=new ia;m.setIconType(ia.ICON_TYPE_QUESTION);m.setTipsText("client_secret");m=m.getJqUi();m.addClass("dm-notice-icon");V.layoutCtrl(m,78,34,16,16);m.appendTo(h);l=new ya;l.setTabindex(2);m=l.getJqUi();
V.layoutCtrl(m,110,30,170,23);m.appendTo(h);m=(new na(E.get("scope","\u6743\u9650\u8303\u56f4"))).getJqUi();m.attr("title",E.get("scope","\u6743\u9650\u8303\u56f4"));V.layoutCtrl(m,10,60,54,23);m.appendTo(h);m=new ia;m.setIconType(ia.ICON_TYPE_QUESTION);m.setTipsText("scope");m=m.getJqUi();m.addClass("dm-notice-icon");V.layoutCtrl(m,64,64,16,16);m.appendTo(h);n=new sa;a.setTabindex(3);m=n.getJqUi();V.layoutCtrl(m,110,60,170,23);m.appendTo(h);m=new na(E.get("authURL","\u8ba4\u8bc1URL"));m.setRequired(!0);
m=m.getJqUi();m.attr("title",E.get("authURL","\u8ba4\u8bc1URL"));V.layoutCtrl(m,10,90,57,23);m.appendTo(h);m=new ia;m.setIconType(ia.ICON_TYPE_QUESTION);m.setTipsText(E.get("tokenURL","\u83b7\u53d6access_token\u7684API\u5730\u5740"));m=m.getJqUi();m.addClass("dm-notice-icon");V.layoutCtrl(m,67,94,16,16);m.appendTo(h);x=new sa;x.setTabindex(4);m=x.getJqUi();V.layoutCtrl(m,110,90,470,23);m.appendTo(h)};this.protectedUpdateModelToUI=function(h){a.setText(c.getClientId());l.setPassword(Aa.decode(c.getClientSecret()));
n.setText(c.getScope());x.setText(c.getAuthURL())};this.protectedGetModelFromUI=function(){var h=new qa;h.setClientId($.trim(a.getText()));h.setClientSecret(Aa.encode($.trim(l.getPassword())));$.trim(n.getText())&&h.setScope($.trim(n.getText()));h.setAuthURL($.trim(x.getText()));return h};this.protectedCheckParams=function(){return $.trim(a.getText())?$.trim(l.getPassword())?$.trim(x.getText())?50<$.trim(a.getText()).length?E.get("clientIdTooLong","\u5ba2\u6237\u7aef\u7f16\u7801\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):
100<$.trim(l.getPassword()).length?E.get("clientSecretTooLong","\u5ba2\u6237\u7aef\u5bc6\u94a5\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7100\u4e2a\u5b57\u7b26\u3002"):50<$.trim(n.getText()).length?E.get("scopeTooLong","\u6743\u9650\u8303\u56f4\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):100<$.trim(x.getText()).length?E.get("authURLTooLong","\u8ba4\u8bc1URL\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7100\u4e2a\u5b57\u7b26\u3002"):null:E.get("authURLNotNull","\u8ba4\u8bc1URL\u4e0d\u80fd\u4e3a\u7a7a\u3002"):
E.get("clientSecretNotNull","\u5ba2\u6237\u7aef\u5bc6\u94a5\u4e0d\u80fd\u4e3a\u7a7a\u3002"):E.get("clientIdNotNull","\u5ba2\u6237\u7aef\u7f16\u7801\u4e0d\u80fd\u4e3a\u7a7a\u3002")}});C.registImpl(ja.DIGEST,function(c){Y.call(this,c);var a,l,n=/^[a-zA-Z0-9_]{1,}$/;this.protectedInitUi=function(x){var h=new na(E.get("userName","\u7528\u6237\u540d"));h.setRequired(!0);h=h.getJqUi();V.layoutCtrl(h,10,0,80,23);h.appendTo(x);a=new sa;a.setTabindex(1);h=a.getJqUi();V.layoutCtrl(h,110,0,170,23);h.appendTo(x);
h=new na(E.get("mima","\u5bc6\u7801"));h.setRequired(!0);h=h.getJqUi();V.layoutCtrl(h,10,30,80,23);h.appendTo(x);l=new ya;l.setTabindex(2);h=l.getJqUi();V.layoutCtrl(h,110,30,170,23);h.appendTo(x)};this.protectedUpdateModelToUI=function(){a.setText(c.getUserName());l.setPassword(Aa.decode(c.getPassword()))};this.protectedGetModelFromUI=function(){var x=new La;x.setUserName($.trim(a.getText()));x.setPassword(Aa.encode($.trim(l.getPassword())));return x};this.protectedCheckParams=function(){return $.trim(a.getText())?
$.trim(l.getPassword())?50<$.trim(a.getText()).length?E.get("userNameTooLong","\u7528\u6237\u540d\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):$.trim(a.getText()).match(n)?100<$.trim(l.getPassword()).length?E.get("mimaTooLong","\u5bc6\u7801\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7100\u4e2a\u5b57\u7b26\u3002"):null:E.get("userNameNotSpecial","\u7528\u6237\u540d\u53ea\u80fd\u7531\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\u3002"):E.get("mimaNotNull","\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\u3002"):
E.get("userNameNotNull","\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\u3002")}});C.registImpl(ja.COSMIC,function(c){function a(R,I){this.getTypeName=function(){return R};this.getTypeCode=function(){return I}}Y.call(this,c);var l=this,n=c,x=n&&n.getTokenEnhanced(),h=aa.ProductLineEnvironment.checkEnvironment(aa.ProductLineEnvironment.COSMIC),m,v,t,F,xa,ra,G,Q,ea,T,Da,g=["Local","Other"],za=["Mobile","Email","UserName"],Ia=[new a(E.get("local","\u5f53\u524d\u7cfb\u7edf"),g[0]),new a(E.get("other","\u5176\u4ed6\u7cfb\u7edf"),
g[1])],ha=[new a(E.get("mobile","\u624b\u673a\u53f7"),za[0]),new a(E.get("email","\u90ae\u7bb1"),za[1]),new a(E.get("userName","\u7528\u6237\u540d"),za[2])];this.protectedInitUi=function(R){ea=new da;var I=ea.getJqUi();V.layoutCtrl(I,310,-27,23,23);I.appendTo(R);I=(new na(E.get("tokenEnhanced","\u589e\u5f3a\u578bToken\u8ba4\u8bc1"))).getJqUi();I.attr("title",E.get("tokenEnhanced","\u589e\u5f3a\u578bToken\u8ba4\u8bc1"));V.layoutCtrl(I,330,-25,220,16);I.appendTo(R);ea.addCheckedListener(function(){x!=
ea.isChecked()&&(x=ea.isChecked(),n=l.protectedGetModelFromUI(),R.empty(),l.protectedInitUi(R),l.protectedUpdateModelToUI(c))});I=new na(E.get("appId","\u7cfb\u7edf\u7f16\u7801"));I.setRequired(!0);I=I.getJqUi();I.attr("title",E.get("appId","\u7cfb\u7edf\u7f16\u7801"));V.layoutCtrl(I,10,0,57,23);I.appendTo(R);I=new ia;I.setIconType(ia.ICON_TYPE_QUESTION);I.setTipsText("appId");I=I.getJqUi();I.addClass("dm-notice-icon");V.layoutCtrl(I,67,4,16,16);I.appendTo(R);m=new sa;m.setTabindex(1);I=m.getJqUi();
V.layoutCtrl(I,110,0,170,23);I.appendTo(R);I=new na(E.get("appSecret","\u8ba4\u8bc1\u5bc6\u94a5"));I.setRequired(!0);I=I.getJqUi();I.attr("title",E.get("appSecret","\u8ba4\u8bc1\u5bc6\u94a5"));V.layoutCtrl(I,310,0,57,23);I.appendTo(R);I=new ia;I.setIconType(ia.ICON_TYPE_QUESTION);I.setTipsText("appSecret");I=I.getJqUi();I.addClass("dm-notice-icon");V.layoutCtrl(I,367,4,16,16);I.appendTo(R);v=new ya;v.setTabindex(2);I=v.getJqUi();V.layoutCtrl(I,410,0,170,23);I.appendTo(R);I=ta();I.appendTo(R);var O=
Sa();O.appendTo(R);x?O.hide():I.hide();h?ua().appendTo(R):Ba().appendTo(R)};var ta=function(){var R=$("<div>"),I=new na(E.get("proxyUser","\u4ee3\u7406\u7528\u6237\u540d"));I.setRequired(!0);I=I.getJqUi();V.layoutCtrl(I,10,30,90,23);I.appendTo(R);xa=new sa;I=xa.getJqUi();V.layoutCtrl(I,110,30,170,23);I.appendTo(R);return R},Sa=function(){var R=$("<div>"),I=(new na(E.get("usertype","\u7528\u6237\u7c7b\u578b"))).getJqUi();I.attr("title",E.get("usertype","\u7528\u6237\u7c7b\u578b"));V.layoutCtrl(I,10,
30,80,23);I.appendTo(R);I=new Ra;I.setItemModels(ha);if(n&&n.getUserType()){var O=za.indexOf(n.getUserType());I.setSelected(ha[O]);Da=n.getUserType()}else Da=za[0],I.setSelected(ha[0]);I.setCustomPainter(function(Ma,Oa,Ga){Oa.text(Ga.getTypeName())});I.addSelectedChangedListener(function(Ma,Oa,Ga){Da=Ga.getTypeCode();t.setText(Ga.getTypeName());F.setText()});I=I.getJqUi();V.layoutCtrl(I,110,30,170,23);I.appendTo(R);t=new na(E.get("mobile","\u624b\u673a\u53f7"));t.setRequired(!0);I=t.getJqUi();V.layoutCtrl(I,
10,60,90,23);I.appendTo(R);F=new sa;I=F.getJqUi();V.layoutCtrl(I,110,60,170,23);I.appendTo(R);return R},ua=function(){var R=$("<div>"),I=x?-30:0,O=(new na(E.get("cosmicType","\u8ba4\u8bc1\u670d\u52a1\u5668"))).getJqUi();V.layoutCtrl(O,10,I+90,80,23);O.appendTo(R);O=new Ra;O.setItemModels(Ia);if(!n||n.getCosmicType()&&n.getCosmicType()!=g[1])T=g[0],O.setSelected(Ia[0]);else{T=g[1];O.setSelected(Ia[1]);var Ma=Ba();Ma.appendTo(R)}O.setCustomPainter(function(Oa,Ga,Qa){Ga.text(Qa.getTypeName())});O.addSelectedChangedListener(function(Oa,
Ga,Qa){T=Qa.getTypeCode();T===g[0]?Ma.empty():(Ma=Ba(),Ma.appendTo(R))});O=O.getJqUi();V.layoutCtrl(O,110,I+90,170,23);O.appendTo(R);return R},Ba=function(){var R=$("<div>");var I=h?30:0;I+=x?-30:0;var O=new na(E.get("accountid","\u6570\u636e\u4e2d\u5fc3id"));O.setRequired(!0);O=O.getJqUi();O.attr("title",E.get("accountid","\u6570\u636e\u4e2d\u5fc3id"));V.layoutCtrl(O,10,I+90,68,23);O.appendTo(R);O=new ia;O.setIconType(ia.ICON_TYPE_QUESTION);O.setTipsText("accountid");O=O.getJqUi();O.addClass("dm-notice-icon");
V.layoutCtrl(O,78,I+94,16,16);O.appendTo(R);ra=new sa;ra.setTabindex(1);O=ra.getJqUi();V.layoutCtrl(O,110,I+90,170,23);O.appendTo(R);O=(new na(E.get("tenantid","\u79df\u6237id"))).getJqUi();O.attr("title",E.get("tenantid","\u79df\u6237id"));V.layoutCtrl(O,310,I+90,42,23);O.appendTo(R);O=new ia;O.setIconType(ia.ICON_TYPE_QUESTION);O.setTipsText("tenantid");O=O.getJqUi();O.addClass("dm-notice-icon");V.layoutCtrl(O,352,I+94,16,16);O.appendTo(R);G=new ya;G.setTabindex(2);O=G.getJqUi();V.layoutCtrl(O,
410,I+90,170,23);O.appendTo(R);O=new na(E.get("serverAddress","\u670d\u52a1\u5668\u5730\u5740"));O.setRequired(!0);O=O.getJqUi();O.attr("title",E.get("serverAddress","\u670d\u52a1\u5668\u5730\u5740"));V.layoutCtrl(O,10,I+120,68,23);O.appendTo(R);O=new ia;O.setIconType(ia.ICON_TYPE_QUESTION);var Ma=E.get("forExample","\u4f8b\u5982\uff1a")+"http://localhost:8080/ierp/";O.setTipsText(Ma);O=O.getJqUi();O.addClass("dm-notice-icon");V.layoutCtrl(O,78,I+124,16,16);O.appendTo(R);Q=new sa;O=Q.getJqUi();V.layoutCtrl(O,
110,I+120,470,23);O.appendTo(R);return R};this.protectedUpdateModelToUI=function(){ea.setChecked(n.getTokenEnhanced());m.setText(n.getAppId());v.setPassword(Aa.decode(n.getAppSecret()));Q&&(Q.setText(n.getCosmicServerAddress()),ra.setText(n.getAccountId()),G.setPassword(n.getTenantId()));if(n.getUserType()){for(var R=0;R<ha.length;R++)if(ha[R].getTypeCode()==n.getUserType()){t.setText(ha[R].getTypeName());break}F.setText(n.getUserTypeValue())}xa.setText(n.getProxyUser())};this.protectedGetModelFromUI=
function(){var R=new X;R.setTokenEnhanced(ea.isChecked());R.setAppId($.trim(m.getText()));R.setAppSecret(Aa.encode($.trim(v.getPassword())));R.setUserType(Da);R.setUserTypeValue($.trim(F.getText()));R.setProxyUser($.trim(xa.getText()));R.setCosmicType(T);h&&T!=g[1]||(R.setCosmicServerAddress($.trim(Q.getText())),R.setAccountId($.trim(ra.getText())),R.setTenantId(G.getPassword()));return R};this.protectedCheckParams=function(){if(!$.trim(m.getText()))return E.get("appIdNotNull","\u7cfb\u7edf\u7f16\u7801\u4e0d\u80fd\u4e3a\u7a7a\u3002");
if(!$.trim(v.getPassword()))return E.get("appSecretNotNull","\u8ba4\u8bc1\u5bc6\u94a5\u4e0d\u80fd\u4e3a\u7a7a\u3002");if(x&&!$.trim(xa.getText())||!x&&!$.trim(F.getText()))return E.get("userInfoNotNull","\u7528\u6237\u4fe1\u606f\u4e0d\u80fd\u4e3a\u7a7a\u3002");if(!h||T==g[1]){if(!$.trim(ra.getText()))return E.get("accountIdNotNull","\u6570\u636e\u4e2d\u5fc3id\u4e0d\u80fd\u4e3a\u7a7a\u3002");if(!$.trim(Q.getText()))return E.get("serverAddressNotNull","\u670d\u52a1\u5668\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a\u3002")}if(50<
$.trim(m.getText()).length)return E.get("appIdTooLong","\u7cfb\u7edf\u7f16\u7801\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(100<$.trim(v.getPassword()).length)return E.get("appSecretTooLong","\u8ba4\u8bc1\u5bc6\u94a5\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7100\u4e2a\u5b57\u7b26\u3002");if(x&&50<$.trim(xa.getText()).length||!x&&50<$.trim(F.getText()).length)return E.get("userInfoTooLong","\u7528\u6237\u4fe1\u606f\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(!h||
T==g[1]){if(50<$.trim(ra.getText()).length)return E.get("accountIdTooLong","\u6570\u636e\u4e2d\u5fc3id\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(50<$.trim(G.getPassword()).length)return E.get("tenantIdTooLong","\u79df\u6237id\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(100<$.trim(Q.getText()).length)return E.get("serverAddressTooLong","\u670d\u52a1\u5668\u5730\u5740\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7100\u4e2a\u5b57\u7b26\u3002")}return null}});C=new function(){var c;
this.hookCollector=function(a){c=a};this.occur=function(a,l,n){try{c&&c(a,l,n)}catch(x){window.console&&console.warn(x)}};this.getDetailType=function(a){var l=com.kingdee.bos.qing.modeler.modelset.source.model.ModelerSourceType,n=a.getModelerSource();switch(a.getSourceType()){case l.DBSource:return n.getDbType();case l.PublicDBSource:return n.getPublicSourceType();case l.FileSource:return n.getFileType()}return""}};C.SOURCE_TYPE="source-type";aa.UserOperationReporter=C})();(function(){function W(p){var K=this,A,B,y,r,w,H,M=!1,u,e={};this.setMessageCurtain=function(D){y=D};this.getJqUi=function(){A||b();return A};var b=function(){A=$("<div class='source-manage-content'>");if("true"!=ca.getIsPreset()){var D=$("<div class='source-manage-content-card'>"),J=$("<div class='source-manage-content-card-creator-icon'>");X.background(J,"CreatorIcon");var P=$('<div class="source-manage-content-card-creator">');P.text(g.get("createSourceConnection","\u65b0\u5efa\u6570\u636e\u6e90\u8fde\u63a5"));
P.attr(g.get("createSourceConnection","\u65b0\u5efa\u6570\u636e\u6e90\u8fde\u63a5"));D.append(J);D.append(P);D.on("mouseover",function(){X.background(J,"CreatorIcon_hover")});D.on("mouseleave",function(){X.background(J,"CreatorIcon")});D.on("click",L);A.append(D)}};this.setSourceVOs=function(D){H=D;f()};this.setSelectSourceType=function(D){r=D;f()};this.setSearchText=function(D){u=D;M=0==D.length?!1:!0;f()};this.addModel=function(D){H||(H=[]);H.unshift(D);w=D;f()};this.removeModel=function(D){H&&
(D=H.indexOf(D),-1<D&&H.splice(D,1),f())};var f=function(){var D=function(oa){oa=oa.getSearchContent();for(var Ha=0;Ha<oa.length;Ha++)if(-1<oa[Ha].toUpperCase().indexOf(u))return!0;return!1},J=function(oa){oa=oa.getSourceType();return H[S].getSourceType()==r||r==G.ERPCloud&&(oa==F.ERPCloudEntity||oa==F.ERPCloudDBCenter)||r==G.PublicSource&&oa==F.PublicDBSource||r==G.ModelSet&&oa==F.ModelSet?!0:!1};B&&B.remove();B=$("<div>");if(H){for(var P=[],S=0;S<H.length;S++)if(!u||D(H[S]))if(!r||J(H[S])){P.push(H[S]);
var fa=a.getImpl(H[S]);fa.setMessageCurtain(y);fa.setSelectedListener(d);fa.setSearchTarget(M,u);fa.setEditListener(k);fa.setDeleteListener(q);e[H[S].getId()]=fa;fa=fa.getJqUi();B.append(fa)}A.append(B)}},d=function(D){if(w){var J=e[w.getId()];J&&J.setSelected(!1)}w=D},k=function(D){D=w.getSourceType();D=D==F.DBSource?new ba(w,p,y):D==F.FileSource?new Ka(w,p,y):D==F.OpenAPI?new Ra(w,p,y):new ya(w,p,y);D.setEditSuccessCallback(function(J){y.showSuccess(g.get("editSuccess","\u7f16\u8f91\u6210\u529f\u3002"));
w.fromJsonObject(J);f()});D.createDialog()},q=function(){if(w){var D=new ja(p,function(J){var P=J.length;if(0<P){var S=new La;S.fromJsonObject(J[0]);var fa;J=S.getFromType();S=S.getModelName();1==P?J==La.FROM_TYPE_MODEL?fa=g.get("sourceRefBySingleModel",'"#1"\u6570\u636e\u6e90\u8fde\u63a5\u5df2\u88ab"#2"\u6a21\u578b\u5f15\u7528\uff0c\u8bf7\u5148\u5220\u9664\u6a21\u578b\u4e2d\u7684\u6570\u636e\u6e90\u5f15\u7528\u4fe1\u606f\uff0c\u518d\u5220\u9664\u8be5\u6570\u636e\u6e90\u8fde\u63a5\u3002').replace("#1",
w.getSourceName()).replace("#2",S):J==La.FROM_TYPE_DEPLOY&&(fa=g.get("sourceRefBySingleDeploy",'"#1"\u6570\u636e\u6e90\u8fde\u63a5\u88ab\u5df2\u90e8\u7f72\u7684\u6a21\u578b"#2"\u5f15\u7528\uff0c\u8bf7\u5148\u5c06\u6a21\u578b\u53d6\u6d88\u90e8\u7f72\uff0c\u518d\u5220\u9664\u8be5\u6570\u636e\u6e90\u8fde\u63a5\u3002').replace("#1",w.getSourceName()).replace("#2",S)):J==La.FROM_TYPE_MODEL?fa=g.get("sourceRefByMultipleModel",'"#1"\u6570\u636e\u6e90\u8fde\u63a5\u5df2\u88ab"#2"\u7b49#3\u4e2a\u6a21\u578b\u5f15\u7528\uff0c\u8bf7\u5148\u5220\u9664\u6a21\u578b\u4e2d\u7684\u6570\u636e\u6e90\u5f15\u7528\u4fe1\u606f\uff0c\u518d\u5220\u9664\u8be5\u6570\u636e\u6e90\u8fde\u63a5\u3002').replace("#1",
w.getSourceName()).replace("#2",S).replace("#3",P):J==La.FROM_TYPE_DEPLOY&&(fa=g.get("sourceRefByMultipleDeploy",'"#1"\u6570\u636e\u6e90\u8fde\u63a5\u5df2\u88ab"#2"\u7b49#3\u4e2a\u5df2\u90e8\u7f72\u7684\u6a21\u578b\u5f15\u7528\uff0c\u8bf7\u5148\u5c06\u6a21\u578b\u53d6\u6d88\u90e8\u7f72\uff0c\u518d\u5220\u9664\u8be5\u6570\u636e\u6e90\u8fde\u63a5\u3002').replace("#1",w.getSourceName()).replace("#2",S).replace("#3",P));y.showPrompt(fa)}else P=Oa.createFeedbackDialog(),P.setOptionType(Oa.OPTION_OK_CANCEL),
P.setMsgImageType(Oa.MSG_DELETE),P.setMessage(g.get("confirmDeleteSource","\u786e\u5b9a\u5220\u9664\u8be5\u6570\u636e\u6e90\u8fde\u63a5\u5417\uff1f")),P.setClosingChecker(function(oa){oa==Oa.RETURN_OK&&(new ja(p,function(){K.removeModel(w);y.showSuccess(g.get("deleteSourceSuccess","\u5220\u9664\u6570\u636e\u6e90\u8fde\u63a5\u6210\u529f\u3002"))},function(Ha,tb){return 20002007===Ha?(y.showPrompt(g.get("noCurrentModelSetPerm","\u5f53\u524d\u6a21\u578b\u96c6\u7684\u521b\u5efa\u8005\u6216\u7ba1\u7406\u5458\u5df2\u5c06\u60a8\u4ece\u534f\u4f5c\u6210\u5458\u4e2d\u79fb\u9664\uff0c\u65e0\u6cd5\u8fdb\u884c\u6b64\u64cd\u4f5c\u3002")),
!0):20002008===Ha?(y.showError(g.get("sourceIsRefenrenced","\u5220\u9664\u5931\u8d25\u3002\u8be5\u6570\u636e\u6e90\u8fde\u63a5\u5df2\u88ab\u5f15\u7528\u3002")),!0):20003301===Ha?(y.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),!0):!1})).deleteModelSetSource(w.getId(),ca.getModelSetId());return!0}),P.showDialog()});D.setShowBlocking(!0);D.loadRefModelInfos(w.getId())}},L=function(){var D=new Z(p);D.setMessageCurtain(y);D.setCreateSuccessCallback(function(P){var S=
new qa;S.fromJsonObject(P);K.addModel(S);y.showSuccess(g.get("saveSuccess","\u65b0\u5efa\u6570\u636e\u6e90\u8fde\u63a5\u6210\u529f\u3002"));ib.occur(ib.SOURCE_TYPE,S.getSourceType(),ib.getDetailType(S))});var J=new R;J.setTitle(g.get("createSourceConnection","\u65b0\u5efa\u6570\u636e\u6e90\u8fde\u63a5"));J.setSteps([D]);J.show(960,540)}}function Z(p){ea.call(this);var K=this,A=this.protectedMethod,B,y,r=[],w;G.NEW_SOURCES=[new G(G.DBSource,g.get("database","\u6570\u636e\u5e93"),"db_source",!1),new G(G.FileSource,
g.get("file","\u6587\u4ef6"),"file_source",!1)];G.EXISTING_SOURCE=[new G(G.ERPCloud,g.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79"),"biz_source",!1),new G(G.PublicSource,g.get("publicDataSource","\u516c\u5171\u6570\u636e\u6e90"),"public_source",!1),new G(G.ModelSet,g.get("modelSet","\u6a21\u578b\u96c6"),"modelSet_source",!1)];G.K3CLOUD_NEW_SOURCES=[new G(G.FileSource,g.get("file","\u6587\u4ef6"),"file_source",!1),new G(G.DBSource,g.get("database","\u6570\u636e\u5e93"),"db_source",!0)];G.K3CLOUD_EXISTING_SOURCE=
[new G(G.ERPCloud,g.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79"),"biz_source",!1),new G(G.ModelSet,g.get("modelSet","\u6a21\u578b\u96c6"),"modelSet_source",!1),new G(G.PublicSource,g.get("publicDataSource","\u516c\u5171\u6570\u636e\u6e90"),"public_source",!0)];this.setMessageCurtain=function(d){B=d};this.setCreateSuccessCallback=function(d){y=d};this.getSubTitle=function(){return g.get("selectDataSourceType","\u9009\u62e9\u6570\u636e\u6e90\u7c7b\u578b")};this.protectedCreateUi=function(){var d=
$("<div>");d.addClass("source-manage-source-type-main");if(cb){var k=G.K3CLOUD_NEW_SOURCES;var q=G.K3CLOUD_EXISTING_SOURCE}else k=G.NEW_SOURCES,q=G.EXISTING_SOURCE;var L=H(k,g.get("createNewDatabase","\u521b\u5efa\u4e00\u4e2a\u65b0\u6570\u636e\u6e90"),d,"120px","0px"),D=H(q,g.get("reSourceAuthToMe","\u5f15\u5165\u6388\u6743\u7ed9\u6211\u7684\u6570\u636e\u6e90"),d,"120px","0px");r.push(L);r.push(D);M(L.getJqUi(),k,1);M(D.getJqUi(),q,1);k=$("<div>");k.append(d);return k};var H=function(d,k,q,L,D){var J=
$("<div>");J.addClass("dm-source-type-typelist");J.css("height",L);J.css("top",D);J.appendTo(q);null!=k&&(q=$("<div>"),q.addClass("dm-source-type-typelist-title"),q.text(k),q.appendTo(J),cb&&(k=$("<div>"),k.text(g.get("sourceDisabled","\uff08\u5f53\u524d\u8f7b\u5efa\u6a21\u8bb8\u53ef\u6a21\u5f0f\u4e0b\uff0c\u4ee5\u4e0b\u90e8\u5206\u6570\u636e\u6e90\u7c7b\u578b\u4e0d\u53ef\u7528\uff09")),k.css({width:"350px",height:"26px","line-height":"20px","font-weight":" bold",color:"orange",display:"inline-block"}),
k.appendTo(q)));k=new I;k.setItemModels(d);k.setBorderVisible(!1);k.setCustomItemPainter(u);k.setCustomSelectedsPainter(e);d=k.getJqUi();d.addClass("dm-source-type-typelist-list");d.appendTo(J);k.addPressedListener(b);return k},M=function(d,k,q){if(cb){var L=$("<div>");L.css({height:"83px",position:"relative",width:130*q+"px",left:126*(k.length-q)+"px",opacity:"0.5","background-color":"#E5E5E5"});L.appendTo(d)}},u=function(d,k){d.attr("title",k.getText());d.addClass("dm-source-type-typelist-item");
var q=$("<div>");q.addClass("dm-source-type-typelist-item-icon");X.background(q,k.getIconName());q.appendTo(d);q=$("<div>");q.addClass("dm-source-type-typelist-item-text");q.text(k.getText());q.appendTo(d)},e=function(d,k){for(var q=0;q<d.length;q++){var L=d[q];L.removeClass("dm-source-type-typelist-item_selected");L.find(".dm-source-type-typelist-item_selected-mark").remove();L.find(".dm-source-type-typelist-item_selected-icon").remove()}for(q=0;q<k.length;q++)L=k[q],L.addClass("dm-source-type-typelist-item_selected"),
d=$("<div>"),d.addClass("dm-source-type-typelist-item_selected-mark"),d.appendTo(L),d=$("<div>"),X.background(d,"checked"),d.addClass("dm-source-type-typelist-item_selected-icon"),d.appendTo(L)},b=function(d){for(var k=0;k<r.length;k++)r[k]!=d&&r[k].setSelecteds([]);d=d.getSelecteds();w=0<d.length?d[0]:null};this.intoThisStep=function(d,k){};this.outThisStep=function(d,k){if(!w||w.isDisabled())A.getMessageCurtain().showPrompt(g.get("selectAnDataSource","\u8bf7\u9009\u4e2d\u4e00\u9879\u6570\u636e\u6e90\u3002")),
k(K);else{var q;f(G.NEW_SOURCES)?w.getName()==G.DBSource?q=new Y(p,B):w.getName()==G.FileSource?q=new Ja(p,B):w.getName()==G.OpenAPI&&(q=new na(p,B)):f(G.EXISTING_SOURCE)&&(w.getName()==G.ERPCloud?q=new pa(p,B):w.getName()==G.PublicSource?q=new sa(p,B):w.getName()==G.ModelSet&&(q=new V(p,B)));q.setCreateSuccessCallback(y);k([q])}};var f=function(d){for(var k=0;k<d.length;k++)if(w.getName()==d[k].getName())return!0;return!1}}function Y(p,K){ea.call(this);var A=this,B=this.protectedMethod,y,r,w=[];
G.DB_SOURCES=[new G(Q.TYPE_SQLSERVER,"SQL Server","SQLSERVER"),new G(Q.TYPE_ORACLE,"ORACLE","ORACLE"),new G(Q.TYPE_MYSQL,"MySQL","MYSQL"),new G(Q.TYPE_POSTGRESQL,"Postgre SQL","POSTGRESQL"),new G(Q.TYPE_DB2,"DB2","DB2"),new G(Q.TYPE_ACCESS,"Access","ACCESS"),new G(Q.TYPE_SQLITE,"SQLite","SQLITE"),new G(Q.TYPE_HIVE,"Apache Hive","HIVE"),new G(Q.TYPE_HANA,"HANA","HANA"),new G(Q.TYPE_ODPS,"ODPS","ODPS"),new G(Q.TYPE_REDSHIFT,"Amazon Redshift","REDSHIFT"),new G(Q.TYPE_SYBASE,"SYBASE","SYBASE"),new G(Q.TYPE_TIDB,
"TiDB","TIDB"),new G(Q.TYPE_DM,"DM","DM"),new G(Q.TYPE_GREENPLUM,"Greenplum","GREENPLUM"),new G(Q.TYPE_GAUSSDB,"GaussDB","GAUSSDB"),new G(Q.TYPE_APACHEDRILL,"Apache Drill","APACHEDRILL"),new G(Q.TYPE_SPARKSQL,"Spark SQL","SPARKSQL"),new G(Q.TYPE_SYBASEIQ,"Sybase IQ","SYBASEIQ"),new G(Q.TYPE_IMPALA,"Apache Impala","IMPALA"),new G(Q.TYPE_KYLIN,"Apache Kylin","KYLIN"),new G(Q.TYPE_DORIS,"Apache Doris","DORIS"),new G(Q.TYPE_KINGBASE,"KingBase","KINGBASE"),new G(Q.TYPE_TDSQL,"TDSQL","TDSQL"),new G(Q.TYPE_GBASE,
"GBase","GBASE"),new G(Q.TYPE_VASTBASE,"Vastbase","VASTBASE"),new G(Q.TYPE_YASHANDB,"YashanDB","YASHANDB")];this.setCreateSuccessCallback=function(e){y=e};this.getSubTitle=function(){return g.get("database","\u6570\u636e\u5e93")};this.protectedCreateUi=function(){var e=$("<div>");e.addClass("source-manage-source-type-main");var b=w.push,f=G.DB_SOURCES,d=g.get("database","\u6570\u636e\u5e93");var k=88*Math.ceil(G.DB_SOURCES.length/7)+26+"px";var q=$("<div>");q.addClass("dm-source-type-typelist");q.css("height",
k);q.css("top",void 0);q.appendTo(e);null!=d&&(k=$("<div>"),k.addClass("dm-source-type-typelist-title"),k.text(d),k.appendTo(q));d=new I;d.setItemModels(f);d.setBorderVisible(!1);d.setCustomItemPainter(H);d.setCustomSelectedsPainter(M);f=d.getJqUi();f.addClass("dm-source-type-typelist-list");f.appendTo(q);d.addPressedListener(u);b.call(w,d);b=$("<div>");b.append(e);return b};var H=function(e,b){e.attr("title",b.getText());e.addClass("dm-source-type-typelist-item");var f=$("<div>");f.addClass("dm-source-type-typelist-item-icon");
X.background(f,b.getIconName());f.appendTo(e);f=$("<div>");f.addClass("dm-source-type-typelist-item-text");f.text(b.getText());f.appendTo(e)},M=function(e,b){for(var f=0;f<e.length;f++){var d=e[f];d.removeClass("dm-source-type-typelist-item_selected");d.find(".dm-source-type-typelist-item_selected-mark").remove();d.find(".dm-source-type-typelist-item_selected-icon").remove()}for(f=0;f<b.length;f++)d=b[f],d.addClass("dm-source-type-typelist-item_selected"),e=$("<div>"),e.addClass("dm-source-type-typelist-item_selected-mark"),
e.appendTo(d),e=$("<div>"),X.background(e,"checked"),e.addClass("dm-source-type-typelist-item_selected-icon"),e.appendTo(d)},u=function(e){for(var b=0;b<w.length;b++)w[b]!=e&&w[b].setSelecteds([]);e=e.getSelecteds();r=0<e.length?e[0]:null};this.intoThisStep=function(e,b){};this.outThisStep=function(e,b){e?b(null):r?(e=new N,e.setDbType(r.getName()),e=A.createNextDbConnectStep(e),b([e])):(B.getMessageCurtain().showPrompt(g.get("selectAnDataSource","\u8bf7\u9009\u4e2d\u4e00\u9879\u6570\u636e\u6e90\u3002")),
b(A))};this.createNextDbConnectStep=function(e){var b=new aa(p,K);b.setCreateSuccessCallback(y);b.setSource(e);return b}}function aa(p,K){ea.call(this);var A=this.protectedMethod,B,y,r,w,H;this.setCreateSuccessCallback=function(M){w=M};this.setSource=function(M){B=M;y=new qa;y.setSourceType(F.DBSource);y.setModelerSource(B)};this.getSource=function(){return B};this.getSubTitle=function(){return g.get("connectDbServer","\u8fde\u63a5\u6570\u636e\u5e93\u670d\u52a1\u5668")};this.protectedCreateUi=function(){r||
(r=new wa(p),r.setOuterMessageCurtain(A.getMessageCurtain()));r.setModel(y);return H=r.getJqUi()};this.intoThisStep=function(){};this.outThisStep=function(M,u){if(M)u(null);else{var e=function(b){var f,d=!0;(b=b.getSourceName())?50<b.length&&(f=g.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002")):f=g.get("emptyName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002");f&&(A.getMessageCurtain().showPrompt(f),d=!1);return d};(function(){var b=r.getModel();if(e(b))r.isModelValid(b.getModelerSource(),
function(){(new ja(p,function(f){w&&w(f);u(null);return!0},function(f,d){return 20002003===f?(A.getMessageCurtain().showPrompt(g.get("duplicateName","\u540d\u79f0\u91cd\u590d\u3002")),!0):20002002===f?(A.getMessageCurtain().showPrompt(g.get("duplicateHashcode","\u5df2\u5b58\u5728\u8fde\u63a5\u4fe1\u606f\u76f8\u540c\u7684\u6570\u636e\u6e90\u8fde\u63a5\u3002")),!0):20003301===f?(K.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),
u(null),!0):!1})).saveModelSetSource(b)},function(f){A.getMessageCurtain().showPrompt(f);return!1});else return!1})()}};this.isLastStep=function(){return!0}}function ba(p,K,A){Ga.call(this);var B=this.protectedMethod,y,r,w,H=[960,540];this.setEditSuccessCallback=function(u){w=u};this.createDialog=function(){var u=$(document.body),e=$("<div class='sa-ctrl-common-modallayer'>");e.appendTo(u);var b=new Ia(e);b.setSelectable(!0);var f=g.get("editSourceConnection","\u7f16\u8f91\u6570\u636e\u6e90\u8fde\u63a5");
b.setTitle(f);r=b.getMessageCurtain();f=H[0];var d=H[1],k=u.prop("clientWidth"),q=u.prop("clientHeight");b.setBounds(k-f>>1,q-d>>1,f,d);b.setToolbarVisible(!1);f=b.setContent;y=new wa(K);y.setOuterMessageCurtain(r);y.setModel(p);d=y.getJqUi();f.call(b,d);b.showFooterPane();e.appendTo(u);var L=function(){b.destroy();e.remove()};b.addClosingListener(function(D,J){J?M(L):L()});return b};var M=function(u){var e=y.getModel();(function(b){var f,d=!0;(b=b.getSourceName())?50<b.length&&(f=g.get("nameTooLong",
"\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002")):f=g.get("emptyName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002");f&&(r.showPrompt(f),d=!1);return d})(e)&&y.isModelValid(e.getModelerSource(),function(){var b=p.copy();b.setModelerSource(e.getModelerSource());b.setSourceName(e.getSourceName());b.setModelSetId(ca.getModelSetId());var f=new ja(K,function(d){u();w&&w(d)},function(d,k){return 20002003==d?(r.showPrompt(g.get("duplicateName","\u540d\u79f0\u91cd\u590d\u3002")),!0):
20002002===d?(r.showPrompt(g.get("duplicateHashcode","\u5df2\u5b58\u5728\u8fde\u63a5\u4fe1\u606f\u76f8\u540c\u7684\u6570\u636e\u6e90\u8fde\u63a5\u3002")),!0):20002004===d?(r.showPrompt(g.get("source_no_found","\u9009\u4e2d\u7684\u6570\u636e\u6e90\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20003301===d?(u(),A.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),!0):!1});f.updateModelSetSource(b);f.setShowBlocking(!0)},
function(b){B.getMessageCurtain().showPrompt(b);return!1})}}function wa(p){var K,A,B,y,r,w=!0,H;this.setOuterMessageCurtain=function(u){H=u;y&&y.setOuterMessageCurtain(H)};this.setModel=function(u){if(K=u)if(u=K.getModelerSource().getDbType(),u==Q.TYPE_ACCESS||u==Q.TYPE_SQLITE)w=!1;B||M();u=K.getSourceName();var e=K.getModelerSource(),b=e.getDbType();B.setText(u);y=z.getDBConnectionPanel(b,p);y.setMoveDBList2Right(w);H&&y.setOuterMessageCurtain(H);y.setModel(e,K.getId())};this.getModel=function(){var u=
K?K.copy():new qa;var e=y.getModel();u.setModelSetId(ca.getModelSetId());var b=y.getAdvanceSettingModel();e.setAdvanceSetting(b);b=(b=B.getText())&&b.replace(/\s+/g,"");u.setSourceName(b);u.setModelerSource(e);return u};this.isModelValid=function(u,e,b){return y.isModelValid(u,e,b)};this.getJqUi=function(){if(A)return A;A=$("<div>");var u=$("<div>");u.addClass("source-manage-source-db-split-line");w&&A.append(u);B||M();u=K.getModelerSource().getTypeName();u=C.getDisplayName(u);var e=$("<div>");e.addClass("source-manage-source-db-source-type");
e.text(u);A.append(e);e=new ha;u=e.getJqUi();e.setText(g.get("name","\u540d\u79f0"));e=B.getJqUi();r=y.getJqUi();T.layoutCtrl(u,20,36,80,23);T.layoutCtrl(e,110,36,300,23);T.layoutCtrl(r,20,79,375,300);A.append(u);A.append(e);A.append(r);return A};var M=function(){B=new ta;var u=K.getModelerSource().getTypeName();y=z.getDBConnectionPanel(u,p);y.setOuterMessageCurtain(H)}}function Ja(p,K){ea.call(this);var A=this,B=this.protectedMethod,y,r,w=[];G.FILE_SOURCES=[new G(l.TYPE_EXCEL,"Excel","EXCEL"),new G(l.TYPE_CSV,
"CSV","CSV"),new G(l.TYPE_TXT,"TXT","TXT",!1,!0),new G(l.TYPE_XML,"XML","XML")];this.setCreateSuccessCallback=function(e){y=e};this.getSubTitle=function(){return g.get("file","\u6587\u4ef6")};this.protectedCreateUi=function(){var e=$("<div>");e.addClass("source-manage-source-type-main");var b=w.push,f=G.FILE_SOURCES,d=g.get("file","\u6587\u4ef6"),k=$("<div>");k.addClass("dm-source-type-typelist");k.css("height","120px");k.css("top",void 0);k.appendTo(e);if(null!=d){var q=$("<div>");q.addClass("dm-source-type-typelist-title");
q.text(d);q.appendTo(k)}d=new I;d.setItemModels(f);d.setBorderVisible(!1);d.setCustomItemPainter(H);d.setCustomSelectedsPainter(M);f=d.getJqUi();f.addClass("dm-source-type-typelist-list");f.appendTo(k);d.addPressedListener(u);b.call(w,d);b=$("<div>");b.append(e);return b};var H=function(e,b){e.attr("title",b.getText());e.addClass("dm-source-type-typelist-item");var f=$("<div>");f.addClass("dm-source-type-typelist-item-icon");X.background(f,b.getIconName());f.appendTo(e);f=$("<div>");f.addClass("dm-source-type-typelist-item-text");
f.text(b.getText());f.appendTo(e)},M=function(e,b){for(var f=0;f<e.length;f++){var d=e[f];d.removeClass("dm-source-type-typelist-item_selected");d.find(".dm-source-type-typelist-item_selected-mark").remove();d.find(".dm-source-type-typelist-item_selected-icon").remove()}for(f=0;f<b.length;f++)d=b[f],d.addClass("dm-source-type-typelist-item_selected"),e=$("<div>"),e.addClass("dm-source-type-typelist-item_selected-mark"),e.appendTo(d),e=$("<div>"),X.background(e,"checked"),e.addClass("dm-source-type-typelist-item_selected-icon"),
e.appendTo(d)},u=function(e){for(var b=0;b<w.length;b++)w[b]!=e&&w[b].setSelecteds([]);e=e.getSelecteds();r=0<e.length?e[0]:null};this.intoThisStep=function(e,b){};this.outThisStep=function(e,b){e?b(null):r?(e=r.getName()==l.TYPE_EXCEL?new n:r.getName()==l.TYPE_XML?new x:new h,e.setFileType(r.getName()),e=A.createNextFileConnectStep(e),b([e])):(B.getMessageCurtain().showPrompt(g.get("selectAnDataSource","\u8bf7\u9009\u4e2d\u4e00\u9879\u6570\u636e\u6e90\u3002")),b(A))};this.createNextFileConnectStep=
function(e){var b=new Ca(p,K);b.setSource(e);b.setCreateSuccessCallback(y);return b}}function Ca(p,K){ea.call(this);var A=this,B=this.protectedMethod,y,r,w;this.setSource=function(H){y=H};this.setCreateSuccessCallback=function(H){w=H};this.getSubTitle=function(){return g.get("uploadFile","\u4e0a\u4f20\u6587\u4ef6")};this.protectedCreateUi=function(){r=new ia;r.setCtxApi(A.getCtxApi());var H=za.getUrlParamValue("flatFileSize");r.setFileSize(H?H:100);r.setSource(y.clone());r.setMessageCurtain(B.getMessageCurtain());
return r.getJqUi()};this.intoThisStep=function(H,M){};this.outThisStep=function(H,M){if(H)M(null);else if(r.getConnectionName())if(50<r.getConnectionName().length)B.getMessageCurtain().showPrompt(g.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"));else if(r.hasUploadFile()){H=new qa;var u=r.getSource();H.setModelerSource(u);H.setModelSetId(ca.getModelSetId());H.setSourceType(F.FileSource);H.setSourceName(r.getConnectionName());(new ja(p,function(e){w&&
w(e);M(null);return!0},function(e,b){return 20002003===e?(B.getMessageCurtain().showPrompt(g.get("duplicateName","\u540d\u79f0\u91cd\u590d\u3002")),!0):20003301===e?(K.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),M(null),!0):!1})).saveModelSetSource(H)}else B.getMessageCurtain().showPrompt(g.get("pleaseUploadFile","\u8bf7\u5148\u4e0a\u4f20\u6587\u4ef6\u3002"));else B.getMessageCurtain().showPrompt(g.get("emptyName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002"))};
this.isLastStep=function(){return!0}}function E(){function p(U,ka){this.toString=function(){return ka};this.getName=function(){return U}}var K=this,A,B=1,y=0,r,w,H,M,u,e,b,f,d,k=null;g.get("uploadFile","\u4e0a\u4f20\u6587\u4ef6");var q=!1,L={CSV:["csv"],TXT:["txt"],EXCEL:["xls","xlsx"],XML:["xml"]},D={XML:"text/xml",CSV:".csv",TXT:"text/plain",EXCEL:"application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},J=["CSV","TXT"],P=["CSV","TXT"],S=[new p(",",g.get("comma",
"\u9017\u53f7")),new p(";",g.get("semicolon","\u5206\u53f7")),new p(" ",g.get("space","\u7a7a\u683c")),new p("\t",g.get("tabs","\u5236\u8868\u7b26")),new p("\u81ea\u5b9a\u4e49",g.get("custom","\u81ea\u5b9a\u4e49"))],fa=[new p("UTF-8","UTF-8"),new p("UTF-16BE","UTF-16BE"),new p("UTF-16LE","UTF-16LE"),new p("GB2312","GB2312"),new p("GB18030","GB18030"),new p("GBK","GBK")],oa=[new p('"',g.get("doubleQuotationMark","\u53cc\u5f15\u53f7")),new p("'",g.get("singleQuotationMark","\u5355\u5f15\u53f7"))],Ha=
[new p("50",g.get("checkFirstFiftyLines","\u4ec5\u68c0\u6d4b\u524d50\u884c")),new p("100",g.get("checkFirstOneHundredLines","\u4ec5\u68c0\u6d4b\u524d100\u884c")),new p("-1",g.get("checkWholeFile","\u68c0\u6d4b\u6574\u4e2a\u6587\u4ef6"))];this.getConnectionName=function(){return $.trim(f.getText())};this.setConnectionName=function(U){d=U};this.protectedDefaultActOnOtherSource=function(){return!1};this.setCtxApi=function(U){};this.getJqUi=function(){A||(A=$("<div>"),w&&w.getFileName()?Db(function(){K.protectedInitUi(A)}):
K.protectedInitUi(A));return A};this.protectedInitUi=function(){var U=w.getFileType(),ka=$("<span>");ka.addClass("source-manage-source-file-connect-name");ka.text(g.get("name","\u540d\u79f0"));f=new ta;var la=f.getJqUi();la.addClass("source-manage-source-file-connect-name-value");d&&f.setText(d);var ma=$("<div style='text-align:center'>"),Na=$("<input type='file' id='fileToUpload' style='width:0;height:0;position:absolute;left:-100px'>");Na.attr("accept",D[U]);var Wa=$("<div type='button'>");Wa.on("click",
function(){Na.click()});Wa.addClass("dm-source-file-upload-btn_new");var Ta=$("<div>");Ta.css("text-align","center");var jb=$("<div>");jb.addClass("dm-source-file-upload-btn-text");jb.text(g.get("uploadFile","\u4e0a\u4f20\u6587\u4ef6"));var kb=$("<div>");kb.addClass("dm-source-file-upload-btn-icon");X.background(kb,"upload_icon_selected");var qb=$("<span>");qb.addClass("dm-source-file-upload-prompt_new");qb.text(g.get("acceptFile","\u652f\u6301#1\u6587\u4ef6\uff0c\u4e14\u6587\u4ef6\u4e0d\u5927\u4e8e#2M").replace("#1",
L[U]).replace("#2",B));var Ea=$("<div id='fileDetailProgress'>");Ea.addClass("dm-source-db-file-upload-detail_new");Ea.hide();var Pa=$("<div>");Pa.addClass("dm-source-file-upload-filename_new");var Ua=$("<div>");Ua.addClass("dm-source-file-upload-filesize_new");var va=$("<div>");va.addClass("dm-source-file-upload-setting");if(0<=J.indexOf(U)){var Xa=new ha(g.get("splitSign","\u5206\u9694\u7b26"));H=new Ba;H.setItemModels(S);H.setSelected(S[0]);M=new ta;var lb=new ha(g.get("characterSet","\u7f16\u7801"));
u=new Ba;u.setItemModels(fa);u.setSelected(fa[0]);var mb=new ha(g.get("textLimitSign","\u6587\u672c\u9650\u5b9a\u7b26"));e=new Ba;e.setItemModels(oa);e.setSelected(oa[0]);var Fa=new ha(g.get("defineTypeRowCount","\u6570\u636e\u7c7b\u578b\u68c0\u6d4b"));b=new Ba;b.setItemModels(Ha);b.setSelected(Ha[0]);var Ya=Xa.getJqUi();T.layoutCtrl(Ya,20,15,70,23);var Za=H.getJqUi();T.layoutCtrl(Za,105,15,120,23);Xa=M.getJqUi();T.layoutCtrl(Xa,230,15,120,23);lb=lb.getJqUi();T.layoutCtrl(lb,20,50,70,23);var ub=u.getJqUi();
T.layoutCtrl(ub,105,50,120,23);mb=mb.getJqUi();T.layoutCtrl(mb,20,85,70,23);var vb=e.getJqUi();T.layoutCtrl(vb,105,85,120,23);Fa=Fa.getJqUi();T.layoutCtrl(Fa,20,120,72,23);var db=b.getJqUi();T.layoutCtrl(db,105,120,120,23);va.append(Ya);va.append(Za);va.append(Xa);va.append(lb);va.append(ub);va.append(mb);va.append(vb);va.append(Fa);va.append(db);H.addSelectedChangedListener(tb);Xa.hide()}else Fa=new ha(g.get("defineTypeRowCount","\u6570\u636e\u7c7b\u578b\u68c0\u6d4b")),b=new Ba,b.setItemModels(Ha),
b.setSelected(Ha[0]),Fa=Fa.getJqUi(),T.layoutCtrl(Fa,20,20,72,23),db=b.getJqUi(),T.layoutCtrl(db,105,20,120,23),va.append(Fa),va.append(db);va.hide();if(w&&w.getFileName()){Ea.removeClass("dm-source-db-file-upload-detail_new");Ea.addClass("dm-source-file-upload-detail_new");Pa=$("<div>");Pa.addClass("dm-source-file-upload-filename_new");Ua=$("<div>");Ua.addClass("dm-source-file-upload-filesize_new");Ya=$("<div>");Ya.addClass("dm-source-file-upload-fileicon");Za=$("<progress id='progressBar' value='0' max='100'>");
Za.addClass("dm-source-file-upload-progress");q=!0;Fa=w.getFileName();X.background(Ya,"file_"+U.toLowerCase());Pa.text(Fa);Pa.attr("title",Fa);var Va;1048576>y?Va=(y/1024).toFixed(2)+"KB":1048576<=y&&(Va=(y/1048576).toFixed(2)+"M");Ua.text("("+Va+")");Ua.attr("title",Va);va.removeClass("dm-source-file-upload-setting");va.addClass("dm-source-file-upload-setting-reload_new");Za.hide();Ea.show();0<=J.indexOf(U)&&w.getSplitSign()&&(Va=w.getSplitSign(),Fa=$a(Va,S),0>S.indexOf(Fa)?(H.setSelected(S[S.length-
1]),M.setText(Va),Xa.show()):H.setSelected($a(w.getSplitSign(),S)),u.setSelected($a(w.getCharacterSet(),fa)),e.setSelected($a(w.getTextLimitSign(),oa)));b.setSelected($a(w.getDefineTypeRowCount(),Ha));va.show();Ea.append(Ya);Ea.append(Pa);Ea.append(Ua);Ea.append(Za)}else Ea.append(Pa),Ea.append(Ua);"placeholder"in $("<input>")[0]?(Na.change(function(nb){rb()}),Ta.append(kb),Ta.append(jb),Wa.append(Ta),ma.append(Na),ma.append(Wa),A.append(ma)):(ma=$("<form id='uploadForm' method='post' enctype='multipart/form-data' target='targetIframeC'>"),
Na=$("<input name='filename' type='file' id='fileToUpload' style='width:0;height:0;position:absolute;left:-100px' onchange='submit()' multiple/>"),Pa=$("<iframe name='targetIframeC' id='targetIframeC' style='height: 0;width: 0'>"),ma.attr("action","/qing_modeler/uploadFileForIE9.do?type="+L[U]),Ta.append(kb),Ta.append(jb),Wa.append(Ta),ma.append(Na),A.append(ma),A.append(Pa),A.append(Wa),Pa.on("load",function(nb){try{var wb=$(window.self.frames.targetIframeC.document).find("body");if(wb.html()){var eb=
JSON.parse(wb.html().toString()),fb=eb.fileName,ob=eb.fileSize;nb={};nb.name=fb;var sb=eb.errorCode;if("IE9001"==sb)r.showPrompt(g.get("fileTypeIncorrect","\u6587\u4ef6\u7c7b\u578b\u4e0d\u6b63\u786e\u3002"));else if("IE9002"==sb)r.showPrompt(g.get("fileTooLarge","\u6587\u4ef6\u5927\u5c0f\u8d85\u8fc7\u6700\u5927\u9650\u5236\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u6587\u4ef6\u3002"));else if("IE9003"==sb)r.showPrompt(g.get("uploadFileIsNull","\u4e0a\u4f20\u7684\u6587\u4ef6\u4e3a\u7a7a\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"));
else{var gb=A.find(".dm-source-file-upload-filename_new"),hb=A.find(".dm-source-file-upload-filesize_new"),ab;1048576>ob?ab=(ob/1024).toFixed(2)+"KB":1048576<=ob&&(ab=(ob/1048576).toFixed(2)+"M");gb.text(fb);hb.text("("+ab+")");gb.attr("title",fb);hb.attr("title",ab);var Eb=A.find(".dm-source-file-upload-fileicon");gb=A.find(".dm-source-file-upload-filename");hb=A.find(".dm-source-file-upload-filesize");X.background(Eb,"file_"+U.toLowerCase());gb.text(fb);hb.text("("+ab+")");gb.attr("title",fb);hb.attr("title",
ab);Ea.show();xb().find("#uploadAreaText").hide();console&&console.log(eb);yb(nb,eb.data)}}}catch(Fb){console&&console.log(Fb),r.showError(g.get("uploadFail","\u4e0a\u4f20\u5931\u8d25\u3002"))}}));A.append(ka);A.append(la);A.append(qb);A.append(Ea);K.initExtraUi(A,Ea,Na);A.append(va)};this.initExtraUi=function(){throw Error("Override me.");};this.setText=function(U){};this.setSource=function(U){w=U};this.getSource=function(){0<=J.indexOf(w.getFileType())&&(H.getSelected()==S[S.length-1]?w.setSplitSign($.trim(M.getText())):
w.setSplitSign(H.getSelected().getName()),w.setCharacterSet(u.getSelected().getName()),w.setTextLimitSign(e.getSelected().getName()));w.setDefineTypeRowCount(b.getSelected().getName());w.setType(F.FileSource);return w};this.getOnlySource=function(){return w};this.setFileSize=function(U){B=U};this.setMessageCurtain=function(U){r=U};this.hasUploadFile=function(){return q};this.changeStyleWhenDragEnter=function(){};this.beginUploadFile=function(U,ka){throw Error("Override me.");};this.changeStyleWhenUploadSucceed=
function(){throw Error("Override me.");};this.changeStyleWhenUploading=function(U){throw Error("Override me.");};this.changeStyleWhenUploadAgain=function(){};this.changeStyleWhenUploadFailed=function(){};var tb=function(){H.getSelected()==S[S.length-1]?M.getJqUi().show():M.getJqUi().hide()},rb=function(){var U,ka=A.find("#fileToUpload");null!=ka&&null!=ka.get(0)&&null!=ka.get(0).files&&(U=ka.get(0).files[0]);U&&zb(U)},zb=function(U){if(0!=U.size){K.changeStyleWhenDragEnter();A.find("#fileDetailProgress");
var ka=w.getFileType(),la=U.name,ma=U.size,Na=la.lastIndexOf(".");la=la.substring(Na+1,la.length).toLowerCase();ma>1048576*B?r.showPrompt(g.get("fileTooLarge","\u6587\u4ef6\u5927\u5c0f\u8d85\u8fc7\u6700\u5927\u9650\u5236\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u6587\u4ef6\u3002")):0>L[ka].indexOf(la)?r.showPrompt(g.get("fileTypeIncorrect","\u6587\u4ef6\u7c7b\u578b\u4e0d\u6b63\u786e\u3002")):K.beginUploadFile(U,ka)}else A.find("#fileToUpload").val(""),r.showError(g.get("uploadFileIsNull","\u4e0a\u4f20\u7684\u6587\u4ef6\u4e3a\u7a7a\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"))},
yb=function(U,ka){(new ja(ca.getRemoteImpl(),function(la){la&&(w.setCharacterSet(la),u&&u.setSelected($a(la,fa)));la=U.name;w.setFileUrl(ka);w.setFileName(la);q=!0;A.find(".dm-source-file-upload-setting").show();r.showSuccess(g.get("uploadSuccess","\u4e0a\u4f20\u6210\u529f\u3002"));K.changeStyleWhenUploadSucceed()},function(la,ma){K.changeStyleWhenUploadFailed();la=la.toString();return"20"==la.substr(0,2)&&7==la.length?(r.showError(g.get("uploadFail","\u4e0a\u4f20\u5931\u8d25\u3002")),!0):!1})).guessFileEncoding(ka)},
Db=function(U){var ka=new ja(ca.getRemoteImpl(),function(ma){y=ma;U()},function(ma,Na){return!1}),la=w.getFileUrl();ka.getFileSize(la)},Gb=function(U){K.changeStyleWhenUploading(U)},Hb=function(){},Ib=function(U){r.showError(g.get("uploadFail","\u4e0a\u4f20\u5931\u8d25\u3002"));K.changeStyleWhenUploadAgain()},Ab=function(){k.abort();K.changeStyleWhenUploadFailed()},Jb=function(){A.find("#fileDetailProgress").hide();A.find(".dm-source-file-upload-setting").hide();xb().find("#uploadAreaText").show();
w.setFileUrl("");w.setCharacterSet("");w.setFileName("");q=!1;A.find("#fileToUpload").val("");if(1<=window.navigator.userAgent.indexOf("MSIE")){var U=A.find("#fileToUpload"),ka=document.createElement("form"),la=U.nextSibling,ma=U.parentNode;ka.appendChild(U);ka.reset();ma.insertBefore(U,la)}},Kb=function(){rb()},$a=function(U,ka){for(var la in ka)if(ka[la].getName()==U)return ka[la]},xb=function(){return A.find(".dm-source-file-upload-area_new")};this.protectedMethod={uploadAcceptFile:zb,doSelectFile:rb,
uploadFile:function(U){q=!1;var ka=new FormData;ka.append("filename",U);k=new XMLHttpRequest;k.upload.addEventListener("progress",Gb,!1);k.addEventListener("load",Hb,!1);k.addEventListener("error",Ib,!1);k.addEventListener("abort",Ab(),!1);(new ja(ca.getRemoteImpl())).uploadFile(k);k.onload=function(la){if(200==this.status){la=this.response;var ma=null;try{ma=JSON.parse(la)}catch(Na){r.showError(g.get("uploadFail","\u4e0a\u4f20\u5931\u8d25\u3002"));K.changeStyleWhenUploadFailed();return}if(ma&&ma.data){yb(U,
ma.data);return}if(ma&&"4001002"==ma.errorCode){r.showError(g.get("uploadFileNoAccess","\u65e0\u4e0a\u4f20\u6587\u4ef6\u6743\u9650\u3002"));K.changeStyleWhenUploadFailed();return}if(ma&&3099003==ma.errorCode){r.showError(ma.errorMessage);return}if(ma&&ma.errorMessage){r.showError(ma.errorMessage);return}}r.showError(g.get("uploadFail","\u4e0a\u4f20\u5931\u8d25\u3002"));K.changeStyleWhenUploadFailed()};k.send(ka)},bindEventToJqUploadOperation:function(U,ka){U.off();if("delete"==ka)U.on("mousedown",
Jb);else if("uploadAgain"==ka)U.on("mousedown",Kb);else if("pause"==ka)U.on("mousedown",Ab)},supportActOnSameSource:function(U){return!(0<=P.indexOf(U))}}}function ia(){E.call(this);var p=this.protectedMethod,K,A,B,y,r;this.setEditState=function(b){r=b};this.initExtraUi=function(b,f,d){K=b;A=f;var k=$("<div>");k.addClass("dm-source-file-upload-area_new");var q=$("<div id='uploadAreaText'>");q.addClass("dm-source-file-upload-areatext");k.append(d);k.append(q);k.on("dragenter",H);k.on("dragenter",M);
k.on("dragover",H);k.on("dragleave",H);k.on("dragleave",u);k.on("drop",e);r||(B=$("<div>"),B.addClass("dm-source-file-upload-state"),X.background(B,"upload_running"));y=$("<div>");y.addClass("dm-source-file-upload-operation");"placeholder"in $("<input>")[0]?(q.on("click",function(){K.find("#fileToUpload").click()}),q.change(function(L){doSelectFile()}),q.text(g.get("clickOrDrag","\u70b9\u51fb\u6216\u5c06\u6587\u4ef6\u62d6\u62fd\u5230\u8fd9\u91cc\u4e0a\u4f20")),f.prepend(B),r||f.append(y)):(f.prepend(B),
r||f.append(y),q.text(g.get("clickForUploadFile","\u70b9\u51fb\u8fd9\u91cc\u4e0a\u4f20\u6587\u4ef6")),f=b.find("#uploadForm"),f.append(d),k.append(f),q.on("click",function(){d.click()}));b.append(k);r&&(q=w().find("#uploadAreaText"),q.hide())};this.changeStyleWhenDragEnter=function(){w().removeClass("dm-source-file-upload-area_enter")};this.beginUploadFile=function(b,f){f=b.name;var d=b.size,k=K.find(".dm-source-file-upload-filename_new"),q=K.find(".dm-source-file-upload-filesize_new"),L;1048576>
d?L=(d/1024).toFixed(2)+"KB":1048576<=d&&(L=(d/1048576).toFixed(2)+"M");k.text(f);q.text("("+L+")");k.attr("title",f);q.attr("title",L);A.show();p.uploadFile(b)};this.changeStyleWhenUploadSucceed=function(){r||X.background(B,"upload_success");X.backgroundWithHover(y,"btn-delete");p.bindEventToJqUploadOperation(y,"delete")};this.changeStyleWhenUploading=function(b){w().find("#uploadAreaText").hide();X.background(y,"upload_pause");p.bindEventToJqUploadOperation(y,"pause");if(b.lengthComputable){if(1048576<=
b.total){var f=(b.loaded/1048576).toFixed(2)+"M";b=(b.total/1048576).toFixed(2)+"M"}else f=(b.loaded/1024).toFixed(2)+"KB",b=(b.total/1024).toFixed(2)+"KB";var d=K.find(".dm-source-file-upload-filesize_new");d.text("("+f+" of "+b+")");f==b&&d.text("("+b+")");d.attr("title",b)}};this.changeStyleWhenUploadPaused=function(){};this.changeStyleWhenUploadAgain=function(){X.background(B,"upload_fail");X.background(y,"upload_again");p.bindEventToJqUploadOperation(y,"uploadAgain")};this.changeStyleWhenUploadFailed=
function(){X.backgroundWithHover(y,"btn-delete");p.bindEventToJqUploadOperation(y,"delete")};var w=function(){return K.find(".dm-source-file-upload-area_new")},H=function(b){b.originalEvent.stopPropagation();b.originalEvent.preventDefault()},M=function(b){w().addClass("dm-source-file-upload-area_enter")},u=function(b){w().removeClass("dm-source-file-upload-area_enter")},e=function(b){H(b);p.uploadAcceptFile(b.originalEvent.dataTransfer.files[0])}}function Ka(p,K,A){Ga.call(this);var B,y,r,w,H=[960,
540];this.setEditSuccessCallback=function(e){w=e};this.createDialog=function(){var e=$(document.body),b=$("<div class='sa-ctrl-common-modallayer'>");b.appendTo(e);r=new Ia(b);r.setSelectable(!0);var f=g.get("editSourceConnection","\u7f16\u8f91\u6570\u636e\u6e90\u8fde\u63a5");r.setTitle(f);y=r.getMessageCurtain();f=H[0];var d=H[1],k=e.prop("clientWidth"),q=e.prop("clientHeight");r.setBounds(k-f>>1,q-d>>1,f,d);r.setToolbarVisible(!1);r.setContent(u());r.showFooterPane();b.appendTo(e);var L=function(){r.destroy();
b.remove()};r.addClosingListener(function(D,J){J?M(L):L()});return r};var M=function(e){var b=function(k){e();w&&w(k)},f=function(k,q){return 20002003===k?(r.getMessageCurtain().showPrompt(g.get("duplicateName","\u540d\u79f0\u91cd\u590d\u3002")),!0):20002004===k?(r.getMessageCurtain().showPrompt(g.get("source_no_found","\u9009\u4e2d\u7684\u6570\u636e\u6e90\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20003301===k?(e(),A.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),
!0):!1};if(B.getConnectionName())if(50<B.getConnectionName().length)y.showPrompt(g.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"));else if(B.hasUploadFile()){var d=B.getSource();p.setModelerSource(d);p.setSourceName(B.getConnectionName());p.setModelSetId(ca.getModelSetId());b=new ja(K,b,f);b.setShowBlocking(!0);b.updateModelSetSource(p)}else y.showPrompt(g.get("pleaseUploadFile","\u8bf7\u5148\u4e0a\u4f20\u6587\u4ef6\u3002"));else y.showPrompt(g.get("emptyName",
"\u8bf7\u8f93\u5165\u540d\u79f0\u3002"))},u=function(){B=new ia;var e=za.getUrlParamValue("flatFileSize");B.setFileSize(e?e:100);B.setSource(p.getModelerSource().clone());B.setMessageCurtain(y);B.setEditState(!0);B.setConnectionName(p.getSourceName());return B.getJqUi()}}function pa(p,K){ea.call(this);var A=this.protectedMethod,B,y,r=[];G.BIZ_SOURCES=[new G(F.ERPCloudEntity,g.get("businessEntity","\u4e1a\u52a1\u5b9e\u4f53"),"COSMIC",!1,!0),new G(F.ERPCloudDBCenter,g.get("DBCenter","\u6570\u636e\u4e2d\u5fc3"),
"COSMIC",!1,!0)];this.setCreateSuccessCallback=function(u){B=u};this.getSubTitle=function(){return g.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79")};this.protectedCreateUi=function(){var u=$("<div>");u.addClass("source-manage-source-type-main");var e=r.push,b=G.BIZ_SOURCES,f=g.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79"),d=$("<div>");d.addClass("dm-source-type-typelist");d.css("height","120px");d.css("top",void 0);d.appendTo(u);if(null!=f){var k=$("<div>");k.addClass("dm-source-type-typelist-title");
k.text(f);k.appendTo(d)}f=new I;f.setItemModels(b);f.setBorderVisible(!1);f.setCustomItemPainter(w);f.setCustomSelectedsPainter(H);b=f.getJqUi();b.addClass("dm-source-type-typelist-list");b.appendTo(d);f.addPressedListener(M);e.call(r,f);e=$("<div>");e.append(u);return e};var w=function(u,e){u.attr("title",e.getText());u.addClass("dm-source-type-typelist-item");var b=$("<div>");b.addClass("dm-source-type-typelist-item-icon");X.background(b,e.getIconName());b.appendTo(u);b=$("<div>");b.addClass("dm-source-type-typelist-item-text");
b.text(e.getText());b.appendTo(u)},H=function(u,e){for(var b=0;b<u.length;b++){var f=u[b];f.removeClass("dm-source-type-typelist-item_selected");f.find(".dm-source-type-typelist-item_selected-mark").remove();f.find(".dm-source-type-typelist-item_selected-icon").remove()}for(b=0;b<e.length;b++)f=e[b],f.addClass("dm-source-type-typelist-item_selected"),u=$("<div>"),u.addClass("dm-source-type-typelist-item_selected-mark"),u.appendTo(f),u=$("<div>"),X.background(u,"checked"),u.addClass("dm-source-type-typelist-item_selected-icon"),
u.appendTo(f)},M=function(u){for(var e=0;e<r.length;e++)r[e]!=u&&r[e].setSelecteds([]);u=u.getSelecteds();y=0<u.length?u[0]:null};this.intoThisStep=function(u,e){};this.outThisStep=function(u,e){if(u)e(null);else if(y){var b=new m;b.setType(y.getName());u=new qa;u.setModelerSource(b);u.setModelSetId(ca.getModelSetId());u.setSourceType(y.getName());b=new ja(p,function(f){B&&B(f);e(null);return!0},function(f,d){return 20002001===f?(A.getMessageCurtain().showPrompt(g.get("noDBCenterPerm","\u6ca1\u6709\u6570\u636e\u4e2d\u5fc3\u6743\u9650\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6743\u9650\u3002")),
!0):20002005===f?(A.getMessageCurtain().showPrompt(g.get("sourceAlreadyExists","\u5df2\u5b58\u5728\u76f8\u540c\u7684\u6570\u636e\u6e90\u8fde\u63a5\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20003301===f?(K.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),e(null),!0):!1});b.saveModelSetSource(u);b.setShowBlocking(!0)}else A.getMessageCurtain().showPrompt(g.get("selectAnDataSource","\u8bf7\u9009\u4e2d\u4e00\u9879\u6570\u636e\u6e90\u3002"))};
this.isLastStep=function(){return!0}}function sa(p,K){ea.call(this);var A=this.protectedMethod,B,y,r,w=[];this.setCreateSuccessCallback=function(b){y=b};this.getSubTitle=function(){return g.get("publicDataSource","\u516c\u5171\u6570\u636e\u6e90")};this.protectedCreateUi=function(){var b=$("<div>");b.addClass("modelset-source-type-main");H(b);var f=$("<div>");f.append(b);return f};var H=function(b){var f=new ja(p,function(d){if(d)if(0==d.length){B=g.get("noAlternativeSource","\u5f53\u524d\u6ca1\u6709\u53ef\u9009\u62e9\u7684\u6570\u636e\u6e90\u3002");
var k=$("<div>");k.addClass("source-manage-source-public-no-source-container");d=$("<div>");d.addClass("source-manage-source-public-no-source-icon");X.background(d,"no-public-source");k.append(d);d=$("<div>");d.addClass("source-manage-source-public-no-source-text");d.text(g.get("noAuthPublicSource","\u6682\u65e0\u6388\u6743\u7ed9\u6211\u7684\u516c\u5171\u6570\u636e\u6e90\u3002"));k.append(d);k.appendTo(b)}else{k=[];for(var q=0;q<d.length;q++){var L=new c;L.fromJsonObject(d[q]);var D=L.getId(),J=L.getName();
L=L.getDBSource();k.push(new G(D,J,L.getDbType()))}q=g.get("database","\u6570\u636e\u5e93");d=$("<div>");d.addClass("dm-source-type-typelist");d.css("height","420px");d.css("top",void 0);d.css("overflow","auto");d.appendTo(b);null!=q&&(D=$("<div>"),D.addClass("dm-source-type-typelist-title"),D.text(q),D.appendTo(d));q=new I;q.setItemModels(k);q.setBorderVisible(!1);q.setCustomItemPainter(M);q.setCustomSelectedsPainter(u);k=q.getJqUi();k.addClass("dm-source-type-typelist-list");k.appendTo(d);q.addPressedListener(e)}});
f.setShowBlocking(!0);f.loadDBConnections()},M=function(b,f){b.attr("title",f.getText());b.addClass("dm-source-type-typelist-item");var d=$("<div>");d.addClass("dm-source-type-typelist-item-icon");X.background(d,f.getIconName());d.appendTo(b);d=$("<div>");d.addClass("dm-source-type-typelist-item-text");d.text(f.getText());d.appendTo(b)},u=function(b,f){for(var d=0;d<b.length;d++){var k=b[d];k.removeClass("dm-source-type-typelist-item_selected");k.find(".dm-source-type-typelist-item_selected-mark").remove();
k.find(".dm-source-type-typelist-item_selected-icon").remove()}for(d=0;d<f.length;d++)k=f[d],k.addClass("dm-source-type-typelist-item_selected"),b=$("<div>"),b.addClass("dm-source-type-typelist-item_selected-mark"),b.appendTo(k),b=$("<div>"),X.background(b,"checked"),b.addClass("dm-source-type-typelist-item_selected-icon"),b.appendTo(k)},e=function(b){for(var f=0;f<w.length;f++)w[f]!=b&&w[f].setSelecteds([]);b=b.getSelecteds();r=0<b.length?b[0]:null};this.intoThisStep=function(b,f){};this.outThisStep=
function(b,f){b?f(null):r?(b=new ja(ca.getRemoteImpl(),function(d){for(var k=[],q=r.getText(),L=!1,D=0,J=d.length;D<J;D++){var P=new qa;P.fromJsonObject(d[D]);var S=P.getSourceName();S==q?L=!0:r.getName()==P.getSourceType()&&0==S.indexOf(q)&&k.push(S)}if(L){P=1;for(D=!1;!D;){d=!1;for(D=0;D<k.length;D++)if(k[D]==q+"-"+P){P++;d=!0;break}D=!d}q=q+"-"+P}k=new v;k.setType(F.PublicDBSource);k.setRefId(r.getName());P=new qa;P.setModelerSource(k);P.setSourceName(q);P.setModelSetId(ca.getModelSetId());P.setSourceType(F.PublicDBSource);
(new ja(p,function(fa){y&&y(fa);f(null);return!0},function(fa,oa){return 20002006===fa?(A.getMessageCurtain().showPrompt(g.get("sourceAlreadyExists","\u5df2\u5b58\u5728\u76f8\u540c\u7684\u6570\u636e\u6e90\u8fde\u63a5\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20002004===fa?(A.getMessageCurtain().showPrompt(g.get("source_no_found","\u9009\u4e2d\u7684\u6570\u636e\u6e90\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20003301===fa?(K.showPrompt(g.get("modelSetNotExist",
"\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),f(null),!0):!1})).saveModelSetSource(P)}),b.setShowBlocking(!0),b.loadModelSetSources(ca.getModelSetId())):B?A.getMessageCurtain().showPrompt(B):A.getMessageCurtain().showPrompt(g.get("selectAnDataSource","\u8bf7\u9009\u4e2d\u4e00\u9879\u6570\u636e\u6e90\u3002"))};this.isLastStep=function(){return!0}}function V(p,K){ea.call(this);var A=this.protectedMethod,B,y,r=[];this.setCreateSuccessCallback=function(e){B=e};this.getSubTitle=
function(){return g.get("modelSet","\u6a21\u578b\u96c6")};this.protectedCreateUi=function(){var e=$("<div>");e.addClass("modelset-source-type-main");w(e);var b=$("<div>");b.append(e);return b};var w=function(e){var b=[],f=new ja(ca.getRemoteImpl(),function(d){if(d){for(var k=0;k<d.length;k++){var q=new xa;q.fromJsonObject(d[k]);var L=q.getModelSetId();q=q.getModelSetName();b.push(new G(L,q,"modelSet_source"))}k=g.get("optionalModelSet","\u53ef\u9009\u62e9\u7684\u6a21\u578b\u96c6");d=$("<div>");d.addClass("dm-source-type-typelist");
d.css("height","420px");d.css("top",void 0);d.css("overflow","auto");d.appendTo(e);null!=k&&(L=$("<div>"),L.addClass("dm-source-type-typelist-title"),L.text(k),L.appendTo(d),k=$("<div>"),L=$("<span>"),L.text(g.get("modelSetHelpIconTips","\u53ef\u9009\u62e9\u7684\u6a21\u578b\u96c6\u5305\u62ec\uff1a\u5f53\u524d\u6a21\u578b\u96c6\u3001\u5df2\u90e8\u7f72\u4e14\u6388\u6743\u7ed9\u6211\u7684\u6a21\u578b\u6240\u5728\u7684\u6a21\u578b\u96c6\uff08\u975e\u7cfb\u7edf\u9884\u7f6e\u7684\u6a21\u578b\u96c6\uff09\u3002\u9009\u62e9\u5f53\u524d\u6a21\u578b\u96c6\u65f6\uff0c\u53ef\u4f7f\u7528\u8be5\u6a21\u578b\u96c6\u4e0b\u7684\u6240\u6709\u6a21\u578b\uff1b\u9009\u62e9\u5176\u4ed6\u6a21\u578b\u96c6\u65f6\uff0c\u53ef\u4f7f\u7528\u8be5\u6a21\u578b\u96c6\u4e0b\u5df2\u90e8\u7f72\u4e14\u6388\u6743\u7ed9\u6211\u7684\u6a21\u578b\u3002")),
L.appendTo(k),L=new Qa,L.setIconType(Qa.ICON_TYPE_QUESTION),L.setTipsSize(400,86),L.setTipsHtml(k[0]),k=L.getJqUi(),k.addClass("dm-notice-icon"),T.layoutCtrl(k,90,3,16,16),k.appendTo(d));k=new I;k.setItemModels(b);k.setBorderVisible(!1);k.setCustomItemPainter(H);k.setCustomSelectedsPainter(M);L=k.getJqUi();L.addClass("dm-source-type-typelist-list");L.appendTo(d);k.addPressedListener(u)}});f.setShowBlocking(!0);f.loadPermissionModelSet(ca.getModelSetId())},H=function(e,b){e.attr("title",b.getText());
e.addClass("dm-source-type-typelist-item");var f=$("<div>");f.addClass("dm-source-type-typelist-item-icon");X.background(f,b.getIconName());f.appendTo(e);f=$("<div>");f.addClass("dm-source-type-typelist-item-text");f.text(b.getText());f.appendTo(e)},M=function(e,b){for(var f=0;f<e.length;f++){var d=e[f];d.removeClass("dm-source-type-typelist-item_selected");d.find(".dm-source-type-typelist-item_selected-mark").remove();d.find(".dm-source-type-typelist-item_selected-icon").remove()}for(f=0;f<b.length;f++)d=
b[f],d.addClass("dm-source-type-typelist-item_selected"),e=$("<div>"),e.addClass("dm-source-type-typelist-item_selected-mark"),e.appendTo(d),e=$("<div>"),X.background(e,"checked"),e.addClass("dm-source-type-typelist-item_selected-icon"),e.appendTo(d)},u=function(e){for(var b=0;b<r.length;b++)r[b]!=e&&r[b].setSelecteds([]);e=e.getSelecteds();y=0<e.length?e[0]:null};this.intoThisStep=function(e,b){};this.outThisStep=function(e,b){e?b(null):y?(e=new ja(ca.getRemoteImpl(),function(f){for(var d=[],k=y.getText(),
q=!1,L=0,D=f.length;L<D;L++){var J=new qa;J.fromJsonObject(f[L]);var P=J.getSourceName();P==k?q=!0:y.getName()==J.getSourceType()&&0==P.indexOf(k)&&d.push(P)}if(q){J=1;for(L=!1;!L;){f=!1;for(L=0;L<d.length;L++)if(d[L]==k+"-"+J){J++;f=!0;break}L=!f}k=k+"-"+J}d=new t;d.setType(F.ModelSet);d.setRefId(y.getName());d.setRefType(ca.getModelSetId()==y.getName()?t.TYPE_CURRENT:t.TYPE_OTHER);J=new qa;J.setModelerSource(d);J.setSourceName(k);J.setModelSetId(ca.getModelSetId());J.setSourceType(F.ModelSet);(new ja(p,
function(S){B&&B(S);b(null);return!0},function(S,fa){return 20002006===S?(A.getMessageCurtain().showPrompt(g.get("sourceAlreadyExists","\u5df2\u5b58\u5728\u76f8\u540c\u7684\u6570\u636e\u6e90\u8fde\u63a5\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20002004===S?(A.getMessageCurtain().showPrompt(g.get("source_no_found","\u9009\u4e2d\u7684\u6570\u636e\u6e90\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20003301===S?(K.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),
b(null),!0):!1})).saveModelSetSource(J)}),e.setShowBlocking(!0),e.loadModelSetSources(ca.getModelSetId())):A.getMessageCurtain().showPrompt(g.get("selectAnDataSource","\u8bf7\u9009\u4e2d\u4e00\u9879\u6570\u636e\u6e90\u3002"))};this.isLastStep=function(){return!0}}function na(p,K){ea.call(this);var A=this.protectedMethod,B,y,r,w,H,M;this.setCreateSuccessCallback=function(e){B=e};this.getSubTitle=function(){return g.get("OpenAPI","OpenAPI")};this.protectedCreateUi=function(){var e=$("<div>");e.addClass("source-manage-source-type-main");
u(e);return e};var u=function(e){y=new ra;y.setOpenAPIType(ra.TYPE_RESTFUL_DATA_SET);var b=$("<div>");b.addClass("source-manage-openApi-left-side");r=new O;r.setText(g.get("RESTfulDataSet","RESTful\u6570\u636e\u96c6"));var f=r.getJqUi();r.setChecked(!0);var d=new O;d.setText(g.get("programDataSet","\u7a0b\u5e8f\u6570\u636e\u96c6"));var k=d.getJqUi();f.appendTo(b);k.appendTo(b);var q=$("<div>");q.addClass("source-manage-openApi-right-side");var L=new ha;L.setText(g.get("name","\u540d\u79f0"));L=L.getJqUi();
L.appendTo(q);w=new ta;var D=w.getJqUi();D.appendTo(q);var J=new ha("URL"),P=J.getJqUi();P.appendTo(q);H=new ta;H.setPlaceholder(g.get("RESTfulDataSetUrlPlaceholder","\u8bf7\u8f93\u5165URL\u5168\u8def\u5f84"));var S=H.getJqUi();S.appendTo(q);M=new Aa;var fa=M.initUi();T.layoutCtrl(fa,30,110,580,240);q.append(fa);var oa=new Ma;oa.addElement(r);oa.addElement(d);oa.addChangedListener(function(){r.isChecked()?(H.setPlaceholder(g.get("RESTfulDataSetUrlPlaceholder","\u8bf7\u8f93\u5165URL\u5168\u8def\u5f84")),
J.setText("URL"),y.setOpenAPIType(ra.TYPE_RESTFUL_DATA_SET),fa.empty()&&(fa=M.initUi(),T.layoutCtrl(fa,30,110,580,240),q.append(fa))):d.isChecked()&&(H.setPlaceholder(g.get("programDataSetPlaceholder","\u8bf7\u8f93\u5165Java\u7c7b\u7684\u5168\u8def\u5f84")),J.setText(g.get("classPath","\u7c7b\u8def\u5f84")),y.setOpenAPIType(ra.TYPE_PROGRAM_DATA_SET),fa.empty());w.setText();H.setText()});T.layoutCtrl(f,20,20,200,20);T.layoutCtrl(k,20,60,200,20);T.layoutCtrl(L,40,12,50,23);T.layoutCtrl(D,100,12,510,
23);T.layoutCtrl(P,40,62,50,23);T.layoutCtrl(S,100,62,510,23);b.appendTo(e);q.appendTo(e)};this.intoThisStep=function(e,b){};this.outThisStep=function(e,b){if(e)b(null);else if(w.getText())if(H.getText())if(50<w.getText().length)A.getMessageCurtain().showPrompt(g.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"));else{e=Da.encode($.trim(H.getText()));y.setUrl(e);e=M.getAbstractOpenAPIAuth();if(y.getOpenAPIType()===ra.TYPE_RESTFUL_DATA_SET&&e){if(null!=
e.protectedCheckParams()){A.getMessageCurtain().showPrompt(e.protectedCheckParams());return}e=e.protectedGetModelFromUI();y.setAuthModel(e.protectedToJsonObject())}else y.setAuthModel(null);e=new ja(ca.getRemoteImpl(),function(f){f=new qa;f.setSourceType(F.OpenAPI);f.setModelSetId(ca.getModelSetId());f.setSourceName($.trim(w.getText()));f.setModelerSource(y);(new ja(p,function(d){B&&B(d);b(null);return!0},function(d,k){return 20002003===d?(A.getMessageCurtain().showPrompt(g.get("duplicateName","\u540d\u79f0\u91cd\u590d\u3002")),
!0):20002002===d?(A.getMessageCurtain().showPrompt(g.get("duplicateHashcode","\u5df2\u5b58\u5728\u8fde\u63a5\u4fe1\u606f\u76f8\u540c\u7684\u6570\u636e\u6e90\u8fde\u63a5\u3002")),!0):20003301===d?(K.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),b(null),!0):!1})).saveModelSetSource(f)},Bb(A.getMessageCurtain()));e.setShowBlocking(!0);e.openAPIInitialCheck(y)}else y.getOpenAPIType()===ra.TYPE_RESTFUL_DATA_SET?A.getMessageCurtain().showPrompt(g.get("urlNotNull",
"URL\u4e0d\u80fd\u4e3a\u7a7a\u3002")):A.getMessageCurtain().showPrompt(g.get("classNameNotNull","Java\u7c7b\u7684\u5168\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u3002"));else A.getMessageCurtain().showPrompt(g.get("emptyName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002"))};this.isLastStep=function(){return!0}}function Ra(p,K,A){Ga.call(this);var B,y,r,w=[640,520],H,M,u,e;this.setEditSuccessCallback=function(d){r=d};this.createDialog=function(){var d=$(document.body),k=$("<div class='sa-ctrl-common-modallayer'>");
k.appendTo(d);var q=new Ia(k);q.setSelectable(!0);var L=g.get("editSourceConnection","\u7f16\u8f91\u6570\u636e\u6e90\u8fde\u63a5");q.setTitle(L);y=q.getMessageCurtain();L=w[0];var D=w[1],J=d.prop("clientWidth"),P=d.prop("clientHeight");q.setBounds(J-L>>1,P-D>>1,L,D);q.setToolbarVisible(!1);q.setContent(b());q.showFooterPane();k.appendTo(d);var S=function(){q.destroy();k.remove()};q.addClosingListener(function(fa,oa){oa?f(S):S()});return q};var b=function(){var d=$("<div>");H=new ha(g.get("RESTfulDataSet",
"RESTful\u6570\u636e\u96c6"));B=p.getModelerSource();var k=new ha;k.setText(g.get("name","\u540d\u79f0"));k=k.getJqUi();k.appendTo(d);M=new ta;var q=M.getJqUi();q.appendTo(d);M.setText(p.getSourceName());T.layoutCtrl(k,20,35,80,23);T.layoutCtrl(q,80,35,510,23);q="URL";u=new ta;u.setPlaceholder(g.get("RESTfulDataSetUrlPlaceholder","\u8bf7\u8f93\u5165URL\u5168\u8def\u5f84"));"PROGRAM_DATA_SET"==B.getOpenAPIType()&&(u.setPlaceholder(g.get("programDataSetPlaceholder","\u8bf7\u8f93\u5165Java\u7c7b\u7684\u5168\u8def\u5f84")),
H=new ha(g.get("programDataSet","\u7a0b\u5e8f\u6570\u636e\u96c6\uff1a")),q=g.get("classPath","\u7c7b\u8def\u5f84"));u.setText(Da.decode(B.getUrl()));k=u.getJqUi();q=(new ha(q)).getJqUi();q.appendTo(d);T.layoutCtrl(q,20,85,80,23);T.layoutCtrl(k,80,85,510,23);k.appendTo(d);k=H.getJqUi();T.layoutCtrl(k,0,0,200,23);k.appendTo(d);"RESTFUL_DATA_SET"==B.getOpenAPIType()&&(e=new Aa,B.getAuthModel()&&e.setModel(B.getAuthModel()),k=e.initUi(),T.layoutCtrl(k,10,130,580,200),d.append(k));return d},f=function(d){if(M.getText())if(u.getText())if(50<
M.getText().length)y.showPrompt(g.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"));else{var k=B.clone(),q=Da.encode($.trim(u.getText()));k.setUrl(q);q=null;if("RESTFUL_DATA_SET"==B.getOpenAPIType()){var L=e.getAbstractOpenAPIAuth();L&&(L=L.protectedGetModelFromUI())&&(q=L.protectedToJsonObject())}k.setAuthModel(q);q=new ja(ca.getRemoteImpl(),function(D){D=p.copy();D.setSourceName($.trim(M.getText()));D.setModelSetId(ca.getModelSetId());D.setModelerSource(k);
(new ja(K,function(J){d();r&&r(J)},function(J,P){return 20002003===J?(y.showPrompt(g.get("duplicateName","\u540d\u79f0\u91cd\u590d\u3002")),!0):20002002===J?(y.showPrompt(g.get("duplicateHashcode","\u5df2\u5b58\u5728\u8fde\u63a5\u4fe1\u606f\u76f8\u540c\u7684\u6570\u636e\u6e90\u8fde\u63a5\u3002")),!0):20002004===J?(y.showPrompt(g.get("source_no_found","\u9009\u4e2d\u7684\u6570\u636e\u6e90\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20003301===J?(d(),A.showPrompt(g.get("modelSetNotExist",
"\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),!0):!1})).updateModelSetSource(D)},Bb(y));q.setShowBlocking(!0);q.openAPIInitialCheck(k)}else B.getOpenAPIType()===ra.TYPE_RESTFUL_DATA_SET?y.showPrompt(g.get("urlNotNull","URL\u4e0d\u80fd\u4e3a\u7a7a\u3002")):y.showPrompt(g.get("classNameNotNull","Java\u7c7b\u7684\u5168\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u3002"));else y.showPrompt(g.get("emptyName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002"))}}function Aa(){function p(M,
u){this.getTypeName=function(){return M};this.getTypeCode=function(){return u}}var K,A,B,y,r,w=[new p(g.get("noAuth","\u65e0"),null),new p("Basic",bb.BASIC),new p("Bearer",bb.BEARER),new p("Digest",bb.DIGEST),new p(g.get("cosmicAuth","\u82cd\u7a79\u8ba4\u8bc1"),bb.COSMIC)];this.setAbstractOpenAPIAuth=function(M){y=M};this.getAbstractOpenAPIAuth=function(){return y};this.initUi=function(){K=$("<div>");var M=(new ha(g.get("authType","\u8ba4\u8bc1\u65b9\u5f0f"))).getJqUi();M.attr("title",g.get("authType",
"\u8ba4\u8bc1\u65b9\u5f0f"));T.layoutCtrl(M,10,0,54,23);M.appendTo(K);M=$("<div>");var u=$("<span>");u.text(g.get("httpAuthHelpIconTips","\u63d0\u4f9b\u5e38\u89c1HTTP\u8eab\u4efd\u8ba4\u8bc1\uff0c\u53ef\u4ee5\u6307\u5b9a\u8ba4\u8bc1\u65b9\u5f0f\uff0c\u8fdb\u884c\u8eab\u4efd\u8ba4\u8bc1\u9274\u6743  "));u.appendTo(M);u=Cb.getRESTfulAuthUrl();u=$("<a onclick='javascript:window.open(\""+u+"\");' href='#'>");u.text(g.get("viewDetails","\u67e5\u770b\u5e2e\u52a9\u6587\u6863"));u.css("cursor","pointer");
u.css("color","#5582f3");u.appendTo(M);u=new Qa;u.setIconType(Qa.ICON_TYPE_QUESTION);u.setTipsSize(200,70);u.setTipsHtml(M[0]);M=u.getJqUi();M.addClass("source-manage-openApi-notice-icon");T.layoutCtrl(M,64,4,16,16);M.appendTo(K);A=new Ba;A.setItemModels(w);A.setSelected(w[0]);A.setCustomPainter(function(e,b,f){b.text(f.getTypeName())});A.addSelectedChangedListener(function(e,b,f){e=f.getTypeCode();null==e?(y=null,r&&r.hide()):(r&&r.empty(),y=B&&e===B.getAuthType()?pb.getImpl(e,B):pb.getImpl(e,null),
r=y.getJqUi(),T.layoutCtrl(r,0,30,580,150),r.appendTo(K),r.show())});M=A.getJqUi();M.appendTo(K);T.layoutCtrl(M,110,0,170,23);H();K.addClass("sa-ctrl-common-foreground_enabled");return K};this.setModel=function(M){B=bb.getImpl(M.authType);B.protectedFromJsonObject(M)};var H=function(){if(B){for(var M=1;M<w.length;M++)if(w[M].getTypeCode()===B.getAuthType()){A.setSelected(w[M]);break}y=pb.getImpl(B.getAuthType(),B);r=y.getJqUi();T.layoutCtrl(r,0,30,580,150);r.appendTo(K)}}}function ya(p,K,A){Ga.call(this);
var B,y,r,w,H=[400,300];this.setEditSuccessCallback=function(e){w=e};this.createDialog=function(){var e=$(document.body),b=$("<div class='sa-ctrl-common-modallayer'>");b.appendTo(e);var f=new Ia(b);f.setSelectable(!0);var d=g.get("editSourceConnection","\u7f16\u8f91\u6570\u636e\u6e90\u8fde\u63a5");f.setTitle(d);B=f.getMessageCurtain();d=H[0];var k=H[1],q=e.prop("clientWidth"),L=e.prop("clientHeight");f.setBounds(q-d>>1,L-k>>1,d,k);f.setToolbarVisible(!1);f.setContent(u());f.showFooterPane();b.appendTo(e);
var D=function(){f.destroy();b.remove()};f.addClosingListener(function(J,P){P?M(D):D()});return f};var M=function(e){var b=$.trim(y.getText()),f;""!==b&&50<b.length?f=g.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):""===b&&(f=g.get("emptyName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002"));f?B.showPrompt(f,2E3):b==p.getSourceName()?(e(),A.showSuccess(g.get("editSuccess","\u7f16\u8f91\u6210\u529f\u3002"))):(f=p.copy(),f.setSourceName(b),f.setModelSetId(ca.getModelSetId()),
b=new ja(K,function(d){e();w&&w(d)},function(d,k){return 20002003===d?(B.showPrompt(g.get("duplicateName","\u540d\u79f0\u91cd\u590d\u3002")),!0):20002004===d?(B.showPrompt(g.get("source_no_found","\u9009\u4e2d\u7684\u6570\u636e\u6e90\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u3002")),!0):20003301===d?(e(),A.showPrompt(g.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002")),!0):!1}),b.setShowBlocking(!0),b.updateModelSetSource(f))},
u=function(){var e=$("<div>"),b=new ha;b.setText(g.get("source","\u6765\u6e90"));b=b.getJqUi();r=new ta;var f=p.getSourceType();var d=p.getRefSourceName();if(f==F.ERPCloudEntity){var k=g.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79")+"/";d=g.get("businessEntity","\u4e1a\u52a1\u5b9e\u4f53")}else f==F.ERPCloudDBCenter?(k=g.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79")+"/",d=g.get("DBCenter","\u6570\u636e\u4e2d\u5fc3")):f==F.PublicDBSource?k=g.get("publicDataSource","\u516c\u5171\u6570\u636e\u6e90")+
"/":f==F.ModelSet&&(k=g.get("modelSet","\u6a21\u578b\u96c6")+"/");f=k+d;r.setText(f);r.setEnabled(!1);k=r.getJqUi();k.attr("title",f);f=new ha;f.setText(g.get("name","\u540d\u79f0"));f=f.getJqUi();y=new ta;y.setText(p.getSourceName());d=y.getJqUi();f.appendTo(e);d.appendTo(e);b.appendTo(e);k.appendTo(e);T.layoutCtrl(b,60,20,70,23);T.layoutCtrl(k,60,45,280,23);T.layoutCtrl(f,60,100,70,23);T.layoutCtrl(d,60,125,280,23);return e}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee=
{});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.modeler&&(com.kingdee.bos.qing.modeler={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset&&(com.kingdee.bos.qing.modeler.modelset={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.source&&(com.kingdee.bos.qing.modeler.modelset.source={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.source.ui&&
(com.kingdee.bos.qing.modeler.modelset.source.ui={});var da=com.kingdee.bos.qing.modeler.modelset.source.ui;da.MainUi=function(){function p(D,J){this.getTypeName=function(){return D};this.getTypeCode=function(){return J}}var K,A,B,y,r,w,H,M;this.createJqUi=function(){K||(K=u());return K};var u=function(){M||(M=new Sa,M.getJqUi().appendTo($(document.body)));K=$("<div class='source-manage-main'>");var D=function(){console.log(com.kingdee.bos.qing.Seer.getUrlParamValue("language"));e(K);H=new W(ca.getRemoteImpl());
H.setMessageCurtain(M);H.getJqUi().appendTo(K);L()},J=new ja(ca.getRemoteImpl(),function(P){cb=P;D()},D);J.setShowBlocking(!0);J.isDisabledSource();return K},e=function(D){A=$("<div class='source-manage-toolbar'>");var J=$("<div class='source-manage-toolbar-title'>");J.text(g.get("dataSourceManage","\u6570\u636e\u6e90\u7ba1\u7406"));A.append(J);J=$("<div>");J.addClass("source-manage-toolbar-search-icon");J.attr("title",g.get("search","\u641c\u7d22"));X.backgroundWithHover(J,"btn-search");J.on("mouseenter",
function(){b()});A.append(J);var P=k();A.append(P);J.appendTo(A);D.append(A)},b=function(){if(w)w.css("display","block");else{w=$("<div>");B=new ua;B.setSearchListenerDelay(1E3);B.addSearchListener(q);B.setAlwaysShowCleanIcon(!0);B.setShowSearchIcon(!0);B.setPlaceholder(g.get("searchContent","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));var D=B.getJqUi();D.addClass("source-manage-toolbar-searchBox");D.find(":input").on("keydown",function(P){13==(P.keyCode||P.which||P.charCode)&&q()});D.appendTo(w);
w.appendTo(A)}B.setFoucs();var J=function(P){var S=$(document.body).children(".sa-ctrl-common-popup");for(P=P.target;P!=document.body;){if(P==w[0]||r&&P==r.getJqUi()[0]||S&&P==S[0])return;P=P.parentNode}w.css("display","none");document.body.removeEventListener("mousedown",J,!0)};document.body.addEventListener("mousedown",J,!0);return D},f=[new p(g.get("allType","\u5168\u90e8\u7c7b\u578b"),null),new p(g.get("database","\u6570\u636e\u5e93"),G.DBSource),new p(g.get("file","\u6587\u4ef6"),G.FileSource),
new p(g.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79"),G.ERPCloud),new p(g.get("publicDataSource","\u516c\u5171\u6570\u636e\u6e90"),G.PublicSource),new p(g.get("modelSet","\u6a21\u578b\u96c6"),G.ModelSet)],d=[new p(g.get("allType","\u5168\u90e8\u7c7b\u578b"),null),new p(g.get("file","\u6587\u4ef6"),G.FileSource),new p(g.get("database","\u6570\u636e\u5e93"),G.DBSource),new p(g.get("ERPCloud","\u91d1\u8776\u4e91\u00b7\u82cd\u7a79"),G.ERPCloud),new p(g.get("modelSet","\u6a21\u578b\u96c6"),G.ModelSet),
new p(g.get("publicDataSource","\u516c\u5171\u6570\u636e\u6e90"),G.PublicSource)],k=function(){r=new Ba;var D=cb?d:f;r.setItemModels(D);r.setSelected(D[0]);r.setCustomPainter(function(J,P,S){P.text(S.getTypeName())});r.addSelectedChangedListener(function(J,P,S){H.setSelectSourceType(S.getTypeCode())});D=r.getJqUi();D.addClass("source-manage-toolbar-searchtype-combobox");return D},q=function(){y=$.trim(B.getText()).toUpperCase();H.setSearchText(y)},L=function(){var D=new ja(ca.getRemoteImpl(),function(J){if(J){for(var P=
[],S=0;S<J.length;S++){var fa=new qa;fa.fromJsonObject(J[S]);P.push(fa)}H.setSourceVOs(P)}});D.setShowBlocking(!0);D.loadModelSetSources(ca.getModelSetId())}};var ja,ca,qa,La,X,N,z,C,c,a,l,n,x,h,m,v,t,F,xa,ra,G,Q,ea,T,Da,g,za,Ia,ha,ta,Sa,ua,Ba,R,I,O,Ma,Oa,Ga,Qa,ib,pb,bb,Cb,cb=!1;(function(){var p=com.kingdee.bos.qing.modeler.modelset.source.model;qa=p.ModelSetSourceVO;La=p.ModelRefSourceVO;N=p.ModelSetDBSource;l=p.ModelSetFileSource;n=p.ExcelSource;x=p.XMLSource;h=p.TextSource;m=p.ERPCloudSource;
v=p.PublicDataSource;t=p.ModelSetSource;ra=p.OpenAPISource;F=p.ModelerSourceType;xa=p.ModelSetVO;G=p.SourceType;bb=p.AuthModelFactory;p=com.kingdee.bos.qing.modeler.modelset.source.common;ja=p.SourceManageFacade;ca=p.Integration;X=p.Icons;a=p.SourceCardUIFactory;ib=p.UserOperationReporter;pb=p.OpenAPIAuthFactory;p=com.kingdee.bos.qing.dbmanage;z=p.DBConnectionPanelFactory;C=p.DBSourceDisplayNameFactory;c=p.DBConnection;p=com.kingdee.bos.qing.data;Q=p.DBSource;ea=p.AbstractImportEntityStep;p=com.kingdee.bos.qing;
za=p.Seer;p=com.kingdee.bos.qing.common;T=p.DomUtil;Da=p.Base64Util;p=com.kingdee.bos.qing.framework.common;g=p.MultilanguageManager.createPackageAccessor(da);Cb=p.OfficialArticleUtil;p=com.kingdee.bos.qing.ui.component;Ia=p.Dialog;I=p.List;O=p.RadioButton;Ma=p.RadioButtonGroup;ha=p.Label;ta=p.TextField;Sa=p.MessageCurtain;ua=p.SearchBox;Ba=p.ComboBox;R=p.WizardDialog;Oa=p.MessageDialog;Ga=p.AbstractModalDialog;Qa=p.HelpIcon})();new function(){this.handleIconName=function(p){return"en"==com.kingdee.bos.qing.CodeLoader.Seer.getUrlParamValue("language")?
p+"_EN":p}};var Bb=function(p){return function(K,A){K=K.toString();if("20"==K.substr(0,2)&&7==K.length){if("20612"==K.substr(0,5)||"20622"==K.substr(0,5))return!1;if(2061100==K)return p.showError(g.get("error2061100","\u8bf7\u586b\u5199\u6b63\u786e\u7684url\uff0c\u5982\u679c\u662f\u6839\u8def\u5f84\uff0c\u5fc5\u987b\u4ee5.QData\u7ed3\u5c3e\u3002")),!0;if(2061103==K)return p.showError(g.get("error2061103","pageSize\u7684\u503c\u5fc5\u987b\u57282000\u81f320000\u4e4b\u95f4\u3002")),!0;if(2061104==K)return p.showError(g.get("error2061104",
"\u53c2\u6570\u5f02\u5e38,pageNo\uff0cselectedFields\u4e3a\u7cfb\u7edf\u53c2\u6570\u3002")),!0;if(2062100==K)return p.showError(g.get("error2062100","\u6ca1\u6709\u5b9e\u73b0\u63a5\u53e3ITableDataProvider\u3002")),!0;if(2061301==K)return p.showError(g.get("error2061301","\u8bf7\u586b\u5199\u6b63\u786e\u7684\u8ba4\u8bc1\u4fe1\u606f\u3002")),!0;if(2061302==K)return p.showPrompt(g.get("error2061302","\u8bf7\u586b\u5199\u5b8c\u6574\u7684\u8ba4\u8bc1\u4fe1\u606f\u3002")),!0;if(2061303==K)return p.showPrompt(g.get("error2061303",
"\u6458\u8981\u8ba4\u8bc1\u670d\u52a1\u5668\u8d28\u8be2\u5934\u53c2\u6570\u5f02\u5e38\u3002")),!0;p.showError(A);return!0}return!1}}})();
//qingVersionTag: 20250415