var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,c,a){b instanceof String&&(b=String(b));for(var g=b.length,f=0;f<g;f++){var d=b[f];if(c.call(a,d,f,b))return{i:f,v:d}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(b==Array.prototype||b==Object.prototype)return b;b[c]=a.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<b.length;++c){var a=b[c];if(a&&a.Math==Math)return a}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(b,c){var a=$jscomp.propertyToPolyfillSymbol[c];if(null==a)return b[c];a=b[a];return void 0!==a?a:b[c]};
$jscomp.polyfill=function(b,c,a,g){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,c,a,g):$jscomp.polyfillUnisolated(b,c,a,g))};$jscomp.polyfillUnisolated=function(b,c,a,g){a=$jscomp.global;b=b.split(".");for(g=0;g<b.length-1;g++){var f=b[g];if(!(f in a))return;a=a[f]}b=b[b.length-1];g=a[b];c=c(g);c!=g&&null!=c&&$jscomp.defineProperty(a,b,{configurable:!0,writable:!0,value:c})};
$jscomp.polyfillIsolated=function(b,c,a,g){var f=b.split(".");b=1===f.length;g=f[0];g=!b&&g in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var d=0;d<f.length-1;d++){var e=f[d];if(!(e in g))return;g=g[e]}f=f[f.length-1];a=$jscomp.IS_SYMBOL_NATIVE&&"es6"===a?g[f]:null;c=c(a);null!=c&&(b?$jscomp.defineProperty($jscomp.polyfills,f,{configurable:!0,writable:!0,value:c}):c!==a&&(void 0===$jscomp.propertyToPolyfillSymbol[f]&&(a=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[f]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(f):$jscomp.POLYFILL_PREFIX+a+"$"+f),$jscomp.defineProperty(g,$jscomp.propertyToPolyfillSymbol[f],{configurable:!0,writable:!0,value:c})))};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(c,a){return $jscomp.findInternal(this,c,a).v}},"es6","es3");
(function(b){b(window).load(function(c){b("table#viewTable").treeExp()});b.fn.lvlctl=function(){return this.find(".lvlctl")};b.fn.getLvl2=function(){var c=this.lvlctl().attr("lvl");return parseInt(c||"-1",10)};b.fn.treeExp=function(c){var a={sFetching:"fetching",sFetched:"fetched",sCollapsed:"collapsed",sExpanded:"expanded",sNoSub:"nosub",sSTreeUrl:"",sSTreeUFn:"h_child_search_jsp",sTPlusImg:"",sTMinusImg:"",sTLeafImg:"",sTPlusFn:"h_img_collapsed",sTMinusFn:"h_img_expanded",sTLeafFn:"h_img_nosub"};
b.extend(a,b.hybs.defaults);var g=function(d,e){var p;var t=!0;var u={bForceExp:!1,bHeaderFix:!0};b.extend(u,e||{});a.sTPlusImg||(a.sTPlusImg=b.hybs.getHValue(a.sTPlusFn));a.sTMinusImg||(a.sTMinusImg=b.hybs.getHValue(a.sTMinusFn));a.sTLeafImg||(a.sTLeafImg=b.hybs.getHValue(a.sTLeafFn));var m=b.hybs.getHybsTr(d.parents("tr:first"));m.is("tr");var v=d.parents("table:first");if(!d.hasClass(a.sFetching)&&!d.hasClass(a.sNoSub))if(d.hasClass(a.sFetched)){if(e=d.hasClass(a.sExpanded),!e||!u.bForceExp){var l=
m.next();var y=m.getLvl2();for(nCloseLvl=p=Math.floor(Number.MAX_VALUE);l[0];){nRunLvl=l.getLvl2();if(y>=nRunLvl)break;e?l.hide():(l.lvlctl().hasClass(a.sCollapsed)?nCloseLvl>nRunLvl&&(nCloseLvl=nRunLvl):nCloseLvl>=nRunLvl&&(nCloseLvl=p),nCloseLvl>=nRunLvl&&l.show());var q=!0;l=l.next()}e?q&&(d.removeClass(a.sExpanded).addClass(a.sCollapsed),d.attr("src",a.sTPlusImg)):(d.removeClass(a.sCollapsed).addClass(a.sExpanded),d.attr("src",a.sTMinusImg));u.bHeaderFix&&v.resizeView()}}else if(q=a.sSTreeUrl,
!q&&a.sSTreeUFn&&(q=b.hybs.getHValue(a.sSTreeUFn)),q){var r={};if(e=d.attr("vals")){var w=(l=d.attr("keys"))?l.split(","):[];var z=w.length;b.each(e.split(","),function(h,k){r[h<z?w[h]:"key"+h]=k});e={};r[a.sHybsSel]||(e[a.sHybsSel]=m.attr(a.sHybsRid));r[a.sHybsCmd]||(e[a.sHybsCmd]="NEW");r[a.sNoTsKey]||(e[a.sNoTsKey]="true");b.extend(r,e)}b.ajax({url:q,data:r,type:"POST",async:!1,error:function(h,k,n){t=!1;b.hybs.ogLog(k+"\n"+h.responseText);b.hybs.ogAlert(k+"<br/>"+h.responseText)},success:function(h){var k;
h=/(<tbody[^>]*>[\S\s]*<\/tbody>)/m.exec(h);var n="";h&&(n=b.trim(h[1]));if(n){h=m.next();d.removeClass(a.sFetching+" "+a.sCollapsed).addClass(a.sFetched+" "+a.sExpanded);m.after(n);d.attr("src",a.sTMinusImg);n=b.hybs.getNoColId(v);var x=["row_0","row_1","row_hilight"];var B=b.grep(x,function(A){return m.hasClass(A)})[0];for(k=m.next();k[0]&&k[0]!=h[0];)k.lvlctl().addClass(a.sCollapsed),k.removeClass(x.join(" ")).addClass(B),0<=n&&k.find("td:nth("+n+")").empty(),k=k.next()}else d.attr("src",a.sTLeafImg),
d.removeClass(a.sCollapsed).addClass(a.sFetched+" "+a.sExpanded+" "+a.sNoSub);u.bHeaderFix&&v.resizeView()}})}else b.hybs.ogAlert("URL is not sepcified!"),t=!1;return t};var f=function(d){var e;var p=b.hybs.getHybsTr(d.parents("tr:first"));var t=p.getLvl2();for(e=p;g(d,{bForceExp:!0,bHeaderFix:!1});){e=e.next();if(0==e.size())break;if(t>=e.getLvl2())break;d=e.lvlctl()}p.parents("table:first").resizeView()};return this.each(function(){b(this).click(function(d){var e=b(d.target);e.is(".lvlctl")&&(d.shiftKey?
f(e):g(e))})})}})(jQuery);
