var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(y){var C=0;return function(){return C<y.length?{done:!1,value:y[C++]}:{done:!0}}};$jscomp.arrayIterator=function(y){return{next:$jscomp.arrayIteratorImpl(y)}};$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(y,C,K){if(y==Array.prototype||y==Object.prototype)return y;y[C]=K.value;return y};$jscomp.getGlobal=function(y){y=["object"==typeof globalThis&&globalThis,y,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var C=0;C<y.length;++C){var K=y[C];if(K&&K.Math==Math)return K}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(y,C){var K=$jscomp.propertyToPolyfillSymbol[C];if(null==K)return y[C];K=y[K];return void 0!==K?K:y[C]};
$jscomp.polyfill=function(y,C,K,ca){C&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(y,C,K,ca):$jscomp.polyfillUnisolated(y,C,K,ca))};$jscomp.polyfillUnisolated=function(y,C,K,ca){K=$jscomp.global;y=y.split(".");for(ca=0;ca<y.length-1;ca++){var da=y[ca];if(!(da in K))return;K=K[da]}y=y[y.length-1];ca=K[y];C=C(ca);C!=ca&&null!=C&&$jscomp.defineProperty(K,y,{configurable:!0,writable:!0,value:C})};
$jscomp.polyfillIsolated=function(y,C,K,ca){var da=y.split(".");y=1===da.length;ca=da[0];ca=!y&&ca in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var I=0;I<da.length-1;I++){var M=da[I];if(!(M in ca))return;ca=ca[M]}da=da[da.length-1];K=$jscomp.IS_SYMBOL_NATIVE&&"es6"===K?ca[da]:null;C=C(K);null!=C&&(y?$jscomp.defineProperty($jscomp.polyfills,da,{configurable:!0,writable:!0,value:C}):C!==K&&(void 0===$jscomp.propertyToPolyfillSymbol[da]&&(K=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[da]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(da):$jscomp.POLYFILL_PREFIX+K+"$"+da),$jscomp.defineProperty(ca,$jscomp.propertyToPolyfillSymbol[da],{configurable:!0,writable:!0,value:C})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(y){if(y)return y;var C=function(I,M){this.$jscomp$symbol$id_=I;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:M})};C.prototype.toString=function(){return this.$jscomp$symbol$id_};var K="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",ca=0,da=function(I){if(this instanceof da)throw new TypeError("Symbol is not a constructor");return new C(K+(I||"")+"_"+ca++,I)};return da},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(y){if(y)return y;y=Symbol("Symbol.iterator");for(var C="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),K=0;K<C.length;K++){var ca=$jscomp.global[C[K]];"function"===typeof ca&&"function"!=typeof ca.prototype[y]&&$jscomp.defineProperty(ca.prototype,y,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return y},"es6",
"es3");$jscomp.iteratorPrototype=function(y){y={next:y};y[Symbol.iterator]=function(){return this};return y};$jscomp.iteratorFromArray=function(y,C){y instanceof String&&(y+="");var K=0,ca=!1,da={next:function(){if(!ca&&K<y.length){var I=K++;return{value:C(I,y[I]),done:!1}}ca=!0;return{done:!0,value:void 0}}};da[Symbol.iterator]=function(){return da};return da};
$jscomp.polyfill("Array.prototype.keys",function(y){return y?y:function(){return $jscomp.iteratorFromArray(this,function(C){return C})}},"es6","es3");$jscomp.findInternal=function(y,C,K){y instanceof String&&(y=String(y));for(var ca=y.length,da=0;da<ca;da++){var I=y[da];if(C.call(K,I,da,y))return{i:da,v:I}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(y){return y?y:function(C,K){return $jscomp.findInternal(this,C,K).v}},"es6","es3");
(function(){"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={});com.kingdee.bos.qing.modeler.SpecialWordChecker=new function(){var y="! $ & * + , - . / : < << = > @ ABORT ACCESS ACCESSED ACCOUNT ACTIVATE ADD ADMIN ADMINISTER ADMINISTRATOR ADVISE ADVISOR AFTER ALGORITHM ALIAS ALL ALLOCATE ALLOW ALL_ROWS ALTER ALWAYS ANALYZE ANCILLARY AND AND_EQUAL ANTIJOIN ANY APPEND APPLY ARCHIVE ARCHIVELOG ARRAY AS ASC ASSOCIATE AT ATTRIBUTE ATTRIBUTES AUDIT AUTHENTICATED AUTHENTICATION AUTHID AUTHORIZATION AUTO AUTOALLOCATE AUTOEXTEND AUTOMATIC AVAILABILITY BACKUP BECOME BEFORE BEGIN BEHALF BETWEEN BFILE BIGFILE BINARY_DOUBLE BINARY_DOUBLE_INFINITY BINARY_DOUBLE_NAN BINARY_FLOAT BINARY_FLOAT_INFINITY BINARY_FLOAT_NAN BINDING BITMAP BITS BLOB BLOCK BLOCKS BLOCKSIZE BLOCK_RANGE BODY BOTH BOUND BROADCAST BUFFER BUFFER_CACHE BUFFER_POOL BUILD BULK BY BYPASS_RECURSIVE_CHECK BYPASS_UJVC BYTE CACHE CACHE_CB CACHE_INSTANCES CACHE_TEMP_TABLE CALL CANCEL CARDINALITY CASCADE CASE CAST CATEGORY CERTIFICATE CFILE CHAINED CHANGE CHAR CHARACTER CHAR_CS CHECK CHECKPOINT CHILD CHOOSE CHUNK CIV_GB CLASS CLEAR CLOB CLONE CLOSE CLOSE_CACHED_OPEN_CURSORS CLUSTER CLUSTERING_FACTOR COALESCE COARSE COLLECT COLLECTIONS_GET_REFS COLUMN COLUMNS COLUMN_STATS COLUMN_VALUE COMMENT COMMIT COMMITTED COMPACT COMPATIBILITY COMPILE COMPLETE COMPOSITE_LIMIT COMPRESS COMPUTE CONFORMING CONNECT CONNECT_BY_ISCYCLE CONNECT_BY_ISLEAF CONNECT_BY_ROOT CONNECT_TIME CONSIDER CONSISTENT CONSTRAINT CONSTRAINTS CONTAINER CONTENT CONTENTS CONTEXT CONTINUE CONTROLFILE CONVERT CORRUPTION COST CPU_COSTING CPU_PER_CALL CPU_PER_SESSION CREATE CREATE_STORED_OUTLINES CROSS CUBE CUBE_GB CURRENT CURRENT_DATE CURRENT_SCHEMA CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURSOR CURSOR_SHARING_EXACT CURSOR_SPECIFIC_SEGMENT CYCLE DANGLING DATA DATABASE DATAFILE DATAFILES DATAOBJNO DATE DATE_MODE DAY DBA DBA_RECYCLEBIN DBTIMEZONE DDL DEALLOCATE DEBUG DEC DECIMAL DECLARE DECREMENT DEFAULT DEFERRABLE DEFERRED DEFINED DEFINER DEGREE DELAY DELETE DEMAND DENSE_RANK DEREF DEREF_NO_REWRITE DESC DETACHED DETERMINES DICTIONARY DIMENSION DIRECTORY DISABLE DISASSOCIATE DISCONNECT DISK DISKGROUP DISKS DISMOUNT DISTINCT DISTINGUISHED DISTRIBUTED DML DML_UPDATE DOCUMENT DOMAIN_INDEX_NO_SORT DOMAIN_INDEX_SORT DOUBLE DOWNGRADE DRIVING_SITE DROP DUMP DYNAMIC DYNAMIC_SAMPLING DYNAMIC_SAMPLING_EST_CDN EACH ELEMENT ELSE EMPTY ENABLE ENCRYPTED ENCRYPTION END ENFORCE ENFORCED ENTRY ERROR ERROR_ON_OVERLAP_TIME ESCAPE ESTIMATE EVENTS EXCEPT EXCEPTIONS EXCHANGE EXCLUDING EXCLUSIVE EXECUTE EXEMPT EXISTS EXPAND_GSET_TO_UNION EXPIRE EXPLAIN EXPLOSION EXPORT EXPR_CORR_CHECK EXTEND EXTENDS EXTENT EXTENTS EXTERNAL EXTERNALLY EXTRACT FACT FAILED FAILED_LOGIN_ATTEMPTS FAILGROUP FALSE FAST FBTSCAN FIC_CIV FIC_PIV FILE FILTER FINAL FINE FINISH FIRST FIRST_ROWS FLAGGER FLASHBACK FLOAT FLOB FLUSH FOLLOWING FOR FORCE FORCE_XML_QUERY_REWRITE FOREIGN FREELIST FREELISTS FREEPOOLS FRESH FROM FULL FUNCTION FUNCTIONS GATHER_PLAN_STATISTICS GBY_CONC_ROLLUP GENERATED GLOBAL GLOBALLY GLOBAL_NAME GLOBAL_TOPIC_ENABLED GRANT GROUP GROUPING GROUPS GROUP_BY GUARANTEE GUARANTEED GUARD HASH HASHKEYS HASH_AJ HASH_SJ HAVING HEADER HEAP HIERARCHY HIGH HINTSET_BEGIN HINTSET_END HOUR HWM_BROKERED IDENTIFIED IDENTIFIER IDENTITY IDGENERATORS IDLE_TIME IF IGNORE IGNORE_ON_CLAUSE IGNORE_OPTIM_EMBEDDED_HINTS IGNORE_WHERE_CLAUSE IMMEDIATE IMPORT IN INCLUDE_VERSION INCLUDING INCREMENT INCREMENTAL INDEX INDEXED INDEXES INDEXTYPE INDEXTYPES INDEX_ASC INDEX_COMBINE INDEX_DESC INDEX_FFS INDEX_FILTER INDEX_JOIN INDEX_ROWS INDEX_RRS INDEX_SCAN INDEX_SKIP_SCAN INDEX_SS INDEX_SS_ASC INDEX_SS_DESC INDEX_STATS INDICATOR INFINITE INFORMATIONAL INITIAL INITIALIZED INITIALLY INITRANS INLINE INNER INSERT INSTANCE INSTANCES INSTANTIABLE INSTANTLY INSTEAD INT INTEGER INTEGRITY INTERMEDIATE INTERNAL_CONVERT INTERNAL_USE INTERPRETED INTERSECT INTERVAL INTO INVALIDATE IN_MEMORY_METADATA IS ISOLATION ISOLATION_LEVEL ITERATE ITERATION_NUMBER JAVA JOB JOIN KEEP KERBEROS KEY KEYFILE KEYS KEYSIZE KEY_LENGTH KILL LAST LATERAL LAYER LDAP_REGISTRATION LDAP_REGISTRATION_ENABLED LDAP_REG_SYNC_INTERVAL LEADING LEFT LENGTH LESS LEVEL LEVELS LIBRARY LIKE LIKE2 LIKE4 LIKEC LIKE_EXPAND LIMIT LINK LIST LOB LOCAL LOCALTIME LOCALTIMESTAMP LOCAL_INDEXES LOCATION LOCATOR LOCK LOCKED LOG LOGFILE LOGGING LOGICAL LOGICAL_READS_PER_CALL LOGICAL_READS_PER_SESSION LOGOFF LOGON LONG MAIN MANAGE MANAGED MANAGEMENT MANUAL MAPPING MASTER MATCHED MATERIALIZE MATERIALIZED MAX MAXARCHLOGS MAXDATAFILES MAXEXTENTS MAXIMIZE MAXINSTANCES MAXLOGFILES MAXLOGHISTORY MAXLOGMEMBERS MAXSIZE MAXTRANS MAXVALUE MEASURES MEMBER MEMORY MERGE MERGE_AJ MERGE_CONST_ON MERGE_SJ METHOD MIGRATE MIN MINEXTENTS MINIMIZE MINIMUM MINUS MINUTE MINVALUE MIRROR MLSLABEL MODE MODEL MODEL_DONTVERIFY_UNIQUENESS MODEL_MIN_ANALYSIS MODEL_NO_ANALYSIS MODEL_PBY MODEL_PUSH_REF MODIFY MONITORING MONTH MOUNT MOVE MOVEMENT MULTISET MV_MERGE NAME NAMED NAN NATIONAL NATIVE NATURAL NAV NCHAR NCHAR_CS NCLOB NEEDED NESTED NESTED_TABLE_FAST_INSERT NESTED_TABLE_GET_REFS NESTED_TABLE_ID NESTED_TABLE_SET_REFS NESTED_TABLE_SET_SETID NETWORK NEVER NEW NEXT NLS_CALENDAR NLS_CHARACTERSET NLS_COMP NLS_CURRENCY NLS_DATE_FORMAT NLS_DATE_LANGUAGE NLS_ISO_CURRENCY NLS_LANG NLS_LANGUAGE NLS_LENGTH_SEMANTICS NLS_NCHAR_CONV_EXCP NLS_NUMERIC_CHARACTERS NLS_SORT NLS_SPECIAL_CHARS NLS_TERRITORY NL_AJ NL_SJ NO NOAPPEND NOARCHIVELOG NOAUDIT NOCACHE NOCOMPRESS NOCPU_COSTING NOCYCLE NODELAY NOFORCE NOGUARANTEE NOLOGGING NOMAPPING NOMAXVALUE NOMINIMIZE NOMINVALUE NOMONITORING NONE NOORDER NOOVERRIDE NOPARALLEL NOPARALLEL_INDEX NORELY NOREPAIR NORESETLOGS NOREVERSE NOREWRITE NORMAL NOROWDEPENDENCIES NOSEGMENT NOSORT NOSTRICT NOSWITCH NOT NOTHING NOVALIDATE NOWAIT NO_ACCESS NO_BASETABLE_MULTIMV_REWRITE NO_BUFFER NO_CPU_COSTING NO_EXPAND NO_EXPAND_GSET_TO_UNION NO_FACT NO_FILTERING NO_INDEX NO_INDEX_FFS NO_INDEX_SS NO_MERGE NO_MODEL_PUSH_REF NO_MONITORING NO_MULTIMV_REWRITE NO_ORDER_ROLLUPS NO_PARALLEL NO_PARALLEL_INDEX NO_PARTIAL_COMMIT NO_PRUNE_GSETS NO_PUSH_PRED NO_PUSH_SUBQ NO_QKN_BUFF NO_QUERY_TRANSFORMATION NO_REF_CASCADE NO_REWRITE NO_SEMIJOIN NO_SET_TO_JOIN NO_STAR_TRANSFORMATION NO_STATS_GSETS NO_SWAP_JOIN_INPUTS NO_TRIGGER NO_UNNEST NO_USE_HASH NO_USE_MERGE NO_USE_NL NO_XML_QUERY_REWRITE NULL NULLS NUMBER NUMERIC NVARCHAR2 OBJECT OBJNO OBJNO_REUSE OF OFF OFFLINE OID OIDINDEX OLD ON ONLINE ONLY OPAQUE OPAQUE_TRANSFORM OPAQUE_XCANONICAL OPCODE OPEN OPERATOR OPTIMAL OPTIMIZER_FEATURES_ENABLE OPTIMIZER_GOAL OPTION OPT_ESTIMATE OR ORA_ROWSCN ORDER ORDERED ORDERED_PREDICATES ORGANIZATION OR_EXPAND OUTER OUTLINE OUT_OF_LINE OVER OVERFLOW OVERFLOW_NOMOVE OVERLAPS OWN PACKAGE PACKAGES PARALLEL PARALLEL_INDEX PARAMETERS PARENT PARITY PARTIALLY PARTITION PARTITIONS PARTITION_HASH PARTITION_LIST PARTITION_RANGE PASSWORD PASSWORD_GRACE_TIME PASSWORD_LIFE_TIME PASSWORD_LOCK_TIME PASSWORD_REUSE_MAX PASSWORD_REUSE_TIME PASSWORD_VERIFY_FUNCTION PCTFREE PCTINCREASE PCTTHRESHOLD PCTUSED PCTVERSION PERCENT PERFORMANCE PERMANENT PFILE PHYSICAL PIV_GB PIV_SSF PLAN PLSQL_CODE_TYPE PLSQL_DEBUG PLSQL_OPTIMIZE_LEVEL PLSQL_WARNINGS POLICY POST_TRANSACTION POWER PQ_DISTRIBUTE PQ_MAP PQ_NOMAP PREBUILT PRECEDING PRECISION PREPARE PRESENT PRESERVE PRIMARY PRIOR PRIVATE PRIVATE_SGA PRIVILEGE PRIVILEGES PROCEDURE PROFILE PROGRAM PROJECT PROTECTED PROTECTION PUBLIC PURGE PUSH_PRED PUSH_SUBQ PX_GRANULE QB_NAME QUERY QUERY_BLOCK QUEUE QUEUE_CURR QUEUE_ROWP QUIESCE QUOTA RANDOM RANGE RAPIDLY RAW RBA READ READS REAL REBALANCE REBUILD RECORDS_PER_BLOCK RECOVER RECOVERABLE RECOVERY RECYCLE RECYCLEBIN REDUCED REDUNDANCY REF REFERENCE REFERENCED REFERENCES REFERENCING REFRESH REF_CASCADE_CURSOR REGEXP_LIKE REGISTER REJECT REKEY RELATIONAL RELY REMOTE_MAPPED RENAME REPAIR REPLACE REQUIRED RESET RESETLOGS RESIZE RESOLVE RESOLVER RESOURCE RESTORE_AS_INTERVALS RESTRICT RESTRICTED RESTRICT_ALL_REF_CONS RESUMABLE RESUME RETENTION RETURN RETURNING REUSE REVERSE REVOKE REWRITE REWRITE_OR_ERROR RIGHT ROLE ROLES ROLLBACK ROLLUP ROW ROWDEPENDENCIES ROWID ROWNUM ROWS ROW_LENGTH RULE RULES SAMPLE SAVEPOINT SAVE_AS_INTERVALS SB4 SCALE SCALE_ROWS SCAN SCAN_INSTANCES SCHEDULER SCHEMA SCN SCN_ASCENDING SCOPE SD_ALL SD_INHIBIT SD_SHOW SECOND SECURITY SEED SEGMENT SEG_BLOCK SEG_FILE SELECT SELECTIVITY SEMIJOIN SEMIJOIN_DRIVER SEQUENCE SEQUENCED SEQUENTIAL SERIALIZABLE SERVERERROR SESSION SESSIONS_PER_USER SESSIONTIMEZONE SESSIONTZNAME SESSION_CACHED_CURSORS SET SETS SETTINGS SET_TO_JOIN SEVERE SHARE SHARED SHARED_POOL SHRINK SHUTDOWN SIBLINGS SID SIMPLE SINGLE SINGLETASK SIZE SKIP SKIP_EXT_OPTIMIZER SKIP_UNQ_UNUSABLE_IDX SKIP_UNUSABLE_INDEXES SMALLFILE SMALLINT SNAPSHOT SOME SORT SOURCE SPACE SPECIFICATION SPFILE SPLIT SPREADSHEET SQL SQLLDR SQL_TRACE STANDBY STAR START STARTUP STAR_TRANSFORMATION STATEMENT_ID STATIC STATISTICS STOP STORAGE STORE STREAMS STRICT STRIP STRUCTURE SUBMULTISET SUBPARTITION SUBPARTITIONS SUBPARTITION_REL SUBSTITUTABLE SUCCESSFUL SUMMARY SUPPLEMENTAL SUSPEND SWAP_JOIN_INPUTS SWITCH SWITCHOVER SYNONYM SYSAUX SYSDATE SYSDBA SYSOPER SYSTEM SYSTIMESTAMP SYS_DL_CURSOR SYS_FBT_INSDEL SYS_OP_BITVEC SYS_OP_CAST SYS_OP_COL_PRESENT SYS_OP_ENFORCE_NOT_NULL $SYS_OP_MINE_VALUE SYS_OP_NOEXPAND SYS_OP_NTCIMG $SYS_PARALLEL_TXN SYS_RID_ORDER TABLE TABLES TABLESPACE TABLESPACE_NO TABLE_STATS TABNO TEMPFILE TEMPLATE TEMPORARY THAN THE THEN THREAD THROUGH TIME TIMEOUT TIMESTAMP TIMEZONE_ABBR TIMEZONE_HOUR TIMEZONE_MINUTE TIMEZONE_REGION TIME_ZONE TIV_GB TIV_SSF TO TOPLEVEL TRACE TRACING TRACKING TRAILING TRANSACTION TRANSITIONAL TREAT TRIGGER TRIGGERS TRUE TRUNCATE TRUSTED TUNING TX TYPE TYPES TZ_OFFSET UB2 UBA UID UNARCHIVED UNBOUND UNBOUNDED UNDER UNDO UNDROP UNIFORM UNION UNIQUE UNLIMITED UNLOCK UNNEST UNPACKED UNPROTECTED UNQUIESCE UNRECOVERABLE UNTIL UNUSABLE UNUSED UPDATABLE UPDATE UPDATED UPD_INDEXES UPD_JOININDEX UPGRADE UPSERT UROWID USAGE USE USER USER_DEFINED USER_RECYCLEBIN USE_ANTI USE_CONCAT USE_HASH USE_MERGE USE_NL USE_NL_WITH_INDEX USE_PRIVATE_OUTLINES USE_SEMI USE_STORED_OUTLINES USE_TTT_FOR_GSETS USE_WEAK_NAME_RESL USING VALIDATE VALIDATION VALUE VALUES VARCHAR VARCHAR2 VARRAY VARYING VECTOR_READ VECTOR_READ_TRACE VERSION VERSIONS VIEW WAIT WELLFORMED WHEN WHENEVER WHERE WHITESPACE WITH WITHIN WITHOUT WORK WRITE XID XMLATTRIBUTES XMLCOLATTVAL XMLELEMENT XMLFOREST XMLPARSE XMLSCHEMA XMLTYPE X_DYN_PRUNE YEAR ZONE [ ] ^ | ABS ABSENT ABSOLUTE ACCORDING ACTION ADA AGGREGATE ALSO ANALYSE ARE ARRAY_AGG ARRAY_MAX_CARDINALITY ASENSITIVE ASSERTION ASSIGNMENT ASYMMETRIC ATOMIC AVG BACKWARD BASE64 BEGIN_FRAME BEGIN_PARTITION BERNOULLI BIGINT BINARY BIT BIT_LENGTH BLOCKED BOM BOOLEAN BREADTH C CALLED CASCADED CATALOG CATALOG_NAME CEIL CEILING CHAIN CHARACTERISTICS CHARACTERS CHARACTER_LENGTH CHARACTER_SET_CATALOG CHARACTER_SET_NAME CHARACTER_SET_SCHEMA CHAR_LENGTH CLASS_ORIGIN COBOL COLLATE COLLATION COLLATION_CATALOG COLLATION_NAME COLLATION_SCHEMA COLUMN_NAME COMMAND_FUNCTION COMMAND_FUNCTION_CODE COMMENTS CONCURRENTLY CONDITION CONDITION_NUMBER CONFIGURATION CONFLICT CONNECTION CONNECTION_NAME CONSTRAINT_CATALOG CONSTRAINT_NAME CONSTRAINT_SCHEMA CONSTRUCTOR CONTAINS CONTROL CONVERSION COPY CORR CORRESPONDING COUNT COVAR_POP COVAR_SAMP CSV CUME_DIST CURRENT_CATALOG CURRENT_DEFAULT_TRANSFORM_GROUP CURRENT_PATH CURRENT_ROLE CURRENT_ROW CURRENT_TRANSFORM_GROUP_FOR_TYPE CURSOR_NAME DATALINK DATETIME_INTERVAL_CODE DATETIME_INTERVAL_PRECISION DB DEFAULTS DELIMITER DELIMITERS DEPENDS DEPTH DERIVED DESCRIBE DESCRIPTOR DETERMINISTIC DIAGNOSTICS DISCARD DISPATCH DLNEWCOPY DLPREVIOUSCOPY DLURLCOMPLETE DLURLCOMPLETEONLY DLURLCOMPLETEWRITE DLURLPATH DLURLPATHONLY DLURLPATHWRITE DLURLSCHEME DLURLSERVER DLVALUE DO DOMAIN DYNAMIC_FUNCTION DYNAMIC_FUNCTION_CODE ENCODING END-EXEC END_FRAME END_PARTITION ENUM EQUALS EVENT EVERY EXCEPTION EXCLUDE EXEC EXP EXPRESSION EXTENSION FAMILY FETCH FIRST_VALUE FLAG FLOOR FORTRAN FORWARD FOUND FRAME_ROW FREE FREEZE FS FUSION G GENERAL GET GO GOTO GRANTED GREATEST HANDLER HEX HOLD ILIKE IMMEDIATELY IMMUTABLE IMPLEMENTATION IMPLICIT INDENT INHERIT INHERITS INOUT INPUT INSENSITIVE INTERSECTION INVOKER ISNULL K KEY_MEMBER KEY_TYPE LABEL LAG LANGUAGE LARGE LAST_VALUE LEAD LEAKPROOF LEAST LIKE_REGEX LISTEN LN LOAD LOGGED LOWER M MAP MATCH MAX_CARDINALITY MESSAGE_LENGTH MESSAGE_OCTET_LENGTH MESSAGE_TEXT MOD MODIFIES MODULE MORE MUMPS NAMES NAMESPACE NESTING NFC NFD NFKC NFKD NIL NORMALIZE NORMALIZED NOTIFY NOTNULL NTH_VALUE NTILE NULLABLE NULLIF OCCURRENCES_REGEX OCTETS OCTET_LENGTH OFFSET OIDS OPTIONS ORDERING ORDINALITY OTHERS OUT OUTPUT OVERLAY OVERRIDING OWNED OWNER P PAD PARAMETER PARAMETER_MODE PARAMETER_NAME PARAMETER_ORDINAL_POSITION PARAMETER_SPECIFIC_CATALOG PARAMETER_SPECIFIC_NAME PARAMETER_SPECIFIC_SCHEMA PARSER PARTIAL PASCAL PASSING PASSTHROUGH PATH PERCENTILE_CONT PERCENTILE_DISC PERCENT_RANK PERIOD PERMISSION PLACING PLANS PLI PORTION POSITION POSITION_REGEX PRECEDES PREPARED PROCEDURAL QUOTE RANK REASSIGN RECHECK RECURSIVE REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 EXIT PRINT PROC FILLFACTOR RAISERROR FREETEXT READTEXT BREAK FREETEXTTABLE RECONFIGURE BROWSE REPLICATION RESTORE HOLDLOCK CLUSTERED ROWCOUNT IDENTITY_INSERT ROWGUIDCOL IDENTITYCOL SAVE SESSION_USER CONTAINSTABLE SETUSER SYSTEM_USER TEXTSIZE LINENO TOP TRAN NOCHECK DBCC NONCLUSTERED TSEQUAL DENY OFFSETS UPDATETEXT OPENDATASOURCE OPENQUERY OPENROWSET DUMMY OPENXML WAITFOR WHILE ERRLVL WRITETEXT L S RK SEQ MS XXFIELDXX".split(" ");
this.isSpecialWord=function(C){return C&&0!=C.length?-1<y.indexOf(C.trim().toUpperCase()):!0}}})();(function(){function y(){var F=1,N=[];this.zoomIn=function(){var r=y.SUPPORT_SCALES.indexOf(F);r<y.SUPPORT_SCALES.length-1&&(F=y.SUPPORT_SCALES[r+1],B())};this.zoomOut=function(){var r=y.SUPPORT_SCALES.indexOf(F);0<r&&(F=y.SUPPORT_SCALES[r-1],B())};this.isMinScale=function(){return y.SUPPORT_SCALES[0]==F};this.isMaxScale=function(){return y.SUPPORT_SCALES[y.SUPPORT_SCALES.length-1]==F};this.getRatio=function(){return F};this.setCustomRatio=function(r){F=r};this.getScaledSize=function(r){return 1==
F?r:F*r};this.getRawSize=function(r){return 1==F?r:r/F};this.getScaledCoordinate=function(r){return 1==F?r:[F*r[0],F*r[1]]};this.getRawCoordinate=function(r){return 1==F?r:[r[0]/F,r[1]/F]};this.addPropertyChangedListener=function(r){N.push(r)};var B=function(){for(var r=0;r<N.length;r++){var D=N[r];D&&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.designer&&(com.kingdee.bos.qing.modeler.designer={});var C=com.kingdee.bos.qing.modeler.designer;C.Toolbar=function(){var F=new K,N,B=$("<div>"),r=$("<div>"),D=$("<div>");this.getJqUi=function(){N||(N=F.getJqUi(),N.addClass("modeler-designer-toolbar"),n(B),n(r),n(D));return N};this.addButton=function(t,T,Z,Q){return z(r,!1,t,T,Z,Q)};this.addButtonForHeadCustom=function(t,
T,Z,Q){return z(B,!1,t,T,Z,Q)};this.addButtonForTailCustom=function(t,T,Z,Q){return z(D,!1,t,T,Z,Q)};this.addMenuButton=function(t,T,Z,Q){return z(r,!0,t,T,Z,Q)};this.addMenuButtonForHeadCustom=function(t,T,Z,Q){return z(B,!0,t,T,Z,Q)};this.addMenuButtonForTailCustom=function(t,T,Z,Q){return z(D,!0,t,T,Z,Q)};this.getAllBtnWidth=function(){return B.width()+r.width()+D.width()};var n=function(t){t.css({"float":"left",position:"relative",height:"100%"});t.appendTo(N)},z=function(t,T,Z,Q,na,J){t=F.createButton(t,
T,Z,na,J);t.setIconSetter(function(sa,ha){C.Icons.background(sa,ha)});t.setIconName(Q);return t}};C.RemoteImpl=function(){oa.call(this);var F;this.getRemoteUrl=function(){return F};this.setRemoteUrl=function(N){F=N}};C.Integration=function(){var F,N,B,r,D,n=!0;this.setMapTableException=function(z){D=z};this.getMapTableException=function(){return D};this.setMapSourceType=function(z){r=z};this.getMapSourceType=function(){return r};this.setMapSourcePermission=function(z){B=z};this.getMapSourcePermission=
function(){return B};this.setModelName=function(z){F=z};this.getModelName=function(){return F};this.setModelDesc=function(z){N=z};this.getModelDesc=function(){return N};this.setModelIsValid=function(z){n=z};this.isValidModel=function(){return n}};C.StatusBar=function(){var F,N,B,r,D;this.getJqUi=function(){F||(F=$("<div>"),F.addClass("modeler-designer-statusbar"),N=$("<span>"),N.addClass("modeler-designer-statusbar-name"),N.appendTo(F),B=$("<span>"),B.addClass("modeler-designer-statusbar-dirtystate"),
B.appendTo(F),r=$("<span>"),r.addClass("modeler-designer-statusbar-prompt"),r.appendTo(F));return F};this.setCurrentName=function(z){N.text(z)};this.showDirtyState=function(z){B.text(z?"*":"")};this.showShortPrompt=function(z,t,T){clearTimeout(D);r.text(z);r.css("color",T?T:"");if(t){var Z=0,Q=function(){if(6<Z)n();else{if(0==Z%2){r.text(z);var na=650}else r.text(""),na=350;D=setTimeout(Q,na);Z++}};Q()}else n()};var n=function(){D=setTimeout(function(){r.text("")},5E3)}};C.DesignerFacade=function(F,
N,B,r){I.call(this,F,N,B,r);var D=this.protectedMethod;this.loadTables=function(n){n={source:JSON.stringify(n.toJsonObject()),needFilterMetric:!0};D.remote("loadTables",n)};this.getMeta=function(n,z){n={source:JSON.stringify(n.toJsonObject()),table:JSON.stringify(z.toJsonObject())};D.remote("getMeta",n)};this.getTableField=function(n,z){for(var t=[],T=[],Z=0;Z<n.length;Z++)t.push(n[Z].toJsonObject());for(Z=0;Z<z.length;Z++)T.push(z[Z].toJsonObject());n={sources:JSON.stringify(t),tables:JSON.stringify(T)};
D.remote("getTableField",n)};this.getTableFieldWithCheckModel=function(n){n={model:JSON.stringify(n.toJsonObject())};D.remote("getTableFieldWithCheckModel",n)};this.getDBCenterTables=function(n){D.remote("getDBCenterTables",{appNumber:n})};this.checkConnection=function(n){D.remote("checkConnection",{sourceId:n})};this.checkMetricFormula=function(n,z,t,T){var Z={};if(t)for(var Q=Object.keys(t),na=0;na<Q.length;na++){for(var J=Q[na],sa=t[J],ha=[],xa=0;xa<sa.length;xa++)ha.push(sa[xa].toJsonObject());
Z[J]=ha}n={expr:n,metricId:T,model:JSON.stringify(z.toJsonObject()),fields:JSON.stringify(Z)};D.remote("checkMetricFormula",n)};this.previewMetrics=function(n,z,t,T){n={modeler:JSON.stringify(n),filters:JSON.stringify(z),previewConfig:JSON.stringify(t),metricId:T};D.remote("previewMetrics",n)};this.getFirstPageMetric=function(n){n={model:JSON.stringify(n)};D.remote("getFirstPageMetric",n)};this.updateMetricByPage=function(n,z,t,T,Z){n={model:JSON.stringify(n),jobId:z,jobName:t,startIndex:T,pageSize:Z};
D.remote("updateMetricByPage",n)};this.exportMetricData=function(n,z,t,T){n={model:JSON.stringify(n),jobId:z,jobName:t,totalRowCount:T};D.remote("exportMetricData",n)};this.getTotalRowCount=function(n,z){D.remote("getTotalRowCount",{jobId:n,jobName:z})};this.deleteResultDataFile=function(n,z){D.remote("deleteResultDataFile",{jobId:n,jobName:z})};this.getMetricDimValues=function(n,z,t){n={modeler:JSON.stringify(n),dimensionId:z,metricId:t};D.remote("getMetricDimValues",n)};this.getTablePreviewData=
function(n,z,t,T){n={source:JSON.stringify(n.toJsonObject()),table:JSON.stringify(z.toJsonObject()),filters:JSON.stringify(t),rowCount:T};D.remote("getTablePreviewData",n)};this.getDataRowCount=function(n,z,t){n={source:JSON.stringify(n.toJsonObject()),table:JSON.stringify(z.toJsonObject()),filters:JSON.stringify(t)};D.remote("getDataRowCount",n)};this.cronExpression=function(n){D.remote("cronExpression",{cron:n})};this.checkDataWarehouseConfig=function(){D.remote("checkDataWarehouseConfig",{})};
this.checkReferencedModel=function(n,z,t){n={source:JSON.stringify(n.toJsonObject()),table:JSON.stringify(z.toJsonObject()),modelId:t};D.remote("checkReferencedModel",n)};this.checkModelerValid=function(n){n={model:JSON.stringify(n)};D.remote("checkModelerValid",n)};this.checkMetricTableException=function(n,z,t){n={source:JSON.stringify(n.toJsonObject()),table:JSON.stringify(z.toJsonObject()),modelId:t};D.remote("checkMetricTableException",n)}};C.PageScaleHelper=y;var K,ca,da,I,M,oa,O,V,aa,U;(function(){var F=
com.kingdee.bos.qing.ui.component;K=F.Toolbar;ca=F.SimpleConfirmer;O=F.MessageDialog;F=com.kingdee.bos.qing.framework.common;da=F.AbstractIcons;M=F.MultilanguageManager.createPackageAccessor(C);oa=F.AbstractRemoteCall;I=F.AbstractFacade;F=com.kingdee.bos.qing.common;U=F.RelativePeriodModel;V=C.FilterItem;aa=C.Field})();C.Icons=new function(){da.call(this);var F=this.protectedMethod,N;this.setComboIconImpl=function(D){N=D};this.protectedInit=function(D,n){if(!N)throw Error("qing modeler comboIcon not found.");
N.define(n,"designer");n.setIconSize(16,16);B(0,0,"edit");B(0,1,"delete");B(0,2,"add");B(0,3,"zoomIn");B(0,4,"zoomOut");B(0,5,"layout");B(0,6,"rightArrow");B(0,7,"leftArrow");B(0,8,"upArrow");B(0,9,"downArrow");r(0,10,"qingWarning");r(0,11,"relation");r(0,12,"qingTable");B(0,13,"expanded");B(0,14,"expand");r(0,15,"btn_edit");B(0,17,"trial_calc");r(1,12,"qingTable_hover");B(0,18,"moveUp");r(0,19,"reset");B(0,20,"createDim");B(0,21,"publicDimension");B(0,22,"metric_filter");n.setStartPosition(84,35);
r(0,0,"select_field");r(0,1,"field_setting");r(0,2,"join");r(0,3,"union");r(0,4,"filter");r(0,5,"sort");r(0,6,"group_by");r(0,7,"calculate_field");B(0,8,"metric",!0);n.setStartPosition(84,52);r(0,0,"entity-sub");r(0,1,"entity-entry");r(0,2,"unlock");r(0,3,"lock_by_other");r(0,4,"lock_by_me");r(0,5,"tick");r(0,6,"cross");n.setIconSize(20,20);n.setStartPosition(0,35);r(0,0,"leftJoin");r(0,1,"rightJoin");r(0,2,"innerJoin");r(0,3,"fullJoin");n.setStartPosition(238,35);n.setIconSize(32,32);r(0,0,"metric_icon");
n.setStartPosition(288,35);n.setIconSize(16,16);B(0,0,"table_relation_with_hover");r(1,0,"table_relation");r(0,1,"custom_group");n.setStartPosition(0,55);n.setIconSize(20,20);B(0,0,"setting");r(0,1,"warning");n.setIconSize(60,80);n.setStartPosition(0,98);r(0,0,"no_source");n.setIconSize(138,78);n.setStartPosition(240,240);r(0,0,"no_data_cloud");n.setIconSize(253,140);n.setStartPosition(62,71);r(0,0,"drag_node_prompt");n.setIconSize(210,170);n.setStartPosition(0,211);r(0,0,"no_node_and_source");N.define(n,
"source");n.setStartPosition(0,20);n.setIconSize(16,16);r(0,0,"entity");r(0,1,"data");r(0,2,"modelSet");r(0,3,"file");r(0,4,"data-center");r(0,5,"table");r(0,6,"openapi");n.setStartPosition(85,0);n.setIconSize(16,16);r(0,0,"table_selected");n.setStartPosition(101,0);r(0,0,"f7");n.setStartPosition(0,40);n.setIconSize(20,20);n.setGap(0,1);r(0,0,"modelset-source-icon");r(0,1,"mysql");r(0,2,"datacenter-source-icon");r(0,3,"entity-source-icon");r(0,4,"oracle");r(0,5,"postgresql");r(0,6,"sqlserver");r(0,
7,"greenplum");r(0,8,"access");r(0,9,"db2");r(0,10,"odps");r(0,11,"sparksql");r(1,1,"redshift");r(1,2,"apachedrill");r(1,3,"hive");r(1,4,"impala");r(1,5,"kylin");r(1,6,"dm");r(1,7,"gaussdb");r(1,8,"sybaseiq");r(1,9,"sqlite");r(1,10,"sybase");r(2,2,"doris");r(2,3,"hana");n.setGap(0,0);r(1,0,"excel");r(2,0,"txt");r(2,1,"csv");r(1,11,"xml");r(2,4,"kingbase");r(2,5,"tdsql");r(2,6,"gbase");r(2,7,"vastbase");r(2,8,"yashandb");r(2,9,"openapi-source-icon");r(2,10,"tidb");n.setStartPosition(120,-1);n.setIconSize(16,
16);B(0,0,"refresh");n.setStartPosition(180,-1);n.setIconSize(16,16);B(0,0,"menu");n.setStartPosition(0,110);n.setIconSize(120,93);r(0,0,"no-permission");n.setStartPosition(100,100);n.setIconSize(138,84);r(0,0,"search-no-result");N.define(n,"metatree");n.setGap(1);n.setStartPosition(1,1);n.setIconSize(16,16);B(0,0,"DATE",!0);B(0,1,"STRING",!0);B(0,5,"TABLE",!0);B(0,8,"DATETIME",!0);B(0,9,"BOOLEAN",!0);B(0,10,"NUMBER",!0);B(0,11,"INT",!0);N.define(n,"metric");n.setStartPosition(0,0);n.setIconSize(260,
160);r(0,0,"add_metric");n.setStartPosition(0,164);n.setIconSize(210,170);r(0,0,"no_metric");n.setStartPosition(230,165);n.setIconSize(12,12);r(0,0,"add_metric_plug_sign")};var B=function(D,n,z,t){var T=z+"_hover";t?(r(D,n,z),r(D+1,n,T)):(r(D,n,T),r(D+1,n,z))},r=function(D,n,z){F.registIcon(D,n,z)}};C.LockHelper=new function(){var F,N,B,r,D,n,z,t,T=!1;this.show=function(Q){n=$("<div>");n.addClass("modeler-designer-lock-statusbar");z=$("<div>");t=$("<div>");t.addClass("modeler-designer-lock-text");
z.addClass("modeler-designer-lock-icon");n.append(t);n.append(z);n.appendTo(Q);n.on("click",Z);T=!0};this.registerLockRequestSender=function(Q){r=Q};this.setGlobal=function(Q){F=Q};this.setLockStateChangeListener=function(Q){D=Q};this.setLockInfo=function(Q,na,J){if(T){B=na;N=Q?C.LockHelper.STATE_LOCK_BY_ME:na?C.LockHelper.STATE_LOCK_BY_OTHER:C.LockHelper.STATE_UNLOCK;D&&D(N==C.LockHelper.STATE_LOCK_BY_ME);if(!J){if(N==C.LockHelper.STATE_LOCK_BY_OTHER){var sa=M.get("lockByOtherPrompt","\u5f53\u524d\u6a21\u578b\u5df2\u88ab\u201c#1\u201d\u9501\u5b9a\uff0c\u60a8\u7684\u4fee\u6539\u5c06\u65e0\u6cd5\u4fdd\u5b58\uff0c\u5efa\u8bae\u60a8\u83b7\u5f97\u9501\u540e\u518d\u8fdb\u884c\u7f16\u8f91\u3002");
sa=sa.replace("#1",B)}else N==C.LockHelper.STATE_UNLOCK&&(sa=M.get("unlockPrompt","\u5f53\u524d\u6a21\u578b\u672a\u9501\u5b9a\uff0c\u4e0d\u53ef\u7f16\u8f91\uff0c\u8bf7\u9501\u5b9a\u6a21\u578b\u540e\u518d\u8fdb\u884c\u64cd\u4f5c"));sa?F.getMessageCurtain().showPrompt(sa,-1):N==C.LockHelper.STATE_LOCK_BY_ME&&F.getMessageCurtain().showSuccess(M.get("lockSuccess","\u60a8\u5df2\u6210\u529f\u9501\u5b9a\u8be5\u6a21\u578b"))}Q="lock_by_other";if(N==C.LockHelper.STATE_UNLOCK){Q="unlock";var ha=M.get("unlock",
"\u672a\u9501\u5b9a")}else N==C.LockHelper.STATE_LOCK_BY_OTHER?ha=M.get("lockedBy","\u5df2\u88ab\u201c#1\u201d\u9501\u5b9a").replace("#1",B):N==C.LockHelper.STATE_LOCK_BY_ME&&(ha=M.get("lockedBy","\u5df2\u88ab\u201c#1\u201d\u9501\u5b9a").replace("#1",M.get("me","\u6211")),Q="lock_by_me");C.Icons.background(z,Q);t.text(ha);t.attr("title",ha)}};this.setMaxWidth=function(Q){t&&t.css("max-width",Math.max(0,Math.min(Q-50,250))+"px")};var Z=function(){if(r){var Q=N!=C.LockHelper.STATE_LOCK_BY_ME;if(Q)r(Q);
else{var na=new ca;na.setText(M.get("confirmUnlock","\u786e\u5b9a\u8981\u89e3\u9501\u5f53\u524d\u6a21\u578b\uff1f"));na.setConfirmedListener(function(J){J&&r(Q)});na.show(n)}}}};C.LockHelper.STATE_LOCK_BY_ME="lock_by_me";C.LockHelper.STATE_LOCK_BY_OTHER="lock_by_other";C.LockHelper.STATE_UNLOCK="unlock";C.DppVersionExceptionHandler=new function(){var F=!1;this.handle=function(N){if(20001101!=N)return!1;F||(F=!0,N=O.createFeedbackDialog(),N.setMsgImageType(O.MSG_WARNING),N.setMessage(M.get("dppVersionException",
"\u8f7b\u5efa\u6a21\u5ba2\u6237\u7aef\u7248\u672c\u4e0e\u6570\u636e\u5904\u7406\u5f15\u64ce\u7248\u672c\u4e0d\u4e00\u81f4\uff0c\u8bf7\u8054\u7cfb\u8fd0\u7ef4\u4eba\u5458\u5347\u7ea7\u5ba2\u6237\u7aef\u6216\u5f15\u64ce\u3002")),N.setOptionType(O.OPTION_OK),N.setButtonText(O.RETURN_OK,M.get("iSee","\u6211\u77e5\u9053\u4e86")),N.setClosedAction(function(){F=!1}),N.showDialog());return!0}};C.PropDataTypeUtil=new function(){this.getDataTypeDesc=function(F){switch(F){case aa.DT_STRING:F=M.get("text","\u6587\u672c");
break;case aa.DT_NUMBER:F=M.get("number","\u6570\u503c");break;case aa.DT_INT:F=M.get("integer","\u6574\u6570");break;case aa.DT_DATE:F=M.get("dataTypeDate","\u65e5\u671f");break;case aa.DT_DATETIME:F=M.get("dateTime","\u65e5\u671f\u65f6\u95f4");break;case aa.DT_BOOLEAN:F=M.get("bool","\u5e03\u5c14");break;default:F=""}return F}};y.SUPPORT_SCALES=[.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5];C.NodeResultCache=new function(){var F={},N={},B=[];this.cacheOneNodeField=function(r,D,n){if(n){var z=N[r];if(!z||
z<n)for(F[r]=D,n=0;n<B.length;n++)(z=B[n])&&z(r,D)}};this.removeNodeCache=function(r){F[r]=void 0;N[r]=void 0};this.getOneNodeField=function(r){return F[r]};this.addCacheChangeListener=function(r){B.push(r)};this.clear=function(){F={};N={}}};C.FilterCheckHelper=new function(){this.checkFilterField=function(B,r){if(!r)return B=M.get("noFieldToSelect","\u65e0\u53ef\u9009\u5b57\u6bb5"),new V.FiltersCheckingResult(-1,B);for(var D,n=0;n<B.length;n++){var z=B[n];if(!z.isEmpty()){D=F(z,n,r);if(!D)if(D=n,
z=N(z)){var t=M.get("incompleteFilter","\u7b2c#1\u884c\u4e0d\u5b8c\u6574\uff0c");t=t.replace("#1",D+1);D=new V.FiltersCheckingResult(D,t+z)}else D=null;if(D)break}}return D};this.checkFilterLogical=function(B){var r=0,D=-1,n,z=0;for(n=0;n<B.length;n++)B[n].isEmpty()||(z=n);n=z;for(z=0;z<B.length;z++){var t=B[z];if(!t.isEmpty()){r+=t.getLeftBracketCount();r-=t.getRightBracketCount();0>D&&0!=r&&(D=z);if(0>r)return B=M.get("bracketMismatch","\u5de6\u53f3\u62ec\u53f7\u4e0d\u5339\u914d\u3002"),new V.FiltersCheckingResult(D,
B);if(z!==n&&!t.getLogicOp())return B=M.get("lackLogicalSymbol","\u7b2c#1\u884c\u7f3a\u5c11\u903b\u8f91\u7b26"),B=B.replace("#1",z+1),new V.FiltersCheckingResult(z,B);if(z==n&&t.getLogicOp())return B=M.get("logicalSymbolUnnecessary","\u5b58\u5728\u591a\u4f59\u7684\u903b\u8f91\u3002"),new V.FiltersCheckingResult(z,B)}}return 0<r?(B=M.get("bracketMismatch","\u5de6\u53f3\u62ec\u53f7\u4e0d\u5339\u914d\u3002"),new V.FiltersCheckingResult(D,B)):null};this.checkFieldExisted=function(B,r){return F(B,-1,r)?
!1:!0};var F=function(B,r,D){B=B.getField();for(var n=0;n<D.length;n++)if(B&&D[n].getFullName()===B.getFullName())return null;D=M.get("lackField","\u7b2c#1\u884c\u5b57\u6bb5\u4e0d\u5b58\u5728\u3002");D=D.replace("#1",r+1);return new V.FiltersCheckingResult(r,D)},N=function(B){var r=B.getCompareOp(),D=B.getField(),n=B.getValue(),z=D?D.getOutputDataType():null;D=D?D.isEnum():!1;D=V.getSelectableCompares(z,D);B=B.getRelativeDateRange();if(!r)return M.get("lackComparisonOperator","\u7f3a\u5c11\u6bd4\u8f83\u7b26\u3002");
for(var t=!1,T=0;T<D.length;T++)if(r===D[T]){t=!0;break}if(!t)return M.get("comparisonMismatch","\u6bd4\u8f83\u7b26\u4e0d\u5339\u914d\u3002");if(!V.isCompareOpWithoutValue(r)){if(!n&&!B)return M.get("lackValue","\u7f3a\u5c11\u503c\u3002");if(z===aa.DT_NUMBER||z===aa.DT_INT){if(!V.REG_NUMBER.test(n)&&!V.isCompareOpWithinOrNotWithinValue(r))return M.get("valueMustBeNum","\u503c\u5fc5\u987b\u4e3a\u6570\u5b57\u3002")}else if(z===aa.DT_DATE||z===aa.DT_DATETIME)if(V.isCompareOpRelativeDateRangeValue(r)){if(!(B instanceof
U))return M.get("invalidRelativeDateValue","\u65e0\u6548\u7684\u76f8\u5bf9\u65e5\u671f\u503c\u3002")}else{if(!V.REG_DATETIME.test(n))return M.get("invalidDateValue","\u65e0\u6548\u7684\u65e5\u671f\u503c\u3002")}else if(z===aa.DT_BOOLEAN&&n!==aa.BOOLEAN_TRUE&&n!==aa.BOOLEAN_FALSE)return M.get("wrongBoolean","\u9519\u8bef\u7684\u5e03\u5c14\u503c\u3002")}return null}};var fa=new function(){var F;this.hookCollector=function(N){F=N};this.occur=function(N,B){try{F&&F(N,B)}catch(r){window.console&&console.warn(r)}}};
fa.BUTTON_TYPE="button-type";fa.FUNCTION="function";fa.DATATABLE_MODEL_TRANSFORM_NODE_TYPE="datatable-model-transform-node-type";fa.METRIC_MODEL_DIMENSION_TYPE="metric-model-dimension-type";fa.ENTER_DATA_AUTH_MANAGE="enter-data-auth-manage";fa.SAVE="\u4fdd\u5b58";fa.REFRESH="\u5237\u65b0";fa.DEPLOY="\u90e8\u7f72";fa.ROLLBACK_CURRENT_DEPLOY="\u56de\u9000\u5230\u6700\u65b0\u90e8\u7f72\u72b6\u6001";fa.UNDO="\u64a4\u9500";fa.REDO="\u53cd\u64a4\u9500";fa.CLEAR="\u6e05\u9664";fa.MODEL_CHECK="\u6a21\u578b\u6821\u9a8c";
fa.MODEL_PREVIEW="\u6a21\u578b\u9884\u89c8";fa.MODEL_PROPERTY="\u6a21\u578b\u5c5e\u6027";fa.SOURCE_MANAGE="\u6570\u636e\u6e90\u7ba1\u7406";fa.MODEL_PREVIEW_EXPORT_TO_EXCEL="\u9884\u89c8-\u5bfc\u51fa\u5230Excel";fa.METRIC_DELETE="\u5220\u9664";fa.TRIAL_CALCULATE="\u8bd5\u8ba1\u7b97";fa.TRIAL_CALCULATE_DIMENSION_FILTER="\u8bd5\u8ba1\u7b97-\u7ef4\u5ea6\u8fc7\u6ee4";fa.SOURCE_TABLE_FILTER="\u6e90\u8868\u8fc7\u6ee4";fa.SELECT_FIELD="\u9009\u62e9\u5b57\u6bb5";fa.METRIC_FILTER="\u6307\u6807\u8fc7\u6ee4";
fa.NUMBER_FOMMAT="\u6570\u5b57\u683c\u5f0f";fa.ADD_DIMENSION="\u65b0\u589e\u7ef4\u5ea6";fa.PUBLIC_DIMENSION_SETTING="\u516c\u5171\u7ef4\u5ea6\u8bbe\u7f6e";fa.ENTER_DATA_AUTH_MANAGE_AFTER_DEPLOY="\u6210\u529f\u90e8\u7f72\u540e\u70b9\u51fb\u8df3\u8f6c\u8fdb\u5165";C.UserOperationReporter=fa})();(function(){function y(){var q=this,v,m=[],h=[],l=[],x;this.setType=function(g){v=g};this.getType=function(){return v};this.supportIncrementalMaterialize=function(){return!1};this.protectedIsTableInUse=function(){throw Error("override me");};this.insertSource=function(g,c){for(var b=!1,k=g.getSourceId(),a=0;a<m.length;a++)if(k==m[a].getSourceId()){b=!0;break}b||(m.splice(c,0,g),e(y.KEY_ADD_PREPARED_SOURCE,[g]))};this.batchAddSource=function(g){for(var c=[],b=0;b<g.length;b++){for(var k=!1,a=g[b],
d=a.getSourceId(),p=0;p<m.length;p++)if(d==m[p].getSourceId()){k=!0;break}k||(m.push(a),c.push(a))}e(y.KEY_ADD_PREPARED_SOURCE,c)};this.setSource=function(g,c){m=g;!c&&e(y.KEY_SET_PREPARED_SOURCE,m)};this.removeSource=function(g){var c=m.indexOf(g);return-1<c?(m.splice(c,1),e(y.KEY_REMOVE_PREPARED_SOURCE,[g]),c):-1};this.batchRemoveUserSqlTable=function(g){g=q.getUserSqlTables(g);for(var c=0;c<g.length;c++)q.removeTableIfUseless(g[c])};this.batchRemoveSource=function(g){for(var c=0;c<g.length;c++){var b=
m.indexOf(g[c]);-1<b&&m.splice(b,1)}e(y.KEY_REMOVE_PREPARED_SOURCE,g)};this.getSource=function(g){for(var c=0,b=m.length;c<b;c++)if(m[c].getId()==g)return m[c]};this.getAllSource=function(){return m};this.isSourceUsed=function(g){g=g.getId();for(var c=0,b=h.length;c<b;c++){var k=h[c];if(k.getSourceUid()==g&&q.protectedIsTableInUse(k))return!0}return!1};this.addTable=function(g){for(var c=0,b=h.length;c<b;c++)if(h[c].isSame(g))return;h.push(g);g.addPropertyChangeCallback(e);e(y.KEY_ADD_TABLE,g)};this.updateTable=
function(g,c){for(var b=-1,k=0,a=h.length;k<a;k++)if(h[k].isSame(c)){b=k;break}-1<b&&(h.splice(b,1),h.splice(b,0,g),c.removePropertyChangeCallback(e),g.addPropertyChangeCallback(e))};this.batchAddTable=function(g){for(var c=0;c<g.length;c++)q.addTable(g[c])};this.setTables=function(g){h=g};this.getTable=function(g){for(var c=0,b=h.length;c<b;c++)if(h[c].getUid()==g)return h[c]};this.removeTable=function(g){var c=h.indexOf(g);-1<c&&(h.splice(c,1),g.removePropertyChangeCallback(e),e(y.KEY_REMOVE_TABLE,
g));return c};this.batchRemoveTable=function(g){for(var c=0;c<g.length;c++){var b=g[c];q.removeTable(b);b.removePropertyChangeCallback(e)}};this.insertTable=function(g,c){for(var b=0,k=h.length;b<k;b++)if(h[b].isSame(g))return;h.splice(c,0,g);g.addPropertyChangeCallback(e);e(y.KEY_ADD_TABLE,g)};this.getUserSqlTables=function(g){for(var c=[],b=0,k=h.length;b<k;b++){var a=h[b];a.isUserSql()&&a.getSourceUid()==g&&c.push(a)}return c};this.getAllUserSqlTables=function(){for(var g=[],c=0,b=h.length;c<b;c++)h[c].isUserSql()&&
g.push(h[c]);return g};this.getAllTable=function(g){for(var c=[],b=0,k=h.length;b<k;b++){var a=h[b];g?(q.protectedIsTableInUse(a)||a.isUserSql())&&c.push(a):q.protectedIsTableInUse(a)&&c.push(a)}return c};this.getSameTable=function(g){for(var c=0,b=h.length;c<b;c++)if(h[c].isSame(g))return h[c]};this.isSameTableAndSourceExist=function(g,c,b){for(var k=0;k<h.length;k++){var a=h[k];if(a.getTableName()==c&&a.getNamespace()==b&&q.getSource(a.getSourceUid()).getSourceId()==g)return!0}return!1};this.setMaterializedConfig=
function(g){x=g};this.getMaterializedConfig=function(){return x};this.toJsonObject=function(){var g={};g.type=v;for(var c=[],b=0;b<m.length;b++)c.push(m[b].toJsonObject());g.sources=c;c=[];for(b=0;b<h.length;b++){var k=h[b];(q.protectedIsTableInUse(k)||k.isUserSql())&&c.push(k.toJsonObject())}g.tables=c;x&&(g.materializedConfig=x.toJsonObject());q.protectedToJsonObject(g);return g};this.fromJsonObject=function(g){v=g.type;var c=g.sources;if(c)for(var b=0;b<c.length;b++){var k=c[b],a=new da;a.fromJsonObject(k);
m.push(a)}if(c=g.tables)for(b=0;b<c.length;b++)k=new K,k.fromJsonObject(c[b]),k.addPropertyChangeCallback(e),h.push(k);(b=g.materializedConfig)?(x=new Q,x.fromJsonObject(b)):x=null;q.protectedFromJsonObject(g)};this.isUserSqlTableInUse=function(g){g=q.getSameTable(g);return q.protectedIsTableInUse(g)};this.protectedToJsonObject=function(g){};this.protectedFromJsonObject=function(g){};this.addPropertyChangeCallback=function(g){l.push(g)};this.removePropertyChangeCallback=function(g){g=l.indexOf(g);
-1<g&&l.splice(g,1)};this.clearPropertyChangeCallback=function(){l=[]};var e=function(g,c){for(var b=0,k=l.length;b<k;b++)l[b](g,c)};this.protectedMethod={firePropertyChangeEvt:e,copy:function(g){g.setType(v);for(var c=[],b=0;b<m.length;b++)c.push(m[b].copy());g.setSource(c,!0);c=[];for(b=0;b<h.length;b++)c.push(h[b].clone());g.setTables(c);x&&g.setMaterializedConfig(x.copy())}}}function C(){var q=this,v,m,h,l,x,e,g,c,b=[];this.setId=function(a){v=a};this.getId=function(){return v};this.setAlias=
function(a){m=a;l=void 0;k(y.KEY_NODE_CHANGE_ALIAS,q)};this.getAlias=function(){return m};this.setNameIndex=function(a){l=a};this.getNameIndex=function(){return l};this.getX=function(){return x};this.getY=function(){return e};this.getWidth=function(){return g};this.getHeight=function(){return c};this.setPosition=function(a,d){x=a;e=d};this.changePosition=function(a,d){q.setPosition(a,d);k(y.KEY_NODE_CHANGE_POSITION,q)};this.setSize=function(a,d){g=a;c=d};this.setType=function(a){h=a};this.getType=
function(a){return h};this.addPropertyChangeCallback=function(a){b.push(a)};this.removePropertyChangeCallback=function(a){a=b.indexOf(a);-1<a&&b.splice(a,1)};this.toJsonObject=function(){var a={};a.id=v;a.alias=m;a.x=x;a.y=e;a.type=h;l&&(a.nameIndex=l);q.protectedToJson(a);return a};this.fromJsonObject=function(a){v=a.id;m=a.alias;x=a.x;e=a.y;h=a.type;var d=parseInt(a.nameIndex);isNaN(d)||(l=d);q.protectedFromJson(a)};this.protectedToJson=function(a){};this.protectedFromJson=function(a){};var k=function(a,
d){for(var p=0,H=b.length;p<H;p++)b[p](a,d)};this.protectedMethod={firePropertyChangeEvt:function(a){k(a,q)}}}function K(){var q=this,v,m,h,l,x,e,g,c=[],b=[];this.setUid=function(a){v=a};this.getUid=function(){return v};this.isUserSql=function(){return e?!0:!1};this.getUserSql=function(){return e};this.setUserSql=function(a){e=a};this.setTableName=function(a){m=a};this.getTableName=function(){return m};this.setSourceUid=function(a){h=a};this.getSourceUid=function(){return h};this.setNamespace=function(a){l=
a};this.getNamespace=function(){return l};this.setDisplayName=function(a){x=a};this.getDisplayName=function(){return x};this.setSelectedFields=function(a){g=a;k(y.KEY_TABLE_SELECT_FIELD,q)};this.getSelectedFields=function(){return g};this.setFilterItems=function(a){c=a;k(y.KEY_TABLE_SET_FILTER,q)};this.getFilterItems=function(){return c};this.addPropertyChangeCallback=function(a){b.push(a)};this.removePropertyChangeCallback=function(a){a=b.indexOf(a);-1<a&&b.splice(a,1)};this.isSame=function(a){return h==
a.getSourceUid()&&m==a.getTableName()&&l==a.getNamespace()&&(!q.isUserSql()&&!a.isUserSql()||q.isUserSql()&&a.isUserSql()&&(a=a.getUserSql(),a.getSqlType()==e.getSqlType()&&a.getContent()==e.getContent()))?!0:!1};this.toJsonObject=function(){var a={};a.id=v;a.name=m;a.sourceId=h;a.namespace=l;q.isUserSql()&&(a.userSQL=e.toJsonObject());if(g){for(var d=[],p=0;p<g.length;p++)d.push(g[p].toJsonObject());a.selectedFields=d}if(c){d=[];for(p=0;p<c.length;p++)d.push(c[p].toJsonObject());a.filterItems=d}return a};
this.fromJsonObject=function(a){v=a.id;m=a.name;h=a.sourceId;l=a.namespace;x=a.displayName;a.userSQL&&(e=new ca,e.fromJsonObject(a.userSQL));var d=a.selectedFields;if(d){for(var p=[],H=0;H<d.length;H++){var u=new I;u.fromJsonObject(d[H]);p.push(u)}g=p}if(a=a.filterItems){d=[];for(H=0;H<a.length;H++)p=new t,p.fromJsonObject(a[H]),d.push(p);c=d}};this.clone=function(){var a=new K;a.setUid(v);a.setTableName(m);a.setNamespace(l);a.setDisplayName(x);a.setSourceUid(h);e&&a.setUserSql(e.copy());var d=[];
if(g){for(var p=0;p<g.length;p++)d.push(g[p].clone());a.setSelectedFields(d)}d=[];for(p=0;p<c.length;p++)d.push(c[p].copy());a.setFilterItems(d);return a};var k=function(a,d){for(var p=0,H=b.length;p<H;p++)b[p](a,d)}}function ca(){var q,v;this.getSqlType=function(){return q};this.setSqlType=function(m){q=m};this.setContent=function(m){v=m};this.getContent=function(){return v};this.fromJsonObject=function(m){q=m.type;v=m.content};this.toJsonObject=function(){var m={};m.type=q;m.content=v;return m};
this.copy=function(){var m=new ca;m.setSqlType(q);m.setContent(v);return m}}function da(){var q,v,m,h,l,x;this.setId=function(e){q=e};this.getId=function(){return q};this.getSourceId=function(){return v};this.setSourceId=function(e){v=e};this.setSourceRefId=function(e){m=sId};this.getSourceRefId=function(){return m};this.getName=function(){return h};this.setName=function(e){h=e};this.setSourceType=function(e){l=e};this.getSourceType=function(){return l};this.setModelId=function(e){x=e};this.getModelId=
function(){return x};this.copy=function(){var e=new da;e.setId(q);e.setSourceId(v);e.setSourceType(l);e.setName(h);e.setSourceType(l);e.setModelId(x);return e};this.toJsonObject=function(){var e={};e.id=q;e.modelSetSourceId=v;e.modelSetSourceRefId=m;e.modelId=x;return e};this.fromJsonObject=function(e){q=e.id;v=e.modelSetSourceId;m=e.modelSetSourceRefId;l=e.type;h=e.name}}function I(){var q=this,v,m,h,l,x,e,g,c,b,k;this.setTableId=function(d){v=d};this.getTableId=function(){return v};this.setFromNode=
function(d){m=d};this.getSourceNodeId=function(){return m};this.setName=function(d){h=d};this.getName=function(){return h};this.getFullName=function(){return m?m+"_"+h:v+"_"+h};this.setAlias=function(d){l=d};this.getAlias=function(){return l?l:h};this.setDataType=function(d){a(d);x=d};this.getDataType=function(){return x};this.setAppointedDataType=function(d){d&&a(d);e=d==x?null:d};this.getAppointedDataType=function(){return e};this.getOutputDataType=function(){return e?e:x};this.setRoundMode=function(d){c=
d};this.getRoundMode=function(){return c};this.setScale=function(d){g=d};this.getScale=function(){return g};this.getFormat=function(){return b};this.setFormat=function(d){b=d};this.setExtensions=function(d){k=d};this.getEnumValue=function(){return k?k[I.EXTENSION_BIZ_FIELD_ENUM_KEY]:null};this.isMulBaseData=function(){return k?k[I.EXTENSION_IS_MUL_BASE_DATA]:!1};this.isPk=function(){return k?k[I.EXTENSION_IS_PK]:!1};this.isEnum=function(){if(q.isMulBaseData()||q.getOutputDataType()!=I.DT_STRING)return!1;
var d=q.getEnumValue();return 0==(d?Object.keys(d):[]).length?!1:!0};this.fromJsonObject=function(d){h=d.name;l=d.alias;x=d.dataType;e=d.appointedDataType;m=d.fromNode;void 0!=d.scale&&(g=d.scale);d.roundMode&&(c=d.roundMode);k=d.extensions;d.format&&(b=d.format);d.tableId&&(v=d.tableId)};this.toJsonObject=function(){var d={};d.name=h;d.alias=l;d.dataType=x;d.fromNode=m;e&&(d.appointedDataType=e);void 0!=g&&(d.scale=g);c&&(d.roundMode=c);k&&(d.extensions=k);v&&(d.tableId=v);return d};var a=function(d){if(d!==
I.DT_STRING&&d!==I.DT_INT&&d!==I.DT_NUMBER&&d!==I.DT_DATE&&d!==I.DT_DATETIME&&d!==I.DT_BOOLEAN)throw Error("IllegalArgument: "+d);};this.clone=function(){var d=new I;d.setName(h);x&&d.setDataType(x);d.setAlias(l);e&&d.setAppointedDataType(e);d.setFromNode(m);void 0!=g&&d.setScale(g);c&&d.setRoundMode(c);d.setExtensions(k);b&&d.setFormat(b);v&&d.setTableId(v);return d};this.equals=function(d){return h==d.getName()&&l==d.getAlias()&&e==d.getAppointedDataType()&&g==d.getScale()&&c==d.getRoundMode()?
!0:!1}}function M(){var q,v;this.setExtractPartlyData=function(m,h){q=m;v=h};this.setExtractAllData=function(m){q=M.ALL_DATA_NUMBER;v=m};this.toJsonObject=function(){var m={};m.extractCount=q;m.previewCount=v;return m}}function oa(){var q=this,v,m;this.setId=function(h){v=h};this.getId=function(){return v};this.toJsonObject=function(){var h={};h.id=v;h.type=m;q.protectedToJson(h);return h};this.protectedToJson=function(h){};this.protectedMethod={setType:function(h){m=h}}}function O(){var q=[],v,m=
[];this.isValid=function(){return v};this.getCases=function(){return m};this.getCheckedNodeIds=function(){return q};this.fromJsonObject=function(h){v=h.valid;q=h.nodeIds;if(h=h.cases){m=[];for(var l=new V,x=0;x<h.length;x++){var e=h[x],g=l.getInvalidityCase(e.type);e&&(g.fromJsonObject(e),m.push(g))}}}}function V(){this.getInvalidityCase=function(q){switch(q){case aa.TYPE_MULTI_OUTPUT:return new U;case aa.TYPE_LACK_OUTPUT:return new fa;case aa.TYPE_INVALID_CONFIG:return new F;case aa.TYPE_LACK_INPUT:return new B;
case aa.TYPE_INVALID_UPWARDNODE:return new r;case aa.TYPE_INVALID_SOURCE:return new D;case aa.TYPE_TABLE_NO_FIELD:return new n;case aa.TYPE_TABLE_NO_AUTHORITY:return new N}}}function aa(){var q,v=this;this.getType=function(){return q};this.fromJsonObject=function(m){q=m.type;v.protectedFromJsonObject(m)};this.protectedFromJsonObject=function(m){}}function U(){aa.call(this);var q=[];this.protectedFromJsonObject=function(v){q=v.outputNodes};this.getOutputNodeIds=function(){return q}}function fa(){aa.call(this)}
function F(){aa.call(this);var q;this.protectedFromJsonObject=function(v){q=v.nodeIds};this.getNodeIds=function(){return q}}function N(){aa.call(this);var q;this.protectedFromJsonObject=function(v){q=v.nodeIds};this.getNodeIds=function(){return q}}function B(){aa.call(this);var q;this.protectedFromJsonObject=function(v){q=v.nodeIds};this.getNodeIds=function(){return q}}function r(){aa.call(this);var q;this.protectedFromJsonObject=function(v){q=v.nodeIds};this.getNodeIds=function(){return q}}function D(){aa.call(this);
var q;this.protectedFromJsonObject=function(v){q=v.nodeIds};this.getNodeIds=function(){return q}}function n(){aa.call(this);var q;this.protectedFromJsonObject=function(v){q=v.nodeIds};this.getNodeIds=function(){return q}}function z(){var q,v=[],m=[];this.getField=function(h){return v[h]};this.getAllField=function(){return v};this.getColumnCount=function(){return v?v.length:0};this.getOneRow=function(h){return m[h]};this.getRowCount=function(){return m?m.length:0};this.getNodeId=function(){return q};
this.fromJsonObject=function(h){for(var l=h.fields,x=0;x<l.length;x++){var e=new I;e.fromJsonObject(l[x]);v.push(e)}m=h.data;q=h.nodeId}}function t(){var q,v,m,h,l=0,x=0,e,g=null;this.setField=function(b){(q=b)&&!b.isMulBaseData()&&v&&m&&(b=b.getOutputDataType(),b!==I.DT_DATE&&b!==I.DT_DATETIME||t.REG_DATETIME.test(m)||t.isCompareOpWithinOrNotWithinValue(v)||(m=(new Date).getTime()));c()};this.updateNotExistFieldByMyself=function(){var b=new I;b.setFromNode(q.getSourceNodeId());b.setName(q.getName());
b.setAlias(q.getAlias());q=b};this.updateNotExistField=function(b){var k=new I;k.setFromNode(b.getSourceNodeId());k.setName(b.getName());k.setAlias(b.getAlias());q=k};this.getField=function(){return q};this.getTargetFieldFullName=function(){return q?q.getFullName():null};this.setCompareOp=function(b){v=b};this.getCompareOp=function(){return v};this.setValue=function(b){m=b;c()};this.getValue=function(){return m};this.setDisplayValue=function(b){h=b};this.getDisplayValue=function(b){return h?!b&&t.isCompareOpWithinOrNotWithinValue(v)?
JSON.parse(h).join(","):t.isCompareOpRelativeDateRangeValue(v)?(b=q.getOutputDataType()===I.DT_DATETIME,ha.modelToDisplayText(g,b)):h:""};this.setLeftBracketCount=function(b){l=b};this.getLeftBracketCount=function(){return l};this.setRightBracketCount=function(b){x=b};this.getRightBracketCount=function(){return x};this.setLogicOp=function(b){e=b};this.getLogicOp=function(){return e};this.setRelativeDateRange=function(b){g=b};this.getRelativeDateRange=function(){return g};this.isEmpty=function(){return 0===
l&&0===x&&!q&&!v&&!m&&!e};var c=function(){if(q&&v){var b=q.getOutputDataType();if(m){var k=q.isEnum(),a=q.isMulBaseData(),d=k?q.getEnumValue():null;if(t.isCompareOpWithinOrNotWithinValue(v))if(k){b=JSON.parse(m);k=[];for(a=0;a<b.length;a++){var p=d[b[a]];p&&k.push(p)}h=JSON.stringify(k)}else h=m;else a?h=m:b===I.DT_DATE||b===I.DT_DATETIME?(d=new Date,d.setTime(m),k=new com.kingdee.bos.qing.common.DateFormater,a=k.setFormatString,b=b===I.DT_DATE?"yyyy-MM-dd":"yyyy-MM-dd HH:mm:ss",a.call(k,b),h=k.format(d)):
b===I.DT_BOOLEAN?(d=com.kingdee.bos.qing.framework.common.MultilanguageManager.createPackageAccessor(J),h=m===I.BOOLEAN_TRUE?d.get("dataTypeTrue","\u771f"):m===I.BOOLEAN_FALSE?d.get("dataTypeFalse","\u5047"):""):h=k?d[m]?d[m]:"":m}else h=t.isCompareOpRelativeDateRangeValue(v)&&null!=g?ha.modelToDisplayText(g,b===I.DT_DATETIME):null}};this.copy=function(){var b=new t;b.setField(q);b.setCompareOp(v);b.setValue(m);b.setDisplayValue(h);b.setLeftBracketCount(l);b.setRightBracketCount(x);b.setLogicOp(e);
b.setRelativeDateRange(g);return b};this.equals=function(b){if(!b)return!1;var k;if(k=q.equals(b.getField())&&v===b.getCompareOp()&&m===b.getValue()&&l===b.getLeftBracketCount()&&x===b.getRightBracketCount()&&e===b.getLogicOp())k=g||b.getRelativeDateRange()?g&&b.getRelativeDateRange()?JSON.stringify(g.toJsonObject())===JSON.stringify(b.getRelativeDateRange().toJsonObject()):!1:!0;return k?!0:!1};this.toJsonObject=function(){if(!q)return null;var b={};b.field=q.toJsonObject();b.compareOp=v;b.value=
m;b.displayValue=h;b.leftBrackets=l;b.rightBrackets=x;b.logicOp=e;g&&(b.relativeDateRange=g.toJsonObject());return b};this.fromJsonObject=function(b){b&&(q=new I,q.fromJsonObject(b.field),v=b.compareOp,m=b.value,h=b.displayValue,l=b.leftBrackets,x=b.rightBrackets,e=b.logicOp,b=b.relativeDateRange)&&(g=new sa,g.fromJsonObject(b))}}function T(){var q=this,v,m=[];this.getNodeIdInConfig=function(){return[]};this.addPropertyChangeCallback=function(h){m.push(h)};this.toJsonObject=function(){var h={};h.type=
v;q.protectedToJsonObject(h);return h};this.fromJsonObject=function(h){v=h.type;q.protectedFromJsonObject(h)};this.protectedToJsonObject=function(h){};this.protectedFromJsonObject=function(h){};this.protectedMethod={firePropertyChangeEvt:function(h){for(var l=0,x=m.length;l<x;l++)m[l](h)},setType:function(h){v=h}}}function Z(){T.call(this);var q=this,v=this.protectedMethod;v.setType(T.TYPE_FILTER);var m=[];this.getFilterItems=function(){return m};this.setFilterItems=function(h){m=h};this.copyFilterItems=
function(){for(var h=[],l=0;l<m.length;l++)h.push(m[l].copy());return h};this.firePropertyChangeEvt=function(){v.firePropertyChangeEvt(TableModeler.KEY_TRANSFORM_FILTER)};this.getNotEmptyFilterItems=function(){for(var h=[],l=0;l<m.length;l++)m[l].isEmpty()||h.push(m[l]);return h};this.protectedToJsonObject=function(h){for(var l=q.getNotEmptyFilterItems(),x=[],e=0,g=l.length;e<g;e++)x.push(l[e].toJsonObject());h.filterItems=x};this.protectedFromJsonObject=function(h){if(h){h=h.filterItems;for(var l=
0;l<h.length;l++){var x=new t;x.fromJsonObject(h[l]);m.push(x)}}};this.clone=function(){var h=new Z;h.setFilterItems(q.getNotEmptyFilterItems());return h}}function Q(){var q=Q.TYPE_ONCE,v=Q.STRATEGY_FULL,m,h;this.setType=function(l){if(l===Q.TYPE_ONCE||l===Q.TYPE_TIMING)q=l;else throw Error("IllegalArgument: "+l);};this.getType=function(){return q};this.setStrategy=function(l){if(l===Q.STRATEGY_FULL||l===Q.STRATEGY_INCREMENTAL)v=l;else throw Error("IllegalArgument: "+l);};this.getStrategy=function(){return v};
this.setSchedule=function(l){m=l};this.getSchedule=function(){return m};this.setBasedFields=function(l){h=l};this.getBasedFields=function(){return h};this.copy=function(){var l=new Q;l.setType(q);l.setStrategy(v);m&&l.setSchedule(m.copy());if(h){for(var x=[],e=0;e<h.length;e++)x.push(h[e].copy());l.setBasedFields(x)}return l};this.toJsonObject=function(){var l={};l.type=q;l.strategy=v;m&&(l.schedule=m.toJsonObject());if(h){for(var x=[],e=0;e<h.length;e++)x.push(h[e].toJsonObject());l.basedFields=
x}return l};this.fromJsonObject=function(l){q=l.type;v=l.strategy;l.schedule&&(m=new xa,m.fromJsonObject(l.schedule));if(l=l.basedFields){h=[];for(var x=0;x<l.length;x++){var e=new na;e.fromJsonObject(l[x]);h.push(e)}}};this.equals=function(l){if(l instanceof Q){if(q!==l.getType()||v!==l.getStrategy())return!1;var x=l.getSchedule();if(m&&!x||!m&&x)return!1;if(m&&x){var e=m.toJsonObject();x=x.toJsonObject();for(var g in e)if(e[g]!==x[g])return!1}l=l.getBasedFields();if(!h&&!l)return!0;if(!h||!l||h.length!==
l.length)return!1;for(e=0;e<h.length;e++)if(!h[e].equals(l[e]))return!1;return!0}return!1}}function na(){var q,v,m,h;this.setTableId=function(l){q=l};this.getTableId=function(){return q};this.setTableName=function(l){v=l};this.getTableName=function(){return v};this.setName=function(l){m=l};this.getName=function(){return m};this.setAlias=function(l){h=l};this.getAlias=function(){return h};this.copy=function(){var l=new na;l.setTableId(q);l.setTableName(v);l.setName(m);l.setAlias(h);return l};this.toJsonObject=
function(){var l={};l.tableId=q;l.tableName=v;l.name=m;l.alias=h;return l};this.fromJsonObject=function(l){q=l.tableId;v=l.tableName;m=l.name;h=l.alias};this.equals=function(l){return l instanceof na?q===l.getTableId()&&v===l.getTableName()&&m===l.getName()&&h===l.getAlias():!1}}"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.designer&&(com.kingdee.bos.qing.modeler.designer={});var J=com.kingdee.bos.qing.modeler.designer;J.QingModeler=function(){var q;this.setModelerModel=function(v){q=v};this.getModelerModel=function(){return q};this.toJsonObject=function(){var v={};v.modelerModel=q.toJsonObject();return v};this.fromJsonObject=function(v){(v=v.modelerModel)&&(q=J.ModelerModerParser.parseToModel(v.type,
v))}};J.AbstractModelerModelParser=function(){this.parseToModel=function(q){throw Error("override me");}};J.ModelerModel=y;J.AbstractPage=function(){function q(e,g,c,b){this.getLeftExtension=function(){return e};this.getTopExtension=function(){return g};this.getHorizonExtension=function(){return e+c};this.getVerticalExtension=function(){return g+b}}var v=this,m=1024,h=768,l=[];this.getWidth=function(){return m};this.getHeight=function(){return h};this.addPropertyChangeCallback=function(e){l.push(e)};
this.setExtension=function(e,g,c,b){e=new q(e,g,c,b);m+=e.getHorizonExtension();h+=e.getVerticalExtension();x(y.KEY_PAGE_SIZE,e)};this.toJsonObject=function(){var e={};e.width=m;e.height=h;v.protectedToJsonObject(e);return e};this.fromJsonObject=function(e){m=e.width;h=e.height;v.protectedFromJsonObject(e)};this.protectedToJsonObject=function(e){};this.protectedFromJsonObject=function(e){};var x=function(e,g){for(var c=0,b=l.length;c<b;c++)l[c](e,g)};this.protectedMethod={firePropertyChangeEvt:x}};
J.Node=C;J.Table=K;J.DesignTimeSource=da;J.Field=I;J.UserSQL=ca;J.PreviewConfig=M;J.RuntimeModel=function(){var q,v=[],m=[],h;this.setOutputVertexId=function(l){q=l};this.addEdge=function(l){v.push(l)};this.addVertex=function(l){m.push(l)};this.getVertexes=function(){return m};this.setPreviewConfig=function(l){h=l};this.toJsonObject=function(){for(var l={},x=[],e=[],g=0,c=v.length;g<c;g++)x.push(v[g].toJsonObject());g=0;for(c=m.length;g<c;g++)e.push(m[g].toJsonObject());l.edges=x;l.vertexes=e;l.outputVertexId=
q;l.previewConfig=h?h.toJsonObject():null;return l}};J.Edge=function(q,v){this.toJsonObject=function(){var m={};m.fromId=q;m.toId=v;return m}};J.SourceVertex=function(){oa.call(this);var q,v,m;this.protectedMethod.setType(oa.TYPE_SOURCE);this.setTable=function(h){q=h};this.setSource=function(h){v=h};this.setSelectedFields=function(h){m=h};this.protectedToJson=function(h){h.table=q.toJsonObject();h.source=v.toJsonObject();if(m){for(var l=[],x=0;x<m.length;x++)l.push(m[x].toJsonObject());h.selectedFields=
l}}};J.ExecuteResult=function(){var q,v=[],m,h;this.getNodeId=function(){return q};this.getValidity=function(){return h};this.getPreviewData=function(){return m};this.getFields=function(){return v};this.fromJsonObject=function(l){q=l.nodeId;var x=l.validity;x&&(h=new O,h.fromJsonObject(x));if(x=l.previewData)m=new z,m.fromJsonObject(x);if(l=l.fields)for(x=0;x<l.length;x++){var e=l[x],g=new I;g.fromJsonObject(e);v.push(g)}}};J.PreviewData=z;J.FilterItem=t;J.MaterializedConfig=Q;J.BasedField=na;J.FilterConfig=
Z;var sa,ha,xa;(function(){var q=com.kingdee.bos.qing.common;sa=q.RelativePeriodModel;q=com.kingdee.bos.qing.common.ui;ha=q.RelativePeriodPanel;q=com.kingdee.bos.qing.schedule;xa=q.QingSchedule})();J.ModelerModerParser=new function(){var q={};this.registerParser=function(v,m){q[v]=m};this.parseToModel=function(v,m){return(v=q[v])&&v.parseToModel(m)}};y.TYPE_TABLE_MODELER="table";y.TYPE_RELATION_MODELER="relation";y.TYPE_METRIC_MODELER="metric";y.KEY_UPDATE_TABLE="update_table";y.KEY_ADD_TABLE="add_table";
y.KEY_REMOVE_TABLE="remove_table";y.KEY_TABLE_SELECT_FIELD="table_select_field";y.KEY_TABLE_SET_FILTER="table_set_filter";y.KEY_PAGE_SIZE="page_change_size";y.KEY_ADD_PREPARED_SOURCE="add_prepared_source";y.KEY_REMOVE_PREPARED_SOURCE="remove_prepared_source";y.KEY_SET_PREPARED_SOURCE="set_prepared_source";y.KEY_NODE_CHANGE_ALIAS="node_change_alias";y.KEY_NODE_CHANGE_POSITION="node_change_position";y.KEY_TABLE_NODE_SELECT_FIELD="table_node_select_field";C.TYPE_TABLE="table";C.TYPE_TRANSFORM="transform";
I.DT_BOOLEAN="BOOLEAN";I.DT_INT="INT";I.DT_NUMBER="NUMBER";I.DT_DATE="DATE";I.DT_DATETIME="DATETIME";I.DT_STRING="STRING";I.ROUND_MODE_UP="ROUND_UP";I.ROUND_MODE_DOWN="ROUND_DOWN";I.ROUND_MODE_HALF_UP="ROUND_HALF_UP";I.BOOLEAN_TRUE="true";I.BOOLEAN_FALSE="false";I.EXTENSION_BIZ_FIELD_ENUM_KEY="bizFieldEnumKey";I.EXTENSION_IS_MUL_BASE_DATA="isMulBaseData";I.EXTENSION_IS_PK="isPK";J.UIDHelper=new function(){var q,v={};this.init=function(a,d){v={};q=a;d&J.UIDHelper.SUPPORT_TYPE_NODE&&g();d&J.UIDHelper.SUPPORT_TYPE_SOURCE&&
c();d&J.UIDHelper.SUPPORT_TYPE_TABLE&&b();d&J.UIDHelper.SUPPORT_TYPE_LINE&&k();d&J.UIDHelper.SUPPORT_TYPE_DIMENSION&&h();d&J.UIDHelper.SUPPORT_TYPE_PUBLIC_DIMENSION&&l();d&J.UIDHelper.SUPPORT_TYPE_METRIC&&x();d&J.UIDHelper.SUPPORT_TYPE_REFERENCE&&e()};this.getUID=function(a){var d=v[a];d||(d=0);d+=1;v[a]=d;return a+d};var m=function(a,d,p){for(var H=0,u=0;u<d.length;u++)for(var f=p(d[u]),w=0;w<f.length;w++){var L=f[w];H=Math.max(H,parseInt(L.slice(a.length,L.length)))}v[a]=H},h=function(){var a=q.getAllDimension();
a&&m(J.UIDHelper.NS_DIMENSION,a,function(d){return[d.getDimensionId()]})},l=function(){var a=q.getPublicDimensions();a&&m(J.UIDHelper.NS_PUBLIC_DIMENSION,a,function(d){return[d.getId()]});(a=q.getAllDimension())&&m(J.UIDHelper.NS_PUBLIC_DIMENSION,a,function(d){return[d.getPublicDimensionId()]})},x=function(){var a=q.getAllMetric();a&&m(J.UIDHelper.NS_METRIC,a,function(d){return[d.getId()]})},e=function(){var a=q.getExprReferences();a&&m(J.UIDHelper.NS_REFERENCE,a,function(d){return[d.getId()]})},
g=function(){var a=q.getAllNodes();a&&m(J.UIDHelper.NS_NODE,a,function(d){var p=[];p.push(d.getId());d.getType()==C.TYPE_TRANSFORM&&(d=d.getNodeIdInConfig(),p=p.concat(d));return p})},c=function(){var a=q.getAllSource();a&&m(J.UIDHelper.NS_SOURCE,a,function(d){return[d.getId()]})},b=function(){var a=q.getAllTable();a&&m(J.UIDHelper.NS_TABLE,a,function(d){return[d.getUid()]})},k=function(){var a=q.getAllLines();a&&m(J.UIDHelper.NS_LINE,a,function(d){return[d.getId()]})}};J.UIDHelper.NS_NODE="n";J.UIDHelper.NS_LINE=
"l";J.UIDHelper.NS_TABLE="t";J.UIDHelper.NS_SOURCE="s";J.UIDHelper.NS_DIMENSION="d";J.UIDHelper.NS_PUBLIC_DIMENSION="pd";J.UIDHelper.NS_METRIC="m";J.UIDHelper.NS_REFERENCE="r";J.UIDHelper.SUPPORT_TYPE_NODE=1;J.UIDHelper.SUPPORT_TYPE_LINE=2;J.UIDHelper.SUPPORT_TYPE_TABLE=4;J.UIDHelper.SUPPORT_TYPE_SOURCE=8;J.UIDHelper.SUPPORT_TYPE_DIMENSION=16;J.UIDHelper.SUPPORT_TYPE_PUBLIC_DIMENSION=32;J.UIDHelper.SUPPORT_TYPE_METRIC=64;J.UIDHelper.SUPPORT_TYPE_REFERENCE=128;J.UIDHelper.METRIC_SCENE=J.UIDHelper.SUPPORT_TYPE_TABLE|
J.UIDHelper.SUPPORT_TYPE_SOURCE|J.UIDHelper.SUPPORT_TYPE_DIMENSION|J.UIDHelper.SUPPORT_TYPE_PUBLIC_DIMENSION|J.UIDHelper.SUPPORT_TYPE_METRIC|J.UIDHelper.SUPPORT_TYPE_REFERENCE;M.ALL_DATA_NUMBER=-1;oa.TYPE_SOURCE="source";oa.TYPE_TRANSFORM_FIELD_SELECT="field_select";oa.TYPE_TRANSFORM_FIELD_SETTING="field_setting";oa.TYPE_TRANSFORM_GROUP_BY="group_by";oa.TYPE_TRANSFORM_FILTER="filter";oa.TYPE_TRANSFORM_SORT="sort";oa.TYPE_TRANSFORM_JOIN="join";aa.TYPE_MULTI_OUTPUT="multiOutput";aa.TYPE_LACK_OUTPUT=
"lackOutputNode";aa.TYPE_INVALID_CONFIG="invalidConfig";aa.TYPE_LACK_INPUT="lackInputNode";aa.TYPE_INVALID_UPWARDNODE="invalidUpwardNode";aa.TYPE_INVALID_SOURCE="invalidSource";aa.TYPE_TABLE_NO_FIELD="tableNoField";aa.TYPE_TABLE_NO_AUTHORITY="tableNoAuthority";t.REG_NUMBER=/^-?\d+(\.\d+)?$/;t.REG_DATETIME=/^-?\d+(\.\d+)?$/;t.COMPARE_EQUAL="EQUAL";t.COMPARE_NOT_EQUAL="NOT_EQUAL";t.COMPARE_GREATER="GREATER";t.COMPARE_GREATER_EQUAL="GREATER_EQUAL";t.COMPARE_LESS="LESS";t.COMPARE_LESS_EQUAL="LESS_EQUAL";
t.COMPARE_INCLUDE="INCLUDE";t.COMPARE_NOT_INCLUDE="NOT_INCLUDE";t.COMPARE_START_WITH="START_WITH";t.COMPARE_END_WITH="END_WITH";t.COMPARE_NULL="NULL";t.COMPARE_NOT_NULL="NOT_NULL";t.COMPARE_IN="IN";t.COMPARE_NOT_IN="NOT_IN";t.COMPARE_RELATIVE_DATE_RANGE="RELATIVE_DATE_RANGE";t.LOGIC_AND="AND";t.LOGIC_OR="OR";t.COMPARES_FOR_STRING=[t.COMPARE_EQUAL,t.COMPARE_NOT_EQUAL,t.COMPARE_INCLUDE,t.COMPARE_NOT_INCLUDE,t.COMPARE_START_WITH,t.COMPARE_END_WITH,t.COMPARE_NULL,t.COMPARE_NOT_NULL,t.COMPARE_IN,t.COMPARE_NOT_IN];
t.COMPARES_FOR_ENUM=[t.COMPARE_EQUAL,t.COMPARE_NOT_EQUAL,t.COMPARE_NULL,t.COMPARE_NOT_NULL,t.COMPARE_IN,t.COMPARE_NOT_IN];t.COMPARES_FOR_NUMBER=[t.COMPARE_EQUAL,t.COMPARE_NOT_EQUAL,t.COMPARE_GREATER,t.COMPARE_GREATER_EQUAL,t.COMPARE_LESS,t.COMPARE_LESS_EQUAL,t.COMPARE_NULL,t.COMPARE_NOT_NULL,t.COMPARE_IN,t.COMPARE_NOT_IN];t.COMPARES_FOR_DATETIME=[t.COMPARE_RELATIVE_DATE_RANGE,t.COMPARE_EQUAL,t.COMPARE_NOT_EQUAL,t.COMPARE_GREATER,t.COMPARE_GREATER_EQUAL,t.COMPARE_LESS,t.COMPARE_LESS_EQUAL,t.COMPARE_NULL,
t.COMPARE_NOT_NULL];t.COMPARES_FOR_BOOLEAN=[t.COMPARE_EQUAL,t.COMPARE_NOT_EQUAL,t.COMPARE_NULL,t.COMPARE_NOT_NULL];t.isCompareOpWithoutValue=function(q){return q===t.COMPARE_NULL||q===t.COMPARE_NOT_NULL};t.isCompareOpWithinOrNotWithinValue=function(q){return q===t.COMPARE_IN||q===t.COMPARE_NOT_IN};t.isCompareOpRelativeDateRangeValue=function(q){return q===t.COMPARE_RELATIVE_DATE_RANGE};t.getSelectableCompares=function(q,v){switch(q){case I.DT_STRING:return v?t.COMPARES_FOR_ENUM:t.COMPARES_FOR_STRING;
case I.DT_NUMBER:case I.DT_INT:return t.COMPARES_FOR_NUMBER;case I.DT_DATE:case I.DT_DATETIME:return t.COMPARES_FOR_DATETIME;case I.DT_BOOLEAN:return t.COMPARES_FOR_BOOLEAN;default:throw Error("Unknown DataType");}};t.FiltersCheckingResult=function(q,v){var m=v;this.getFiltersErrorRow=function(){return q};this.getPrompt=function(){return m};this.setPrompt=function(h){m=h}};T.TYPE_FIELD_SELECT="field_select";T.TYPE_FIELD_SETTING="field_setting";T.TYPE_FILTER="filter";T.TYPE_SORT="sort";T.TYPE_GROUP_BY=
"group_by";T.TYPE_CALCULATED_FIELD="calculated_field";T.TYPE_CUSTOM_GROUP="custom_group";T.TYPE_JOIN="join";T.TYPE_UNION="union";Q.TYPE_ONCE="once";Q.TYPE_TIMING="timing";Q.STRATEGY_FULL="full";Q.STRATEGY_INCREMENTAL="incremental";J.ENTITY_SEPARATOR="@#!&@"})();(function(){function y(){xa.call(this);var e=this,g=this.protectedMethod,c=[],b=[],k=[],a=[],d=[];e.setType(xa.TYPE_METRIC_MODELER);e.setMaterializedConfig(new x);this.protectedIsTableInUse=function(u){return!0};this.isTableReferred=function(u){p();for(var f=0;f<a.length;f++){var w=a[f];if(w instanceof M&&w.getTableId()==u.getUid())return!0}for(f=0;f<c.length;f++){w=c[f].getFilterItems();for(var L=0;L<w.length;L++){var R=w[L].getField();if(R&&R.getTableId()==u.getUid())return!0}}return!1};this.getAllDimension=
function(){return b};this.setDimensions=function(u){b=u};this.addDimension=function(u,f){isNaN(f)?b.push(u):b.splice(f,0,u);g.firePropertyChangeEvt(y.KEY_ADD_DIMENSION,u)};this.removeDimension=function(u){for(var f=0;f<b.length;f++)if(b[f].isSame(u))return b.splice(f,1),g.firePropertyChangeEvt(y.KEY_REMOVE_DIMENSION,[u]),f;return-1};this.updateDimension=function(u,f){if(isNaN(f))return!1;b.splice(f,1);b.splice(f,0,u);g.firePropertyChangeEvt(y.KEY_UPDATE_DIMENSION,b)};this.updateDimensions=function(u){b=
u;g.firePropertyChangeEvt(y.KEY_BATCH_UPDATE_DIMENSION,u)};this.getDimensionById=function(u){for(var f=0;f<b.length;f++)if(b[f].getDimensionId()==u)return b[f]};this.getDimensionByName=function(u){for(var f=0;f<b.length;f++)if(b[f].getName()==u)return b[f]};this.getPublicDimensions=function(){return k};this.getPublicDimensionById=function(u){for(var f=0;f<k.length;f++)if(k[f].getId()==u)return k[f]};this.getSamePublicDimension=function(u){for(var f=0;f<k.length;f++){var w=k[f];if(w.isSame(u))return w}};
this.setPublicDimensions=function(u){k=u};this.removePublicDimensionById=function(u){for(var f=0;f<k.length;f++)if(k[f].getId()==u)return k.splice(f,1),f;return-1};this.addPublicDimension=function(u,f){isNaN(f)?k.push(u):k.splice(f,0,u)};this.checkDimensionRef=function(u,f){var w=e.getAllTable();if(f&&2<=w.length)return!0;for(f=0;f<b.length;f++)if(b[f].getPublicDimensionId()==u)return!0;return!1};this.checkTableExist=function(u){for(var f=e.getAllTable(),w=0;w<f.length;w++)if(u==f[w].getUid())return!0;
return!1};this.setMetrics=function(u){c=u};this.addMetric=function(u,f){isNaN(f)?c.push(u):c.splice(f,0,u);g.firePropertyChangeEvt(y.KEY_ADD_METRIC,u)};this.removeMetric=function(u){var f=c.indexOf(u);return-1<f?(c.splice(f,1),g.firePropertyChangeEvt(y.KEY_REMOVE_METRIC,u),f):-1};this.updateMetric=function(u){var f=e.getMetric(u.getId());f&&(f.update(u),g.firePropertyChangeEvt(y.KEY_UPDATE_METRIC,f))};this.getAllMetric=function(){return c};this.getMetric=function(u){for(var f=0;f<c.length;f++){var w=
c[f];if(w.getId()==u)return w}};this.setExprReferences=function(u){a=u};this.setUnreferencedRef=function(u){d=u};this.getExprReferences=function(){return a};this.copyExprReferences=function(){for(var u=[],f=0;f<a.length;f++){var w=a[f].copy();u.push(w)}return u};this.getExprReference=function(u){for(var f=0;f<a.length;f++){var w=a[f];if(u==w.getId())return w}};this.repairDimensionRef=function(u){};this.addExprRefIfNotExist=function(u){for(var f=0;f<a.length;f++){var w=a[f];if(w.equals(u))return w}for(f=
0;f<d.length;f++)if(w=d[f],w.equals(u)){u=w;d.splice(f,1);break}a.push(u);return u};this.protectedToJsonObject=function(u){for(var f=[],w=0;w<c.length;w++)f.push(c[w].toJsonObject());u.metrics=f;p();f=[];for(w=0;w<a.length;w++)f.push(a[w].toJsonObject());u.references=f;f=[];for(w=0;w<d.length;w++)f.push(d[w].toJsonObject());u.unreferencedRef=f;f=[];for(w=0;w<b.length;w++)f.push(b[w].toJsonObject());u.dimensions=f;f=[];for(w=0;w<k.length;w++)k[w].isEmpty()||f.push(k[w].toJsonObject());u.publicDimensions=
f;e.getMaterializedConfig()||(w=new x,u.materializedConfig=w.toJsonObject())};this.protectedFromJsonObject=function(u){var f=u.metrics;if(f)for(var w=0;w<f.length;w++){var L=new C;L.fromJsonObject(f[w]);c.push(L)}if(f=u.references)for(w=0;w<f.length;w++){L=f[w];switch(L.type){case I.FIELD_TYPE:var R=new M;break;case I.METRIC_TYPE:R=new oa;break;default:throw Error("unknown type");}R.fromJsonObject(L);a.push(R)}if(f=u.dimensions)for(w=0;w<f.length;w++)L=new K,L.fromJsonObject(f[w]),b.push(L);if(u=
u.publicDimensions)for(w=0;w<u.length;w++)f=new ca,f.fromJsonObject(u[w]),k.push(f);f=H();w=[];for(u=0;u<f.length;u++)L=f[u],e.getExprReference(L)||w.push(L);for(u=0;u<w.length;u++)for(f=w[u],L=0;L<c.length;L++){R=c[L];var qa=R.getExpr();R.setExpr(ha.ExprRefHelper.replaceRefText(qa,f,""))}};this.copy=function(){var u=new y;g.copy(u);for(var f=[],w=0;w<c.length;w++)f.push(c[w].clone());u.setMetrics(f);f=[];for(w=0;w<b.length;w++)f.push(b[w].copy());u.setDimensions(f);f=[];for(w=0;w<k.length;w++)f.push(k[w].copy());
u.setPublicDimensions(f);f=[];for(w=0;w<a.length;w++)f.push(a[w].copy());u.setExprReferences(f);f=[];for(w=0;w<d.length;w++)f.push(d[w].copy());u.setUnreferencedRef(f);return u};var p=function(){for(var u=H(),f=[],w=[],L=0;L<a.length;L++){var R=a[L];-1<u.indexOf(R.getId())?f.push(R):w.push(R)}a=f;d=w},H=function(){for(var u=[],f=0;f<c.length;f++){var w=c[f].getExpr();(w=ha.ExprRefHelper.getRefTextInExpr(w))&&(u=u.concat(w))}return u}}function C(){var e,g,c,b,k,a,d=[];this.setNumber=function(p){e=
p};this.getNumber=function(){return e};this.setId=function(p){g=p};this.getId=function(){return g};this.setName=function(p){c=p};this.getName=function(){return c};this.setDesc=function(p){b=p};this.getDesc=function(){return b};this.setExpr=function(p){k=p};this.getExpr=function(){return k};this.setFormat=function(p){a=p};this.getFormat=function(){return a};this.setFilterItems=function(p){d=p};this.getFilterItems=function(){return d};this.update=function(p){e=p.getNumber();k=p.getExpr();c=p.getName();
b=p.getDesc();a=p.getFormat();d=p.getFilterItems()};this.clone=function(){var p=new C;p.setNumber(e);p.setId(g);p.setExpr(k);p.setName(c);p.setDesc(b);p.setFormat(a);for(var H=[],u=0;u<d.length;u++){var f=d[u].copy();H.push(f)}p.setFilterItems(H);return p};this.equals=function(p){if(p.getName()!==c||p.getDesc()!==b||p.getExpr()!==k||p.getFormat()!==a||p.getNumber()!==e||d.length!==p.getFilterItems().length)return!1;p=p.getFilterItems();for(var H=0;H<d.length;H++)if(!d[H].equals(p[H]))return!1;return!0};
this.toJsonObject=function(){var p={};p.number=e;p.id=g;p.name=c;p.desc=b;p.expr=k;p.format=a;for(var H=[],u=0;u<d.length;u++)H.push(d[u].toJsonObject());p.filterItems=H;return p};this.fromJsonObject=function(p){g=p.id;e=p.number;c=p.name;b=p.desc;k=p.expr;a=p.format;if(p=p.filterItems)for(var H=0;H<p.length;H++){var u=new l;u.fromJsonObject(p[H]);d.push(u)}}}function K(){var e,g,c,b=!1,k=!1,a,d,p,H,u=this;this.setDimensionId=function(f){e=f};this.getDimensionId=function(){return e};this.setName=
function(f){g=f};this.getName=function(){return g};this.setNumber=function(f){c=f};this.getNumber=function(){return c};this.setNumberModified=function(f){b=f};this.isNumberModified=function(){return b};this.setNameModified=function(f){k=f};this.isNameModified=function(){return k};this.setDimensionType=function(f){a=f};this.getDimensionType=function(){return a};this.setDateFormat=function(f){d=f};this.getDateFormat=function(){return d};this.setRequired=function(f){p=f};this.isRequired=function(){return p};
this.getPublicDimensionId=function(){return H};this.setPublicDimensionId=function(f){H=f};this.copy=function(){var f=new K;f.setDimensionId(e);f.setName(g);f.setNumber(c);f.setNumberModified(b);f.setNameModified(k);f.setDimensionType(a);d?f.setDateFormat(d):a==K.TYPE_DATE&&f.setDateFormat(K.VALUE_YYYY);f.setRequired(p);f.setPublicDimensionId(H);return f};this.isSame=function(f){return f?g==f.getName()&&c==f.getNumber()&&b==f.isNumberModified()&&k==f.isNameModified()&&a==f.getDimensionType()&&e==f.getDimensionId()&&
(d==f.getDateFormat()||null==d&&f.getDateFormat()==K.VALUE_YYYY)&&H==f.getPublicDimensionId()?!0:!1:!1};this.toJsonObject=function(){var f={};f.id=e;f.name=g;f.number=c;f.isNumberModified=b;f.isNameModified=k;f.dimensionType=a;f.dateFormatType=d;f.required=p;f.publicDimensionId=H;return f};this.fromJsonObject=function(f){e=f.id;g=f.name;c=f.number;b=f.isNumberModified;k=f.isNameModified;a=f.dimensionType;void 0!=f.dateFormatType&&u.setDateFormat(f.dateFormatType);f.required&&u.setRequired(f.required);
H=f.publicDimensionId}}function ca(){var e,g,c=!1,b=[];this.setId=function(a){e=a};this.getId=function(){return e};this.setName=function(a){g=a};this.getName=function(){return g};this.setNameModified=function(a){c=a};this.isNameModified=function(){return c};this.isSame=function(a){if(!a)return!1;a=a.getFields();if(a.length!=b.length)return!1;for(var d=0;d<b.length;d++)if(!b[d].isSame(a[d]))return!1;return!0};this.getDataType=function(){return 0==b.length?null:b[0].getDataType()};this.setFields=function(a){b=
a};this.addField=function(a){b.push(a)};this.insertField=function(a,d){b.splice(a,0,d)};this.getFields=function(){return b};this.getFieldByIndex=function(a){return b[a]};this.getLastField=function(){return b[b.length-1]};this.removeField=function(a){b.splice(a,1)};this.empty=function(a){g=null;a&&(e=null)};this.isEmpty=function(){return!g};this.updateFields=function(a){for(var d=0;d<b.length;d++){var p=b[d];if(p&&p.getName()){var H=p.getTableId();H=a[H]?a[H]:[];for(var u=!1,f=0;f<H.length;f++)if(H[f]&&
H[f].getName()==p.getName()){u=!0;p.update(H[f]);break}u||p.updateWhenNotExist();p.setExist(u)}}};this.isDataTypeConsistent=function(){if(0==b.length)return!1;var a=b[0];if(!a)return!1;for(var d=1;d<b.length;d++){var p=b[d];if(!p||a.getDataType()!=p.getDataType()||!k(a.getField(),p.getField()))return!1}return!0};this.tryGenerateId=function(a){var d=!0;if(a){a=a.getFields();for(var p=0;p<b.length;p++){var H=a[p].getField().getFullName(),u=b[p].getField().getFullName();if(H==u){d=!1;break}}}else d=
!1;if(!e||d)d=com.kingdee.bos.qing.modeler.designer.UIDHelper,e=d.getUID(d.NS_PUBLIC_DIMENSION)};this.tryGenerateName=function(a){if(0!=b.length){var d=b[0];g=c||!d.getAlias()?g:a()}};this.isFieldsCompleted=function(){for(var a=!1,d=0;d<b.length;d++)b[d].getName()&&(a=!0);if(!a&&!g)return!0;for(d=0;d<b.length;d++)if(a=b[d],!a.getName()||!a.isExist())return!1;return!0};this.copy=function(){var a=new ca;a.setId(e);a.setName(g);for(var d=[],p=0;p<b.length;p++){var H=b[p].copy();d.push(H)}a.setFields(d);
a.setNameModified(c);return a};this.toJsonObject=function(){var a={};a.id=e;a.name=g;a.isNameModified=c;for(var d=[],p=0;p<b.length;p++)d.push(b[p].toJsonObject());a.fields=d;return a};this.fromJsonObject=function(a){e=a.id;g=a.name;c=a.isNameModified;if(a=a.fields)for(var d=0;d<a.length;d++){var p=new da;p.fromJsonObject(a[d]);b.push(p)}};var k=function(a,d){a=a?a.getEnumValue():null;d=d?d.getEnumValue():null;if(!a&&!d)return!0;if(!a&&d||a&&!d||Object.keys(d).length!=Object.keys(a).length)return!1;
for(var p in d){var H=d[p],u=a[p];if(!u||u!=H)return!1}return!0}}function da(){var e=new m,g=!0;this.getField=function(){return e};this.setField=function(c){e=c};this.setName=function(c){e.setName(c)};this.getName=function(){return e.getName()};this.getTableId=function(){return e.getTableId()};this.setTableId=function(c){e.setTableId(c)};this.getDataType=function(){return e.getDataType()};this.setDataType=function(c){e.setDataType(c)};this.getAlias=function(){return e.getAlias()};this.setAlias=function(c){e.setAlias(c)};
this.setExist=function(c){g=c};this.isExist=function(){return g};this.update=function(c){e=c};this.updateWhenNotExist=function(){var c=new m;c.setName(e.getName());c.setTableId(e.getTableId());c.setAlias(e.getAlias());e=c};this.copy=function(){var c=new da;c.setField(e);c.setExist(g);return c};this.isSame=function(c){return e.getName()==c.getName()&&e.getTableId()==c.getTableId()?!0:!1};this.toJsonObject=function(){var c={};c.name=e.getName();c.tableId=e.getTableId();c.alias=e.getAlias();return c};
this.fromJsonObject=function(c){e.setName(c.name);e.setTableId(c.tableId);e.setAlias(c.alias)}}function I(){var e=this,g,c;this.setId=function(b){g=b};this.getId=function(){return g};this.setType=function(b){c=b};this.getType=function(){return c};this.getRefDisplayText=function(b){throw Error("override me");};this.isRightDisplayFormat=function(b,k){throw Error("override me");};this.fromDisplayText=function(b,k,a){throw Error("override me");};this.equals=function(b){throw Error("override me");};this.fromJsonObject=
function(b){g=b.id;c=b.type;e.protectedFromJsonObject(b)};this.toJsonObject=function(){var b={};b.id=g;b.type=c;e.protectedToJsonObject(b);return b};this.protectedFromJsonObject=function(b){};this.protectedToJsonObject=function(b){};this.protectedMethod={copy:function(b){b.setId(g);b.setType(c)}}}function M(){I.call(this);var e=this,g=this.protectedMethod,c,b,k;e.setType(I.FIELD_TYPE);this.copy=function(){var a=new M;a.setTableId(c);a.setFieldName(b);a.setAlias(k);g.copy(a);return a};this.setTableId=
function(a){c=a};this.getTableId=function(){return c};this.setFieldName=function(a){b=a};this.getFieldName=function(){return b};this.setAlias=function(a){k=a};this.getRefDisplayText=function(a){a=a.getTable(c);var d=k?k:b;return ha.TableNameHelper.getDisplayText(a)+"."+d};this.isRightDisplayFormat=function(a){return-1<a.indexOf(".")};this.fromDisplayText=function(a,d,p){var H=a.split(".")[0];c=H;var u=d.getAllTable();for(d=0;d<u.length;d++){var f=u[d];if(ha.TableNameHelper.getDisplayText(f)==H){c=
f.getUid();break}}b=a=a.substring(H.length+1);p=p?p[c]:[];for(d=0;d<p.length;d++)if(H=p[d],H.getAlias()==a){b=H.getName();k=a;break}};this.equals=function(a){return a.getType()!=e.getType()?!1:a.getTableId()==c&&a.getFieldName()==b?!0:!1};this.copy=function(){var a=new M;g.copy(a);a.setTableId(c);a.setFieldName(b);a.setAlias(k);return a};this.protectedFromJsonObject=function(a){c=a.tableId;b=a.fieldName;k=a.alias};this.protectedToJsonObject=function(a){a.tableId=c;a.fieldName=b}}function oa(){I.call(this);
var e=this,g=this.protectedMethod,c;e.setType(I.METRIC_TYPE);this.copy=function(){var b=new oa;b.setMetricId(c);g.copy(b);return b};this.setMetricId=function(b){c=b};this.getMetricId=function(){return c};this.getRefDisplayText=function(b){return(b=b.getMetric(c))?b.getName():""};this.isRightDisplayFormat=function(b,k){var a=b.match(/^[\u3000\u4E00-\u9FA5a-zA-Z0-9_]{1,}$/),d=!1;if(a){k=k.getAllMetric();for(var p=0;p<k.length;p++)k[p].getName()==b&&(d=!0)}return a&&d};this.fromDisplayText=function(b,
k){k=k.getAllMetric();for(var a=0;a<k.length;a++){var d=k[a];if(d.getName()==b){c=d.getId();break}}if(!c)throw Error("invalid ref");};this.equals=function(b){return b.getType()!=e.getType()?!1:c==b.getMetricId()};this.copy=function(){var b=new oa;g.copy(b);b.setMetricId(c);return b};this.protectedFromJsonObject=function(b){c=b.metricId};this.protectedToJsonObject=function(b){b.metricId=c}}function O(){I.call(this);var e=this,g=this.protectedMethod,c,b;e.setType(I.DIMENSION_TYPE);this.copy=function(){var k=
new oa;k.setDimensionId(c);k.setDimensionName(b);g.copy(k);return k};this.setDimensionId=function(k){c=k};this.getDimensionId=function(){return c};this.setDimensionName=function(k){b=k};this.getDimensionName=function(){return b};this.getRefDisplayText=function(k){var a=k.getDimensionById(c);a||(a=k.getDimensionByName(b));return a?a.getName():b};this.isRightDisplayFormat=function(k,a){var d=k.match(/^[\u3000\u4E00-\u9FA5a-zA-Z0-9_()]{1,}$/),p=!1;if(d){a=a.getAllDimension();for(var H=0;H<a.length;H++)a[H].getName()==
k&&(p=!0)}return d&&p};this.fromDisplayText=function(k,a){a=a.getAllDimension();for(var d=0;d<a.length;d++){var p=a[d];if(p.getName()==k){c=p.getDimensionId();b=p.getName();break}}if(!c)throw Error("invalid ref");};this.equals=function(k){return k.getType()!=e.getType()?!1:c==k.getDimensionId()&&b==k.getDimensionName()};this.copy=function(){var k=new O;g.copy(k);k.setDimensionId(c);k.setDimensionName(b);return k};this.protectedFromJsonObject=function(k){c=k.dimensionId;b=k.dimensionName};this.protectedToJsonObject=
function(k){k.dimensionId=c;k.dimensionName=b}}function V(){var e,g,c=[];this.isValid=function(){return e};this.getCases=function(){return c};this.isModelEmpty=function(){return g};this.fromJsonObject=function(b){e=b.valid;g=b.modelIsEmpty;if(b=b.cases){c=[];for(var k=new aa,a=0;a<b.length;a++){var d=b[a],p=k.getInvalidityCase(d.type);d&&(p.fromJsonObject(d),c.push(p))}}}}function aa(){this.getInvalidityCase=function(e){switch(e){case U.TYPE_NO_METRIC:return new F;case U.TYPE_INVALID_FIELD_REF:return new N;
case U.TYPE_INVALID_EXPR:return new D;case U.TYPE_INVALID_FIELD_FILTER_REF:return new B;case U.TYPE_INVALID_DIMENSION_REF:return new t;case U.TYPE_INVALID_DIMENSION_TYPE:return new T;case U.TYPE_INVALID_PUBLIC_DIMENSION:return new Q;case U.TYPE_INVALID_TABLE:return new sa;case U.TYPE_INVALID_EXPR_DATA_TYPE:return new n;case U.TYPE_INCOMPLETE_MATERIALIZED_CONFIG:return new na;case U.TYPE_INVALID_DIMENSION_NOT_EXIST:case U.TYPE_INVALID_DIMENSION_GRANULARITY_NOT_MATCH:case U.TYPE_INVALID_DIMENSION_TYPE_NOT_MATCH:return new r}}}
function U(){var e,g=this;this.getType=function(){return e};this.fromJsonObject=function(c){e=c.type;g.protectedFromJsonObject(c)};this.protectedFromJsonObject=function(c){}}function fa(){U.call(this);var e=[];this.getMetricIds=function(){return e};this.protectedFromJsonObject=function(g){g&&g.metricIds&&(e=g.metricIds)}}function F(){U.call(this)}function N(){fa.call(this)}function B(){fa.call(this)}function r(){fa.call(this)}function D(){fa.call(this);var e;this.getMetricPrompt=function(c){if(!e)return null;
for(var b=Object.keys(e),k=0;k<b.length;k++)for(var a=b[k],d=e[a],p=0;p<d.length;p++)if(c==d[p])return a};var g=this.protectedFromJsonObject;this.protectedFromJsonObject=function(c){g(c);e=c.promptMap}}function n(){fa.call(this);var e=this.protectedFromJsonObject;this.protectedFromJsonObject=function(g){e(g)}}function z(){U.call(this);var e;this.getDimensionIds=function(){return e};this.protectedFromJsonObject=function(g){g.dimensionIds&&(e=g.dimensionIds)}}function t(){z.call(this)}function T(){z.call(this)}
function Z(){U.call(this);var e;this.getPublicDimensionIds=function(){return e};this.protectedFromJsonObject=function(g){g.publicDimensionIds&&(e=g.publicDimensionIds)}}function Q(){Z.call(this)}function na(){U.call(this)}function J(){U.call(this);var e,g;this.getTableIds=function(){return e};this.getInvalidTableMap=function(){return g};this.protectedFromJsonObject=function(c){c.tableIds&&(e=c.tableIds);c.tableException&&(g=c.tableException)}}function sa(){J.call(this)}"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.designer&&(com.kingdee.bos.qing.modeler.designer={});"undefined"==typeof com.kingdee.bos.qing.modeler.designer.metricdesigner&&(com.kingdee.bos.qing.modeler.designer.metricdesigner={});var ha=
com.kingdee.bos.qing.modeler.designer.metricdesigner;ha.MetricModeler=y;ha.Metric=C;ha.ExprValidity=function(){var e,g,c;this.isValid=function(){return e};this.getPrompt=function(){return g};this.getExceptionType=function(){return c};this.fromJsonObject=function(b){e=b.valid;g=b.prompt;c=b.exceptionType}};ha.Dimension=K;ha.PublicDimension=ca;ha.MappingField=da;ha.DimensionFilterItem=function(){var e,g;this.getDimensionKey=function(){return e};this.setDimensionKey=function(c){e=c};this.getValues=function(){return g};
this.setValues=function(c){g=c};this.fromJsonObject=function(c){e=c.dimensionKey;g=c.values};this.toJsonObject=function(){var c={};c.dimensionKey=e;c.values=g;return c}};ha.ModelerValidity=V;ha.MetricModelerInvalidityCase=U;ha.TableFieldMeta=function(){var e={},g;this.getTableFieldMap=function(){return e};this.setTableFieldMap=function(c){e=c};this.getValidity=function(){return g};this.setValidity=function(c){g=c};this.fromJsonObject=function(c){if(c){var b=c.validity;b&&(g=new V,g.fromJsonObject(b));
e={};if(c=c.tableFields){b=Object.keys(c);for(var k=0;k<b.length;k++){var a=b[k],d=e,p=a;a=c[a];for(var H=[],u=0;u<a.length;u++){var f=new m;f.fromJsonObject(a[u]);H.push(f)}d[p]=H}}}}};ha.DimensionExprReference=O;var xa,q,v,m,h,l,x;(function(){var e=com.kingdee.bos.qing.modeler.designer;xa=e.ModelerModel;q=e.AbstractModelerModelParser;v=e.ModelerModerParser;m=e.Field;h=e.UIDHelper;l=e.FilterItem;x=e.MaterializedConfig})();v.registerParser(xa.TYPE_METRIC_MODELER,new function(){q.call(this);this.parseToModel=
function(e){var g=new y;g.fromJsonObject(e);return g}});y.KEY_ADD_METRIC="metric_designer_add_metric";y.KEY_REMOVE_METRIC="metric_designer_remove_metric";y.KEY_UPDATE_METRIC="metric_designer_update_metric";y.KEY_ADD_DIMENSION="metric_designer_add_dimension";y.KEY_REMOVE_DIMENSION="metric_designer_remove_dimension";y.KEY_UPDATE_DIMENSION="metric_designer_update_dimension";y.KEY_BATCH_UPDATE_DIMENSION="metric_designer_batch_update_dimension";K.TYPE_DATE="DATE";K.TYPE_NORMAL="NORMAL";K.VALUE_YYYY=0;
K.VALUE_QUARTER=1;K.VALUE_MONTH=2;K.VALUE_DAY=3;K.VALUE_YEAR_QUARTER=4;K.VALUE_YEAR_MONTH=5;K.VALUE_YEAR_WEEK=6;K.VALUE_WEEK_OF_YEAR=7;K.VALUE_DAY_OF_WEEK=8;K.VALUE_YEAR_MONTH_DAY=9;ha.TableNameHelper=new function(){var e={};this.removeTableName=function(c){c=c.getUid();e[c]&&(e[c]=null)};this.addTableName=function(c,b){c=c.getUid();e[c]=b};this.getDisplayText=function(c){var b=c.getUid(),k=e[b];if(k)return k;for(c=k=(k=c.getDisplayName())?k:c.getTableName();-1<c.indexOf(".");)c=c.replace(".","_");
c=g(c);return e[b]=c};var g=function(c,b){for(var k=b?c+"_"+b:c,a=!1,d=Object.keys(e),p=0;p<d.length;p++)if(e[d[p]]==k){a=!0;break}return a?g(c,b?b+1:1):k}};ha.ExprRefHelper=new function(){function e(f){b.call(this,f,"#666")}function g(f){b.call(this,f,"#e8893a")}function c(f){b.call(this,f,"#4071ee")}function b(f,w){this.getText=function(){return f};this.getColor=function(){return w}}var k=this,a,d=[],p=/\[(.+?)\]/g;this.setGlobal=function(f){a=f};this.translateToExeExpr=function(f,w){for(var L=
k.getRefTextInExpr(f),R=0;R<L.length;R++){var qa=L[R];a:{var ea=qa;for(var wa=w,ra=a.getModelerModel(),ta=ra.getExprReferences(),Da=0;Da<ta.length;Da++){var Qa=ta[Da];if(Qa.getRefDisplayText(ra)==ea){ea=Qa;break a}}for(Da=0;Da<d.length;Da++)if(ta=new d[Da],ta.isRightDisplayFormat(ea,ra)){try{ta.fromDisplayText(ea,ra,wa)}catch(Wa){continue}ta=ra.addExprRefIfNotExist(ta);ta.getId()||(ea=ta,wa=h.getUID(h.NS_REFERENCE),ea.setId(wa));ea=ta;break a}ea=void 0}ea&&(f=k.replaceRefText(f,qa,ea.getId()))}return f};
this.translateToTextSegment=function(f){var w=k.getRefTextInExpr(f),L=[],R=a.getModelerModel();H(f,w,function(qa,ea){qa&&0<qa.length&&(qa=new e(qa),L.push(qa));ea&&(ea=R.getExprReference(ea),ea=ea instanceof M?new c("["+ea.getRefDisplayText(R)+"]"):ea instanceof oa?new g("["+ea.getRefDisplayText(R)+"]"):new e("[]"),L.push(ea))});return L};var H=function(f,w,L){for(var R,qa,ea=0;ea<w.length;ea++){var wa=w[ea],ra=f.indexOf("["+wa+"]");-1<ra&&(void 0==R||R>ra)&&(R=ra,qa=wa)}R||0==R?(ea=f.substring(0,
R),L(ea,qa,R),f=f.substring(R+("["+qa+"]").length),H(f,w,L)):L(f,null,null)};this.translateToDisplayExpr=function(f){for(var w=k.getRefTextInExpr(f),L=a.getModelerModel(),R=0;R<w.length;R++){var qa=w[R],ea=L.getExprReference(qa);ea=ea instanceof M?ea.getRefDisplayText(L):ea instanceof oa?ea.getRefDisplayText(L):"";f=k.replaceRefText(f,qa,ea)}return f};this.getRefTextInExpr=function(f){var w=[];f=f.match(p);if(!f)return w;for(var L=0;L<f.length;L++){var R=f[L];R=R.substring(1,R.length-1);0>w.indexOf(R)&&
w.push(R)}return w};this.getRefFullDisplayText=function(f){var w=a.getModelerModel();return"["+f.getRefDisplayText(w)+"]"};this.createFieldReference=function(f,w){var L=new M;L.setTableId(f);L.setFieldName(w.getName());L.setAlias(w.getAlias());return u(L)};this.createMetricReference=function(f){var w=new oa;w.setMetricId(f);return u(w)};this.registReference=function(f){0<d.indexOf(f)||d.push(f)};this.getMetricReferredInfo=function(f){var w=[];f=f.getId();for(var L=a.getModelerModel(),R=L.getAllMetric(),
qa=0;qa<R.length;qa++){var ea=R[qa];if(ea.getId()!=f)for(var wa=k.getRefTextInExpr(ea.getExpr()),ra=0;ra<wa.length;ra++){var ta=L.getExprReference(wa[ra]);ta instanceof oa&&ta.getMetricId()==f&&w.push(ea)}}return w};this.replaceRefText=function(f,w,L){L="["+L+"]";for(w="["+w+"]";-1<f.indexOf(w);)f=f.replace(w,L);return f};var u=function(f){var w=h.getUID(h.NS_REFERENCE);f.setId(w);return a.getModelerModel().addExprRefIfNotExist(f)}};I.FIELD_TYPE="field";I.METRIC_TYPE="metric";I.DIMENSION_TYPE="dimension";
ha.ExprRefHelper.registReference(M);ha.ExprRefHelper.registReference(oa);U.TYPE_NO_METRIC="noMetric";U.TYPE_INVALID_FIELD_REF="invalidFieldRef";U.TYPE_INVALID_EXPR="invalidExpr";U.TYPE_INVALID_EXPR_DATA_TYPE="invalidExprDataType";U.TYPE_INVALID_FIELD_FILTER_REF="invalidFieldFilterRef";U.TYPE_INVALID_DIMENSION_REF="invalidDimensionRef";U.TYPE_INVALID_DIMENSION_TYPE="invalidDimensionType";U.TYPE_INVALID_PUBLIC_DIMENSION="invalidPublicDimension";U.TYPE_INVALID_TABLE="invalidTable";U.TYPE_INVALID_TABLE_FILTER=
"invalidTableFilter";U.TYPE_DB_CONNECTION_FAIL="dbConnectionFail";U.TYPE_USER_NO_DB_CENTER_PERMISSION="userNoDBCenterPermission";U.TYPE_CREATOR_NO_DB_CENTER_PERMISSION="creatorNoDBCenterPermission";U.TYPE_USER_NO_PUBLIC_SOURCE_PERMISSION="userNoPublicSourcePermission";U.TYPE_CREATOR_NO_PUBLIC_SOURCE_PERMISSION="creatorNoPublicSourcePermission";U.TYPE_USER_NO_ENTITY_PERMISSION="userNoEntityPermission";U.TYPE_REF_PUBLIC_SOURCE_NOT_EXIST="refPublicSourceNotExist";U.TYPE_TABLE_NOT_EXIST="tableNotExist";
U.TYPE_MODEL_NOT_EXIST="modelNotExist";U.TYPE_MODEL_DAMAGE="modelDamage";U.TYPE_MODEL_NO_DATA_PERMISSION="modelNoDataPermission";U.TYPE_MODEL_CYCLE_REFERENCE="modelCycleReference";U.TYPE_INCOMPLETE_MATERIALIZED_CONFIG="incompleteMaterializedConfig";U.TYPE_INVALID_DIMENSION_GRANULARITY_NOT_MATCH="invalidDimensionGranularityNotMatch";U.TYPE_INVALID_DIMENSION_TYPE_NOT_MATCH="invalidDimensionTypeNotMatch";U.TYPE_INVALID_DIMENSION_NOT_EXIST="invalidDimensionNotExist"})();(function(){function y(){var h=this,l,x,e,g;this.getJqUi=function(){l||(l=$("<div>"),c(l,b().getJqUi()));return l};var c=function(k,a){var d=new t;d.setText(O.get("search","\u641c\u7d22"));var p=h.createAllSearchImpl();h.changeSearchImpl(p[0],!1);var H=new z;H.setItemModels(p);H.setSelected(p[0]);H.setCustomPainter(function(u,f,w){w&&f.text(w.getCaption())});H.addSelectedChangedListener(function(u,f,w){h.changeSearchImpl(w,!0)});d=d.getJqUi();H=H.getJqUi();V.layoutCtrlWithLRTB(d,0,null,40,0,null,
23);V.layoutCtrlWithLRTB(H,40,null,80,0,null,23);V.layoutCtrlWithLRTB(a,130,0,null,0,null,23);k.append(d);k.append(H);k.append(a)};this.setSearchingHandler=function(k){g=k};this.isSearching=function(){return h.getSearchText()?!0:!1};this.check=function(k){return!h.getSearchText()||e.check(k.toLowerCase(),h.getSearchText().toLowerCase())};this.clear=function(){x&&x.clear()};this.createAllSearchImpl=function(){return[new K(!0),new K(!1),new da(!0),new da(!1),new I(!0),new I(!1),new ca(!0),new ca(!1)]};
var b=function(){x=new D;x.setShowSearchIcon(!0);x.setPlaceholder(O.get("searcherTips","\u641c\u7d22\u5185\u5bb9"));x.addSearchListener(function(k){g()});x.setSearchListenerDelay(1E3);return x};this.changeSearchImpl=function(k,a){e=k;a&&g()};this.getSearchText=function(){return x?x.getText():null};this.search=function(k,a){return e.doMatch(k,a)}}function C(h){var l=this;this.getCaption=function(){return l.protectedGetCaption(!h)};this.protectedGetCaption=function(x){throw Error("Override");};this.check=
function(x,e){x=l.protectedCheckImpl(x,e);return h?x:!x};this.protectedCheckImpl=function(x,e){throw Error("Override");};this.doMatch=function(x,e){e+="";return h?l.protectedCheckImpl(e,x):!l.protectedCheckImpl(e,x)}}function K(h){C.call(this,h);this.protectedGetCaption=function(l){return l?O.get("searchNotInclude","\u4e0d\u5305\u542b"):O.get("searchInclude","\u5305\u542b")};this.protectedCheckImpl=function(l,x){return 0<=l.indexOf(x)}}function ca(h){C.call(this,h);this.protectedGetCaption=function(l){return l?
O.get("searchNotEqual","\u4e0d\u7b49\u4e8e"):O.get("searchEqual","\u7b49\u4e8e")};this.protectedCheckImpl=function(l,x){return l===x}}function da(h){C.call(this,h);this.protectedGetCaption=function(l){return l?O.get("searchNotStartOf","\u5f00\u5934\u4e0d\u662f"):O.get("searchStartOf","\u5f00\u5934\u662f")};this.protectedCheckImpl=function(l,x){return 0==l.indexOf(x)}}function I(h){C.call(this,h);this.protectedGetCaption=function(l){return l?O.get("searchNotEndOf","\u7ed3\u5c3e\u4e0d\u662f"):O.get("searchEndOf",
"\u7ed3\u5c3e\u662f")};this.protectedCheckImpl=function(l,x){var e=l.lastIndexOf(x);return 0<=e&&e==l.length-x.length}}function M(){var h,l=M.TYPE_TEXT,x=O.get("noDataTips","\u6682\u65e0\u6570\u636e"),e;this.getJqUi=function(){if(!h)switch(h=$("<div>"),h.addClass("modeler-designer-no-data"),l){case M.TYPE_TEXT:c(x,"modeler-designer-no-data-only-text");break;case M.TYPE_NO_SOURCE:g("no_source","modeler-designer-no-data-icon");c(x,"modeler-designer-no-data-text");break;case M.TYPE_NO_SEARCH_RESULT:g("search-no-result",
"modeler-designer-node-selection-icon");c(x,"modeler-designer-node-selection-tip");break;case M.TYPE_NO_DATA_WITH_CLOUD:g("no_data_cloud","modeler-designer-no-data-cloud-icon");c(x,"modeler-designer-no-data-text");break;default:throw Error("The view type error, please set first.");}return h};this.setType=function(b){l=b};this.setText=function(b){x=b?b:"";e&&e.text(x)};var g=function(b,k){var a=$("<div>");a.addClass(k);na.background(a,b);a.appendTo(h)},c=function(b,k){e=$("<div>");e.addClass(k);e.text(b);
e.appendTo(h)}}"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.designer&&(com.kingdee.bos.qing.modeler.designer={});"undefined"==typeof com.kingdee.bos.qing.modeler.designer.metricdesigner&&(com.kingdee.bos.qing.modeler.designer.metricdesigner=
{});var oa=com.kingdee.bos.qing.modeler.designer.metricdesigner;oa.MetricsCalculateDialog=function(){function h(G){KTDefaultCellRender.call(this,G);var E=this,A=this.paintCellUI;this.paintCellUI=function(ba,ja){var ua=E.getCurrentRowIdx(),la=E.getCurrentRow(),za=E.getCurrentColIdx(),va=la.getUserObject();ua<Z.getHeadRowCount()?A(ba,ja):(ja=L.getField(za),ua=ja.getOutputDataType(),va=va[za],null===va||void 0===va?va="":"DATE"===ua?(la=new aa,la.setFormatString("yyyy-MM-dd"),va=la.format(va)):"DATETIME"===
ua?(la=new aa,la.setFormatString("yyyy-MM-dd HH:mm:ss"),va=la.format(va)):"BOOLEAN"===ua?va=va?"true":"false":"NUMBER"===ua&&(ua=new KTStyle,ua.setTextAlign("right"),la.getCell(za).setStyle(ua),la=ja.getFormat())&&(za=new U,za.setFormatString(la),va=za.format(va)),la=$("<div class='metric-designer-trial-calculate-table-cell'>"),la.text(va),la.attr("title",va),la.appendTo(ba))}}function l(G,E){function A(pa,X,Y){function ia(){var S,W,P;this.setValue=function(ka){S=ka};this.getValue=function(){return S};
this.setText=function(ka){W=ka};this.getText=function(){return W};this.setChecked=function(ka){P=ka};this.isChecked=function(){return P}}function ma(S){var W,P=new n;this.getJqUi=function(){W||(P.setUserObject(S.getValue()),P.setText(S.getText()),P.setChecked(S.isChecked()),P.addCheckedListener(ka),W=P.getJqUi(),W.css("position","relative"));return W};var ka=function(ya,La){S.setChecked(ya.isChecked());eb(ya,La)}}fa.call(this);var Aa=this,Ca=this.protectedMethod,Ja,Ea,Fa=[],Na=[],Ma=!1,Ga,Ra,Ia,Ka,
Xa=new aa,Ha;(function(){Ca.setTitle(pa.getDimensionModel().getName());Ca.setSelectable(!0);Ca.setContentPaneCreator(function(){var S=X.length,W=Math.max(60,Math.min(parseInt(.9*$(document.body).innerHeight())-180,420));S=Math.min(W,Math.max(60,23*S));S=Math.max(S+180,305);Aa.setSize(600,S);if(!Ja){Ja=$("<div>");fb(Ja);S=Ja;W=$("<div>");V.layoutCtrlWithLRTB(W,0,0,null,0,null,55);Ea=new y;Ea.setSearchingHandler(gb);var P=Ea.getJqUi();V.layoutCtrlWithLRTB(P,0,200,null,0,null,23);P.appendTo(W);P=new n;
P.setText(O.get("showOnlySelected","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));P.setChecked(Ma);P.addCheckedListener(hb);P=P.getJqUi();V.layoutCtrlWithLRTB(P,null,0,120,4,null,21);P.appendTo(W);Ga=new n;Ga.setText(O.get("selectAll","\u5168\u9009"));Ga.setChecked(0===Y.length?!0:Y.length===X.length);Ga.addCheckedListener(ib);P=Ga.getJqUi();V.layoutCtrlWithLRTB(P,0,null,80,30,null,21);P.appendTo(W);Ra=new t;P=Ra.getJqUi();V.layoutCtrlWithLRTB(P,80,0,null,30,null,21);P.appendTo(W);W.appendTo(S);Sa()}return Ja});
Ca.setClosingChecker(function(){return 0===Ta().length?(Ca.getMessageCurtain().showPrompt(O.get("noSelectValue","\u8bf7\u81f3\u5c11\u9009\u62e9\u4e00\u4e2a\u7ef4\u5ea6\u503c\u3002"),2E3),!1):!0});Ca.setClosingAction(function(S){if(S){S=Ta();var W=va(S);Ua(W);pa.updateSelectedDimensionValue(S);m.occur(m.FUNCTION,m.TRIAL_CALCULATE_DIMENSION_FILTER)}})})();var fb=function(S){var W=$("<div>");V.layoutCtrlWithLRTB(W,0,0,null,55,10,null);jb(X,W);Ha=new T;Ha.setItemHeight(23);var P=Ha.getJqUi();Ha.setItemUiCreator(function(ka){var ya=
$("<div>");ya.css("width","100%");ka=new ma(Na[ka]);ya.append(ka.getJqUi());return ya});V.layoutCtrlWithLRTB(P,0,0,null,0,0,null);W.append(P);Ya();S.append(W)},Ya=function(){Ha.setItemCount(Na.length);setTimeout(Ha.repaint,0)},jb=function(S,W){Ka=new M;Ka.setType(M.TYPE_NO_SEARCH_RESULT);Ka.setText(O.get("noSearchResult","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"));var P=Ka.getJqUi();P.hide();P.appendTo(W);Ia=new M;Ia.setType(M.TYPE_NO_DATA_WITH_CLOUD);Ia.setText(O.get("noDataTips",
"\u6682\u65e0\u6570\u636e"));P=Ia.getJqUi();P.appendTo(W);P.hide();if(S&&0!==S.length){W=pa.getDimensionModel();P=W.getDimensionType();for(var ka=0;ka<S.length;ka++){var ya=S[ka],La=0===Y.length?!0:-1!==Y.indexOf(ya);var Ba=ya;if(null===Ba||0===Ba.length)var Oa=O.get("emptyValue","\uff08\u7a7a\uff09");else if(sa.TYPE_DATE===P){Oa=W.getDateFormat();if(0!==$.trim(Ba).length)switch(Oa){case sa.VALUE_YEAR_MONTH_DAY:Xa.setFormatString("yyyy-MM-dd"),Ba=Xa.format(Ba)}Oa=Ba}else Oa=Ba;Ba=new ia;Ba.setValue(ya);
Ba.setChecked(La);Ba.setText(Oa);Fa.push(Ba)}Na=Fa}else P.show()},$a=function(S,W){if(0===W.length)Ka.getJqUi().hide(),0===S.length?Ia.getJqUi().show():Ia.getJqUi().hide(),Na=S,Ga.setChecked(Ma?!0:Za(S));else{for(var P=!0,ka=[],ya=0;ya<S.length;ya++){var La=S[ya];Ea.search(W,La.getText())&&(P=!1,ka.push(La))}P?(Ga.setChecked(!1),Ia.getJqUi().hide(),Ka.getJqUi().show()):(Ga.setChecked(Ma?!0:Za(ka)),Ia.getJqUi().hide(),Ka.getJqUi().hide());Na=ka}Ya()},Ta=function(){for(var S=[],W=0;W<Fa.length;W++){var P=
Fa[W];P.isChecked()&&S.push(P)}return S},gb=function(){for(var S=[],W=$.trim(Ea.getSearchText()),P=0;P<Fa.length;P++){var ka=Fa[P];Ma&&!ka.isChecked()||S.push(ka)}$a(S,W)},hb=function(S,W){if(W){var P=[];Ma=S.isChecked();Fa.forEach(function(ka){Ma&&!ka.isChecked()||P.push(ka)});S=$.trim(Ea.getSearchText());$a(P,S)}},Za=function(S){for(var W=!0,P=0;P<S.length;P++)if(!S[P].isChecked()){W=!1;break}return W},ib=function(S,W){if(W){var P=S.isChecked();ab().forEach(function(ka){ka.setChecked(P)});Sa();
Ha.keepState();Ha.repaint();Ha.restoreState()}},Sa=function(){var S=Ta().length;S=O.get("selectedCount","\uff08\u5df2\u9009\u62e9#1\u9879\uff09").replace("#1",S);Ra.setText(S)},eb=function(S,W){if(W){S=ab();var P=0;S.forEach(function(ka){ka.isChecked()&&P++});Ga.setChecked(P===S.length)}Sa()},ab=function(){var S=$.trim(Ea.getSearchText());if(0===S.length)return Fa;for(var W=[],P=0;P<Fa.length;P++){var ka=Fa[P];Ea.search(S,ka.getText())&&W.push(ka)}return W}}var ba=this,ja,ua,la=[];this.getJqUi=function(){ja||
za();return ja};this.getDimensionFilterItem=function(){if(!la||0==la.length)return null;var pa=new q;pa.setDimensionKey(G.getDimensionId());for(var X=[],Y=0;Y<la.length;Y++)X.push(la[Y]);pa.setValues(X);return pa};this.getDimensionModel=function(){return G};var za=function(){ja=$("<div class='metric-designer-trial-calculate-dimension-item'>");var pa=$("<div class='metric-designer-trial-calculate-dimension-item-name'>");pa.text(G.getName());pa.attr("title",G.getName());var X=$("<div class='metric-designer-trial-calculate-dimension-value-container'>");
ua=$("<div class='metric-designer-trial-calculate-dimension-value-text'>");ua.text(O.get("allWithBracket","\uff08\u5168\u90e8\uff09"));ua.attr("title",O.get("allWithBracket","\uff08\u5168\u90e8\uff09"));var Y=$("<div class='metric-designer-trial-calculate-dimension-value-btn'>");na.background(Y,"btn_edit");Y.attr("title",O.get("selectDimensionValue","\u9009\u62e9\u7ef4\u5ea6\u503c"));Y.on("click",function(){Pa(ba)});ua.appendTo(X);Y.appendTo(X);ja.append(pa);ja.append(X)};this.updateSelectedDimensionValue=
function(pa){var X=ta[G.getDimensionId()],Y=[],ia=[];pa.forEach(function(ma){Y.push(ma.getValue());ia.push(ma.getText())});la=Y.slice();pa=pa.length===X.length?O.get("allWithBracket","\uff08\u5168\u90e8\uff09"):ia.join(",");ua.text(pa);ua.attr("title",pa)};var va=function(pa){var X=ta[G.getDimensionId()];if(!la.length)return pa.length!==X.length;if(la.length!==pa.length)return!0;for(X=0;X<pa.length;X++)if(-1===la.indexOf(pa[X].getValue()))return!0;return!1},Pa=function(pa){if(ta[G.getDimensionId()])(new A(pa,
ta[G.getDimensionId()],la)).showDialog();else{var X=new ha;X.setModelerModel(d);var Y=new Q(a.getRemoteImpl(),function(ia){ta[G.getDimensionId()]=ia;ia=new A(pa,ia,la);c.is(":visible")&&ia.showDialog()},function(ia){});Y.setBlockingJqUi(c);Y.getMetricDimValues(X.toJsonObject(),G.getDimensionId(),E.getId())}}}function x(){fa.call(this);var G=this.protectedMethod,E=this,A,ba,ja,ua,la=!1,za;(function(){G.setTitle(O.get("previewSet","\u9884\u89c8\u8bbe\u7f6e"));G.setSelectable(!0);G.setContentPaneCreator(function(){E.setSize(440,
330);return va()});G.setFooterPaneCreator(function(X){var Y=new F(O.get("confirm","\u786e\u5b9a"));Y.setHighlight(!0);var ia=Y.getJqUi();ia.addClass("sa-ctrl-dialog-footer-ok");ia.appendTo(X);Y.addActionListener(function(ma){ma=A.getValue();var Aa=ba.getValue();za&&za(la,ma,Aa);G.destroy();return!0});Y=new F(O.get("cancel","\u53d6\u6d88"));Y.setHighlight(!1);ia=Y.getJqUi();ia.addClass("sa-ctrl-dialog-footer-cancel");ia.appendTo(X);Y.addActionListener(function(ma){G.destroy();return!0})});G.setClosingAction(function(X){})})();
this.setOriginExtractCount=function(X){ja=X};this.setOriginPreviewCount=function(X){ua=X};this.setAllData=function(X){la=X};this.setConfirmCallback=function(X){za=X};var va=function(){var X=$("<div>"),Y=$("<div>");Y.text(O.get("extractSet","\u62bd\u53d6\u8bbe\u7f6e"));V.layoutCtrl(Y,30,20,100,24);Y.appendTo(X);Y.css({color:"#333333","line-height":"24px","font-size":"14px"});Y=Pa("extract",O.get("extract","\u62bd\u53d6\u524d"),X);var ia=Y.getJqUi();V.layoutCtrlWithLRTB(ia,60,null,300,60,null,null);
A=new N;var ma=A.getJqUi();A.setConstraint(1,1E4,1);A.setValue(ja);V.layoutCtrlWithLRTB(ma,122,null,100,49,null,null);ma.appendTo(X);ma=$("<div>");ma.text(O.get("rowDataCalculate","\u884c\u6570\u636e\u8ba1\u7b97"));ma.css("color","#666");V.layoutCtrlWithLRTB(ma,170,0);V.layoutCtrlMiddleAlign(ma,22);ma.appendTo(ia);ia=Pa("extractAll",O.get("all","\u5168\u91cf"),X);ma=ia.getJqUi();V.layoutCtrlWithLRTB(ma,60,null,300,90,null,null);var Aa=$("<div>");na.background(Aa,"warning");Aa.attr("title",O.get("extractAllWarn",
"\u62bd\u53d6\u5168\u91cf\u6570\u636e\u8ba1\u7b97\u65f6\uff0c\u4f1a\u589e\u52a0\u6570\u636e\u9884\u89c8\u7684\u65f6\u957f\uff0c\u589e\u52a0\u670d\u52a1\u5668\u538b\u529b\uff0c\n\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7cfb\u7edf\u5d29\u6e83\uff0c\u56e0\u6b64\u63a8\u8350\u62bd\u53d6\u90e8\u5206\u6570\u636e\u3002"));V.layoutCtrlWithLRTB(Aa,110,null,20,80,null,20);Aa.appendTo(X);ma=new B;ma.addElement(Y);ma.addElement(ia);ma.addChangedListener(function(Ja,Ea){Ea&&("extract"==Ja.getUserObject()?(la=!1,A.setEnabled(!0),
Aa.hide()):(la=!0,A.setEnabled(!1),Aa.show()))});la?(pa(ma,"extractAll"),A.setEnabled(!1),Aa.show()):(pa(ma,"extract"),A.setEnabled(!0),Aa.hide());Y=$("<div>");Y.text(O.get("dataPreview","\u6570\u636e\u9884\u89c8"));V.layoutCtrl(Y,30,115,100,24);Y.appendTo(X);Y.css({color:"#333333","line-height":"24px","font-size":"14px"});var Ca=Pa("dataPreview",O.get("previewResult","\u9884\u89c8\u8ba1\u7b97\u7ed3\u679c\u7684\u524d"),X);Ca.setChecked(!0);Ca.addCheckedListener(function(){Ca.setChecked(!0)});Y=Ca.getJqUi();
V.layoutCtrlWithLRTB(Y,60,null,300,155,null,null);ba=new N;ia=ba.getJqUi();ba.setConstraint(1,1E3,1);ba.setValue(ua);V.layoutCtrlWithLRTB(ia,180,null,100,144,null,null);ia.appendTo(X);ia=$("<div>");ia.text(O.get("rowData","\u884c\u6570\u636e"));ia.css("color","#666");V.layoutCtrlWithLRTB(ia,230,0);V.layoutCtrlMiddleAlign(ia,22);ia.appendTo(Y);return X},Pa=function(X,Y,ia){var ma=new r;ma.setUserObject(X);ma.setText(Y);X=ma.getJqUi();ia.append(X);return ma},pa=function(X,Y){X.toCheckTheElement(function(ia){return ia.getUserObject()===
Y})}}fa.call(this);var e=this,g=this.protectedMethod,c,b,k,a,d,p,H,u=[],f,w,L,R,qa=!1,ea=100,wa=100,ra,ta=[];(function(){e.setSize(900,675);g.setSelectable(!0);g.getDialogCtrl().setFullScreenEnabled();g.getDialogCtrl().addResizeListener(function(){R&&R.relayoutViews()});g.setContentPaneCreator(function(){g.setTitle(p);c=$("<div>");f?f(function(G){G=G.modeler;var E=new ha;E.fromJsonObject(G);var A=new Q(a.getRemoteImpl(),function(ba){var ja=new v;ja.fromJsonObject(ba);ja&&ja.isValid()?(d=E.getModelerModel(),
u=d.getAllDimension(),bb(c,!0)):kb(c)});A.setShowBlocking(!0);A.checkModelerValid(G)}):bb(c,!1);return c});g.setFooterPaneCreator(function(G){var E=new F(O.get("close","\u5173\u95ed"));E.setHighlight(!0);var A=E.getJqUi();A.addClass("sa-ctrl-dialog-footer-ok");A.appendTo(G);V.layoutCtrl(A,"calc(50% - 60px)",null,null,null);E.addActionListener(function(ba){g.destroy();return!0})});g.setClosingAction(function(G){})})();this.setMetric=function(G){k=G};this.setTitle=function(G){p=G};this.setGlobal=function(G){a=
G};this.setButtonName=function(G){H=G};this.setFunLoadModelerInfo=function(G){f=G};this.setFunEntryDesignerFromMainPage=function(G){w=G};this.setModeler=function(G){d=G;u=G.getAllDimension()};var Da=function(G){var E=$("<div class='metric-designer-trial-calculate-property-title'>"),A=$("<div>");A.appendTo(E);V.layoutCtrlWithLRTB(A,0,0,null,2,2,null);A.css("border-left","3px solid #5582f3");A=$("<div>");A.text(G);V.layoutCtrl(A,10,null,200,null);V.layoutCtrlMiddleAlign(A,16);A.appendTo(E);A.css({"font-weight":"bold",
color:"#666"});return E},Qa=function(G){ra=[];for(var E=$(document.createDocumentFragment()),A=0;A<u.length;A++){var ba=new l(u[A],k);ba.getJqUi().appendTo(E);ra.push(ba)}E.appendTo(G)},Wa=function(){if(!ra||0==ra.length)return null;for(var G=[],E=0;E<ra.length;E++){var A=ra[E].getDimensionFilterItem();A&&G.push(A.toJsonObject())}return G},bb=function(G,E){if(!E){var A;E=oa.MetricStateMonitor.getInvalidDimensionMap();var ba=oa.MetricStateMonitor.getInvalidPublicDimensionMap();0!==Object.keys(E).length?
A=O.get("dimensionException","\u7ef4\u5ea6\u5f02\u5e38\uff0c\u65e0\u6cd5\u8fdb\u884c\u6307\u6807\u8bd5\u8ba1\u7b97"):0!==Object.keys(ba).length?A=O.get("publicDimensionException","\u516c\u5171\u7ef4\u5ea6\u8bbe\u7f6e\u4e0d\u5b8c\u6574\uff0c\u65e0\u6cd5\u8fdb\u884c\u8bd5\u8ba1\u7b97"):oa.MetricStateMonitor.getInvalidPrompt(k.getId())?A=O.get("metricException","\u6307\u6807\u5f02\u5e38\uff0c\u65e0\u6cd5\u8fdb\u884c\u6307\u6807\u8bd5\u8ba1\u7b97"):0<lb().length&&(A=O.get("metricException","\u6307\u6807\u5f02\u5e38\uff0c\u65e0\u6cd5\u8fdb\u884c\u6307\u6807\u8bd5\u8ba1\u7b97"));
if(A){E=new M;E.setType(M.TYPE_NO_DATA_WITH_CLOUD);E.setText(A);A=E.getJqUi();G.append(A);return}}A=$("<div class='metric-designer-trial-calculate-metric-icon'>");na.background(A,"metric_icon");E=$("<div class='metric-designer-trial-calculate-metric-info'>");E.text(k.getName());A.appendTo(G);E.appendTo(G);E=$("<div class='metric-designer-trial-calculate-dimension-filter-container'>");E.appendTo(G);Da(O.get("dimensionFilter","\u7ef4\u5ea6\u8fc7\u6ee4")).appendTo(E);A=0;u&&0<u.length?(A=Math.min(68*
Math.ceil(u.length/3)+44,180),ba=$("<div class='metric-designer-trial-calculate-dimension-list'>"),Qa(ba),ba.appendTo(E)):(A=86,ba=$("<div class='metric-designer-trial-calculate-no-dimension-tips'>"),ba.text(O.get("noDimension","\u6682\u672a\u6dfb\u52a0\u7ef4\u5ea6")),ba.attr("title",O.get("noDimension","\u6682\u672a\u6dfb\u52a0\u7ef4\u5ea6")),ba.appendTo(E));V.layoutCtrlWithLRTB(E,0,0,null,47,null,A);E=$("<div>");V.layoutCtrlWithLRTB(E,0,0,null,A+32+15+2,0,null);A=$("<div class='metric-designer-trial-calculate-button'>");
A.text(H);A.attr("title",H);A.on("click",function(){Ua(!1);Va();m.occur(m.BUTTON_TYPE,m.TRIAL_CALCULATE)});A.appendTo(E);mb(E);E.appendTo(G)},lb=function(){for(var G=oa.MetricStateMonitor.getInvalidTableMap(),E=[],A=Object.keys(G),ba=0;ba<A.length;ba++){var ja=A[ba];G[A[ba]]&&E.push(ja)}return E},kb=function(G){var E=new M;E.setType(M.TYPE_NO_DATA_WITH_CLOUD);E.setText(O.get("metricError","\u6307\u6807\u5f02\u5e38\uff0c\u65e0\u6cd5\u67e5\u770b\u6307\u6807\u6570\u636e"));E=E.getJqUi();var A=$("<div class='metric-designer-trial-calculate-entry-designer'>");
A.text(O.get("enterDesigner","\u8fdb\u5165\u8bbe\u8ba1\u5668"));A.on("click",function(){w&&w()});var ba=$("<span class='metric-designer-trial-calculate-view-exception-reason'>");ba.text(O.get("viewExceptionReason","\u67e5\u770b\u5f02\u5e38\u539f\u56e0"));A.append(ba);E.append(A);G.append(E)},mb=function(G){var E=Da(O.get("resultPreview","\u7ed3\u679c\u9884\u89c8"));E.css("top","51px");var A=$("<div class='metric-designer-trial-calculate-result-preview-setting'>"),ba=$("<div class='metric-designer-trial-calculate-result-preview-setting-text'>");
cb(ba);var ja=$("<div class='metric-designer-trial-calculate-result-preview-setting-btn'>");ja.attr("title",O.get("previewSet","\u9884\u89c8\u8bbe\u7f6e"));ja.on("click",function(){nb(ba)});na.backgroundWithHover(ja,"setting");A.append(ja);A.append(ba);G.append(E);G.append(A);ob(G);pb(G)},pb=function(G){var E=$("<div class='metric-data-calculate-preview-mask'>"),A=$("<div>");A.text(O.get("refreshPreviewData","\u7f16\u8f91\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u6b64\u5904\u5237\u65b0\u9884\u89c8\u6570\u636e\u3002"));
A.addClass("metric-data-calculate-mask-text");A.on("click",function(){Ua(!1);Va()});E.hide();A.appendTo(E);E.appendTo(G)},Ua=function(G){if(L){var E=c.find(".metric-data-calculate-preview-mask");G?E.show():E.hide()}},ob=function(G){var E=$("<div class='metric-designer-trial-calculate-result-table'>");R=Z.createTable();R.setColumnFitVisibleWidth(!1);R.setAutoAdjustRowHeight(!0);var A=$(R.getUI());V.layoutCtrlWithLRTB(A,0,0,"100%",5,1<Math.ceil(u.length/3)?0:5,null);E.append(A);G.append(E)},db=function(){if(L){Z.clear(R);
var G=L.getColumnCount();R.addColumns(G);for(var E=Z.createHeadRow(R),A=0;A<G;A++){var ba=E.getCell(A);R.getColumn(A).setWidth(120);var ja=L.getField(A).getAlias();ba.setValue(ja?ja:L.getField(A).getName())}G=L.getRowCount();b&&b.remove();if(0===G)Z.refresh(R),b=$("<div class='metric-designer-trial-calculate-no-result'>"),b.text(O.get("calculateNoResult","\u6ca1\u6709\u6570\u636e")),$(R.getUI()).append(b);else{A=new h(R);A.setOutsideVisible(!1);R.setCellRender(A);E=new KTBorderStyle;E.setBottomBorderWidth(1);
E.setBottomBorderPen("solid");E.setBottomBorderColor("#e5e5e5");for(A=0;A<G;A++)ba=L.getOneRow(A),ja=Z.createRow(R,!1),ja.setBorder(E),ja.setUserObject(ba);Z.refresh(R)}}},Va=function(){var G=new J;qa?G.setExtractAllData(wa):G.setExtractPartlyData(ea,wa);var E=new ha;E.setModelerModel(d);var A=new Q(a.getRemoteImpl(),function(ba){L=new xa;L.fromJsonObject(ba);db()},function(ba){db()});A.setBlockingJqUi(c);A.previewMetrics(E.toJsonObject(),Wa(),G.toJsonObject(),k.getId())},nb=function(G){var E=new x;
E.setOriginExtractCount(ea);E.setOriginPreviewCount(wa);E.setAllData(qa);E.setConfirmCallback(function(A,ba,ja){qa=A;ea=ba;wa=ja;cb(G);Va()});E.showDialog()},cb=function(G){var E=qa?O.get("extractAllData","\u62bd\u53d6\u5168\u91cf\u6570\u636e\u8fdb\u884c\u8ba1\u7b97, "):O.get("onlyExtractSomeRows","\u4ec5\u62bd\u53d6\u524d#1\u884c\u8fdb\u884c\u8ba1\u7b97, ").replace("#1",ea);E+=O.get("previewRows","\u663e\u793a\u8ba1\u7b97\u7ed3\u679c\u7684\u524d#1\u884c\u6570\u636e").replace("#1",wa);G.text(E);G.attr("title",
E)}};var O,V,aa,U,fa,F,N,B,r,D,n,z,t,T,Z,Q,na,J,sa,ha,xa,q,v,m;(function(){var h=com.kingdee.bos.qing.framework.common;O=h.MultilanguageManager.createPackageAccessor(com.kingdee.bos.qing.modeler.designer);h=com.kingdee.bos.qing.common;V=h.DomUtil;aa=h.DateFormater;U=h.NumberFormater;h=com.kingdee.bos.qing.ui.component;fa=h.AbstractModalDialog;F=h.Button;N=h.Spinner;B=h.RadioButtonGroup;r=h.RadioButton;D=h.SearchBox;n=h.CheckBox;z=h.ComboBox;t=h.Label;T=h.DynamicScroller;h=com.kingdee.bos.qing.common.ui;
Z=h.TableUtil;h=com.kingdee.bos.qing.modeler.designer;Q=h.DesignerFacade;na=h.Icons;J=h.PreviewConfig;ha=h.QingModeler;xa=h.PreviewData;m=h.UserOperationReporter;h=com.kingdee.bos.qing.modeler.designer.metricdesigner;v=h.ModelerValidity;q=h.DimensionFilterItem;sa=h.Dimension})();M.TYPE_TEXT="text";M.TYPE_NO_SOURCE="noSource";M.TYPE_NO_SEARCH_RESULT="noSearchResult";M.TYPE_NO_DATA_WITH_CLOUD="noDataWithCloud"})();
//qingVersionTag: 20250415