# files

name: jquery.sheet.min.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\jquery.sheet.min.js
mime: unavailable
content:
var jQuery=window.jQuery||{};var Sheet=(function(i,n,k,m,o,l,g,c,q,j){var h=h||{};h.ActionUI=(function(r,u,s,t,v){var w=function(E,K,B,F,y,M){this.enclosure=E;this.pane=K;this.sheet=B;this.max=M;this.xIndex=0;this.yIndex=0;this.scrollAxis={x:{},y:{}};this.scrollSize={};this.hiddenColumns=[];this.hiddenRows=[];if(!(this.frozenAt=y)){this.frozenAt={row:0,col:0}}this.frozenAt.row=s.max(this.frozenAt.row,0);this.frozenAt.col=s.max(this.frozenAt.col,0);this.scrolledArea={start:{row:s.max(this.frozenAt.row,1),col:s.max(this.frozenAt.col,1)},end:{row:s.max(this.frozenAt.row,1),col:s.max(this.frozenAt.col,1)}};if(h.ActionUI.prototype.nthCss===null){if(M){h.ActionUI.prototype.nthCss=function(R,Y,T,V,U){var W=[],S=T.length,X=this.repeat;U=U||"{display: none;}";do{if(T[S]>V){W.push(Y+" "+R+":first-child"+X("+"+R,T[S]-1))}}while(S--);if(W.length){return W.join(",")+U}return""}}else{h.ActionUI.prototype.nthCss=function(R,X,T,V,U){var W=[],S=T.length;U=U||"{display: none;}";do{if(T[S]>V){W.push(X+" "+R+":nth-child("+T[S]+")")}}while(S--);if(W.length){return W.join(",")+U}return""}}}var D=this,H="#"+B.getAttribute("id"),P=this.scrollUI=K.scrollOuter=r.createElement("div"),O=K.scrollInner=r.createElement("div"),A=K.scrollStyleX=this.scrollStyleX=new h.StyleUpdater(function(R,S){R=R||[];if(R.length!==D.xIndex||S){D.xIndex=R.length||D.xIndex;S=S||C("col",H,R,D.frozenAt.col+1)+C("td",H+" tr",R,D.frozenAt.col+1);this.setStyle(S);if(R.length){D.scrolledArea.start.col=s.max(R.pop()||1,1);D.scrolledArea.end.col=s.max(R.shift()||1,1)}return true}return false}),z=K.scrollStyleY=this.scrollStyleY=new h.StyleUpdater(function(R,S){R=R||[];if(R.length!==D.yIndex||S){D.yIndex=R.length||D.yIndex;S=S||C("tr",H,R,D.frozenAt.row+1);this.setStyle(S);if(R.length){D.scrolledArea.start.row=s.max(R.pop()||1,1);D.scrolledArea.end.row=s.max(R.shift()||1,1)}return true}return false}),C=this.nthCss;P.setAttribute("class",F);P.appendChild(O);v(P).disableSelectionSpecial();K.appendChild(A.styleElement);K.appendChild(z.styleElement);var N,Q,J,I,G,L,x=B.tBody.children[0];K.resizeScroll=function(R){if(R){N=A.getStyle();Q=z.getStyle()}else{N=(B.clientWidth<=E.clientWidth?"":A.getStyle());Q=(B.clientHeight<=E.clientHeight?"":z.getStyle())}A.update(null," ");z.update(null," ");J=(x.clientWidth||B.clientWidth)+"px";I=B.clientHeight+"px";G=E.clientWidth+"px";L=E.clientHeight+"px";O.style.width=J;O.style.height=I;P.style.width=G;P.style.height=L;D.scrollStart("x");D.scrollStart("y");A.update(null,N);z.update(null,Q);if(K.inPlaceEdit){K.inPlaceEdit.goToTd()}};new MouseWheel(K,P)};w.prototype={putTdInView:function(E){var A=0,z=0,D=0,C,B;this.xIndex=0;this.yIndex=0;while((C=this.directionToSeeTd(E))!==null){B=this.scrolledArea.end;if(C.left){z--;this.scrollTo({axis:"x",value:B.col-1})}else{if(C.right){z++;this.scrollTo({axis:"x",value:B.col+1})}}if(C.up){D--;this.scrollTo({axis:"y",value:B.row-1})}else{if(C.down){D++;this.scrollTo({axis:"y",value:B.row+1})}}A++;if(A<25){break}}this.scrollStop()},directionToSeeTd:function(y){var x=this.pane,H={top:0,bottom:x.clientHeight,left:0,right:x.clientWidth},D=y.clientWidth,B=y.clientHeight,F={top:y.offsetTop,bottom:y.offsetTop+B,left:y.offsetLeft,right:y.offsetLeft+D},z=y.parentNode,E=this.scrolledArea.end;if(!y.col){return null}var G=y.barTop.cellIndex<E.col,A=z.rowIndex<E.row,C={up:A,down:F.bottom>H.bottom&&B<=x.clientHeight,left:G,right:F.right>H.right&&D<=x.clientWidth};if(C.up||C.down||C.left||C.right){return C}return null},repeat:function(z,y){var x="";while(y>0){if(y&1){x+=z}y>>=1;z+=z}return x},nthCss:null,redraw:function(){var x=this.pane.style;x.opacity=0.9999;setTimeout(function(){x.opacity=1},0)},hide:function(y,F,I,A){var D=this,E="#"+this.sheet.getAttribute("id"),H=this.toggleHideStyleX=new h.StyleUpdater(function(){var J=x("col",E,D.hiddenColumns,0)+x("td",E+" tr",D.hiddenColumns,0);this.setStyle(J)}),G=this.toggleHideStyleY=new h.StyleUpdater(function(){var J=x("tr",E,D.hiddenRows,0);this.setStyle(J)}),C,B,x=this.nthCss,z=this.pane;z.appendChild(H.styleElement);z.appendChild(G.styleElement);this.hiddenRows=[];this.hiddenColumns=[];if(y){C=y.length-1;if(C>-1){do{B=y[C];this.toggleHideRow(I[B],B)}while(C--)}}if(F){C=F.length-1;if(C>-1){do{B=F[C];this.toggleHideColumn(A[B],B)}while(C--)}}},remove:function(){},scrollStart:function(C){var D=this.pane,A=D.scrollOuter,B=this.scrollAxis[C],z=this.scrollSize=this.sheet.size();B.v=[];B.name=C;switch(C||"x"){case"x":B.value=0;B.max=z.cols;B.min=0;B.size=z.cols;D.scrollStyleX.update();B.scrollStyle=D.scrollStyleX;B.area=A.scrollWidth-A.clientWidth;B.sheetArea=D.table.clientWidth-D.table.corner.clientWidth;B.scrollUpdate=function(){A.scrollLeft=(B.value)*(B.area/B.size)};B.gridSize=100/B.size;break;case"y":B.value=0;B.max=z.rows;B.min=0;B.size=z.rows;D.scrollStyleY.update();B.scrollStyle=D.scrollStyleY;B.area=A.scrollHeight-A.clientHeight;B.sheetArea=D.table.clientHeight-D.table.corner.clientHeight;B.scrollUpdate=function(){A.scrollTop=(B.value)*(B.area/B.size)};B.gridSize=100/B.size;break}var y=B.max;do{var x=new t(B.gridSize*y);x.index=y+1;B.v.unshift(x)}while(y--)},scrollTo:function(A){A=A||{};A.axis=A.axis||"x";A.value=A.value||0;A.pixel=A.pixel||0;if(!this.scrollAxis){this.scrollStart(A.axis)}var z=this.scrollAxis[A.axis];if(!A.value){A.value=f.closest(z.v,s.abs(A.pixel/z.area)*100,z.min).index}A.max=A.max||z.max;var y=((A.value>A.max?A.max:A.value)-z.min),x=[];if(y>=0){do{x.push(y+z.min)}while(y-->0)}z.value=A.value;if(x.length){if(z.scrollStyle){return z.scrollStyle.update(x)}}else{if(z.scrollStyle){return z.scrollStyle.update()}}return false},scrollStop:function(){if(this.scrollAxis.x.scrollUpdate){this.scrollAxis.x.scrollUpdate()}if(this.scrollAxis.y.scrollUpdate){this.scrollAxis.y.scrollUpdate()}},toggleHideRow:function(z,y){var x=v(z);y=s.max(y+1,1);if(x.length&&v.inArray(y,this.hiddenRows)<0){this.hiddenRows.push(y)}else{this.hiddenRows.splice(this.hiddenRows.indexOf(y),1)}this.toggleHideStyleY.update()},rowShowAll:function(){v.each(this.hiddenRows||[],function(x){v(this).removeData("hidden")});this.toggleHideStyleY.setStyle("");this.hiddenRows=[]},toggleHideColumn:function(x,y){var z=v(x);y=s.max(y+1,1);if(z.length&&v.inArray(y,this.hiddenColumns)<0){this.hiddenColumns.push(y)}else{this.hiddenColumns.splice(this.hiddenColumns.indexOf(y),1)}this.toggleHideStyleX.update()},columnShowAll:function(){this.toggleHideStyleX.setStyle("");this.hiddenColumns=[]}};return w})(n,k,c,l,i);h.StyleUpdater=(function(r){function s(t){var u=this.styleElement=r.createElement("style");u.styleUpdater=this;this.update=t}if(r.createElement("style").styleSheet){s.prototype={setStyle:function(u){var v=this.styleElement,t=v.styleSheet;t.disabled=false;if(!t.disabled){t.cssText=u}},getStyle:function(){var u=this.styleElement,t=u.styleSheet;t.disabled=false;if(!t.disabled){return t.cssText}return""}}}else{s.prototype={setStyle:function(t){this.styleElement.innerHTML=t},getStyle:function(){return this.styleElement.innerHTML}}}return s})(n);i.fn.extend({sheet:function(s){var t=isNaN,r=i.sheet.events;s=s||{};i(this).each(function(){var A=Globalize,x=i(this),z={editable:true,editableNames:true,barMenus:true,freezableCells:true,allowToggleState:true,menuLeft:null,menuRight:null,newColumnWidth:120,title:null,calcOff:false,lockFormulas:false,parent:x,colMargin:18,boxModelCorrection:2,formulaFunctions:{},formulaVariables:{},cellSelectModel:"excel",autoAddCells:true,resizableCells:true,resizableSheet:true,autoFiller:true,minSize:{rows:1,cols:1},error:function(B){return B.error},endOfNumber:false,encode:function(B){switch(typeof B){case"object":if(B.getMonth){return A.format(B,"d")}return B}if(!B){return B||""}if(!B.replace){return B||""}return B.replace(/&/gi,"&amp;").replace(/>/gi,"&gt;").replace(/</gi,"&lt;").replace(/\n/g,"\n<br>").replace(/\t/g,"&nbsp;&nbsp;&nbsp ").replace(/  /g,"&nbsp; ")},frozenAt:[],contextmenuTop:{"Toggle freeze columns to here":function(D){var B=D.getTdLocation(D.obj.tdActive()).col,C=D.obj.pane().actionUI;C.frozenAt.col=(C.frozenAt.col==B?0:B)},"Insert column after":function(B){B.controlFactory.addColumn(B.colLast);return false},"Insert column before":function(B){B.controlFactory.addColumn(B.colLast,true);return false},"Add column to end":function(B){B.controlFactory.addColumn();return false},"Delete this column":function(B){B.deleteColumn();return false},"Hide column":function(B){B.toggleHideColumn();return false}},contextmenuLeft:{"Toggle freeze rows to here":function(C){var D=C.getTdLocation(C.obj.tdActive()).row,B=C.obj.pane().actionUI;B.frozenAt.row=(B.frozenAt.row==D?0:D)},"Insert row after":function(B){B.controlFactory.addRow(B.rowLast);return false},"Insert row before":function(B){B.controlFactory.addRow(B.rowLast,true);return false},"Add row to end":function(B){B.controlFactory.addRow();return false},"Delete this row":function(B){B.deleteRow();return false},"Hide row":function(B){B.toggleHide.row();return false}},contextmenuCell:{Copy:false,Cut:false,"Insert column after":function(B){B.controlFactory.addColumn(B.colLast);return false},"Insert column before":function(B){B.controlFactory.addColumn(B.colLast,true);return false},"Add column to end":function(B){B.controlFactory.addColumn();return false},"Delete this column":function(B){B.deleteColumn();return false},line1:"line","Insert row after":function(B){B.controlFactory.addRow(B.rowLast);return false},"Insert row before":function(B){B.controlFactory.addRow(B.rowLast,true);return false},"Add row to end":function(B){B.controlFactory.addRow();return false},"Delete this row":function(B){B.deleteRow();return false},line2:"line","Add spreadsheet":function(B){B.addSheet()},"Delete spreadsheet":function(B){B.deleteSheet()}},hiddenRows:[],hiddenColumns:[],cellStartingHandlers:{"$":function(C,B){return e.DOLLAR.call(this,C.substring(1).replace(A.culture().numberFormat[","],""),2,B||"$")},"Â£":function(B){return y.s.cellStartingHandlers["$"].call(this,B,"Â£")}},cellEndHandlers:{"%":function(B){return B.substring(0,this.value.length-1)/100}},cellTypeHandlers:{percent:function(D){var C=(t(D)?A.parseFloat(D):D*1),B;if(!t(C)){B=new l(C);B.html=A.format(C,"p");return B}return D},date:function(C){var B=A.parseDate(C);B.html=A.format(B,"d");return B},time:function(C){var B=A.parseDate(C);B.html=A.format(B,"t");return B},currency:function(D){var C=(t(D)?A.parseFloat(D):D*1),B;if(!t(C)){B=new l(C);B.html=A.format(C,"c");return B}return D},number:function(D){var C,B;if(!s.endOfNumber){C=A.culture().numberFormat["."];s.endOfNumber=new q("(["+(C=="."?".":C)+"])([0-9]*?[1-9]+)?(0)*$")}if(!t(D)){B=new l(D);B.html=A.format(D+"","n10").replace(s.endOfNumber,function(G,F,E){return(E?F:"")+(E||"")});return B}return D}},alert:function(B){alert(B)},prompt:function(C,D,B){D(prompt(C,B))},confirm:function(D,B,C){if(confirm(D)){B()}else{if(C){C()}}},initCalcRows:40,initCalcCols:20};var y=this.jS;if(y){var v=x.children().detach();y.kill();x.html(v);for(var w in r){if(s[r[w]]){x.unbind(r[w])}}}if((this.className||"").match(/\bnotEditable\b/i)!=null){s.editable=false}for(var u in r){if(s[r[u]]){x.bind(r[u],s[r[u]])}}if(!i.sheet.instance.length){i.sheet.instance=[]}this.jS=y=i.sheet.createInstance(i.extend(z,s),i.sheet.instance.length);i.sheet.instance.push(y)});return this},disableSelectionSpecial:function(){this.each(function(){this.onselectstart=function(){return false};this.unselectable="on";this.style["-moz-user-select"]="none"});return this},getSheet:function(){var r=this[0],s=(r.jS||{});return s},getCellValue:function(w,s,r){var t=this[0],u=(t.jS||{});r=(r||0);if(u.updateCellValue){try{return u.updateCellValue(r,w,s)}catch(v){}}return null},setCellValue:function(w,y,t,s){var u=this[0],v=(u.jS||{}),r;s=(s||0);if(v.getCell&&(r=v.getCell(y,t,s))){try{if((w+"").charAt(0)=="="){r.valueOverride=r.value="";r.formula=w.substring(1)}else{r.value=w;r.valueOverride=r.formula=""}r.calcLast=r.calcDependenciesLast=0;v.updateCellValue.call(r);v.updateCellDependencies.call(r);return true}catch(x){}}return false},setCellFormula:function(y,x,t,s){var u=this[0],v=(u.jS||{}),r;s=(s||0);if(v.getCell&&(r=v.getCell(x,t,s))){try{r.formula=y;r.valueOverride=r.value="";r.calcLast=r.calcDependenciesLast=0;v.updateCellValue(s,x,t)}catch(w){}}return this},setCellHtml:function(u,y,t,s){var v=this[0],w=(v.jS||{}),r;s=(s||0);if(w.getCell&&(r=w.getCell(y,t,s))){try{r.html=[u];r.calcLast=r.calcDependenciesLast=0;w.updateCellValue(s,y,t)}catch(x){}}return this},isSheetFullScreen:function(){var r=this[0],s=(r.jS||{});if(s.obj){return s.obj.fullScreen().is(":visible")}return false},serializeCellInputs:function(s){var t=this[0],u=(t.jS||{}),r=u.obj.tables().find(":input");if(s){return r.serializeArray()}else{return r.serialize()}},viewSource:function(r){var s="";i(this).each(function(){if(r){s+=i(this).toPrettySource()}else{s+=i(this).toCompactSource()}});i.print(s);return s},toCompactSource:function(){var v=this[0];var s="";if(v.nodeType==1){s+="<"+v.tagName.toLowerCase();var x=v.attributes.length;for(var u=0;u<x;u++){var t=v.attributes[u].name,w=v.getAttribute(t);if(w){if(t=="contentEditable"&&w=="inherit"){continue}if(typeof(w)=="string"){s+=" "+t+'="'+w.replace(/"/g,"'")+'"'}else{if(t=="style"&&w.cssText){s+=' style="'+w.cssText+'"'}}}}if(v.tagName=="COL"){s+="/>"}else{s+=">";var r="";i(v.childNodes).each(function(){r+=i(this).toCompactSource()});s+=r;s+="</"+v.tagName.toLowerCase()+">"}}else{if(v.nodeType==3){s+=v.data.replace(/^\s*(.*)\s*$/g,"$1")}}return s},toPrettySource:function(w){var v=this[0],y,u;w=w||"";var s="";if(v.nodeType==1){s+="\n"+w+"<"+v.tagName.toLowerCase();y=v.attributes.length;for(u=0;u<y;u++){var t=v.attributes[u].name,x=v.getAttribute(t);if(x){if(t=="contentEditable"&&x=="inherit"){continue}if(typeof(x)=="string"){s+=" "+t+'="'+i.trim(x.replace(/"/g,"'"))+'"'}else{if(t=="style"&&x.cssText){s+=' style="'+i.trim(x.cssText)+'"'}}}}if(v.childNodes.length<=0){if(v.tagName=="COL"){s+="/>"}else{s+="></"+v.tagName.toLowerCase()+">"}}else{s+=">";var r="";y=v.childNodes.length;for(u=0;u<y;u++){r+=i(v.childNodes[u]).toPrettySource(w+"  ")}s+=r;if(r.indexOf("\n")>=0){s+="\n"+w}s+="</"+v.tagName.toLowerCase()+">"}}else{if(v.nodeType==3){s+=v.data.replace(/^\s*(.*)\s*$/g,"$1")}}return s}});i.sheet={instance:[],dependencies:{coreCss:{css:"jquery.sheet.css"},formulaParser:{script:"parser/formula/formula.js"},tsvParser:{script:"parser/tsv/tsv.js"},jQueryUI:{script:"jquery-ui/jquery-ui.min.js",thirdParty:true},jQueryUIThemeRoller:{css:"jquery-ui/themes/smoothness/jquery-ui.min.css",thirdParty:true},globalize:{script:"globalize/lib/globalize.js",thirdParty:true},nearest:{script:"jquery-nearest/src/jquery.nearest.min.js",thirdParty:true},mousewheel:{script:"MouseWheel/MouseWheel.js",thirdParty:true}},optional:{advancedFn:{script:"plugins/jquery.sheet.advancedfn.js"},dts:{script:"plugins/jquery.sheet.dts.js"},financeFn:{script:"plugins/jquery.sheet.financefn.js"},colorPicker:{css:"really-simple-color-picker/colorPicker.css",script:"really-simple-color-picker/jquery.colorPicker.min.js",thirdParty:true},elastic:{script:"jquery-elastic/jquery.elastic.source.js",thirdParty:true},globalizeCultures:{script:"globalize/lib/cultures/globalize.cultures.js",thirdParty:true},raphael:{script:"raphael/raphael-min.js",thirdParty:true},gRaphael:{script:"graphael/g.raphael.js",thirdParty:true},gRaphaelBar:{script:"graphael/g.bar.js",thirdParty:true},gRaphaelDot:{script:"graphael/g.dot.js",thirdParty:true},gRaphaelLine:{script:"graphael/g.line.js",thirdParty:true},gRaphaelPie:{script:"graphael/g.pie.js",thirdParty:true},undoManager:{script:"Javascript-Undo-Manager/js/undomanager.js",thirdParty:true},zeroClipboard:{script:"zeroclipboard/dist/ZeroClipboard.min.js",thirdParty:true}},events:["sheetAddRow","sheetAddColumn","sheetSwitch","sheetRename","sheetTabSortStart","sheetTabSortUpdate","sheetCellEdit","sheetCellEdited","sheetCalculation","sheetAdd","sheetDelete","sheetDeleteRow","sheetDeleteColumn","sheetOpen","sheetAllOpened","sheetSave","sheetFullScreen","sheetFormulaKeydown"],preLoad:function(u,t){u=u||"";t=i.extend({skip:["globalizeCultures"],thirdPartyDirectory:"bower_components/"},t);var s=function(){if(this.script!==undefined){n.write('<script src="'+u+(this.thirdParty?t.thirdPartyDirectory:"")+this.script+'"><\/script>')}if(this.css!==undefined){n.write('<link rel="stylesheet" type="text/css" href="'+u+(this.thirdParty?t.thirdPartyDirectory:"")+this.css+'"></link>')}};for(var r in t.skip){if(this.dependencies[t.skip[r]]){delete this.dependencies[t.skip[r]]}if(this.optional[t.skip[r]]){delete this.optional[t.skip[r]]}}i.each(this.dependencies,function(){s.call(this)});i.each(this.optional,function(){s.call(this)})},createInstance:function(J,D){var H=this,z=function(I,s){var u=s.parentNode;if(u.lastchild==s){u.appendChild(I)}else{u.insertBefore(I,s.nextSibling)}},r=i(k),w=i(n),A=n.body,x=i(A),E=function(){},G=undefined,C=c,v=isNaN,F=NaN,t=function(s){this.cells=s||[]},B=t.prototype={clone:function(){var I=[];for(var u=0;u<this.cells.length;u++){var s=this.cells[u],K={value:s.value,formula:s.formula,td:s.td,dependencies:s.dependencies,needsUpdated:s.needsUpdated,calcCount:s.calcCount,sheet:s.sheet,calcLast:s.calcLast,html:s.html,state:s.state,jS:s.jS,calcDependenciesLast:s.calcDependenciesLast,style:s.style||s.td.attr("style")||"",cl:s.cl||s.td.attr("class")||""};I.push(K)}return new t(I)}},y={version:"4.x",i:0,I:D,sheetCount:0,spreadsheets:[],controls:{autoFiller:[],bar:{helper:[],corner:[],x:{controls:[],handleFreeze:[],menu:[],menuParent:[],parent:[],td:[],tds:function(){var u=i([]);for(var s in this.td[y.i]){u.pushStack(this.td[y.i][s])}return u}},y:{controls:[],handleFreeze:[],menu:[],parent:[],td:[],tds:function(){var u=i([]);for(var s in this.td[y.i]){u.pushStack(this.td[y.i][s])}return u}}},barMenuLeft:[],barMenuTop:[],barLeft:[],barTop:[],barTopParent:[],chart:[],tdMenu:[],cellsEdited:[],enclosure:[],enclosures:null,formula:null,fullScreen:null,header:null,inPlaceEdit:[],inputs:[],label:null,menuLeft:[],menuRight:[],menus:[],pane:[],panes:null,scrolls:null,sheetAdder:null,table:[],tables:null,tab:[],tabContainer:null,tabs:null,title:null,toggleHide:{x:[],y:[]},ui:null},obj:{autoFiller:function(){return y.controls.autoFiller[y.i]||i([])},barCorner:function(){return y.controls.bar.corner[y.i]||i([])},barHelper:function(){return y.controls.bar.helper[y.i]||(y.controls.bar.helper[y.i]=i([]))},barLeft:function(s){return(y.controls.bar.y.td[y.i]&&y.controls.bar.y.td[y.i][s]?y.controls.bar.y.td[y.i][s]:i([]))},barLeftControls:function(){return y.controls.bar.y.controls[y.i]||i([])},barLefts:function(){return y.controls.bar.y.tds()},barHandleFreezeLeft:function(){return y.controls.bar.y.handleFreeze[y.i]||i([])},barMenuLeft:function(){return y.controls.bar.y.menu[y.i]||i([])},barTop:function(s){return(y.controls.bar.x.td[y.i]&&y.controls.bar.x.td[y.i][s]?y.controls.bar.x.td[y.i][s]:i([]))},barTopControls:function(){return y.controls.bar.x.controls[y.i]||i([])},barTops:function(){return y.controls.bar.x.tds()},barTopParent:function(){return y.controls.bar.x.parent[y.i]||i([])},barHandleFreezeTop:function(){return y.controls.bar.x.handleFreeze[y.i]||i([])},barMenuParentTop:function(){return y.controls.bar.x.menuParent[y.i]||i([])},barMenuTop:function(){return y.controls.bar.x.menu[y.i]||i([])},tdActive:function(){return y.cellLast.td||i([])},tdMenu:function(){return y.controls.tdMenu[y.i]||i([])},cellsEdited:function(){return y.controls.cellsEdited[y.i]||i([])},chart:function(){return y.controls.chart[y.i]||i([])},enclosure:function(){return y.controls.enclosure[y.i]||i([])},enclosures:function(){return y.controls.enclosures||i([])},formula:function(){return y.controls.formula||i([])},fullScreen:function(){return y.controls.fullScreen||i([])},header:function(){return y.controls.header||i([])},highlighted:function(){return y.highlightedLast.obj||i([])},menuRight:function(){return y.controls.menuRight[y.i]||i([])},inPlaceEdit:function(){return y.controls.inPlaceEdit[y.i]||i([])},inputs:function(){return y.controls.inputs[y.i]||i([])},label:function(){return y.controls.label||i([])},menus:function(){return y.controls.menus[y.i]||i([])},menuLeft:function(){return y.controls.menuLeft[y.i]||i([])},pane:function(){return y.controls.pane[y.i]||{}},panes:function(){return y.controls.panes||i([])},parent:function(){return J.parent},scrolls:function(){return y.controls.scrolls||i([])},sheetAdder:function(){return y.controls.sheetAdder||i([])},table:function(){return y.controls.table[y.i]||i([])},tables:function(){return y.controls.tables||i([])},tab:function(){return y.controls.tab[y.i]||i([])},tabs:function(){return y.controls.tabs||i([])},tabContainer:function(){return y.controls.tabContainer||i([])},title:function(){return y.controls.title||i([])}},id:"jS_"+D+"_",cl:{autoFiller:"jSAutoFiller",autoFillerHandle:"jSAutoFillerHandle",autoFillerCover:"jSAutoFillerCover",barCorner:"jSBarCorner",barController:"jSBarController",barHelper:"jSBarHelper",barLeft:"jSBarLeft",barHandleFreezeLeft:"jSBarHandleFreezeLeft",barTop:"jSBarTop",barTopMenuButton:"jSBarTopMenuButton",barHandleFreezeTop:"jSBarHandleFreezeTop",barTopParent:"jSBarTopParent",chart:"jSChart",formula:"jSFormula",formulaParent:"jSFormulaParent",header:"jSHeader",fullScreen:"jSFullScreen",inPlaceEdit:"jSInPlaceEdit",menu:"jSMenu",menuFixed:"jSMenuFixed",parent:"jSParent",scroll:"jSScroll",sheetAdder:"jSSheetAdder",table:"jS",label:"jSLoc",pane:"jSEditPane",tab:"jSTab",tabContainer:"jSTabContainer",tdMenu:"jSTdMenu",title:"jSTitle",enclosure:"jSEnclosure",ui:"jSUI",uiAutoFiller:"ui-state-active",uiBar:"ui-widget-header",uiBarHighlight:"ui-state-active",uiBarHandleFreezeLeft:"ui-state-default",uiBarHandleFreezeTop:"ui-state-default",uiBarMenuTop:"ui-state-default",uiTdActive:"ui-state-active",uiTdHighlighted:"ui-state-highlight",uiControl:"ui-widget-header ui-corner-top",uiControlTextBox:"ui-widget-content",uiFullScreen:"ui-widget-content ui-corner-all",uiInPlaceEdit:"ui-state-highlight",uiMenu:"ui-widget-header",uiMenuUl:"ui-widget-header",uiMenuLi:"ui-widget-header",uiPane:"ui-widget-content",uiParent:"ui-widget-content ui-corner-all",uiTable:"ui-widget-content",uiTab:"ui-widget-header",uiTabActive:"ui-state-highlight"},msg:{addRowMulti:"How many rows would you like to add?",addColumnMulti:"How many columns would you like to add?",cellFind:"What are you looking for in this spreadsheet?",cellNoFind:"No results found.",dragToFreezeCol:"Drag to freeze column",dragToFreezeRow:"Drag to freeze row",addSheet:"Add a spreadsheet",openSheet:"Are you sure you want to open a different sheet?  All unsaved changes will be lost.",toggleHideRow:"No row selected.",toggleHideColumn:"No column selected.",loopDetected:"Loop Detected",newSheetTitle:"What would you like the sheet's title to be?",notFoundColumn:"Column not found",notFoundRow:"Row not found",notFoundSheet:"Sheet not found",setCellRef:"Enter the name you would like to reference the cell by.",sheetTitleDefault:"Spreadsheet {index}",maxRowsBrowserLimitation:"You've reached the maximum amount of rows this browser supports. Try using Chrome, FireFox, or Internet Explorer 9+",maxColsBrowserLimitation:"You've reached the maximum amount of columns this browser supports. Try using Chrome, FireFox, or Internet Explorer 9+",maxSizeBrowserLimitationOnOpen:"The spreadsheet you are loading is larger than the maximum size of cells this browser supports. Try using Chrome, Firefox, or Internet Explorer 9+. You can an proceed, but the spreadsheet may not work as intended."},kill:function(){if(!y){return false}i(n).unbind("keydown");this.obj.fullScreen().remove();(this.obj.inPlaceEdit().destroy||E)();J.parent.trigger("sheetKill").removeClass(y.cl.uiParent).html("");J.parent[0].jS=G;this.obj.menus().remove();var s=i.sheet.events.length;for(var u=0;u<s;u++){J.parent.unbind(i.sheet.events[u])}i.sheet.instance.splice(D,1);return true},trigger:function(s,u){u=u||[];return J.parent.triggerHandler(s,[y].concat(u))},spreadsheetsToArray:function(s){if(s||y.spreadsheets.length==0){y.cycleCellsAll(function(I,K,u){y.createCell(I,K,u)})}return y.spreadsheets},spreadsheetToArray:function(u,s){s=(s?s:y.i);if(!y.spreadsheets[s]){y.cycleCells(function(K,L,I){y.createCell(K,L,I)})}return y.spreadsheets[s]},createCell:function(N,Q,S,V,U,Y){var I,O,R,u,X,T,K,L,s,P,M,Z,W;if(!(I=y.spreadsheets[N])){I=y.spreadsheets[N]=[]}if(!(O=I[Q])){O=I[Q]=[]}if(!(X=y.controls.tables[N])){return{}}if(!(L=X.tBody)){return{}}if(!(s=L.children[Q])){return{}}if(!(P=s.children[S])){return{}}M=i(P);R=O[S]=P.jSCell={td:M,dependencies:[],formula:P.getAttribute("data-formula")||"",cellType:P.getAttribute("data-celltype")||null,value:P.textContent||P.innerText||"",calcCount:V||0,calcLast:U||-1,calcDependenciesLast:Y||-1,sheet:N,type:"cell",jS:y,state:[],needsUpdated:true,uneditable:P.getAttribute("data-uneditable")||false};if(R.formula&&R.formula.charAt(0)=="="){R.formula=R.formula.substring(1)}T=X.colGroup;while(!(K=T.children[S])){K=n.createElement("col");K.setAttribute("style","width:"+y.s.newColumnWidth+"px;");T.appendChild(K)}if(!(u=K.jSCells)){u=K.jSCells=[]}u.unshift(R);if(!K.tds){K.tds=[]}K.tds.unshift(P);P.col=K;P.type="cell";P.barLeft=s.children[0];P.barTop=L.children[0].children[S];if(!s.jSCells){s.jSCells=[]}s.jSCells.unshift(R);if(!s.tds){s.tds=[]}s.tds.unshift(P);if(!X.jSCells){X.jSCells=[]}X.jSCells.unshift(R);if(!X.tds){X.tds=[]}X.tds.unshift(P);P.table=X;if(!(W=y.controls.bar.y.td[N])){W=y.controls.bar.y.td[N]=[]}if(!W[Q]){W[Q]=i(s.children[0])}if(!(Z=y.controls.bar.x.td[N])){Z=y.controls.bar.x.td[N]=[]}if(!Z[S]){Z[S]=i(L.children[0].children[S])}return R},getCell:function(M,K,I){var u,L,s;I=(I||0);if(y.spreadsheets&&(u=y.spreadsheets[I])&&(L=u[M])&&(s=L[K])){return s}return null},nav:false,setNav:function(I){var s=i.sheet.instance;for(var u=0;u<s.length;u++){(s[u]||{}).nav=false}y.nav=I},controlFactory:{addRowMulti:function(I,L,u,s){function K(M){if(M){if(!v(M)){y.controlFactory.addCells(I,u,parseInt(M),"row",s);y.trigger("sheetAddRow",[I,u,M])}}}if(!L){J.prompt(y.msg.addRowMulti,K)}else{K(L)}},addColumnMulti:function(I,L,u,s){function K(M){if(M){if(!v(M)){y.controlFactory.addCells(I,u,parseInt(M),"col",s);y.trigger("sheetAddColumn",[I,u,M])}}}if(!L){J.prompt(y.msg.addColumnMulti,K)}else{K(L)}},addCells:function(R,P,W,V,L){y.autoFillerHide();y.setDirty(true);y.setChanged(true);y.obj.barHelper().remove();var T=y.obj.table(),U=T[0],s=y.sheetSize(U),Q=false,N=y.obj.tdActive(),I;W=W||1;V=V||"col";if(R==G){R=(V=="row"?s.rows:s.cols);Q=true}switch(V){case"row":if(i.sheet.max){if(i.sheet.max>s.rows&&i.sheet.max<=s.rows+W){W=i.sheet.max-s.rows}else{if(i.sheet.max&&i.sheet.max<=s.rows+W){if(!y.isBusy()){J.alert(y.msg.maxRowsBrowserLimitation)}return false}}}I={el:function(){var X=y.rowTds(U,R);if(!X||!X[0]){return[]}return[X[0].parentNode]},size:function(){if(!I.Size){var X=I.el()[0];I.Size=X.children.length-1}return I.Size},loc:function(){var X=I.el();return y.getTdLocation(X[0].children)},trs:[],newObj:function(){var X=I.size(),Z=n.createElement("tr");Z.setAttribute("style","height: "+J.colMargin+"px;");for(var Y=0;Y<=X;Y++){var aa=n.createElement("td");if(Y==0){aa.setAttribute("class",y.cl.barLeft+" "+y.cl.uiBar);aa.entity="left";aa.type="bar"}Z.appendChild(aa)}I.trs.push(Z);return Z},offset:{row:W,col:0},start:function(){return{row:(P?R:R+W)}},createCells:function(){for(var Z=0;Z<I.trs.length;Z++){var Y=(P?0:1)+R;y.spreadsheets[y.i].splice(Z+Y,0,[]);for(var X=0;X<I.trs[Z].children.length;X++){if(X==0){y.controls.bar.y.td[y.i].splice(Z+Y,0,i(I.trs[Z].children[X]))}else{y.createCell(y.i,Z+Y,X)}}}y.refreshRowLabels(R)}};break;case"col":if(i.sheet.max){if(i.sheet.max>s.cols&&i.sheet.max<=s.cols+W){W=i.sheet.max-s.cols}else{if(i.sheet.max&&i.sheet.max<=s.cols+W){if(!y.isBusy()){J.alert(y.msg.maxColsBrowserLimitation)}return false}}}I={el:function(){var Y=y.rowTds(U,1)[R],ab=y.rowTds(U),ac=ab[ab.length-1],aa=y.getTdLocation(ac),Z=[];for(var X=0;X<=aa.row;X++){Z.push(U.tBody.children[X].children[R])}return Z},col:function(){return y.col(U,R)},cols:[],newCol:function(){var X=n.createElement("col");X.setAttribute("style","width:"+y.s.newColumnWidth+"px;");I.cols.push(X);return X},loc:function(X){X=(X?X:I.el());return y.getTdLocation(X[0])},tds:[],newObj:function(){var X=n.createElement("td");I.tds.push(X);return X},offset:{row:0,col:W},start:function(){return{col:(P?R:R+W)}},createCells:function(){var Z=y.rows(U);for(var ab=0;ab<Z.length;ab++){var Y=(P?0:1)+R,ad=Y+W,X=0;for(Y;Y<ad;Y++){var ac=U.tBody.children[ab].children[Y],aa=i(ac);if(ab==0){y.controls.bar.x.td[y.i].splice(Y,0,aa);ac.innerText=d.columnLabelString(Y);ac.className=y.cl.barTop+" "+y.cl.uiBar;ac.type="bar";ac.entity="top";I.cols[X].setAttribute("style","width:"+y.s.newColumnWidth+"px;");I.cols[X].bar=ac;X++}else{y.spreadsheets[y.i][ab].splice(Y,0,{});y.createCell(y.i,ab,Y)}}}y.refreshColumnLabels(R)}};break}var u=I.el(),S=I.loc(u),K,O=u.length-1,M;if(P){do{M=W-1;do{u[O].parentNode.insertBefore(I.newObj(),u[O])}while(M--)}while(O--);if(I.newCol){K=I.col();M=W-1;do{K.parentNode.insertBefore(I.newCol(),K)}while(M--)}}else{do{M=W-1;do{z(I.newObj(),u[O])}while(M--)}while(O--);if(I.newCol){K=I.col();M=W-1;do{z(I.newCol(),K)}while(M--)}}I.createCells();if(!L&&Q!=true){y.offsetFormulas(S,I.offset,P)}y.obj.pane().resizeScroll(true);if(N&&N[0]&&N[0].cellIndex&&N[0].parentNode){y.colLast=N[0].cellIndex;y.rowLast=N[0].parentNode.rowIndex}return true},addRow:function(u,s){y.controlFactory.addCells(u,s,1,"row");y.trigger("sheetAddRow",[u,s,1])},addColumn:function(u,s){y.controlFactory.addCells(u,s,1,"col");y.trigger("sheetAddColumn",[u,s,1])},barLeft:function(u){var I=u.tBody.children,s=I.length-1;if(s>-1){do{I[s].insertBefore(n.createElement("td"),I[s].children[0])}while(s-->1)}},barTop:function(P){var s=P.colGroup,O=s.children,L,u=P.tBody.children[0],N=n.createElement("col"),K=n.createElement("td"),M=n.createElement("tr");while(O.length>u.children.length){s.removeChild(O[O.length-1])}N.width=J.colMargin+"px";N.style.width=N.width;s.insertBefore(N,s.children[0]);M.appendChild(K);M.className=y.cl.barTopParent;P.tBody.insertBefore(M,P.tBody.children[0]);P.barTopParent=M;P.corner=K;y.controls.barTopParent[y.i]=i(M);L=u.children.length-1;do{var I=n.createElement("td");if(!O[L]){O[L]=n.createElement("col");s.insertBefore(O[L],N.nextSibling)}O[L].bar=I;I.col=O[L];M.insertBefore(I,K.nextSibling)}while(L-->0);P.barTop=y.controls.barTopParent[y.i].children();return M},barHandleFreeze:{top:function(I){if(y.isBusy()){return false}var s=y.obj.pane().actionUI,R=s.frozenAt,O=s.scrolledArea;if(!(O.end.col<=R.col+1)){return false}y.obj.barHelper().remove();var N=y.obj.barTop(R.col+1),P=N.position(),Q,K=i(I).offset(),M=n.createElement("div"),u=I.freezeHandleTop=i(M).appendTo(I).addClass(y.cl.uiBarHandleFreezeTop+" "+y.cl.barHelper+" "+y.cl.barHandleFreezeTop).height(N.height()).css("left",(P.left-M.clientWidth)+"px").attr("title",y.msg.dragToFreezeCol),L=I.table.barTop;y.controls.bar.helper[y.i]=y.obj.barHelper().add(M);y.controls.bar.x.handleFreeze[y.i]=u;y.draggable(u,{axis:"x",start:function(){y.setBusy(true);Q=i(n.createElement("div")).appendTo(I).css("position","absolute").addClass("ui-state-highlight "+y.cl.barHelper).height(I.table.corner.clientHeight).fadeTo(0,0.33)},drag:function(){var S=y.nearest(u,L).prev();if(S.length&&S.position){Q.width(S.position().left+S.width())}},stop:function(U,S){Q.remove();y.setBusy(false);y.setDirty(true);var T=y.nearest(u,L);y.obj.barHelper().remove();O.end.col=s.frozenAt.col=y.getTdLocation(T).col-1;y.autoFillerHide();s.scrollStart("x",y.sheetSize(I.table))},containment:[K.left,K.top,C.min(K.left+I.table.clientWidth,K.left+I.clientWidth-k.scrollBarSize.width),K.top]});return true},left:function(I){if(y.isBusy()){return false}var I=y.obj.pane(),s=I.actionUI,R=s.frozenAt,O=s.scrolledArea;if(!(O.end.row<=(R.row+1))){return false}y.obj.barHelper().remove();var N=i(I.table.tBody.children[R.row+1].children[0]),P=N.position(),Q,K=i(I).offset(),M=n.createElement("div"),u=I.freezeHandleLeft=i(M).appendTo(I).addClass(y.cl.uiBarHandleFreezeLeft+" "+y.cl.barHelper+" "+y.cl.barHandleFreezeLeft).width(N.width()).css("top",(P.top-M.clientHeight)+"px").attr("title",y.msg.dragToFreezeRow),L=i(I.table.tBody.children);y.controls.bar.helper[y.i]=y.obj.barHelper().add(M);y.controls.bar.y.handleFreeze[y.i]=u;y.draggable(u,{axis:"y",start:function(){y.setBusy(true);Q=i(n.createElement("div")).appendTo(I).css("position","absolute").addClass("ui-state-highlight "+y.cl.barHelper).width(M.clientWidth).fadeTo(0,0.33)},drag:function(){var S=y.nearest(u,L).prev();if(S.length&&S.position){Q.height(S.position().top+S.height())}},stop:function(U,S){Q.remove();y.setBusy(false);y.setDirty(true);var T=y.nearest(u,L);y.obj.barHelper().remove();O.end.row=s.frozenAt.row=C.max(y.getTdLocation(T.children(0)).row-1,0);y.autoFillerHide();I.actionUI.scrollStart("y",y.sheetSize(I.table))},containment:[K.left,K.top,K.left,C.min(K.top+I.table.clientHeight,K.top+I.clientHeight-k.scrollBarSize.height)]});return true},corner:function(){}},menu:function(I,s){var L,u=i([]);switch(I){case"top":L=i(n.createElement("div")).addClass(y.cl.uiMenu+" "+y.cl.tdMenu);y.controls.bar.x.menu[y.i]=L;break;case"left":L=i(n.createElement("div")).addClass(y.cl.uiMenu+" "+y.cl.tdMenu);y.controls.bar.y.menu[y.i]=L;break;case"cell":L=i(n.createElement("div")).addClass(y.cl.uiMenu+" "+y.cl.tdMenu);y.controls.tdMenu[y.i]=L;break}y.controls.menus[y.i]=y.obj.menus().add(L);L.mouseleave(function(){L.hide()}).bind("contextmenu",function(){return false}).appendTo(x).hide().disableSelectionSpecial();for(var K in s){if(s[K]){if(i.isFunction(s[K])){u.pushStack(i(n.createElement("div")).text(K).data("msg",K).click(function(){s[i(this).data("msg")].call(this,y);L.hide();return false}).appendTo(L).hover(function(){u.removeClass("ui-state-highlight");i(this).addClass("ui-state-highlight")},function(){i(this).removeClass("ui-state-highlight")}))}else{if(s[K]=="line"){i(n.createElement("hr")).appendTo(L)}}}}return L},barMenu:{top:function(I,s,u){if(y.isBusy()){return false}var L=y.obj.barMenuTop().hide();if(!L.length){L=y.controlFactory.menu("top",J.contextmenuTop)}y.obj.menus().hide();if(!u){L.css("left",(I.pageX-5)+"px").css("top",(I.pageY-5)+"px").show();return L}var K=y.obj.barMenuParentTop().hide();if(!K.length){K=i(n.createElement("div")).addClass(y.cl.uiBarMenuTop+" "+y.cl.barHelper+" "+y.cl.barTopMenuButton).append(i(n.createElement("span")).addClass("ui-icon ui-icon-triangle-1-s")).mousedown(function(M){K.parent().mousedown().mouseup();var N=K.offset();L.css("left",(M.pageX-5)+"px").css("top",(M.pageY-5)+"px").show()}).blur(function(){if(L){L.hide()}}).bind("destroy",function(){K.remove();y.controls.bar.x.menuParent[y.i]=null});y.controls.bar.x.menuParent[y.i]=K}K.prependTo(u).show()},left:function(u,s){if(y.isBusy()){return false}y.obj.barMenuLeft().hide();if(s){y.obj.barHandleFreezeLeft().remove()}var I;I=y.obj.barMenuLeft();if(!I.length){I=y.controlFactory.menu("left",J.contextmenuLeft)}y.obj.menus().hide();I.css("left",(u.pageX-5)+"px").css("top",(u.pageY-5)+"px").show();return true},corner:function(){}},tdMenu:function(s){if(y.isBusy()){return false}y.obj.tdMenu().hide();var u=y.obj.tdMenu();if(!u.length){u=y.controlFactory.menu("cell",J.contextmenuCell)}y.obj.menus().hide();u.css("left",(s.pageX-5)+"px").css("top",(s.pageY-5)+"px").show();return true},header:function(){y.obj.header().remove();y.obj.sheetAdder().remove();y.obj.tabContainer().remove();var P=n.createElement("div"),I=n.createElement("table"),M=n.createElement("tr"),S,K,T=n.createElement("td"),U,L,u,Q,s;P.appendChild(I);I.appendChild(M);P.className=y.cl.header+" "+y.cl.uiControl;y.controls.header=i(P);if(J.title){if(i.isFunction(J.title)){J.title=y.title(y,D)}T.className=y.cl.title;y.controls.title=i(T).html(J.title)}else{i(T).hide()}M.appendChild(T);function R(W){if(i.isFunction(W)){W=i(W.call(y))}else{W=i(W)}if(W.is("ul")){W.find("ul").hide().addClass(y.cl.uiMenuUl);W.find("li").addClass(y.cl.uiMenuLi).hover(function(){i(this).find("ul:first").hide().show()},function(){i(this).find("ul:first").hide()})}return W}if(y.isSheetEditable()){if(J.menuLeft){L=n.createElement("td");L.className=y.cl.menu+" "+y.cl.menuFixed;M.insertBefore(L,T);y.controls.menuLeft[y.i]=i(L).append(R(J.menuLeft));y.controls.menuLeft[y.i].find("img").load(function(){y.sheetSyncSize()})}if(J.menuRight){u=n.createElement("td");u.className=y.cl.menu+" "+y.cl.menuFixed;M.appendChild(u);y.controls.menuRight[y.i]=i(u).append(R(J.menuRight));y.controls.menuRight[y.i].find("img").load(function(){y.sheetSyncSize()})}U=n.createElement("td");U.className=y.cl.label;y.controls.label=i(U);Q=n.createElement("textarea");Q.className=y.cl.formula;Q.onkeydown=y.evt.formula.keydown;Q.onkeyup=function(){y.obj.inPlaceEdit().value=this.value};Q.onchange=function(){y.obj.inPlaceEdit().value=this.value};Q.onpaste=y.evt.pasteOverCells;Q.onfocus=function(){y.setNav(false)};Q.onfocusout=function(){y.setNav(true)};Q.onblur=function(){y.setNav(true)};y.controls.formula=i(Q);var O=n.createElement("span");O.appendChild(Q);S=n.createElement("table");K=n.createElement("tr");S.appendChild(K);P.appendChild(S);s=n.createElement("td");s.className=y.cl.formulaParent;s.appendChild(O);K.appendChild(U);K.appendChild(s);y.resizableSheet(i(O),{minHeight:y.controls.formula.height(),maxHeight:78,handles:"s",resize:function(X,W){y.controls.formula.height(W.size.height)},stop:function(){y.sheetSyncSize()}});var V=i.sheet.instance;for(var N=0;N<V.length;N++){(V||{}).nav=false}y.setNav(true);i(n).keydown(y.evt.document.keydown)}return P},ui:function(){var s=n.createElement("div");s.setAttribute("class",y.cl.ui);y.obj.ui=s;return s},sheetAdder:function(){var s=n.createElement("span");if(y.isSheetEditable()){s.setAttribute("class",y.cl.sheetAdder+" "+y.cl.tab+" "+y.cl.uiTab+" ui-corner-bottom");s.setAttribute("title",y.msg.addSheet);s.innerHTML="&nbsp;+&nbsp;";s.onmousedown=function(){y.addSheet();return false};s.i=-1}return y.controls.sheetAdder=i(s)},tabContainer:function(){var s=n.createElement("span"),u;s.setAttribute("class",y.cl.tabContainer);s.onmousedown=function(K){K=K||k.event;var I=(K.target||K.srcElement).i;if(I>=0){y.trigger("sheetSwitch",[I])}return false};s.ondblclick=function(K){K=K||k.event;var I=(K.target||K.srcElement).i;if(I>=0){y.trigger("sheetRename",[I])}return false};if(y.isSheetEditable()&&i.fn.sortable){return y.controls.tabContainer=i(s).sortable({placeholder:"ui-state-highlight",axis:"x",forceHelperSize:true,forcePlaceholderSize:true,opacity:0.6,start:function(K,I){u=I.item.index();y.trigger("sheetTabSortStart",[K,I])},update:function(K,I){y.trigger("sheetTabSortUpdate",[K,I,u])}})}return y.controls.tabContainer=i(s)},sheetUI:function(Q,R,L){y.i=L;y.tuneTableForSheetUse(R);y.readOnly[L]=(R.className||"").match(/\breadonly\b/i)!=null;var M=y.controlFactory.enclosure(R),I=M.pane,u=i(I),N=function(V){V=V||k.event;if(y.isBusy()){return false}if(y.isBar(V.target)){var T=V.target.entity,U=y.getBarIndex[T](V.target);if(U<0){return false}if(y.evt.barInteraction.first==y.evt.barInteraction.last){y.controlFactory.barMenu[T](V,U)}}else{y.controlFactory.tdMenu(V)}return false};Q.appendChild(M);y.controlFactory.barTop(R);y.controlFactory.barLeft(R);I.appendChild(R);if(y.isSheetEditable()){y.controlFactory.autoFiller(I)}if(y.isSheetEditable()){var O=y.obj.formula(),S="";u.mousedown(function(T){y.setNav(true);if(y.isBusy()){return false}if(y.isCell(T.target)){if(T.button==2){N.call(this,T);y.evt.cellOnMouseDown(T);return true}y.evt.cellOnMouseDown(T);return false}if(y.isBar(T.target)){if(T.button==2){N.call(this,T)}S=T.target.entity;y.evt.barInteraction.select(T.target);return false}return true});I.onmouseup=function(){S=""};I.onmouseover=function(X){X=X||k.event;var W=X.target||X.srcElement;if(y.isBusy()){return false}if(!y.isBar(W)){return false}var V=i(W),T=W.entity,U=y.getBarIndex[T](W);if(U<0){return false}if(y.evt.barInteraction.selecting&&T==S){y.evt.barInteraction.last=U;y.cellSetActiveBar(T,y.evt.barInteraction.first,y.evt.barInteraction.last)}else{y.resizeBar[T](V,U,I,R);if(y.isSheetEditable()){y.controlFactory.barHandleFreeze[T](I);if(T=="top"){y.controlFactory.barMenu[T](X,U,V)}}}return true};I.ondblclick=y.evt.cellOnDblClick;u.bind("contextmenu",N).disableSelectionSpecial().bind("cellEdit",y.evt.cellEdit)}y.themeRoller.start(R);y.createSpreadsheet(R,L);y.checkMinSize(R);y.controlFactory.tab();var K=y.s,s=K.hiddenRows,P=K.hiddenColumns;if(!s.length||!P.length){s=R.attributes["data-hiddenrows"]||{value:""};P=R.attributes["data-hiddencolumns"]||{value:""};if(s.value.length>0){s=f.toNumbers(s.value.split(","))}if(P.value.length>0){P=f.toNumbers(P.value.split(","))}}M.actionUI.hide(s,P,y.rows(R),y.cols(R));y.setChanged(true)},enclosure:function(I){var M=n.createElement("div"),L=n.createElement("div"),u=i(L),s=new h.ActionUI(L,M,I,y.cl.scroll,y.s.frozenAt[y.i],i.sheet.max),K=s.scrollUI;I.size=function(){return y.sheetSize(I)};K.onscroll=function(){if(!y.isBusy()){var O=s.scrollTo({axis:"x",pixel:this.scrollLeft}),N=s.scrollTo({axis:"y",pixel:this.scrollTop});if(O||N){if(O){setTimeout(function(){y.calcVisibleCol(s)},0)}if(N){setTimeout(function(){y.calcVisibleRow(s)},0)}y.obj.barHelper().remove();y.autoFillerGoToTd();if(M.inPlaceEdit){M.inPlaceEdit.goToTd()}}}};K.onmousedown=function(){y.obj.barHelper().remove()};L.actionUI=M.actionUI=s;L.scrollUI=M.scrollUI=K;L.appendChild(L.scrollUI);M.setAttribute("class",y.cl.pane+" "+y.cl.uiPane);L.appendChild(M);L.setAttribute("class",y.cl.enclosure);L.pane=M;L.table=I;M.table=I;M.enclosure=L;M.$enclosure=u;I.pane=M;I.enclosure=L;I.$enclosure=u;y.controls.pane[y.i]=M;y.controls.panes=y.obj.panes().add(M);y.controls.enclosure[y.i]=u;y.controls.enclosures=y.obj.enclosures().add(L);return L},tab:function(){var s=n.createElement("span"),u=y.controls.tab[y.i]=i(s).appendTo(y.obj.tabContainer());s.setAttribute("class",y.cl.tab);y.sheetTab(true,function(I){s.innerHTML=I});s.i=y.i;s.setAttribute("class",y.cl.uiTab+" ui-corner-bottom");y.controls.tabs=y.obj.tabs().add(u);return s},inPlaceEdit:function(N,u){N=N||y.obj.tdActive();if(!N.length){N=i(y.rowTds(null,1)[1]);y.cellEdit(N)}if(!N.length){return}(y.obj.inPlaceEdit().destroy||E)();var M=y.obj.formula(),I=M.val(),s,L,K=y.obj.pane();if(!N[0].isHighlighted){return}s=n.createElement("textarea");L=i(s);K.inPlaceEdit=s;s.i=y.i;s.className=y.cl.inPlaceEdit+" "+y.cl.uiInPlaceEdit;s.td=N[0];s.goToTd=function(){this.offset=N.position();if(!this.offset.left&&!this.offset.right){i(s).hide()}else{this.setAttribute("style","left:"+(this.offset.left-1)+"px;top:"+(this.offset.top-1)+"px;width:"+this.td.clientWidth+"px;height:"+this.td.clientHeight+"px;min-width:"+this.td.clientWidth+"px;min-height:"+this.td.clientHeight+"px;")}};s.goToTd();s.onkeydown=y.evt.inPlaceEdit.keydown;s.onchange=s.onkeyup=function(){M[0].value=s.value};s.onfocus=function(){y.setNav(false)};s.onblur=s.onfocusout=function(){y.setNav(true)};s.onpaste=y.evt.pasteOverCells;s.destroy=function(){K.inPlaceEdit=null;y.cellLast.isEdit=(s.value!=I);s.parentNode.removeChild(s);y.controls.inPlaceEdit[s.i]=false};K.appendChild(s);s.onfocus();y.controls.inPlaceEdit[y.i]=s;L.focus().val("").val(M[0].value);if(u){L.select()}if(i.fn.elastic){i(s).elastic()}},autoFiller:function(K){if(!J.autoFiller){return false}var u=n.createElement("div"),s=n.createElement("div"),I=n.createElement("div");u.i=y.i;u.className=y.cl.autoFiller+" "+y.cl.uiAutoFiller;s.className=y.cl.autoFillerHandle;I.className=y.cl.autoFillerCover;u.onmousedown=function(){var M=y.obj.tdActive();if(M){var L=y.getTdLocation(M);y.cellSetActive(M,L,true,y.autoFillerNotGroup,function(){var O=y.highlighted(),N=y.getTdLocation(O.last());y.fillUpOrDown(N.row<L.row||N.col<L.col);y.autoFillerGoToTd(M);y.autoFillerNotGroup=false})}return false};K.autoFiller=y.controls.autoFiller[y.i]=i(u);K.appendChild(u);return true}},autoFillerNotGroup:true,updateCellsAfterPasteToFormula:function(Q){var P=0,O=y.obj.formula(),S=new m();Q=Q||O.val();var N={row:y.cellLast.row,col:y.cellLast.col},u=O.val(),K=u;if(N.row==0&&N.col==0){return false}var T=tsv.parse(u);if(!i.isArray(T)){O.val(T);y.fillUpOrDown(false,T);return true}for(var M=0;M<T.length;M++){y.cellLast.isEdit=true;var s=T[M];for(var L=0;L<s.length;L++){P++;var I=y.getTd(y.i,M+N.row,L+N.col);I.row=N.row;I.col=N.col;if(I.length){if(!y.spreadsheets[y.i]||!y.spreadsheets[y.i][M+N.row]||!y.spreadsheets[y.i][M+N.row][L+N.col]){continue}var R=y.spreadsheets[y.i][M+N.row][L+N.col];if(R){J.parent.one("sheetPreCalculation",function(){if((s[L]+"").charAt(0)=="="){R.formula=s[L].substring(1);R.value="";I.data("formula",s[L])}else{R.formula="";R.value=s[L];I.removeData("formula")}});y.calcDependencies.call(R);if(M==0&&L==0){K=s[L]}}}}}if(u!=K){O.val(K)}y.fillUpOrDown(false,K);y.evt.cellEditDone(true);return true},evt:{inPlaceEdit:{enter:function(s){if(s.shiftKey){return true}return y.evt.cellSetActiveFromKeyCode(s,true)},tab:function(s){if(s.shiftKey){return true}return y.evt.cellSetActiveFromKeyCode(s,true)},keydown:function(s){s=s||k.event;y.trigger("sheetFormulaKeydown",[true]);switch(s.keyCode){case p.ENTER:return y.evt.inPlaceEdit.enter(s);break;case p.TAB:return y.evt.inPlaceEdit.tab(s);break;case p.ESCAPE:y.evt.cellEditAbandon();return false;break}}},formula:{keydown:function(s){s=s||k.event;if(y.readOnly[y.i]){return false}if(y.cellLast.row<0||y.cellLast.col<0){return false}y.trigger("sheetFormulaKeydown",[false]);switch(s.keyCode){case p.C:if(s.ctrlKey){return y.evt.document.copy(s)}case p.X:if(s.ctrlKey){return y.evt.document.cut(s)}case p.Y:if(s.ctrlKey){y.evt.document.redo(s);return false}break;case p.Z:if(s.ctrlKey){y.evt.document.undo(s);return false}break;case p.ESCAPE:y.evt.cellEditAbandon();return true;break;case p.ENTER:y.evt.cellSetActiveFromKeyCode(s,true);return false;break}y.cellLast.isEdit=true},If:function(u,s){if(u){y.obj.tdActive().dblclick();return true}return false}},document:{enter:function(s){if(!y.cellLast.isEdit&&!s.ctrlKey){y.obj.tdActive().dblclick()}return false},tab:function(s){y.evt.cellSetActiveFromKeyCode(s)},findCell:function(s){if(s.ctrlKey){y.cellFind();return false}return true},redo:function(s){if(s.ctrlKey&&!y.cellLast.isEdit){y.undo.manager.redo();return false}return true},undo:function(s){if(s.ctrlKey&&!y.cellLast.isEdit){y.undo.manager.undo();return false}return true},copy:function(L,u){var K=y.highlighted(true),M=y.obj.formula(),I=M.val(),s=y.toTsv(K,u);M.val(s).focus().select();w.one("keyup",function(){if(u){M.val("")}else{M.val(I)}});return true},cut:function(s){return this.copy(s,true)},pageUpDown:function(s){var K=y.sheetSize(),O=y.obj.pane(),I=O.clientHeight,L=0,M=0,N,u;if(s){for(u=y.cellLast.row;u>0&&L<I;u--){N=y.getTd(y.i,u,1);if(!N.data("hidden")&&N.is(":hidden")){N.show()}L+=N.parent().height()}}else{for(u=y.cellLast.row;u<K.rows&&L<I;u++){N=y.getTd(y.i,u,1);L+=N.parent().height()}}y.cellEdit(N);return false},keydown:function(s){s=s||k.event;if(y.readOnly[y.i]){return false}if(y.cellLast.row<0||y.cellLast.col<0){return false}var u=y.cellLast.td;if(y.nav){switch(s.keyCode){case p.DELETE:y.toTsv(null,true);y.obj.formula().val("");break;case p.TAB:y.evt.document.tab(s);break;case p.ENTER:y.evt.cellSetActiveFromKeyCode(s);break;case p.LEFT:case p.UP:case p.RIGHT:case p.DOWN:(s.shiftKey?y.evt.cellSetHighlightFromKeyCode(s):y.evt.cellSetActiveFromKeyCode(s));break;case p.PAGE_UP:y.evt.document.pageUpDown(true);break;case p.PAGE_DOWN:y.evt.document.pageUpDown();break;case p.HOME:case p.END:y.evt.cellSetActiveFromKeyCode(s);break;case p.V:if(s.ctrlKey){return y.evt.formula.If(!y.evt.pasteOverCells(s),s)}else{u.trigger("cellEdit");return true}break;case p.Y:if(s.ctrlKey){y.evt.document.redo(s);return false}else{u.trigger("cellEdit");return true}break;case p.Z:if(s.ctrlKey){y.evt.document.undo(s);return false}else{u.trigger("cellEdit");return true}break;case p.ESCAPE:y.evt.cellEditAbandon();break;case p.F:if(s.ctrlKey){return y.evt.formula.If(y.evt.document.findCell(s),s)}else{u.trigger("cellEdit");return true}break;case p.CAPS_LOCK:case p.SHIFT:case p.ALT:break;case p.CONTROL:y.obj.formula().focus().select();return true;break;default:u.trigger("cellEdit");return true;break}return false}}},pasteOverCells:function(u){u=u||k.event;if(u.ctrlKey||u.type=="paste"){var s=function(){y.updateCellsAfterPasteToFormula()};var I=w.one("keyup",function(){s();s=function(){};I.mouseup()}).one("mouseup",function(){s();s=function(){};I.keyup()});y.setDirty(true);y.setChanged(true);return true}return false},cellEditDone:function(I){(y.obj.inPlaceEdit().destroy||E)();if(y.cellLast.isEdit||I){var L=y.obj.formula(),K=y.obj.tdActive();if(y.isFormulaEditable(K)){if(K&&y.cellLast.row>0&&y.cellLast.col>0){var u=L.val(),s=K[0].jSCell;if(!s.edited){s.edited=true;y.controls.cellsEdited[y.i]=y.obj.cellsEdited().add(s)}J.parent.one("sheetPreCalculation",function(){if(u.charAt(0)=="="&&y.formulaParser){K.data("formula",u);s.value=u;s.formula=u}else{K.removeData("formula");s.value=u;s.formula=""}});y.calcDependencies.call(s);y.cellLast.isEdit=false;y.trigger("sheetCellEdited",[s])}}}},cellEditAbandon:function(s){(y.obj.inPlaceEdit().destroy||E)();y.themeRoller.bar.clearActive();y.themeRoller.cell.clearHighlighted(null,true);if(!s){y.calc()}y.cellLast.td=i([]);y.cellLast.row=0;y.cellLast.col=0;y.rowLast=0;y.colLast=0;y.highlightedLast.start={row:0,col:0};y.highlightedLast.end={row:0,col:0};y.labelUpdate("",true);y.obj.formula().val("").blur();y.autoFillerHide();return false},cellSetHighlightFromKeyCode:function(K){var I=y.highlightedLastOrdered(),u=y.sheetSize(),N=y.obj.tdActive(),L=y.getTdLocation(N),M=I.start,s=I.end;switch(K.keyCode){case p.UP:if(M.row<L.row){M.row--;M.row=C.max(M.row,1);break}s.row--;s.row=C.max(s.row,1);break;case p.DOWN:if(M.row===M.end){M.row++;M.row=C.min(M.row,u.rows);break}if(M.row<L.row){M.row++;M.row=C.max(M.row,1);break}s.row++;s.row=C.min(s.row,u.rows);break;case p.LEFT:if(M.col<L.col){M.col--;M.col=C.max(M.col,1);break}s.col--;s.col=C.max(s.col,1);break;case p.RIGHT:if(M.col<L.col){M.col++;M.col=C.min(M.col,u.cols);break}s.col++;s.col=C.min(s.col,u.cols);break}y.highlightedLast.start=M;y.highlightedLast.end=s;y.cycleCellArea(function(O){y.themeRoller.cell.setHighlighted(O.td)},M,s);return false},cellSetActiveFromKeyCode:function(L,s){var M={row:y.cellLast.row,col:y.cellLast.col},K=false,I,u=false;switch(L.keyCode){case p.UP:M.row--;break;case p.DOWN:M.row++;break;case p.LEFT:M.col--;break;case p.RIGHT:M.col++;break;case p.ENTER:M=y.evt.incrementAndStayInGrid(y.highlightedLastOrdered(),M,"row","col",L.shiftKey);K=true;I=y.highlighted();if(I.length>1){u=true}else{if(!s){M.row+=(L.shiftKey?-1:1)}if(J.autoAddCells&&M.row>y.sheetSize().rows){y.controlFactory.addRow()}}break;case p.TAB:M=y.evt.incrementAndStayInGrid(y.highlightedLastOrdered(),M,"col","row",L.shiftKey);K=true;I=y.highlighted();if(I.length>1){u=true}else{if(!s){M.col+=(L.shiftKey?-1:1)}if(J.autoAddCells&&M.col>y.sheetSize().cols){y.controlFactory.addColumn()}}break;case p.HOME:M.col=1;break;case p.END:M.col=y.obj.tdActive().parent().children("td").length-1;break}M.col=M.col||1;M.row=M.row||1;if(!y.cellLast.isEdit||K){var N=y.getTd(y.i,M.row,M.col);if(N){y.cellEdit(N,null,u);return false}}return true},incrementAndStayInGrid:function(K,L,u,s,I){if(I){L[u]--;if(L[u]<K.start[u]){L[u]=K.end[u];L[s]--}if(L[s]<K.start[s]){L[s]=K.end[s]}}else{L[u]++;if(L[u]>K.end[u]){L[u]=K.start[u];L[s]++}if(L[s]>K.end[s]){L[s]=K.start[s]}}return L},cellOnMouseDown:function(s){y.obj.formula().blur();if(s.shiftKey){y.getTdRange(s,y.obj.formula().val())}else{y.cellEdit(i(s.target),true)}},cellOnDblClick:function(s){if(y.isBusy()){return false}y.controlFactory.inPlaceEdit();return true},cellEdit:function(s){if(y.isBusy()){return false}y.controlFactory.inPlaceEdit(null,true);return true},barInteraction:{first:0,last:0,selecting:false,select:function(I){if(!I){return}if(!I.type=="bar"){return}var s=I.entity,u=y.getBarIndex[s](I);if(u<0){return false}y[s+"Last"]=u;y.evt.barInteraction.last=y.evt.barInteraction.first=u;y.cellSetActiveBar(s,y.evt.barInteraction.first,y.evt.barInteraction.last);y.evt.barInteraction.first=y.evt.barInteraction.last=y[s+"Last"]=u;y.evt.barInteraction.selecting=true;w.one("mouseup",function(){y.evt.barInteraction.selecting=false});return false}}},refreshColumnLabels:function(I){I=I||0;y.obj.barMenuParentTop().trigger("destroy");var u=y.controls.bar.x.td[y.i];if(!u){return}for(var s=I;s<u.length;s++){if(s){u[s].text(d.columnLabelString(u[s][0].cellIndex))}}},refreshRowLabels:function(K,s){K=K||0;var I=y.controls.bar.y.td[y.i];if(!I){return}s=s||I.length;for(var u=K;u<s;u++){if(u){i(I[u]).text(I[u][0].parentNode.rowIndex)}}},isCell:function(s){if(s&&s.tagName&&s.tagName=="TD"&&s.type&&s.type=="cell"){return true}return false},isBar:function(s){if(s&&s.tagName&&s.tagName=="TD"&&s.type&&s.type=="bar"){return true}return false},readOnly:[],isSheetEditable:function(s){s=s||y.i;return(J.editable==true&&!y.readOnly[s])},isFormulaEditable:function(s){if(J.lockFormulas){if(s.data("formula")!==G){return false}}return true},toggleFullScreen:function(){if(!y){return}y.evt.cellEditDone();var I=y.obj.fullScreen(),M=y.obj.pane();if(I.is(":visible")){r.unbind("jSResize");x.removeClass("bodyNoScroll");J.parent=I[0].origParent;J.parent.prepend(I.children());I.remove();y.sheetSyncSize();M.resizeScroll();y.trigger("sheetFullScreen",[false])}else{x.addClass("bodyNoScroll");var K=i(J.parent),I=n.createElement("div"),u=i._data(J.parent[0],"events");I.className=y.cl.fullScreen+" "+y.cl.uiFullScreen+" "+y.cl.parent;I.origParent=K;J.parent=y.controls.fullScreen=i(I).append(K.children()).appendTo(x);r.bind("resize",function(){r.trigger("jSResize")}).bind("jSResize",function(){this.w=r.width();this.h=r.height();J.parent.width(this.w).height(this.h);y.sheetSyncSize();M.resizeScroll()}).trigger("jSResize");K.trigger("sheetFullScreen",[true]);for(var L in u){for(var s=0;s<u[L].length;s++){J.parent.bind(L,u[L][s].handler)}}}},renameSheet:function(s){if(v(s)){return false}if(s>-1){y.sheetTab()}return true},switchSheet:function(s){if(v(s)){return false}if(s==-1){y.addSheet()}else{if(s!=y.i){y.setActiveSheet(s);y.calc(s)}}return true},tuneTableForSheetUse:function(I){var u=i(I);y.controls.table[y.i]=u.addClass(y.cl.table).addClass(y.cl.uiTable).attr("id",y.id+y.i).attr("border","1px").attr("cellpadding","0").attr("cellspacing","0");y.formatTable(I);y.sheetDecorateRemove(false,u);y.controls.tables=y.obj.tables().add(I);var K=u.attr("data-frozenatrow")*1,s=u.attr("data-frozenatcol")*1;if(!y.s.frozenAt[y.i]){y.s.frozenAt[y.i]={row:0,col:0}}if(K){y.s.frozenAt[y.i].row=K}if(s){y.s.frozenAt[y.i].col=s}},createSpreadsheet:function(I,u){I.spreadsheet=y.spreadsheets[u]=[];var K=y.rows(I),L=K.length-1,s;if(L<0){return}do{s=K[L].children.length-1;if(s<0){return}do{var M=K[L].children[s];if(L>0&&s>0){y.createCell(u,L,s)}else{if(s==0&&L>0){M.type="bar";M.entity="left";M.innerHTML=L;M.className=y.cl.barLeft+" "+y.cl.barLeft+"_"+y.i+" "+y.cl.uiBar;M.setAttribute("style","height:"+M.nextSibling.style.height)}if(L==0&&s>0){M.type="bar";M.entity="top";M.innerHTML=d.columnLabelString(s);M.className=y.cl.barTop+" "+y.cl.barTop+"_"+y.i+" "+y.cl.uiBar}if(L==0&&s==0){M.type="bar";M.entity="corner";M.className=y.cl.uiBar+"  "+y.cl.barCorner;y.controls.bar.corner[y.i]=M}}}while(s--)}while(L--)},toggleHideRow:function(s){s=s||y.rowLast;if(!s){return}var I=y.rows()[s],u=y.obj.pane().actionUI;u.toggleHideRow(I,s);y.autoFillerGoToTd()},toggleHideColumn:function(u){u=u||y.colLast;if(!u){return}var s=y.cols()[u],I=y.obj.pane().actionUI;I.toggleHideColumn(s,u);y.autoFillerGoToTd()},rowShowAll:function(){y.obj.pane().actionUI.rowShowAll()},columnShowAll:function(){y.obj.pane().actionUI.columnShowAll()},merge:function(O){O=O||y.highlighted();if(!O.length){return}var M=[],u=O[0],L=O[O.length-1],T=y.getTdLocation(u),I=y.getTdLocation(L),W={},R={},Q=0,S=0,V=new m(),N=O.length-1,U,X,K,s,P;if(T.row){y.setDirty(true);y.setChanged(true);if(T.row<I.row){W.row=T.row;R.row=I.row;K=u}else{W.row=I.row;R.row=T.row;K=L}if(K.getAttribute("rowSpan")||K.getAttribute("colSpan")){return false}s=i(K);if(T.col<I.col){W.col=T.col;R.col=I.col}else{W.col=I.col;R.col=T.col}S=(R.row-W.row)+1;Q=(R.col-W.col)+1;P=y.getTdLocation(K);do{X=O[N];U=X.jSCell;if(U.formula||U.value){M.unshift(U.formula?"("+U.formula.substring(1)+")":U.value)}J.parent.one("sheetPreCalculation",function(){if(X.cellIndex!=P.col||X.parentNode.rowIndex!=P.row){U.formula=null;U.value="";U.html="";U.defer=K.jSCell;U.calcLast=V;X.removeAttribute("data-formula");X.removeAttribute("data-celltype");X.innerHTML="";X.style.display="none";X.colSpan=Q-(X.cellIndex-K.cellIndex);X.rowSpan=S-(X.parentNode.rowIndex-K.parentNode.rowIndex)}});y.calcDependencies.call(U)}while(N--);K.jSCell.value=M.join(" ");K.jSCell.formula=(K.jSCell.formula?M.join(" "):"");K.jSCell.calcLast=V;K.style.display="";K.setAttribute("rowSpan",S);K.setAttribute("colSpan",Q);y.calcDependencies.call(K.jSCell);y.evt.cellEditDone();y.autoFillerGoToTd(s);y.cellSetActive(s,P)}return true},unmerge:function(s){s=s||y.highlighted();if(!s){return}var I=s[0],N=y.getTdLocation(I),O=new m(),Q=C.max(I.getAttribute("rowSpan")*1,1)-1,u=C.max(I.getAttribute("colSpan")*1,1)-1,M=Q+N.row,K,P,L=[];if(Q==0&&u==0){return false}do{K=N.col+u;do{P=y.getTd(y.i,M,K)[0];P.style.display="";P.removeAttribute("colSpan");P.removeAttribute("rowSpan");P.jSCell.defer=null;y.calcDependencies.call(P.jSCell,O);L.push(P)}while(K-->N.col)}while(M-->N.row);y.evt.cellEditDone();y.autoFillerGoToTd(s);y.cellSetActive(s,N);y.themeRoller.cell.setHighlighted(i(L));return true},fillUpOrDown:function(O,Q,S){y.evt.cellEditDone();S=S||y.highlighted(true);if(S.length<1){return false}var L=y.obj.tdActive(),P=new m();if(S.length<1){return false}var M=y.getTdLocation(S[0].td),T=y.getTdLocation(S[S.length-1].td),s=y.getTdLocation(L),I={row:0,col:0},u=Q||L[0].jSCell.value,R=false,K=S.length-1,N=function(){};Q=Q||L[0].jSCell.value;if(K>=0){if(Q.charAt&&Q.charAt(0)=="="){if(K>=0){do{if(!O){I.row=s.row-T.row;I.col=s.col-T.col}else{I.row=s.row-M.row;I.col=s.col-M.col}u=y.reparseFormula(Q,I);J.parent.one("sheetPreCalculation",function(){S[K].formula=u;S[K].value="";S[K].td.data("formula",u)});y.calcDependencies.call(S[K],P)}while(K--);return true}}else{if((R=!v(u))||u.length>0){if(R&&u!=""){u*=1;if(O){u-=S.length-1}N=function(){u++}}}do{J.parent.one("sheetPreCalculation",function(){S[K].formula="";S[K].value=u+"";S[K].td.removeData("formula")});y.calcDependencies.call(S[K],P);N()}while(K--);return true}}return false},toTsv:function(S,K,Q){S=S||y.highlighted(true);if(S.type){S=[S]}Q=Q||function(V,U){if(K){J.parent.one("sheetPreCalculation",function(){U.formula="";U.value=""});y.calcDependencies.call(U,P)}};var N=[],R,M,u={},P=new m(),I=S.length-1,T,s;if(I>=0){R=y.getTdLocation(S[0].td);M=y.getTdLocation(S[S.length-1].td);u.row=C.min(R.row,M.row);u.col=C.min(R.col,M.col);do{var L=y.getTdLocation(S[I].td),O=(S[I].formula?"="+S[I].formula:S[I].value);T=C.abs(L.row-u.row);s=C.abs(L.col-u.col);if(!N[T]){N[T]=[]}if((O+="").match(/\n/)){O='"'+O+'"'}N[T][s]=(O||"");Q.call(S[I].td,L,S[I])}while(I-->0);I=N.length-1;do{N[I]=N[I].join("\t")}while(I-->0);return N.join("\n")}return""},offsetFormulas:function(O,N,I,M){var u=y.sheetSize(),L={first:{row:1,col:1},last:{row:u.rows,col:u.cols}},K=new m(),s=[];y.cycleCells(function(){var P=this;if(this.formula&&typeof this.formula=="string"&&y.isFormulaEditable(this.td)){this.formula=y.reparseFormula(this.formula,N,O,I,M);this.td.data("formula","="+this.formula)}s.push(function(){y.calcDependencies.call(P,K,true)})},L.first,L.last);while(s.length){s.pop()()}y.evt.cellEditDone()},reparseFormula:function(L,K,I,s,u){return L.replace(d.regEx.cell,function(N,O,S,T){if(O=="SHEET"){return N}K=K||{loc:0,row:0};var M={row:S*1,col:d.columnLabelIndex(O)},R,Q,P={row:S,col:O,use:false};if(I){if(u){if(s){if(M.col&&M.col==I.col-1){P.col="#REF!";P.use=true}if(M.row&&M.row==I.row-1){P.row="#REF!";P.use=true}if(M.col>=I.col){R=true}if(M.row>=I.row){Q=true}}else{if(I.col&&M.col==I.col){P.col="#REF!";P.use=true}if(I.row&&M.row==I.row){P.row="#REF!";P.use=true}if(I.col&&M.col>I.col){R=true}if(I.row&&M.row>I.row){Q=true}}if(P.use){return P.col+P.row}if(R){M.col+=K.col;return y.makeFormula(M)}if(Q){M.row+=K.row;return y.makeFormula(M)}}else{if(s){if(I.col&&M.col>=I.col){R=true}if(I.row&&M.row>=I.row){Q=true}}else{if(I.col&&M.col>I.col){R=true}if(I.row&&M.row>I.row){Q=true}}if(R){M.col+=K.col;return y.makeFormula(M)}if(Q){M.row+=K.row;return y.makeFormula(M)}}}else{return y.makeFormula(M,K)}return N})},makeFormula:function(u,s){s=i.extend({row:0,col:0},s);u.col+=s.col;u.row+=s.row;if(u.col<0){u.col=0}if(u.row<0){u.row=0}return d.parseCellName(u.col,u.row)},cycleCells:function(K,N,L,I){I=I||y.i;N=N||{row:1,col:1};if(!L){var u=y.sheetSize();L={row:u.rows,col:u.cols}}var M=L.row,s;if(M<N.row){return}do{s=L.col;do{K.call(y.spreadsheets[I][M][s],I,M,s)}while(s-->N.col)}while(M-->N.row)},cycleCellsAll:function(K){var L=y.i,I,u,s;for(I=0;I<=y.sheetCount;I++){y.i=I;u=y.sheetSize();s={row:u.rows,col:u.cols};y.cycleCells(K,{row:0,col:0},s,I)}y.i=L},cycleCellArea:function(P,T,M,L,Q){var s={start:{},end:{}},O,S,U,R,K=y.i,u={cell:[],td:[]},N=y.spreadsheets[K],I=(Q?"unshift":"push");if(L){s.start=T;s.end=M}else{s.start.row=C.max(C.min(T.row,M.row),1);s.start.col=C.max(C.min(T.col,M.col),1);s.end.row=C.max(T.row,M.row,1);s.end.col=C.max(T.col,M.col,1)}O=s.end.row;do{S=s.end.col;U=N[O]||null;do{if(U){R=U[S]||null;if(R){u.cell[I](R);u.td[I](R.td[0])}}}while(S-->s.start.col)}while(O-->s.start.row);if(P){P(u)}},formatTable:function(T){var R=J.newColumnWidth,O=J.colMargin,I=T.children,M=I.length-1,L,K,Q,u,P,S,N;if(M>-1){do{switch(I[M].nodeName){case"TBODY":S=true;Q=I[M];break;case"COLGROUP":N=true;u=I[M];break}}while(M--)}else{var s=n.createElement("tr");s.appendChild(n.createElement("td"));T.appendChild(s);I=T.children}if(!Q){Q=n.createElement("tbody");do{Q.appendChild(I[0])}while(I.length)}if(!u||u.children.length<1){u=n.createElement("colgroup");T.appendChild(u);T.appendChild(Q);P=Q.children[0];for(M=0,L=P.children.length;M<L;M++){K=n.createElement("col");u.appendChild(K);K.style.width=R+"px"}for(M=0,L=Q.children.length;M<L;M++){Q.children[M].style.height=O+"px"}}T.tBody=Q;T.colGroup=u;T.removeAttribute("width");T.style.width=""},checkMinSize:function(L){var I=y.sheetSize(L),M=J.minSize.rows||0,s=J.minSize.cols||0,K=y.obj.pane().actionUI,u=K.frozenAt;M=(u.row>M?u.row+1:M);s=(u.col>s?u.col+1:s);if(I.cols<s){y.controlFactory.addColumnMulti(null,s-I.cols)}if(I.rows<M){y.controlFactory.addRowMulti(null,M-I.rows)}},themeRoller:{start:function(s){y.obj.header().addClass(y.cl.uiControl);y.obj.label().addClass(y.cl.uiControl);y.obj.formula().addClass(y.cl.uiControlTextBox)},cell:{setHighlighted:function(K){K=K||i([]);var s,I=y.highlightedLast.obj,u=y.obj.pane().actionUI;if(I&&I.length>0){s=I.length-1;do{I[s].isHighlighted=false}while(s-->0)}if(K.length>0){s=K.length-1;do{if(!K[s].isHighlighted){K[s].isHighlighted=true;if(!K[s].className.match(y.cl.uiTdHighlighted)){K[s].className+=" "+y.cl.uiTdHighlighted}}}while(s-->0)}y.themeRoller.cell.clearHighlighted.call(K,I);u.redraw()},isHighlighted:function(){return(y.highlightedLast.obj.length?true:false)},clearHighlighted:function(I,u){if(y.themeRoller.cell.isHighlighted()){I=I||y.highlightedLast.obj;if(I&&I.length){var s=I.length-1;do{if(!I[s].isHighlighted||u){I[s].className=I[s].className.replace(y.cl.uiTdHighlighted,"");I[s].isHighlighted=false}}while(s-->0)}}if(this.length){y.highlightedLast.obj=this}else{y.highlightedLast.obj=i([])}}},bar:{style:function(s){i(s).addClass(y.cl.uiBar)},setActive:function(s,u){switch(s){case"top":y.highlightedLast.barTop.removeClass(y.cl.uiBarHighlight);y.highlightedLast.barTop=i(u).addClass(y.cl.uiBarHighlight);break;case"left":y.highlightedLast.barLeft.removeClass(y.cl.uiBarHighlight);y.highlightedLast.barLeft=i(u).addClass(y.cl.uiBarHighlight);break}},clearActive:function(){y.highlightedLast.barLeft.removeClass(y.cl.uiBarHighlight);y.highlightedLast.barLeft=i([]);y.highlightedLast.barTop.removeClass(y.cl.uiBarHighlight);y.highlightedLast.barTop=i([])}},tab:{setActive:function(){this.clearActive();y.obj.tab().addClass(y.cl.uiTabActive)},clearActive:function(){y.obj.tabContainer().find("span."+y.cl.uiTabActive).removeClass(y.cl.uiTabActive)}}},resizable:function(u,s){if(!u.data("resizable")){u.resizable(s)}},busy:[],setBusy:function(s){if(s){y.busy.push(s)}else{y.busy.pop()}},isBusy:function(){return(y.busy.length>0)},draggable:function(u,s){if(!u.data("jSdraggable")){u.data("jSdraggable",true).draggable(s)}},nearest:function(u,s){return i(u).nearest(s)},resizeBar:{top:function(M,I,O,u){y.obj.barTopControls().remove();var K=n.createElement("div"),N=i(K).addClass(y.cl.barController+" ui-state-highlight").width(M.width()).height(0).prependTo(M),s,L;y.controls.bar.x.controls[y.i]=y.obj.barTopControls().add(N);y.resizableCells(N,{handles:"e",start:function(Q,P){y.autoFillerHide();y.setBusy(true);s=y.col(u,I);if(O.freezeHandleTop){O.freezeHandleTop.remove()}s.removeAttribute("width")},resize:function(Q,P){s.style.width=P.size.width+"px";if(O.inPlaceEdit){O.inPlaceEdit.goToTd()}},stop:function(Q,P){y.setBusy(false);O.resizeScroll();y.followMe();y.setDirty(true)},minWidth:32});L=K.children[0];L.style.height=M.outerHeight()+"px";L.style.position="absolute"},left:function(K,N,I,R){y.obj.barLeftControls().remove();var M=K.offset(),S=n.createElement("div"),P=i(S).addClass(y.cl.barController+" ui-state-highlight").prependTo(K).offset({top:M.top,left:M.left}),Q=K[0],L=K.next()[0],T=L.parentNode,u=n.createElement("div"),s=i(u).addClass("jSBarControllerChild").height(K.height()).prependTo(P),O;y.controls.bar.y.controls[y.i]=y.obj.barLeftControls().add(P);y.resizableCells(s,{handles:"s",start:function(){y.autoFillerHide();y.setBusy(true);if(I.freezeHandleLeft){I.freezeHandleLeft.remove()}T.removeAttribute("height");Q.removeAttribute("height");L.removeAttribute("height")},resize:function(V,U){S.style.height=L.style.height=Q.style.height=T.style.height=U.size.height+"px";if(I.inPlaceEdit){I.inPlaceEdit.goToTd()}},stop:function(V,U){y.setBusy(false);I.resizeScroll();y.followMe();y.setDirty(true)},minHeight:15});O=u.children[0];O.style.width=K.outerWidth()+"px";O.style.position="absolute"},corner:function(){}},sheetDecorateRemove:function(u,s){s=s||y.obj.tables();s=(u?s.clone():s);s.find("td."+y.cl.uiTdActive).removeClass(y.cl.uiTdActive);s.find("td."+y.cl.uiTdHighlighted).removeClass(y.cl.uiTdHighlighted);return s},labelUpdate:function(u,s){if(!s){u=d.parseCellName(u.col,u.row);if(u){y.obj.label().text(u)}}else{y.obj.label().text(u)}},cellEdit:function(N,K,I){if(y.cellLast.td.length<1){}y.autoFillerNotGroup=true;y.evt.cellEditDone();if(!N.length){return}var L=y.getTdLocation(N),s=N[0].jSCell,u;if(!s){return}if(s.uneditable){return}y.trigger("sheetCellEdit",[s]);if(!N.is(y.cellLast.td)){y.followMe(N)}else{y.autoFillerGoToTd(N)}y.labelUpdate(L);if(s.formula){u="="+s.formula}else{u=s.value}var M=y.obj.formula().val(u).blur();y.cellSetActive(N,L,K,false,null,I)},cellSetActive:function(L,N,u,P,M,I){N=N||y.getTdLocation(L);if(N.col!=G){y.cellLast.td=L;y.cellLast.row=y.rowLast=N.row;y.cellLast.col=y.colLast=N.col;if(!I){y.themeRoller.cell.setHighlighted(L);y.highlightedLast.start=N;y.highlightedLast.end=N}if(!L.length){return}y.themeRoller.bar.setActive("left",L[0].barLeft);y.themeRoller.bar.setActive("top",L[0].barTop);var O,Q;switch(J.cellSelectModel){case"excel":case"gdrive":O=function(){};Q=function(){};break;case"oo":O=function(R){if(y.isCell(R)){y.cellEdit(i(R))}};Q=function(){};break}if(u){var s={},K=y.obj.pane();s.last=N;K.onmousemove=function(Z){Z=Z||k.event;var aa=Z.target||Z.srcElement;if(y.isBusy()){return false}var R=y.highlightedLast.end=y.getTdLocation(aa),ab=true;if(R.col<1||R.row<1||R.col==F||R.row==F){return false}if(P){ab=false;if(N.col==R.col||N.row==R.row){ab=true}}if((s.last.col!=R.col||s.last.row!=R.row)&&ab){O(aa);y.cycleCellArea(function(ad){y.themeRoller.cell.setHighlighted(ad.td)},N,R,false,true)}y.followMe(i(aa));var U=Z.clientY,V=Z.clientX,W=K.$enclosure.offset(),ac=y.getTdLocation(aa),X=ac.row,T=ac.col,S=false,Y;if(v(X)||v(T)){return false}if(U>W.top){S=true;X--}if(V>W.left){S=true;T--}if(S){if(X<1||T<1){return false}Y=y.spreadsheets[y.i][X][T];y.followMe(i(Y.td),true)}s.last=R;return true};n.onmouseup=function(){K.onmousemove=null;K.onmousemove=null;K.onmouseup=null;n.onmouseup=null;if(M){M()}}}}},colLast:0,rowLast:0,cellLast:{td:i([]),row:0,col:0,isEdit:false},highlightedLast:{obj:i([]),start:{row:0,col:0},end:{row:0,col:0},barLeft:i([]),barTop:i([])},highlightedLastOrdered:function(){var u=this.highlightedLast,s={start:{},end:{}};s.start.row=c.min(u.start.row,u.end.row);s.start.col=c.min(u.start.col,u.end.col);s.end.row=c.max(u.start.row,u.end.row);s.end.col=c.max(u.start.col,u.end.col);return s},cellStyleToggle:function(N,O,L){L=L||y.highlighted();if(L.length<1){return false}y.setDirty(true);var I,s,M=L.length-1,P=y.obj.cellsEdited(),u=y.controls.cellsEdited[y.i],K;if(M>=0){K=L[0].className.match(N);do{I=L[M];s=i(I);if(O){s.removeClass(O)}if(K){s.removeClass(N)}else{s.addClass(N)}if(!I.jSCell.edited){I.jSCell.edited=true;u=P.add(I.jSCell)}}while(M--);return true}return false},cellTypeToggle:function(K,u){u=u||y.highlighted(true);if(u.length<1){return}var I=u.length-1,s=u[I].cellType==K;if(I>=0){do{if(s){u[I].cellType=null}else{u[I].cellType=K}u[I].calcLast=0;y.updateCellValue.call(u[I])}while(I--)}},fontReSize:function(N,L){L=L||y.highlighted();if(L.length<1){return false}var I=0;switch(N){case"up":I=1;break;case"down":I=-1;break}var K,s,M=L.length-1,P,O=y.obj.cellsEdited(),u=y.controls.cellsEdited[y.i];if(M>=0){do{K=L[M];s=i(K);P=(s.css("font-size")+"").replace("px","")*1;s.css("font-size",((P||10)+I)+"px");if(!K.jSCell.edited){K.jSCell.edited=true;u=O.add(K.jSCell)}}while(M--);return true}return false},callStack:0,updateCellValue:function(O,K,M){var I,P,N,L;O=O||0;K=K||-1;M=M||-1;if(K>-1){if(!(I=y.spreadsheets[O])){return J.error({error:y.msg.notFoundSheet})}if(!(P=I[K])){return J.error({error:y.msg.notFoundRow})}if(!(N=P[M])){return J.error({error:y.msg.notFoundColumn})}}else{N=this}if(N===undefined){throw new j("cell doesn't exist")}N.oldValue=N.value;if(N.result){delete N.result}switch(N.state[N.state.length-1]){case"updating":return J.error({error:y.msg.loopDetected});case"updatingDependencies":return(N.valueOverride!=G?N.valueOverride:N.value)}if(N.defer){return y.updateCellValue.call(N.defer)}N.state.push("updating");N.fnCount=0;N.result=null;if(N.calcLast!=y.calcLast||N.calcDependenciesLast!=y.calcDependenciesLast){N.valueOverride=null;N.calcLast=y.calcLast;N.calcDependenciesLast=y.calcDependenciesLast;N.needsUpdated=true;N.calcCount++;if(N.formula){try{if(N.formula.charAt(0)=="="){N.formula=N.formula.substring(1)}var s;if(y.callStack){if(!N.formulaParser){N.formulaParser=k.Formula(y.cellHandler)}s=N.formulaParser}else{s=y.formulaParser}y.callStack++;s.setObj(N);N.result=s.parse(N.formula)}catch(u){N.result=u.toString()}y.callStack--;if(N.result&&N.cellType&&J.cellTypeHandlers[N.cellType]){N.result=J.cellTypeHandlers[N.cellType].call(N,N.result)}y.filterValue.call(N)}else{if(N.value&&N.cellType&&J.cellTypeHandlers[N.cellType]){N.result=J.cellTypeHandlers[N.cellType].call(N,N.value);y.filterValue.call(N)}else{if(N.value!=G&&N.value.charAt){L=y.s.cellStartingHandlers[N.value.charAt(0)];if(L){N.valueOverride=L.call(N,N.value)}else{L=y.s.cellEndHandlers[N.value.charAt(N.value.length-1)];if(L){N.valueOverride=L.call(N,N.value)}}}y.filterValue.call(N)}}}N.needsUpdated=false;N.state.pop();return(N.valueOverride!=G?N.valueOverride:N.value)},updateCellDependencies:function(){if((this.state||(this.state=[])).length){return}this.state.push("updatingDependencies");var K=this.dependencies||[];this.dependencies=[];var u=K.length-1;if(u>-1){do{var s=K[u],I=y.getTdLocation(s.td);s.calcDependenciesLast=0;y.updateCellValue.call(s);if(I.row>0&&I.col>0){y.updateCellDependencies.call(s)}}while(u--)}this.state.pop()},filterValue:function(){var s,u;if(this.result!=G){this.value=this.result.valueOf();u=this.result.html}else{if(typeof this.value=="string"&&this.value.length>0){s=J.encode(this.value)}}this.td.html(u||s||this.value)},cellHandler:{variable:function(){if(arguments.length){var K=arguments[0],u=arguments[1],L=y.s.formulaVariables,I,s;switch(K.toLowerCase()){case"true":s=new g(true);s.html="TRUE";return s;case"false":s=new g(false);s.html="FALSE";return s}if(I=L[K]&&!u){return I}else{if(I&&u){return I[u]}else{return""}}}},time:function(u,s){return a.fromString(u,s)},number:function(s){switch(typeof s){case"number":return s;case"string":if(!v(s)){return s*1}case"object":if(s.getMonth){return b.toCentury(s)}}return s},numberInverted:function(I){var u=y.cellHandler.number(I),s=new l(u.valueOf()*-1);if(u.html){s.html=u.html}return s},performMath:function(N,M,L){var K,I,O=true,s=true,Q=[],P,u=function(R){return R};switch(K=(typeof M.valueOf())){case"number":break;case"string":if(!v(M)){M*=1}else{O=false}break;case"object":if(M.getMonth){M=b.toCentury(M);u=b.get}else{O=false}break;default:O=false}switch(I=(typeof L.valueOf())){case"number":break;case"string":if(!v(L)){L*=1}else{s=false}break;case"object":if(L.getMonth){L=b.toCentury(L)}else{s=false}break;default:s=false}if(!O){Q.push("not a number: "+M);M=0}if(!s){Q.push("not a number: "+L);L=0}if(Q.length){}switch(N){case"+":P=M+L;break;case"-":P=M-L;break;case"/":P=M/L;if(P==Infinity||P==F){P=0}break;case"*":P=M*L;break;case"^":P=C.pow(M,L);break}return u(P)},cellValue:function(I){var u=d.parseLocation(I),s;s=y.cellHandler.createDependency.call(this,this.sheet,u);y.updateCellValue.call(s);return(s.valueOverride!=G?s.valueOverride:s.value)},createDependency:function(u,L){var I,K,s;if(!(I=y.spreadsheets[u])){return null}if(!(K=I[L.row])){return null}if(!(s=K[L.col])){return null}if(!s.dependencies){s.dependencies=[]}if(i.inArray(this,s.dependencies)<0){s.dependencies.push(this)}return s},cellRangeValue:function(s,u){s=d.parseLocation(s);u=d.parseLocation(u);var P=[],K=C.max(s.row,u.row),O=C.min(s.row,u.row),I=C.max(s.col,u.col),L=I,M=C.min(s.col,u.col),N;if(K>=O||I>=M){do{I=L;do{N=y.spreadsheets[this.sheet][K][I];y.cellHandler.createDependency.call(this,this.sheet,{row:K,col:I});P.unshift(y.updateCellValue.call(N))}while(I-->M)}while(K-->O);return P}return P},fixedCellValue:function(s){s=s.replace(/\$/g,"");return y.cellHandler.cellValue.call(this,s)},fixedCellRangeValue:function(u,s){u=u.replace(/\$/g,"");s=s.replace(/\$/g,"");return y.cellHandler.cellRangeValue.call(this,u,s)},remoteCellValue:function(u,K){var I=d.parseLocation(K),s=d.parseSheetLocation(u);y.cellHandler.createDependency.call(this,s,I);return y.updateCellValue(s,I.row,I.col)},remoteCellRangeValue:function(L,M,u){L=d.parseSheetLocation(L);M=d.parseLocation(M);u=d.parseLocation(u);var s=[];for(var K=M.row;K<=u.row;K++){for(var I=M.col;I<=u.col;I++){s.push(y.updateCellValue(L,K,I))}}return[s]},callFunction:function(I,u){I=I.toUpperCase();u=u||[];if(i.sheet.fn[I]){this.fnCount++;var s=i.sheet.fn[I].apply(this,u);return s}else{return J.error({error:"Function "+I+" Not Found"})}}},cellLookupHandlers:{fixedCellValue:function(s){return[y.sheet,d.parseLocation(s),d.parseLocation(s)]},fixedCellRangeValue:function(u,I,s){return[d.parseSheetLocation(u),d.parseLocation(I),d.parseLocation(s)]},cellValue:function(s){},cellRangeValue:function(u,I,s){return[y.sheet,d.parseLocation(I),d.parseLocation(s)]},remoteCellValue:function(s,u){return[y.sheet,d.parseLocation(u),d.parseLocation(u)]},remoteCellRangeValue:function(u,I,s){return[d.parseSheetLocation(u),d.parseLocation(I),d.parseLocation(s)]},callFunction:function(){if(arguments[0]=="VLOOKUP"||arguments[0]=="HLOOKUP"&&arguments[1]){if(arguments[1]&&arguments[1][1]){return arguments[1][1]}return[]}}},cellLookup:function(){var s=Formula(i.extend({},y.cellHandler,y.cellLookupHandlers));s.setObj(this);var I=s.parse(this.formula),K=[];for(var L=I[1].row;L<=I[2].row;L++){for(var u=I[1].col;u<=I[2].col;u++){K.push(y.getCell(L,u,I[0]))}}return K},calcLast:0,calcDependenciesLast:0,calc:function(s,I){s=s||y.i;if(y.readOnly[s]||y.isChanged(s)===false&&!I||!y.formulaParser){return false}y.calcLast=new m();var u=y.spreadsheetToArray(null,s);d.calc(s,u,y.updateCellValue);y.trigger("sheetCalculation",[{which:"spreadsheet",sheet:u,index:s}]);y.setChanged(false);return true},calcVisiblePos:{row:-1,col:-1},calcVisibleInit:function(P){P=P||y.i;y.calcLast=y.calcLast||new m();var u=y.spreadsheetToArray(null,P)||[],L=y.updateCellValue,I=c.min,K=J.initCalcRows,s=J.initCalcCols,N=I(u.length-1,K),Q,O,M={row:-1,col:-1};if(N>0){M.row=N;do{if(N>0&&(Q=u[N])!==undefined){M.col=O=I(Q.length-1,s);if(O>0){do{L.apply(Q[O])}while(O-->1)}}}while(N-->1)}this.calcVisiblePos=M;y.trigger("sheetCalculation",[{which:"spreadsheet",sheet:u,index:P}]);y.setChanged(false)},calcVisibleRow:function(s,U){U=U||y.i;var L=y.spreadsheetToArray(null,U)||[],u=s.scrolledArea.end,Q=y.updateCellValue,O=c.min,P=J.initCalcRows,I=J.initCalcCols,K=u.row+P,N=u.col+I,S=O(L.length-1,K),V,T,M=this.calcVisiblePos,R={row:S,col:M.col};if(S>0){do{if((V=L[S])!==undefined){T=O(V.length-1,N);if(T>0){do{Q.apply(V[T])}while(T-->1)}}}while(S-->M.row)}this.calcVisiblePos=R;y.trigger("sheetCalculation",[{which:"spreadsheet",sheet:L,index:U}]);y.setChanged(false)},calcVisibleCol:function(s,V){V=V||y.i;var L=y.spreadsheetToArray(null,V)||[],u=s.scrolledArea.end,Q=y.updateCellValue,O=c.min,P=J.initCalcRows,I=J.initCalcCols,K=u.row+P,N=u.col+I,S=O(L.length-1,K),W,U,T,M=this.calcVisiblePos,R={row:M.row,col:M.col};if(S>0){do{if(S>0&&(W=L[S])!==undefined){U=O(W.length-1,N);if((T=W[U])!==undefined){Q.apply(T)}}}while(S-->1)}this.calcVisiblePos=R;y.trigger("sheetCalculation",[{which:"spreadsheet",sheet:L,index:V}]);y.setChanged(false)},calcDependencies:function(I,u){I=I||new m();y.calcDependenciesLast=I;if(!u){var s=this;y.undo.createCells([this],function(K){y.trigger("sheetPreCalculation",[{which:"cell",cell:s}]);y.setDirty(true);y.setChanged(true);y.updateCellValue.call(s);y.updateCellDependencies.call(s);y.trigger("sheetCalculation",[{which:"cell",cell:s}]);return K})}else{y.trigger("sheetPreCalculation",[{which:"cell",cell:this}]);y.setDirty(true);y.setChanged(true);y.updateCellValue.call(this);y.updateCellDependencies.call(this);y.trigger("sheetCalculation",[{which:"cell",cell:this}])}},addSheet:function(s){s=s||{rows:25,cols:10};if(s){y.evt.cellEditAbandon();y.setDirty(true);y.controlFactory.sheetUI(y.obj.ui,i.sheet.makeTable(s),y.sheetCount);y.setActiveSheet(y.sheetCount);y.sheetCount++;y.sheetSyncSize();y.obj.pane().resizeScroll();y.trigger("sheetAdd",[y.i])}},deleteSheet:function(u){var L=u||y.i,K=y.controls.enclosures.toArray(),s;K.splice(L,1);y.obj.barHelper().remove();y.obj.enclosure().remove();y.controls.enclosures=i(K);y.obj.menus().remove();y.obj.tabContainer().children().eq(y.i).remove();y.spreadsheets.splice(L,1);y.controls.autoFiller.splice(L,1);y.controls.bar.helper.splice(L,1);y.controls.bar.corner.splice(L,1);y.controls.bar.x.controls.splice(L,1);y.controls.bar.x.handleFreeze.splice(L,1);y.controls.bar.x.controls.splice(L,1);y.controls.bar.x.menu.splice(L,1);if(y.controls.bar.x.menuParent&&y.controls.bar.x.menuParent[L]){y.controls.bar.x.menuParent.splice(L,1)}y.controls.bar.x.parent.splice(L,1);y.controls.bar.x.td.splice(L,1);y.controls.bar.y.controls.splice(L,1);y.controls.bar.y.handleFreeze.splice(L,1);y.controls.bar.y.controls.splice(L,1);y.controls.bar.y.menu.splice(L,1);if(y.controls.bar.y.menuParent&&y.controls.bar.y.menuParent[L]){y.controls.bar.y.menuParent.splice(L,1)}y.controls.bar.y.parent.splice(L,1);y.controls.bar.y.td.splice(L,1);y.controls.barMenuLeft.splice(L,1);y.controls.barMenuTop.splice(L,1);y.controls.barLeft.splice(L,1);y.controls.barTop.splice(L,1);y.controls.barTopParent.splice(L,1);y.controls.chart.splice(L,1);y.controls.tdMenu.splice(L,1);y.controls.enclosure.splice(L,1);y.controls.fullScreen=null;y.controls.inPlaceEdit.splice(L,1);y.controls.menus.splice(L,1);y.controls.menuLeft.splice(L,1);y.controls.menuRight.splice(L,1);y.controls.pane.splice(L,1);y.controls.tables.splice(L,1);y.controls.table.splice(L,1);for(s=L+1;s<y.controls.tab.length;++s){var I=y.controls.tab[s].get(0);I.i--}y.controls.tab.splice(L,1);y.controls.toggleHide.x.splice(L,1);y.controls.toggleHide.y.splice(L,1);y.readOnly.splice(L,1);y.i=0;y.sheetCount--;y.sheetCount=C.max(y.sheetCount,0);if(y.sheetCount==0){y.addSheet()}y.setActiveSheet(y.i);y.setDirty(true);y.setChanged(true);y.trigger("sheetDelete",[L])},deleteRow:function(L,u){var K,N,s,M,I=y.sheetSize();if(L){N=s=L}else{N=C.min(y.highlightedLast.start.row,y.highlightedLast.end.row);s=C.max(y.highlightedLast.start.row,y.highlightedLast.end.row)}M=(s-N)+1;if(N<1||I.cols<2||M>=I.rows){return}K=s;do{y.getTd(y.i,K,1).parent().remove()}while(N<K--);y.controls.bar.y.td[y.i].splice(N,M);y.spreadsheets[y.i].splice(N,M);y.refreshRowLabels(N);y.setChanged(true);y.offsetFormulas({row:N,col:0},{row:-M,col:0},false,true);y.setDirty(true);y.evt.cellEditAbandon();y.obj.pane().resizeScroll();y.trigger("sheetDeleteRow",K)},deleteColumn:function(N){var L,s,K,P,R=y.sheetSize();if(N){s=K=N}else{s=C.min(y.highlightedLast.start.col,y.highlightedLast.end.col);K=C.max(y.highlightedLast.start.col,y.highlightedLast.end.col)}P=(K-s)+1;if(s<1||R.cols<2||P>=R.cols){return}L=K;y.obj.barHelper().remove();do{var Q=y.obj.table(),u=y.col(Q[0],L),O=y.obj.barTop(L).remove(),M=u.tds,I=M.length-1;do{i(M[I]).remove()}while(I--);y.obj.barTop(L).remove();i(u).remove()}while(s<L--);y.controls.bar.x.td[y.i].splice(s,P);I=y.spreadsheets[y.i].length-P;do{y.spreadsheets[y.i][I].splice(s,P)}while(I-->1);y.refreshColumnLabels(s);y.setChanged(true);y.offsetFormulas({row:0,col:s},{row:0,col:-P},false,true);y.setDirty(true);y.evt.cellEditAbandon();y.obj.pane().resizeScroll();y.trigger("sheetDeleteColumn",L)},sheetTab:function(u,I){var s="";if(u){s=y.obj.table().attr("title")||y.msg.sheetTitleDefault.replace(/[{]index[}]/gi,y.i+1);if(I){I(s)}return s}else{if(y.isSheetEditable()&&J.editableNames){J.prompt(y.msg.newSheetTitle,function(K){if(!K){s=y.obj.table().attr("title");K=(s?s:y.msg.sheetTitleDefault.replace(/[{]index[}]/gi,y.i+1))}else{y.setDirty(true);y.obj.table().attr("title",K);y.obj.tab().html(K);s=K}if(I){I(i(n.createElement("div")).text(s).html())}},y.sheetTab(true));return null}}},tdNotVisible:function(u){var I=y.obj.pane(),K=u[0],R={top:0,bottom:I.clientHeight,left:0,right:I.clientWidth},O=u.width(),M=u.height(),P={top:K.offsetTop,bottom:K.offsetTop+M,left:K.offsetLeft,right:K.offsetLeft+O},s=u.parent();if(!K.col){return false}var Q=i(K.barTop).is(":hidden"),L=s.is(":hidden"),N={up:L,down:P.bottom>R.bottom&&M<=I.clientHeight,left:Q,right:P.right>R.right&&O<=I.clientWidth};if(N.up||N.down||N.left||N.right){return N}return false},followMe:function(I,s){I=I||y.obj.tdActive();if(!I.length){return}var K=y.obj.pane(),u=K.actionUI;y.setBusy(true);u.putTdInView(I[0]);y.setBusy(false);if(!s){y.autoFillerGoToTd(I)}},autoFillerGoToTd:function(K,u,s){if(!J.autoFiller){return}K=K||y.obj.tdActive();var L=K[0];if(L&&L.type=="cell"){u=u||L.clientHeight;s=s||L.clientWidth;if(!L.offsetHeight||!L.offsetWidth||!L.clientHeight||!L.clientWidth){y.autoFillerHide();return}var I=K.position();y.obj.autoFiller().show().css("top",((I.top+(u||K.height())-3)+"px")).css("left",((I.left+(s||K.width())-3)+"px"))}},autoFillerHide:function(){if(!J.autoFiller){return}y.obj.autoFiller().hide()},setActiveSheet:function(I){I=I||0;if(y.cellLast.row>0||y.cellLast.col>0){y.evt.cellEditDone();y.obj.formula().val("")}var u=y.obj.enclosures(),s=u.length-1,K;y.autoFillerHide();if(s>0){do{if(I!=s){K=u[s];K._scrollLeft=K._scrollLeft||K.scrollUI.scrollLeft;K._scrollTop=K._scrollTop||K.scrollUI.scrollTop;K.style.display="none"}}while(s-->0)}y.i=I;K=u[I];K.style.display="";y.themeRoller.tab.setActive();y.readOnly[I]=(K.table.className||"").match(/\breadonly\b/i)!=null;K.pane.resizeScroll(true);K.scrollUI.scrollLeft=K._scrollLeft||K.scrollUI.scrollLeft;K.scrollUI.scrollTop=K._scrollTop||K.scrollUI.scrollTop;K._scrollLeft=K._scrollTop=null;K.scrollUI.onscroll()},openSheet:function(I){var L=I.length-1,s=[],u=function(){y.setBusy(true);var Q=y.controlFactory.header(),P=y.controlFactory.ui(),M=y.controlFactory.sheetAdder(),N=y.controlFactory.tabContainer(),O;y.sheetCount=I.length-1;Q.ui=P;Q.tabContainer=N;P.header=Q;P.sheetAdder=M;P.tabContainer=N;N.header=Q;N.ui=P;J.parent.append(Q).append(P).append(M).append(N);for(O=0;O<I.length;O++){new K(y,O,P,I[O])}},K=function(R,N,Q,P){var O=this;this.i=N;this.ui=Q;this.table=P;this.isLast=(N==L);this.jS=R;if(i.sheet.max){var M=R.tableSize(P);if(M.rows>i.sheet.max||M.cols>i.sheet.max){R.trigger("sheetMaxSize",[P,N]);J.confirm(R.msg.maxSizeBrowserLimitationOnOpen,function(){O.load()})}else{this.load()}}else{this.load()}};K.prototype={load:function(){y.controlFactory.sheetUI(this.ui,this.table,this.i);y.sheetCount++;s.push(this.i);y.trigger("sheetOpened",[this.i]);if(this.isLast){this.loaded()}},loaded:function(){var N=this.jS,M=this.ui;N.resizableSheet(J.parent,{minWidth:J.parent.width()*0.1,minHeight:J.parent.height()*0.1,start:function(){N.setBusy(true);N.obj.enclosure().hide();M.sheetAdder.hide();M.tabContainer.hide()},stop:function(){N.obj.enclosure().show();M.sheetAdder.show();M.tabContainer.show();N.setBusy(false);N.sheetSyncSize();N.obj.pane().resizeScroll()}});N.sheetSyncSize();N.setActiveSheet(0);N.setDirty(false);N.setBusy(false);while(s.length){N.calcVisibleInit(N.i=s.pop())}N.trigger("sheetAllOpened")}};if(y.isDirty){J.confirm(y.msg.openSheet,u)}else{u()}},newSheet:function(){J.parent.html(i.sheet.makeTable()).sheet(J)},sheetSyncSize:function(){var L=J.parent[0].clientHeight;if(!L){L=400;J.parent.height(L)}else{if(L<200){L=200;J.parent.height(L)}}L-=y.obj.header().outerHeight();L-=y.obj.tabContainer().outerHeight()+y.s.boxModelCorrection;var u=J.parent[0].clientWidth,N=y.obj.ui.style,K=(L-k.scrollBarSize.height-J.boxModelCorrection)+"px",s=(u-k.scrollBarSize.width)+"px",M=L+"px",I=u+"px";y.obj.panes().each(function(){var Q=this.style,P=this.actionUI.scrollUI.style,O=this.enclosure.style;Q.height=K;Q.width=s;O.height=P.height=M;O.width=P.width=I});N.height=M;N.width=I},cellChangeStyle:function(I,K,s){s=s||y.highlighted(true);if(s.length<1){return false}y.setDirty(this);var u=s.length-1;if(u>=0){y.undo.createCells(s,function(L){do{L[u].td.css(I,K)}while(u--);return L});return true}return false},cellFind:function(s){function u(K){var I=y.obj.table().children("tbody").children("tr");if(K){var L=I.children('td:contains("'+K+'")');if(L.length<1){L=I.children('td:contains("'+K.toLowerCase()+'")')}if(L.length<1){L=I.children('td:contains("'+K.toUpperCase()+'")')}L=L.eq(0);if(L.length>0){y.cellEdit(L)}else{J.alert(y.msg.cellNoFind)}}}if(!s){J.prompt(y.msg.cellFind,u)}else{u(s)}},cellSetActiveBar:function(P,I,K){var U=y.sheetSize(),M=C.min(I,K),R=C.max(I,K),s={},Q={},T=function(V){switch(J.cellSelectModel){case"oo":this.row=(V?s.row:Q.row);this.col=(V?s.col:Q.col);this.td=y.getTd(y.i,this.row,this.col);if(!this.td.is(y.cellLast.td)){y.cellEdit(this.td,false,true)}break;default:this.row=(V?Q.row:s.row);this.col=(V?Q.col:s.col);this.td=y.getTd(y.i,this.row,this.col);if(!this.td.is(y.cellLast.td[0])){y.cellEdit(this.td,false,true)}break}},L=[],N=y.obj.pane().actionUI.scrolledArea,O=y.obj.table(),u,S;switch(P){case"top":s.row=N.end.row;s.col=M;Q.row=N.end.row;Q.col=R;y.highlightedLast.start.row=1;y.highlightedLast.start.col=M;y.highlightedLast.end.row=U.rows;y.highlightedLast.end.col=R;u=R;do{L.push(y.col(O[0],u))}while(u-->M);break;case"left":s.row=M;s.col=N.end.col;Q.row=R;Q.col=N.end.col;y.highlightedLast.start.row=M;y.highlightedLast.start.col=1;y.highlightedLast.end.row=R;y.highlightedLast.end.col=U.cols;S=R;do{L.push(y.getTd(y.i,S,1)[0].parentNode)}while(S-->M);break;case"corner":s.row=1;s.col=1;Q.col=U.cols;Q.row=U.rows;L.push(O[0]);break}new T(I>K);y.themeRoller.cell.setHighlighted(i(L))},getTdRange:function(K,P,N,O){y.cellLast.isEdit=true;var u=function(R){if(R.first.col>R.last.col||R.first.row>R.last.row){return{first:d.parseCellName(R.last.col,R.last.row),last:d.parseCellName(R.first.col,R.first.row)}}else{return{first:d.parseCellName(R.first.col,R.first.row),last:d.parseCellName(R.last.col,R.last.row)}}},M=function(U){var R=u(U),T=P+"";T=(T.match(/=/)?T:"="+T);if(N||T.charAt(T.length-1)!="("){T=T+(N?N:"")+"("}var V,S="";if(R.first!=R.last){V=R.first+":"+R.last}else{V=R.first}if(T.charAt(T.length-1)=="("){S=")"}return T+V+S},s="",I,L,Q;if(K){I={first:y.getTdLocation([K.target])};L=y.obj.table().mousemove(function(R){I.last=y.getTdLocation([R.target]);s=M(I);if(!O){y.obj.formula().val(s);y.obj.inPlaceEdit().val(s)}});w.one("mouseup",function(){L.unbind("mousemove");return s})}else{Q=y.highlighted().not(y.obj.tdActive());if(Q.length){I={first:y.getTdLocation(Q.first()),last:y.getTdLocation(Q.last())};s=M(I);if(!O){y.obj.formula().val(s);y.obj.inPlaceEdit().val(s)}return s}else{return""}}return""},getTd:function(L,N,u){var I=y.obj.tables()[L],s,K,M;if(!I||!(s=I.tBody)||!(K=s.children[N])||!(M=K.children[u])){M=n.createElement("td")}return i(M)},getTdLocation:function(u){var s={col:0,row:0};u=u||"";if(!u&&!u[0]){return s}u=u[0]||u;if(u.parentNode==G||u.parentNode.rowIndex<0){return s}return{col:parseInt(u.cellIndex),row:parseInt(u.parentNode.rowIndex)}},getBarIndex:{left:function(s){s=s||{};if(!s.parentNode||v(s.parentNode.rowIndex)){return -1}else{return s.parentNode.rowIndex}},top:function(s){s=s||{};if(v(s.cellIndex)){return -1}else{return s.cellIndex}},corner:function(){return 0}},time:{now:new m(),last:new m(),diff:function(){return C.abs(C.ceil(this.last.getTime()-this.now.getTime())/1000).toFixed(5)},set:function(){this.last=this.now;this.now=new m()},get:function(){return this.now.getHours()+":"+this.now.getMinutes()+":"+this.now.getSeconds()}},changed:[],isChanged:function(s){return y.changed[s||y.i]},setChanged:function(s){y.changed[y.i]=s},isDirty:false,setDirty:function(s){y.dirty=s},appendToFormula:function(s){var I=y.obj.formula(),u=I.val();if(u.charAt(0)!="="){u="="+u}I.val(u+s)},undo:{manager:(k.UndoManager?new UndoManager():{undo:E,redo:E,register:E,notLoaded:true}),cells:[],id:0,createCells:function(s,u,L){if(y.undo.manager.notLoaded){this.createCells=function(M,N,O){return N(M)};return this.createCells(s,u,L)}if(L==G){y.undo.id++;L=y.undo.id}var I=new t(s).clone().cells,K=(u?new t(u(s)).clone().cells:I);I.id=L;K.id=L;y.undo.manager.register(G,y.undo.removeCells,[I,L],"Remove Cells",G,y.undo.createCells,[K,null,L],"Create Cells");if(L!=y.undo.id||!u){y.calcLast=new m();y.undo.draw(K)}return true},removeCells:function(u,K){var I=0,s=-1;if(u.id===K){s=I}if(s!==-1){}y.undo.draw(u)},draw:function(I){var u;for(u=0;u<I.length;u++){var L=I[u],K=y.getTdLocation(L.td),s=y.spreadsheets[L.sheet][K.row][K.col];s.value=L.value;s.formula=L.formula;s.td=L.td;s.dependencies=L.dependencies;s.needsUpdated=L.needsUpdated;s.calcCount=L.calcCount;s.sheet=L.sheet;s.calcLast=L.calcLast;s.html=L.html;s.state=L.state;s.jS=L.jS;s.calcDependenciesLast=L.calcDependenciesLast;s.td.attr("style",L.style);s.td.attr("class",L.cl);y.updateCellValue.call(s)}}},cols:function(s){s=s||y.obj.table()[0];if(!s){return[]}if(!s.colGroup){return[]}if(!s.colGroup.children){return[]}return s.colGroup.children},tables:function(Q,L){Q=Q||y.obj.tables();var P=[],I=Q.length-1,u,S,O,s,T,K,R,M,N;do{S=(L?n.body.removeChild(Q[I]):Q[I].cloneNode(true));if((s=S.children[0])&&(T=s.children[0])){s.removeChild(T)}if(O=S.children[1]){M=O.children;R=M[0];O.removeChild(R);u=M.length-1;do{N=M[u];K=N.children[0];N.removeChild(K)}while(u-->0)}P[I]=S}while(I-->0);return y.sheetDecorateRemove(false,i(P))},col:function(u,s){u=u||y.obj.table()[0];var I=y.cols(u);if(s===G){s=I.length-1}return I[s]},rowTds:function(u,s){u=u||y.obj.table();var I=y.rows(u);if(!I.length){return[]}if(s==G){s=I.length-1}if(!I[s]){return[]}if(!I[s].children){return[]}return I[s].children},rows:function(s){s=s||y.obj.table()[0];if(!s){return[]}if(!s.tBody){return[]}if(!s.tBody.children){return[]}return s.tBody.children},highlighted:function(u){var K=y.highlightedLast.obj||i([]),L=[],s,I;if(!(s=K)||!K.length||!(s=s[0])||!s.tagName){return u?L:i(L)}switch(s.tagName){case"TD":I=K.length-1;do{L.unshift(u?K[I].jSCell:K[I])}while(I-->0);break;case"TR":I=K.length-1;do{if(K[I].tds){L=L.concat(u?K[I].jSCells:K[I].tds)}}while(I-->0);break;case"COL":K=K.filter("col");I=K.length-1;do{if(K[I].tds){L=L.concat(u?K[I].jSCells:K[I].tds)}}while(I-->0);break;case"TABLE":L=(u?s.jSCells:s.tds);break}return u?L:i(L)},sheetSize:function(u){u=u||y.obj.table()[0];var s=y.rowTds(u),I=y.getTdLocation(s[s.length-1]);return{cols:I.col,rows:I.row}},test:function(){var u=y.highlighted(true);console.log(y.obj.enclosure())},sortVerticalSelectAscending:function(){if(confirm("Do you want to extend your selection?")){y.sortVertical();return true}else{y.sortVerticalSingle(false);return true}},sortVerticalSelectDescending:function(){if(confirm("Do you want to extend your selection?")){y.sortVertical();return false}else{y.sortVerticalSingle(true);return false}},sortVertical:function(Q){var O=y.highlighted(true),L=O[0].td.parent().prev(),s=O.length,I=new m(),N=true,R=[],T=[],M,P=0,S,u,K;while(P<s){S=O[P];K=S.td[0];if(!isNaN(S.value)){u=(new l(S.value.valueOf()))}else{N=false;u=(new o(S.value.valueOf()))}u.loc=y.getTdLocation(K);u.row=K.parentNode;u.col=K;u.cell=S;R.push(u);P++}if(Q){if(N==false){R.sort(function(V,U){return U-V})}else{R.sort();R.reverse()}}else{if(N==true){R.sort(function(V,U){return V-U})}else{R.sort()}}y.undo.createCells(O);while(M=R.length){u=R.pop();T=y.spreadsheets[y.i].splice(u.row.rowIndex,1);S=u.cell;S.value=u.valueOf();S.calcLast=0;u.row.parentNode.removeChild(u.row);L.after(u.row);u.row.children[0].innerHTML=L[0].rowIndex+M;y.spreadsheets[y.i].splice(L[0].rowIndex+1,0,T[0]);y.calcDependencies.call(S,I,true)}y.undo.createCells(O)},sortVerticalSingle:function(M){var K=y.highlighted(true),L=K.length,I=0,u=[],s;while(I<L){u.push(K[I].value);I++}if(M){u.sort(function(O,N){return N-O})}else{u.sort(function(O,N){return O-N})}while(K.length){s=K.pop();s.value=u[K.length];s.calcLast=0;y.updateCellValue.call(s);y.updateCellDependencies.call(s)}},sortHorizontalSelectAscending:function(){if(confirm("Do you want to extend your selection?")){y.sortHorizontal();return true}else{y.sortHorizontalSingle(false);return true}},sortHorizontalSelectDescending:function(){if(confirm("Do you want to extend your selection?")){y.sortHorizontal();return false}else{y.sortHorizontalSingle(true);return false}},sortHorizontal:function(Q){var O=y.highlighted(true),W=O[0].td[0],S=W.cellIndex,s=W.table.colGroup,X=y.sheetSize().rows,u=O.length,K=new m(),N=true,T=[],M,P=0,U,V,I,R,L;while(P<u){U=0;V=O[P];L=V.td[0];if(!isNaN(V.value)){I=new l(V.value.valueOf())}else{N=false;I=new o(V.value.valueOf())}I.tds=[];I.loc=y.getTdLocation(L);I.tr=L.parentNode;I.td=L;I.cell=V;while(U<=X){I.tds.push(y.obj.pane().table.children[1].children[U].children[L.cellIndex]);U++}T.push(I);P++}if(Q){if(N==false){T.sort(function(Z,Y){return Y-Z})}else{T.sort();T.reverse()}}else{if(N==true){T.sort(function(Z,Y){return Z-Y})}else{T.sort()}}y.undo.createCells(O);while(T.length){I=T.pop();while(I.tds.length>1){L=I.tds.pop();R=L.parentNode;V=y.spreadsheets[y.i][R.rowIndex].splice(L.cellIndex,1);R.insertBefore(L,R.children[S]);L.col=s.children[T.length+L.cellIndex-1];L.barTop=L.col.bar;V.value=L.jSCell.value;V.calcLast=K;y.spreadsheets[y.i][R.rowIndex].splice(L.cellIndex,0,V[0]);y.calcDependencies.call(V,K,true)}}y.undo.createCells(O)},sortHorizontalSingle:function(M){var K=y.highlighted(true),L=K.length,I=0,u=[],s;while(I<L){u.push(K[I].value);I++}if(M){u.sort(function(O,N){return N-O})}else{u.sort(function(O,N){return O-N})}while(K.length){s=K.pop();s.value=u[K.length];s.calcLast=0;y.updateCellValue.call(s);y.updateCellDependencies.call(s)}},tableSize:function(I){I=I||y.obj.table()[0];var s=(I.children[0].nodeName!="TBODY"?I.children[1]:I.children[0]).children,u=s[s.length-1].children,L=u[u.length-1],K=y.getTdLocation(L);return{cols:K.col,rows:K.row}},toggleState:function(s){if(J.allowToggleState){var u=s||y.tables();if(J.editable){y.evt.cellEditAbandon();y.trigger("sheetSave",[u])}y.setDirty(false);y.setChanged(true);J.editable=!J.editable;y.kill();J.parent.html(u).sheet(J);J=null}},setCellRef:function(u){function s(L){if(L){y.s.formulaVariables[L]=y.updateCellValue(y.i,I.row,I.col)}}var K=y.obj.tdActive(),I=y.getTdLocation(K);if(u){s(u)}else{J.prompt(y.msg.setCellRef,s)}},formulaParser:null};y.setBusy(true);J.parent[0].jS=y;if(!k.console){k.console={log:function(){}}}if(!k.scrollBarSize){k.scrollBarSize=i.sheet.getScrollBarSize()}if(k.Formula){y.formulaParser=k.Formula(y.cellHandler)}J.origHtml=J.parent.children().detach();J.parent.addClass(y.cl.parent);J.parent.bind("sheetSwitch",function(I,u,s){y.switchSheet(s)}).bind("sheetRename",function(I,u,s){y.renameSheet(s)});J.width=(J.width?J.width:J.parent.width());J.height=(J.height?J.height:J.parent.height());if(!i.nearest){y.nearest=E}y.resizableCells=y.resizableSheet=y.resizable;if(!i.ui){y.resizable=y.resizableCells=y.resizableSheet=y.draggable=E}else{if(!J.resizableCells){y.resizableCells=E}if(!J.resizableSheet){y.resizableSheet=E}}if(!i.support.boxModel){J.boxModelCorrection=0}if(!J.barMenus){y.controlFactory.barMenuTop=y.controlFactory.barMenuLeft=E}if(!J.freezableCells){y.controlFactory.barHandleFreeze.top=y.controlFactory.barHandleFreeze.left=E}if(J.calcOff){y.calc=E}if(!k.Raphael){d.chart=E}r.resize(function(){if(y&&!y.isBusy()){J.width=J.parent.width();J.height=J.parent.height();y.sheetSyncSize()}});if(i.sheet.fn){i.sheet.fn=i.extend(i.sheet.fn,J.formulaFunctions);if(i.sheet.advancedfn){i.sheet.fn=i.extend(i.sheet.fn,i.sheet.advancedfn)}if(i.sheet.financefn){i.sheet.fn=i.extend(i.sheet.fn,i.sheet.financefn)}}J.title=J.title||J.parent.attr("title")||"";y.s=J;J.parent.addClass(y.cl.uiParent);if(J.origHtml.length){y.openSheet(J.origHtml)}else{y.openSheet(i(n.createElement("table")))}y.setBusy(false);return y},makeTable:function(D,t,r){var B=n;D=D||{rows:25,cols:10};t=t||120;r=r||15;var C=n.createElement("table"),s=n.createElement("colgroup"),A=n.createElement("tbody"),x="width:"+t+"px;",v="height:"+r+"px;",z,u,y,w;y=D.cols;do{u=n.createElement("col");u.setAttribute("style",x);s.appendChild(u)}while(y-->1);y=D.rows;do{z=n.createElement("tr");z.setAttribute("style",v);w=D.cols;do{z.appendChild(n.createElement("td"))}while(w-->1);A.appendChild(z)}while(y-->1);C.appendChild(s);C.appendChild(A);return C},killAll:function(){if(i.sheet){var r=i.sheet.instance;if(r){for(var s=0;s<r.length;s++){if(r[s]&&r[s].kill){r[s].kill()}}i.sheet.instance=[]}}},scrollLocker:function(s){var r=i.sheet.instance;r[s].obj.panes().each(function(t){var u;i(u=this.scrollUI).scroll(function(w){var v=r.length-1,x;if(v>-1){do{x=r[v].controls.enclosure[t][0].scrollUI;if(this!==x){x.scrollLeft=u.scrollLeft;x.scrollTop=u.scrollTop}}while(v--)}})})},switchSheetLocker:function(r){i.each(i.sheet.instance,function(){this.s.parent.bind("sheetSwitch",function(u,t,s){i.each(i.sheet.instance,function(){this.setActiveSheet(s)})})})},I:function(){var r=0;if(this.instance){r=(this.instance.length===0?0:this.instance.length-1)}else{this.instance=[]}return r},getScrollBarSize:function(){var x=n,A=i(n.createElement("p")).css({width:"100%",height:"100%"}),z=i(n.createElement("div")).css({position:"absolute",width:"100px",height:"100px",top:"0",left:"0",visibility:"hidden",overflow:"hidden"}).append(A);i(n.body).append(z);var t=A.width(),v=A.height();z.css("overflow","scroll");var r=A.width(),u=A.height();if(t==r&&z[0].clientWidth){r=z[0].clientWidth}if(v==u&&z[0].clientHeight){u=z[0].clientHeight}z.detach();var y=t-r,s=v-u;return{width:y||15,height:s||15}},debugPositionBox:function(r,w,t,s,v){s=s||"#"+c.floor(c.random()*16777215).toString(16);if(t){var u=i([]);u=u.add(this.debugPositionBox(t.left,t.top,null,s,"top-left"));u=u.add(this.debugPositionBox(t.right,t.top,null,s,"top-right"));u=u.add(this.debugPositionBox(t.left,t.bottom,null,s,"bottom-left"));u=u.add(this.debugPositionBox(t.right,t.bottom,null,s,"bottom-right"));return u}return i('<div style="width: 10px; height: 10px; position: absolute;"></div>').css("top",(w-5)+"px").css("left",(r+5)+"px").css("background-color",s).click(function(){console.log(v||"none")}).appendTo("body")}};var d=i.sheet.engine={calc:function(t,r,u){r=r||[];var v=r.length-1,s;if(v>0){do{if(v>0&&r[v]){s=r[v].length-1;if(s>0){do{u(t,v,s)}while(s--)}}}while(v--)}},parseLocation:function(s){for(var r=0;r<s.length;r++){if(s.charCodeAt(r)<=57){break}}return{row:parseInt(s.substring(r)),col:d.columnLabelIndex(s.substring(0,r))}},parseSheetLocation:function(r){return((r+"").replace("SHEET","")*1)-1},parseCellName:function(r,s){return d.columnLabelString(r)+(s||"")},alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),columnLabels:{},columnLabelIndex:function(r){return this.columnLabels[r.toUpperCase()]},columnIndexes:[],columnLabelString:function(v){if(!this.columnIndexes.length){var x="",w,u,t,r;w=u=t=-1;for(r=1;r<16385;++r){x="";++t;if(t==26){t=0;++u;if(u==26){u=0;++w}}if(w>=0){x+=this.alphabet[w]}if(u>=0){x+=this.alphabet[u]}if(t>=0){x+=this.alphabet[t]}this.columnIndexes[r]=x;this.columnLabels[x]=r}}return this.columnIndexes[v]||""},regEx:{n:/[\$,\s]/g,cell:/\$?([a-zA-Z]+|[#]REF[!])\$?([0-9]+|[#]REF[!])/gi,range:/\$?([a-zA-Z]+)\$?([0-9]+):\$?([a-zA-Z]+)\$?([0-9]+)/gi,remoteCell:/\$?(SHEET+)\$?([0-9]+)[:!]\$?([a-zA-Z]+)\$?([0-9]+)/gi,remoteCellRange:/\$?(SHEET+)\$?([0-9]+)[:!]\$?([a-zA-Z]+)\$?([0-9]+):\$?([a-zA-Z]+)\$?([0-9]+)/gi,sheet:/SHEET/i,amp:/&/g,gt:/</g,lt:/>/g,nbsp:/&nbsp;/g},chart:function(u){var t=this.jS,r=this;function s(w,x){if(!w){if(x){w=0}else{w=""}}else{if(x){w=f.toNumbers(w)}else{w=f.flatten(w)}}return w}u=i.extend({x:{legend:"",data:[0]},y:{legend:"",data:[0]},title:"",data:[0],legend:"",td:this.td,chart:i(n.createElement("div")).addClass(t.cl.chart).mousedown(function(){u.td.mousedown()}),gR:{}},u);t.controls.chart[t.i]=t.obj.chart().add(u.chart);u.data=s(u.data,true);u.x.data=s(u.x.data,true);u.y.data=s(u.y.data,true);u.legend=s(u.legend);u.x.legend=s(u.x.legend);u.y.legend=s(u.y.legend);u.legend=(u.legend?u.legend:u.data);t.s.parent.one("sheetCalculation",function(){var w=u.chart.width(),v=u.chart.height(),x=Raphael(u.chart[0]);if(u.title){x.text(w/2,10,u.title).attr({"font-size":20})}switch(u.type){case"bar":u.gR=x.barchart(w/8,v/8,w*0.8,v*0.8,u.data,u.legend).hover(function(){this.flag=x.popup(this.bar.x,this.bar.y,this.bar.value||"0").insertBefore(this)},function(){this.flag.animate({opacity:0},300,function(){this.remove()})});break;case"hbar":u.gR=x.hbarchart(w/8,v/8,w*0.8,v*0.8,u.data,u.legend).hover(function(){this.flag=x.popup(this.bar.x,this.bar.y,this.bar.value||"0").insertBefore(this)},function(){this.flag.animate({opacity:0},300,function(){this.remove()})});break;case"line":u.gR=x.linechart(w/8,v/8,w*0.8,v*0.8,u.x.data,u.y.data,{nostroke:false,axis:"0 0 1 1",symbol:"circle",smooth:true}).hoverColumn(function(){this.tags=x.set();if(this.symbols.length){for(var y=0,z=this.y.length;y<z;y++){this.tags.push(x.tag(this.x,this.y[y],this.values[y],160,10).insertBefore(this).attr([{fill:"#fff"},{fill:this.symbols[y].attr("fill")}]))}}},function(){this.tags&&this.tags.remove()});break;case"pie":u.gR=x.piechart(w/2,v/2,(w<v?w:v)/2,u.data,{legend:u.legend}).hover(function(){this.sector.stop();this.sector.scale(1.1,1.1,this.cx,this.cy);if(this.label){this.label[0].stop();this.label[0].attr({r:7.5});this.label[1].attr({"font-weight":800})}},function(){this.sector.animate({transform:"s1 1 "+this.cx+" "+this.cy},500,"bounce");if(this.label){this.label[0].animate({r:5},500,"bounce");this.label[1].attr({"font-weight":400})}});break;case"dot":u.gR=x.dotchart(w/8,v/8,w*0.8,v*0.8,u.x.data,u.y.data,u.data,{symbol:"o",max:10,heat:true,axis:"0 0 1 1",axisxstep:u.x.data.length-1,axisystep:u.y.data.length-1,axisxlabels:(u.x.legend?u.x.legend:u.x.data),axisylabels:(u.y.legend?u.y.legend:u.y.data),axisxtype:" ",axisytype:" "}).hover(function(){this.marker=this.marker||x.tag(this.x,this.y,this.value,0,this.r+2).insertBefore(this);this.marker.show()},function(){this.marker&&this.marker.hide()});break}u.gR.mousedown(function(){u.td.mousedown().mouseup()});u.chart.mousemove(function(){u.td.mousemove();return false})});return u.chart}};var e=i.sheet.fn={ISNUMBER:function(s){var r;if(!isNaN(s.valueOf())){r=new g(true);r.html="TRUE";return r}r=new g(false);r.html="FALSE";return r},N:function(r){if(r==null){return 0}if(r instanceof m){return r.getTime()}if(typeof(r)=="object"){r=r.toString()}if(typeof(r)=="string"){r=parseFloat(r.replace(d.regEx.n,""))}if(isNaN(r)){return 0}if(typeof(r)=="number"){return r}if(r==true){return 1}return 0},VERSION:function(){return this.jS.version},ABS:function(r){return c.abs(e.N(r))},CEILING:function(s,r){r=r||1;return(parseInt(s/r)*r)+r},EVEN:function(r){r=c.round(r);var s=(r%2==0);if(!s){if(r>0){r++}else{r--}}return r},EXP:function(r){return c.exp(r)},FLOOR:function(t,s){s=s||1;if((t<0&&s>0)||(t>0&&s<0)){var r=new l(0);r.html="#NUM";return r}if(t>=0){return c.floor(t/s)*s}else{return c.ceil(t/s)*s}},INT:function(r){return c.floor(e.N(r))},LN:function(r){return c.log(r)},LOG:function(r,s){s=s||10;return c.log(r)/c.log(s)},LOG10:function(r){return e.LOG(r)},MOD:function(r,t){var s=r%t;if(t<0){s*=-1}return s},ODD:function(r){var t=false;if(r>0){r=c.floor(c.round(r));t=true}else{r=c.ceil(r)}var s=c.abs(r);if((s%2)==0){s++}if(t){return s}else{return -s}},PI:function(){return c.PI},POWER:function(r,s){return c.pow(r,s)},SQRT:function(r){return c.sqrt(r)},RAND:function(){return c.random()},RND:function(){return c.random()},ROUND:function(t,s){var r=c.pow(10,s||0);return c.round(t*r)/r},ROUNDDOWN:function(s,r){var t=(s<0);s=c.abs(s);r=r||0;s=c.floor(s*c.pow(10,r))/c.pow(10,r);return(t?-s:s)},ROUNDUP:function(s,r){var t=(s<0);s=c.abs(s);r=r||0;s=c.ceil(s*c.pow(10,r))/c.pow(10,r);return(t?-s:s)},SUM:function(){var t=0,r=f.toNumbers(arguments),s=r.length-1;if(s<0){return 0}do{t+=r[s]*1}while(s--);return t},TRUNC:function(r,s){s=s||0;r=r+"";if(s==0){return r.split(".").shift()}if(r.match(".")){if(s==1){r=r.substr(0,r.length-1)}else{if(s==-1){r=r.split(".").shift();r=r.substr(0,r.length-1)+"0"}}}return r},AVERAGE:function(r){return e.SUM(arguments)/e.COUNT(arguments)},AVG:function(r){return e.AVERAGE(r)},COUNT:function(){var t=0,r=f.toNumbers(arguments),s=r.length-1;if(s<0){return t}do{if(r[s]!==null){t++}}while(s--);return t},COUNTA:function(){var t=0,r=f.flatten(arguments),s=r.length-1;if(s<0){return t}do{if(r[s]){t++}}while(s--);return t},MAX:function(){var s=f.toNumbers(arguments),r=s[0],t=s.length-1;if(t<0){return 0}do{r=(s[t]>r?s[t]:r)}while(t--);return r},MIN:function(){var r=f.toNumbers(arguments),t=r[0],s=r.length-1;if(s<0){return 0}do{t=(r[s]<t?r[s]:t)}while(s--);return t},ASC:function(r){return r.charCodeAt(0)},CHAR:function(r){return o.fromCharCode(r)},CLEAN:function(r){var s=new q("[cG\x1BcLcJcMcIcK\x07\x1B\f\n\r\t\v]","g");return r.replace(s,"")},CODE:function(r){return e.ASC(r)},CONCATENATE:function(){var t=f.flatten(arguments),s="",r=this;jQuery.each(t,function(u){s+=t[u]});return s},DOLLAR:function(u,t,x){t=t||2;x=x||"$";var s=new l(u),w=e.FIXED(u,t,false);if(u>=0){s.html=x+w}else{s.html="("+x+w.slice(1)+")"}return s},FIXED:function(u,t,s){t=(t===undefined?2:t);var w=c.pow(10,t),r,u=c.round(u*w)/w;r=new o(u.toFixed(t));r.html=Globalize.format(u,"n"+t);if(s){r.html=r.html.replace(Globalize.culture().numberFormat[","],"")}return r},LEFT:function(r,s){s=s||1;return r.substring(0,s)},LEN:function(r){if(!r){return 0}return r.length},LOWER:function(r){return r.toLowerCase()},MID:function(s,t,r){if(!s||!t||!r){return this.jS.s.error({error:"ERROR"})}return s.substring(t-1,r+t-1)},REPLACE:function(s,v,t,u){if(!s||!v||!t||!u){return this.jS.s.error({error:"ERROR"})}var r=s.split("");r.splice(v-1,t);r.splice(v-1,0,u);return r.join("")},REPT:function(s,u){var r="";for(var t=0;t<u;t++){r+=s}return r},RIGHT:function(r,s){s=s||1;return r.substring(r.length-s,r.length)},SEARCH:function(t,r,u){u=u||0;if(u){r=r.split("");r.splice(0,u-1);r=r.join("")}var s=r.search(t);if(s<0){return this.jS.s.error({error:"#VALUE!"})}return u+(u?0:1)+s},SUBSTITUTE:function(u,r,t,v){v=v||0;r=new q(r,"g");var s=1;u=u.replace(r,function(x,z,A,y){var w=x;if(v){if(s>=v){w=t}}else{w=t}s++;return w});return u},TEXT:function(){return this.jS.s.error({error:"Not Yet Implemented"})},UPPER:function(r){return r.toUpperCase()},VALUE:function(r){if(jQuery.isNumeric(r)){return r*=1}else{return this.jS.s.error({error:"#VALUE!"})}},NOW:function(){var r=new m();r.html=b.toString(r);return r},TODAY:function(){var s=new m(),r=new l(b.toCentury(s)-1);r.html=b.toString(s,"d");return r},WEEKENDING:function(s){var r=new m();r=new m(r.getFullYear(),r.getMonth(),r.getDate()+5-r.getDay()-((s||0)*7));r.html=b.toString(r,"d");return r},WEEKDAY:function(s,t){s=b.get(s);var r=s.getDay();t=(t?t:1);switch(t){case 3:switch(r){case 0:return 7;case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 6}break;case 2:switch(r){case 0:return 6;case 1:return 0;case 2:return 1;case 3:return 2;case 4:return 3;case 5:return 4;case 6:return 5}break;case 1:r++;break}return r},WEEKNUM:function(r){r=b.get(r);return b.week(r)+1},YEAR:function(r){r=b.get(r);return r.getFullYear()},DAYSFROM:function(s,t,r){return c.floor((new m()-new m(s,(t-1),r))/b.dayDiv)},DAYS:function(v,t){var s=b.get(v),r=b.get(t),u=1000*60*60*24;return c.round(c.abs(s.getTime()-r.getTime())/u)},DAY:function(r){r=b.get(r);return r.getDate()},DAYS360:function(w,t,y){w=b.get(w);t=b.get(t);var r=w.getDate(),v=t.getDate(),u=b.isLastDayOfMonth(w),x=b.isLastDayOfMonth(t),s=b.diffMonths(w,t);if(y){r=c.min(r,30);v=c.min(v,30)}else{if(u){r=30}if(x){if(r<30){s++;v=1}else{v=30}}}return(s*30)+(v-r)},DATE:function(u,v,s){var t=new m(u,v-1,s),r=new l(b.toCentury(t));r.html=b.toString(t,"d");return r},DATEVALUE:function(s){s=b.get(s);var r=new l(b.toCentury(s));r.html=b.toString(s,"d");return r},EDATE:function(t,s){t=b.get(t);t.setMonth(t.getMonth()+s);var r=new l(b.toCentury(t));r.html=b.toString(t,"d");return r},EOMONTH:function(t,s){t=b.get(t);t.setMonth(t.getMonth()+s+1);t=new m(t.getFullYear(),t.getMonth(),0);var r=new l(b.toCentury(t));r.html=b.toString(t,"d");return r},HOUR:function(r){r=a.fromMath(r);return r.hour},MINUTE:function(r){return a.fromMath(r).minute},MONTH:function(r){r=b.get(r);return r.getMonth()+1},SECOND:function(r){return a.fromMath(r).second},TIME:function(r,w,s){s=(s?s:0);w=(w?w:0);r=(r?r:0);if(s&&s>60){var t=(((s/60)+"").split(".")[0])*1;s=s-(t*60);w+=t}if(w&&w>60){var v=(((w/60)+"").split(".")[0])*1;w=w-(v*60);r+=v}var u=(r*60*60*1000)+(w*60*1000)+(s*1000);return u/b.dayDiv},TIMEVALUE:function(r){if(!isNaN(r)){return r}if(/([0]?[1-9]|1[0-2])[:][0-5][0-9]([:][0-5][0-9])?[ ]?(AM|am|aM|Am|PM|pm|pM|Pm)/.test(r)){return a.fromString(r,true)}else{if(/([0]?[0-9]|1[0-9]|2[0-3])[:][0-5][0-9]([:][0-5][0-9])?/.test(r)){return a.fromString(r)}}return 0},WORKDAY:function(s,v,u){var w={1:true,2:true,3:true,4:true,5:true},s=b.get(s),v=(v&&!isNaN(v)?v:0),x=0,t=0,r=s,z;if(u){if(!jQuery.isArray(u)){u=[u]}u=f.flatten(u);var y={};jQuery.each(u,function(A){if(u[A]){y[b.toString(b.get(u[A]),"d")]=true}});u=y}else{u={}}while(t<v){r=new m(r.setDate(r.getDate()+1));if(w[r.getDay()]){if(!u[b.toString(r,"d")]){t++}}x++}z=new l(b.toCentury(r));z.html=b.toString(r,"d");return z},YEARFRAC:function(r,v,u){r=b.get(r);v=b.get(v);if(!r||!v){return this.jS.s.error({error:"#VALUE!"})}u=(u?u:0);this.html=[];var t=b.diff(r,v,u),s=b.calcAnnualBasis(r,v,u);return t/s},AND:function(){var s=arguments,t,r=this;i.each(s,function(u){if(s[u].valueOf()!==true&&t==undefined){t=e.FALSE()}});if(!t){t=e.TRUE()}return t},FALSE:function(){var r=new g(false);r.html="FALSE";return r},IF:function(t,s,r){if(t.valueOf()){return s}else{return r}},NOT:function(s){var r;if(!s.valueOf()){r=new g(true);r.html="TRUE"}else{r=new g(false);r.html="FALSE"}return r},OR:function(){var t=arguments,r,u=t.length-1,s;if(u>-1){do{s=t[u].valueOf();if(s){r=new g(true);r.html="TRUE";return r}}while(u--)}r=new g(false);r.html="FALSE";return r},TRUE:function(){var r=new g(true);r.html="TRUE";return r},GREATER:function(t,s){var r;if(t>s){r=new g(true);r.html="TRUE"}else{r=new g(false);r.html="FALSE"}return r},LESS:function(t,s){var r;if(t<s){r=new g(true);r.html="TRUE"}else{r=new g(false);r.html="FALSE"}return r},EQUAL:function(t,s){var r;if(t.valueOf()==s.valueOf()){r=new g(true);r.html="TRUE"}else{r=new g(false);r.html="FALSE"}return r},GREATER_EQUAL:function(t,s){var r;if(t>=s){r=new g(true);r.html="TRUE"}else{r=new g(false);r.html="FALSE"}return r},LESS_EQUAL:function(t,s){var r;if(t<=s){r=new g(true);r.html="TRUE"}else{r=new g(false);r.html="FALSE"}return r},IMG:function(s){var r=new o("");r.html=i(n.createElement("img")).attr("src",s);return r},TRIM:function(r){if(typeof(r)=="string"){r=i.trim(r)}return r},HYPERLINK:function(t,s){s=s||"LINK";var r=new o(s);r.html=i(n.createElement("a")).attr("href",t).attr("target","_new").text(s);return r},DROPDOWN:function(){var B=this,x=this.jS,A,w=this.td.children().detach(),y,t=i(B.td),z,s,C;if(!w.length||B.needsUpdated){A=f.flatten(arguments);A=f.unique(A);y=x.getTdLocation(B.td);s="dropdown"+this.sheet+"_"+y.row+"_"+y.col+"_"+x.I;z=n.createElement("select");z.setAttribute("name",s);z.setAttribute("id",s);z.className="jSDropdown";z.cell=this;z.onmouseup=function(){x.cellEdit(t)};z.onchange=function(){B.value=this.value;x.calcDependencies.call(B,B.calcDependenciesLast)};x.controls.inputs[x.i]=x.obj.inputs().add(z);for(var u=0;u<(A.length<=50?A.length:50);u++){if(A[u]){var r=n.createElement("option");r.setAttribute("value",A[u]);r.text=r.innerText=A[u];z.appendChild(r)}}if(!x.s.editable){z.setAttribute("disabled",true)}else{x.s.parent.bind("sheetKill",function(){t.text(B.value=z.value)})}z.value=B.value||A[0];z.onchange()}if(typeof B.value!="object"){C=new o(B.value)}C.html=z;return C},RADIO:function(){var E=this,y=this.jS,D,x=this.td.children().detach(),A,t,z,r,u,s,F;if(!x.length||E.needsUpdated){D=f.flatten(arguments);D=f.unique(D);A=y.getTdLocation(E.td);t=i(E.td);z=[];s="radio"+this.sheet+"_"+A.row+"_"+A.col+"_"+y.I;u=n.createElement("span");u.className="jSRadio";u.onmousedown=function(){y.cellEdit(t)};u.jSCell=E;y.controls.inputs[y.i]=y.obj.inputs().add(u);for(var w=0;w<(D.length<=25?D.length:25);w++){if(D[w]){var C=n.createElement("input"),B=n.createElement("span");C.setAttribute("type","radio");C.setAttribute("name",s);C.className=s;C.value=D[w];C.onchange=function(){E.value=jQuery(this).val();y.calcDependencies.call(E,E.calcDependenciesLast)};z.push(C);if(D[w]==E.value){C.setAttribute("checked","true");C.onchange()}B.textContent=B.innerText=D[w];u.appendChild(C);u.input=C;B.onclick=function(){i(this).prev().click()};u.appendChild(B);u.appendChild(n.createElement("br"))}}r=i(z);if(!y.s.editable){E.value=r.filter(":checked").val();r.attr("disabled",true)}else{y.s.parent.bind("sheetKill",function(){E.value=r.filter(":checked").val();t.text(E.value)})}}if(typeof E.value!="object"){F=new o(E.value)}F.html=u;return F},CHECKBOX:function(z){if(i.isArray(z)){z=z[0]}var A=this,u=this.jS,t=this.td.children().detach(),x,w,s,y,r,B;if((!t.length||A.needsUpdated)){x=u.getTdLocation(A.td);w=i([]);s=i(A.td);r="checkbox"+this.sheet+"_"+x.row+"_"+x.col+"_"+u.I;w=n.createElement("input");w.setAttribute("type","checkbox");w.setAttribute("name",r);w.className=r;w.value=z;w.onchange=function(){if(i(this).is(":checked")){A.value=z}else{A.value=""}u.calcDependencies.call(A,A.calcDependenciesLast)};if(!u.s.editable){w.setAttribute("disabled","true")}else{u.s.parent.bind("sheetKill",function(){A.value=(A.value=="true"||i(w).is(":checked")?z:"");s.text(A.value)})}t=n.createElement("span");t.className="SCheckbox";t.appendChild(w);y=n.createElement("span");y.textContent=y.innerText=z;t.appendChild(y);t.appendChild(n.createElement("br"));t.onmousedown=function(){u.cellEdit(s)};t.cell=A;u.controls.inputs[u.i]=u.obj.inputs().add(t);if(z==A.value){w.setAttribute("checked",true);w.onchange()}}B=new o(A.value=="true"||i(w).is(":checked")?z:"");B.html=t;return B},BARCHART:function(s,t,u){var r=new o("");r.html=d.chart.call(this,{type:"bar",data:s,legend:t,title:u});return r},HBARCHART:function(s,t,u){var r=new o("");r.html=d.chart.call(this,{type:"hbar",data:s,legend:t,title:u});return r},LINECHART:function(t,s){var r=new o("");r.html=d.chart.call(this,{type:"line",x:{data:t},y:{data:s},title:""});return r},PIECHART:function(s,t,u){var r=new o("");r.html=d.chart.call(this,{type:"pie",data:s,legend:t,title:u});return r},DOTCHART:function(x,v,s,u,t,w){var r=new o("");r.html=d.chart.call(this,{type:"dot",data:(s?s:x),x:{data:x,legend:u},y:{data:(v?v:x),legend:(t?t:u)},title:w});return r},CELLREF:function(r){return(this.jS.spreadsheets[r]?this.jS.spreadsheets[r]:"Cell Reference Not Found")},CALCTIME:function(u,s){u=u||"";s=s||"";var r=this,t=this.jS;this.jS.s.parent.one("sheetCalculation",function(){t.time.last=t.calcLast;r.td.text(u+t.time.diff()+s)});return""},HLOOKUP:function(y,w,v,s){var x=this.jS,u=this.jS.cellLookup.call(this),r={html:"#N/A",value:""};v=v||1;s=s!==undefined?s:true;if(isNaN(y)){var t=w[0].indexOf(y);if(t>-1){r=x.updateCellValue(u[t].sheet,v,x.getTdLocation(u[t].td).col)}}else{f.getClosestNum(y,w[0],function(B,A){var z=x.updateCellValue(u[A].sheet,v,x.getTdLocation(u[A].td).col);if(s){r=z}else{if(z==y){r=z}}})}return r},VLOOKUP:function(y,w,v,s){var x=this.jS,u=this.jS.cellLookup.call(this),r={html:"#N/A",value:""};s=s!==undefined?s:true;if(isNaN(y)){var t=w[0].indexOf(y);if(t>-1){r=x.updateCellValue(u[t].sheet,v,x.getTdLocation(u[t].td).col)}}else{f.getClosestNum(y,w[0],function(B,A){var z=x.updateCellValue(u[A].sheet,x.getTdLocation(u[A].td).row,v);if(s){r=z}else{if(z==y){r=z}}})}return r},THISROWCELL:function(r){var s=this.jS,t=s.getTdLocation(this.td);if(isNaN(r)){r=d.columnLabelIndex(r)}return s.updateCellValue(this.sheet,t.row,r)},THISCOLCELL:function(t){var r=this.jS,s=r.getTdLocation(this.td);return r.updateCellValue(this.sheet,t,s.col)}};var p={BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,ALT:18,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,C:67,F:70,V:86,X:88,Y:89,Z:90};var f=k.arrHelpers={math:c,toNumbers:function(r){r=this.flatten(r);var s=r.length-1;if(s<0){return[]}do{if(r[s]){r[s]=i.trim(r[s]);if(isNaN(r[s])){r[s]=0}else{r[s]=r[s]*1}}else{r[s]=0}}while(s--);return r},unique:function(r){var t=[],s=r.length;for(var v=0;v<s;v++){for(var u=v+1;u<s;u++){if(r[v]===r[u]){u=++v}}t.push(r[v])}return t},flatten:function(r){var v=[];for(var t=0,s=r.length;t<s;t++){var u=Object.prototype.toString.call(r[t]).split(" ").pop().split("]").shift().toLowerCase();if(u){v=v.concat(/^(array|collection|arguments|object)$/.test(u)?this.flatten(r[t]):r[t])}}return v},insertAt:function(r,t,s){i(t).each(function(){if(s>-1&&s<=r.length){r.splice(s,0,this)}});return r},closest:function(v,s,t,r){v=v||[];s=s||0;t=t||0;r=r||v.length-1;var u;while(true){u=((t+r)>>1);if(u===r||u===t){return v[u]}if(v[u]>s){r=u}else{if(v[u]<s){t=u}else{return v[u]}}}},getClosestNum:function(t,r,v){var u=0,s,y,x,w;if(r.length){y=r[0];s=u;for(u;u<r.length;u++){x=c.abs(t-y);w=c.abs(t-r[u]);if(w<x){s=u;y=r[u]}x=null;w=null}if(v){return v(y,s)}return y}return false}};var b={dayDiv:86400000,math:c,toCentury:function(r,s){s=s||86400000;return this.math.round(this.math.abs((new m(1900,0,-1))-r)/s)},get:function(s,t){t=t||86400000;if(s.getMonth){return s}else{if(isNaN(s)){return new m(Globalize.parseDate(s))}else{s*=t;var r=(new m(1900,0,-1))*1;s+=r;s=new m(s);return s}}},week:function(r,t){t=t||86400000;var s=new m(r.getFullYear(),0,1);return this.math.ceil((((r-s)/t)+s.getDay()+1)/7)},toString:function(r,s){if(!s){return Globalize.format(r)}return Globalize.format(r,Globalize.culture().calendar.patterns[s])},diff:function(v,s,u,t){t=t||86400000;switch(u){case 0:return this.days360Nasd(v,s,0,true);case 1:case 2:case 3:var r=this.math.abs(s-v)/t;return r;case 4:return this.days360Euro(v,s)}return 0},diffMonths:function(t,s){var r;r=(s.getFullYear()-t.getFullYear())*12;r-=t.getMonth()+1;r+=s.getMonth()+1;return r},days360:function(t,w,u,s,r,v){return((w-t)*360)+((s-u)*30)+(v-r)},days360Nasd:function(s,v,r,t){var u=s.getDate(),z=s.getMonth(),y=s.getFullYear(),x=v.getDate(),w=v.getMonth(),A=v.getFullYear();if((w==2&&this.isEndOfMonth(x,w,A))&&((z==2&&this.isEndOfMonth(u,z,y))||r==3)){x=30}if(x==31&&(u>=30||r==3)){x=30}if(u==31){u=30}if(t&&z==2&&this.isEndOfMonth(u,z,y)){u=30}return this.days360(y,A,z,w,u,x)},days360Euro:function(y,t){var r=y.getDate(),v=y.getMonth(),u=y.getFullYear(),w=t.getDate(),s=t.getMonth(),x=t.getFullYear();if(r==31){r=30}if(w==31){w=30}return this.days360(u,x,v,s,r,w)},isEndOfMonth:function(r,t,s){return r==(new m(s,t+1,0,23,59,59)).getDate()},isLeapYear:function(r){return new m(r,1,29).getMonth()==1},calcAnnualBasis:function(r,t,x){switch(x){case 0:case 2:case 4:return 360;case 3:return 365;case 1:var s=r.getDate(),z=r.getMonth(),w=r.getFullYear(),u=t.getDate(),v=t.getMonth(),A=t.getFullYear(),B=0;if(w==A){if(this.isLeapYear(w)){B=366}else{B=365}}else{if(((A-1)==w)&&((z>v)||((z==v)&&s>=u))){if(this.isLeapYear(w)){if(z<2||(z==2&&s<=29)){B=366}else{B=365}}else{if(this.isLeapYear(A)){if(v>2||(v==2&&u==29)){B=366}else{B=365}}else{B=365}}}else{for(var y=w;y<=A;y++){if(this.isLeapYear(y)){B+=366}else{B+=365}}B=B/(A-w+1)}}return B}return 0},lastDayOfMonth:function(r){r.setDate(0);return r.getDate()},isLastDayOfMonth:function(r){return(r.getDate()==this.lastDayOfMonth(r))}};var a=k.times={math:c,fromMath:function(t){var r={},s=this;r.hour=((t*24)+"").split(".")[0]*1;r.minute=function(u){u=s.math.round(u*24*100)/100;u=(u+"").split(".");var v=0;if(u[1]){if(u[1].length<2){u[1]+="0"}v=u[1]*0.6}return s.math.round(v)}(t);r.second=function(x){x=s.math.round(x*24*10000)/10000;x=(x+"").split(".");var v=0;if(x[1]){for(var w=0;w<4;w++){if(!x[1].charAt(w)){x[1]+="0"}}var u=((x[1]*0.006)+"").split(".");if(u[1]){if(u[1]&&u[1].length>2){u[1]=u[1].substr(0,2)}return s.math.round(u[1]*0.6)}}return v}(t);return r},fromString:function(t,x){var u=new m(),y=t,r,w,v,s,z;if(x){z=y.substr(-2).toLowerCase();y=y.replace(/(am|pm)/i,"")}y=y.split(":");w=y[0]*1;v=y[1]*1;s=(y[2]?y[2]:0)*1;if(x&&z=="pm"){w+=12}return e.TIME(w,v,s)}};i.extend(c,{log10:function(r){return c.log(r)/2.302585092994046},signum:function(r){return(r/c.abs(r))||r},log1p:function(r){var s=0,u=50;if(r<=-1){return"-INF"}if(r<0||r>1){return c.log(1+r)}for(var t=1;t<u;t++){if((t%2)===0){s-=c.pow(r,t)/t}else{s+=c.pow(r,t)/t}}return s}});i.print=function(t){var r=win.open();r.document.write("<html><body><xmp>"+t+"\n</xmp></body></html>");r.document.close()};if(!Object.getPrototypeOf){Object.getPrototypeOf=function(r){return r||{}}}if(!Array.prototype.indexOf){i.sheet.max=60;Array.prototype.indexOf=function(t,u){for(var s=(u||0),r=this.length;s<r;s++){if(this[s]===t){return s}}return -1}}return h})(jQuery,document,window,Date,String,Number,Boolean,Math,RegExp,Error);


name: jquery.simulate.drag-sortable.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\jquery.simulate.drag-sortable.js
mime: unavailable
content:
(function($) {
  /*
   * Simulate drag of a JQuery UI sortable list
   * Repository: https://github.com/mattheworiordan/jquery.simulate.drag-sortable.js
   * Author: http://mattheworiordan.com
   *
   * options are:
   * - move: move item up (positive) or down (negative) by Integer amount
   * - dropOn: move item to a new linked list, move option now represents position in the new list (zero indexed)
   * - handle: selector for the draggable handle element (optional)
   * - listItem: selector to limit which sibling items can be used for reordering
   * - placeHolder: if a placeholder is used during dragging, we need to consider it's height
   * - tolerance: (optional) number of pixels to overlap by instead of the default 50% of the element height
   *
   */
  $.fn.simulateDragSortable = function(options) {
    // build main options before element iteration
    var opts = $.extend({}, $.fn.simulateDragSortable.defaults, options);

    applyDrag = function(options) {
      // allow for a drag handle if item is not draggable
      var that = this,
          options = options || opts, // default to plugin opts unless options explicitly provided
          handle = options.handle ? $(this).find(options.handle)[0] : $(this)[0],
          listItem = options.listItem,
          placeHolder = options.placeHolder,
          sibling = $(this),
          moveCounter = Math.floor(options.move),
          direction = moveCounter > 0 ? 'down' : 'up',
          moveVerticalAmount = 0,
          initialVerticalPosition = 0,
          extraDrag = !isNaN(parseInt(options.tolerance, 10)) ? function() { return Number(options.tolerance); } : function(obj) { return ($(obj).outerHeight() / 2) + 5; },
          dragPastBy = 0, // represents the additional amount one drags past an element and bounce back
          dropOn = options.dropOn ? $(options.dropOn) : false,
          center = findCenter(handle),
          x = Math.floor(center.x),
          y = Math.floor(center.y),
          mouseUpAfter = (opts.debug ? 2500 : 10);

      if (dropOn) {
        if (dropOn.length === 0) {
          if (console && console.log) { console.log('simulate.drag-sortable.js ERROR: Drop on target could not be found'); console.log(options.dropOn); }
          return;
        }
        sibling = dropOn.find('>*:last');
        moveCounter = -(dropOn.find('>*').length + 1) + (moveCounter + 1); // calculate length of list after this move, use moveCounter as a positive index position in list to reverse back up
        if (dropOn.offset().top - $(this).offset().top < 0) {
          // moving to a list above this list, so move to just above top of last item (tried moving to top but JQuery UI wouldn't bite)
          initialVerticalPosition = sibling.offset().top - $(this).offset().top - extraDrag(this);
        } else {
          // moving to a list below this list, so move to bottom and work up (JQuery UI does not trigger new list below unless you move past top item first)
          initialVerticalPosition = sibling.offset().top - $(this).offset().top - $(this).height();
        }
      } else if (moveCounter === 0) {
        if (console && console.log) { console.log('simulate.drag-sortable.js WARNING: Drag with move set to zero has no effect'); }
        return;
      } else {
        while (moveCounter !== 0) {
          if (direction === 'down') {
            if (sibling.next(listItem).length) {
              sibling = sibling.next(listItem);
              moveVerticalAmount += sibling.outerHeight();
            }
            moveCounter -= 1;
          } else {
            if (sibling.prev(listItem).length) {
              sibling = sibling.prev(listItem);
              moveVerticalAmount -= sibling.outerHeight();
            }
            moveCounter += 1;
          }
        }
      }

      dispatchEvent(handle, 'mousedown', createEvent('mousedown', handle, { clientX: x, clientY: y }));
      // simulate drag start
      dispatchEvent(document, 'mousemove', createEvent('mousemove', document, { clientX: x+1, clientY: y+1 }));

      if (dropOn) {
        // jump to top or bottom of new list but do it in increments so that JQuery UI registers the drag events
        slideUpTo(x, y, initialVerticalPosition);

        // reset y position to top or bottom of list and move from there
        y += initialVerticalPosition;

        // now call regular shift/down in a list
        options = jQuery.extend(options, { move: moveCounter });
        delete options.dropOn;

        // add some delays to allow JQuery UI to catch up
        setTimeout(function() {
          dispatchEvent(document, 'mousemove', createEvent('mousemove', document, { clientX: x, clientY: y }));
        }, 5);
        setTimeout(function() {
          dispatchEvent(handle, 'mouseup', createEvent('mouseup', handle, { clientX: x, clientY: y }));
          setTimeout(function() {
            if (options.move) {
              applyDrag.call(that, options);
            }
          }, 5);
        }, mouseUpAfter);

        // stop execution as applyDrag has been called again
        return;
      }

      // Sortable is using a fixed height placeholder meaning items jump up and down as you drag variable height items into fixed height placeholder
      placeHolder = placeHolder && $(this).parent().find(placeHolder);

      if (!placeHolder && (direction === 'down')) {
        // need to move at least as far as this item and or the last sibling
        if ($(this).outerHeight() > $(sibling).outerHeight()) {
          moveVerticalAmount += $(this).outerHeight() - $(sibling).outerHeight();
        }
        moveVerticalAmount += extraDrag(sibling);
        dragPastBy += extraDrag(sibling);
      } else if (direction === 'up') {
        // move a little extra to ensure item clips into next position
        moveVerticalAmount -= Math.max(extraDrag(this), 5);
      } else if (direction === 'down') {
        // moving down with a place holder
        if (placeHolder.height() < $(this).height()) {
          moveVerticalAmount += Math.max(placeHolder.height(), 5);
        } else {
          moveVerticalAmount += extraDrag(sibling);
        }
      }

      if (sibling[0] !== $(this)[0]) {
        // step through so that the UI controller can determine when to show the placeHolder
        slideUpTo(x, y, moveVerticalAmount, dragPastBy);
      } else {
        if (window.console) {
          console.log('simulate.drag-sortable.js WARNING: Could not move as at top or bottom already');
        }
      }

      setTimeout(function() {
        dispatchEvent(document, 'mousemove', createEvent('mousemove', document, { clientX: x, clientY: y + moveVerticalAmount }));
      }, 5);
      setTimeout(function() {
        dispatchEvent(handle, 'mouseup', createEvent('mouseup', handle, { clientX: x, clientY: y + moveVerticalAmount }));
      }, mouseUpAfter);
    };

    // iterate and move each matched element
    return this.each(applyDrag);
  };

  // fire mouse events, go half way, then the next half, so small mouse movements near target and big at the start
  function slideUpTo(x, y, targetOffset, goPastBy) {
    var moveBy, offset;

    if (!goPastBy) { goPastBy = 0; }
    if ((targetOffset < 0) && (goPastBy > 0)) { goPastBy = -goPastBy; } // ensure go past is in the direction as often passed in from object height so always positive

    // go forwards including goPastBy
    for (offset = 0; Math.abs(offset) + 1 < Math.abs(targetOffset + goPastBy); offset += ((targetOffset + goPastBy - offset)/2) ) {
      dispatchEvent(document, 'mousemove', createEvent('mousemove', document, { clientX: x, clientY: y + Math.ceil(offset) }));
    }
    offset = targetOffset + goPastBy;
    dispatchEvent(document, 'mousemove', createEvent('mousemove', document, { clientX: x, clientY: y + offset }));

    // now bounce back
    for (; Math.abs(offset) - 1 >= Math.abs(targetOffset); offset += ((targetOffset - offset)/2) ) {
      dispatchEvent(document, 'mousemove', createEvent('mousemove', document, { clientX: x, clientY: y + Math.ceil(offset) }));
    }
    dispatchEvent(document, 'mousemove', createEvent('mousemove', document, { clientX: x, clientY: y + targetOffset }));
  }

  function createEvent(type, target, options) {
    var evt;
    var e = $.extend({
      target: target,
      preventDefault: function() { },
      stopImmediatePropagation: function() { },
      stopPropagation: function() { },
      isPropagationStopped: function() { return true; },
      isImmediatePropagationStopped: function() { return true; },
      isDefaultPrevented: function() { return true; },
      bubbles: true,
      cancelable: (type != "mousemove"),
      view: window,
      detail: 0,
      screenX: 0,
      screenY: 0,
      clientX: 0,
      clientY: 0,
      ctrlKey: false,
      altKey: false,
      shiftKey: false,
      metaKey: false,
      button: 0,
      relatedTarget: undefined
    }, options || {});

    if ($.isFunction(document.createEvent)) {
      evt = document.createEvent("MouseEvents");
      evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,
        e.screenX, e.screenY, e.clientX, e.clientY,
        e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
        e.button, e.relatedTarget || document.body.parentNode);
    } else if (document.createEventObject) {
      evt = document.createEventObject();
      $.extend(evt, e);
        evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button;
    }
    return evt;
  }

  function dispatchEvent(el, type, evt) {
    if (el.dispatchEvent) {
      el.dispatchEvent(evt);
    } else if (el.fireEvent) {
      el.fireEvent('on' + type, evt);
    }
    return evt;
  }

  function findCenter(el) {
    var elm = $(el),
        o = elm.offset();
    return {
      x: o.left + elm.outerWidth() / 2,
      y: o.top + elm.outerHeight() / 2
    };
  }

  //
  // plugin defaults
  //
  $.fn.simulateDragSortable.defaults = {
    move: 0
  };
})(jQuery);


name: jquery.tablesorter.min.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\jquery.tablesorter.min.js
mime: unavailable
content:
(function($){$.extend({tablesorter:new
function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[Â£$â‚¬?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[Â£$â‚¬]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);


name: jquery.ui.accordion.min.css
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\jquery.ui.accordion.min.css
mime: unavailable
content:
/*! jQuery UI - v1.9.2 - 2013-01-24
* http://jqueryui.com
* Includes: jquery.ui.accordion.css
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;zoom:1}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto;zoom:1}


name: jquery.ui.core.min.css
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\jquery.ui.core.min.css
mime: unavailable
content:
/*! jQuery UI - v1.9.2 - 2013-01-24
* http://jqueryui.com
* Includes: jquery.ui.core.css
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}


name: jquery.ui.theme.min.css
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\jquery.ui.theme.min.css
mime: unavailable
content:
/*! jQuery UI - v1.9.2 - 2013-01-30
* http://jqueryui.com
* Includes: jquery.ui.theme.css
* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-khtml-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;-khtml-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}


name: colResizable-1.5.min.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\plugins\colResizable-1.5.min.js
mime: unavailable
content:
// colResizable 1.5 - a jQuery plugin by Alvaro Prieto Lauroba http://www.bacubacu.com/colresizable/
(function($){var d=$(document),h=$("head"),drag=null,tables=[],count=0,ID="id",PX="px",SIGNATURE="JColResizer",FLEX="JCLRFlex",I=parseInt,M=Math,ie=navigator.userAgent.indexOf('Trident/4.0')>0,S;try{S=sessionStorage}catch(e){};h.append("<style type='text/css'>  .JColResizer{table-layout:fixed;} .JColResizer td, .JColResizer th{overflow:hidden;padding-left:0!important; padding-right:0!important;}  .JCLRgrips{ height:0px; position:relative;} .JCLRgrip{margin-left:-5px; position:absolute; z-index:5; } .JCLRgrip .JColResizer{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;cursor: e-resize;top:0px} .JCLRLastGrip{position:absolute; width:1px; } .JCLRgripDrag{ border-left:1px dotted black;	} .JCLRFlex{width:auto!important;}</style>");var init=function(tb,options){var t=$(tb);t.opt=options;if(t.opt.disable)return destroy(t);var id=t.id=t.attr(ID)||SIGNATURE+ count++;t.p=t.opt.postbackSafe;if(!t.is("table")||tables[id]&&!t.opt.partialRefresh)return;t.addClass(SIGNATURE).attr(ID,id).before('<div class="JCLRgrips"/>');t.g=[];t.c=[];t.w=t.width();t.gc=t.prev();t.f=t.opt.fixed;if(options.marginLeft)t.gc.css("marginLeft",options.marginLeft);if(options.marginRight)t.gc.css("marginRight",options.marginRight);t.cs=I(ie?tb.cellSpacing||tb.currentStyle.borderSpacing:t.css('border-spacing'))||2;t.b=I(ie?tb.border||tb.currentStyle.borderLeftWidth:t.css('border-left-width'))||1;tables[id]=t;createGrips(t)},destroy=function(t){var id=t.attr(ID),t=tables[id];if(!t||!t.is("table"))return;t.removeClass(SIGNATURE+" "+FLEX).gc.remove();delete tables[id]},createGrips=function(t){var th=t.find(">thead>tr>th,>thead>tr>td");if(!th.length)th=t.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td");th=th.filter(":visible");t.cg=t.find("col");t.ln=th.length;if(t.p&&S&&S[t.id])memento(t,th);th.each(function(i){var c=$(this),g=$(t.gc.append('<div class="JCLRgrip"></div>')[0].lastChild);g.append(t.opt.gripInnerHtml).append('<div class="'+SIGNATURE+'"></div>');if(i==t.ln-1){g.addClass("JCLRLastGrip");if(t.f)g.html("")};g.bind('touchstart mousedown',onGripMouseDown);g.t=t;g.i=i;g.c=c;c.w=c.width();t.g.push(g);t.c.push(c);c.width(c.w).removeAttr("width");g.data(SIGNATURE,{i:i,t:t.attr(ID),last:i==t.ln-1})});t.cg.removeAttr("width");syncGrips(t);t.find('td, th').not(th).not('table th, table td').each(function(){$(this).removeAttr('width')});if(!t.f)t.removeAttr('width').addClass(FLEX)},memento=function(t,th){var w,m=0,i=0,aux=[],tw;if(th){t.cg.removeAttr("width");if(t.opt.flush){S[t.id]="";return};w=S[t.id].split(";");tw=w[t.ln+1];if(!t.f&&tw)t.width(tw);for(;i<t.ln;i++){aux.push(100*w[i]/w[t.ln]+"%");th.eq(i).css("width",aux[i])};for(i=0;i<t.ln;i++)t.cg.eq(i).css("width",aux[i])}else{S[t.id]="";for(;i<t.c.length;i++){w=t.c[i].width();S[t.id]+=w+";";m+=w};S[t.id]+=m;if(!t.f)S[t.id]+=";"+t.width()}},syncGrips=function(t){t.gc.width(t.w);for(var i=0;i<t.ln;i++){var c=t.c[i];t.g[i].css({left:c.offset().left-t.offset().left+c.outerWidth(false)+t.cs/2+PX,height:t.opt.headerOnly?t.c[0].outerHeight(false):t.outerHeight(false)})}},syncCols=function(t,i,isOver){var inc=drag.x-drag.l,c=t.c[i],c2=t.c[i+1],w=c.w+inc,w2=c2.w-inc;c.width(w+PX);t.cg.eq(i).width(w+PX);if(t.f){c2.width(w2+PX);t.cg.eq(i+1).width(w2+PX)};if(isOver){c.w=w;c2.w=t.f?w2:c2.w}},applyBounds=function(t){var w=$.map(t.c,function(c){return c.width()});t.width(t.width()).removeClass(FLEX);$.each(t.c,function(i,c){c.width(w[i]).w=w[i]});t.addClass(FLEX)},onGripDrag=function(e){if(!drag)return;var t=drag.t,oe=e.originalEvent.touches,ox=oe?oe[0].pageX:e.pageX,x=ox-drag.ox+drag.l,mw=t.opt.minWidth,i=drag.i,l=t.cs*1.5+mw+t.b,last=i==t.ln-1,min=i?t.g[i-1].position().left+t.cs+mw:l,max=t.f?i==t.ln-1?t.w-l:t.g[i+1].position().left-t.cs-mw:Infinity;x=M.max(min,M.min(max,x));drag.x=x;drag.css("left",x+PX);if(last){var c=t.c[drag.i];drag.w=c.w+x-drag.l};if(t.opt.liveDrag){if(last){c.width(drag.w);t.w=t.width()}else syncCols(t,i);syncGrips(t);var cb=t.opt.onDrag;if(cb){e.currentTarget=t[0];cb(e)}};return false},onGripDragOver=function(e){d.unbind('touchend.'+SIGNATURE+' mouseup.'+SIGNATURE).unbind('touchmove.'+SIGNATURE+' mousemove.'+SIGNATURE);$("head :last-child").remove();if(!drag)return;drag.removeClass(drag.t.opt.draggingClass);var t=drag.t,cb=t.opt.onResize,i=drag.i,last=i==t.ln-1,c=t.g[i].c;if(last){c.width(drag.w);c.w=drag.w}else syncCols(t,i,true);if(!t.f)applyBounds(t);syncGrips(t);if(cb){e.currentTarget=t[0];cb(e)};if(t.p&&S)memento(t);drag=null},onGripMouseDown=function(e){var o=$(this).data(SIGNATURE),t=tables[o.t],g=t.g[o.i],oe=e.originalEvent.touches;g.ox=oe?oe[0].pageX:e.pageX;g.l=g.position().left;d.bind('touchmove.'+SIGNATURE+' mousemove.'+SIGNATURE,onGripDrag).bind('touchend.'+SIGNATURE+' mouseup.'+SIGNATURE,onGripDragOver);h.append("<style type='text/css'>*{cursor:"+t.opt.dragCursor+"!important}</style>");g.addClass(t.opt.draggingClass);drag=g;if(t.c[o.i].l)for(var i=0,c;i<t.ln;i++){c=t.c[i];c.l=false;c.w=c.width()};return false},onResize=function(){for(t in tables){var t=tables[t],i,mw=0;t.removeClass(SIGNATURE);if(t.f&&t.w!=t.width()){t.w=t.width();for(i=0;i<t.ln;i++)mw+=t.c[i].w;for(i=0;i<t.ln;i++)t.c[i].css("width",M.round(1e3*t.c[i].w/mw)/10+"%").l=true};syncGrips(t.addClass(SIGNATURE))}};$(window).bind('resize.'+SIGNATURE,onResize);$.fn.extend({colResizable:function(options){var defaults={draggingClass:'JCLRgripDrag',gripInnerHtml:'',liveDrag:false,fixed:true,minWidth:15,headerOnly:false,hoverCursor:"e-resize",dragCursor:"e-resize",postbackSafe:false,flush:false,marginLeft:null,marginRight:null,disable:false,partialRefresh:false,onDrag:null,onResize:null},options=$.extend(defaults,options);return this.each(function(){init(this,options)})}})})(jQuery)


name: select-text-range.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\plugins\select-text-range.js
mime: unavailable
content:
eyeformeta = typeof eyeformeta !== 'undefined' ? eyeformeta : {} ;
eyeformeta.v = typeof eyeformeta.v !== 'undefined' ? eyeformeta.v : {} ;

// --> select text range   or   move cursor
    $.fn.selectRange = function(start, end) {
        if(end === undefined) { end = start; }
        return this.each(function() {
            if('selectionStart' in this) {
                this.selectionStart = start;
                this.selectionEnd = end;
            } else if(this.setSelectionRange) {
                this.setSelectionRange(start, end);
            } else if(this.createTextRange) {
                var range = this.createTextRange();
                range.collapse(true);
                range.moveEnd('character', end);
                range.moveStart('character', start);
                range.select();
            }
        });
    };
            // $('#test').selectRange(32,46); // select a range of text
            // $('#test').selectRange(3); // set cursor position
            // $('#test').val().slice(35,49)
            // $('#test').val().slice(0,34) +'replace'+$('#test').val().slice(49,$('#test').val().length)
// /--> select text range


// --> get selected range
    eyeformeta.selection = {
                    var: '',
                    get: function(o,fnd,add,callback) {
                        var val = o.value, s = eyeformeta.selection.getSelectionStart(o), e = eyeformeta.selection.getSelectionEnd(o);
                        var result = {start:s,end:e};

                        // console.log(o.id);
                        if ( fnd && result.start == result.end ) {
                            if ( typeof add !== 'string' )
                                add='';
                            // console.log(result);
                            result = eyeformeta.selection.smart(o,result.start,add);
                            // console.log(53,result.end - result.start)
                            if ( result.end - result.start ==1  && add+'$._0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(val[result.end]) < 0 ) { result.end--; }   
                            // console.log(result);
                            // console.log('#'+o.id);
                            try {
                                $('#'+o.id).selectRange(result.start,result.end);
                                // setTimeout(function() { console.log(11);$('#'+o.id).selectRange(result.start,result.end);console.log(22); }, 100);
                            } catch (err) {}
                        }
                        // if ( result.end > result.start ) {
                        //     result.value = val[result.start:result.end];
                        // }
                        result.id = o.id;

                        if ( typeof callback !== 'undefined' ) { callback(result); }
                        return result;
                        // eyeformeta.selection.get(  document.querySelector('#md_file')  )
                    }, //==============================================
                    smart: function(o,ii,add) {
                        // add='"'+"'";
                        var val = o.value;
                        var done=false;
                        var i;
                        var result={start:null,end:null};
                        if ( ii == 0 ) {
                            result.start=0;
                            done=false;
                            // for (var i = 0; i < val.length; i++) {
                            i=ii-1; while ( i !== val.length ) { i++;
                                if ( add+'$._0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(val[i]) < 0 ) { done=true; result.end = i; break; }
                            }
                            if (!done) { result.end = val.length; }
                            return result;
                        } else {
                            done=false;
                            // for (var i = val.length - 1; i >= 0; i--) {
                            i=ii+1; while ( i !== 0 ) { i--;
                                if ( val[i] == '\n' ) { done=true; result.start = i+1; break; }
                                if ( add+'$._0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(val[i]) < 0 ) { done=true; result.start = i+1; break; }
                            }
                            // console.log('done:',done);
                            if (!done) { result.start = 0; }
                            done=false
                            // for (var i = 0; i < val.length; i++) {
                            i=ii-1; while ( i !== val.length ) { i++;
                                if ( add+'$._0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(val[i]) < 0 ) { done=true; result.end = i; break; }   
                            }
                            // console.log(666,result.end - result.start)
                            if (!done) { result.end = val.length; }
                            // if ( result.end - result.start ==1  ) { console.log(444, val[result.end]) } 
                            // if ( result.end - result.start ==1  '$._0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(val[result.end]) < 0 ) { result.end--; }   
                            return result;
                        }

                        // eyeformeta.selection.smart
                    }, //==============================================
                    getSelectionStart: function(o) {
                        if (o.createTextRange) {
                            var r = document.selection.createRange().duplicate()
                            rse = r.text.length;
                            r.moveEnd('character', o.value.length)
                            if (r.text == '') return o.value.length
                            return o.value.lastIndexOf(r.text)
                        } else return o.selectionStart
                    }, //==============================================
                    getSelectionEnd: function(o) {
                        if (o.createTextRange) {
                            var r = document.selection.createRang;e().duplicate()
                            r.moveStart('character', -o.value.length)
                            return r.text.length
                        } else return o.selectionEnd
                    }, //==============================================
    }
// /--> get selected range
console.log('select-text-range.js');


name: selectRange.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\jq\plugins\selectRange.js
mime: unavailable
content:
$.fn.selectRange = function(start, end) {
    this.focus()
    if(end === undefined) { end = start; }
    return this.each(function() {
        if('selectionStart' in this) {
            this.selectionStart = start;
            this.selectionEnd = end;
        } else if(this.setSelectionRange) {
            this.setSelectionRange(start, end);
        } else if(this.createTextRange) {
            var range = this.createTextRange();
            range.collapse(true);
            range.moveEnd('character', end);
            range.moveStart('character', start);
            range.select();
        }
    });
};


name: modernizr.min.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\modernizr.min.js
mime: unavailable
content:
/* Modernizr 2.7.1 (Custom Build) | MIT & BSD
 * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
 */
;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a){var e=a[d];if(!F(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}return!1}function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return E(b,"string")||E(b,"undefined")?G(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),H(e,b,c))}function J(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=E(e[d],"function"),E(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),A={}.hasOwnProperty,B;!E(A,"undefined")&&!E(A.call,"undefined")?B=function(a,b){return A.call(a,b)}:B=function(a,b){return b in a&&E(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return I("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!E(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!I("indexedDB",a)},s.hashchange=function(){return z("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return C("background-color:rgba(150,255,150,.5)"),F(j.backgroundColor,"rgba")},s.hsla=function(){return C("background-color:hsla(120,40%,100%,.5)"),F(j.backgroundColor,"rgba")||F(j.backgroundColor,"hsla")},s.multiplebgs=function(){return C("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return I("backgroundSize")},s.borderimage=function(){return I("borderImage")},s.borderradius=function(){return I("borderRadius")},s.boxshadow=function(){return I("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return D("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return I("animationName")},s.csscolumns=function(){return I("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return C((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),F(j.backgroundImage,"gradient")},s.cssreflections=function(){return I("boxReflect")},s.csstransforms=function(){return!!I("transform")},s.csstransforms3d=function(){var a=!!I("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return I("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var K in s)B(s,K)&&(x=K.toLowerCase(),e[x]=s[K](),v.push((e[x]?"":"no-")+x));return e.input||J(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)B(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},C(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=z,e.testProp=function(a){return G([a])},e.testAllProps=I,e.testStyles=y,e.prefixed=function(a,b,c){return b?I(a,b,c):I(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};


name: moment-timezone.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\moment-timezone.js
mime: unavailable
content:
//! moment-timezone.js
//! version : 0.5.4
//! author : Tim Wood
//! license : MIT
//! github.com/moment/moment-timezone
!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["moment"],b):"object"==typeof module&&module.exports?module.exports=b(require("moment")):b(a.moment)}(this,function(a){"use strict";function b(a){return a>96?a-87:a>64?a-29:a-48}function c(a){var c,d=0,e=a.split("."),f=e[0],g=e[1]||"",h=1,i=0,j=1;for(45===a.charCodeAt(0)&&(d=1,j=-1),d;d<f.length;d++)c=b(f.charCodeAt(d)),i=60*i+c;for(d=0;d<g.length;d++)h/=60,c=b(g.charCodeAt(d)),i+=c*h;return i*j}function d(a){for(var b=0;b<a.length;b++)a[b]=c(a[b])}function e(a,b){for(var c=0;b>c;c++)a[c]=Math.round((a[c-1]||0)+6e4*a[c]);a[b-1]=1/0}function f(a,b){var c,d=[];for(c=0;c<b.length;c++)d[c]=a[b[c]];return d}function g(a){var b=a.split("|"),c=b[2].split(" "),g=b[3].split(""),h=b[4].split(" ");return d(c),d(g),d(h),e(h,g.length),{name:b[0],abbrs:f(b[1].split(" "),g),offsets:f(c,g),untils:h,population:0|b[5]}}function h(a){a&&this._set(g(a))}function i(a){var b=a.toTimeString(),c=b.match(/\([a-z ]+\)/i);c&&c[0]?(c=c[0].match(/[A-Z]/g),c=c?c.join(""):void 0):(c=b.match(/[A-Z]{3,5}/g),c=c?c[0]:void 0),"GMT"===c&&(c=void 0),this.at=+a,this.abbr=c,this.offset=a.getTimezoneOffset()}function j(a){this.zone=a,this.offsetScore=0,this.abbrScore=0}function k(a,b){for(var c,d;d=6e4*((b.at-a.at)/12e4|0);)c=new i(new Date(a.at+d)),c.offset===a.offset?a=c:b=c;return a}function l(){var a,b,c,d=(new Date).getFullYear()-2,e=new i(new Date(d,0,1)),f=[e];for(c=1;48>c;c++)b=new i(new Date(d,c,1)),b.offset!==e.offset&&(a=k(e,b),f.push(a),f.push(new i(new Date(a.at+6e4)))),e=b;for(c=0;4>c;c++)f.push(new i(new Date(d+c,0,1))),f.push(new i(new Date(d+c,6,1)));return f}function m(a,b){return a.offsetScore!==b.offsetScore?a.offsetScore-b.offsetScore:a.abbrScore!==b.abbrScore?a.abbrScore-b.abbrScore:b.zone.population-a.zone.population}function n(a,b){var c,e;for(d(b),c=0;c<b.length;c++)e=b[c],I[e]=I[e]||{},I[e][a]=!0}function o(a){var b,c,d,e=a.length,f={},g=[];for(b=0;e>b;b++){d=I[a[b].offset]||{};for(c in d)d.hasOwnProperty(c)&&(f[c]=!0)}for(b in f)f.hasOwnProperty(b)&&g.push(H[b]);return g}function p(){try{var a=Intl.DateTimeFormat().resolvedOptions().timeZone;if(a){var b=H[r(a)];if(b)return b;z("Moment Timezone found "+a+" from the Intl api, but did not have that data loaded.")}}catch(c){}var d,e,f,g=l(),h=g.length,i=o(g),k=[];for(e=0;e<i.length;e++){for(d=new j(t(i[e]),h),f=0;h>f;f++)d.scoreOffsetAt(g[f]);k.push(d)}return k.sort(m),k.length>0?k[0].zone.name:void 0}function q(a){return D&&!a||(D=p()),D}function r(a){return(a||"").toLowerCase().replace(/\//g,"_")}function s(a){var b,c,d,e;for("string"==typeof a&&(a=[a]),b=0;b<a.length;b++)d=a[b].split("|"),c=d[0],e=r(c),F[e]=a[b],H[e]=c,d[5]&&n(e,d[2].split(" "))}function t(a,b){a=r(a);var c,d=F[a];return d instanceof h?d:"string"==typeof d?(d=new h(d),F[a]=d,d):G[a]&&b!==t&&(c=t(G[a],t))?(d=F[a]=new h,d._set(c),d.name=H[a],d):null}function u(){var a,b=[];for(a in H)H.hasOwnProperty(a)&&(F[a]||F[G[a]])&&H[a]&&b.push(H[a]);return b.sort()}function v(a){var b,c,d,e;for("string"==typeof a&&(a=[a]),b=0;b<a.length;b++)c=a[b].split("|"),d=r(c[0]),e=r(c[1]),G[d]=e,H[d]=c[0],G[e]=d,H[e]=c[1]}function w(a){s(a.zones),v(a.links),A.dataVersion=a.version}function x(a){return x.didShowError||(x.didShowError=!0,z("moment.tz.zoneExists('"+a+"') has been deprecated in favor of !moment.tz.zone('"+a+"')")),!!t(a)}function y(a){return!(!a._a||void 0!==a._tzm)}function z(a){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(a)}function A(b){var c=Array.prototype.slice.call(arguments,0,-1),d=arguments[arguments.length-1],e=t(d),f=a.utc.apply(null,c);return e&&!a.isMoment(b)&&y(f)&&f.add(e.parse(f),"minutes"),f.tz(d),f}function B(a){return function(){return this._z?this._z.abbr(this):a.call(this)}}function C(a){return function(){return this._z=null,a.apply(this,arguments)}}if(void 0!==a.tz)return z("Moment Timezone "+a.tz.version+" was already loaded "+(a.tz.dataVersion?"with data from ":"without any data")+a.tz.dataVersion),a;var D,E="0.5.4",F={},G={},H={},I={},J=a.version.split("."),K=+J[0],L=+J[1];(2>K||2===K&&6>L)&&z("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+a.version+". See momentjs.com"),h.prototype={_set:function(a){this.name=a.name,this.abbrs=a.abbrs,this.untils=a.untils,this.offsets=a.offsets,this.population=a.population},_index:function(a){var b,c=+a,d=this.untils;for(b=0;b<d.length;b++)if(c<d[b])return b},parse:function(a){var b,c,d,e,f=+a,g=this.offsets,h=this.untils,i=h.length-1;for(e=0;i>e;e++)if(b=g[e],c=g[e+1],d=g[e?e-1:e],c>b&&A.moveAmbiguousForward?b=c:b>d&&A.moveInvalidForward&&(b=d),f<h[e]-6e4*b)return g[e];return g[i]},abbr:function(a){return this.abbrs[this._index(a)]},offset:function(a){return this.offsets[this._index(a)]}},j.prototype.scoreOffsetAt=function(a){this.offsetScore+=Math.abs(this.zone.offset(a.at)-a.offset),this.zone.abbr(a.at).replace(/[^A-Z]/g,"")!==a.abbr&&this.abbrScore++},A.version=E,A.dataVersion="",A._zones=F,A._links=G,A._names=H,A.add=s,A.link=v,A.load=w,A.zone=t,A.zoneExists=x,A.guess=q,A.names=u,A.Zone=h,A.unpack=g,A.unpackBase60=c,A.needsOffset=y,A.moveInvalidForward=!0,A.moveAmbiguousForward=!1;var M=a.fn;a.tz=A,a.defaultZone=null,a.updateOffset=function(b,c){var d,e=a.defaultZone;void 0===b._z&&(e&&y(b)&&!b._isUTC&&(b._d=a.utc(b._a)._d,b.utc().add(e.parse(b),"minutes")),b._z=e),b._z&&(d=b._z.offset(b),Math.abs(d)<16&&(d/=60),void 0!==b.utcOffset?b.utcOffset(-d,c):b.zone(d,c))},M.tz=function(b){return b?(this._z=t(b),this._z?a.updateOffset(this):z("Moment Timezone has no data for "+b+". See http://momentjs.com/timezone/docs/#/data-loading/."),this):this._z?this._z.name:void 0},M.zoneName=B(M.zoneName),M.zoneAbbr=B(M.zoneAbbr),M.utc=C(M.utc),a.tz.setDefault=function(b){return(2>K||2===K&&9>L)&&z("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+a.version+"."),a.defaultZone=b?t(b):null,a};var N=a.momentProperties;return"[object Array]"===Object.prototype.toString.call(N)?(N.push("_z"),N.push("_a")):N&&(N._z=null),w({version:"2016d",zones:["Africa/Abidjan|GMT|0|0||48e5","Africa/Khartoum|EAT|-30|0||51e5","Africa/Algiers|CET|-10|0||26e5","Africa/Lagos|WAT|-10|0||17e6","Africa/Maputo|CAT|-20|0||26e5","Africa/Cairo|EET EEST|-20 -30|010101010|1Cby0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6","Africa/Casablanca|WET WEST|0 -10|01010101010101010101010101010101010101010|1Cco0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0|32e5","Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6","Africa/Johannesburg|SAST|-20|0||84e5","Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5","Africa/Windhoek|WAST WAT|-20 -10|01010101010101010101010|1C1c0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|32e4","America/Adak|HST HDT|a0 90|01010101010101010101010|1BR00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1BQX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Santo_Domingo|AST|40|0||29e5","America/Araguaina|BRT BRST|30 20|010|1IdD0 Lz0|14e4","America/Argentina/Buenos_Aires|ART|30|0|","America/Asuncion|PYST PYT|30 40|01010101010101010101010|1C430 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5","America/Panama|EST|50|0||15e5","America/Bahia|BRT BRST|30 20|010|1FJf0 Rb0|27e5","America/Bahia_Banderas|MST CDT CST|70 50 60|01212121212121212121212|1C1l0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3","America/Fortaleza|BRT|30|0||34e5","America/Managua|CST|60|0||22e5","America/Manaus|AMT|40|0||19e5","America/Bogota|COT|50|0||90e5","America/Denver|MST MDT|70 60|01010101010101010101010|1BQV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Campo_Grande|AMST AMT|30 40|01010101010101010101010|1BIr0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10|77e4","America/Cancun|CST CDT EST|60 50 50|010101010102|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4","America/Caracas|VET VET|4u 40|01|1QMT0|29e5","America/Cayenne|GFT|30|0||58e3","America/Chicago|CST CDT|60 50|01010101010101010101010|1BQU0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|MST MDT|70 60|01010101010101010101010|1C1l0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4","America/Phoenix|MST|70|0||42e5","America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/New_York|EST EDT|50 40|01010101010101010101010|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Rio_Branco|AMT ACT|40 50|01|1KLE0|31e4","America/Fort_Nelson|PST PDT MST|80 70 70|010101010102|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2","America/Halifax|AST ADT|40 30|01010101010101010101010|1BQS0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Godthab|WGT WGST|30 20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3","America/Goose_Bay|AST ADT|40 30|01010101010101010101010|1BQQ1 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2","America/Grand_Turk|EST EDT AST|50 40 40|0101010101012|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Guayaquil|ECT|50|0||27e5","America/Guyana|GYT|40|0||80e4","America/Havana|CST CDT|50 40|01010101010101010101010|1BQR0 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/La_Paz|BOT|40|0||19e5","America/Lima|PET|50|0||11e6","America/Mexico_City|CST CDT|60 50|01010101010101010101010|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6","America/Metlakatla|PST AKST AKDT|80 90 80|012121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Miquelon|PMST PMDT|30 20|01010101010101010101010|1BQR0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Montevideo|UYST UYT|20 30|010101010101|1BQQ0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5","America/Noronha|FNT|20|0||30e2","America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|01232323232323232323232|1BQV0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Paramaribo|SRT|30|0||24e4","America/Port-au-Prince|EST EDT|50 40|010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Santiago|CLST CLT|30 40|010101010101010101010|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|62e5","America/Sao_Paulo|BRST BRT|20 30|01010101010101010101010|1BIq0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10|20e6","America/Scoresbysund|EGT EGST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452","America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1BQPv 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","Antarctica/Casey|CAST AWST|-b0 -80|0101|1BN30 40P0 KL0|10","Antarctica/Davis|DAVT DAVT|-50 -70|0101|1BPw0 3Wn0 KN0|70","Antarctica/DumontDUrville|DDUT|-a0|0||80","Antarctica/Macquarie|AEDT MIST|-b0 -b0|01|1C140|1","Antarctica/Mawson|MAWT|-50|0||60","Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1C120 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5","Antarctica/Rothera|ROTT|30|0||130","Antarctica/Syowa|SYOT|-30|0||20","Antarctica/Troll|UTC CEST|0 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40","Antarctica/Vostok|VOST|-60|0||25","Asia/Baghdad|AST|-30|0||66e5","Asia/Almaty|+06|-60|0||15e5","Asia/Amman|EET EEST|-20 -30|010101010101010101010|1BVy0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|25e5","Asia/Anadyr|ANAT ANAST ANAT|-c0 -c0 -b0|0120|1BWe0 1qN0 WM0|13e3","Asia/Aqtobe|+05|-50|0||27e4","Asia/Ashgabat|TMT|-50|0||41e4","Asia/Baku|AZT AZST|-40 -50|0101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5","Asia/Bangkok|ICT|-70|0||15e6","Asia/Barnaul|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 3rd0","Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1BWm0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5","Asia/Bishkek|KGT|-60|0||87e4","Asia/Brunei|BNT|-80|0||42e4","Asia/Kolkata|IST|-5u|0||15e6","Asia/Chita|YAKT YAKST YAKT IRKT|-90 -a0 -a0 -80|010230|1BWh0 1qM0 WM0 8Hz0 3re0|33e4","Asia/Choibalsan|CHOT CHOST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|38e3","Asia/Shanghai|CST|-80|0||23e6","Asia/Dhaka|BDT|-60|0||16e6","Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1C0m0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0|26e5","Asia/Dili|TLT|-90|0||19e4","Asia/Dubai|GST|-40|0||39e5","Asia/Dushanbe|TJT|-50|0||76e4","Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1BVW1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1ny0 1220 1qm0 1220 1ny0 1220 1ny0 1220 1ny0|18e5","Asia/Hebron|EET EEST|-20 -30|0101010101010101010101010|1BVy0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1ny0 1220 1qm0 1220 1ny0 1220 1ny0 1220 1ny0|25e4","Asia/Hong_Kong|HKT|-80|0||73e5","Asia/Hovd|HOVT HOVST|-70 -80|0101010101010|1O8H0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|IRKT IRKST IRKT|-80 -90 -90|01020|1BWi0 1qM0 WM0 8Hz0|60e4","Europe/Istanbul|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|13e6","Asia/Jakarta|WIB|-70|0||31e6","Asia/Jayapura|WIT|-90|0||26e4","Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1BVA0 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4","Asia/Kabul|AFT|-4u|0||46e5","Asia/Kamchatka|PETT PETST PETT|-c0 -c0 -b0|0120|1BWe0 1qN0 WM0|18e4","Asia/Karachi|PKT|-50|0||24e6","Asia/Urumqi|XJT|-60|0||32e5","Asia/Kathmandu|NPT|-5J|0||12e5","Asia/Khandyga|VLAT VLAST VLAT YAKT YAKT|-a0 -b0 -b0 -a0 -90|010234|1BWg0 1qM0 WM0 17V0 7zD0|66e2","Asia/Krasnoyarsk|KRAT KRAST KRAT|-70 -80 -80|01020|1BWj0 1qM0 WM0 8Hz0|10e5","Asia/Kuala_Lumpur|MYT|-80|0||71e5","Asia/Magadan|MAGT MAGST MAGT MAGT|-b0 -c0 -c0 -a0|010230|1BWf0 1qM0 WM0 8Hz0 3Cq0|95e3","Asia/Makassar|WITA|-80|0||15e5","Asia/Manila|PHT|-80|0||24e6","Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5","Asia/Novokuznetsk|KRAT NOVST NOVT NOVT|-70 -70 -60 -70|01230|1BWj0 1qN0 WM0 8Hz0|55e4","Asia/Novosibirsk|NOVT NOVST NOVT|-60 -70 -70|01020|1BWk0 1qM0 WM0 8Hz0|15e5","Asia/Omsk|OMST OMSST OMST|-60 -70 -70|01020|1BWk0 1qM0 WM0 8Hz0|12e5","Asia/Pyongyang|KST KST|-90 -8u|01|1P4D0|29e5","Asia/Rangoon|MMT|-6u|0||48e5","Asia/Sakhalin|SAKT SAKST SAKT|-a0 -b0 -b0|010202|1BWg0 1qM0 WM0 8Hz0 3rd0|58e4","Asia/Tashkent|UZT|-50|0||23e5","Asia/Seoul|KST|-90|0||23e6","Asia/Singapore|SGT|-80|0||56e5","Asia/Srednekolymsk|MAGT MAGST MAGT SRET|-b0 -c0 -c0 -b0|01023|1BWf0 1qM0 WM0 8Hz0|35e2","Asia/Tbilisi|GET|-40|0||11e5","Asia/Tehran|IRST IRDT|-3u -4u|01010101010101010101010|1BTUu 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6","Asia/Thimphu|BTT|-60|0||79e3","Asia/Tokyo|JST|-90|0||38e6","Asia/Tomsk|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 3Qp0|10e5","Asia/Ulaanbaatar|ULAT ULAST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|12e5","Asia/Ust-Nera|MAGT MAGST MAGT VLAT VLAT|-b0 -c0 -c0 -b0 -a0|010234|1BWf0 1qM0 WM0 17V0 7zD0|65e2","Asia/Vladivostok|VLAT VLAST VLAT|-a0 -b0 -b0|01020|1BWg0 1qM0 WM0 8Hz0|60e4","Asia/Yakutsk|YAKT YAKST YAKT|-90 -a0 -a0|01020|1BWh0 1qM0 WM0 8Hz0|28e4","Asia/Yekaterinburg|YEKT YEKST YEKT|-50 -60 -60|01020|1BWl0 1qM0 WM0 8Hz0|14e5","Asia/Yerevan|AMT AMST|-40 -50|01010|1BWm0 1qM0 WM0 1qM0|13e5","Atlantic/Azores|AZOT AZOST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4","Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5","Atlantic/Cape_Verde|CVT|10|0||50e4","Atlantic/South_Georgia|GST|20|0||30","Atlantic/Stanley|FKST FKT|30 40|010|1C6R0 U10|21e2","Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1C140 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5","Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1C14u 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5","Australia/Brisbane|AEST|-a0|0||20e5","Australia/Darwin|ACST|-9u|0||12e4","Australia/Eucla|ACWST|-8J|0||368","Australia/Lord_Howe|LHDT LHST|-b0 -au|01010101010101010101010|1C130 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347","Australia/Perth|AWST|-80|0||18e5","Pacific/Easter|EASST EAST|50 60|010101010101010101010|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|30e2","Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Etc/GMT+1|GMT+1|10|0|","Etc/GMT+10|GMT+10|a0|0|","Etc/GMT+11|GMT+11|b0|0|","Etc/GMT+12|GMT+12|c0|0|","Etc/GMT+2|GMT+2|20|0|","Etc/GMT+3|GMT+3|30|0|","Etc/GMT+4|GMT+4|40|0|","Etc/GMT+5|GMT+5|50|0|","Etc/GMT+6|GMT+6|60|0|","Etc/GMT+7|GMT+7|70|0|","Etc/GMT+8|GMT+8|80|0|","Etc/GMT+9|GMT+9|90|0|","Etc/GMT-1|GMT-1|-10|0|","Etc/GMT-10|GMT-10|-a0|0|","Etc/GMT-11|GMT-11|-b0|0|","Etc/GMT-12|GMT-12|-c0|0|","Etc/GMT-13|GMT-13|-d0|0|","Etc/GMT-14|GMT-14|-e0|0|","Etc/GMT-2|GMT-2|-20|0|","Etc/GMT-3|GMT-3|-30|0|","Etc/GMT-4|GMT-4|-40|0|","Etc/GMT-5|GMT-5|-50|0|","Etc/GMT-6|GMT-6|-60|0|","Etc/GMT-7|GMT-7|-70|0|","Etc/GMT-8|GMT-8|-80|0|","Etc/GMT-9|GMT-9|-90|0|","Etc/UCT|UCT|0|0|","Etc/UTC|UTC|0|0|","Europe/Astrakhan|+03 +04|-30 -40|010101|1BWn0 1qM0 WM0 8Hz0 3rd0","Europe/London|GMT BST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6","Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4","Europe/Kaliningrad|EET EEST FET|-20 -30 -30|01020|1BWo0 1qM0 WM0 8Hz0|44e4","Europe/Kirov|+03 +04|-30 -40|01010|1BWn0 1qM0 WM0 8Hz0|48e4","Europe/Minsk|EET EEST FET MSK|-20 -30 -30 -30|01023|1BWo0 1qM0 WM0 8Hy0|19e5","Europe/Moscow|MSK MSD MSK|-30 -40 -40|01020|1BWn0 1qM0 WM0 8Hz0|16e6","Europe/Samara|SAMT SAMST SAMT|-40 -40 -30|0120|1BWm0 1qN0 WM0|12e5","Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|01010101023|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4","Pacific/Honolulu|HST|a0|0||37e4","Indian/Chagos|IOT|-60|0||30e2","Indian/Christmas|CXT|-70|0||21e2","Indian/Cocos|CCT|-6u|0||596","Indian/Kerguelen|TFT|-50|0||130","Indian/Mahe|SCT|-40|0||79e3","Indian/Maldives|MVT|-50|0||35e4","Indian/Mauritius|MUT|-40|0||15e4","Indian/Reunion|RET|-40|0||84e4","Pacific/Majuro|MHT|-c0|0||28e3","MET|MET MEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00","Pacific/Chatham|CHADT CHAST|-dJ -cJ|01010101010101010101010|1C120 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600","Pacific/Apia|SST SDT WSDT WSST|b0 a0 -e0 -d0|01012323232323232323232|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3","Pacific/Bougainville|PGT BST|-a0 -b0|01|1NwE0|18e4","Pacific/Chuuk|CHUT|-a0|0||49e3","Pacific/Efate|VUT|-b0|0||66e3","Pacific/Enderbury|PHOT|-d0|0||1","Pacific/Fakaofo|TKT TKT|b0 -d0|01|1Gfn0|483","Pacific/Fiji|FJST FJT|-d0 -c0|01010101010101010101010|1BWe0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0|88e4","Pacific/Funafuti|TVT|-c0|0||45e2","Pacific/Galapagos|GALT|60|0||25e3","Pacific/Gambier|GAMT|90|0||125","Pacific/Guadalcanal|SBT|-b0|0||11e4","Pacific/Guam|ChST|-a0|0||17e4","Pacific/Kiritimati|LINT|-e0|0||51e2","Pacific/Kosrae|KOST|-b0|0||66e2","Pacific/Marquesas|MART|9u|0||86e2","Pacific/Pago_Pago|SST|b0|0||37e2","Pacific/Nauru|NRT|-c0|0||10e3","Pacific/Niue|NUT|b0|0||12e2","Pacific/Norfolk|NFT NFT|-bu -b0|01|1PoCu|25e4","Pacific/Noumea|NCT|-b0|0||98e3","Pacific/Palau|PWT|-90|0||21e3","Pacific/Pitcairn|PST|80|0||56","Pacific/Pohnpei|PONT|-b0|0||34e3","Pacific/Port_Moresby|PGT|-a0|0||25e4","Pacific/Rarotonga|CKT|a0|0||13e3","Pacific/Tahiti|TAHT|a0|0||18e4","Pacific/Tarawa|GILT|-c0|0||29e3","Pacific/Tongatapu|TOT|-d0|0||75e3","Pacific/Wake|WAKT|-c0|0||16e3","Pacific/Wallis|WFT|-c0|0||94"],links:["Africa/Abidjan|Africa/Accra","Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Bissau","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Monrovia","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Sao_Tome","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|America/Danmarkshavn","Africa/Abidjan|Atlantic/Reykjavik","Africa/Abidjan|Atlantic/St_Helena","Africa/Abidjan|Etc/GMT","Africa/Abidjan|Etc/GMT+0","Africa/Abidjan|Etc/GMT-0","Africa/Abidjan|Etc/GMT0","Africa/Abidjan|Etc/Greenwich","Africa/Abidjan|GMT","Africa/Abidjan|GMT+0","Africa/Abidjan|GMT-0","Africa/Abidjan|GMT0","Africa/Abidjan|Greenwich","Africa/Abidjan|Iceland","Africa/Algiers|Africa/Tunis","Africa/Cairo|Egypt","Africa/Casablanca|Africa/El_Aaiun","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Khartoum|Africa/Addis_Ababa","Africa/Khartoum|Africa/Asmara","Africa/Khartoum|Africa/Asmera","Africa/Khartoum|Africa/Dar_es_Salaam","Africa/Khartoum|Africa/Djibouti","Africa/Khartoum|Africa/Juba","Africa/Khartoum|Africa/Kampala","Africa/Khartoum|Africa/Mogadishu","Africa/Khartoum|Africa/Nairobi","Africa/Khartoum|Indian/Antananarivo","Africa/Khartoum|Indian/Comoro","Africa/Khartoum|Indian/Mayotte","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Ndjamena","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|America/Juneau","America/Anchorage|America/Nome","America/Anchorage|America/Sitka","America/Anchorage|America/Yakutat","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Argentina/Catamarca","America/Argentina/Buenos_Aires|America/Argentina/ComodRivadavia","America/Argentina/Buenos_Aires|America/Argentina/Cordoba","America/Argentina/Buenos_Aires|America/Argentina/Jujuy","America/Argentina/Buenos_Aires|America/Argentina/La_Rioja","America/Argentina/Buenos_Aires|America/Argentina/Mendoza","America/Argentina/Buenos_Aires|America/Argentina/Rio_Gallegos","America/Argentina/Buenos_Aires|America/Argentina/Salta","America/Argentina/Buenos_Aires|America/Argentina/San_Juan","America/Argentina/Buenos_Aires|America/Argentina/San_Luis","America/Argentina/Buenos_Aires|America/Argentina/Tucuman","America/Argentina/Buenos_Aires|America/Argentina/Ushuaia","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Buenos_Aires|America/Catamarca","America/Argentina/Buenos_Aires|America/Cordoba","America/Argentina/Buenos_Aires|America/Jujuy","America/Argentina/Buenos_Aires|America/Mendoza","America/Argentina/Buenos_Aires|America/Rosario","America/Campo_Grande|America/Cuiaba","America/Chicago|America/Indiana/Knox","America/Chicago|America/Indiana/Tell_City","America/Chicago|America/Knox_IN","America/Chicago|America/Matamoros","America/Chicago|America/Menominee","America/Chicago|America/North_Dakota/Center","America/Chicago|America/North_Dakota/New_Salem","America/Chicago|America/Rainy_River","America/Chicago|America/Rankin_Inlet","America/Chicago|America/Resolute","America/Chicago|America/Winnipeg","America/Chicago|CST6CDT","America/Chicago|Canada/Central","America/Chicago|US/Central","America/Chicago|US/Indiana-Starke","America/Chihuahua|America/Mazatlan","America/Chihuahua|Mexico/BajaSur","America/Denver|America/Boise","America/Denver|America/Cambridge_Bay","America/Denver|America/Edmonton","America/Denver|America/Inuvik","America/Denver|America/Ojinaga","America/Denver|America/Shiprock","America/Denver|America/Yellowknife","America/Denver|Canada/Mountain","America/Denver|MST7MDT","America/Denver|Navajo","America/Denver|US/Mountain","America/Fortaleza|America/Belem","America/Fortaleza|America/Maceio","America/Fortaleza|America/Recife","America/Fortaleza|America/Santarem","America/Halifax|America/Glace_Bay","America/Halifax|America/Moncton","America/Halifax|America/Thule","America/Halifax|Atlantic/Bermuda","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Los_Angeles|America/Dawson","America/Los_Angeles|America/Ensenada","America/Los_Angeles|America/Santa_Isabel","America/Los_Angeles|America/Tijuana","America/Los_Angeles|America/Vancouver","America/Los_Angeles|America/Whitehorse","America/Los_Angeles|Canada/Pacific","America/Los_Angeles|Canada/Yukon","America/Los_Angeles|Mexico/BajaNorte","America/Los_Angeles|PST8PDT","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Managua|America/Belize","America/Managua|America/Costa_Rica","America/Managua|America/El_Salvador","America/Managua|America/Guatemala","America/Managua|America/Regina","America/Managua|America/Swift_Current","America/Managua|America/Tegucigalpa","America/Managua|Canada/East-Saskatchewan","America/Managua|Canada/Saskatchewan","America/Manaus|America/Boa_Vista","America/Manaus|America/Porto_Velho","America/Manaus|Brazil/West","America/Mexico_City|America/Merida","America/Mexico_City|America/Monterrey","America/Mexico_City|Mexico/General","America/New_York|America/Detroit","America/New_York|America/Fort_Wayne","America/New_York|America/Indiana/Indianapolis","America/New_York|America/Indiana/Marengo","America/New_York|America/Indiana/Petersburg","America/New_York|America/Indiana/Vevay","America/New_York|America/Indiana/Vincennes","America/New_York|America/Indiana/Winamac","America/New_York|America/Indianapolis","America/New_York|America/Iqaluit","America/New_York|America/Kentucky/Louisville","America/New_York|America/Kentucky/Monticello","America/New_York|America/Louisville","America/New_York|America/Montreal","America/New_York|America/Nassau","America/New_York|America/Nipigon","America/New_York|America/Pangnirtung","America/New_York|America/Thunder_Bay","America/New_York|America/Toronto","America/New_York|Canada/Eastern","America/New_York|EST5EDT","America/New_York|US/East-Indiana","America/New_York|US/Eastern","America/New_York|US/Michigan","America/Noronha|Brazil/DeNoronha","America/Panama|America/Atikokan","America/Panama|America/Cayman","America/Panama|America/Coral_Harbour","America/Panama|America/Jamaica","America/Panama|EST","America/Panama|Jamaica","America/Phoenix|America/Creston","America/Phoenix|America/Dawson_Creek","America/Phoenix|America/Hermosillo","America/Phoenix|MST","America/Phoenix|US/Arizona","America/Rio_Branco|America/Eirunepe","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Antarctica/Palmer","America/Santiago|Chile/Continental","America/Santo_Domingo|America/Anguilla","America/Santo_Domingo|America/Antigua","America/Santo_Domingo|America/Aruba","America/Santo_Domingo|America/Barbados","America/Santo_Domingo|America/Blanc-Sablon","America/Santo_Domingo|America/Curacao","America/Santo_Domingo|America/Dominica","America/Santo_Domingo|America/Grenada","America/Santo_Domingo|America/Guadeloupe","America/Santo_Domingo|America/Kralendijk","America/Santo_Domingo|America/Lower_Princes","America/Santo_Domingo|America/Marigot","America/Santo_Domingo|America/Martinique","America/Santo_Domingo|America/Montserrat","America/Santo_Domingo|America/Port_of_Spain","America/Santo_Domingo|America/Puerto_Rico","America/Santo_Domingo|America/St_Barthelemy","America/Santo_Domingo|America/St_Kitts","America/Santo_Domingo|America/St_Lucia","America/Santo_Domingo|America/St_Thomas","America/Santo_Domingo|America/St_Vincent","America/Santo_Domingo|America/Tortola","America/Santo_Domingo|America/Virgin","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","Asia/Almaty|Asia/Qyzylorda","Asia/Aqtobe|Asia/Aqtau","Asia/Aqtobe|Asia/Oral","Asia/Ashgabat|Asia/Ashkhabad","Asia/Baghdad|Asia/Aden","Asia/Baghdad|Asia/Bahrain","Asia/Baghdad|Asia/Kuwait","Asia/Baghdad|Asia/Qatar","Asia/Baghdad|Asia/Riyadh","Asia/Bangkok|Asia/Ho_Chi_Minh","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Saigon","Asia/Bangkok|Asia/Vientiane","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Hong_Kong|Hongkong","Asia/Jakarta|Asia/Pontianak","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kolkata|Asia/Colombo","Asia/Kuala_Lumpur|Asia/Kuching","Asia/Makassar|Asia/Ujung_Pandang","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|Asia/Macao","Asia/Shanghai|Asia/Macau","Asia/Shanghai|Asia/Taipei","Asia/Shanghai|PRC","Asia/Shanghai|ROC","Asia/Singapore|Singapore","Asia/Tashkent|Asia/Samarkand","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Asia/Kashgar","Australia/Adelaide|Australia/Broken_Hill","Australia/Adelaide|Australia/South","Australia/Adelaide|Australia/Yancowinna","Australia/Brisbane|Australia/Lindeman","Australia/Brisbane|Australia/Queensland","Australia/Darwin|Australia/North","Australia/Lord_Howe|Australia/LHI","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/Currie","Australia/Sydney|Australia/Hobart","Australia/Sydney|Australia/Melbourne","Australia/Sydney|Australia/NSW","Australia/Sydney|Australia/Tasmania","Australia/Sydney|Australia/Victoria","Etc/UCT|UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Astrakhan|Europe/Ulyanovsk","Europe/Athens|Asia/Nicosia","Europe/Athens|EET","Europe/Athens|Europe/Bucharest","Europe/Athens|Europe/Helsinki","Europe/Athens|Europe/Kiev","Europe/Athens|Europe/Mariehamn","Europe/Athens|Europe/Nicosia","Europe/Athens|Europe/Riga","Europe/Athens|Europe/Sofia","Europe/Athens|Europe/Tallinn","Europe/Athens|Europe/Uzhgorod","Europe/Athens|Europe/Vilnius","Europe/Athens|Europe/Zaporozhye","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Atlantic/Canary","Europe/Lisbon|Atlantic/Faeroe","Europe/Lisbon|Atlantic/Faroe","Europe/Lisbon|Atlantic/Madeira","Europe/Lisbon|Portugal","Europe/Lisbon|WET","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|Europe/Volgograd","Europe/Moscow|W-SU","Europe/Paris|Africa/Ceuta","Europe/Paris|Arctic/Longyearbyen","Europe/Paris|Atlantic/Jan_Mayen","Europe/Paris|CET","Europe/Paris|Europe/Amsterdam","Europe/Paris|Europe/Andorra","Europe/Paris|Europe/Belgrade","Europe/Paris|Europe/Berlin","Europe/Paris|Europe/Bratislava","Europe/Paris|Europe/Brussels","Europe/Paris|Europe/Budapest","Europe/Paris|Europe/Busingen","Europe/Paris|Europe/Copenhagen","Europe/Paris|Europe/Gibraltar","Europe/Paris|Europe/Ljubljana","Europe/Paris|Europe/Luxembourg","Europe/Paris|Europe/Madrid","Europe/Paris|Europe/Malta","Europe/Paris|Europe/Monaco","Europe/Paris|Europe/Oslo","Europe/Paris|Europe/Podgorica","Europe/Paris|Europe/Prague","Europe/Paris|Europe/Rome","Europe/Paris|Europe/San_Marino","Europe/Paris|Europe/Sarajevo","Europe/Paris|Europe/Skopje","Europe/Paris|Europe/Stockholm","Europe/Paris|Europe/Tirane","Europe/Paris|Europe/Vaduz","Europe/Paris|Europe/Vatican","Europe/Paris|Europe/Vienna","Europe/Paris|Europe/Warsaw","Europe/Paris|Europe/Zagreb","Europe/Paris|Europe/Zurich","Europe/Paris|Poland","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Chuuk|Pacific/Truk","Pacific/Chuuk|Pacific/Yap","Pacific/Easter|Chile/EasterIsland","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|HST","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Majuro|Kwajalein","Pacific/Majuro|Pacific/Kwajalein","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Pohnpei|Pacific/Ponape"]
}),a});


name: moment.min.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\moment.min.js
mime: unavailable
content:
//! moment.js
//! version : 2.14.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return md.apply(null,arguments)}
// This is done to register the method called with moment()
// without creating circular dependencies.
function b(a){md=a}function c(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function d(a){return"[object Object]"===Object.prototype.toString.call(a)}function e(a){var b;for(b in a)
// even if its not own property I'd still call it non-empty
return!1;return!0}function f(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function g(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function h(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function i(a,b){for(var c in b)h(b,c)&&(a[c]=b[c]);return h(b,"toString")&&(a.toString=b.toString),h(b,"valueOf")&&(a.valueOf=b.valueOf),a}function j(a,b,c,d){return qb(a,b,c,d,!0).utc()}function k(){
// We need to deep clone this object.
return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function l(a){return null==a._pf&&(a._pf=k()),a._pf}function m(a){if(null==a._isValid){var b=l(a),c=nd.call(b.parsedDateParts,function(a){return null!=a});a._isValid=!isNaN(a._d.getTime())&&b.overflow<0&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c),a._strict&&(a._isValid=a._isValid&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour)}return a._isValid}function n(a){var b=j(NaN);return null!=a?i(l(b),a):l(b).userInvalidated=!0,b}function o(a){return void 0===a}function p(a,b){var c,d,e;if(o(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),o(b._i)||(a._i=b._i),o(b._f)||(a._f=b._f),o(b._l)||(a._l=b._l),o(b._strict)||(a._strict=b._strict),o(b._tzm)||(a._tzm=b._tzm),o(b._isUTC)||(a._isUTC=b._isUTC),o(b._offset)||(a._offset=b._offset),o(b._pf)||(a._pf=l(b)),o(b._locale)||(a._locale=b._locale),od.length>0)for(c in od)d=od[c],e=b[d],o(e)||(a[d]=e);return a}
// Moment prototype object
function q(b){p(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),pd===!1&&(pd=!0,a.updateOffset(this),pd=!1)}function r(a){return a instanceof q||null!=a&&null!=a._isAMomentObject}function s(a){return 0>a?Math.ceil(a)||0:Math.floor(a)}function t(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=s(b)),c}
// compare two arrays, return the number of differences
function u(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&t(a[d])!==t(b[d]))&&g++;return g+f}function v(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function w(b,c){var d=!0;return i(function(){return null!=a.deprecationHandler&&a.deprecationHandler(null,b),d&&(v(b+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),d=!1),c.apply(this,arguments)},c)}function x(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c),qd[b]||(v(c),qd[b]=!0)}function y(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function z(a){var b,c;for(c in a)b=a[c],y(b)?this[c]=b:this["_"+c]=b;this._config=a,
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _ordinalParseLenient.
this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function A(a,b){var c,e=i({},a);for(c in b)h(b,c)&&(d(a[c])&&d(b[c])?(e[c]={},i(e[c],a[c]),i(e[c],b[c])):null!=b[c]?e[c]=b[c]:delete e[c]);for(c in a)h(a,c)&&!h(b,c)&&d(a[c])&&(
// make sure changes to properties don't modify parent config
e[c]=i({},e[c]));return e}function B(a){null!=a&&this.set(a)}function C(a,b,c){var d=this._calendar[a]||this._calendar.sameElse;return y(d)?d.call(b,c):d}function D(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function E(){return this._invalidDate}function F(a){return this._ordinal.replace("%d",a)}function G(a,b,c,d){var e=this._relativeTime[c];return y(e)?e(a,b,c,d):e.replace(/%d/i,a)}function H(a,b){var c=this._relativeTime[a>0?"future":"past"];return y(c)?c(b):c.replace(/%s/i,b)}function I(a,b){var c=a.toLowerCase();zd[c]=zd[c+"s"]=zd[b]=a}function J(a){return"string"==typeof a?zd[a]||zd[a.toLowerCase()]:void 0}function K(a){var b,c,d={};for(c in a)h(a,c)&&(b=J(c),b&&(d[b]=a[c]));return d}function L(a,b){Ad[a]=b}function M(a){var b=[];for(var c in a)b.push({unit:c,priority:Ad[c]});return b.sort(function(a,b){return a.priority-b.priority}),b}function N(b,c){return function(d){return null!=d?(P(this,b,d),a.updateOffset(this,c),this):O(this,b)}}function O(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function P(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}
// MOMENTS
function Q(a){return a=J(a),y(this[a])?this[a]():this}function R(a,b){if("object"==typeof a){a=K(a);for(var c=M(a),d=0;d<c.length;d++)this[c[d].unit](a[c[d].unit])}else if(a=J(a),y(this[a]))return this[a](b);return this}function S(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}
// token:    'M'
// padded:   ['MM', 2]
// ordinal:  'Mo'
// callback: function () { this.month() + 1 }
function T(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Ed[a]=e),b&&(Ed[b[0]]=function(){return S(e.apply(this,arguments),b[1],b[2])}),c&&(Ed[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function U(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function V(a){var b,c,d=a.match(Bd);for(b=0,c=d.length;c>b;b++)Ed[d[b]]?d[b]=Ed[d[b]]:d[b]=U(d[b]);return function(b){var e,f="";for(e=0;c>e;e++)f+=d[e]instanceof Function?d[e].call(b,a):d[e];return f}}
// format date using native date object
function W(a,b){return a.isValid()?(b=X(b,a.localeData()),Dd[b]=Dd[b]||V(b),Dd[b](a)):a.localeData().invalidDate()}function X(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Cd.lastIndex=0;d>=0&&Cd.test(a);)a=a.replace(Cd,c),Cd.lastIndex=0,d-=1;return a}function Y(a,b,c){Wd[a]=y(b)?b:function(a,d){return a&&c?c:b}}function Z(a,b){return h(Wd,a)?Wd[a](b._strict,b._locale):new RegExp($(a))}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function $(a){return _(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function _(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function aa(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=t(a)}),c=0;c<a.length;c++)Xd[a[c]]=d}function ba(a,b){aa(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function ca(a,b,c){null!=b&&h(Xd,a)&&Xd[a](b,c._a,c,a)}function da(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ea(a,b){return c(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||fe).test(b)?"format":"standalone"][a.month()]}function fa(a,b){return c(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[fe.test(b)?"format":"standalone"][a.month()]}function ga(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._monthsParse)for(
// this is not used
this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;12>d;++d)f=j([2e3,d]),this._shortMonthsParse[d]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(f,"").toLocaleLowerCase();return c?"MMM"===b?(e=sd.call(this._shortMonthsParse,g),-1!==e?e:null):(e=sd.call(this._longMonthsParse,g),-1!==e?e:null):"MMM"===b?(e=sd.call(this._shortMonthsParse,g),-1!==e?e:(e=sd.call(this._longMonthsParse,g),-1!==e?e:null)):(e=sd.call(this._longMonthsParse,g),-1!==e?e:(e=sd.call(this._shortMonthsParse,g),-1!==e?e:null))}function ha(a,b,c){var d,e,f;if(this._monthsParseExact)return ga.call(this,a,b,c);
// TODO: add sorting
// Sorting makes sure if one month (or abbr) is a prefix of another
// see sorting in computeMonthsParse
for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){
// test the regex
if(e=j([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}
// MOMENTS
function ia(a,b){var c;if(!a.isValid())
// No op
return a;if("string"==typeof b)if(/^\d+$/.test(b))b=t(b);else
// TODO: Another silent failure?
if(b=a.localeData().monthsParse(b),"number"!=typeof b)return a;return c=Math.min(a.date(),da(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a}function ja(b){return null!=b?(ia(this,b),a.updateOffset(this,!0),this):O(this,"Month")}function ka(){return da(this.year(),this.month())}function la(a){return this._monthsParseExact?(h(this,"_monthsRegex")||na.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=ie),this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex)}function ma(a){return this._monthsParseExact?(h(this,"_monthsRegex")||na.call(this),a?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=je),this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex)}function na(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=j([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(
// Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece.
d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=_(d[b]),e[b]=_(e[b]);for(b=0;24>b;b++)f[b]=_(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}
// HELPERS
function oa(a){return pa(a)?366:365}function pa(a){return a%4===0&&a%100!==0||a%400===0}function qa(){return pa(this.year())}function ra(a,b,c,d,e,f,g){
//can't just apply() to create a date:
//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
var h=new Date(a,b,c,d,e,f,g);
//the date constructor remaps years 0-99 to 1900-1999
return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function sa(a){var b=new Date(Date.UTC.apply(null,arguments));
//the Date.UTC function remaps years 0-99 to 1900-1999
return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}
// start-of-first-week - start-of-year
function ta(a,b,c){var// first-week day -- which january is always in the first week (4 for iso, 1 for other)
d=7+b-c,
// first-week day local weekday -- which local weekday is fwd
e=(7+sa(a,0,d).getUTCDay()-b)%7;return-e+d-1}
//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function ua(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=ta(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=oa(f)+j):j>oa(a)?(f=a+1,g=j-oa(a)):(f=a,g=j),{year:f,dayOfYear:g}}function va(a,b,c){var d,e,f=ta(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+wa(e,b,c)):g>wa(a.year(),b,c)?(d=g-wa(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function wa(a,b,c){var d=ta(a,b,c),e=ta(a+1,b,c);return(oa(a)-d+e)/7}
// HELPERS
// LOCALES
function xa(a){return va(a,this._week.dow,this._week.doy).week}function ya(){return this._week.dow}function za(){return this._week.doy}
// MOMENTS
function Aa(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ba(a){var b=va(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}
// HELPERS
function Ca(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Da(a,b){return"string"==typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a}function Ea(a,b){return c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function Fa(a){return this._weekdaysShort[a.day()]}function Ga(a){return this._weekdaysMin[a.day()]}function Ha(a,b,c){var d,e,f,g=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;7>d;++d)f=j([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(f,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(f,"").toLocaleLowerCase();return c?"dddd"===b?(e=sd.call(this._weekdaysParse,g),-1!==e?e:null):"ddd"===b?(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:null):(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null):"dddd"===b?(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null))):"ddd"===b?(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:null))):(e=sd.call(this._minWeekdaysParse,g),-1!==e?e:(e=sd.call(this._weekdaysParse,g),-1!==e?e:(e=sd.call(this._shortWeekdaysParse,g),-1!==e?e:null)))}function Ia(a,b,c){var d,e,f;if(this._weekdaysParseExact)return Ha.call(this,a,b,c);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){
// test the regex
if(e=j([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}
// MOMENTS
function Ja(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Ca(a,this.localeData()),this.add(a-b,"d")):b}function Ka(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function La(a){if(!this.isValid())return null!=a?this:NaN;
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
if(null!=a){var b=Da(a,this.localeData());return this.day(this.day()%7?b:b-7)}return this.day()||7}function Ma(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=pe),this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex)}function Na(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Oa(a){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Pa.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=re),this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Pa(){function a(a,b){return b.length-a.length}var b,c,d,e,f,g=[],h=[],i=[],k=[];for(b=0;7>b;b++)c=j([2e3,1]).day(b),d=this.weekdaysMin(c,""),e=this.weekdaysShort(c,""),f=this.weekdays(c,""),g.push(d),h.push(e),i.push(f),k.push(d),k.push(e),k.push(f);for(
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
// will match the longer piece.
g.sort(a),h.sort(a),i.sort(a),k.sort(a),b=0;7>b;b++)h[b]=_(h[b]),i[b]=_(i[b]),k[b]=_(k[b]);this._weekdaysRegex=new RegExp("^("+k.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+g.join("|")+")","i")}
// FORMATTING
function Qa(){return this.hours()%12||12}function Ra(){return this.hours()||24}function Sa(a,b){T(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}
// PARSING
function Ta(a,b){return b._meridiemParse}
// LOCALES
function Ua(a){
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return"p"===(a+"").toLowerCase().charAt(0)}function Va(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Wa(a){return a?a.toLowerCase().replace("_","-"):a}
// pick the locale from the array
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split("-"),b=e.length,c=Wa(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=Ya(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)
//the next array item is better than a shallower substring of this one
break;b--}f++}return null}function Ya(a){var b=null;
// TODO: Find a better way to register and load all the locales in Node
if(!we[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=se._abbr,require("./locale/"+a),
// because defineLocale currently also sets the global locale, we
// want to undo that for lazy loaded locales
Za(b)}catch(c){}return we[a]}
// This function will load locale and then set the global locale.  If
// no arguments are passed in, it will simply return the current global
// locale key.
function Za(a,b){var c;
// moment.duration._locale = moment._locale = data;
return a&&(c=o(b)?ab(a):$a(a,b),c&&(se=c)),se._abbr}function $a(a,b){if(null!==b){var c=ve;
// treat as if there is no base config
// backwards compat for now: also set the locale
return b.abbr=a,null!=we[a]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=we[a]._config):null!=b.parentLocale&&(null!=we[b.parentLocale]?c=we[b.parentLocale]._config:x("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),we[a]=new B(A(c,b)),Za(a),we[a]}
// useful for testing
return delete we[a],null}function _a(a,b){if(null!=b){var c,d=ve;
// MERGE
null!=we[a]&&(d=we[a]._config),b=A(d,b),c=new B(b),c.parentLocale=we[a],we[a]=c,
// backwards compat for now: also set the locale
Za(a)}else
// pass null for config to unupdate, useful for tests
null!=we[a]&&(null!=we[a].parentLocale?we[a]=we[a].parentLocale:null!=we[a]&&delete we[a]);return we[a]}
// returns locale data
function ab(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return se;if(!c(a)){if(b=Ya(a))return b;a=[a]}return Xa(a)}function bb(){return rd(we)}function cb(a){var b,c=a._a;return c&&-2===l(a).overflow&&(b=c[Zd]<0||c[Zd]>11?Zd:c[$d]<1||c[$d]>da(c[Yd],c[Zd])?$d:c[_d]<0||c[_d]>24||24===c[_d]&&(0!==c[ae]||0!==c[be]||0!==c[ce])?_d:c[ae]<0||c[ae]>59?ae:c[be]<0||c[be]>59?be:c[ce]<0||c[ce]>999?ce:-1,l(a)._overflowDayOfYear&&(Yd>b||b>$d)&&(b=$d),l(a)._overflowWeeks&&-1===b&&(b=de),l(a)._overflowWeekday&&-1===b&&(b=ee),l(a).overflow=b),a}
// date from iso format
function db(a){var b,c,d,e,f,g,h=a._i,i=xe.exec(h)||ye.exec(h);if(i){for(l(a).iso=!0,b=0,c=Ae.length;c>b;b++)if(Ae[b][1].exec(i[1])){e=Ae[b][0],d=Ae[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Be.length;c>b;b++)if(Be[b][1].exec(i[3])){
// match[2] should be 'T' or space
f=(i[2]||" ")+Be[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!ze.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),jb(a)}else a._isValid=!1}
// date from iso format or fallback
function eb(b){var c=Ce.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(db(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}
// Pick the first defined of two or three arguments.
function fb(a,b,c){return null!=a?a:null!=b?b:c}function gb(b){
// hooks is actually the exported moment object
var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function hb(a){var b,c,d,e,f=[];if(!a._d){
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for(d=gb(a),a._w&&null==a._a[$d]&&null==a._a[Zd]&&ib(a),a._dayOfYear&&(e=fb(a._a[Yd],d[Yd]),a._dayOfYear>oa(e)&&(l(a)._overflowDayOfYear=!0),c=sa(e,0,a._dayOfYear),a._a[Zd]=c.getUTCMonth(),a._a[$d]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];
// Zero out whatever was not defaulted, including time
for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];
// Check for 24:00:00.000
24===a._a[_d]&&0===a._a[ae]&&0===a._a[be]&&0===a._a[ce]&&(a._nextDay=!0,a._a[_d]=0),a._d=(a._useUTC?sa:ra).apply(null,f),
// Apply timezone offset from input. The actual utcOffset can be changed
// with parseZone.
null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[_d]=24)}}function ib(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=fb(b.GG,a._a[Yd],va(rb(),1,4).year),d=fb(b.W,1),e=fb(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=fb(b.gg,a._a[Yd],va(rb(),f,g).year),d=fb(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>wa(c,f,g)?l(a)._overflowWeeks=!0:null!=i?l(a)._overflowWeekday=!0:(h=ua(c,d,e,f,g),a._a[Yd]=h.year,a._dayOfYear=h.dayOfYear)}
// date from string and format string
function jb(b){
// TODO: Move this to another part of the creation flow to prevent circular deps
if(b._f===a.ISO_8601)return void db(b);b._a=[],l(b).empty=!0;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=X(b._f,b._locale).match(Bd)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(Z(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&l(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),Ed[f]?(d?l(b).empty=!1:l(b).unusedTokens.push(f),ca(f,d,b)):b._strict&&!d&&l(b).unusedTokens.push(f);
// add remaining unparsed input length to the string
l(b).charsLeftOver=i-j,h.length>0&&l(b).unusedInput.push(h),
// clear _12h flag if hour is <= 12
b._a[_d]<=12&&l(b).bigHour===!0&&b._a[_d]>0&&(l(b).bigHour=void 0),l(b).parsedDateParts=b._a.slice(0),l(b).meridiem=b._meridiem,
// handle meridiem
b._a[_d]=kb(b._locale,b._a[_d],b._meridiem),hb(b),cb(b)}function kb(a,b,c){var d;
// Fallback
return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}
// date from string and array of format strings
function lb(a){var b,c,d,e,f;if(0===a._f.length)return l(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=p({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],jb(b),m(b)&&(f+=l(b).charsLeftOver,f+=10*l(b).unusedTokens.length,l(b).score=f,(null==d||d>f)&&(d=f,c=b));i(a,c||b)}function mb(a){if(!a._d){var b=K(a._i);a._a=g([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),hb(a)}}function nb(a){var b=new q(cb(ob(a)));
// Adding is smart enough around DST
return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function ob(a){var b=a._i,d=a._f;return a._locale=a._locale||ab(a._l),null===b||void 0===d&&""===b?n({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),r(b)?new q(cb(b)):(c(d)?lb(a):f(b)?a._d=b:d?jb(a):pb(a),m(a)||(a._d=null),a))}function pb(b){var d=b._i;void 0===d?b._d=new Date(a.now()):f(d)?b._d=new Date(d.valueOf()):"string"==typeof d?eb(b):c(d)?(b._a=g(d.slice(0),function(a){return parseInt(a,10)}),hb(b)):"object"==typeof d?mb(b):"number"==typeof d?
// from milliseconds
b._d=new Date(d):a.createFromInputFallback(b)}function qb(a,b,f,g,h){var i={};
// object construction must be done this way.
// https://github.com/moment/moment/issues/1423
return"boolean"==typeof f&&(g=f,f=void 0),(d(a)&&e(a)||c(a)&&0===a.length)&&(a=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=h,i._l=f,i._i=a,i._f=b,i._strict=g,nb(i)}function rb(a,b,c,d){return qb(a,b,c,d,!1)}
// Pick a moment m from moments so that m[fn](other) is true for all
// other. This relies on the function fn to be transitive.
//
// moments should either be an array of moment objects or an array, whose
// first element is an array of moment objects.
function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}
// TODO: Use [].sort instead?
function tb(){var a=[].slice.call(arguments,0);return sb("isBefore",a)}function ub(){var a=[].slice.call(arguments,0);return sb("isAfter",a)}function vb(a){var b=K(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;
// representation for dateAddRemove
this._milliseconds=+k+1e3*j+// 1000
6e4*i+// 1000 * 60
1e3*h*60*60,//using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days=+g+7*f,
// It is impossible translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months=+e+3*d+12*c,this._data={},this._locale=ab(),this._bubble()}function wb(a){return a instanceof vb}
// FORMATTING
function xb(a,b){T(a,0,0,function(){var a=this.utcOffset(),c="+";return 0>a&&(a=-a,c="-"),c+S(~~(a/60),2)+b+S(~~a%60,2)})}function yb(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Ge)||["-",0,0],f=+(60*e[1])+t(e[2]);return"+"===e[0]?f:-f}
// Return a moment from input, that is local/utc/zone equivalent to model.
function zb(b,c){var d,e;
// Use low-level api, because this fn is low-level api.
return c._isUTC?(d=c.clone(),e=(r(b)||f(b)?b.valueOf():rb(b).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+e),a.updateOffset(d,!1),d):rb(b).local()}function Ab(a){
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
// https://github.com/moment/moment/pull/1871
return 15*-Math.round(a._d.getTimezoneOffset()/15)}
// MOMENTS
// keepLocalTime = true means only change the timezone, without
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
// +0200, so we adjust the time as needed, to be valid.
//
// Keeping the time actually adds/subtracts (one hour)
// from the actual represented time. That is why we call updateOffset
// a second time. In case it wants us to change the offset again
// _changeInProgress == true case, then we have to adjust, because
// there is no such time in the given timezone.
function Bb(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=yb(Td,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ab(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?Sb(this,Mb(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ab(this):null!=b?this:NaN}function Cb(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Db(a){return this.utcOffset(0,a)}function Eb(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ab(this),"m")),this}function Fb(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(yb(Sd,this._i)),this}function Gb(a){return this.isValid()?(a=a?rb(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function Hb(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ib(){if(!o(this._isDSTShifted))return this._isDSTShifted;var a={};if(p(a,this),a=ob(a),a._a){var b=a._isUTC?j(a._a):rb(a._a);this._isDSTShifted=this.isValid()&&u(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Jb(){return this.isValid()?!this._isUTC:!1}function Kb(){return this.isValid()?this._isUTC:!1}function Lb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Mb(a,b){var c,d,e,f=a,
// matching against regexp is expensive, do it on demand
g=null;// checks for null or undefined
return wb(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(f={},b?f[b]=a:f.milliseconds=a):(g=He.exec(a))?(c="-"===g[1]?-1:1,f={y:0,d:t(g[$d])*c,h:t(g[_d])*c,m:t(g[ae])*c,s:t(g[be])*c,ms:t(g[ce])*c}):(g=Ie.exec(a))?(c="-"===g[1]?-1:1,f={y:Nb(g[2],c),M:Nb(g[3],c),w:Nb(g[4],c),d:Nb(g[5],c),h:Nb(g[6],c),m:Nb(g[7],c),s:Nb(g[8],c)}):null==f?f={}:"object"==typeof f&&("from"in f||"to"in f)&&(e=Pb(rb(f.from),rb(f.to)),f={},f.ms=e.milliseconds,f.M=e.months),d=new vb(f),wb(a)&&h(a,"_locale")&&(d._locale=a._locale),d}function Nb(a,b){
// We'd normally use ~~inp for this, but unfortunately it also
// converts floats to ints.
// inp may be undefined, so careful calling replace on it.
var c=a&&parseFloat(a.replace(",","."));
// apply sign while we're at it
return(isNaN(c)?0:c)*b}function Ob(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Pb(a,b){var c;return a.isValid()&&b.isValid()?(b=zb(b,a),a.isBefore(b)?c=Ob(a,b):(c=Ob(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function Qb(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}
// TODO: remove 'name' arg after deprecation is removed
function Rb(a,b){return function(c,d){var e,f;
//invert the arguments, but complain about it
return null===d||isNaN(+d)||(x(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Mb(c,d),Sb(this,e,a),this}}function Sb(b,c,d,e){var f=c._milliseconds,g=Qb(c._days),h=Qb(c._months);b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(b._d.valueOf()+f*d),g&&P(b,"Date",O(b,"Date")+g*d),h&&ia(b,O(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function Tb(a,b){var c=a.diff(b,"days",!0);return-6>c?"sameElse":-1>c?"lastWeek":0>c?"lastDay":1>c?"sameDay":2>c?"nextDay":7>c?"nextWeek":"sameElse"}function Ub(b,c){
// We want to compare the start of today, vs this.
// Getting start-of-today depends on whether we're local/utc/offset or not.
var d=b||rb(),e=zb(d,this).startOf("day"),f=a.calendarFormat(this,e)||"sameElse",g=c&&(y(c[f])?c[f].call(this,d):c[f]);return this.format(g||this.localeData().calendar(f,this,rb(d)))}function Vb(){return new q(this)}function Wb(a,b){var c=r(a)?a:rb(a);return this.isValid()&&c.isValid()?(b=J(o(b)?"millisecond":b),"millisecond"===b?this.valueOf()>c.valueOf():c.valueOf()<this.clone().startOf(b).valueOf()):!1}function Xb(a,b){var c=r(a)?a:rb(a);return this.isValid()&&c.isValid()?(b=J(o(b)?"millisecond":b),"millisecond"===b?this.valueOf()<c.valueOf():this.clone().endOf(b).valueOf()<c.valueOf()):!1}function Yb(a,b,c,d){return d=d||"()",("("===d[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===d[1]?this.isBefore(b,c):!this.isAfter(b,c))}function Zb(a,b){var c,d=r(a)?a:rb(a);return this.isValid()&&d.isValid()?(b=J(b||"millisecond"),"millisecond"===b?this.valueOf()===d.valueOf():(c=d.valueOf(),this.clone().startOf(b).valueOf()<=c&&c<=this.clone().endOf(b).valueOf())):!1}function $b(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function _b(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function ac(a,b,c){var d,e,f,g;// 1000
// 1000 * 60
// 1000 * 60 * 60
// 1000 * 60 * 60 * 24, negate dst
// 1000 * 60 * 60 * 24 * 7, negate dst
return this.isValid()?(d=zb(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=J(b),"year"===b||"month"===b||"quarter"===b?(g=bc(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:s(g)):NaN):NaN}function bc(a,b){
// difference in months
var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),
// b is in (anchor - 1 month, anchor + 1 month)
f=a.clone().add(e,"months");
//check for negative zero, return zero if negative zero
// linear across the month
// linear across the month
return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)||0}function cc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function dc(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?y(Date.prototype.toISOString)?this.toDate().toISOString():W(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):W(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function ec(b){b||(b=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var c=W(this,b);return this.localeData().postformat(c)}function fc(a,b){return this.isValid()&&(r(a)&&a.isValid()||rb(a).isValid())?Mb({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function gc(a){return this.from(rb(),a)}function hc(a,b){return this.isValid()&&(r(a)&&a.isValid()||rb(a).isValid())?Mb({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function ic(a){return this.to(rb(),a)}
// If passed a locale key, it will set the locale for this
// instance.  Otherwise, it will return the locale configuration
// variables for this instance.
function jc(a){var b;return void 0===a?this._locale._abbr:(b=ab(a),null!=b&&(this._locale=b),this)}function kc(){return this._locale}function lc(a){
// the following switch intentionally omits break keywords
// to utilize falling through the cases.
switch(a=J(a)){case"year":this.month(0);/* falls through */
case"quarter":case"month":this.date(1);/* falls through */
case"week":case"isoWeek":case"day":case"date":this.hours(0);/* falls through */
case"hour":this.minutes(0);/* falls through */
case"minute":this.seconds(0);/* falls through */
case"second":this.milliseconds(0)}
// weeks are a special case
// quarters are also special
return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function mc(a){
// 'date' is an alias for 'day', so it should be considered as such.
return a=J(a),void 0===a||"millisecond"===a?this:("date"===a&&(a="day"),this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms"))}function nc(){return this._d.valueOf()-6e4*(this._offset||0)}function oc(){return Math.floor(this.valueOf()/1e3)}function pc(){return new Date(this.valueOf())}function qc(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function rc(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function sc(){
// new Date(NaN).toJSON() === null
return this.isValid()?this.toISOString():null}function tc(){return m(this)}function uc(){return i({},l(this))}function vc(){return l(this).overflow}function wc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function xc(a,b){T(0,[a,a.length],0,b)}
// MOMENTS
function yc(a){return Cc.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function zc(a){return Cc.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Ac(){return wa(this.year(),1,4)}function Bc(){var a=this.localeData()._week;return wa(this.year(),a.dow,a.doy)}function Cc(a,b,c,d,e){var f;return null==a?va(this,d,e).year:(f=wa(a,d,e),b>f&&(b=f),Dc.call(this,a,b,c,d,e))}function Dc(a,b,c,d,e){var f=ua(a,b,c,d,e),g=sa(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}
// MOMENTS
function Ec(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}
// HELPERS
// MOMENTS
function Fc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function Gc(a,b){b[ce]=t(1e3*("0."+a))}
// MOMENTS
function Hc(){return this._isUTC?"UTC":""}function Ic(){return this._isUTC?"Coordinated Universal Time":""}function Jc(a){return rb(1e3*a)}function Kc(){return rb.apply(null,arguments).parseZone()}function Lc(a){return a}function Mc(a,b,c,d){var e=ab(),f=j().set(d,b);return e[c](f,a)}function Nc(a,b,c){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return Mc(a,b,c,"month");var d,e=[];for(d=0;12>d;d++)e[d]=Mc(a,d,c,"month");return e}
// ()
// (5)
// (fmt, 5)
// (fmt)
// (true)
// (true, 5)
// (true, fmt, 5)
// (true, fmt)
function Oc(a,b,c,d){"boolean"==typeof a?("number"==typeof b&&(c=b,b=void 0),b=b||""):(b=a,c=b,a=!1,"number"==typeof b&&(c=b,b=void 0),b=b||"");var e=ab(),f=a?e._week.dow:0;if(null!=c)return Mc(b,(c+f)%7,d,"day");var g,h=[];for(g=0;7>g;g++)h[g]=Mc(b,(g+f)%7,d,"day");return h}function Pc(a,b){return Nc(a,b,"months")}function Qc(a,b){return Nc(a,b,"monthsShort")}function Rc(a,b,c){return Oc(a,b,c,"weekdays")}function Sc(a,b,c){return Oc(a,b,c,"weekdaysShort")}function Tc(a,b,c){return Oc(a,b,c,"weekdaysMin")}function Uc(){var a=this._data;return this._milliseconds=Ue(this._milliseconds),this._days=Ue(this._days),this._months=Ue(this._months),a.milliseconds=Ue(a.milliseconds),a.seconds=Ue(a.seconds),a.minutes=Ue(a.minutes),a.hours=Ue(a.hours),a.months=Ue(a.months),a.years=Ue(a.years),this}function Vc(a,b,c,d){var e=Mb(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}
// supports only 2.0-style add(1, 's') or add(duration)
function Wc(a,b){return Vc(this,a,b,1)}
// supports only 2.0-style subtract(1, 's') or subtract(duration)
function Xc(a,b){return Vc(this,a,b,-1)}function Yc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Zc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;
// if we have a mix of positive and negative values, bubble down first
// check: https://github.com/moment/moment/issues/2166
// The following code bubbles up values, see the tests for
// examples of what that means.
// convert days to months
// 12 months -> 1 year
return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Yc(_c(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=s(f/1e3),i.seconds=a%60,b=s(a/60),i.minutes=b%60,c=s(b/60),i.hours=c%24,g+=s(c/24),e=s($c(g)),h+=e,g-=Yc(_c(e)),d=s(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function $c(a){
// 400 years have 146097 days (taking into account leap year rules)
// 400 years have 12 months === 4800
return 4800*a/146097}function _c(a){
// the reverse of daysToMonths
return 146097*a/4800}function ad(a){var b,c,d=this._milliseconds;if(a=J(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+$c(b),"month"===a?c:c/12;switch(b=this._days+Math.round(_c(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;
// Math.floor prevents floating point math errors here
case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}
// TODO: Use this.as('ms')?
function bd(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*t(this._months/12)}function cd(a){return function(){return this.as(a)}}function dd(a){return a=J(a),this[a+"s"]()}function ed(a){return function(){return this._data[a]}}function fd(){return s(this.days()/7)}
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function gd(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function hd(a,b,c){var d=Mb(a).abs(),e=jf(d.as("s")),f=jf(d.as("m")),g=jf(d.as("h")),h=jf(d.as("d")),i=jf(d.as("M")),j=jf(d.as("y")),k=e<kf.s&&["s",e]||1>=f&&["m"]||f<kf.m&&["mm",f]||1>=g&&["h"]||g<kf.h&&["hh",g]||1>=h&&["d"]||h<kf.d&&["dd",h]||1>=i&&["M"]||i<kf.M&&["MM",i]||1>=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,gd.apply(null,k)}
// This function allows you to set the rounding function for relative time strings
function id(a){return void 0===a?jf:"function"==typeof a?(jf=a,!0):!1}
// This function allows you to set a threshold for relative time strings
function jd(a,b){return void 0===kf[a]?!1:void 0===b?kf[a]:(kf[a]=b,!0)}function kd(a){var b=this.localeData(),c=hd(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function ld(){
// for ISO strings we do not use the normal bubbling rules:
//  * milliseconds bubble up until they become hours
//  * days do not bubble at all
//  * months bubble up until they become years
// This is because there is no context-free conversion between hours and days
// (think of clock changes)
// and also not between days and months (28-31 days per month)
var a,b,c,d=lf(this._milliseconds)/1e3,e=lf(this._days),f=lf(this._months);a=s(d/60),b=s(a/60),d%=60,a%=60,c=s(f/12),f%=12;
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var md,nd;nd=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;c>d;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1};
// Plugins that add properties should also add the key here (null value),
// so we can properly clone ourselves.
var od=a.momentProperties=[],pd=!1,qd={};a.suppressDeprecationWarnings=!1,a.deprecationHandler=null;var rd;rd=Object.keys?Object.keys:function(a){var b,c=[];for(b in a)h(a,b)&&c.push(b);return c};var sd,td={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ud={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},vd="Invalid date",wd="%d",xd=/\d{1,2}/,yd={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},zd={},Ad={},Bd=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Cd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Dd={},Ed={},Fd=/\d/,Gd=/\d\d/,Hd=/\d{3}/,Id=/\d{4}/,Jd=/[+-]?\d{6}/,Kd=/\d\d?/,Ld=/\d\d\d\d?/,Md=/\d\d\d\d\d\d?/,Nd=/\d{1,3}/,Od=/\d{1,4}/,Pd=/[+-]?\d{1,6}/,Qd=/\d+/,Rd=/[+-]?\d+/,Sd=/Z|[+-]\d\d:?\d\d/gi,Td=/Z|[+-]\d\d(?::?\d\d)?/gi,Ud=/[+-]?\d+(\.\d{1,3})?/,Vd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Wd={},Xd={},Yd=0,Zd=1,$d=2,_d=3,ae=4,be=5,ce=6,de=7,ee=8;sd=Array.prototype.indexOf?Array.prototype.indexOf:function(a){
// I know
var b;for(b=0;b<this.length;++b)if(this[b]===a)return b;return-1},T("M",["MM",2],"Mo",function(){return this.month()+1}),T("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),T("MMMM",0,0,function(a){return this.localeData().months(this,a)}),I("month","M"),L("month",8),Y("M",Kd),Y("MM",Kd,Gd),Y("MMM",function(a,b){return b.monthsShortRegex(a)}),Y("MMMM",function(a,b){return b.monthsRegex(a)}),aa(["M","MM"],function(a,b){b[Zd]=t(a)-1}),aa(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[Zd]=e:l(c).invalidMonth=a});
// LOCALES
var fe=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,ge="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),he="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ie=Vd,je=Vd;
// FORMATTING
T("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a}),T(0,["YY",2],0,function(){return this.year()%100}),T(0,["YYYY",4],0,"year"),T(0,["YYYYY",5],0,"year"),T(0,["YYYYYY",6,!0],0,"year"),
// ALIASES
I("year","y"),
// PRIORITIES
L("year",1),
// PARSING
Y("Y",Rd),Y("YY",Kd,Gd),Y("YYYY",Od,Id),Y("YYYYY",Pd,Jd),Y("YYYYYY",Pd,Jd),aa(["YYYYY","YYYYYY"],Yd),aa("YYYY",function(b,c){c[Yd]=2===b.length?a.parseTwoDigitYear(b):t(b)}),aa("YY",function(b,c){c[Yd]=a.parseTwoDigitYear(b)}),aa("Y",function(a,b){b[Yd]=parseInt(a,10)}),
// HOOKS
a.parseTwoDigitYear=function(a){return t(a)+(t(a)>68?1900:2e3)};
// MOMENTS
var ke=N("FullYear",!0);
// FORMATTING
T("w",["ww",2],"wo","week"),T("W",["WW",2],"Wo","isoWeek"),
// ALIASES
I("week","w"),I("isoWeek","W"),
// PRIORITIES
L("week",5),L("isoWeek",5),
// PARSING
Y("w",Kd),Y("ww",Kd,Gd),Y("W",Kd),Y("WW",Kd,Gd),ba(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=t(a)});var le={dow:0,// Sunday is the first day of the week.
doy:6};
// FORMATTING
T("d",0,"do","day"),T("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),T("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),T("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),T("e",0,0,"weekday"),T("E",0,0,"isoWeekday"),
// ALIASES
I("day","d"),I("weekday","e"),I("isoWeekday","E"),
// PRIORITY
L("day",11),L("weekday",11),L("isoWeekday",11),
// PARSING
Y("d",Kd),Y("e",Kd),Y("E",Kd),Y("dd",function(a,b){return b.weekdaysMinRegex(a)}),Y("ddd",function(a,b){return b.weekdaysShortRegex(a)}),Y("dddd",function(a,b){return b.weekdaysRegex(a)}),ba(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);
// if we didn't get a weekday name, mark the date as invalid
null!=e?b.d=e:l(c).invalidWeekday=a}),ba(["d","e","E"],function(a,b,c,d){b[d]=t(a)});
// LOCALES
var me="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ne="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),oe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),pe=Vd,qe=Vd,re=Vd;T("H",["HH",2],0,"hour"),T("h",["hh",2],0,Qa),T("k",["kk",2],0,Ra),T("hmm",0,0,function(){return""+Qa.apply(this)+S(this.minutes(),2)}),T("hmmss",0,0,function(){return""+Qa.apply(this)+S(this.minutes(),2)+S(this.seconds(),2)}),T("Hmm",0,0,function(){return""+this.hours()+S(this.minutes(),2)}),T("Hmmss",0,0,function(){return""+this.hours()+S(this.minutes(),2)+S(this.seconds(),2)}),Sa("a",!0),Sa("A",!1),
// ALIASES
I("hour","h"),
// PRIORITY
L("hour",13),Y("a",Ta),Y("A",Ta),Y("H",Kd),Y("h",Kd),Y("HH",Kd,Gd),Y("hh",Kd,Gd),Y("hmm",Ld),Y("hmmss",Md),Y("Hmm",Ld),Y("Hmmss",Md),aa(["H","HH"],_d),aa(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),aa(["h","hh"],function(a,b,c){b[_d]=t(a),l(c).bigHour=!0}),aa("hmm",function(a,b,c){var d=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d)),l(c).bigHour=!0}),aa("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d,2)),b[be]=t(a.substr(e)),l(c).bigHour=!0}),aa("Hmm",function(a,b,c){var d=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d))}),aa("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[_d]=t(a.substr(0,d)),b[ae]=t(a.substr(d,2)),b[be]=t(a.substr(e))});var se,te=/[ap]\.?m?\.?/i,ue=N("Hours",!0),ve={calendar:td,longDateFormat:ud,invalidDate:vd,ordinal:wd,ordinalParse:xd,relativeTime:yd,months:ge,monthsShort:he,week:le,weekdays:me,weekdaysMin:oe,weekdaysShort:ne,meridiemParse:te},we={},xe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ye=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ze=/Z|[+-]\d\d(?::?\d\d)?/,Ae=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],
// YYYYMM is NOT allowed by the standard
["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Be=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ce=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=w("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),
// constant that refers to the ISO standard
a.ISO_8601=function(){};var De=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=rb.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:n()}),Ee=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=rb.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:n()}),Fe=function(){return Date.now?Date.now():+new Date};xb("Z",":"),xb("ZZ",""),
// PARSING
Y("Z",Td),Y("ZZ",Td),aa(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=yb(Td,a)});
// HELPERS
// timezone chunker
// '+10:00' > ['10',  '00']
// '-1530'  > ['-15', '30']
var Ge=/([\+\-]|\d\d)/gi;
// HOOKS
// This function will be called whenever a moment is mutated.
// It is intended to keep the offset in sync with the timezone.
a.updateOffset=function(){};
// ASP.NET json date format regex
var He=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,Ie=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Mb.fn=vb.prototype;var Je=Rb(1,"add"),Ke=Rb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Le=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});
// FORMATTING
T(0,["gg",2],0,function(){return this.weekYear()%100}),T(0,["GG",2],0,function(){return this.isoWeekYear()%100}),xc("gggg","weekYear"),xc("ggggg","weekYear"),xc("GGGG","isoWeekYear"),xc("GGGGG","isoWeekYear"),
// ALIASES
I("weekYear","gg"),I("isoWeekYear","GG"),
// PRIORITY
L("weekYear",1),L("isoWeekYear",1),
// PARSING
Y("G",Rd),Y("g",Rd),Y("GG",Kd,Gd),Y("gg",Kd,Gd),Y("GGGG",Od,Id),Y("gggg",Od,Id),Y("GGGGG",Pd,Jd),Y("ggggg",Pd,Jd),ba(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=t(a)}),ba(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),
// FORMATTING
T("Q",0,"Qo","quarter"),
// ALIASES
I("quarter","Q"),
// PRIORITY
L("quarter",7),
// PARSING
Y("Q",Fd),aa("Q",function(a,b){b[Zd]=3*(t(a)-1)}),
// FORMATTING
T("D",["DD",2],"Do","date"),
// ALIASES
I("date","D"),
// PRIOROITY
L("date",9),
// PARSING
Y("D",Kd),Y("DD",Kd,Gd),Y("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),aa(["D","DD"],$d),aa("Do",function(a,b){b[$d]=t(a.match(Kd)[0],10)});
// MOMENTS
var Me=N("Date",!0);
// FORMATTING
T("DDD",["DDDD",3],"DDDo","dayOfYear"),
// ALIASES
I("dayOfYear","DDD"),
// PRIORITY
L("dayOfYear",4),
// PARSING
Y("DDD",Nd),Y("DDDD",Hd),aa(["DDD","DDDD"],function(a,b,c){c._dayOfYear=t(a)}),
// FORMATTING
T("m",["mm",2],0,"minute"),
// ALIASES
I("minute","m"),
// PRIORITY
L("minute",14),
// PARSING
Y("m",Kd),Y("mm",Kd,Gd),aa(["m","mm"],ae);
// MOMENTS
var Ne=N("Minutes",!1);
// FORMATTING
T("s",["ss",2],0,"second"),
// ALIASES
I("second","s"),
// PRIORITY
L("second",15),
// PARSING
Y("s",Kd),Y("ss",Kd,Gd),aa(["s","ss"],be);
// MOMENTS
var Oe=N("Seconds",!1);
// FORMATTING
T("S",0,0,function(){return~~(this.millisecond()/100)}),T(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),T(0,["SSS",3],0,"millisecond"),T(0,["SSSS",4],0,function(){return 10*this.millisecond()}),T(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),T(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),T(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),T(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),T(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),
// ALIASES
I("millisecond","ms"),
// PRIORITY
L("millisecond",16),
// PARSING
Y("S",Nd,Fd),Y("SS",Nd,Gd),Y("SSS",Nd,Hd);var Pe;for(Pe="SSSS";Pe.length<=9;Pe+="S")Y(Pe,Qd);for(Pe="S";Pe.length<=9;Pe+="S")aa(Pe,Gc);
// MOMENTS
var Qe=N("Milliseconds",!1);
// FORMATTING
T("z",0,0,"zoneAbbr"),T("zz",0,0,"zoneName");var Re=q.prototype;Re.add=Je,Re.calendar=Ub,Re.clone=Vb,Re.diff=ac,Re.endOf=mc,Re.format=ec,Re.from=fc,Re.fromNow=gc,Re.to=hc,Re.toNow=ic,Re.get=Q,Re.invalidAt=vc,Re.isAfter=Wb,Re.isBefore=Xb,Re.isBetween=Yb,Re.isSame=Zb,Re.isSameOrAfter=$b,Re.isSameOrBefore=_b,Re.isValid=tc,Re.lang=Le,Re.locale=jc,Re.localeData=kc,Re.max=Ee,Re.min=De,Re.parsingFlags=uc,Re.set=R,Re.startOf=lc,Re.subtract=Ke,Re.toArray=qc,Re.toObject=rc,Re.toDate=pc,Re.toISOString=dc,Re.toJSON=sc,Re.toString=cc,Re.unix=oc,Re.valueOf=nc,Re.creationData=wc,
// Year
Re.year=ke,Re.isLeapYear=qa,
// Week Year
Re.weekYear=yc,Re.isoWeekYear=zc,
// Quarter
Re.quarter=Re.quarters=Ec,
// Month
Re.month=ja,Re.daysInMonth=ka,
// Week
Re.week=Re.weeks=Aa,Re.isoWeek=Re.isoWeeks=Ba,Re.weeksInYear=Bc,Re.isoWeeksInYear=Ac,
// Day
Re.date=Me,Re.day=Re.days=Ja,Re.weekday=Ka,Re.isoWeekday=La,Re.dayOfYear=Fc,
// Hour
Re.hour=Re.hours=ue,
// Minute
Re.minute=Re.minutes=Ne,
// Second
Re.second=Re.seconds=Oe,
// Millisecond
Re.millisecond=Re.milliseconds=Qe,
// Offset
Re.utcOffset=Bb,Re.utc=Db,Re.local=Eb,Re.parseZone=Fb,Re.hasAlignedHourOffset=Gb,Re.isDST=Hb,Re.isLocal=Jb,Re.isUtcOffset=Kb,Re.isUtc=Lb,Re.isUTC=Lb,
// Timezone
Re.zoneAbbr=Hc,Re.zoneName=Ic,
// Deprecations
Re.dates=w("dates accessor is deprecated. Use date instead.",Me),Re.months=w("months accessor is deprecated. Use month instead",ja),Re.years=w("years accessor is deprecated. Use year instead",ke),Re.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Cb),Re.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ib);var Se=Re,Te=B.prototype;Te.calendar=C,Te.longDateFormat=D,Te.invalidDate=E,Te.ordinal=F,Te.preparse=Lc,Te.postformat=Lc,Te.relativeTime=G,Te.pastFuture=H,Te.set=z,
// Month
Te.months=ea,Te.monthsShort=fa,Te.monthsParse=ha,Te.monthsRegex=ma,Te.monthsShortRegex=la,
// Week
Te.week=xa,Te.firstDayOfYear=za,Te.firstDayOfWeek=ya,
// Day of Week
Te.weekdays=Ea,Te.weekdaysMin=Ga,Te.weekdaysShort=Fa,Te.weekdaysParse=Ia,Te.weekdaysRegex=Ma,Te.weekdaysShortRegex=Na,Te.weekdaysMinRegex=Oa,
// Hours
Te.isPM=Ua,Te.meridiem=Va,Za("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===t(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),
// Side effect imports
a.lang=w("moment.lang is deprecated. Use moment.locale instead.",Za),a.langData=w("moment.langData is deprecated. Use moment.localeData instead.",ab);var Ue=Math.abs,Ve=cd("ms"),We=cd("s"),Xe=cd("m"),Ye=cd("h"),Ze=cd("d"),$e=cd("w"),_e=cd("M"),af=cd("y"),bf=ed("milliseconds"),cf=ed("seconds"),df=ed("minutes"),ef=ed("hours"),ff=ed("days"),gf=ed("months"),hf=ed("years"),jf=Math.round,kf={s:45,// seconds to minute
m:45,// minutes to hour
h:22,// hours to day
d:26,// days to month
M:11},lf=Math.abs,mf=vb.prototype;mf.abs=Uc,mf.add=Wc,mf.subtract=Xc,mf.as=ad,mf.asMilliseconds=Ve,mf.asSeconds=We,mf.asMinutes=Xe,mf.asHours=Ye,mf.asDays=Ze,mf.asWeeks=$e,mf.asMonths=_e,mf.asYears=af,mf.valueOf=bd,mf._bubble=Zc,mf.get=dd,mf.milliseconds=bf,mf.seconds=cf,mf.minutes=df,mf.hours=ef,mf.days=ff,mf.weeks=fd,mf.months=gf,mf.years=hf,mf.humanize=kd,mf.toISOString=ld,mf.toString=ld,mf.toJSON=ld,mf.locale=jc,mf.localeData=kc,
// Deprecations
mf.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ld),mf.lang=Le,
// Side effect imports
// FORMATTING
T("X",0,0,"unix"),T("x",0,0,"valueOf"),
// PARSING
Y("x",Rd),Y("X",Ud),aa("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),aa("x",function(a,b,c){c._d=new Date(t(a))}),
// Side effect imports
a.version="2.14.1",b(rb),a.fn=Se,a.min=tb,a.max=ub,a.now=Fe,a.utc=j,a.unix=Jc,a.months=Pc,a.isDate=f,a.locale=Za,a.invalid=n,a.duration=Mb,a.isMoment=r,a.weekdays=Rc,a.parseZone=Kc,a.localeData=ab,a.isDuration=wb,a.monthsShort=Qc,a.weekdaysMin=Tc,a.defineLocale=$a,a.updateLocale=_a,a.locales=bb,a.weekdaysShort=Sc,a.normalizeUnits=J,a.relativeTimeRounding=id,a.relativeTimeThreshold=jd,a.calendarFormat=Tb,a.prototype=Se;var nf=a;return nf});


name: .gitignore
content: -* bower_components node_modules package-lock.json .DS_Store
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\.gitignore


name: bower.json
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\bower.json

content:
{
  "name": "draganddrop",
  "version": "0.0.11",
  "authors": [
    "Ole Trenner <ole@jayotee.de>"
  ],
  "description": "Drag and Drop: Dragaware, Draggable, Nested Sortable.",
  "keywords": [
    "jquery",
    "draggable",
    "sortable",
    "nested"
  ],
  "license": "MIT",
  "private": true,
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "jquery": "*"
  }
}


name: Download.url
content: [InternetShortcut] URL=https://www.jqueryscript.net/download/Mobile-Drag-Drop-Plugin-jQuery.zip
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\Download.url


name: jQuery draganddrop.js Examples.url
content: [InternetShortcut] URL=https://www.jqueryscript.net/demo/Mobile-Drag-Drop-Plugin-jQuery/
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\jQuery draganddrop.js Examples.url


name: Mobile Drag Drop jQuery Plugins - jQuery Script.url
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\Mobile Drag Drop jQuery Plugins - jQuery Script.url

content:
[InternetShortcut]
URL=https://www.jqueryscript.net/plus/search.php?kwtype=0&keyword=Mobile+Drag+Drop


name: Mobile-friendly Drag And Drop Plugin With jQuery - draganddrop.js - Free jQuery Plugins.url
content: [InternetShortcut] URL=https://www.jqueryscript.net/other/Mobile-Drag-Drop-Plugin-jQuery.html
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\Mobile-friendly Drag And Drop Plugin With jQuery - draganddrop.js - Free jQuery Plugins.url


name: package.json
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\package.json

content:
{
  "name": "draganddrop",
  "version": "0.0.11",
  "description": "Drag and Drop: Dragaware, Draggable, Nested Sortable.",
  "keywords": [
    "drag and drop"
  ],
  "main": "src/draganddrop.js",
  "scripts": {},
  "repository": {
    "type": "git",
    "url": "git+https://github.com/gardiner/draganddrop.git"
  },
  "author": "Ole Trenner <ole.trenner@3dbits.de>",
  "bugs": {
    "url": "https://github.com/gardiner/draganddrop/issues"
  },
  "dependencies": {
    "jquery": "*"
  },
  "homepage": "https://github.com/gardiner/draganddrop#readme"
}


name: README.md
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\README.md

content:
Drag and Drop
=============

Basic jQuery plugin to allow drag and drop:

* dragging
* dropping of dragged elements
* sorting of lists and other nested html structures (```ul```, ```ol```, ```div``` etc.)



Requirements
------------

- jQuery



Usage
-----

See [demo.html](demo/demo.html) for a working demo.

1. Install draganddrop:

    ```bash
    $ bower install -S gardiner/draganddrop
    ```

2. Include jQuery and draganddrop in document head:

    ```html
    <link href='bower_components/draganddrop/src/draganddrop.css' rel='stylesheet' type='text/css'/>
    <script src='bower_components/jquery/dist/jquery.min.js' type='text/javascript'></script>
    <script src='bower_components/draganddrop/src/draganddrop.js' type='text/javascript'></script>
    ```

3. Create html structure:

    ```html
    <ul id="list">
        <li>Item 1</li>
        <li>Item 2
            <ul>
                <li>Subitem 1</li>
                <li>Subitem 2
                    <ul>
                        <li>Sub-Subitem 1</li>
                    </ul>
                </li>
            </ul>
        </li>
        <li>Item 3</li>
    </ul>

    <button id="drag">Drag me</button>
    ```

4. Initialize draggable and sortable:

    ```javascript
    $('#drag').draggable(/* options/callbacks or command */);
    $('#list').sortable(/* options/callbacks or command */);
    ```


Draggable
---------

Options and callbacks:

* ```handle``` (string) - selector of handle element (if null the complete element will be used as handle)
* ```delegate``` (string) - selector of delegate element (allows delegate-binding, delegate will be referenced as this in the event callbacks)
* ```revert``` (boolean) - if true the element reverts to its origin after dropping
* ```placeholder``` (boolean) - if true a transparent clone of the element is left at the origin while dragging
* ```droptarget``` (string) - selector for valid drop targets
* ```scroll``` (boolean) - if true the scrolling parent will be automatically scrolled while dragging
* ```update``` (function) - callback after dragging. Arguments: event, Draggable instance. This: draggable element.
* ```drop``` (function) - callback after dropping on valid droptarget. Arguments: event, droptarget element. This: draggable.element

Commands:

```javascript
$('#drag').draggable('destroy');
```

* ```destroy``` - deactivates the Draggable instance and unbinds all listeners


Limitations/Issues:

When ```placeholder``` or ```revert``` is set to true, click events on the draggable element would be swallowed by the generated clone. For most browsers (except Internet Explorer) this has been fixed by setting the clone to ```pointer-events: none;```.


Sortable
--------

Options and callbacks:

* ```handle``` (string) - selector of handle element (if null the complete element will be used as handle)
* ```container``` (string) - selector for container elements
* ```nodes``` (string) - selector for node elements
* ```autocreate``` (boolean) - automatically create nested containers within nodes
* ```group``` (boolean) - if true all elements in the jQuery object are grouped (items can dragged between them)
* ```scroll``` (boolean) - if true the scrolling parent will be automatically scrolled while dragging
* ```update``` (function) - callback after sorting. Arguments: event, Sortable instance. This: sortable element.

Commands:

```javascript
$('#list').sortable('serialize');
$('#list').sortable('destroy');
```

* ```serialize``` - returns an object representing the structure of the nested list
* ```destroy``` - deactivates the Sortable instance and unbinds all listeners


name: demo.css
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\src\demo.css

content:
h3 {
    margin: 30px 0 20px 0;
    clear: both;
}

ul.normal {
    width: 500px;
}

ul.normal li {
    padding: 5px;
}

ul.float {
    list-style-position: inside;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

ul.float li {
    float: left;
    margin: 10px;
}

ul.inline {
    list-style-position: inside;
    padding: 0;
    margin: 0;
}

ul.inline li {
    display: inline-block;
    vertical-align: top;
    margin: 10px;
}

.list div {
    margin: 2px 0;
    padding: 2px;
}

.drop {
    margin: 20px 0;
    padding: 5px;
    border: 2px dotted orange;
    border-radius: 5px;
}

.drop.hovering {
    background-color: #F6BF66;
}


name: draganddrop.css
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\src\draganddrop.css

content:
.unselectable {
    -moz-user-select: -moz-none,
    -moz-user-select: none,
    -o-user-select: none,
    -khtml-user-select: none,
    -webkit-user-select: none,
    -ms-user-select: none,
    user-select: none
}

.dragaware {
    cursor: pointer;
}

.draggable_clone {
    position: absolute; /* also set via javascript */
    z-index: 100001;
    pointer-events:none; /* disable mouse events on the clone */
}

.draggable.dragging, .draggable .dragging {
    opacity: 0.5;
}

.sortable .sortable_clone {
    position: absolute; /* also set via javascript */
    z-index: 100001;
    list-style-type: none;
    opacity: 0.5;
}

.sortable .sortable_placeholder {
    box-sizing: border-box;
    list-style-type: none;
    background: #eee;
    border: 2px dotted #52b218;
}


name: draganddrop.js
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\src\draganddrop.js

content:
function factory($) {
"use strict";


function Sortable(el, options) {
    var self = this,
        $sortable = $(el),
        container_type = $sortable[0].nodeName,
        node_type = (container_type == 'OL' || container_type == 'UL') ? 'LI' : 'DIV',
        defaults = {
            //options
            handle: false,
            container: container_type,
            container_type: container_type,
            same_depth: false,
            make_unselectable: false,
            nodes: node_type,
            nodes_type: node_type,
            placeholder_class: null,
            auto_container_class: 'sortable_container',
            autocreate: false,
            group: false,
            scroll: false,
            //callbacks
            update: null
        };

    self.$sortable = $sortable.data('sortable', self);
    self.options = $.extend({}, defaults, options);

    self.init();
}

Sortable.prototype.invoke = function(command) {
    var self = this;
    if (command === 'destroy') {
        return self.destroy();
    } else if (command === 'serialize') {
        return self.serialize(self.$sortable);
    }
};

Sortable.prototype.init = function() {
    var self = this,
        $clone,
        $placeholder,
        origin;

    if (self.options.make_unselectable) {
        $('html').unselectable();
    }

    self.$sortable
    .addClass('sortable')
    .on('destroy.sortable', function() {
        self.destroy();
    });

    function find_insert_point($node, offset) {
        var containers,
            best,
            depth;

        if (!offset) {
            return;
        }

        containers = self.$sortable
        .add(self.$sortable.find(self.options.container))
        .not($node.find(self.options.container))
        .not($clone.find(self.options.container))
        .not(self.find_nodes());

        if (self.options.same_depth) {
            depth = $node.parent().nestingDepth('ul');
            containers = containers.filter(function() {
                return $(this).nestingDepth('ul') == depth;
            });
        }

        $placeholder.hide();
        containers.each(function(ix, container) {
            var $trailing = $(self.create_placeholder()).appendTo(container),
                $children = $(container).children(self.options.nodes).not('.sortable_clone'),
                $candidate,
                n,
                dist;

            for (n = 0; n < $children.length; n++) {
                $candidate = $children.eq(n);
                dist = self.square_dist($candidate.offset(), offset);
                if (!best || best.dist > dist) {
                    best = {container: container, before: $candidate[0], dist: dist};
                }
            }

            $trailing.remove();
        });
        $placeholder.show();

        return best;
    }

    function insert($element, best) {
        var $container = $(best.container);
        if (best.before && best.before.closest('html')) {
            $element.insertBefore(best.before);
        } else {
            $element.appendTo($container);
        }
    };

    self.$sortable.dragaware($.extend({}, self.options, {
        delegate: self.options.nodes,
        /**
         * drag start - create clone and placeholder, keep drag start origin.
         */
        dragstart: function(evt) {
            var $node = $(this);

            $clone = $node.clone()
                          .removeAttr('id')
                          .addClass('sortable_clone')
                          .css({position: 'absolute'})
                          .insertAfter($node)
                          .offset($node.offset());
            $placeholder = self.create_placeholder()
                               .css({height: $node.outerHeight(), width: $node.outerWidth()})
                               .insertAfter($node);
            $node.hide();

            origin = new PositionHelper($clone.offset());

            if (self.options.autocreate) {
                self.find_nodes().filter(function(ix, el) {
                    return $(el).find(self.options.container).length == 0;
                }).append('<' + self.options.container_type + ' class="' + self.options.auto_container_class + '"/>');
            }
        },

        /**
         * drag - reposition clone, check for best insert position, move placeholder in dom accordingly.
         */
        drag: function(evt, pos) {
            var $node = $(this),
                offset = origin.absolutize(pos),
                best = find_insert_point($node, offset);

            $clone.offset(offset);
            insert($placeholder, best);
        },

        /**
         * drag stop - clean up.
         */
        dragstop: function(evt, pos) {
            var $node = $(this),
                offset = origin.absolutize(pos),
                best = find_insert_point($node, offset);

            if (best) {
                insert($node, best);
            }
            $node.show();

            if ($clone) {
                $clone.remove();
            }
            if ($placeholder) {
                $placeholder.remove();
            }
            $clone = null;
            $placeholder = null;

            if (best && self.options.update) {
                self.options.update.call(self.$sortable, evt, self);
            }
            self.$sortable.trigger('update');
        }
    }));
};

Sortable.prototype.destroy = function() {
    var self = this;

    if (self.options.make_unselectable) {
        $('html').unselectable('destroy');
    }

    self.$sortable
    .removeClass('sortable')
    .off('.sortable')
    .dragaware('destroy');
};

Sortable.prototype.serialize = function(container) {
    var self = this;
    return container.children(self.options.nodes).not(self.options.container).map(function(ix, el) {
        var $el = $(el),
            text = $el.clone().children().remove().end().text().trim(), //text only without children
            id = $el.attr('id'),
            node = {id: id ||Â text};
        if ($el.find(self.options.nodes).length) {
            node.children = self.serialize($el.children(self.options.container));
        }
        return node;
    }).get();
};

Sortable.prototype.find_nodes = function() {
    var self = this;
    return self.$sortable.find(self.options.nodes).not(self.options.container);
};

Sortable.prototype.create_placeholder = function() {
    var self = this;
    return $('<' + self.options.nodes_type + '/>')
    .addClass('sortable_placeholder')
    .addClass(self.options.placeholder_class);
};

Sortable.prototype.square_dist = function(pos1, pos2) {
    return Math.pow(pos2.left - pos1.left, 2) + Math.pow(pos2.top - pos1.top, 2);
};




function Draggable(el, options) {
    var self = this,
        defaults = {
            //options
            handle: false,
            delegate: false,
            revert: false,
            placeholder: false,
            droptarget: false,
            container: false,
            scroll: false,
            //callbacks
            update: null,
            drop: null
        };

    self.$draggable = $(el).data('draggable', self);
    self.options = $.extend({}, defaults, options);

    self.init();
}

Draggable.prototype.init = function() {
    var self = this,
        $clone,
        origin;

    self.$draggable
    .addClass('draggable')
    .on('destroy.draggable', function() {
        self.destroy();
    });

    function check_droptarget(pos) {
        var $over;

        $('.hovering').removeClass('hovering');

        $clone.hide();
        $over = $(document.elementFromPoint(pos.clientX, pos.clientY)).closest(self.options.droptarget);
        $clone.show();

        if ($over.length) {
            $over.addClass('hovering');
            return $over;
        }
    }

    self.$draggable.dragaware($.extend({}, self.options, {
        /**
         * drag start - create clone, keep drag start origin.
         */
        dragstart: function(evt) {
            var $this = $(this);
            if (self.options.placeholder || self.options.revert) {
                $clone = $this.clone()
                              .removeAttr('id')
                              .addClass('draggable_clone')
                              .css({position: 'absolute'})
                              .appendTo(self.options.container || $this.parent())
                              .offset($this.offset());
                if (!self.options.placeholder) {
                    $(this).invisible();
                }
            } else {
                $clone = $this;
            }

            origin = new PositionHelper($clone.offset());
        },

        /**
         * drag - reposition clone.
         */
        drag: function(evt, pos) {
            var $droptarget = check_droptarget(pos);
            $clone.offset(origin.absolutize(pos));
        },

        /**
         * drag stop - clean up.
         */
        dragstop: function(evt, pos) {
            var $this = $(this),
                $droptarget = check_droptarget(pos);

            if (self.options.revert || self.options.placeholder) {
                $this.visible();
                if (!self.options.revert) {
                    $this.offset(origin.absolutize(pos));
                }
                $clone.remove();
            }

            $clone = null;

            if (self.options.update) {
                self.options.update.call($this, evt, self);
            }

            $this.trigger('update');

            if ($droptarget) {
                if (self.options.drop) {
                    self.options.drop.call($this, evt, $droptarget[0]);
                }
                $droptarget.trigger('drop', [$this]);
                $droptarget.removeClass('hovering');
            }
            else {
                if (self.options.onrevert) {
                   self.options.onrevert.call($this, evt);
                }
            }
        }
    }));
};

Draggable.prototype.destroy = function() {
    var self = this;

    self.$draggable
    .dragaware('destroy')
    .removeClass('draggable')
    .off('.draggable');
};




function Droppable(el, options) {
    var self = this,
        defaults = {
            //options
            accept: false,
            //callbacks
            drop: null
        };

    self.$droppable = $(el).data('droppable', self);
    self.options = $.extend({}, defaults, options);

    self.init();
}

Droppable.prototype.init = function() {
    var self = this;

    self.$droppable
    .addClass('droppable')
    .on('drop', function(evt, $draggable) {
        if (self.options.accept && !$draggable.is(self.options.accept)) {
            return;
        }
        if (self.options.drop) {
            self.options.drop.call(self.$droppable, evt, $draggable);
        }
    })
    .on('destroy.droppable', function() {
        self.destroy();
    });
};

Droppable.prototype.destroy = function() {
    var self = this;

    self.$droppable
    .removeClass('droppable')
    .off('.droppable');
};




function Dragaware(el, options) {
    var $dragaware = $(el),
        $reference = null,
        origin = null,
        lastpos = null,
        defaults = {
            //options
            handle: null,
            delegate: null,
            scroll: false,
            scrollspeed: 15,
            scrolltimeout: 50,
            //callbacks
            dragstart: null,
            drag: null,
            dragstop: null
        },
        scrolltimeout;

    options = $.extend({}, defaults, options);

    /**
     * Returns the event position
     * dX, dY relative to drag start
     * pageX, pageY relative to document
     * clientX, clientY relative to browser window
     */
    function evtpos(evt) {
        evt = window.hasOwnProperty('event') ? window.event : evt;
        //extract touch event if present
        if (evt.type.substr(0, 5) === 'touch') {
            evt = evt.hasOwnProperty('originalEvent') ? evt.originalEvent : evt;
            evt = evt.touches[0];
        }

        return {
            pageX: evt.pageX,
            pageY: evt.pageY,
            clientX: evt.clientX,
            clientY: evt.clientY,
            dX: origin ? evt.pageX - origin.pageX : 0,
            dY: origin ? evt.pageY - origin.pageY : 0
        };
    }

    function autoscroll(pos) {
        //TODO: allow window scrolling
        //TODO: handle nested scroll containers
        var sp = $dragaware.scrollParent(),
            mouse = {x: pos.pageX, y: pos.pageY},
            offset = sp.offset(),
            scrollLeft = sp.scrollLeft(),
            scrollTop = sp.scrollTop(),
            width = sp.width(),
            height = sp.height();

        window.clearTimeout(scrolltimeout);

        if (scrollLeft > 0 && mouse.x < offset.left) {
            sp.scrollLeft(scrollLeft - options.scrollspeed);
        } else if (scrollLeft < sp.prop('scrollWidth') - width && mouse.x > offset.left + width) {
            sp.scrollLeft(scrollLeft + options.scrollspeed);
        } else if (scrollTop > 0 && mouse.y < offset.top) {
            sp.scrollTop(scrollTop - options.scrollspeed);
        } else if (scrollTop < sp.prop('scrollHeight') - height && mouse.y > offset.top + height) {
            sp.scrollTop(scrollTop + options.scrollspeed);
        } else {
            return; //so we don't set the next timeout
        }

        scrolltimeout = window.setTimeout(function() { autoscroll(pos); }, options.scrolltimeout);
    }

    function start(evt) {
        var $target = $(evt.target);

        $reference = options.delegate ? $target.closest(options.delegate) : $dragaware;

        if ($target.closest(options.handle || '*').length && (evt.type == 'touchstart' || evt.button == 0)) {
            origin = lastpos = evtpos(evt);
            if (options.dragstart) {
                options.dragstart.call($reference, evt, lastpos);
            }

            $reference.addClass('dragging');
            $reference.trigger('dragstart');

            //late binding of event listeners
            $(document)
            .on('touchend.dragaware mouseup.dragaware click.dragaware', end)
            .on('touchmove.dragaware mousemove.dragaware', move);
            return false
        }
    }

    function move(evt) {
        lastpos = evtpos(evt);

        if (options.scroll) {
            autoscroll(lastpos);
        }

        $reference.trigger('dragging');

        if (options.drag) {
            options.drag.call($reference, evt, lastpos);
            return false;
        }
    }

    function end(evt) {
        window.clearTimeout(scrolltimeout);

        if (options.dragstop) {
            options.dragstop.call($reference, evt, lastpos);
        }

        $reference.removeClass('dragging');
        $reference.trigger('dragstop');

        origin = false;
        lastpos = false;
        $reference = false;

        //unbinding of event listeners
        $(document)
        .off('.dragaware');

        return false;
    }

    $dragaware
    .addClass('dragaware')
    .on('touchstart.dragaware mousedown.dragaware', options.delegate, start);

    $dragaware.on('destroy.dragaware', function() {
        $dragaware
        .removeClass('dragaware')
        .off('.dragaware');
    });
}




function PositionHelper(origin) {
    this.origin = origin;
}
PositionHelper.prototype.absolutize = function(pos) {
    if (!pos) {
        return this.origin;
    }
    return {top: this.origin.top + pos.dY, left: this.origin.left + pos.dX};
};




// Plugin registration.


/**
 * Sortable plugin.
 */
$.fn.sortable = function(options) {
    var filtered = this.not(function() {
            return $(this).is('.sortable') || $(this).closest('.sortable').length;
        });

    if (this.data('sortable') && typeof options === 'string') {
        return this.data('sortable').invoke(options);
    }

    if (filtered.length && options && options.group) {
        new Sortable(filtered, options);
    } else {
        filtered.each(function(ix, el) {
            new Sortable(el, options);
        });
    }
    return this;
};


/**
 * Draggable plugin.
 */
$.fn.draggable = function(options) {
    if (options === 'destroy') {
        this.trigger('destroy.draggable');
    } else {
        this.not('.draggable').each(function(ix, el) {
            new Draggable(el, options);
        });
    }
    return this;
};


/**
 * Droppable plugin.
 */
$.fn.droppable = function(options) {
    if (options === 'destroy') {
        this.trigger('destroy.droppable');
    } else {
        this.not('.droppable').each(function(ix, el) {
            new Droppable(el, options);
        });
    }
    return this;
};


/**
 * Dragaware plugin.
 */
$.fn.dragaware = function(options) {
    if (options === 'destroy') {
        this.trigger('destroy.dragaware');
    } else {
        this.not('.dragaware').each(function(ix, el) {
            new Dragaware(el, options);
        });
    }
    return this;
};


/**
 * Disables mouse selection.
 */
$.fn.unselectable = function(command) {
    function disable() {
        return false;
    }

    if (command == 'destroy') {
        return this
        .removeClass('unselectable')
        .removeAttr('unselectable')
        .off('selectstart.unselectable');
    } else {
        return this
        .addClass('unselectable')
        .attr('unselectable','on')
        .on('selectstart.unselectable', disable);
    }
};


$.fn.invisible = function() {
    return this.css({visibility: 'hidden'});
};


$.fn.visible = function() {
    return this.css({visibility: 'visible'});
};


$.fn.scrollParent = function() {
    return this.parents().addBack().filter(function() {
        var p = $(this);
        return (/(scroll|auto)/).test(p.css("overflow-x") + p.css("overflow-y") + p.css("overflow"));
    });
};

$.fn.nestingDepth = function(selector) {
    var parent = this.parent().closest(selector ||Â '*');
    if (parent.length) {
        return parent.nestingDepth(selector) + 1;
    } else {
        return 0;
    }
};

return {
    Sortable,
    Draggable,
    Droppable,
    Dragaware,
    PositionHelper,
};


}


if (typeof define !== 'undefined') {
    define(['jquery'], factory);
} else {
    factory(jQuery, factory);
}


name: index.htm
mime: unavailable
path:
D:\websites\domains\a.sds.sh\public_html\a\js\plugins\drag\jqueryscript\Mobile-Drag-Drop-Plugin-jQuery\src\index.htm

content:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
    <link href='demo.css' rel='stylesheet' type='text/css'>
    <link href="http://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css">
    <link href='draganddrop.css' rel='stylesheet' type='text/css'>
    <link href="https://bootswatch.com/flatly/bootstrap.min.css" rel="stylesheet" type="text/css">
    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script src='draganddrop.js' type='text/javascript'></script>
    <style>
    body { background-color:#fafafa;}
    .container { margin:150px auto;}
    </style>
    <script type='text/javascript'>
      $(function() {
        //grouped lists
        $('ul.grouped').sortable({
          group: true
        });

        //normal list
        $('ul.normal').sortable({
          autocreate: true,
          update: function(evt) {
            console.log(JSON.stringify($(this).sortable('serialize')));
          }
        });

        //remaining lists
        $('ul.float, ul.inline').sortable({
          update: function(evt) {
            console.log(JSON.stringify($(this).sortable('serialize')));
          }
        });

        //div list
        $('.list.parent').sortable({container: '.list', nodes: ':not(.list)'});

        //draggable
        $('.drag').draggable();
        $('.draggables').draggable({delegate: 'button', placeholder: true});
        $('.draghandle').draggable({handle: '.handle', placeholder: true});
        $('.dragdrop').draggable({
          revert: true,
          placeholder: true,
          droptarget: '.drop',
          drop: function(evt, droptarget) {
            $(this).appendTo(droptarget).draggable('destroy');
          }
        });

        //off switch
        $('.off').on('click', function() {
          $('.sortable').each(function() { $(this).sortable('destroy'); });
          $('.draggable').each(function() { $(this).draggable('destroy'); });
        });
      });
    </script>
    <title>jQuery draganddrop.js Examples</title>
  </head>
  <body>
  <div id="jquery-script-menu">
<div class="jquery-script-center">
<ul>
<li><a href="http://www.jqueryscript.net/form/Mobile-Drag-Drop-Plugin-jQuery/">Download This Plugin</a></li>
<li><a href="http://www.jqueryscript.net/">Back To jQueryScript.Net</a></li>
</ul>
<div class="jquery-script-ads"><script type="text/javascript"><!--
google_ad_client = "ca-pub-2783044520727903";
/* jQuery_demo */
google_ad_slot = "2780937993";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<div class="jquery-script-clear"></div>
</div>
</div>
  <div class="container">
    <h1>jQuery draganddrop.js Examples</h1>

    <h3>Draggables</h3>
    <button class="btn btn-primary drag">Drag me</button>
    <button class="btn btn-primary draghandle">Drag my <strong class="handle">handle</strong></button>
    <button class="btn btn-primary dragdrop">Drag and Drop me</button>
    <span class="draggables">
      <button>1</button>
      <button>2</button>
      <button>3</button>
      <button>4</button>
    </span>

    <div class="drop"><p>Drop here</p></div>

    <h3>Normal List</h3>
    <ul class="normal">
      <li>Item 1</li>
      <li>Item 2
        <ul>
          <li>Item 2.1</li>
          <li>Item 2.2
            <ul>
              <li>Item 2.2.1</li>
            </ul>
          </li>
        </ul>
      </li>
      <li>Item 3
        <ul>
          <li>Item 3.1</li>
        </ul>
      </li>
    </ul>

    <h3>Floating LI elements</h3>
    <ul class="float">
      <li>
        Item 1
      </li>
      <li>
        Item 2
      </li>
      <li>
        Item 3
      </li>
      <li>
        Item 4
      </li>
    </ul>

    <h3>Inline-block LI elements</h3>
    <ul class="inline">
      <li>
        Item 1
      </li>
      <li>
        Item 2
      </li>
      <li>
        Item 3
      </li>
      <li>
        Item 4
      </li>
    </ul>

    <h3>Grouped Lists</h3>
    <ul class="grouped">
      <li>
        Item 1
      </li>
      <li>
        Item 2
      </li>
    </ul>
    <ul class="grouped">
      <li>
        Item 1
      </li>
      <li>
        Item 2
      </li>
    </ul>

    <h3>List of DIVs</h3>
    <div class="list parent">
      <div>Child 1</div>
      <div>Child 2</div>
      <div>
        Child 3
        <div class="list">
          <div>Subchild</div>
        </div>
      </div>
    </div>

    <h3>Off Switch</h3>
    <button class="btn btn-primary off">All off</button>
</div>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-36251023-1']);
  _gaq.push(['_setDomainName', 'jqueryscript.net']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</body>
</html>


name: selectRangeHTML.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\plugins\selectRangeHTML.js
mime: unavailable
content:
$.fn.selectRangeHTML = function(start, end) {
    if (end === undefined) {
        end = start;
    }
    return this.each(function() {
        if (window.getSelection && document.createRange) {
            var charIndex = 0;
            var range = document.createRange();
            range.setStart(this, 0);
            range.collapse(true);

            var nodeStack = [this], node, foundStart = false, stop = false;

            while (!stop && (node = nodeStack.pop())) {
                if (node.nodeType === 3) { // Text node
                    var nextCharIndex = charIndex + node.length;
                    if (!foundStart && start >= charIndex && start <= nextCharIndex) {
                        range.setStart(node, start - charIndex);
                        foundStart = true;
                    }
                    if (foundStart && end >= charIndex && end <= nextCharIndex) {
                        range.setEnd(node, end - charIndex);
                        stop = true;
                    }
                    charIndex = nextCharIndex;
                } else {
                    for (var i = node.childNodes.length - 1; i >= 0; i--) {
                        nodeStack.push(node.childNodes[i]);
                    }
                }
            }

            var sel = window.getSelection();
            sel.removeAllRanges();
            sel.addRange(range);
        } else if (document.body.createTextRange) { // IE
            var textRange = document.body.createTextRange();
            textRange.moveToElementText(this);
            textRange.collapse(true);
            textRange.moveEnd('character', end);
            textRange.moveStart('character', start);
            textRange.select();
        }
    });
};
$.fn.getSelectedHTMLText = function() {
    var html = "";
    if (this[0].contains(document.activeElement)) { // Ensuring focus is within the element
        var sel, range;
        if (window.getSelection) {
            sel = window.getSelection();
            if (sel.rangeCount) {
                range = sel.getRangeAt(0);
                var container = document.createElement("div");
                container.appendChild(range.cloneContents());
                html = container.innerHTML;
            }
        } else if (document.selection && document.selection.createRange) { // For IE
            range = document.selection.createRange();
            html = range.htmlText;
        }
    }
    return html;
};
$.fn.getSelectedHTML1 = function() {
    var html = "";
    if (this[0].contains(document.activeElement)) { // Ensuring focus is within the element
        var sel, range;
        if (window.getSelection) {
            sel = window.getSelection();
            if (sel.rangeCount) {
                range = sel.getRangeAt(0);
                var container = document.createElement("div");
                container.appendChild(range.cloneContents());
                html = container.innerHTML;
            }
        } else if (document.selection && document.selection.createRange) { // For IE
            range = document.selection.createRange();
            html = range.htmlText;
        }
    }
    return html;
};
$.fn.getSelectedHTML = function() {
    var html = "";
    if (this[0].contains(document.activeElement)) { // Ensuring focus is within the element
        var sel, range;
        if (window.getSelection) {
            sel = window.getSelection();
            if (sel.rangeCount) {
                range = sel.getRangeAt(0);
                var container = document.createElement("div");

                // Check if the range is within a single element
                var startNode = range.startContainer, endNode = range.endContainer;
                var commonAncestor = range.commonAncestorContainer;
                while (commonAncestor.nodeType !== 1) { // Ascend to the nearest element node
                    commonAncestor = commonAncestor.parentNode;
                }

                // Check if the start and end nodes are within the same element
                if (startNode === endNode || startNode.parentNode === endNode.parentNode) {
                    var element = startNode.nodeType === 1 ? startNode : startNode.parentNode;
                    // Check if the selected range fully contains the text of the element
                    if (range.toString() === element.textContent) {
                        html = element.outerHTML;
                    } else {
                        container.appendChild(range.cloneContents());
                        html = container.innerHTML;
                    }
                } else {
                    // If not, use the cloned contents of the range
                    container.appendChild(range.cloneContents());
                    html = container.innerHTML;
                }
            }
        } else if (document.selection && document.selection.createRange) { // For IE
            range = document.selection.createRange();
            html = range.htmlText;
        }
    }
    return html;
};
$.fn.encapsulateHTML = function(tag, attrs) {
    var selectedHTML = this.getSelectedHTML();
    if (!selectedHTML) return this; // No selection or empty selection

    // Create the tag with attributes
    var $tag = $("<" + tag + "></" + tag + ">");
    $.each(attrs, function(key, value) {
        $tag.attr(key, value);
    });

    // Set the HTML of the created tag
    $tag.html(selectedHTML);

    // Get current selection and replace it with the new element
    if (window.getSelection && window.getSelection().rangeCount > 0) {
        var range = window.getSelection().getRangeAt(0);
        range.deleteContents(); // Remove the selected content
        range.insertNode($tag[0]); // Insert the new element with the encapsulated HTML
    } else if (document.selection && document.selection.createRange) { // For IE
        var range = document.selection.createRange();
        range.pasteHTML($tag.prop('outerHTML'));
    }

    return this; // Chainability
};
$.fn.stripper = function() {
    var selectedHTML = this.getSelectedHTML();
    if (!selectedHTML) return this; // No selection or empty selection

    // Strip all HTML tags
    var strippedHTML = selectedHTML.replace(/<\/?[^>]+(>|$)/g, "");

    // Get current selection and replace it with stripped text
    if (window.getSelection && window.getSelection().rangeCount > 0) {
        var range = window.getSelection().getRangeAt(0);
        range.deleteContents(); // Remove the selected content
        range.insertNode(document.createTextNode(strippedHTML)); // Insert the stripped text
    } else if (document.selection && document.selection.createRange) { // For IE
        var range = document.selection.createRange();
        range.pasteHTML(strippedHTML);
    }

    return this; // Chainability
};
$.fn.wrapInner = function(html) {
    return this.each(function() {
        var $this = $(this);  // Cache the current jQuery object
        $this.contents().wrapAll(html);  // Wrap all contents of each element in the jQuery set
    });
};
$.fn.replaceHTML = function(newHtml) {
    if (!this[0].contains(document.activeElement)) {
        return this; // Ensure the operation is relevant to the focused element
    }
    
    var sel, range;
    if (window.getSelection) {
        sel = window.getSelection();
        if (sel.rangeCount) {
            range = sel.getRangeAt(0);
            range.deleteContents(); // Clear the content of the current selection

            var tempDiv = document.createElement("div");
            tempDiv.innerHTML = newHtml; // Insert the new HTML into a temporary div

            // Insert new HTML into the range
            var frag = document.createDocumentFragment(), child;
            while ((child = tempDiv.firstChild)) {
                frag.appendChild(child);
            }
            range.insertNode(frag);
            
            // Optionally, you might want to re-select the newly inserted HTML
            range = range.cloneRange();
            range.selectNodeContents(frag);
            sel.removeAllRanges();
            sel.addRange(range);
        }
    } else if (document.selection && document.selection.createRange) { // For IE
        range = document.selection.createRange();
        range.pasteHTML(newHtml);
    }

    return this; // Chainability
};


name: audit.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\audit.js
mime: unavailable
content:
(function exploreNamespace(parent, parentPath) {
    const visited = new WeakSet();
    const paths = []; // Array to hold all paths

    function explore(obj, path) {
        Object.getOwnPropertyNames(obj).forEach(prop => {
            const propPath = `${path}.${prop}`;
            try {
                const value = obj[prop];
                if (typeof value === "object" && value !== null) {
                    if (!visited.has(value)) {
                        visited.add(value);
                        explore(value, propPath);
                    }
                } else {
                    console.log(propPath);
                    paths.push(propPath); // Add the path to the array
                }
            } catch (error) {
                console.warn(`Could not access ${propPath}: ${error.message}`);
            }
        });
    }

    visited.add(parent);
    explore(parent, parentPath);

    if (paths.length > 0) {
        console.log('Copying paths to clipboard...');
        copy(paths.join('\n')); // Copy the paths array to the clipboard
        console.log('Copied!');
    } else {
        console.log('No paths found to copy.');
    }
})(window, 'window');


name: autoGrow.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\autoGrow.js
mime: unavailable
content:
function autoGrow(textarea) {
    textarea.style.height = 'auto';
    var height = textarea.scrollHeight;
    if (textarea.scrollHeight < 5) {
        height = 5;
    }
    textarea.style.height = height+3 + 'px';
}
// <textarea id="theID" oninput="autoGrow(this)" onkeydown="autoGrow(this)"></textarea>


name: binder.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\binder.js
mime: unavailable
content:
_ = typeof _ !== 'undefined' ? _ : {} ; window._=_;
_.binder = {
    binder: [],
    unbind: function(element) {
        const self = this;
        const elementsToRemove = document.querySelectorAll(element);
        elementsToRemove.forEach(function(el) {
            self.binder = self.binder.filter(function(binder) {
                if (binder.el === el) {
                    el.removeEventListener(binder.type, binder.handler);
                    return false; // Remove the binder from the list
                }
                return true; // Keep the binder in the list
            });
        });
    },
    unbindOne: function(selector, type, handler) {
        const elements = document.querySelectorAll(selector);
        const self = this;
        elements.forEach(function (el) {
            self.binder = self.binder.filter(function (binder) {
                if (binder.el === el && binder.type === type && (!handler || binder.handler === handler)) {
                    el.removeEventListener(type, binder.handler);
                    return false; // Remove the binder from the list
                }
                return true; // Keep the binder in the list
            });
        });
    },
    unbindAll: function() {
        const self = this
        self.binder.forEach(function (binder) {
            binder.el.removeEventListener(binder.type, binder.handler);
        });
        self.binder = [];
    },
    bind: function(selector, type, handler, end) {
        const elements = document.querySelectorAll(selector);
        const self = this;

        elements.forEach(function (el) {
            // Check if the element and handler combination is already bound
            const isBound = self.binder.some(function (binder) {
                return binder.el === el && binder.type === type && binder.handler === handler;
            });

            if (!isBound) {
                self.binder.push({ 'el': el, 'type': type, 'handler': handler });
                if (typeof end === 'undefined') {
                    el.addEventListener(type, handler);
                } else {
                    el.addEventListener(type, handler, end);
                }
            }
        });
    },
};

// _.binder.bind('.selector', 'your-event-type', function(event) {  });

// _.binder.bind('.selector', 'click', function(event) {
//     console.log('Event triggered on element:', event.target);
// });


name: basic.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\c\basic.js
mime: unavailable
content:
_.cookies.defaults = {
    days: 3650,//9d53
    secure: false,//9549
    httpOnly: false,//4051
    sameSite: 'Lax'
};


name: compliant.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\c\compliant.js
mime: unavailable
content:
_.cookies.defaults = {
    days: 365,//c010
    secure: true,//9040
    httpOnly: true,//98db
    sameSite: 'Strict'
};


name: crossDomain.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\c\crossDomain.js
mime: unavailable
content:
_.cookies.defaults = {
    days: 365,//58e6
    secure: true,//2038
    httpOnly: false,//c100
    sameSite: 'None'//5f9f
};


name: secure.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\c\secure.js
mime: unavailable
content:
_.cookies.defaults = {
    days: 30,//ed81
    secure: true,//5b46
    httpOnly: true,//24b5
    sameSite: 'Strict'
};


name: session.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\c\session.js
mime: unavailable
content:
_.cookies.defaults = {
    days: 0,//b8d2
    secure: false,//63fd
    httpOnly: false,//16e4
    sameSite: 'Lax'
};


name: checkbox.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\dd\checkbox.js
mime: unavailable
content:
$$.plugin('checked', (elements, optionValue) => {
    let isSelected = false;
    
    elements.forEach(element => {
        if (element.type === 'radio' || element.type === 'checkbox') {
            if (optionValue !== undefined) {
                if (element.value === optionValue && element.checked) {
                    isSelected = true;
                }
            } else if (element.checked) {
                isSelected = true;
            }
        }
    });
    
    return isSelected;
});

$$.plugin('check', (elements) => {
    elements.forEach(element => {
        if (element.type === 'checkbox' || element.type === 'radio') {
            element.checked = true;
        }
    });
    return this;
});

$$.plugin('uncheck', (elements) => {
    elements.forEach(element => {
        if (element.type === 'checkbox' || element.type === 'radio') {
            element.checked = false;
        }
    });
    return this;
});

$$.plugin('radio', (elements) => {
    const selected = Array.from(elements).find(element => element.checked);
    return selected ? selected.value : null;
});

$$.plugin('checkmark', (elements) => {
    return Array.from(elements).some(element => 
        (element.type === 'checkbox' || element.type === 'radio') && element.checked
    );
});

$$.plugin('click', (elements) => {
    elements.forEach(element => {
        element.click(); // Simulate a click event on the element
    });
    return this;
});


name: json.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\dd\json.js
mime: unavailable
content:
$$.plugin('setCssFromJson', (elements, jsonStyles) => {
    const styles = JSON.parse(jsonStyles);
    elements.forEach(element => {
        for (const property in styles) {
            element.style[property] = styles[property];
        }
    });
    return this;
});

$$.plugin('saveAttributesToJson', (elements) => {
    if (elements.length > 0) {
        const attrs = elements[0].attributes;
        const attrsObj = {};
        for (let i = attrs.length - 1; i >= 0; i--) {
            attrsObj[attrs[i].name] = attrs[i].value;
        }
        return JSON.stringify(attrsObj);
    }
    return '{}';
});

$$.plugin('setAttributesFromJson', (elements, jsonAttrs) => {
    const attributes = JSON.parse(jsonAttrs);
    elements.forEach(element => {
        for (const attr in attributes) {
            element.setAttribute(attr, attributes[attr]);
        }
    });
    return this;
});


name: shiftEnter.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\dd\shiftEnter.js
mime: unavailable
content:
$$('____a').on('keydown',(e) => {
    if (e.shiftKey & e.key === "Enter") {
        ____b
    }
});


name: validation.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\dd\validation.js
mime: unavailable
content:
// (validation)=> start

$$.plugin('validateRequired', (elements) => {
    return Array.from(elements).every(element => element.value.trim() !== '');
});

$$.plugin('validateEmail', (elements) => {
    const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
    return Array.from(elements).every(element => emailRegex.test(element.value));
});

$$.plugin('validateNumeric', (elements) => {
    const numericRegex = /^\d+$/;
    return Array.from(elements).every(element => numericRegex.test(element.value));
});

$$.plugin('validateLength', (elements, length) => {
    return Array.from(elements).every(element => element.value.length === length);
});

$$.plugin('validateMinLength', (elements, minLength) => {
    return Array.from(elements).every(element => element.value.length >= minLength);
});

$$.plugin('validateMaxLength', (elements, maxLength) => {
    return Array.from(elements).every(element => element.value.length <= maxLength);
});

$$.plugin('validateRange', (elements, min, max) => {
    return Array.from(elements).every(element => {
        const value = parseFloat(element.value);
        return value >= min && value <= max;
    });
});

$$.plugin('validateCustomRegex', (elements, regex) => {
    const customRegex = new RegExp(regex);
    return Array.from(elements).every(element => customRegex.test(element.value));
});

$$.plugin('validateText', (elements, description = '') => {
    const regexDict = {
        'email': /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
        'email, optional name': /^"?(?:[\w\s]*)"?\s*<([^\s@]+@[^\s@]+\.[^\s@]+)>$/,

        'phone number': /^\+?[1-9]\d{1,14}$/,
        'phone number, international': /^\+(?:\d{1,4})?(?:[-.()\s]*(\d{1,5}))?[-.()\s]*(\d{1,4}[-.()\s]*){1,14}$/,

        'url': /^(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/.*)?$/,
        'url, query': /^https?:\/\/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s?#]+)?(\?[^\s#]*)?(#[^\s]*)?$/,
        'url, encoded': /%[0-9a-f]{2}/g,
        'url fragment identifier': /^#[A-Za-z0-9\-_]+$/,
        'url with fragment identifier': /^(https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/[^\s?#]+)?(\?[^\s#]*)?(#[A-Za-z0-9\-_]+)?$/,

        'numeric': /^\d+$/,
        'number, complex': /^-?\d+(\.\d+)?[+-]\d+(\.\d+)?i$/,
        'zip': /^\d{5}(-\d{4})?$/,
        'zip2': /^\d{5}-\d{4}$/,
        'zip, uk': /^[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][ABD-HJLNP-UW-Z]{2}$/,
        'zip, canadian': /^[A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d$/,
        'zip2, canadian': /^[a-z]\d[a-z][ -]?\d[a-z]\d$/,

        'date, YYYY-MM-DD': /^\d{4}-\d{2}-\d{2}$/,
        'date, YYYY/MM/DD': /^(19|20)\d\d\/(0[1-9]|1[012])\/(0[1-9]|[12][0-9]|3[01])$/,
        'date, MM/DD/YYYY': /^(0[1-9]|1[012])\/(0[1-9]|[12][0-9]|3[01])\/(19|20)\d\d$/,
        'date, DD-MM-YYYY': /^(0[1-9]|[12][0-9]|3[01])-(0[1-9]|1[012])-(19|20)\d\d$/,
        'date, dd/mm/yyyy': /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/\d{4}$/,
        'date, ISO 8601': /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,
        'time, 24-hour': /^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$/,
        'time, 12-hour': /^(1[012]|[1-9]):([0-5][0-9])(\s)?(AM|PM)$/,
        'date, MM/YYYY': /^(0[1-9]|1[012])\/\d{4}$/,
        'time, HH:MM AM/PM': /^(1[012]|[1-9]):([0-5][0-9])\s?(AM|PM)$/,
        'time, hh:mm:ss': /^(1[012]|[1-9]):([0-5][0-9]):([0-5][0-9])$/,

        'address, us street': /^[0-9]{1,5}\s[A-Za-z\s]+$/,
        'address, us apartment': /^[A-Za-z0-9\s#]+\s[A-Za-z\s]+$/,
        'address, us full': /^[0-9]{1,5}\s[A-Za-z\s]+,\s[A-Za-z\s]+,\s[A-Za-z\s]+,\s[A-Za-z]{2}\s[0-9]{5}(-[0-9]{4})?$/,
        'address, us full, no zip': /^[0-9]{1,5}\s[A-Za-z\s]+,\s[A-Za-z\s]+,\s[A-Za-z\s]+\s[A-Za-z]{2}$/,

        'address, us': /^[0-9]{1,5}\s[A-Za-z\s]+,\s[A-Za-z\s]+,\s[A-Za-z\s]+,\s[A-Za-z]{2}\s[0-9]{5}(-[0-9]{4})?$/,
        'address, canadian': /^[0-9]{1,5}\s[A-Za-z\s]+,\s[A-Za-z\s]+,\s[A-Za-z\s]+,\s[A-Za-z\s]{2}\s[A-Za-z0-9]{6}$/,
        'address, uk': /^[0-9]{1,5}\s[A-Za-z\s]+,\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z0-9]{2,4}\s[A-Z0-9]{5,8}$/,
        'address, australian': /^[0-9]{1,5}\s[A-Za-z\s]+,\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z]{2}\s[0-9]{4}$/,
        'address, german': /^[0-9]{1,5}\s[A-Za-z\s]+,\s[A-Za-z\s]+\s[0-9]{5}\s[A-Za-z\s]+$/,
        'address, french': /^[0-9]{1,5}\s[A-Za-z\s]+\s[0-9]{5}\s[A-Za-z\s]+\s[A-Za-z\s]+$/,
        'address, japanese': /^[0-9]{3}-[0-9]{4}\s[A-Za-z\s]+\s[A-Za-z\s]+,\s[A-Za-z\s]+\s[0-9]{3}-[0-9]{4}$/,
        'address, indian': /^[0-9]{1,5}\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[0-9]{6}$/,
        'address, chinese': /^[0-9]{1,5}\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[0-9]{6}$/,
        'address, brazilian': /^[A-Za-z\s]+,\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+\s[A-Za-z\s]+,\s[A-Za-z\s]+\s[0-9]{5}-[0-9]{3}$/,


        'git commit hash (short)': /^[0-9a-f]{7,9}$/,
        'US employer identification number (EIN)': /^\d{2}-\d{7}$/,
        'jira issue key': /^[A-Z]+-[0-9]+$/,
        'airline booking reference (PNR)': /^[A-Z0-9]{6,8}$/,
        'date (YYYY-MM-DD) with optional time': /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(\.\d+)?(?:Z|[+-]\d{2}:\d{2}))?$/,
        'mac address with hyphens': /^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/,
        'css color code (rgb/rgba/hex/hsl/hsla)': /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3}|rgba?\((\d+%?(?:,\s*|\s+))(\d+%?(?:,\s*|\s+)){2}(1|0?\.?\d+)\s*,\s*(1|0?\.?\d+)\)|hsla?\((\d+%?(?:,\s*|\s+))(100|(\d{1,2}(?:\.\d+)?))%\s*,\s*(100|(\d{1,2}(?:\.\d+)?))%\s*,\s*(1|0?\.?\d+)\))$/,

        'username': /^[a-z0-9_-]{3,16}$/,
        'password, simple': /^[a-zA-Z0-9]{6,}$/,
        'password, strong': /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}$/,

        'linkedin, url': /^https:\/\/([a-z]{2,3}\.)?linkedin\.com\/(in\/[a-zA-Z0-9-]{5,30}|pub\/[a-zA-Z0-9-]{5,30}\/[a-zA-Z0-9-]{5,30}\/[a-zA-Z0-9-]{5,30})$/,
        'facebook, url': /^https:\/\/www\.facebook\.com\/(?:profile\.php\?id=\d{1,20}|[\w\.]{5,50})\/?$/,
        'twitter': /^@?(\w){1,15}$/,
        'instagram': /^@?([A-Za-z0-9._]){1,30}$/,
        'pinterest, url': /^https:\/\/([a-z]{2,3}\.)?pinterest\.[a-z]{2,3}\/[a-zA-Z0-9_]{3,45}\/?$/,
        'reddit': /^\/u\/[A-Za-z0-9_-]{3,20}$/,
        'snapchat': /^[a-zA-Z0-9_]{3,15}$/,
        'tiktok': /^@[A-Za-z0-9_.-]{2,24}$/,
        'youtube, video id': /^[a-zA-Z0-9_-]{11}$/,
        'youtube, channel': /^https:\/\/www\.youtube\.com\/(channel\/[UC]{2}[a-zA-Z0-9_-]{22}|user\/[a-zA-Z0-9_-]{1,20})$/,
        'github': /^https:\/\/github\.com\/[a-z0-9_.-]+\/[a-z0-9_.-]+$/,

        'credit card': /^(?:4[0-9]{12}(?:[0-9]{3})?|[25][1-7][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
        'bank account, us': /^\d{9,12}$/,
        'bitcoin address': /^(bc1|[13])[A-HJ-NP-Za-km-z0-9]{25,39}$/,

        'currency, with symbol': /^(\$[\d]+(\.\d{2})?)|(\d+(\.\d{2})?\s?\$)$/,

        "driver's license, us": /^[A-Z]{1,2}\d{1,6}$/,
        'passport, us': /^[A-Za-z0-9]{6,9}$/,
        'passport, non-us': /^[A-Za-z0-9]{6,12}$/,
        'ssn': /^\d{3}-\d{2}-\d{4}$/,
        'indian pan': /^[A-Z]{5}\d{4}[A-Z]$/,
        'license plate': /^[A-Z0-9-]{2,8}$/,
        'vat, eu': /^([A-Z]{2})[0-9]{8,12}$/,
        'ssn, no dashes': /^(\d{3}-\d{2}-\d{4}|\d{9})$/,
        'license plate, uk': /^[A-Z]{2}\d{2}\s?[A-Z]{3}$/,
        'sin, canadian insurance': /^\d{3}-\d{3}-\d{3}$/,
        'ein, us employer identification, formatted': /^(\d{3}-\d{2}-\d{4}|\d{2}-\d{7})$/,
        'vin, vehicle': /^[A-HJ-NPR-Z0-9]{17}$/,
        
        'emoji': /[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{1FA70}-\u{1FAFF}\u{200D}\u{20E3}\u{FE0F}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]/u,
        
        'ipv4': /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
        'ipv4, cidr': /^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\/([0-9]|[1-2][0-9]|3[0-2])$/,
        'ipv6': /^([0-9a-f]{1,4}:){7,7}[0-9a-f]{1,4}$|([0-9a-f]{1,4}:){1,7}:$/,
        'ipv4 and ipv6': /^(?:(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:(?:[0-9A-Fa-f]{1,4}:){7,7}[0-9A-Fa-f]{1,4}$|(?=(?:[0-9A-Fa-f]{1,4}:){1,7}:$)(?:[0-9A-Fa-f]{1,4}:){1,7}[0-9A-Fa-f]{1,4}|[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}))$/,
        'mac address': /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/,
        'ipfs hash': /^Qm[1-9A-HJ-NP-Za-km-z]{44}$/,
        
        'filepath, linux': /^\/[\/\S|*\S]?.*$/,
        'filepath, windows': /^[a-zA-Z]:\\[\\\S|*\S]?.*$/,
        
        'mime type': /^[a-z]+\/[a-z0-9-+.]+$/,
        'scientific notation': /^-?\d+(\.\d+)?e[+\-]?\d+$/,

        'md5': /^[a-f0-9]{32}$/,
        'sha-256 hash': /^[A-Fa-f0-9]{64}$/,
        'sha-1': /^[a-f0-9]{40}$/,
        'sha-512': /^[A-Fa-f0-9]{128}$/,
        'sha-3, 512': /^[A-Fa-f0-9]{128}$/,
        'sha-3, 256': /^[A-Fa-f0-9]{64}$/,

        'ripemd-160': /^[a-f0-9]{40}$/,
        'uuid, v4': /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,
        'base64 encoding': /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/,
        'hex color': /^#?([a-f0-9]{6}|[a-f0-9]{3})$/,
        'hex color, with or without "#"': /^#?[0-9a-f]{6}$/,
        'hexadecimal color with alpha channel': /^#?[0-9A-Fa-f]{8}$/,

        'binary': /^[01]+$/,
        'hexadecimal': /^[0-9A-Fa-f]+$/,
        'roman numeral': /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,
        'isbn': /^(?:ISBN(?:-1[03])?:? )?(?=[0-9X]{10}$|(?=(?:[0-9]+[- ]){3})[- 0-9X]{13}$|97[89][0-9]{10}$|(?=(?:[0-9]+[- ]){4})[- 0-9]{17}$)(?:97[89][- ]?)?[0-9]{1,5}[- ]?[0-9]+[- ]?[0-9]+[- ]?[0-9X]$/,
        'isbn-13': /^(?:ISBN(?:-13)?:? )?(?=[0-9]{13}$)(?:[0-9]{1,5}[- ]?)?[0-9]{1,7}[- ]?[0-9]+[- ]?[0-9]+[- ]?[0-9]$/,
        'isbn-10': /^(?:ISBN(?:-10)?:? )?(?=[0-9]{10}$)(?:[0-9]{1,5}[- ]?)?[0-9]+[- ]?[0-9]+[- ]?[0-9X]$/,
        'imei': /^\d{15}$/,
        'json': /^\{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*\}$/,
        'latitude & longitude': /^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/,

        'html': /^<([a-z1-6]+)([^<]+)*(?:>(.*)<\/\1>|\s+\/>)$/,
        'html, comment': /<!--[\s\S]*?-->/,
        'html, email link': /^<a\s+(?:[^>]*?\s+)?href=["']mailto:([^\s@]+@[^\s@]+\.[^\s@]+)["'](?:[^>]*?)?>.*<\/a>$/,
        'markdown, link': /\[([^\]]+)\]\(([^)]+)\)/,
    };

    if (description === '') {
        return Object.keys(regexDict).join('\n');
        // return Object.keys(regexDict).join(', ');
    }

    const regex = regexDict[description];
    if (!regex) {
        return `No regex found for description: ${description}`;
    }

    return Array.from(elements).every(element => regex.test(element.value));
});


// (validation)=> stop


name: jq
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\l\jq
mime: unavailable
content:
https://a.sds.sh/?f=js/jq/jquery-1.10.2.js
https://a.sds.sh/?f=js/jq/jquery-1.11.3.js
https://a.sds.sh/?f=js/jq/jquery-1.12.4.js
https://a.sds.sh/?f=js/jq/jquery-1.8.3.min.js
https://a.sds.sh/?f=js/jq/jquery-3.7.1.min.js
https://a.sds.sh/?f=js/jq/jquery-ui-1.9.2.accordion.custom.min.js
https://a.sds.sh/?f=js/jq/jquery-ui.min.js
https://a.sds.sh/?f=js/jq/jquery.colorbox-min.js
https://a.sds.sh/?f=js/jq/jquery.cookie.js
https://a.sds.sh/?f=js/jq/jquery.copycss.js
https://a.sds.sh/?f=js/jq/jquery.fileupload.js
https://a.sds.sh/?f=js/jq/jquery.form-validator.min.js
https://a.sds.sh/?f=js/jq/jquery.md5.js
https://a.sds.sh/?f=js/jq/jquery.nestable.js
https://a.sds.sh/?f=js/jq/jquery.sheet.js
https://a.sds.sh/?f=js/jq/jquery.sheet.min.js
https://a.sds.sh/?f=js/jq/jquery.simulate.drag-sortable.js
https://a.sds.sh/?f=js/jq/jquery.tablesorter.min.js
https://a.sds.sh/?f=js/jq/jquery.ui.accordion.min.css
https://a.sds.sh/?f=js/jq/jquery.ui.core.min.css
https://a.sds.sh/?f=js/jq/jquery.ui.theme.min.css
https://a.sds.sh/?f=js/jq/jquery.ui.touch-punch-0.2.3.min.js


name: resources.yml
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\c\l\resources.yml
mime: unavailable
content:
jq-accordion: https://a.sds.sh/?f=js/jq/jquery-ui-1.9.2.accordion.custom.min.js
jq-1.12.4: https://a.sds.sh/?f=js/jq/jquery-1.12.4.js
jq-3.7.1: https://a.sds.sh/?f=js/jq/jquery-3.7.1.min.js
jq-colorbox: https://a.sds.sh/?f=js/jq/jquery.colorbox-min.js
jq-cookie: https://a.sds.sh/?f=js/jq/jquery.cookie.js
jq-fileupload: https://a.sds.sh/?f=js/jq/jquery.fileupload.js
jq-touch: https://a.sds.sh/?f=js/jq/jquery.ui.touch-punch-0.2.3.min.js
jq-copycss: https://a.sds.sh/?f=js/jq/jquery.copycss.js
jq-sheet: https://a.sds.sh/?f=js/jq/jquery.sheet.js
jq-tablesort: https://a.sds.sh/?f=js/jq/jquery.tablesorter.min.js
jq-validate: https://a.sds.sh/?f=js/jq/jquery.form-validator.min.js
sds-autoGrow: https://a.sds.sh/?f=js/sds/autoGrow.js
sds-url: https://a.sds.sh/?f=js/sds/url.js
sds-print: https://a.sds.sh/?f=js/sds/print.js
sds-converter: https://a.sds.sh/?f=js/sds/converter.js
sds-imgText: https://a.sds.sh/?f=js/sds/imgText/script.js
sds-crypt: https://a.sds.sh/?f=js/sds/crypt.js
sds-clip: https://a.sds.sh/?f=js/sds/clip.js
sds-listeners: https://a.sds.sh/?f=js/sds/listeners.js
sds-binder: https://a.sds.sh/?f=js/sds/binder.js
sds-cookies: https://a.sds.sh/?f=js/sds/cookies.js
sds-editor: https://a.sds.sh/?f=js/sds/editor.js
sds-oc: https://a.sds.sh/?f=js/sds/oc.js
sds-geo: https://a.sds.sh/?f=js/sds/gps.js
sds-unselect: https://a.sds.sh/?f=js/sds/unselect.js
sds-load: https://a.sds.sh/?f=js/sds/load.js
sds-yz: https://a.sds.sh/?f=js/sds/yz.js
sds-camera: https://a.sds.sh/?f=js/sds/camera/camera.js


name: camera.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\camera\camera.js
mime: unavailable
content:
_ = typeof _ !== 'undefined' ? _ : {};
window._ = _;

let currentFacingMode; // Declare currentFacingMode

_.camera = {
	captureAndSave: function (save) {
		if (typeof save === 'undefined') {
			save = 0;
		} else {
			save = 1;
		}
		const video = document.getElementById("live1");
		const canvas = document.getElementById("live2");
		const context = canvas.getContext("2d");

		// Set canvas dimensions to match the video stream
		canvas.width = video.videoWidth;
		canvas.height = video.videoHeight;

		// Set canvas display size (DPI)
		const dpi = 300; // Adjust this value as needed
		canvas.style.width = (canvas.width / dpi) + "in";
		canvas.style.height = (canvas.height / dpi) + "in";

		// Draw the current frame from the video onto the canvas
		context.drawImage(video, 0, 0, canvas.width, canvas.height);

		// Create a data URL containing the image data
		const dataURL = canvas.toDataURL("image/jpeg");

		// Send the captured image to the server using AJAX
		const xhr = new XMLHttpRequest();
		if (save) {
			xhr.open("POST", "https://a.sds.sh/?f=js/sds/camera/save.php", true);
		} else {
			xhr.open("POST", "https://a.sds.sh/?f=js/sds/camera/stream.php", true);
		}
		xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xhr.onreadystatechange = function () {
			_.camera.updateResultPosition();
			if (xhr.readyState === 4) {
				if (xhr.status === 200) {
					const result = document.getElementById("live3");
					var xyz = result.innerHTML;
					var responseText = xhr.responseText;
					if (save) {
						responseText = '<img style="width: 100px;" src="'+responseText+'">';
					} else {
						responseText = '<div>'+responseText+'</div>';

					}
					result.innerHTML = responseText + xyz;
				} else {
					console.error('XHR request failed with status: ' + xhr.status);
				}
			}
		};

		xhr.onerror = function () {
			console.error("An error occurred while making the XMLHttpRequest.");
		};
		xhr.send("image=" + encodeURIComponent(dataURL));
	},
	startCameraStream: function () {
		// Access the user's camera stream and display it in the video element
		navigator.mediaDevices
			.getUserMedia({ video: { facingMode: currentFacingMode } })
			.then((stream) => {
				const video = document.getElementById("live1");
				video.srcObject = stream;
			})
			.catch((error) => {
				console.error("Error accessing the camera:", error);
			});
	},
	toggleCamera: function () {
		// Toggle between front and back cameras
		if (currentFacingMode === "user") {
			currentFacingMode = "environment";
		} else {
			currentFacingMode = "user";
		}

		// Stop the current camera stream
		const video = document.getElementById("live1");
		if (video.srcObject) {
			const tracks = video.srcObject.getTracks();
			tracks.forEach((track) => {
				track.stop();
			});
		}

		// Start the new camera stream
		_.camera.startCameraStream();
	},
	updateResultPosition: function () {
		// Function to update the position of the #result div based on video size
		const video = document.getElementById("live1");
		const result = document.getElementById("live3");

		const videoHeight = video.clientHeight; // Get the actual height of the video
		const newTop = videoHeight + 5 + "px"; // Calculate the new top position

		result.style.top = newTop;
	},
	initialize: function () {
		// Inject html and load
		fetch("https://a.sds.sh/?f=js/sds/camera/code.htm")
			.then((response) => {
				if (response.ok) {
					return response.text();
				} else {
					throw new Error("Network response was not ok");
				}
			})
			.then((data) => {
				const div = document.createElement("div");
				div.innerHTML = data;
				document.body.appendChild(div);
				_.camera.load();
			})
			.catch((error) => {});
	},
	load: function () {
		// Call captureAndSave function every x seconds
		setInterval(_.camera.captureAndSave, 3000);
		_.camera.toggleCamera();

		// Initialize the camera stream on page load
		currentFacingMode = "environment";
		_.camera.startCameraStream();

		// Call the updateResultPosition function when the video is loaded and resized
		currentFacingMode = "environment";
		_.camera.startCameraStream();
		document.getElementById("live1").addEventListener("loadedmetadata", _.camera.updateResultPosition);
		window.addEventListener("resize", _.camera.updateResultPosition);
	},
	hasAlphaNumeric: function (str) {
		// Implement the hasAlphaNumeric function as needed
		// This function should return true or false based on your requirements
		// Example implementation: return /[a-zA-Z0-9]/.test(str);
	},
	placeholder: function () {},
};

document.addEventListener("DOMContentLoaded", function () {
	_.camera.initialize();
});


name: code.htm
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\camera\code.htm
mime: unavailable
content:
<style>
	video {
		height: 50%;
		width: 50%;
		height: auto;
		position: absolute;
		top: 75;
		left: 50%;
		transform: translateX(-50%);
	}
	#live3 {
	}
</style>
<canvas id="live2" style="display: none;"></canvas>

<center>
	<div id="live3"></div>
	<video id="live1" autoplay></video>
</center>
<button id="toggleButton" onclick="_.camera.toggleCamera()">Toggle Camera</button>
<button id="saveButton" onclick="_.camera.captureAndSave(1)">Save</button>


name: save.php
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\camera\save.php
mime: unavailable
content:
<?php

// Start or resume the session
session_start();
$sessionId = session_id();

// Get the image data from the POST request
$imageData = $_POST['image'];
$camera = '/home/softwaredev/public_html/a.sds.sh/public_html/assets/js/sds/camera/pictures/';
if (!file_exists($camera)) {
    mkdir($camera, 0777, true);
}

$baseImagePath = $sessionId . '_save.jpg';
$imagePath = $camera . $baseImagePath;

// Check if the file exists and add a suffix if needed
$suffix = '';
$counter = 1;
while (file_exists($imagePath)) {
    $suffix = '-' . str_pad($counter, 2, '0', STR_PAD_LEFT);
    $imagePath = $camera . $sessionId . '_save' . $suffix . '.jpg';
    $counter++;
}

// Decode the data URL and save it as an image file
$file = fopen($imagePath, "wb");
fwrite($file, base64_decode(explode(',', $imageData)[1]));
fclose($file);

echo 'https://a.sds.sh/?v=1.0&f=js/sds/camera/pictures/' . basename($imagePath);

?>


name: stream.php
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\camera\stream.php
mime: unavailable
content:
<?php

// Start or resume the session
session_start();
$sessionId = session_id();

// Get the image data from the POST request
$imageData = $_POST['image'];
$camera = '/home/softwaredev/public_html/a.sds.sh/public_html/assets/js/sds/camera/pictures/';
if (!file_exists($camera)) {
    mkdir($camera, 0777, true);
}

// Decode the data URL and save it as an image file
$imagePath = $camera . $sessionId . '_1.jpg';
$imagePath2 = $camera . $sessionId . '_2.jpg';
$file = fopen($imagePath, "wb");
fwrite($file, base64_decode(explode(',', $imageData)[1]));
fclose($file);

// Run Tesseract OCR on the saved image
exec("convert -density 300 $imagePath -units PixelsPerInch -colorspace Gray -type Grayscale -contrast-stretch 0 -sharpen 0x4 $imagePath2", $output1);
exec('tesseract ' . $imagePath2 . ' stdout', $output);

// Output the OCR result
echo implode("\n", $output);


name: chat-app.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\chat-app.js
mime: unavailable
content:
_ = typeof _ !== 'undefined' ? _ : {} ; window._=_;
_.chat = typeof _.chat !== 'undefined' ? _.chat : {};
_.chat.message = {
    number: 0,
    senderId: null,
    recipientId: null,
    scrolled: true,
    setSender: function(senderId) {
        this.senderId = senderId;
    },

    setRecipient: function(recipientId) {
        this.recipientId = recipientId;
    },

    sendMessage: function() {
        var self=this;
        var message = $$('#messageInput').val();
        var package = { senderEid: self.senderId, recipientEid: self.recipientId, message: message };
        $$('#messageInput').val('');
        autoGrow(document.getElementById('messageInput'));
        $$('#chatArea').append('<div style="text-align:right;width:100%">'+message.replace(/\n/g, '<br/>')+'</div><hr/>');
        
        if (self.recipientId === null || self.senderId === null) {
            console.error('Sender or recipient ID is not set.');
            return;
        }
        $$.post(
                'https://a.sds.sh?f=apps/chat/sendMessageEndpoint.php', package,
                (data) => {
                    console.log(data);
                    self.scroll();
                    $$('#messageInput').val('');
                }
        );
    },

    fetchMessages: function() {
        var self=this;
        if (self.recipientId === null) {
            console.error('Recipient EID is not set.');
            return;
        }
        self.saveScroll();
        $$.post(
                'https://a.sds.sh?f=apps/chat/getMessagesEndpoint.php', {
                    recipientEid: self.recipientId,
                    senderEid: self.senderId
                },
                (data) => {
                    if (data) {
                        self.formatMessages(JSON.parse(data));
                    }
                }
        );
    },

    formatMessages: function(messages) {
        var self=this;
        if (!messages) {
            return false;
        }
        if (!_.chat.message.number) { _.chat.message.number = messages.length; }
        // console.log(_.chat.message.number, messages.length, _.chat.message.number);
        if (_.chat.message.number & messages.length > _.chat.message.number) {
            console.log(messages[messages.length-1].sender_eid); console.log(self.senderId);
            if (messages[messages.length-1].sender_eid != self.senderId) {
                _.chat.message.ding()
            }
            // else {alert('not me');}
        }
        // console.log(_.chat.message.number,messages.length);
        _.chat.message.number = messages.length;
        var data = '';
        for (var i = 0; i < messages.length; i++) {
            var message = messages[i];
            // console.log(message)
            data += '<div class="message">';
            if (message.sender_eid == self.senderId) {
                data += '<div class="fromme">';
                data += '<div class="body">';
                data += message.message.replace(/\n/g, '<br/>'); // Use regular expression to replace all occurrences
            } else {
                data += '<div class="tome">';
                data += '<div class="from">';
                data += message.sender_name;
                data += '</div>';
                data += '<div class="body">';
                data += message.message.replace(/\n/g, '<br/>'); // Use regular expression to replace all occurrences
            }
            data += '</div>';
            data += '</div>';
            data += '</div>';
            data += '<hr/>';
        }

        $$('#chatArea').html(data);
        self.scrollIf();
        setTimeout(function() { self.scrollIf(); }, 800);
        setTimeout(function() { self.scrollIf(); }, 1500);
        // self.scrollIf();
        // setTimeout(function() { self.scrollIf(); }, 800);
        // setTimeout(function() { self.scrollIf(); }, 1500);
    },
    ding: function() {
        console.log('ding');
        try {
            var dingSound = new Audio('https://a.sds.sh/?f=apps/chat/ding.mp3');
            dingSound.play();
        } catch (error) {
            console.log('Unable to ding until you click on the page');
        }
    },
    saveScroll: function() {
        var self=this;
        self.scrolled = chatArea.scrollHeight - chatArea.clientHeight - 10 <= chatArea.scrollTop + 1;
    },
    scroll: function() {
        var self=this;
        const chatArea = document.getElementById('chatArea');
// document.getElementById('chatArea').clientHeight
        chatArea.scrollTop = chatArea.scrollHeight - chatArea.clientHeight;
        self.saveScroll();
    },
    scrollIf: function() {
        var self=this;
        const chatArea = document.getElementById('chatArea');
        const isAtBottom = chatArea.scrollHeight - chatArea.clientHeight - 10 <= chatArea.scrollTop + 1;
        if (isAtBottom || self.scrolled) {
            chatArea.scrollTop = chatArea.scrollHeight;
        }
    },
    updateChat: function(messages) {
        var self=this;
        const chatArea = document.getElementById('chatArea');
        chatArea.innerHTML = '';

        messages.forEach(message => {
            const messageElement = document.createElement('div');
            messageElement.textContent = message.text; // Assume message structure has a text field
            chatArea.appendChild(messageElement);
        });
    },

    initialize: function(senderId, recipientId) {
        var self=this;
        self.setSender(senderId);
        self.setRecipient(recipientId);
        setInterval(self.fetchMessages.bind(this), 5000);
        self.fetchMessages();
        setTimeout(function() { self.scroll(); }, 800);
        setTimeout(function() { self.scroll(); }, 1500);
        $$('#chatArea').on('click',() => { _.chat.message.scroll(); });
    }
};


name: chat.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\chat.js
mime: unavailable
content:
_ = typeof _ !== 'undefined' ? _ : {} ; window._=_;
_.chat = typeof _.chat !== 'undefined' ? _.chat : {};

function _loadScript_(url, callback) {
    var script = document.createElement('script');
    script.src = url; script.type = 'text/javascript';
    script.onload = callback; document.head.appendChild(script);
}
function _loadCSS_(cssUrl) {
    var link = document.createElement("link");
    link.href = cssUrl; link.rel = "stylesheet";
    link.type = "text/css"; document.head.appendChild(link);
}
_loadScript_('https://a.sds.sh/?v=1.0&f=js/sds/framework.js&exec=[r=1,include:url.js][r=1,include:cookies.js,2,include:c/c/crossDomain.js,365~//58e6,3650~][r=1,include:dd.js,//$,-][r=1,include:autoGrow.js][r=1,include:chat-app.js]', ()=>{
    // _.load.queue.push([
    //     "https://a.sds.sh/?f=/js/sds/dd.js",
    //     "https://a.sds.sh/?f=js/sds/cookies.js",
    //     ]);
    // _.load.ready(()=>{

        _.chat.inject = {
            anonymous: () => {
                var self = this;
                $$.post(
                    'https://a.sds.sh/?f=apps/chat/anonymous.php', {},
                    (data) => {
                        _.cookie.set('chat-sender',data);
                        $$('#chat_icon').hide();
                        window._.chat.inject.load();
                        
                        $$.post('https://notify.sds.sh/?sub=chats&title=NewChat&message=https%3A%2F%2Fa.sds.sh%2F%3Ff%3Dapps%2Fchat%2F%26people%3D'+data, {},(data) => {});
                        // $$.post('https://notify.sds.sh/?sub=chats&title=NewChat&message=https://a.sds.sh/?f=apps/chat/&people='+data, {},(data) => {});
                    }
                );
            },
            load: () => {
                $$.post(
                    'https://a.sds.sh/?f=apps/chat/chat.htm', {},
                    (html) => {
                        document.body.innerHTML += '<br/><br/>';
                        $$('body').append(html);
                        setTimeout(function() {
                            document.getElementById('messageInput').focus();
                            setTimeout(function() {document.getElementById('messageInput').focus();}, 500);
                            setTimeout(function() {document.getElementById('messageInput').focus();}, 2000);
                            window._.chat.message.initialize(_.cookie.get('chat-sender'), '3d77da337bff6ef677d72bc891839e46');
                            // _.cookie.get('chat-recipient') = '3d77da337bff6ef677d72bc891839e46';
                            $$('#messageInput').on('keydown',(e) => {
                                if (e.shiftKey & e.key === "Enter") {
                                    _.chat.message.sendMessage();
                                }
                            });
                            setTimeout(function() {
                                var package = { senderEid: '3d77da337bff6ef677d72bc891839e46', recipientEid: _.cookie.get('chat-sender'), message: 'Welcome to the live chat.\nHow can I help you?' };
                                $$.post(
                                    'https://a.sds.sh?f=apps/chat/sendMessageEndpoint.php', package,
                                    (data) => {
                                        console.log(data);
                                    }
                                );
                            }, 1000);

                            
                        }, 500);
                    }
                );
            },
            initialize: () => {
                if (false) {
                    $$.post(
                        'https://a.sds.sh/?f=apps/chat/button.php', {},
                        (data) => {
                            $$('body').append(data);
                        }
                    );
                } else {
                    var button = '<div id="chat_icon" onclick="_.chat.inject.anonymous();" ><img src="https://a.sds.sh/?f=apps/chat/dark.png"></a></div>'
                    $$('body').append(button);
                    _loadCSS_('https://a.sds.sh/?f=apps/chat/absolute.css');
                } 

            },
        }
        window._=_;
        _.chat.inject.initialize();

    // });
});


name: clip.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\clip.js
mime: unavailable
content:
_ = typeof _ !== 'undefined' ? _ : {}; window._ = _;
_.clip = {
    set: function(data) {
        return new Promise(function(resolve, reject) {
            navigator.clipboard.writeText(data).then(function() {
                resolve();
            }, function(err) {
                reject(err);
            });
        });
    },
    get: function() {
        return new Promise(function(resolve, reject) {
            navigator.clipboard.readText().then(function(data) {
                resolve(data);
            }, function(err) {
                reject(err);
            });
        });
    },
};

// _.clip.set("Hello, clipboard data");
// _.clip.set("Hello, clipboard data").then(function() {  }).catch(function(err) {  });
// _.clip.set("Hello, clipboard data").then(()=>{  }).catch((err)=>{  });


// _.clip.get().then(function(data) { alert(data); }).catch(function(err) { alert(err); });
// _.clip.get().then((data)=>{alert(data);}).catch((err)=>{alert(data);});


name: converter.js
path: D:\websites\domains\a.sds.sh\public_html\a\js\sds\converter.js
mime: unavailable
content:
var _ = typeof _ !== 'undefined' ? _ : {} ;
_.v = typeof _.v !== 'undefined' ? _.v : {} ;

_.app = {
    md: false,
    script: null,
    run: function(subject,arg=null) {
        if (typeof subject === 'function') {
            if (arg === null) {
                if (this.script === 'function') {
                    this.script(subject);
                } else {
                    return subject();
                }

            } else {
                if (this.script === 'function') {
                    this.script(subject,arg);
                } else {
                    return subject(arg);
                }
            }
        } else {
            return subject;
        }
    },
    putGo: function(data) {
        $('#inputArea').val(data);
    },
    put: function(data) {
        this.run(this.putGo,data)
    },
    mod: function() {
        var data = $('#inputArea').val();
        var replace = {
            '459198375047324': "''",
            '662129109173957': '{}',
            '973830022837745': '[]',
            '183460386945824': 'null',
            '689217140030165': 'false',
            '601527470935903': '""',
        }
        var found = false;
        for (var key in replace) {
            if (data.indexOf(key) > -1) {
                data = data.replaceAll(key,replace[key])
                found = true;
            }
        }
        if (!found) {
            // console.log('not found');
            for (var key in replace) {
                if (data.indexOf(replace[key]) > -1) {
                    data = data.replaceAll(replace[key],key)
                }
            }
        } else {
            // console.log('found');
        }
        // console.log(data);
        this.put(data);
    },
    json: function() {
        var data = $('#inputArea').val();
        data = _.app.vert.convertToIDs(data);
        if (this.md) {
            if (data.indexOf('~~~') > -1) {
                data = this.markdown(data,'json');
            } else {
                data = _.app.vert.convertToJson(data);
                data = _.app.vert.jsonToYaml(data);
                data = _.app.vert.convertToJson(data);
            }
        } else {
            data = _.app.vert.convertToJson(data);
            data = _.app.vert.jsonToYaml(data);
            data = _.app.vert.convertToJson(data);
        }
        data = _.app.vert.convertFromIDs(data);
        this.put(data);
    },
    yaml: function() {
        var data = $('#inputArea').val();
        data = _.app.vert.convertToIDs(data);
        if (this.md) {
            if (data.indexOf('~~~') > -1) {
                data = this.markdown(data,'yaml');
            } else {
                data = _.app.vert.convertToJson(data);
                data = _.app.vert.jsonToYaml(data);
            }
        } else {
            data = _.app.vert.convertToJson(data);
            data = _.app.vert.jsonToYaml(data);
        }
        data = _.app.vert.convertFromIDs(data);
        this.put(data);
    },
    php: function() {
        var data = $('#inputArea').val();
        data = _.app.vert.convertToIDs(data);
        if (this.md) {
            if (data.indexOf('~~~') > -1) {
                data = this.markdown(data,'php');
            } else {
                data = _.app.vert.convertToJson(data);
                data = _.app.vert.jsonToYaml(data);
                data = _.app.vert.convertToJson(data);
                data = _.app.vert.jsonToPhp(data);
            }
        } else {
            data = _.app.vert.convertToJson(data);
            data = _.app.vert.jsonToYaml(data);
            data = _.app.vert.convertToJson(data);
            data = _.app.vert.jsonToPhp(data);
        }
        data = _.app.vert.convertFromIDs(data);
        this.put(data);
    },
    ns: function() {
        var data = $('#inputArea').val();
        data = _.app.vert.convertToIDs(data);
        if (this.md) {
            if (data.indexOf('~~~') > -1) {
                data = this.markdown(data,'ns');
            } else {
                data = _.app.vert.convertToJson(data);
                data = _.app.vert.jsonStringToNamespace(data);
            }
        } else {
            data = _.app.vert.convertToJson(data);
            data = _.app.vert.jsonStringToNamespace(data);
        }
        data = _.app.vert.convertFromIDs(data);
        this.put(data);
    },
    detect: function() {
        var data = _.app.vert.detectLanguage($('#inputArea').val());
        alert(data);
    },
    send: function() {
        _.app.json();
        var self=this;
        setTimeout(function() {
            $.post(
                    'headers.php', {
                        'arr': $('#inputArea').val()
                    },
                    function(data) {
                        data = _.app.vert.convertFromIDs(data);
                        self.put(data);
                        // console.log(data);
                    }
            );
        }, 500);
        // _.app.send();
    },
    markdown: function(markdownText,language) {


        // Languages to scan for
        const languages = ['yaml', 'yml', 'json', 'php', 'ns', 'namespace'];

        // Split markdown text by '~~~'
        const parts = markdownText.split('~~~');
        let processedText = '';
        for (let i = 1; i < parts.length; i += 2) { // Iterate over every second element (code blocks)
            let block = parts[i];
            let lines = block.split('\n');
            let lang = lines[0].trim(); // First line is the language

            // Check if the block's language is in the list
            if (languages.indexOf(lang) > -1) {
                // Separate out the first language line
                let data = lines.slice(1).join('\n').trim();

                try {
                    // Convert the block data to JSON first, regardless of target language
                    data = _.app.vert.convertToJson(data);
                    data = _.app.vert.jsonToYaml(data); lang='yaml';
                    data = _.app.vert.convertToJson(data);
                    lang='json';
                    // Convert from JSON to the target language
                    switch (language) {
                        case 'yaml':
                            data = _.app.vert.jsonToYaml(data); lang='yaml';
                            break;
                        case 'php':
                            data = _.app.vert.jsonToPhp(data); lang='php';
                            break;
                        case 'ns':
                            data = _.app.vert.jsonStringToNamespace(data); lang='ns';
                            break;
                    }
                } catch (error) {
                    console.error('Conversion error:', error);
                    // Optionally, handle the error more gracefully here
                    // e.g., continue with the original data or skip this block
                }

                // Reassemble the processed block with the new language and data
                parts[i] = lang + '\n' + data;
            }
        }

        // Reassemble the processed markdown text
        processedText = parts.join('~~~');
        return processedText;






        // // Languages to scan for
        // const languages = ['yaml', 'yml', 'json', 'php', 'ns', 'namespace'];

        // // Split markdown text by '~~~'
        // const parts = markdownText.split('~~~');
        // let processedText = '';
        // for (let i = 1; i < parts.length; i += 2) { // Iterate over every second element (code blocks)
        //     let block = parts[i];
        //     let lines = block.split('\n');
        //     let lang = lines[0].trim(); // First line is the language
        //     if (languages.indexOf(lang) > -1) {
        //         // Separate out the first language line
        //         let data = lines.slice(1).join('\n');
        //         // Perform the conversion
        //         data = data.trim()
        //         // console.log('-------------------');
        //         // console.log('-------------------');
        //         // console.log(data);
        //         // console.log('-------------------');
        //         try {
        //             data = _.app.vert.convertToJson(data);
        //         } catch (error) {
        //             console.log(error);
        //         }
        //         if (false) {
        //         } else if (language === 'yaml') { data = _.app.vert.jsonToYaml(data);              lang = 'yaml';
        //         } else if (language === 'php') {  data = _.app.vert.jsonToPhp(data);               lang = 'php';
        //         } else if (language === 'ns') {   data = _.app.vert.jsonStringToNamespace(data);   lang = 'ns';
        //         } else if (language === 'json') { lang = 'json';
        //         }
        //         // console.log(data);
        //         // console.log('-------------------');
        //         // console.log('-------------------');
        //         // Reassemble the processed block
        //         parts[i] = lang + '\n' + data + '\n';
        //     }
        // }

        // // Reassemble the processed markdown text
        // processedText = parts.join('~~~');
        // return processedText;
    },
}; window._=_;


// (function(global) {
//     // Ensure that _ is globally accessible
//     var _ = global._ = typeof global._ !== 'undefined' ? global._ : {};

//     // Define or use existing _.v
//     _.v = typeof _.v !== 'undefined' ? _.v : {};

//     // Define _.app with necessary methods
//     _.app = {
//         toJson: function() {
//             var data = _.app.vert.convertToJson($('#inputArea').val());
//             $('#inputArea').val(data);
//         },
//         send: function() {
//             $.post(
//                 'file.php', {
//                     'id': 0
//                 },
//                 function(data) {
//                     console.log(data);
//                 }
//             );
//         }
//     };

// })(window);



_.app.vert = {
    detectLanguage: function(inputText) {
        const lines = inputText.split('\n').filter(line => line.trim() !== '');
        const linesWithNamespacePattern = lines.filter(line => {
            const dotMatches = (line.match(/\./g) || []).length;
            return dotMatches >= 1; // Check for one or more dots in the line
        });

        // If a significant majority of lines follow the namespace pattern, classify as 'namespace'
        if (linesWithNamespacePattern.length / lines.length > 0.9) {
            return 'namespace';
        } else if (inputText.match(/function|var|let|const/)) {
            return 'JavaScript';
        } else if (inputText.match(/<\w+>|<\/\w+>/)) {
            return 'HTML';
        } else if (inputText.match(/\$[\w]+|=>|\[\]|array\(/)) {
            return 'PHP';
        } else if (inputText.match(/{|}|"|'/)) {
            return 'JSON';
        } else if (inputText.match(/:/) && !inputText.match(/;/)) {
            return 'YAML';
        } else {
            return 'Unknown';
        }
    },
    convertToJson: function(inputText) {
        // inputText = this.convertToIDs(inputText);
        var result;
        var detectedLanguage = this.detectLanguage(inputText);
        switch (detectedLanguage) {
            case 'namespace':
                // Assuming inputText is an object declaration or array in namespace
                try {
                    result = this.namespaceToJsonString(inputText);
                    // result = this.createJSONFromNamespace(inputText);
                } catch (e) {
                        // console.log(e);
                        // console.log(2,'namespaceToJson');
                        result = this.namespaceToJson(inputText);

                    try {
                    } catch (error) {
                        // console.log(error);
                        result = 'Invalid namespace Object';
                    }
                }
                break;
            case 'JavaScript':
                // Assuming inputText is an object declaration or array in JavaScript
                try {
                    result = JSON.stringify(eval('(' + inputText + ')'));
                } catch (e) {
                    result = 'Invalid JavaScript Object';
                }
                break;

            case 'HTML':
                // Converting HTML to a JSON object representing the structure
                try {
                    var parser = new DOMParser();
                    var doc = parser.parseFromString(inputText, 'text/html');
                    result = JSON.stringify(this.htmlToJson(doc.body));
                } catch (e) {
                    result = 'Invalid HTML';
                }
                break;

            case 'PHP':
                result = this.phpToJson(inputText);
                break;

            case 'YAML':
                result = this.yamlToJson(inputText);
                break;

            default:
                result = inputText;
        }
        // result = this.convertFromIDs(result);
        return result;
    },
    htmlToJson: function(node) {
        var obj = {};
        if (node.nodeType === Node.TEXT_NODE) {
            obj['text'] = node.nodeValue;
        } else {
            obj[node.tagName] = [];
            node.childNodes.forEach(child => {
                obj[node.tagName].push(this.htmlToJson(child));
            });
        }
        return obj;
    },
    phpToJson: function(phpText) {
        // Remove PHP tags and any leading/trailing whitespace
        var cleanedText = phpText.replace(/<\?php|\?>/g, '').trim();

        // Convert PHP array syntax to JavaScript-like object syntax
        cleanedText = cleanedText.replace(/\[/g, '{').replace(/\]/g, '}');
        cleanedText = cleanedText.replace(/=>/g, ':');
        cleanedText = cleanedText.replace(/'/g, '"');

        // Attempt to parse as JSON
        try {
            var jsonObj = eval('(' + cleanedText + ')');
            return JSON.stringify(jsonObj, null, 2);
        } catch (e) {
            // return 'Error converting PHP to JSON: ' + e.message;
        }
    },
    jsonToYaml2: function(jsonText) {
        try {
            var jsonObj = JSON.parse(jsonText);
            return this.serializeToYaml(jsonObj);
        } catch (e) {
            return 'Invalid JSON: ' + e.message;
        }
    },
    serializeToYaml: function(obj, indent = 0) {
        var yamlText = '';
        var indentString = ' '.repeat(indent);

        for (var key in obj) {
            if (!obj.hasOwnProperty(key)) continue;

            if (typeof obj[key] === 'object' && obj[key] !== null) {
                yamlText += indentString + key + ":\n";
                yamlText += this.serializeToYaml(obj[key], indent + 2);
            } else {
                yamlText += indentString + key + ": " + obj[key] + "\n";
            }
        }
        return yamlText;
    },



    yamlToJson: function(yamlText) {
        try {
            const obj = jsyaml.load(yamlText);
            // var yamlString = jsyaml.dump(object);
            // console.log(obj);
            // console.log(JSON.stringify(obj, null, 4));
            return JSON.stringify(obj, null, 4);
        } catch (e) {
            return 'Error converting YAML to JSON: ' + e.message;
        }
    },



    parseYaml: function(yamlText) {
        var lines = yamlText.split('\n');
        var result = {};
        var currentObj = result;
        var currentIndent = 0;
        var indentStack = [{ obj: result, indent: 0 }];

        lines.forEach(line => {
            if (line.trim() === '') return;

            var indent = line.search(/\S/);
            var keyVal = line.match(/^(\S+?):\s*(.*)$/);
            if (!keyVal) return; // Skip lines that don't match key-value pattern

            var key = keyVal[1].trim();
            var value = keyVal[2] ? keyVal[2].trim() : null;

            // Adjusting current object based on indentation
            if (indent > currentIndent) {
                var newObj = {};
                currentObj[key] = newObj;
                indentStack.push({ obj: currentObj, indent: currentIndent });
                currentObj = newObj;
                currentIndent = indent;
            } else if (indent < currentIndent) {
                while (indentStack.length > 0 && indent <= indentStack[indentStack.length - 1].indent) {
                    var popped = indentStack.pop();
                    currentObj = popped.obj;
                    currentIndent = popped.indent;
                }
            }

            // Assigning value to key
            if (value) {
                currentObj[key] = value;
            }
        });

        return result;
    },

    jsonToYaml: function(jsonText) {
        try {
            var jsonObj = JSON.parse(jsonText);
            let out = this.jsonToYamlString(jsonObj);
            out = out.replaceAll("'",'');
            out = out.replaceAll('"','');
            return out;
        } catch (e) {
            return 'Invalid JSON: ' + e.message;
        }
    },
    jsonToYamlString: function(obj, indent = '') {
        var yamlStr = '';
        for (var key in obj) {
            if (!obj.hasOwnProperty(key)) continue;
            yamlStr += indent + key + ': ';
            if (typeof obj[key] === 'object') {
                yamlStr += '\n' + this.jsonToYamlString(obj[key], indent + '  ');
            } else {
                yamlStr += obj[key] + '\n';
            }
        }
        return yamlStr;
    },



    jsonToPhp: function(jsonText) {
        try {
            var jsonObj = JSON.parse(jsonText);
            return this.jsonToPhpArray(jsonObj);
        } catch (e) {
            return 'Invalid JSON: ' + e.message;
        }
    },

    jsonToPhpArray: function(obj, depth = 0) {
        var indent = '    '; // 4 spaces for indentation
        var currentIndent = indent.repeat(depth);
        var childIndent = indent.repeat(depth + 1);
        var phpStr = depth > 0 ? '[' : 'array(';
        phpStr += '\n';

        var elements = [];
        for (var key in obj) {
            if (!obj.hasOwnProperty(key)) continue;

            var value = obj[key];
            var valueStr;

            if (typeof value === 'object' && value !== null) {
                // Recursively convert nested objects
                valueStr = this.jsonToPhpArray(value, depth + 1);
            } else if (typeof value === 'string') {
                // Convert the value to a string with proper escaping
                valueStr = "'" + value.replace(/'/g, "\\'") + "'";
            } else {
                // Non-string primitives (number, boolean, etc.)
                valueStr = value;
            }

            elements.push(childIndent + "'" + key.replace(/'/g, "\\'") + "' => " + valueStr);
        }

        phpStr += elements.join(',\n') + '\n' + currentIndent + (depth > 0 ? ']' : ')');
        phpStr = phpStr.replace('array(','[');
        phpStr = phpStr.slice(0, -1)+']';
        return phpStr;
    },



    jsonToHtml: function(jsonText) {
        try {
            var jsonObj = JSON.parse(jsonText);
            return this.jsonToHtmlList(jsonObj);
        } catch (e) {
            return 'Invalid JSON: ' + e.message;
        }
    },

    jsonToHtmlList: function(obj) {
        var html = '<ul>';
        for (var key in obj) {
            if (!obj.hasOwnProperty(key)) continue;
            html += '<li><strong>' + key + ':</strong> ' + obj[key] + '</li>';
        }
        html += '</ul>';
        return html;
    },
    jsonToJavaScript: function(jsonText) {
        try {
            var jsonObj = JSON.parse(jsonText);
            return 'var obj = ' + JSON.stringify(jsonObj, null, 2) + ';';
        } catch (e) {
            return 'Invalid JSON: ' + e.message;
        }
    },

    namespaceToJsonString2: function(input) {
        let result = {};
        const lines = input.split('\n');

        lines.forEach(line => {
            if (line.trim() === '') return; // Skip empty lines

            let [path, value] = line.split(' = ');
            try {
                value = value.trim();
            } catch (error) {}

            // Handling quoted and unquoted keys
            const keys = path.match(/('[^']+'|[^.]+)/g).map(key => key.replace(/^'(.*)'$/, '$1').trim());

            // Construct the nested structure
            keys.reduce((acc, key, index) => {
                if (index === keys.length - 1) {
                    acc[key] = eval(value);
                } else {
                    acc[key] = acc[key] || {};
                }
                return acc[key];
            }, result);
        });

        return JSON.stringify(result, null, 2);
    },


namespaceToJsonString: function(input) {
    input = this.convertToIDs(input);
    let result = {};
    const lines = input.split('\n');

    lines.forEach(line => {
        if (line.trim() === '') return; // Skip empty lines

        let [path, value] = line.split(' = ');
        value = value.trim();

        // Process path to get keys
        const keys = path.trim().split('.').map(key => key.trim());

        // Construct the nested structure, creating objects as needed
        keys.reduce((acc, key, index) => {
            if (index === keys.length - 1) {
                // Handle the assignment of the value
                try {
                    acc[key] = JSON.parse(value);
                } catch (e) {
                    acc[key] = eval('(' + value + ')');
                }
            } else {
                if (!acc[key]) {
                    // If the key doesn't exist at this level, create an object
                    acc[key] = {};
                }
            }
            return acc[key];
        }, result);
    });
    var results = JSON.stringify(result, null, 2);
    // results = this.convertFromIDs(results);

    return results;
},



    namespaceToJsonString0: function(input) {
        input = this.convertToIDs(input);
        let result = {};
        const lines = input.split('\n');

        lines.forEach(line => {
            if (line.trim() === '') return; // Skip empty lines

            let [path, value] = line.split(' = ');
            value = value.trim();
            const keys = [];
            let currentKey = '';
            let inQuotes = false;

            for (const char of path.trim()) {
                if (char === "'" && inQuotes) {
                    inQuotes = false;
                } else if (char === "'" && !inQuotes) {
                    inQuotes = true;
                    if (currentKey !== '') {
                        keys.push(currentKey.trim());
                        currentKey = '';
                    }
                } else if (char === '.' && !inQuotes) {
                    if (currentKey !== '') {
                        keys.push(currentKey.trim());
                        currentKey = '';
                    }
                } else {
                    currentKey += char;
                }
            }
            if (currentKey !== '') keys.push(currentKey.trim());

            // Construct the nested structure
            keys.reduce((acc, key, index) => {
                if (index === keys.length - 1) {
                    acc[key] = eval(value);
                } else {
                    acc[key] = acc[key] || {};
                }
                return acc[key];
            }, result);
        });

        return JSON.stringify(result, null, 2);
    },




    jsonStringToNamespace: function(jsonString) {
        jsonString = this.convertToIDs(jsonString);
        if (_.app.vert.detectLanguage(jsonString) === 'namespace') {
            return jsonString;
        }
        const json = JSON.parse(jsonString);
        var result = this.convertToNamespace(json);
        // result = this.convertFromIDs(result);
        return result
    },

    convertToNamespace: function(obj, namespace = '') {
        let result = '';

        for (const key in obj) {
            if (!obj.hasOwnProperty(key)) continue;

            const value = obj[key];
            // Check if the key contains a '.' or '=' and wrap it in single quotes if it does
            const safeKey = (key.includes('.') || key.includes('=')) ? `'${key}'` : key;
            const fullPath = namespace ? `${namespace}.${safeKey}` : safeKey;

            if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
                result += this.convertToNamespace(value, fullPath);
            } else {
                result += `${fullPath} = ${JSON.stringify(value)}\n`;
            }
        }

        return result;
    },

    // createJSONFromNamespace: function(input) {

    //     // Split the input into lines
    //     const lines = input.split('\n');

    //     const namespace = {};

    //     lines.forEach(line => {
    //         // Skip empty lines
    //         if (!line.trim()) return;

    //         const parts = line.split('.');
    //         let currentLevel = namespace;

    //         parts.forEach((part, index) => {
    //             // Check if it's the last part of the line
    //             if (index === parts.length - 1) {
    //                 const keyValue = part.split(' = ');
    //                 if (keyValue.length === 2) {
    //                     const key = keyValue[0].trim();
    //                     let value = keyValue[1].trim();

    //                     // Convert "null", "false", "{}", and "[]" to their respective types
    //                     if (value === 'null') {
    //                         value = null;
    //                     } else if (value === 'false') {
    //                         value = false;
    //                     } else if (value === '{}') {
    //                         value = {};
    //                     } else if (value === '[]') {
    //                         value = [];
    //                     } else {
    //                         // Handle string values (including empty strings)
    //                         value = value.replace(/^'(.*)'$/, '$1');
    //                     }

    //                     currentLevel[key] = value;
    //                 }
    //             } else {
    //                 // Create the nested structure if it doesn't exist
    //                 currentLevel[part] = currentLevel[part] || {};
    //                 currentLevel = currentLevel[part];
    //             }
    //         });
    //     });

    //     // Convert the final namespace object to a JSON string
    //     return JSON.stringify(namespace, null, 2);
    // },


    convertFromIDs: function(data) {
        // return data;
        var replace = {
            '459198375047324': "''",
            '662129109173957': '{}',
            '973830022837745': '[]',
            '183460386945824': 'null',
            '689217140030165': 'false',
            '601527470935903': '""',
        }
        for (var key in replace) {
            if (data.indexOf(key) > -1) {
                data = data.replaceAll(key,replace[key]);
            }
        }
        return data;
    },
    convertToIDs: function(data) {
        // return data;
        var replace = {
            '459198375047324': "''",
            '662129109173957': '{}',
            '973830022837745': '[]',
            '183460386945824': 'null',
            '689217140030165': 'false',
            '601527470935903': '""',
        }
        // console.log(typeof data);
        try {
            for (var key in replace) {
                if (data.indexOf(replace[key]) > -1) {
                    data = data.replaceAll(replace[key],key)
                }
            }
        } catch (error) {}
        // console.log(data);
        return data;
    },
    createJSONFromNamespace: function(input) {
        input = this.convertToIDs(input);
        if (typeof input !== 'string') {
            throw new Error('Input must be a string.');
        }

        const lines = input.split('\n');
        const namespace = {};

        lines.forEach(line => {
            if (!line.trim()) return;

            const parts = line.split('.');
            let currentLevel = namespace;

            parts.forEach((part, index) => {
                if (index === parts.length - 1) {
                    const keyValue = part.split(' = ');
                    if (keyValue.length === 2) {
                        const key = keyValue[0].trim();
                        let value = keyValue[1].trim();

                        if (value === 'null') {
                            value = null;
                        } else if (value === 'false') {
                            value = false;
                        } else if (value === '{}') {
                            value = {};
                        } else if (value === '[]') {
                            value = [];
                        } else {
                            value = value.replace(/^'(.*)'$/, '$1');
                        }

                        currentLevel[key] = value;
                    }
                } else {
                    currentLevel[part] = currentLevel[part] || {};
                    currentLevel = currentLevel[part];
                }
            });
        });

        return JSON.stringify(namespace, null, 2);
    },

    namespaceToJson: function(input) {
        input = this.convertToIDs(input);
        let result = {};
        const lines = input.split('\n');

        lines.forEach(line => {
            if (line.trim() === '') return; // Skip empty lines

            let [path, value] = line.split(' = ');
            const keys = path.trim().split('.').map(key => key.trim());

            // Construct the nested structure with spaces in keys
            keys.reduce((acc, key, index) => {
                if (index === keys.length - 1) {
                    acc[key] = eval(value);
                } else {
                    acc[key] = acc[key] || {};
                }
                return acc[key];
            }, result);
        });

        return JSON.stringify(result, null, 2);
    },


}


