code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
function(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(k)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,k,m){this.isLocalFileSave()?
this.saveLocalFile(g,c,k,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(q,v){return this.createEchoRequest(g,q,k,m,e,v)}),g,m,k)};EditorUi.prototype.saveRequest=function(c,e,g,k,m,q,v){v=null!=v?v:!mxClient.IS_IOS||!navigator.standalone;var x=this.getServiceCount(!1);isLocalStorage&&x++;var A=4>=x?2:6<x?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(z,L){if("_blank"==L||null!=z&&0<z.length){var M=g("_blank"==L?null:z,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1"); | Base | 1 |
mxTooltipHandler.prototype.reset=function(a,b,c){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),c=null!=c?c:this.getStateForEvent(a),b&&this.isEnabled()&&null!=c&&(null==this.div||"hidden"==this.div.style.visibility)){var d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()&&!this.graph.isMouseDown){var k=
this.graph.getTooltip(c,d,e,f);this.show(k,e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden",this.div.innerHTML="")}; | Base | 1 |
function addDateMinutes(date, minutes) {
date = new Date(date.getTime());
date.setMinutes(date.getMinutes() + minutes);
return date;
} | 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")},
qa=I;I=null;"boolean"!==typeof ca&&(ca=qa.isExternal&&m);1==fa?g(qa.url,qa):ca?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ba()):(Ba.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",fa=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),fa=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),ba,fa,function(oa){var na=null!=oa&&0<oa.length;return na&&x?(ba(oa),!1):
na},null,null,null,ma,v?null:[]),b.showDialog(fa.container,350,80,!0,!0),fa.init())}}function K(fa){Ba.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||fa?"create":"copy"));fa=fa?"none":"";m&&(Ka.style.display=fa);for(var ca=Q.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<ca.length;ba++)ca[ba].style.display=fa}function B(fa,ca,ba,ja,ia){ia||(aa.innerHTML="",n(),R=fa,Y=ja);var ma=null;if(ba){ma=document.createElement("table");ma.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"), | Base | 1 |
"checked"),M.style.visibility="visible"):A.setAttribute("checked","checked")):l=null}else l=null}catch(I){}v.style=x+(l?l:u());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,B);k.addListener(mxEvent.CELLS_RESIZED,B);var X=k.graphHandler.mouseUp,p=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){X.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){p.apply(this,arguments);g.style.backgroundColor=""};k.dblClick= | Class | 2 |
if(p||q){var J=[],V=null,U=null,X=null,t=function(fa){W.setAttribute("disabled","disabled");for(var sa=0;sa<J.length;sa++)J[sa].className=sa==fa?"geBtn gePrimaryBtn":"geBtn"};N=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Aa.style.display="";ja.style.display="";Z.style.left="160px";t(0);Z.scrollTop=0;Z.innerHTML="";H=0;V!=Ma&&(Ma=V,oa=U,Ka=X,Aa.innerHTML="",B(),V=null)}); | Base | 1 |
"checked"),M.style.visibility="visible"):A.setAttribute("checked","checked")):l=null}else l=null}catch(I){}v.style=x+(l?l:u());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,B);k.addListener(mxEvent.CELLS_RESIZED,B);var X=k.graphHandler.mouseUp,p=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){X.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){p.apply(this,arguments);g.style.backgroundColor=""};k.dblClick= | Base | 1 |
n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var D=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(D,G)},z);P&&t.apply(D,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, | Base | 1 |
0;g<q;g++)a[f+g][o+j]={cell:e,unique:u},a[f+g].nTr=d}e=e.nextSibling}}}function qa(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],fa(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function ra(a,b,c){v(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,
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=
b;v(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(o,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(o,g)),g.data=f)}function lb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,!0),ra(a,ub(a),function(b){vb(a,b)}),!1):!0}function ub(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,o, | Base | 1 |
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=
{};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=La(f);for(var i=0,o=j.length;i<o;i++){f=j[i].match(da);g=j[i].match(V);if(f){j[i]=j[i].replace(da,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=
j.join(".");if(h.isArray(a)){i=0;for(o=a.length;i<o;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(V,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")|| | Base | 1 |
$scope.add = function() {
bootbox.prompt('Please enter the name for the new requisition', function(foreignSource) {
if (foreignSource) {
// Validate Requisition
if (foreignSource.match(/[/\\?:&*'"]/)) {
bootbox.alert('Cannot add the requisition ' + foreignSource + ' because the following characters are invalid:<br/>:, /, \\, ?, &, *, \', "');
return;
}
var r = $scope.requisitionsData.getRequisition(foreignSource);
if (r) {
bootbox.alert('Cannot add the requisition ' + foreignSource+ ' because there is already a requisition with that name');
return;
}
// Create Requisition
RequisitionsService.addRequisition(foreignSource).then(
function(r) { // success
growl.success('The requisition ' + r.foreignSource + ' has been created.');
},
$scope.errorHandler
);
}
});
}; | Base | 1 |
EditorUi.prototype.updateCssForMarker=function(b,e,k,n,D){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerHTML="";"flexArrow"==k?b.className=null!=n&&n!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(n,D),null!=k?(n=document.createElement("img"),n.style.position="absolute",n.style.marginTop="0.5px",n.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(n.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
(n.style.filter="invert(100%)"),b.appendChild(n)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))}; | Base | 1 |
ma);H.moveCells(ma,N,W)},!0,u);u=null}else if("organic"==P||"auto"==P&&ma.length>y.length){H.view.validate();var wa=new mxFastOrganicLayout(H);wa.forceConstant=3*fa;wa.disableEdgeStyle=!1;wa.resetEdges=!1;var Ea=wa.isVertexIgnored;wa.isVertexIgnored=function(Da){return Ea.apply(this,arguments)||0>mxUtils.indexOf(y,Da)};this.executeLayout(function(){wa.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=u&&u()}}catch(Da){this.handleError(Da)}};EditorUi.prototype.getSearch= | Base | 1 |
function(){try{var O=I.width,t=I.height;if(0==O&&0==t){var z=A.result,L=z.indexOf(","),C=decodeURIComponent(escape(atob(z.substring(L+1)))),D=mxUtils.parseXml(C).getElementsByTagName("svg");0<D.length&&(O=parseFloat(D[0].getAttribute("width")),t=parseFloat(D[0].getAttribute("height")))}k(A.result,O,t)}catch(G){l(G)}};I.src=A.result};A.onerror=function(B){l(B)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate(); | Class | 2 |
async function listVideoCaptions (req: express.Request, res: express.Response) {
const data = await VideoCaptionModel.listVideoCaptions(res.locals.videoId.id)
return res.json(getFormattedObjects(data, data.length))
} | Pillar | 3 |
notifies.prepare = function prepare() {
var translate = client.translate;
var html = '<div id="adminNotifyContent">';
var messages = client.notifies.notifies;
var messageCount = client.notifies.notifyCount;
if (messages && messages.length > 0) {
html += '<p><b>' + translate('You have administration messages') + '</b></p>';
for(var i = 0 ; i < messages.length; i++) {
/* eslint-disable-next-line security/detect-object-injection */ // verified false positive
var m = messages[i];
const ago = Math.round((Date.now() - m.lastRecorded) / 60000);
html += wrapmessage(translate(m.title), translate(m.message), m.count, ago, m.persistent);
}
} else {
if (messageCount > 0) {
html = wrapmessage(translate('Admin messages in queue'), translate('Please sign in using the API_SECRET to see your administration messages'));
} else {
html = wrapmessage(translate('Queue empty'), translate('There are no admin messages in queue'));
}
}
html += '<hr></div>';
notifies.drawer.html(html);
} | Base | 1 |
D.substring(0,11)){var K=D.indexOf(",");0<K&&(D=D.substring(0,K)+";base64,"+D.substring(K+1))}d(D,null,0,0,G,P);x.scrollTop=x.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";c.appendChild(p);this.saveBtnClickHandler=function(D,G,P,K){b.saveLibrary(D,G,P,K)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=O&&(O(),O=null);this.saveBtnClickHandler(q.value,l,m,n)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";c.appendChild(p); | Class | 2 |
k&&k(x)}}),k)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){k=k||"objects";Array.isArray(k)||(k=[k],c=[c]);m=m.transaction(k,"readwrite");m.oncomplete=e;m.onerror=g;for(var q=0;q<k.length;q++)m.objectStore(k[q]).delete(c[q])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var q=m.transaction([k],"readonly").objectStore(k).get(c);q.onsuccess=function(){e(q.result)}; | Class | 2 |
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=J){var ca=function(pa){qa.isExternal?g(qa,function(na){la(na,pa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,qa,da)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){J=qa;za.className="geTempDlgCreateBtn";da&&(Ga.className="geTempDlgOpenBtn")}, | Base | 1 |
action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,q,v){m=null!=m?m:this.maxImageSize;var x=Math.max(1,c.width),A=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,q))try{var z=Math.max(x/m,A/m);if(1<z){var L=Math.round(x/z),M=Math.round(A/z),n=document.createElement("canvas");n.width=L;n.height=M;n.getContext("2d").drawImage(c,0,0,L,M);var y= | Base | 1 |
function timezoneToOffset(timezone, fallback) {
// IE/Edge do not "understand" colon (`:`) in timezone
timezone = timezone.replace(ALL_COLONS, '');
var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
return isNumberNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
} | Class | 2 |
function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(q=mxResources.get("contactOwner"),v+=mxUtils.htmlEntities(" ("+q+": "+A.ownerEmail+")"),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(A.ownerEmail))}));this.showError(e,v,z,g,L,null,null,q,n,null,null,null,k?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
c.init()};EditorUi.prototype.confirm=function(c,e,g,k,m,q){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){v();null!=e&&e()},function(){v();null!=g&&g()},k,m,null,null,null,null,x);this.showDialog(c.container,340,46+x,!0,q);c.init()};EditorUi.prototype.showBanner=function(c,e,g,k){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!= | Base | 1 |
function process () {
var packet = packets.shift()
var done = completeParse
if (packet) {
that._handlePacket(packet, process)
} else {
completeParse = null
done()
}
} | Class | 2 |
va&&("shape"!=va||Na)&&(!Na||la||0>mxUtils.indexOf(d,va))&&(Ca=mxUtils.setStyle(Ca,va,Ra))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));Q.setStyle(J,Ca)}}finally{Q.endUpdate()}return I};n.addListener("cellsInserted",function(I,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(I,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this, | Class | 2 |
function sendReplies() {
var reply;
while (unsentGlobalRequestsReplies.length > 0
&& unsentGlobalRequestsReplies[0].type) {
reply = unsentGlobalRequestsReplies.shift();
if (reply.type === 'SUCCESS')
stream.requestSuccess(reply.buf);
if (reply.type === 'FAILURE')
stream.requestFailure();
}
} | Base | 1 |
internals.Socket.prototype._authenticate = function () {
const config = this._listener._settings.auth;
if (!config) {
return;
}
if (config.timeout) {
this.auth._timeout = setTimeout(() => this.disconnect(), config.timeout);
}
const cookies = this._ws.upgradeReq.headers.cookie;
if (!cookies) {
return;
}
this._listener._connection.states.parse(cookies, (ignoreErr, state, failed) => {
const auth = state[config.cookie];
if (auth) {
this.auth._error = this._setCredentials(auth.credentials, auth.artifacts);
}
});
}; | Class | 2 |
lex: function(text) {
this.text = text;
this.index = 0;
this.tokens = [];
while (this.index < this.text.length) {
var ch = this.text.charAt(this.index);
if (ch === '"' || ch === '\'') {
this.readString(ch);
} else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {
this.readNumber();
} else if (this.isIdentifierStart(this.peekMultichar())) {
this.readIdent();
} else if (this.is(ch, '(){}[].,;:?')) {
this.tokens.push({index: this.index, text: ch});
this.index++;
} else if (this.isWhitespace(ch)) {
this.index++;
} else {
var ch2 = ch + this.peek();
var ch3 = ch2 + this.peek(2);
var op1 = OPERATORS[ch];
var op2 = OPERATORS[ch2];
var op3 = OPERATORS[ch3];
if (op1 || op2 || op3) {
var token = op3 ? ch3 : (op2 ? ch2 : ch);
this.tokens.push({index: this.index, text: token, operator: true});
this.index += token.length;
} else {
this.throwError('Unexpected next character ', this.index, this.index + 1);
}
}
}
return this.tokens;
}, | Class | 2 |
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=J){var ca=function(pa){qa.isExternal?g(qa,function(na){la(na,pa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,qa,da)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){J=qa;za.className="geTempDlgCreateBtn";da&&(Ga.className="geTempDlgOpenBtn")}, | Base | 1 |
--S){this.spinner.stop();if(null!=x)x(U);else{var p=[];J.getModel().beginUpdate();try{for(V=0;V<U.length;V++){var C=U[V]();null!=C&&(p=p.concat(C))}}finally{J.getModel().endUpdate()}}q(p)}}),W=0;W<H;W++)mxUtils.bind(this,function(V){var X=c[V];if(null!=X){var p=new FileReader;p.onload=mxUtils.bind(this,function(C){if(null==v||v(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var I=Graph.clipSvgDataUri(C.target.result),T=I.indexOf(",");T=decodeURIComponent(escape(atob(I.substring(T+ | Class | 2 |
function(){k.checked&&(null==g||g.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===q.value?"_blank":p:null},getEditInput:function(){return k},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var y=document.createElement("div");y.style.width="100%";y.style.height="100%";y.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(y.style.border="1px solid black",
y.style.backgroundColor=q):(y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");x.innerHTML="";x.appendChild(y)}mxUtils.write(d,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic")); | Base | 1 |
function assertNotHasOwnProperty(name, context) {
if (name === 'hasOwnProperty') {
throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
}
} | Class | 2 |
OAuthServer.prototype.validateAccessToken = function(username, accessToken) {
if (!this.users[username] || this.users[username].accessToken !== accessToken || this.users[username].expiresIn < Date.now()) {
return false;
} else {
return true;
}
}; | Base | 1 |
Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(La,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";La.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ga?Ga.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Qa.src=Ga;Ra.appendChild(Qa);Pa.appendChild(Ra); | 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")}; | Base | 1 |
J.substring(0,17)&&(N[R].setAttribute("href",this.updateCustomLink(u,J)),Q=!0);Q&&this.labelChanged(E,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,E){if("data:action/json,"==E.substring(0,17))try{var J=JSON.parse(E.substring(17));null!=J.actions&&(this.updateCustomLinkActions(u,J.actions),E="data:action/json,"+JSON.stringify(J))}catch(T){}return E};Graph.prototype.updateCustomLinkActions=function(u,E){for(var J=0;J<E.length;J++){var T=E[J],N;for(N in T)this.updateCustomLinkAction(u,
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]); | Base | 1 |
if (NODE_VERSION >= 10) {
it('Dynamic import attack', (done) => {
process.once('unhandledRejection', (reason) => {
assert.strictEqual(reason.message, 'process is not defined');
done();
});
const vm2 = new VM();
vm2.run(`
(async () => {
try {
await import('oops!');
} catch (ex) {
// ex is an instance of NodeError which is not proxied;
const process = ex.constructor.constructor('return process')();
const require = process.mainModule.require;
const child_process = require('child_process');
const output = child_process.execSync('id');
process.stdout.write(output);
}
})();
`);
});
} | Variant | 0 |
z.y,t.width/L,t.height/L,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";t=new TextareaDialog(c,"Paste Data:",t,function(z){if(0<z.length)try{var L=function(K){function F(J){if(null==E[J]){if(E[J]=!0,null!=V[J]){for(;0<V[J].length;){var T=V[J].pop();F(T)}delete V[J]}}else mxLog.debug(H+": Visited: "+J)}var H=K.parentNode.id,S=K.childNodes;K={}; | Base | 1 |
function parsePath (path, sep) {
if (path.indexOf('[') >= 0) {
path = path.replace(/\[/g, '.').replace(/]/g, '')
}
return path.split(sep)
} | Class | 2 |
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var p=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),x=parseInt(m.getAttribute("height"));this.writeImageToClipboard(p,v,x,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(k){this.handleError(k)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,k){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](k)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerHTML="";else{var k= | Base | 1 |
for(ja=ma=0;ja<oa.length;ja++)if(0<oa[ja].length){na=ca[oa[ja]];var Ga={};Ja=[];if(null!=na)for(qa=0;qa<na.length;qa++)ia=na[qa],0==ma==(null==ba[ia.url])&&(Ga[ia.url]=!0,Ja.push(ia));ba=Ga;ma++}0==Ja.length?ua.innerHTML=mxResources.get("noResultsFor",[fa]):B(Ja,!0)}}function H(fa){if(da!=fa||P!=ha)z(),Aa.scrollTop=0,aa.innerHTML="",ua.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(fa)+'"',wa=null,Z?E(fa):c&&(fa?(Ea.spin(aa),V=!1,W=!0,c(fa,ra,function(){A(mxResources.get("searchFailed"));
ra([])},P?null:t)):J(P)),da=fa,ha=P}function S(fa){null!=wa&&clearTimeout(wa);13==fa.keyCode?H(Oa.value):wa=setTimeout(function(){H(Oa.value)},1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">< '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+ | Class | 2 |
Runnable.prototype.fullTitle = function(){
return this.parent.fullTitle() + ' ' + this.title;
}; | Base | 1 |
Menus.prototype.createMenubar=function(n){var y=v.apply(this,arguments);if(null!=y&&"1"!=urlParams.noLangIcon){var K=this.get("language");if(null!=K){K=y.addMenu("",K.funct);K.setAttribute("title",mxResources.get("language"));K.style.width="16px";K.style.paddingTop="2px";K.style.paddingLeft="4px";K.style.zIndex="1";K.style.position="absolute";K.style.display="block";K.style.cursor="pointer";K.style.right="17px";"atlas"==uiTheme?(K.style.top="6px",K.style.right="15px"):K.style.top="min"==uiTheme?"2px":
"0px";var B=document.createElement("div");B.style.backgroundImage="url("+Editor.globeImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="19px 19px";B.style.position="absolute";B.style.height="19px";B.style.width="19px";B.style.marginTop="2px";B.style.zIndex="1";K.appendChild(B);mxUtils.setOpacity(K,40);"1"==urlParams.winCtrls&&(K.style.right="95px",K.style.width="19px",K.style.height="19px",K.style.webkitAppRegion="no-drag",B.style.webkitAppRegion=
"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)K.style.opacity="0.85",K.style.filter="invert(100%)";document.body.appendChild(K);y.langIcon=K}}return y}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var n=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(y){if(0<y.length)try{var K=JSON.parse(y); | Class | 2 |
filters.push({'condition': 'AND', 'filters': this.filterPanels[id].getValue(), 'id': id, label: this.filterPanels[id].title});
}
}
// NOTE: always trigger a OR condition, otherwise we sould loose inactive FilterPanles
//return filters.length == 1 ? filters[0].filters : [{'condition': 'OR', 'filters': filters}];
return [{'condition': 'OR', 'filters': filters}];
}, | Base | 1 |
function onClose() {
if (arguments.length >= 3) {
assert(!self.state.clientClose,
makeMsg(self.what, 'Received multiple close events for client'));
self.state.clientClose = true;
} else {
assert(!self.state.serverClose,
makeMsg(self.what, 'Received multiple close events for server'));
self.state.serverClose = true;
}
if (self.state.clientClose && self.state.serverClose)
next();
} | Base | 1 |
n.getStatus()&&300>=n.getStatus()?(this.updateDiagram(n.getText()),L()):this.handleError({message:mxResources.get("error")+" "+n.getStatus()}))}),mxUtils.bind(this,function(n){this.handleError(n)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(z,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();z()}));L();z()}null!=e&&e()});null!=c.url&&0<c.url.length?this.editor.loadUrl(c.url,mxUtils.bind(this,function(q){m(q)}),mxUtils.bind(this,function(q){null!= | 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= | Class | 2 |
getSocket(options, callback) {
let socket = net.connect(PORT_NUMBER, 'localhost');
let errHandler = function(err) {
callback(err);
};
socket.on('error', errHandler);
socket.on('connect', function() {
socket.removeListener('error', errHandler);
callback(null, {
connection: socket
});
});
} | Base | 1 |
function(u,E,J,T,N,Q,R,Y,ba,ea){if(null!=J&&null==mxMarker.markers[J]){var Z=this.getPackageForType(J);null!=Z&&mxStencilRegistry.getStencil(Z)}return V.apply(this,arguments)};var M=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,E,J,T,N,Q){"1"==mxUtils.getValue(E.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return M.apply(this,arguments)};PrintDialog.prototype.create=function(u,E){function J(){aa.value=Math.max(1, | Base | 1 |
let sendNextByte = function() {
if (i >= bytes.length) {
return encoder.end();
}
let ord = bytes[i++];
encoder.write(Buffer.from([ord]));
setImmediate(sendNextByte);
}; | Base | 1 |
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", | Class | 2 |
render: function(relations) {
if ((! relations) || (relations.length == 0)) {
return '';
}
if (! this.recordClass) {
if (! Tine[this.foreignApp]) {
Tine.log.warn('Tine.widgets.relation.GridRenderer::render - ForeignApp not found: ' + this.foreignApp);
return '';
}
this.recordClass = Tine[this.foreignApp].Model[this.foreignModel];
}
for (var index = 0; index < relations.length; index++) {
var el = relations[index];
if (el.type == this.type && el.related_model == this.relModel) {
var record = new this.recordClass(el.related_record);
return record.getTitle();
}
}
} | Base | 1 |
function(t){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var A=function(t,z,L,C,D){t=Math.round(t);z=Math.round(z);L=Math.round(L);C=Math.round(C);x.beginPath();x.moveTo(t+.5,z+.5);x.lineTo(L+.5,C+.5);x.stroke();D&&(f?(x.save(),x.translate(t,z), | Base | 1 |
IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function V(P){if(null!=P){P.sort(function(ia,la){return new Date(ia.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<P.length;R++)V(P[R].replies)}}J.sort(function(P,R){return new Date(P.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=J;for(J=0;J<X.length;J++)V(X[J].replies), | Base | 1 |
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,
function(){return this.graph.connectionHandler.isEnabled()})};var ab=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L= | Class | 2 |
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 |
function fillUsersSelect()
{
usersSelect.innerHTML = '';
for (var i = 0; i < driveUsers.length; i++)
{
var option = document.createElement('option');
mxUtils.write(option, driveUsers[i].displayName);
option.value = i;
usersSelect.appendChild(option);
//More info (email) about the user in a disabled option
option = document.createElement('option');
option.innerHTML = ' ';
mxUtils.write(option, '<' + driveUsers[i].email + '>');
option.setAttribute('disabled', 'disabled');
usersSelect.appendChild(option);
}
//Add account option
var option = document.createElement('option');
mxUtils.write(option, mxResources.get('addAccount'));
option.value = driveUsers.length;
usersSelect.appendChild(option);
} | Base | 1 |
eb);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(eb,Da);return Da}finally{Qa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)"); | Class | 2 |
PLANT_URL+"/svg/")+function(x){r="";for(i=0;i<x.length;i+=3)r=i+2==x.length?r+m(x.charCodeAt(i),x.charCodeAt(i+1),0):i+1==x.length?r+m(x.charCodeAt(i),0,0):r+m(x.charCodeAt(i),x.charCodeAt(i+1),x.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(x){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(z){var L=new Image;L.onload=
function(){try{var M=L.width,n=L.height;if(0==M&&0==n){var y=A.result,K=y.indexOf(","),B=decodeURIComponent(escape(atob(y.substring(K+1)))),F=mxUtils.parseXml(B).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),n=parseFloat(F[0].getAttribute("height")))}g(A.result,M,n)}catch(G){k(G)}};L.src=A.result};A.onerror=function(z){k(z)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate(); | Base | 1 |
function(qb,yb){var ub=tb.apply(this,arguments);return null==ub||qb.view.graph.isCustomLink(ub)?null:ub};pa.getLinkTargetForCellState=function(qb,yb){return qb.view.graph.getLinkTargetForCell(qb.cell)};pa.drawCellState=function(qb,yb){for(var ub=qb.view.graph,vb=null!=Ta?Ta.get(qb.cell):ub.isCellSelected(qb.cell),wb=ub.model.getParent(qb.cell);!(ia&&null==Ta||vb)&&null!=wb;)vb=null!=Ta?Ta.get(wb):ub.isCellSelected(wb),wb=ub.model.getParent(wb);(ia&&null==Ta||vb)&&gb.apply(this,arguments)};pa.drawState(this.getView().getState(this.model.root), | Base | 1 |
escape: function(value) {
if (isString(value)) return '\'' + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + '\'';
if (isNumber(value)) return value.toString();
if (value === true) return 'true';
if (value === false) return 'false';
if (value === null) return 'null';
if (typeof value === 'undefined') return 'undefined';
throw $parseMinErr('esc', 'IMPOSSIBLE');
}, | Class | 2 |
O.focus();document.execCommand("selectAll",!1,null);M=function(){O.removeAttribute("contentEditable");O.style.cursor="pointer";R.title=O.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(O,"click",T);mxEvent.addListener(C,"dblclick",T);v.appendChild(C);mxEvent.addListener(C,"dragstart",function(Z){null==F&&null!=S&&(P.style.visibility="hidden",O.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",S.xml);z=D(Z);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style, | Base | 1 |
eventName: emojiUnescape(
eventModel.name ||
this._cleanTopicTitle(
eventModel.post.topic.title,
eventModel.starts_at
)
),
statusClass: `status ${eventModel.status}`,
isPublicEvent: eventModel.status === "public",
isStandaloneEvent: eventModel.status === "standalone",
canActOnEvent:
this.currentUser &&
this.state.eventModel.can_act_on_discourse_post_event,
}; | Base | 1 |
this.executeLayoutList(JSON.parse(P),function(){Fa();Ma()});u=null}else if("circle"==P){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(Da){return Qa.apply(this,arguments)||0>mxUtils.indexOf(y,Da)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ma.length==2*y.length-1&&1==ia.length){H.view.validate();var Ta=new mxCompactTreeLayout(H, | Class | 2 |
function(){function N(){d(K,X,function(){k(X);K.editComment(K.content,function(){p(X)},function(Q){l(X);N();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}N()},K.isResolved),M(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);K.deleteComment(function(N){if(!0===N){N=X.querySelector(".geCommentTxt");N.innerHTML="";mxUtils.write(N,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(N= | Class | 2 |
this.handleError(J)}return x};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(k){}};EditorUi.prototype.updatePageLinksForCell= | Base | 1 |
function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0, | Class | 2 |
function return_error(a,b){"undefined"!=typeof a&&a.slideUp(1200,function(){a.remove()});0===$(".fc_popup").size()&&$("#fc_admin_header").prepend('<div class="fc_popup" />');if("undefined"==typeof b||""==b)b="Unknown error";$(".fc_popup").html(b);var c=set_popup_title();$(".fc_popup").dialog({modal:!0,show:"fade",closeOnEscape:!0,title:c,buttons:[{text:"Ok",click:function(){$(".fc_popup").dialog("destroy")},"class":"submit"}]})} | Base | 1 |
Progress.prototype.update = function(n){
this.percent = n;
return this;
}; | 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 |
d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&Z(a);v(a,null,"column-sizing",[a])}function $(a,b){var c=aa(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function ba(a,b){var c=aa(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function ca(a){return aa(a,
"bVisible").length}function aa(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ia(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,u;e=0;for(f=b.length;e<f;e++)if(l=b[e],u=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){u[i]===k&&(u[i]=B(a,i,e,"type"));q=d[g](u[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function ib(a, | Base | 1 |
function(u,E,J){if(null!=E){var T=function(Q){if(null!=Q)if(J)for(var R=0;R<Q.length;R++)E[Q[R].name]=Q[R];else for(var Y in E){var ba=!1;for(R=0;R<Q.length;R++)if(Q[R].name==Y&&Q[R].type==E[Y].type){ba=!0;break}ba||delete E[Y]}},N=this.editorUi.editor.graph.view.getState(u);null!=N&&null!=N.shape&&(N.shape.commonCustomPropAdded||(N.shape.commonCustomPropAdded=!0,N.shape.customProperties=N.shape.customProperties||[],N.cell.vertex?Array.prototype.push.apply(N.shape.customProperties,Editor.commonVertexProperties):
Array.prototype.push.apply(N.shape.customProperties,Editor.commonEdgeProperties)),T(N.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{T(JSON.parse(u))}catch(Q){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var E= | Base | 1 |
if(jQuery)(function(jQuery){jQuery.extend(jQuery.fn,{uploadify:function(options){jQuery(this).each(function(){settings=jQuery.extend({id:jQuery(this).attr('id'),uploader:'uploadify.swf',script:'uploadify.php',expressInstall:null,folder:'',height:30,width:110,cancelImg:'cancel.png',wmode:'opaque',scriptAccess:'sameDomain',fileDataName:'Filedata',method:'POST',queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:'percentage',onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},options);var pagePath=location.pathname;pagePath=pagePath.split('/');pagePath.pop();pagePath=pagePath.join('/')+'/';var data={};data.uploadifyID=settings.id;data.pagepath=pagePath;if(settings.buttonImg)data.buttonImg=escape(settings.buttonImg);if(settings.buttonText)data.buttonText=escape(settings.buttonText);if(settings.rollover)data.rollover=true;data.script=settings.script;data.folder=escape(settings.folder);if(settings.scriptData){var scriptDataString='';for(var name in settings.scriptData){scriptDataString+='&'+name+'='+settings.scriptData[name];} | Class | 2 |
cancel: function() {
if(this.dragging) {
this._mouseUp({ target: null });
if(this.options.helper === "original") {
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
} else {
this.currentItem.show();
}
//Post deactivating events to containers
for (var i = this.containers.length - 1; i >= 0; i--){
this.containers[i]._trigger("deactivate", null, this._uiHash(this));
if(this.containers[i].containerCache.over) {
this.containers[i]._trigger("out", null, this._uiHash(this));
this.containers[i].containerCache.over = 0;
}
}
}
if (this.placeholder) {
//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
if(this.placeholder[0].parentNode) {
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
}
if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
this.helper.remove();
}
$.extend(this, {
helper: null,
dragging: false,
reverting: false,
_noFinalSort: null
});
if(this.domPosition.prev) {
$(this.domPosition.prev).after(this.currentItem);
} else {
$(this.domPosition.parent).prepend(this.currentItem);
}
}
return this;
}, | Base | 1 |
(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,d){b||(b=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(b,d).$;return a(d,b,b.document)}:a(jQuery,window,document)})(function(a){var b=a.fn.dataTable;a.extend(!0,b.defaults,{dom:'<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-tl ui-corner-tr"lfr>t<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-bl ui-corner-br"ip>', | Base | 1 |
MathJax.Hub.Register.StartupHook("Begin",function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])})}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(R,
Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};J=document.getElementsByTagName("script");if(null!=J&&0<J.length){var N=document.createElement("script");N.setAttribute("type","text/javascript");N.setAttribute("src",u);J[0].parentNode.appendChild(N)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(R){}}}; | Class | 2 |
onIgnoreTagAttr(tag, name, value) {
const forTag = allowList.attrList[tag];
if (forTag) {
const forAttr = forTag[name];
if (
(forAttr &&
(forAttr.indexOf("*") !== -1 || forAttr.indexOf(value) !== -1)) ||
(name.indexOf("data-") === 0 && forTag["data-*"]) ||
(tag === "a" &&
name === "href" &&
hrefAllowed(value, extraHrefMatchers)) ||
(tag === "img" &&
name === "src" &&
(/^data:image.*$/i.test(value) ||
hrefAllowed(value, extraHrefMatchers))) ||
(tag === "iframe" &&
name === "src" &&
allowedIframes.some((i) => {
return value.toLowerCase().indexOf((i || "").toLowerCase()) === 0;
}))
) {
return attr(name, value);
}
if (tag === "iframe" && name === "src") {
return "-STRIP-";
}
if (tag === "video" && name === "autoplay") {
// This might give us duplicate 'muted' attributes
// but they will be deduped by later processing
return "autoplay muted";
}
// Heading ids must begin with `heading--`
if (
["h1", "h2", "h3", "h4", "h5", "h6"].indexOf(tag) !== -1 &&
value.match(/^heading\-\-[a-zA-Z0-9\-\_]+$/)
) {
return attr(name, value);
}
const custom = allowLister.getCustom();
for (let i = 0; i < custom.length; i++) {
const fn = custom[i];
if (fn(tag, name, value)) {
return attr(name, value);
}
}
}
}, | Base | 1 |
this.unitListener=function(n,y){g.setUnit(y.getProperty("unit"))};x.addListener(mxEvent.SIZE,f);x.container.addEventListener("scroll",d);x.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(n){k=n;m.style.background=k.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(n,y,K,B){if(l&&4<n.height|| | Class | 2 |
mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(E.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,E.target.result,mxUtils.bind(this,function(ea,Z,fa){M(U,mxUtils.bind(this,function(){if(null!=ea&&ea.length<B){var aa=L&&this.isResampleImageSize(X.size,I)?Math.min(1,Math.min(l/Z,l/fa)):1;return p(ea,X.type,g+U*F,k+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),L,l,I,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else J=E.target.result,p(J,X.type,g+U*F,k+U*F,240,160,X.name,function(ba){M(U,function(){return ba})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*F,k+U*F,240,160,X.name,function(E){M(U,function(){return E})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?u.readAsDataURL(X):u.readAsText(X)}})(W)});if(C){C= | Class | 2 |
function(K){l=K};this.setAutoScroll=function(K){p=K};this.setOpenFill=function(K){q=K};this.setStopClickEnabled=function(K){A=K};this.setSelectInserted=function(K){B=K};this.setSmoothing=function(K){f=K};this.setPerfectFreehandMode=function(K){O=K};this.setBrushSize=function(K){I.size=K};this.getBrushSize=function(){return I.size};var t=function(K){y=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))}; | Class | 2 |
exports.escape = function(html){
return String(html)
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/</g, '<')
.replace(/>/g, '>');
}; | Base | 1 |
function(){d.find('input[type="reset"]').click();d.dialog("close")},e="reset"):(c=function(){d.submit()},e="submit");buttonsOpts.push({text:b.val(),click:c,"class":e})}),d.find(".fc_confirm_bar").hide());d.dialog({create:function(b,c){a(".ui-widget-header").removeClass("ui-corner-all").addClass("ui-corner-top")},open:function(a,b){"undefined"!=typeof functionOpen&&!1!==functionOpen&&functionOpen.call(this)},modal:!0,closeOnEscape:!0,title:b,minWidth:600,minHeight:400,buttons:buttonsOpts})})})}})(jQuery);function toTimeString(a){return(new Date(1E3*a)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0]}function TimeStringToSecs(a){a=a.split(":");return 3600*+a[0]+60*+a[1]+ +a[2]} | Base | 1 |
t)for(D=0;D<t.length;D++)t[D].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,u=this.guidesArrHor;if(null!=d){for(var t=0;t<d.length;t++)d[t].destroy();this.guidesArrVer=null}if(null!=u){for(t=0;t<u.length;t++)u[t].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function u(){var n=b.diagramContainer;m.style.top=n.offsetTop-e+"px";m.style.left=n.offsetLeft-e+"px";m.style.width=(l?0:n.offsetWidth)+e+"px";m.style.height=(l?n.offsetHeight:0)+e+"px"}function t(n,y,K){if(null!=D)return n;var B;return function(){var F=this,G=arguments,N=K&&!B;clearTimeout(B);B=setTimeout(function(){B=null;K||n.apply(F,G)},y);N&&n.apply(F,G)}}var D=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, | Class | 2 |
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,A=!0,B=!1,I={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(K){g=K};this.setAutoClose=function(K){k=K};this.setAutoInsert= | Class | 2 |
"/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 |
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=
"gray";U.style.fontSize="11px";var W=document.createElement("div");U.appendChild(W);mxUtils.write(W,J);if(null!=H&&null==b[H]){Q.style.visibility="hidden";mxUtils.setOpacity(W,10);var V=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});V.spin(U);var X=window.setTimeout(function(){null==b[H]&&(V.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(X),
mxUtils.setOpacity(W,100),Q.style.visibility="",V.stop(),S())}))}else S();B.appendChild(U);++F==m&&(mxUtils.br(B),F=0)}function M(N){var J=y.value;if(null==N||null!=J&&0<J.length)z&&b.hideDialog(),l(J,N,y)}k="1"==urlParams.noDevice?!1:k;D=null!=D?D:!0;c=null!=c?c:!0;m=null!=m?m:4;z=null!=z?z:!0;t=document.createElement("div");t.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(t);var n=document.createElement("h2");mxUtils.write(n,u||mxResources.get("create"));n.style.marginTop="0px";n.style.marginBottom= | Base | 1 |
mxUtils.bind(this,function(){0===C&&(c=U.full_path,m=J.path,v="",O(null,!0))})));k.appendChild(E)})(X[u])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==V.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&P()},mxEvent.addListener(k,"scroll",B))}),y)}}))});b?this.user?t():this.updateUser(function(){t()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){t()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,m,n,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=m;this.isResolved=n;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,m){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,m,n,v,d){DrawioComment.call(this,b,e,f,c,m,n,v);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,m){b={content:b.content};c?b.verb="resolve":m&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)}; | Class | 2 |
(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 |
[H],"{1} ago"));F.setAttribute("title",K.toLocaleDateString()+" "+K.toLocaleTimeString())}function k(K){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";K.appendChild(F);K.busyImg=F}function l(K){K.style.border="1px solid red";K.removeChild(K.busyImg)}function p(K){K.style.border="";K.removeChild(K.busyImg)}function q(K,F,H,S,V){function M(N,Q,R){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className= | Class | 2 |
y,mxUtils.bind(this,function(){var C=null;if(!n){C=parseInt(H.value);var I=parseInt(U.value);C=J.checked||C==G&&I==G?null:{from:Math.max(0,Math.min(F-1,C-1)),to:Math.max(0,Math.min(F-1,I-1))}}d.downloadFile("pdf",null,null,!Q.checked,n?!0:!J.checked&&null==C,!W.checked,null!=X&&X.checked,null,null,V.checked,null!=p&&p.checked,C)}),null,mxResources.get("export"));d.showDialog(y.container,300,K,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1< | Base | 1 |
ea.x-16;ka.y+=ea.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,X,ea){var ka=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(O.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,ea)):1==ka.getSelectionCount()?(ka.isCellFoldable(ka.getSelectionCell())&&this.addMenuItems(O,ka.isCellCollapsed(X)?["expand"]:["collapse"],null,ea),this.addMenuItems(O,["collapsible",
"-","lockUnlock","enterGroup"],null,ea),O.addSeparator(),this.addSubmenu("layout",O)):ka.isSelectionEmpty()&&ka.isEnabled()?(O.addSeparator(),this.addMenuItems(O,["editData"],null,ea),O.addSeparator(),this.addSubmenu("layout",O),this.addSubmenu("insert",O),this.addMenuItems(O,["-","exitGroup"],null,ea)):ka.isEnabled()&&this.addMenuItems(O,["-","lockUnlock"],null,ea)};var H=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(O,X,ea){H.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&& | Base | 1 |
apiUtils.sendApiError = function (res, errorNum, error) {
return res.status(errorNum).json({ success: false, error: error })
} | Base | 1 |
G&&(D.filename=G.getTitle());D.pagecount=null!=d.pages?d.pages.length:1;D.page=null!=d.currentPage?d.currentPage.getName():"";D.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return D};var O=g.getGlobalVariable;g.getGlobalVariable=function(D){var G=d.getCurrentFile();return"filename"==D&&null!=G?G.getTitle():"page"==D&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==D?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:
"pagecount"==D?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var t=g.labelLinkClicked;g.labelLinkClicked=function(D,G,P){var K=G.getAttribute("href");if(null==K||!g.isCustomLink(K)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))t.apply(this,arguments);else{if(!g.isEnabled()||null!=D&&g.isCellLocked(D.cell))g.customLinkClicked(K),g.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var D=d.defaultFilename,G=d.getCurrentFile();null!=G&&(D=null!=G.getTitle()? | Class | 2 |
function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(n,null,null,q,v,x)):(n=b.convertDataUri(n),y=null==y?120:y,K=null==K?100:K,b.hideDialog(),d(n,y,K,q,v,x))},z=function(n,y){if(null!=n){var K=u?null:g.getModel().getGeometry(g.getSelectionCell());null!=K?A(n,K.width,K.height,y):A(n,null,null,y)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder", | Class | 2 |
function Hd(a,b,c){var d={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},e=" ";return(a%100>=20||a>=100&&a%100===0)&&(e=" de "),a+e+d[c]} | Base | 1 |
v[F].apply(this,arguments);null!=G&&B.push(G)}b.sidebar.showEntries(0<B.length?B.join(";"):"",z.checked);b.hideDialog()});e.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(t),l.appendChild(e)):(l.appendChild(e),l.appendChild(t));d.appendChild(l);this.container=d},PluginsDialog=function(b,f,l,d){function u(){e=!0;if(0==c.length)D.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{D.innerHTML=
"";for(var x=0;x<c.length;x++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var z=document.createElement("span");z.className="geSprite geSprite-delete";z.style.position="relative";z.style.cursor="pointer";z.style.top="5px";z.style.marginRight="4px";z.style.display="inline-block";A.appendChild(z);mxUtils.write(A,c[x]);D.appendChild(A);mxUtils.br(D);mxEvent.addListener(z,"click",function(L){return function(){b.confirm(mxResources.get("delete")+' "'+c[L]+'"?',function(){null!=l&&
l(c[L]);c.splice(L,1);u()})}}(x))}}}var t=document.createElement("div"),D=document.createElement("div");D.style.height="180px";D.style.overflow="auto";var c=mxSettings.getPlugins().slice(),e=!1;t.appendChild(D);u();e=!1;var g=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(x){x&&0>mxUtils.indexOf(c,x)&&c.push(x);u()})}:function(){var x=document.createElement("div"),A=document.createElement("span");A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": "); | Base | 1 |
verify: function(digest, d) {
// remove padding
d = _decodePkcs1_v1_5(d, key, true);
// d is ASN.1 BER-encoded DigestInfo
var obj = asn1.fromDer(d);
// compare the given digest to the decrypted one
return digest === obj.value[1].value;
} | Base | 1 |
[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Da);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ha,K,xa){var na=v*(B+K+1),$a=A*(B+K+1);return function(){c.begin(); | Base | 1 |
function publish_callback(err, response) {
should.exist(response);
should(err.message).match(/BadNoSubscription/);
} | Base | 1 |
E=J}return E};Graph.prototype.getCellsById=function(u){var E=[];if(null!=u)for(var J=0;J<u.length;J++)if("*"==u[J]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[J]);null!=N&&E.push(N)}return E};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||
0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;for(var E=0;E<u.length;E++)if(0>mxUtils.indexOf(this.hiddenTags,u[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,E,J,T){var N=[];if(null!=u){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Q=0,R={},Y=0;Y<u.length;Y++)0<u[Y].length&&(R[u[Y]]=!0,Q++);for(Y=0;Y<E.length;Y++)if(J&&this.model.getParent(E[Y])==this.model.root||this.model.isVertex(E[Y])||this.model.isEdge(E[Y])){var ba= | Base | 1 |
(T=mxUtils.getTextContent(N[0]),T=Graph.decompress(T,null,J),0<T.length&&(u=mxUtils.parseXml(T),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(T=u.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)u=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||E||(N=null,"diagram"==u.nodeName?N=u:"mxfile"==
u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(N=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=N&&(u=Editor.parseDiagramNode(N,J)));null==u||"mxGraphModel"==u.nodeName||E&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,E){var J=mxUtils.trim(mxUtils.getTextContent(u)),T=null;0<J.length?(u=Graph.decompress(J,null,E),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(), | 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.