code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
function(){A()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(L){var M=mxEvent.getSource(L);M!=v&&M!=x?(null!=g&&g(),A(),mxEvent.consume(L)):z()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(z,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= | Class | 2 |
c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Qa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,
l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ta);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x); | Class | 2 |
var sanitize_css = function (css, tagPolicy) {
/**
* sanitize CSS
* like sanitize_html, but for CSS
* called by sanitize_stylesheets
*/
return caja.sanitizeStylesheet(
window.location.pathname,
css,
{
containerClass: null,
idSuffix: '',
tagPolicy: tagPolicy,
virtualizeAttrName: noop
},
noop
);
}; | Base | 1 |
arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,E){try{var J=!0,T=window.setTimeout(mxUtils.bind(this,function(){J=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(T);J&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
J&&E(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(T);if(J)try{var Q=document.createElement("canvas"),R=Q.getContext("2d");Q.height=N.height;Q.width=N.width;R.drawImage(N,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(T);J&&E(Editor.svgBrokenImage.src)};N.src=u}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,E,J, | Base | 1 |
'"')):void 0!==Q&&E.push(Q);return""});/,\s*$/.test(u)&&E.push("");return E};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===
u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var E=u.convert,J=this;u.convert=function(T){if(null!=T){var N="http://"==T.substring(0,7)||"https://"==T.substring(0,8);N&&!navigator.onLine?T=Editor.svgBrokenImage.src:!N||T.substring(0,u.baseUrl.length)==u.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=E.apply(this, | Class | 2 |
text: Ext.util.Format.htmlEncode(record.get('name')),
qtip: Tine.Tinebase.common.doubleEncode(record.get('host')),
leaf: false,
cls: 'felamimail-node-account',
delimiter: record.get('delimiter'),
ns_personal: record.get('ns_personal'),
account_id: record.data.id,
listeners: {
scope: this,
load: function(node) {
var account = this.accountStore.getById(node.id);
this.updateAccountStatus(account);
}
}
}); | Base | 1 |
App.Actions.WEB.update_ftp_path_hint = function(elm, hint) {
if (hint.trim() == '') {
$(elm).parent().find('.v-ftp-path-hint').html('');
}
if (hint[0] != '/') {
hint = '/' + hint;
}
hint = hint.replace(/\/(\/+)/g, '/');
$(elm).parent().find('.v-ftp-path-hint').text(hint);
} | Base | 1 |
setTimeout(function(){Ia.style.display="none"},4E3)}function z(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",p=X,X=null)}function L(fa,ca,ba,ja,ia,ma,qa){if(-1<fa.className.indexOf("geTempDlgRadioBtnActive"))return!1;fa.className+=" geTempDlgRadioBtnActive";Q.querySelector(".geTempDlgRadioBtn[data-id="+ja+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");Q.querySelector("."+ca).src="/images/"+ba+"-sel.svg";Q.querySelector("."+ia).src=
"/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"== | Base | 1 |
function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function S(){mxShape.call(this)}function P(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function va(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function sa(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function Na(){mxArrowConnector.call(this);
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)} | Class | 2 |
ka.size,ra,sa)):"readOnly"==va?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ta,sa.style.width="96px",sa.style.borderWidth="0px",wa.appendChild(sa)):(wa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ta)),mxEvent.addListener(wa,"click",mxUtils.bind(Z,function(){function ca(){var ja=ba.value;ja=0==ja.length&&"string"!=va?0:ja;ka.allowAuto&&(null!=ja.trim&&"auto"==ja.trim().toLowerCase()?(ja="auto",va="string"):(ja=parseFloat(ja),ja=isNaN(ja)?0:ja));null!=ka.min&&ja<
ka.min?ja=ka.min:null!=ka.max&&ja>ka.max&&(ja=ka.max);ja=encodeURIComponent(("int"==va?parseInt(ja):ja)+"");T(za,ja,ka)}var ba=document.createElement("input");P(wa,ba,!0);ba.value=decodeURIComponent(ta);ba.className="gePropEditor";"int"!=va&&"float"!=va||ka.allowAuto||(ba.type="number",ba.step="int"==va?"1":"any",null!=ka.min&&(ba.min=parseFloat(ka.min)),null!=ka.max&&(ba.max=parseFloat(ka.max)));p.appendChild(ba);mxEvent.addListener(ba,"keypress",function(ja){13==ja.keyCode&&ca()});ba.focus();mxEvent.addListener(ba, | Class | 2 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | Class | 2 |
Q.addTolerance=R};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,R,Y,ba,ea,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,N.apply(this,arguments),Q.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?
u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,E,J){if(null!=u&&"undefined"!==typeof pako){var T=u.ownerDocument.getElementsByTagName("div"),N=[];if(null!=T&&0<T.length)for(var Q=0;Q<T.length;Q++)if("mxgraph"==T[Q].getAttribute("class")){N.push(T[Q]);break}0<N.length&&(T=N[0].getAttribute("data-mxgraph"),null!=T?(N=JSON.parse(T),null!=N&&null!=N.xml&&(u=mxUtils.parseXml(N.xml),u=u.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&& | Class | 2 |
function isWindow(obj) {
return obj && obj.window === obj;
} | Class | 2 |
__add_control_item(options) {
var item;
switch(options.DOMType) {
case "select":
item = this.__create_select(options.item_options);
this.selects[item.id] = item;
break;
case "input":
item = this.__create_input(options.item_options);
break;
case "empty":
item = this.__create_empty(options.item_options);
break;
default:
break;
}
return item;
} | Base | 1 |
Math.min(Y,Math.max(parseInt(aa.value),parseInt(fa.value))));fa.value=Math.max(1,Math.min(Y,Math.min(parseInt(aa.value),parseInt(fa.value))))}function T(ya){function wa(Ja,Oa,Pa){var Qa=Ja.useCssTransforms,Ya=Ja.currentTranslate,Ma=Ja.currentScale,Ta=Ja.view.translate,Ua=Ja.view.scale;Ja.useCssTransforms&&(Ja.useCssTransforms=!1,Ja.currentTranslate=new mxPoint(0,0),Ja.currentScale=1,Ja.view.translate=new mxPoint(0,0),Ja.view.scale=1);var Za=Ja.getGraphBounds(),Wa=0,bb=0,Va=oa.get(),ab=1/Ja.pageScale,
$a=ra.checked;if($a){ab=parseInt(ta.value);var hb=parseInt(ka.value);ab=Math.min(Va.height*hb/(Za.height/Ja.view.scale),Va.width*ab/(Za.width/Ja.view.scale))}else ab=parseInt(Ha.value)/(100*Ja.pageScale),isNaN(ab)&&(ua=1/Ja.pageScale,Ha.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*ua);Va.height=Math.ceil(Va.height*ua);ab*=ua;!$a&&Ja.pageVisible?(Za=Ja.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Oa){Oa=PrintDialog.createPrintPreview(Ja,ab,Va, | Class | 2 |
fa,la,ra){R.addItem(la,null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(O,la,ra);O.showDialog(u.container,620,420,!0,!1);u.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,fa){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(fa):Q(R,fa,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<X.getSelectionCount()?(O.appendChild(ea),ea.innerHTML="Selected: "+X.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized? | Base | 1 |
y={},A=1,B={},I={},O={},t={},z,L={},C={},D=!0,G=!1,P=!1,K="0"!=urlParams["no-p2p"],F=!1,H=0,S=null,V=mxUtils.bind(this,function(M,W){if(!P)try{null!=q?(q.send(JSON.stringify({action:M,msg:W})),K||EditorUi.debug("P2PCollab: sending to socket server",[M],[W])):this.joinFile(!0)}catch(U){S=U,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,U)}});this.sendMessage=c;this.sendDiff=function(M){this.sendMessage("diff",{patch:M})};this.getState= | Base | 1 |
1E3<=D&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=D||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(C){C=O.apply(this,arguments);
var D=this.editorUi,G=D.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var P=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(K,F){D.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:K?"1":null},G.getVerticesAndEdges())},{install:function(K){this.listener=function(){K(Editor.sketchMode)};D.addListener("sketchModeChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});C.appendChild(P)}return C}; | Base | 1 |
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!= | Base | 1 |
this.toolbar.staticElements.push(c);c.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(c,e){for(var g=this.editor.graph,k=g.getSelectionCells(),m=0;m<c.length;m++){var q=new window[c[m].layout](g);if(null!=c[m].config)for(var v in c[m].config)q[v]=c[m].config[v];this.executeLayout(function(){q.execute(g.getDefaultParent(),0==k.length?null:k)},m==c.length-1,e)}};EditorUi.prototype.importCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],q=[],v={};if(0<g.length){var x={}, | Base | 1 |
this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),y,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; | Class | 2 |
customColsNameBuild = function() {
var name = '',
customColsName = '',
columns = fm.options.uiOptions.cwd.listView.columns,
names = $.extend({}, msg, fm.options.uiOptions.cwd.listView.columnsCustomName);
for (var i = 0; i < columns.length; i++) {
if (typeof names[columns[i]] !== 'undefined') {
name = names[columns[i]];
} else {
name = fm.i18n(columns[i]);
}
customColsName +='<td class="elfinder-cwd-view-th-'+columns[i]+'">'+name+'</td>';
}
return customColsName;
}, | Base | 1 |
"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style, | Base | 1 |
this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var E=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==E.embedViewport)mxUtils.fit(this.div);else{var ca=parseInt(this.div.offsetLeft),ba=parseInt(this.div.offsetWidth),ja=E.embedViewport.x+E.embedViewport.width,ia=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),qa=E.embedViewport.y+E.embedViewport.height;
this.div.style.left=Math.max(E.embedViewport.x,Math.min(ca,ja-ba))+"px";this.div.style.top=Math.max(E.embedViewport.y,Math.min(ia,qa-ma))+"px";this.div.style.height=Math.min(E.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(E.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(), | Base | 1 |
"checked"),O.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(J){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,C);l.addListener(mxEvent.CELLS_RESIZED,C);var X=l.graphHandler.mouseUp,u=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){u.apply(this,arguments);k.style.backgroundColor=""};l.dblClick= | Base | 1 |
c+";"))}}),mxUtils.bind(this,function(){var n=null;A.getModel().beginUpdate();try{n=A.insertVertex(A.getDefaultParent(),null,c,A.snap(e),A.snap(g),1,1,"text;"+(k?"html=1;":"")),A.updateCellSize(n),A.fireEvent(new mxEventObject("textInserted","cells",[n]))}finally{A.getModel().endUpdate()}A.setSelectionCell(n)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,q,null,x);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this, | Base | 1 |
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?
!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(u,E){if("undefined"===typeof window.MathJax){u=(null!=u?u:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue= | Class | 2 |
DrawioFile.prototype.mergeFile=function(b,f,l,d){var u=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),D=b.getShadowPages();if(null!=D&&0<D.length){var c=[this.ui.diffPages(null!=d?d:t,D)],e=this.ignorePatches(c);this.setShadowPages(D);if(e)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",e);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;d={};e={};var g=this.ui.patchPages(t,c[0]),k=this.ui.getHashValueForPages(g,
d),m=this.ui.getHashValueForPages(D,e);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",c,"backup",this.backupPatch,"checksum",k,"current",m,"valid",k==m,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=k&&k!=m){var q=this.compressReportData(this.getAnonymizedXmlForPages(D)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),x=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
this.checksumError(l,c,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+k+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+x+"\nTo: "+A+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+v,null,"mergeFile");return}if(null!=this.sync){var z=this.sync.patchRealtime(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==z||mxUtils.isEmptyObject(z)||c.push(z)}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw u=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(n);try{if(u)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,n);else{var L=this.getCurrentUser(),M=null!=L?L.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),M,n)}}catch(y){}}}; | Base | 1 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | Base | 1 |
function(z){this.spinner.stop();this.handleError(z)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,x,null,1<y,A,l,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(d.container,420,y,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,l,p,q){};EditorUi.prototype.pickFolder=function(d,
g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,A,B,I,O,t,z){if(this.spinner.spin(document.body,mxResources.get("export")))try{var L=this.editor.graph.isSelectionEmpty();k=null!=k?k:L;var C=g?null:this.editor.graph.background;C==mxConstants.NONE&&(C=null);null==C&&0==g&&(C=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var D=this.editor.graph.getSvg(C,d,x,y,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!t,I,O);l&&this.editor.graph.addSvgShadow(D);var G= | Base | 1 |
this.enabled = function() {
return node.is(':visible') && enabled;
} | Base | 1 |
E.createStatusContainer();E.statusContainer.style.position="relative";E.statusContainer.style.maxWidth="";E.statusContainer.style.marginTop="7px";E.statusContainer.style.marginLeft="6px";E.statusContainer.style.color="gray";E.statusContainer.style.cursor="default";var W=E.hideCurrentMenu;E.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var V=E.descriptorChanged;E.descriptorChanged=function(){V.apply(this,arguments);var ca=E.getCurrentFile();if(null!=
ca&&null!=ca.getTitle()){var ba=ca.getMode();"google"==ba?ba="googleDrive":"github"==ba?ba="gitHub":"gitlab"==ba?ba="gitLab":"onedrive"==ba&&(ba="oneDrive");ba=mxResources.get(ba);S.setAttribute("title",ca.getTitle()+(null!=ba?" ("+ba+")":""))}else S.removeAttribute("title")};E.setStatusText(E.editor.getStatus());S.appendChild(E.statusContainer);E.buttonContainer=document.createElement("div");E.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;"; | Base | 1 |
Ua.style.cursor="pointer"):(Ua.setAttribute("disabled","disabled"),Ua.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Ua}function ea(za,wa,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");
for(var Da=0;Da<za.length;Da++)null!=za[Da]&&("1"==urlParams.sketch&&(za[Da].style.padding="10px 8px",za[Da].style.width="30px"),za[Da].style.margin="0px",za[Da].style.boxShadow="none",Ea.appendChild(za[Da]));null!=wa&&mxUtils.setOpacity(Ea,wa);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ea,U.statusContainer):V.appendChild(Ea);return Ea}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var za= | Class | 2 |
null);mxEvent.consume(ca)})))}if(null!=L)for(M=0;M<L.length;M++){var T=document.createElement("div");T.style.marginTop=null!=z||0<M?"6px":"0px";T.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(T)}}}catch(ca){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=
mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(T,ca){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Ra=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ra.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, | Base | 1 |
var CreateDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,x,A,z){function L(N,J,E,H){function S(){mxEvent.addListener(U,"click",function(){var p=E;if(D){var C=y.value,I=C.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>I){p=null!=p?p:G.value;var T="";p==App.MODE_GOOGLE?T=b.drive.extension:p==App.MODE_GITHUB?T=b.gitHub.extension:p==App.MODE_GITLAB?T=b.gitLab.extension:p==App.MODE_TRELLO?T=b.trello.extension:p==App.MODE_DROPBOX?T=b.dropbox.extension:p==App.MODE_ONEDRIVE?T=b.oneDrive.extension:p==App.MODE_DEVICE&&
(T=".drawio");0<=I&&(C=C.substring(0,I));y.value=C+T}}M(E)})}var U=document.createElement("a");U.style.overflow="hidden";var Q=document.createElement("img");Q.src=N;Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.width="60px";Q.style.height="60px";Q.style.paddingBottom="6px";U.style.display="inline-block";U.className="geBaseButton";U.style.position="relative";U.style.margin="4px";U.style.padding="8px 8px 10px 8px";U.style.whiteSpace="nowrap";U.appendChild(Q);U.style.color= | Base | 1 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | Base | 1 |
export function deepExtend (a, b) {
// TODO: add support for Arrays to deepExtend
if (Array.isArray(b)) {
throw new TypeError('Arrays are not supported by deepExtend')
}
for (const prop in b) {
if (hasOwnProperty(b, prop)) {
if (b[prop] && b[prop].constructor === Object) {
if (a[prop] === undefined) {
a[prop] = {}
}
if (a[prop] && a[prop].constructor === Object) {
deepExtend(a[prop], b[prop])
} else {
a[prop] = b[prop]
}
} else if (Array.isArray(b[prop])) {
throw new TypeError('Arrays are not supported by deepExtend')
} else {
a[prop] = b[prop]
}
}
}
return a
} | Variant | 0 |
Ia),!0,null,!0);var Ja=document.createElement("div");Ja.className="geTempDlgDialogMask";M.appendChild(Ja);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ja&&(M.removeChild(Ja),Ja=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=Oa)};mxEvent.addListener(Ja,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Da||b.sidebar.currentElt==da)b.sidebar.hideTooltip();else{var pa=function(na){Da&&b.sidebar.currentElt==da&&ma(na,mxEvent.getClientX(la),mxEvent.getClientY(la));Da=!1; | Class | 2 |
'" y="'+p.y.toFixed(2)+'"/>'):V+('<line x="'+p.x.toFixed(2)+'" y="'+p.y.toFixed(2)+'"/>')}V+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){E=this.createStyle("stencil("+Graph.compress(V)+")");V=b.view.scale;X=b.view.translate;E=new mxCell("",new mxGeometry(H/V-X.x,U/V-X.y,J/V,S/V),E);E.vertex=1;b.model.beginUpdate();try{E=b.addCell(E),b.fireEvent(new mxEventObject("cellsInserted","cells",[E])),b.fireEvent(new mxEventObject("freehandInserted","cell",E))}finally{b.model.endUpdate()}z&&
b.setSelectionCells([E])}}for(E=0;E<u.length;E++)u[E].parentNode.removeChild(u[E]);d=null;u=[];D=[]}n(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,E){J=E.getProperty("eventName");E=E.getProperty("event");J==mxEvent.MOUSE_MOVE&&x&&(null!=E.sourceState&&E.sourceState.setCursor("crosshair"),E.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,E){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(J=E.getEvent(),x&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var H= | Base | 1 |
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){x=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))}; | Base | 1 |
d.addHours=function(a,c){return d.addMinutes(a,60*c)};d.addMinutes=function(a,c){return d.addSeconds(a,60*c)};d.addSeconds=function(a,c){return d.addMilliseconds(a,1E3*c)};d.addMilliseconds=function(a,c){return new Date(a.getTime()+c)};d.subtract=function(a,c){var b=a.getTime()-c.getTime();return{toMilliseconds:function(){return b},toSeconds:function(){return b/1E3},toMinutes:function(){return b/6E4},toHours:function(){return b/36E5},toDays:function(){return b/864E5}}};d.isLeapYear=function(a){return!(a% | Class | 2 |
function(){b.spinner.stop();if(null==b.linkPicker){var n=b.drive.createLinkPicker();b.linkPicker=n.setCallback(function(y){LinkDialog.filePicked(y)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(n){k.value=n[0].link;k.focus()}})});null!=b.oneDrive&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"), | Base | 1 |
function dialog_ajax(a,b,c,e,d,f,g,h){b="undefined"==typeof b||!1===b?alert("You send an invalid url"):b;e="undefined"==typeof e||!1===e?"POST":e;d="undefined"==typeof d||!1===d?"JSON":d;h="undefined"==typeof h||!1===h?$("document.body"):h;a="undefined"==typeof a||!1===a?set_popup_title():a;c._cat_ajax=1;$.ajax({type:e,url:b,dataType:d,context:h,data:c,beforeSend:function(b){$(".fc_popup").remove();b.process=set_activity(a);"undefined"!=typeof f&&!1!==f&&f.call(this)},success:function(a,b,c){return_success(c.process, | Base | 1 |
j=a.oInstance,i=function(b){v(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var o=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&o?o:h.extend(!0,b,o);delete g.data}o={data:b,success:function(b){var c=b.error||b.sError;c&&K(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=v(a,null,"xhr",[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?K(a,0,"Invalid JSON response",1):4===b.readyState&&K(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData= | Base | 1 |
(function(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery); | Base | 1 |
setTimeout(function(){Fa.style.display="none"},4E3)}function B(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",u=X,X=null)}function I(ha,da,ca,la,ia,ma,qa){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";M.querySelector(".geTempDlgRadioBtn[data-id="+la+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");M.querySelector("."+da).src="/images/"+ca+"-sel.svg";M.querySelector("."+ia).src=
"/images/"+ma+".svg";return!0}function O(ha,da,ca,la){function ia(na,Ka){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ia){200<=Ia.getStatus()&&299>=Ia.getStatus()&&(qa=Ia.getText());Ka(qa)}))):Ka(qa)}function ma(na,Ka,Ia){if(null!=na&&mxUtils.isAncestorNode(document.body,da)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"== | Base | 1 |
refreshPositions: function(fast) {
// Determine whether items are being displayed horizontally
this.floating = this.items.length ?
this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
false;
//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
if(this.offsetParent && this.helper) {
this.offset.parent = this._getParentOffset();
}
var i, item, t, p;
for (i = this.items.length - 1; i >= 0; i--){
item = this.items[i];
//We ignore calculating positions of all connected containers when we're not over them
if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
continue;
}
t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
if (!fast) {
item.width = t.outerWidth();
item.height = t.outerHeight();
}
p = t.offset();
item.left = p.left;
item.top = p.top;
}
if(this.options.custom && this.options.custom.refreshContainers) {
this.options.custom.refreshContainers.call(this);
} else {
for (i = this.containers.length - 1; i >= 0; i--){
p = this.containers[i].element.offset();
this.containers[i].containerCache.left = p.left;
this.containers[i].containerCache.top = p.top;
this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
}
}
return this;
}, | Base | 1 |
parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ca,ba,ja){var ia=E.menus.get(ca),ma=Q.addMenu(mxResources.get(ca),
mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}),U);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(ca));E.menus.menuCreated(ia,ma,"geMenuItem");null!=ja?(ma.style.backgroundImage="url("+ja+")",ma.style.backgroundPosition=
"center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ba||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function F(ca,ba,ja,ia,ma,qa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing= | Class | 2 |
mxEvent.getSource(F);null!=G;){if(G==v||G==x){F.stopPropagation();F.preventDefault();break}G=G.parentNode}});var K=function(F){return function(G,N,J,E,H,S,U,Q,W){null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W.name)||/(\.vs(x|sx?))($|\?)/i.test(W.name))?b.importVisio(W,mxUtils.bind(this,function(V){c(V,N,J,E,H,S,U,"fixed",mxEvent.isAltDown(F)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=W&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,W.name)?b.isExternalDataComms()?b.parseFile(W,
mxUtils.bind(this,function(V){4==V.readyState&&(b.spinner.stop(),200<=V.status&&299>=V.status&&(c(V.responseText,N,J,E,H,S,U,"fixed",mxEvent.isAltDown(F)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(c(G,N,J,E,H,S,U,"fixed",mxEvent.isAltDown(F)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",e); | Class | 2 |
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function y(fa,ca){if(null!=I){var ba=function(oa){qa.isExternal?e(qa,function(na){ja(na,oa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?ja(na.getText(),oa):ia()})):ja(b.emptyDiagramXml,oa)},ja=function(oa,na){x||b.hideDialog(!0);f(oa,na,qa,ca)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){I=qa;Ba.className="geTempDlgCreateBtn";ca&&(Ka.className="geTempDlgOpenBtn")}, | Base | 1 |
AspectDialog.prototype.createPageItem=function(b,f,l){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var t=this.createViewer(d.childNodes[0],l);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var u=t.model;u=u.getChildCells(u.getRoot());for(var E=0;E<u.length;E++)this.createLayerItem(u[E],b,t,l)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()}; | Base | 1 |
Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}}; | Base | 1 |
F=B.createElement("output");B.appendChild(F);B=new mxXmlCanvas2D(F);B.translate(Math.floor((1-y.x)/K),Math.floor((1-y.y)/K));B.scale(1/K);var G=0,N=B.save;B.save=function(){G++;N.apply(this,arguments)};var J=B.restore;B.restore=function(){G--;J.apply(this,arguments)};var E=n.drawShape;n.drawShape=function(H){mxLog.debug("entering shape",H,G);E.apply(this,arguments);mxLog.debug("leaving shape",H,G)};n.drawState(u.getView().getState(u.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter", | Base | 1 |
function imagePreview(src) {
imgPreview.getElement().setHtml('');
if (isFReaderSupported) {
var fileI = t.getContentElement('tab-source', 'file');
var n = null;
try {
n = fileI.getInputElement().$;
} catch (e) {
n = null;
}
if (n && 'files' in n && n.files && n.files.length > 0 && n.files[0]) {
if ('type' in n.files[0] && !n.files[0].type.match('image.*')) return;
if (!FileReader) return;
imgPreview.getElement().setHtml('Loading...');
var fr = new FileReader();
fr.onload = (function (f) {
return function (e) {
imgPreview.getElement().setHtml('');
imagePreviewLoad(e.target.result);
};
})(n.files[0]);
fr.onerror = function () {
imgPreview.getElement().setHtml('');
};
fr.onabort = function () {
imgPreview.getElement().setHtml('');
};
fr.readAsDataURL(n.files[0]);
}
}
} | Base | 1 |
isIdentifierContinue: function(ch) {
return this.options.isIdentifierContinue ?
this.options.isIdentifierContinue(ch, this.codePointAt(ch)) :
this.isValidIdentifierContinue(ch);
}, | Class | 2 |
exports = module.exports = function directory(root, options){
options = options || {};
// root required
if (!root) throw new Error('directory() root path required');
var hidden = options.hidden
, icons = options.icons
, view = options.view || 'tiles'
, filter = options.filter
, root = normalize(root + sep)
, template = options.template || defaultTemplate;
return function directory(req, res, next) {
if ('GET' != req.method && 'HEAD' != req.method) return next();
var url = parse(req.url)
, dir = decodeURIComponent(url.pathname)
, path = normalize(join(root, dir))
, originalUrl = parse(req.originalUrl)
, originalDir = decodeURIComponent(originalUrl.pathname)
, showUp = path != root;
// null byte(s), bad request
if (~path.indexOf('\0')) return next(utils.error(400));
// malicious path, forbidden
if (0 != path.indexOf(root)) return next(utils.error(403));
// check if we have a directory
fs.stat(path, function(err, stat){
if (err) return 'ENOENT' == err.code
? next()
: next(err);
if (!stat.isDirectory()) return next();
// fetch files
fs.readdir(path, function(err, files){
if (err) return next(err);
if (!hidden) files = removeHidden(files);
if (filter) files = files.filter(filter);
files.sort();
// content-negotiation
var type = new Negotiator(req).preferredMediaType(mediaTypes);
// not acceptable
if (!type) return next(utils.error(406));
exports[mediaType[type]](req, res, files, next, originalDir, showUp, icons, path, view, template);
});
});
};
}; | Base | 1 |
H&&!V)if("sharepoint"==S)z("site",null,H.id,H.displayName);else if("site"==S)z("subsite",null,H.id,H.name);else{var N=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||S,R=H.id;N?z(Q,R,null,H.name):B()}}function z(N,Q,R,Y,ba){function ea(ra){P.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var za=null,Ga=0,Na=0;null!=ra&&Na<ra.length;Na++){var Fa=ra[Na];if(1!=fa||!Fa.webUrl||0<Fa.webUrl.indexOf("sharepoint.com/sites/")||
0>Fa.webUrl.indexOf("sharepoint.com/")){var Ea=Fa.displayName||Fa.name,Da=mxUtils.htmlEntities(Fa.description||Ea);fa&&(Fa.folder=2==fa?{isRoot:!0}:!0);var La=null!=Fa.folder;if(!g||La){var Aa=document.createElement("tr");Aa.className=Ga++%2?"odOddRow":"odEvenRow";var ta=document.createElement("td");ta.style.width="36px";var ka=document.createElement("img");ka.src="/images/"+(La?"folder.png":"file.png");ka.className="odFileImg";ta.appendChild(ka);Aa.appendChild(ta);ta=document.createElement("td");
La=document.createElement("div");La.className="odFileTitle";La.innerHTML=mxUtils.htmlEntities(Ea);La.setAttribute("title",Da);ta.appendChild(La);Aa.appendChild(ta);Ca.appendChild(Aa);null==za&&(za=Aa,za.className+=" odRowSelected",H=Fa,S=N,x||e(H));(function(oa,sa){Aa.addEventListener("dblclick",t);Aa.addEventListener("click",function(){za!=sa&&(za.className=za.className.replace("odRowSelected",""),za=sa,za.className+=" odRowSelected",H=oa,S=N,x||e(H))})})(Fa,Aa)}}}0==Ga?(ra=document.createElement("div"),
ra.className="odEmptyFolder",ra.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),va.appendChild(ra)):va.appendChild(Ca);O();V=!1}if(!V){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=E&&(E.innerHTML="",E.style.top="50%");var Z=V=!0,fa=0;W=arguments;var aa=setTimeout(function(){V=Z=!1;P.stop();d(mxResources.get("timeout"))},2E4),va=y(".odFilesList");va.innerHTML="";P.spin(va);switch(N){case "recent":M=[{name:mxResources.get("recent", | Class | 2 |
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)} | Class | 2 |
this.diff = function(incoming, onlydir) {
var raw = {},
added = [],
removed = [],
changed = [],
isChanged = function(hash) {
var l = changed.length;
while (l--) {
if (changed[l].hash == hash) {
return true;
}
}
};
$.each(incoming, function(i, f) {
raw[f.hash] = f;
});
// find removed
$.each(files, function(hash, f) {
if (!onlydir || f.phash === onlydir) {
!raw[hash] && removed.push(hash);
}
});
// compare files
$.each(raw, function(hash, file) {
var origin = files[hash];
if (!origin) {
added.push(file);
} else {
$.each(file, function(prop) {
if (file[prop] != origin[prop]) {
changed.push(file)
return false;
}
});
}
});
// parents of removed dirs mark as changed (required for tree correct work)
$.each(removed, function(i, hash) {
var file = files[hash],
phash = file.phash;
if (phash
&& file.mime == 'directory'
&& $.inArray(phash, removed) === -1
&& raw[phash]
&& !isChanged(phash)) {
changed.push(raw[phash]);
}
});
return {
added : added,
removed : removed,
changed : changed
};
} | Base | 1 |
H.x+" "+H.y;S="";c=[];for(U=2;U<v.length;U+=2)H=N(U),S+=" L"+H.x+" "+H.y,c.push(H);d.setAttribute("d",t+S)}m&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));E.consume()}}),mouseUp:mxUtils.bind(this,function(J,E){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y(E.getEvent()),E.consume())})});var F=function(J){return mxUtils.convertPoint(b.container,mxEvent.getClientX(J),mxEvent.getClientY(J))},G=function(J){for(v.push(J);v.length>l;)v.shift()},N= | Base | 1 |
$scope.delete = function(foreignSource) {
bootbox.confirm('Are you sure you want to remove the requisition ' + foreignSource + '?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteRequisition(foreignSource).then(
function() { // success
growl.success('The requisition ' + foreignSource + ' has been deleted.');
},
$scope.errorHandler
);
}
});
}; | Compound | 4 |
onNodeTextChange: function(node, text, oldText) {
if (node.attributes && node.attributes.filterPanel) {
node.attributes.filterPanel.setTitle(text);
}
}, | Base | 1 |
{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ja(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ka(a,e);return N(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});
if(i===k)return a.iDrawError!=e&&null===j&&(K(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function La(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b= | Base | 1 |
r=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var A=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),E=this;this.graph.cellRenderer.redraw=function(D,B,v){if(null!=D){var y=x.get(D.cell);if(null!=y&&(y=g.getBoundingBox(y,!1),null!=y&&0<y.width&&0<y.height&&!mxUtils.intersects(A,y))||!E.isCellVisible(D.cell))return}u.apply(this,
arguments)}}a=null;try{var C=[this.getRoot()];a=new mxTemporaryCellStates(g,c,C,null,mxUtils.bind(this,function(D){return this.getLinkForCellState(D)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)C=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position= | Base | 1 |
mxUtils.getOffset(l.container),U=l.view.translate,X=l.view.scale,u=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:u,x:Math.round((M.getX()-W.x+l.container.scrollLeft)/X-U.x),y:Math.round((M.getY()-W.y+l.container.scrollTop)/X-U.y)})}}function n(M,W){var U=null!=b.currentPage?b.currentPage.getId():null;if(null!=M&&null!=M.cursor&&null!=M.lastCursor)if(null!=M.lastCursor.hide||!b.isShowRemoteCursors()||null!=M.lastCursor.pageId&&M.lastCursor.pageId!=U)M.cursor.style.display="none";
else{U=function(){var N=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-M.cursor.clientWidth,E)),Q=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-M.cursor.clientHeight,J));T.style.opacity=N!=E||Q!=J?0:1;M.cursor.style.left=N+"px";M.cursor.style.top=Q+"px";M.cursor.style.display=""};var X=l.view.translate,u=l.view.scale,E=(X.x+M.lastCursor.x)*u+8,J=(X.y+M.lastCursor.y)*u-12,T=M.cursor.getElementsByTagName("img")[0];
W?(mxUtils.setPrefixedStyle(M.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(T.style,"transition","all 600ms ease-out"),window.setTimeout(U,0)):(mxUtils.setPrefixedStyle(M.cursor.style,"transition",null),mxUtils.setPrefixedStyle(T.style,"transition",null),U())}}function v(M,W){function U(){if(null==y[u]){var Y=t[u];null==Y&&(Y=p%x.length,t[u]=Y,p++);var ba=x[Y];Y=11<Y?"black":"white";y[u]={cursor:document.createElement("div"),color:ba,selection:{}};I[W]=u;E=y[u].cursor;E.style.pointerEvents= | Base | 1 |
T[N],"cells"),this.updateCustomLinkAction(u,T[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,E,J){if(null!=E&&null!=E[J]){for(var T=[],N=0;N<E[J].length;N++)if("*"==E[J][N])T.push(E[J][N]);else{var Q=u[E[J][N]];null!=Q?""!=Q&&T.push(Q):T.push(E[J][N])}E[J]=T}};Graph.prototype.getCellsForAction=function(u,E){E=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,E));if(null!=u.excludeCells){for(var J=[],T=0;T<E.length;T++)0>u.excludeCells.indexOf(E[T].id)&&J.push(E[T]); | Class | 2 |
function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {
var unwatch = scope.$watch(function constantWatch(scope) {
unwatch();
return parsedExpression(scope);
}, listener, objectEquality);
return unwatch;
} | Class | 2 |
setup: function () {
var data = this.model.get('data') || {};
this.emailId = data.emailId;
this.emailName = data.emailName;
if (
this.parentModel
&&
(this.model.get('parentType') == this.parentModel.name && this.model.get('parentId') == this.parentModel.id)
) {
if (this.model.get('post')) {
this.createField('post', null, null, 'views/stream/fields/post');
this.hasPost = true;
}
if ((this.model.get('attachmentsIds') || []).length) {
this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple');
this.hasAttachments = true;
}
}
this.messageData['email'] = '<a href="#Email/view/' + data.emailId + '">' + data.emailName + '</a>';
this.messageName = 'emailReceived';
if (data.isInitial) {
this.messageName += 'Initial';
}
if (data.personEntityId) {
this.messageName += 'From';
this.messageData['from'] = '<a href="#'+data.personEntityType+'/view/' + data.personEntityId + '">' + data.personEntityName + '</a>';
}
if (this.model.get('parentType') === data.personEntityType && this.model.get('parentId') == data.personEntityId) {
this.isThis = true;
}
if (this.isThis) {
this.messageName += 'This';
}
this.createMessage();
}, | Base | 1 |
fa,la,ra){R.addItem(la,null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(O,la,ra);O.showDialog(u.container,620,420,!0,!1);u.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,fa){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(fa):Q(R,fa,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<X.getSelectionCount()?(O.appendChild(ea),ea.innerHTML="Selected: "+X.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized? | Class | 2 |
(q.parentNode.removeChild(q),q=null)});null!=X&&null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(X,function(J){E(J,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(K,W)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(J){4==J.readyState&&(this.spinner.stop(),200<=J.status&&299>=J.status?E(J.responseText,"text/xml"):this.handleError({message:mxResources.get(413==J.status?"drawingTooLarge":"invalidOrMissingFile")},
mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):E(K,F)}}));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(y,"dragleave",function(P){y.style.cursor="";y.style.backgroundColor="";P.stopPropagation();P.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));B.insertBefore(I,B.firstChild);mxEvent.addListener(I,"click",L);mxEvent.addListener(y, | Class | 2 |
this.resolvedFontCss&&this.addFontCss(Ba,this.resolvedFontCss),Ka.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}catch(Ia){null!=P&&P(Ia)}});this.embedExtFonts(mxUtils.bind(this,function(Ia){try{null!=Ia&&this.addFontCss(Ba,Ia),this.loadFonts(Oa)}catch(Ea){null!=P&&P(Ea)}}))}catch(Ia){null!=P&&P(Ia)}}),I,Z)}catch(Ba){null!=P&&P(Ba)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var t=u,D=0;8>D;D++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[u]=t;Editor.updateCRC=function(p,C,I,T){for(var P=
0;P<T;P++)p=Editor.crcTable[(p^C.charCodeAt(I+P))&255]^p>>>8;return p};Editor.crc32=function(p){for(var C=-1,I=0;I<p.length;I++)C=C>>>8^Editor.crcTable[(C^p.charCodeAt(I))&255];return(C^-1)>>>0};Editor.writeGraphModelToPng=function(p,C,I,T,P){function O(Z,ea){var aa=da;da+=ea;return Z.substring(aa,da)}function R(Z){Z=O(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}p=p.substring(p.indexOf(",")+ | Base | 1 |
"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(E))});this.editor.graph.mathEnabled&&this.editor.addMathCss(F);var J=mxUtils.bind(this,function(E){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(E,N,this.thumbImageCache)):N(E)});n?this.embedFonts(F,J):(this.editor.addFontCss(F),J(F))}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(c,e,g,k,m,q,v){return this.addCheckbox(c,g,k,m,q,v,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,k,m,q,v,
x){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();A.id=v;null!=x&&A.setAttribute("name",x);g&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);k&&A.setAttribute("disabled","disabled");q&&(c.appendChild(A),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return A};EditorUi.prototype.addEditButton=function(c, | Class | 2 |
EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
return this.editor.exportToCanvas(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); | Base | 1 |
m,!1)});l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){v(b.editor.graph,f,!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);b.editor.cancelFirst||e.appendChild(u);c.appendChild(e);D.appendChild(c);t.appendChild(D);this.container=t},CustomDialog=function(b,f,l,d,u,t,D,c,e,g,k){var m=document.createElement("div");m.appendChild(f);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=D&&q.appendChild(D);b.isOffline()||
null==t||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(t)}),f.className="geBtn",q.appendChild(f));e=mxUtils.button(e||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});e.className="geBtn";c&&(e.style.display="none");b.editor.cancelFirst&&q.appendChild(e);u=mxUtils.button(u||mxResources.get("ok"),mxUtils.bind(this,function(){g||b.hideDialog(null,null,this.container);if(null!=l){var v=l();if("string"===typeof v){b.showError(mxResources.get("error"),v);return}}g&&b.hideDialog(null,
null,this.container)}));q.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,x,A){v=mxUtils.button(v,function(z){x(z)});null!=A&&v.setAttribute("title",A);v.className="geBtn";q.appendChild(v)})(k[c][0],k[c][1],k[c][2]);m.appendChild(q);this.cancelBtn=e;this.okButton=u;this.container=m},TemplatesDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,x){function A(fa){Ia.innerHTML=mxUtils.htmlEntities(fa);Ia.style.display="block"; | Class | 2 |
ca.model.setRoot(na.root)}ma=wa(ca,ma,pa!=ia);ca!=N&&ca.container.parentNode.removeChild(ca.container)}}else ma=wa(N);null==ma?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(ma.mathEnabled&&(ia=ma.wnd.document,ya&&(ma.wnd.IMMEDIATE_PRINT=!0),ia.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ma.closeDocument(),!ma.mathEnabled&&ya&&PrintDialog.printPreview(ma));null!=xa&&(N.shapeForegroundColor=ha,N.shapeBackgroundColor=da,N.stylesheet=
xa,N.refresh())}}var N=u.editor.graph,Q=document.createElement("div"),R=document.createElement("h3");R.style.width="100%";R.style.textAlign="center";R.style.marginTop="0px";mxUtils.write(R,E||mxResources.get("print"));Q.appendChild(R);var Y=1,ba=1;R=document.createElement("div");R.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ea=document.createElement("input");ea.style.cssText="margin-right:8px;margin-bottom:8px;";ea.setAttribute("value","all");ea.setAttribute("type", | Base | 1 |
'" y="'+u.y.toFixed(2)+'"/>'):U+('<line x="'+u.x.toFixed(2)+'" y="'+u.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;F=new mxCell("",new mxGeometry(H/U-X.x,V/U-X.y,K/U,S/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}B&&
b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}t(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,F){K=F.getProperty("eventName");F=F.getProperty("event");K==mxEvent.MOUSE_MOVE&&y&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(K,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(K=F.getEvent(),y&&!mxEvent.isPopupTrigger(K)&&!mxEvent.isMultiTouchEvent(K))){var H= | Class | 2 |
Client.prototype.subsys = function(name, cb) {
if (!this._sock
|| !this._sock.writable
|| !this._sshstream
|| !this._sshstream.writable)
throw new Error('Not connected');
return openChannel(this, 'session', function(err, chan) {
if (err)
return cb(err);
reqSubsystem(chan, name, function(err, stream) {
if (err)
return cb(err);
cb(undefined, stream);
});
});
}; | Base | 1 |
!function(a,b,c){function d(b,c){this.element=a(b),this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0,doubleTapToGo:!1};d.prototype={init:function(){var b=this.element,d=this.settings.toggle,f=this;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),f.settings.doubleTapToGo&&b.find("li.active").has("ul").children("a").addClass("doubleTapToGo"),b.find("li").has("ul").children("a").on("click."+e,function(b){return b.preventDefault(),f.settings.doubleTapToGo&&f.doubleTapToGo(a(this))&&"#"!==a(this).attr("href")&&""!==a(this).attr("href")?(b.stopPropagation(),void(c.location=a(this).attr("href"))):(a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),void(d&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")))})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]-->",e[0];)return b>4?b:a},doubleTapToGo:function(a){var b=this.element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},remove:function(){this.element.off("."+e),this.element.removeData(e)}},a.fn[e]=function(b){return this.each(function(){var c=a(this);c.data(e)&&c.data(e).remove(),c.data(e,new d(this,b))}),this}}(jQuery,window,document); | Base | 1 |
f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,x,A,z,L){function M(pa){null!=pa&&(Fa=xa=pa?135:140);pa=!0;if(null!=Ma)for(;H<Ma.length&&(pa||0!=mxUtils.mod(H,30));){var sa=Ma[H++];sa=K(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);pa&&sa.click();pa=!1}}function n(){if(Y&&null!=v)l||b.hideDialog(),v(Y,ha,E.value);else if(d)l||b.hideDialog(),d(O,E.value,da,T);else{var pa=E.value;null!=pa&& | Base | 1 |
uploads.upload = async function (socket, data) {
const methodToFunc = {
'user.uploadCroppedPicture': socketUser.uploadCroppedPicture,
'user.updateCover': socketUser.updateCover,
'groups.cover.update': socketGroup.cover.update,
};
if (!socket.uid || !data || !data.chunk || !data.params || !data.params.method || !methodToFunc[data.params.method]) {
throw new Error('[[error:invalid-data]]');
}
inProgress[socket.id] = inProgress[socket.id] || {};
const socketUploads = inProgress[socket.id];
const { method } = data.params;
socketUploads[method] = socketUploads[method] || { imageData: '' };
socketUploads[method].imageData += data.chunk;
try {
const maxSize = data.params.method === 'user.uploadCroppedPicture' ?
meta.config.maximumProfileImageSize : meta.config.maximumCoverImageSize;
const size = image.sizeFromBase64(socketUploads[method].imageData);
if (size > maxSize * 1024) {
throw new Error(`[[error:file-too-big, ${maxSize}]]`);
}
if (socketUploads[method].imageData.length < data.params.size) {
return;
}
data.params.imageData = socketUploads[method].imageData;
const result = await methodToFunc[data.params.method](socket, data.params);
delete socketUploads[method];
return result;
} catch (err) {
delete inProgress[socket.id];
throw err;
}
}; | Variant | 0 |
H.x+" "+H.y;S="";c=[];for(U=2;U<v.length;U+=2)H=N(U),S+=" L"+H.x+" "+H.y,c.push(H);d.setAttribute("d",t+S)}m&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));E.consume()}}),mouseUp:mxUtils.bind(this,function(J,E){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y(E.getEvent()),E.consume())})});var F=function(J){return mxUtils.convertPoint(b.container,mxEvent.getClientX(J),mxEvent.getClientY(J))},G=function(J){for(v.push(J);v.length>l;)v.shift()},N= | Class | 2 |
0;N<T;N++)u=Editor.crcTable[(u^E.charCodeAt(J+N))&255]^u>>>8;return u};Editor.crc32=function(u){for(var E=-1,J=0;J<u.length;J++)E=E>>>8^Editor.crcTable[(E^u.charCodeAt(J))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(u,E,J,T,N){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function R(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}u=u.substring(u.indexOf(",")+ | Base | 1 |
e: function (str) {
return new(tree.Anonymous)(str instanceof tree.JavaScript ? str.evaluated : str);
}, | Class | 2 |
ka&&null!=ka.message?ka.message:mxResources.get("disconnected")));mxEvent.consume(U)}));ea.setAttribute("title",X);O.style.paddingRight="4px";O.appendChild(ea)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=this.shareButton){var O=this.shareButton;O.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage=
"url("+Editor.shareImage+")";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var O=document.createElement("div"); | Base | 1 |
"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+
"')");F.innerHTML="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q); | Base | 1 |
"insertLink","-"],X),B.menus.addSubmenu("insertLayout",V,X,mxResources.get("layout")),B.menus.addSubmenu("insertAdvanced",V,X,mxResources.get("advanced"))):(W.apply(this,arguments),B.menus.addSubmenu("table",V,X))}})();var S="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),U=function(Q,W,V,X){Q.addItem(V,null,mxUtils.bind(this,function(){var p=new CreateGraphDialog(B,V,X);B.showDialog(p.container,620,420,!0,!1);p.init()}),W)};this.put("insertLayout", | Class | 2 |
function(u,E,J,T){for(var N=0;N<u.length;N++)this.highlightCell(u[N],E,J,T)};Graph.prototype.highlightCell=function(u,E,J,T,N){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;u=this.view.getState(u);var Q=null;null!=u&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+N),Q=new mxCellHighlight(this,E,N,!1),null!=T&&(Q.opacity=T),Q.highlight(u),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),
Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},J));return Q};Graph.prototype.addSvgShadow=function(u,E,J,T){J=null!=J?J:!1;T=null!=T?T:!0;var N=u.ownerDocument,Q=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");Q.setAttribute("id",this.shadowId);var R=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");R.setAttribute("in","SourceAlpha");R.setAttribute("stdDeviation", | Base | 1 |
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)} | Base | 1 |
setup: function () {
var data = this.model.get('data') || {};
this.userId = data.userId;
this.messageData['entityType'] = (this.translate(data.entityType, 'scopeNames') || '').toLowerCase();
this.messageData['user'] = '<a href="#User/view/' + data.userId + '">' + data.userName + '</a>';
this.messageData['entity'] = '<a href="#'+data.entityType+'/view/' + data.entityId + '">' + data.entityName + '</a>';
this.createMessage();
} | Base | 1 |
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)} | Class | 2 |
arguments);for(ua=0;ua<pa.length;ua++)!T&&this.model.contains(pa[ua])&&0==this.model.getChildCount(pa[ua])&&this.model.remove(pa[ua]);T&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),Ya)}finally{this.model.endUpdate()}return Ya};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var ca=this.model.getParent(z[T]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&& | Class | 2 |
!this.editor.editable&&(A.getHash=function(){return"G"+x},window.location.hash="#"+A.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var x=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=k,z=k.lastIndexOf("."),L=A.lastIndexOf("/");z>L&&0<L&&(A=A.substring(L+1,z),z=k.substring(z), | Base | 1 |
getAndCreate = function(path, object, defaultValue) {
var aPath, key, value;
if (object == null) {
return;
}
if (!isObject(object)) {
return;
}
aPath = ("" + path).split(".");
value = object;
key = aPath.shift();
if (key === 'constructor' && typeof object[key] === 'function') {
return object;
}
if (key === '__proto__') {
return object;
}
while (key) {
key = key.replace("%2E", ".");
if (value[key] == null) {
value[key] = {};
}
if (aPath.length === 0) {
if (defaultValue != null) {
value[key] = defaultValue;
}
}
value = value[key];
key = aPath.shift();
}
return value;
}; | Variant | 0 |
var F=this.editorUi,G=F.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(J,E){F.setSketchMode(!Editor.sketchMode);null!=E&&mxEvent.isShiftDown(E)||G.updateCellStyles({sketch:J?"1":null},G.getVerticesAndEdges())},{install:function(J){this.listener=function(){J(Editor.sketchMode)};F.addListener("sketchModeChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});B.appendChild(N)}return B}; | Class | 2 |
var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,E,K){function T(){for(var ma=S.getSelectionCells(),Aa=[],Da=0;Da<ma.length;Da++)S.isCellVisible(ma[Da])&&Aa.push(ma[Da]);S.setSelectionCells(Aa)}function P(ma){S.setHiddenTags(ma?[]:Y.slice());T();S.refresh()}function Q(ma,Aa){da.innerHTML="";if(0<ma.length){var Da=document.createElement("table"); | Base | 1 |
KeyboardAuthContext.prototype._cleanup = function() {
this._stream.removeListener('USERAUTH_INFO_RESPONSE', this._onInfoResponse);
}; | Base | 1 |
function ASTInterpreter(astBuilder, $filter) {
this.astBuilder = astBuilder;
this.$filter = $filter;
} | Class | 2 |
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)} | Base | 1 |
"&from="+q;break}q=z.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:z.getExportVariables()};A&&(p.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+C+D+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title): | Base | 1 |
readEntries = function(dirReader) {
var toArray = function(list) {
return Array.prototype.slice.call(list || []);
};
var readFile = function(fileEntry, callback) {
var dfrd = $.Deferred();
if (typeof fileEntry == 'undefined') {
dfrd.reject('empty');
} else if (fileEntry.isFile) {
fileEntry.file(function (file) {
dfrd.resolve(file);
}, function(e){
dfrd.reject();
});
} else {
dfrd.reject('dirctory');
}
return dfrd.promise();
};
dirReader.readEntries(function (results) {
if (!results.length) {
var len = entries.length - 1;
var read = function(i) {
readFile(entries[i]).done(function(file){
if (! (fm.OS == 'win' && file.name.match(/^(?:desktop\.ini|thumbs\.db)$/i))
&&
! (fm.OS == 'mac' && file.name.match(/^\.ds_store$/i))) {
paths.push(entries[i].fullPath);
files.push(file);
}
}).fail(function(e){
if (e == 'dirctory') {
// dirctory
dirctorys.push(entries[i]);
} else if (e == 'empty') {
// dirctory is empty
} else {
// why fail?
}
}).always(function(){
processing--;
if (i < len) {
processing++;
read(++i);
}
});
};
processing++;
read(0);
processing--;
} else {
entries = entries.concat(toArray(results));
readEntries(dirReader);
}
});
}, | Base | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.