var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,u,p){l instanceof String&&(l=String(l));for(var t=l.length,k=0;k<t;k++){var y=l[k];if(u.call(p,y,k,l))return{i:k,v:y}}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(l,u,p){if(l==Array.prototype||l==Object.prototype)return l;l[u]=p.value;return l};$jscomp.getGlobal=function(l){l=["object"==typeof globalThis&&globalThis,l,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var u=0;u<l.length;++u){var p=l[u];if(p&&p.Math==Math)return p}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(l,u){var p=$jscomp.propertyToPolyfillSymbol[u];if(null==p)return l[u];p=l[p];return void 0!==p?p:l[u]};
$jscomp.polyfill=function(l,u,p,t){u&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(l,u,p,t):$jscomp.polyfillUnisolated(l,u,p,t))};$jscomp.polyfillUnisolated=function(l,u,p,t){p=$jscomp.global;l=l.split(".");for(t=0;t<l.length-1;t++){var k=l[t];if(!(k in p))return;p=p[k]}l=l[l.length-1];t=p[l];u=u(t);u!=t&&null!=u&&$jscomp.defineProperty(p,l,{configurable:!0,writable:!0,value:u})};
$jscomp.polyfillIsolated=function(l,u,p,t){var k=l.split(".");l=1===k.length;t=k[0];t=!l&&t in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<k.length-1;y++){var z=k[y];if(!(z in t))return;t=t[z]}k=k[k.length-1];p=$jscomp.IS_SYMBOL_NATIVE&&"es6"===p?t[k]:null;u=u(p);null!=u&&(l?$jscomp.defineProperty($jscomp.polyfills,k,{configurable:!0,writable:!0,value:u}):u!==p&&(void 0===$jscomp.propertyToPolyfillSymbol[k]&&(p=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[k]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(k):$jscomp.POLYFILL_PREFIX+p+"$"+k),$jscomp.defineProperty(t,$jscomp.propertyToPolyfillSymbol[k],{configurable:!0,writable:!0,value:u})))};$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(u,p){return $jscomp.findInternal(this,u,p).v}},"es6","es3");
(function(){function l(t,k,y){this.getTypeID=function(){return t};this.getI18nKey=function(){return k};this.getDefaultDesc=function(){return y}}function u(t){var k=this,y,z,C,H,L,K,d=[],c=[],a=[],f=[];this.setModelGroupId=function(b){y=b};this.getModelGroupId=function(){return y};this.setModelSetId=function(b){z=b};this.getModelSetId=function(){return z};this.setLevel=function(b){K=b};this.getLevel=function(){return K};this.setModelGroupName=function(b){C=b};this.getModelGroupName=function(){return C};
this.setParentId=function(b){H=b};this.getParentId=function(){return H};this.setParentNode=function(b){L=b};this.getParentNode=function(){return L};this.setArrChildren=function(b){d=b};this.getChildren=function(){return d};this.getArrAllChildren=function(){c=[];var b=k.getChildren();c=c.concat(b);for(var h=0;h<b.length;h++)0<b[h].getChildren().length&&(c=c.concat(b[h].getArrAllChildren()));return c};this.setArrModelList=function(b){a=b};this.getArrModelList=function(){return a};this.getArrAllModelList=
function(b){f=[];b?e(k):f=k.getArrModelList();return f};var e=function(b){var h=b.getArrModelList();h&&0<h.length&&(f=f.concat(h));if((b=b.getChildren())&&0<b.length)for(h=0;h<b.length;h++)e(b[h])};this.fromJsonObject=function(b){k.setModelGroupId(b.modelGroupId);k.setModelSetId(b.modelSetId);k.setModelGroupName(b.modelGroupName);k.setParentId(b.parentId);k.setLevel(b.level);var h=b.modelList;if(h&&0<h.length)for(var m=0;m<h.length;m++){var g=h[m],n=t();n.fromJsonObject(g);a.push(n)}if((b=b.children)&&
0<b.length)for(m=0;m<b.length;m++)if(h=b[m])g=new u(t),g.fromJsonObject(h),g.setParentNode(k),d.push(g)};this.toJsonObject=function(){var b={};b.modelGroupId=y;b.modelSetId=z;b.modelGroupName=C;b.parentId=H;b.parentNode=L;b.level=K;b.children=d;b.modelList=a;return b}}"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.common&&(com.kingdee.bos.qing.modeler.common={});"undefined"==typeof com.kingdee.bos.qing.modeler.common.model&&(com.kingdee.bos.qing.modeler.common.model={});var p=com.kingdee.bos.qing.modeler.common.model;p.ModelGroupFolderNode=u;p.SystemVarModel=function(){var t,k;this.setName=function(y){t=y};this.setValue=function(y){k=y};this.getName=function(){return t};this.getValue=function(){return k}};p.SystemVarType=l;l.VARIANTTYPEENUM=
[new l("USER_ID","currentUserId","\u5f53\u524d\u7528\u6237ID"),new l("USER_NAME","currentUserName","\u5f53\u524d\u7528\u6237\u540d\u79f0"),new l("ORG_ID","currentGroupID","\u5f53\u524d\u7ec4\u7ec7ID"),new l("ORG_NAME","currentGroupNAME","\u5f53\u524d\u7ec4\u7ec7\u540d\u79f0"),new l("ORG_RANGE_ID","currentGroupRangeID","\u5f53\u524d\u7528\u6237\u4e1a\u52a1\u7ec4\u7ec7\u8303\u56f4(ID)"),new l("DEPARTMENT_IDS","currentDepartmentIds","\u5f53\u524d\u7528\u6237\u6240\u5c5e\u90e8\u95e8(ID)"),new l("DEPARTMENT_AND_SUBORDINATE_IDS",
"currentDeptAndSubIds","\u5f53\u524d\u7528\u6237\u6240\u5c5e\u90e8\u95e8\u53ca\u4e0b\u7ea7(ID)"),new l("CHARGE_DEPARTMENT_IDS","currentChargeDeptId","\u5f53\u524d\u7528\u6237\u8d1f\u8d23\u7684\u90e8\u95e8(ID)"),new l("CHARGE_DEPARTMENT_AND_SUBORDINATE_IDS","currentChargeDeptAndSubIds","\u5f53\u524d\u7528\u6237\u8d1f\u8d23\u7684\u90e8\u95e8\u53ca\u4e0b\u7ea7(ID)"),new l("BIZ_UNIT_ORGRANG_ID","currentBizUnitOrgRangeIds","\u5f53\u524d\u7528\u6237\u4e1a\u52a1\u5355\u5143\u8303\u56f4(ID)"),new l("ADMIN_ORG_RANGE_ID",
"currentAdminGroupRangeID","\u5f53\u524d\u4e1a\u52a1\u884c\u653f\u7ec4\u7ec7\u8303\u56f4(ID)"),new l("I18N","currentSystemLanguage","\u5f53\u524d\u7cfb\u7edf\u8bed\u8a00")];l.SUPPORTED_VAR_TYPE=[];u.ROOT_NODE_ID="0";p.ModelType=new function(){var t=com.kingdee.bos.qing.framework.common.MultilanguageManager.createPackageAccessor(p);this.modelTypeTransformName=function(k){switch(k){case p.ModelType.DATA_TABLE_MODEL:return t.get("dataTableModelType","\u6570\u636e\u8868\u6a21\u578b");case p.ModelType.ENTITY_MODEL:return t.get("entityModelType",
"\u5b9e\u4f53\u6a21\u578b");case p.ModelType.RELATION_MODEL:return t.get("relationModelType","\u5173\u7cfb\u6a21\u578b");case p.ModelType.METRICS_MODEL:return t.get("metricsModelType","\u6307\u6807\u6a21\u578b")}return null};this.getModelIconByType=function(k){switch(k){case p.ModelType.DATA_TABLE_MODEL:return"data-table-model-icon";case p.ModelType.ENTITY_MODEL:return"entity-model-icon";case p.ModelType.RELATION_MODEL:return"relation-model-icon";case p.ModelType.METRICS_MODEL:return"metric-model-icon"}return null}};
p.ModelType.ALL_TYPE="0";p.ModelType.DATA_TABLE_MODEL="1";p.ModelType.ENTITY_MODEL="2";p.ModelType.RELATION_MODEL="3";p.ModelType.METRICS_MODEL="4"})();(function(){function l(d){var c;this.getJqUi=function(){if(!c){c=$("<div class='no-data-bg-container'>");var a=$("<div class='no-data-icon'>");K.background(a,"icon-empty");var f=$("<div class='no-data-text'>");f.text(d?d:z.get("noDataTips","\u6682\u65e0\u6570\u636e"));a.appendTo(c);f.appendTo(c)}return c};this.hide=function(){c&&c.hide()};this.show=function(){c&&c.show()}}function u(){var d=this,c,a,f,e=[],b=!1,h,m,g,n,v=[];this.addExpandedListener=function(r){v.push(r)};this.setTree=function(r){c=
r};this.getTree=function(){return c};this.setRootGroup=function(r){a=r};this.getRootGroup=function(){return a};this.setModelGroupFolderNode=function(r){f=r};this.getModelGroupFolderNode=function(){return f};this.setSelectedNode=function(r){c&&c.setSelecteds(r)};this.getSelectedNode=function(){return c&&c.getSelecteds()[0]};this.getChildCount=function(){return a&&a.getChildCount()};this.setRootVisible=function(r){b=r;c&&c.setRootVisible(b)};this.getArrModelGroupFolderNode=function(){return e};this.setFunModelGroupTreeNodeClick=
function(r){m=r};this.setAutoSelectedGroupId=function(r){g=r};this.getJqUi=function(){if(!h){c=new k;c.setRootVisible(0<f.getChildren().length);c.setNodePainter(A);var r=f.getChildren(),x=d.createBranch(f);D(x,r);a=x;c.setRoot(a);a.setExpanded(!0);n?c.setSelecteds([n]):c.setSelecteds([a]);c.setLineHeight(30);L.layoutCtrl(c.getJqUi(),0,0,"100%","100%");h=c.getJqUi();h.css("overflow","hidden auto");c.addSelectingListener(m);for(r=0;r<v.length;r++)c.addExpandedListener(v[r])}return h};this.destroy=function(){h&&
h.detach()};this.refresh=function(){n?(c.expandToNode(n,!1),c.scrollSelectedToVisible()):c&&c.refresh()};this.removeAllChildren=function(){c&&c.removeAllChildren(a)};this.addChild=function(r,x,E){c&&c.addChild(r,x,E)};this.removeChild=function(r,x){c&&c.removeChild(r,x)};this.createBranch=function(r){var x=new k.BranchNode;x.setUserObject(r);g&&g===r.getModelGroupId()&&(n=x);return x};var D=function(r,x){if(x&&0!==x.length)for(var E=0;E<x.length;E++){var J=x[E];if(0<J.getChildren().length){var w=
d.createBranch(J);r.addChild(w);D(w,J.getChildren())}else r.addChild(d.createLeafNode(J))}};this.createLeafNode=function(r){var x=new k.LeafNode;x.setUserObject(r);g&&g===r.getModelGroupId()&&(n=x);return x};var A=function(r,x){r.css("padding-left","2px");r.css("padding-right","2px");x=x.getUserObject();var E=x.getLevel();r.css("width","calc(100% - "+(20*(E+1)+10)+"px)");r.attr("title",x.getModelGroupName());r.text(x.getModelGroupName())}}function p(){var d=this,c,a,f,e,b,h=[];this.addExpandedListener=
function(g){h.push(g)};this.getTree=function(){return a};this.getRootGroup=function(){return f};this.setDataModel=function(g){e=g};this.setSelectedNode=function(g){a.setSelecteds(g)};this.getSelectedNode=function(){return a.getSelecteds()[0]};this.getChildCount=function(){return f.getChildCount()};this.setRootVisible=function(g){a.setRootVisible(g)};this.setFunTreeNodeClick=function(g){b=g};this.getJqUi=function(){if(!c){a=new k;a.setRootVisible(0<e.getChildren().length);var g=e.getChildren(),n=d.createBranch(e);
m(n,g);f=n;a.setRoot(f);f.setExpanded(!0);d.protectedInitTree(a,f);a.setLineHeight(30);a.setNodePainter(d.protectedInitCustomPainter);L.layoutCtrl(a.getJqUi(),0,0,"100%","100%");c=a.getJqUi();c.css("overflow","hidden auto");a.addSelectingListener(b);for(g=0;g<h.length;g++)a.addExpandedListener(h[g])}return c};this.destroy=function(){c&&c.detach()};this.refresh=function(g,n){d.protectedRefresh(a,g,n)};this.removeAllChildren=function(){a&&a.removeAllChildren(f)};this.addChild=function(g,n,v){a.addChild(g,
n,v)};this.removeChild=function(g,n){a.removeChild(g,n)};this.createBranch=function(g){var n=new k.BranchNode;n.setUserObject(g);d.protectedCreateBranch(g,n);return n};this.createLeafNode=function(g){var n=new k.LeafNode;n.setUserObject(g);d.protectedCreateLeafNode(g,n);return n};var m=function(g,n){if(n&&0!==n.length)for(var v=0;v<n.length;v++){var D=n[v];if(0<D.getChildren().length){var A=d.createBranch(D);g.addChild(A);m(A,D.getChildren())}else g.addChild(d.createLeafNode(D))}}}"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.common&&(com.kingdee.bos.qing.modeler.common={});"undefined"==typeof com.kingdee.bos.qing.modeler.common.ui&&(com.kingdee.bos.qing.modeler.common.ui={});var t=com.kingdee.bos.qing.modeler.common.ui;
t.NoDataContainer=l;t.SearchNoDataContainer=function(){var d,c;this.getJqUi=function(){if(!d){d=$("<div class='search-no-data-bg-container'>");var a=$("<div class='search-no-model-display-icon'>");K.background(a,"search-no-data-icon");var f=$("<div class='search-no-model-display-text'>"),e=c?z.get("searchNoDataShortTips","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"):z.get("searchNoDataTips","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c");f.text(e);a.appendTo(d);
f.appendTo(d)}return d};this.setIsShortTip=function(a){c=a};this.show=function(){d&&d.show()};this.hide=function(){d&&d.hide()}};t.ModelGroupPanel=function(){var d=this,c,a,f,e,b,h,m,g,n,v,D,A,r,x,E,J,w,I,G=!1,B=!1,M=[],O=[],P,Q;this.getJqUi=function(){if(!c){c=$("<div>");a=$("<div>");a.css("left",0);a.css("top",0);a.css("height",40);a.css("border-bottom","1px solid #CBCBCB");if(!f){f=$("<div>");var q=$("<span>");q.addClass("qdm-group-manager-area-text");q.text(z.get("group","\u76ee\u5f55"));f.append(q)}a.append(f);
e=$("<div>");e.addClass("qdm-group-all-list");g||(g=(new l).getJqUi());n=$("<div>");n.css({position:"absolute",bottom:"0",width:"100%","border-top":"1px solid #CBCBCB",height:"40px"});v=new y;v.setText(z.get("containChildren","\u5305\u542b\u4e0b\u7ea7"));v.setChecked(G);v.addCheckedListener(T);q=v.getJqUi();q.css({position:"absolute",left:"22px",top:"50%",transform:"translate(0,-50%)",width:"135px",height:"22px"});q.appendTo(n);g.hide();n.hide();c.append(a);c.append(e);c.append(g);c.append(n)}return c};
this.setModelSetId=function(q){Q=q};this.getCurrentSelectedGroup=function(){return b&&b.getSelectedNode()?b.getSelectedNode().getUserObject():m};this.getCurrentGroupModels=function(q,F){return F.getModelGroupId()===u.ROOT_NODE_ID?M:F.getArrAllModelList(q)};this.getAllModels=function(){return M};this.setTitleContent=function(q){f=q};this.setNoDataContent=function(q){};this.setAutoSelectedGroupId=function(q){I=q};this.setAutoCheckedContainChild=function(q){G=q};this.setFunShowModels=function(q){D=q};
this.setFunCustomModelCreator=function(q){r=q};this.setFunCustomModelSort=function(q){A=q};this.setFunIsModelSearch=function(q){x=q};this.setFunDoModelSearch=function(q){E=q};this.setFunClearSearchStatus=function(q){J=q};this.isContainChild=function(){return v.isChecked()};this.setDoContainChildCallback=function(q){w=q};this.setJsonDataAndUpdateUI=function(q){e.empty();M=[];O=[];P=q;b=new u;m=new H(r);P?(e.show(),g.hide(),m.fromJsonObject(P),m.setModelGroupName(z.get("rootNode","\u5168\u90e8")),R(m),
I&&(b.setAutoSelectedGroupId(I),I!==H.ROOT_NODE_ID&&(B=d.isContainChild())),I&&I!==H.ROOT_NODE_ID||(v.setChecked(!0),v.setEnabled(!1)),b.setRootVisible(!0),b.setModelGroupFolderNode(m),b.setFunModelGroupTreeNodeClick(S),h=b.getJqUi(),q=d.getCurrentGroupModels(d.isContainChild(),d.getCurrentSelectedGroup()),A&&A(q),b.refresh(),D(q),h.appendTo(e),n.show()):(e.hide(),g.show(),m.setModelGroupName(z.get("rootNode","\u5168\u90e8")),m.setModelGroupId(H.ROOT_NODE_ID),m.setModelSetId(Q),m.setLevel(0),m.setArrChildren([]),
b.setRootVisible(!1),b.setModelGroupFolderNode(m),b.setFunModelGroupTreeNodeClick(S),h=b.getJqUi(),h.appendTo(e),D([]),v.setChecked(!0),v.setEnabled(!1))};var T=function(q,F){q=d.getCurrentSelectedGroup();var N=q.getModelGroupId();F&&N!==H.ROOT_NODE_ID&&(B=d.isContainChild());x()?E():(q=d.getCurrentGroupModels(d.isContainChild(),q),F&&D(q));F&&w&&w(d.isContainChild())},R=function(q){var F=q.getArrModelList();if(F&&0<F.length)for(var N=0;N<F.length;N++)M.push(F[N]);O.push(q);if((q=q.getChildren())&&
0<q.length)for(N=0;N<q.length;N++)R(q[N])},S=function(q,F){F=F.getUserObject();q&&q.getSelecteds()[0].getUserObject().getModelGroupId()===F.getModelGroupId()||(J(),F.getModelGroupId()===H.ROOT_NODE_ID?(q=M,v.setChecked(!0),v.setEnabled(!1)):(v.setEnabled(!0),v.setChecked(B),q=F.getArrAllModelList(d.isContainChild())),D(q))}};t.ModelGroupTree=u;t.CatalogTree=function(){p.call(this);this.protectedRefresh=function(d,c,a){d.refresh(c,a)};this.protectedCreateBranch=function(){};this.protectedCreateLeafNode=
function(){};this.protectedInitTree=function(d,c){d.setSelecteds([c])};this.protectedInitCustomPainter=function(d,c){d.css("padding-left","0px");d.css("padding-right","4px");c=c.getUserObject();var a=c.getLevel();d.css("width","calc(100% - "+(20*(a+1)+10)+"px)");d.attr("title",c.getName());d.text(c.getName())}};var k,y,z,C,H,L;(function(){var d=com.kingdee.bos.qing.ui.component;k=d.Tree;y=d.CheckBox;d=com.kingdee.bos.qing.framework.common;z=d.MultilanguageManager.createPackageAccessor(t);C=d.AbstractIcons;
d=com.kingdee.bos.qing.modeler.common.model;H=d.ModelGroupFolderNode;d=com.kingdee.bos.qing.common;L=d.DomUtil})();var K=new function(){C.call(this);var d=this.protectedMethod;this.protectedInit=function(c,a){c=com.kingdee.bos.qing.modeler.common.ComboIcon;if(!c)throw Error("com.kingdee.bos.qing.modeler.modelset.ComboIcon not found.");c.define(a,"model-common");a.setGap(1);a.setStartPosition(0,151);a.setIconSize(170,98);d.registIcon(0,0,"icon-empty");a.setStartPosition(-15,400);a.setIconSize(166,
92);d.registIcon(0,0,"search-no-data-icon");a.setStartPosition(-2,62);a.setIconSize(20,20);d.registIcon(0,2,"warning");a.setStartPosition(4,114);a.setIconSize(19,19);d.registIcon(1,5,"result-preview-setting");d.registIcon(0,5,"result-preview-setting_hover")}};t.MyIcons=K;u.ROOT_NODE_ID="0";t.HeadImgGenerator=new function(){this.createHeadImg=function(d,c,a){d=null==d?"\u65e0":""==d?"\u65e0":d;var f=null==a?50:a;a=null==a?25:f/2;var e="#31bc9f #33cc70 #4a94db #9b5fb6 #34495e #16a085 #27ae60 #2980b9 #8e44ad #2c3e50 #f1cb1e #e6761b #e7363b #00bcd4 #95a5a6 #f39c12 #d35400 #c0392b #bdc3c7 #7f8c8d".split(" ");
if(c)e=c;else{c=Math;var b=c.floor,h=new Uint32Array(1);(window.crypto||window.webkitCrypto||window.mozCrypto||window.oCrypto||window.msCrypto).getRandomValues(h);e=e[b.call(c,h[0]/4294967296*e.length)]}c=$("<canvas>");c.attr("style","display:none");$("body").append(c);b=c.get(0);b.width=f;b.height=f;f=b.getContext("2d");f.fillStyle=e;f.fillRect(0,0,b.width,b.height);f.fillStyle="#ffffff";f.font="normal "+a+"px Microsoft-YaHei";f.textAlign="center";f.textBaseline="middle";h=/.*[\u4e00-\u9fa5]+.*$/;
if(h.test(d))if(/^[0-9a-zA-Z]+$/.test(d.charAt(d.length-1)))for(var m=0;m<d.length;m++){if(h.test(d[m])){f.fillText(d[m],a,a);break}}else f.fillText(d.charAt(d.length-1),a,a);else f.fillText(d.substring(0,2),a,a);d=[];d.push(b.toDataURL("image/png"));d.push(e);c.remove();return d}}})();(function(){function l(){this.switchSQLToDisplayMode=function(a,f){throw new Exception("override me");};this.switchSQLToPersistentMode=function(a,f){throw new Exception("override me");};this.loadVarModelAdapter=function(a,f){throw new Exception("override me");}}function u(){this.getId=function(){throw new Exception("override me");};this.getDisplayName=function(){throw new Exception("override me");};this.getTextInUserSQL=function(){throw new Exception("override me");};this.getFilterMode=function(){throw new Exception("override me");
};this.getVariateType=function(){throw new Exception("override me");}}function p(a){u.call(this);var f,e;this.getId=function(){return a.getTypeID()};this.getDisplayName=function(){return f?f(a):a.getI18nKey()};this.getTextInUserSQL=function(){return e?e(a):a.getI18nKey()};this.getFilterMode=function(){return FilterItem.MODE_SYS_VAR};this.getVariateType=function(){return u.VAR_TYPE_SYS};this.setDisplayNameFormater=function(b){f=b};this.setUserSQLFormater=function(b){e=b}}function t(){var a,f,e,b,h,
m,g,n;this.getJqUi=function(){a||(D(),v());return a};this.setSelected=function(A){f=A;a&&v()};this.getSelectedModel=function(){return e.isChecked()?h.getSelected():n.getSelectedModel()};var v=function(){if(f){var A=f.getVariateType();A==k.AbstractVariateAdapter.VAR_TYPE_SYS?(e.setChecked(!0),h.setSelected(f)):A==k.AbstractVariateAdapter.VAR_TYPE_MACRO&&(b.setChecked(!0),n&&n.setSelected(f))}},D=function(){a=$("<div>");var A=0,r=new L;e=new K;e.setChecked(!0);e.setText(y.get("systemVar","\u7cfb\u7edf\u53d8\u91cf"));
var x=e.getJqUi();x.appendTo(a);C.layoutCtrl(x,0,A,200,23);r.addElement(e);e.addCheckedListener(function(){g&&g.hide();h.setEnabled(!0)});h=new d;x=k.VariateHelperFactory.getImpl(k.VariateHelperFactory.SYS_VAR_HELPER).createSysVarAdapters(z.SUPPORTED_VAR_TYPE);h.setItemModels(x);h.setSelected(x[0]);h.setCustomPainter(function(E,J,w){E=w.getDisplayName();J.attr("title",E);w=$("<div>");w.text(E);w.appendTo(J)});m=h.getJqUi();C.layoutCtrl(m,0,A+=43,200,23);m.appendTo(a);b=new K;b.setText(y.get("macroVar",
"\u5b8f\u53d8\u91cf"));x=b.getJqUi();x.appendTo(a);C.layoutCtrl(x,0,A+=43,200,23);r.addElement(b);b.addCheckedListener(function(){h.setEnabled(!1);n?g&&g.show():(n=k.MacroVariateSelectorRegister.createSelector(),f&&n.setSelected(f),g=n.getJqUi(),C.layoutCtrl(g,0,A+=33,465,290),g.appendTo(a))})}}"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.common&&(com.kingdee.bos.qing.modeler.common={});var k=com.kingdee.bos.qing.modeler.common;k.VariateHelperFactory=new function(){var a={};this.getImpl=function(f){return a[f]};this.getAllImpl=function(){var f=[],e;for(e in a)f.push(a[e]);return f};this.registImpl=function(f,e){a[f]=e}};k.VariateHelperFactory.SYS_VAR_HELPER="sysVar";k.VariateHelperFactory.MACRO_VAR_HELPER=
"macroVar";k.SysVarAdapter=p;k.VarSelectDialog=function(){H.call(this);var a=this,f=this.protectedMethod,e,b,h;(function(){f.setTitle(y.get("selectVariate","\u9009\u62e9\u53d8\u91cf"));a.setSize(500,540);f.setSelectable(!0);f.setContentPaneCreator(function(){e||(e=new t,e.setSelected(h));return e.getJqUi()});f.setClosingChecker2(function(m){if(m=e.getSelectedModel())return b(m),f.destroy(),!0;f.getMessageCurtain().showPrompt(y.get("noVarSelected","\u8bf7\u9009\u62e9\u4e00\u4e2a\u53d8\u91cf\u3002"));
return!1},function(m){f.destroy();return!0});f.setClosingAction(function(m){})})();this.setSelectedCallback=function(m){b=m};this.setSelected=function(m){h=m;e&&e.setSelected(h)}};k.DropdownItemListPane=function(){var a=this,f=[],e,b,h,m=[],g,n,v;this.setItemModels=function(w){f=w;n=null};this.setItemsWidth=function(w){b=w};this.setText=function(w){e=w;g&&g.text(e?e:"")};this.setCustomPainter=function(w){h=w;n&&x()};this.addPressedListener=function(w){m.push(w)};this.getJqUi=function(){g||(g=$("<div>"),
g.text(e?e:""),g.addClass("dm-source-dropdownitemlistpane-text"),g.on("click",D));return g};var D=function(){if(v)A();else{n||r();var w=$(document.body),I=g.outerHeight(),G=b?b:g.outerWidth(),B=[0,I];B=C.upwardCoordinate(g[0],B,w[0]);I=B[0];var M=B[1];B=w.prop("clientHeight");var O=Math.min(20*Math.max(1,Math.min(f.length,10))+2,(B>>1)-10);M+O>B&&(B=[0,0],B=C.upwardCoordinate(g[0],B,w[0]),B=B[1]-O,0<=B&&(M=B));v=$("<div>");v.addClass("dm-dropdownitemlist-popup");v.css("position","absolute");v.css("left",
I+"px");v.css("top",M+"px");v.css("width",G+"px");v.css("height",O+"px");v.css("box-shadow","0 0 2px 0 #ccc");v.css("z-index","999999");v.appendTo(w);G=n.getJqUi();G.appendTo(v);G.css("position","absolute");G.css("left","0px");G.css("top","0px");G.css("width","100%");G.css("height","100%");n.scrollSelectedToVisible();w.on("mousedown",J);w.on("mousewheel",E)}},A=function(){if(v){var w=$(document.body);w.off("mousedown",J);w.off("mousewheel",E);v.detach();v=null}},r=function(){n=new c;n.setItemModels(f);
n.addPressedListener(function(w,I){A();for(var G=0;G<m.length;G++)(0,m[G])(a,w.getSelecteds()[0],I);(w=w.getJqUi().find(".sa-ctrl-list-item_selected_enabled"))&&w.removeClass("sa-ctrl-list-item_selected_enabled")});x()},x=function(){h?n.setCustomItemPainter(function(w,I){h(!1,w,I)}):n.setCustomItemPainter(null)},E=function(w){return C.isDescendent(w.target,n.getJqUi()[0])?!0:!1},J=function(w){g.is(":visible")&&(C.isDescendent(w.target,g[0])||C.isDescendent(w.target,v[0]))||A()}};k.VarSelectPanel=
t;var y,z,C,H,L,K,d,c;(function(){var a=com.kingdee.bos.qing.framework.common;y=a.MultilanguageManager.createPackageAccessor(k);a=com.kingdee.bos.qing.modeler.common.model;z=a.SystemVarType;a=com.kingdee.bos.qing.common;C=a.DomUtil;a=com.kingdee.bos.qing.ui.component;H=a.AbstractModalDialog;L=a.RadioButtonGroup;K=a.RadioButton;d=a.ComboBox;c=a.List})();k.VariateHelperFactory.registImpl(k.VariateHelperFactory.SYS_VAR_HELPER,new function(){l.call(this);var a=this;this.switchSQLToDisplayMode=function(e,
b){e=f(e,!0);if(b)b(e);else return e};this.switchSQLToPersistentMode=function(e,b){e=f(e,!1);if(b)b(e);else return e};this.getFormatText=function(e){return"'"+"@%s".replace("%s",y.get(e.getI18nKey(),e.getDefaultDesc()))+"'"};this.loadVarModelAdapter=function(e,b){for(var h,m=0;m<z.SUPPORTED_VAR_TYPE.length;m++){var g=z.SUPPORTED_VAR_TYPE[m];if(g.getTypeID()==e){h=a.createSysVarAdapter(g);break}}if(b)b(h);else return h};this.createSysVarAdapter=function(e){e=new p(e);e.setDisplayNameFormater(function(b){return y.get(b.getI18nKey(),
b.getDefaultDesc())});e.setUserSQLFormater(function(b){return a.getFormatText(b)});return e};this.createSysVarAdapters=function(e){for(var b=[],h=0,m=e.length;h<m;h++){var g=a.createSysVarAdapter(e[h]);b.push(g)}return b};var f=function(e,b){if(e){for(var h=0;h<z.SUPPORTED_VAR_TYPE.length;h++){var m=z.SUPPORTED_VAR_TYPE[h],g=y.get(m.getI18nKey(),m.getDefaultDesc()),n=m.getTypeID();m="@%s".replace("%s",b?n:g);g="@%s".replace("%s",b?g:n);m=new RegExp(m.replace("(","\\(").replace(")","\\)"),"g");e=e.replace(m,
g)}return e}}});u.VAR_TYPE_SYS="sys_var";u.VAR_TYPE_MACRO="macro_var";k.MacroVariateSelectorRegister=new function(){var a;this.registerConstructor=function(f){a=f};this.createSelector=function(){return new a};this.isRegisterComplete=function(){return void 0!=a}}})();
//qingVersionTag: 20250415