code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});d.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new d.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},f,g,p=0,q=function(d,e){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")}; | Base | 1 |
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(",")+ | Class | 2 |
function onUSERAUTH_INFO_REQUEST(name, instructions, lang, prompts) {
var nprompts = (Array.isArray(prompts) ? prompts.length : 0);
if (nprompts === 0) {
debug('DEBUG: Client: Sending automatic USERAUTH_INFO_RESPONSE');
return stream.authInfoRes();
}
// we sent a keyboard-interactive user authentication request and now the
// server is sending us the prompts we need to present to the user
self.emit('keyboard-interactive',
name,
instructions,
lang,
prompts,
function(answers) {
stream.authInfoRes(answers);
}
);
} | Base | 1 |
plus: function(left, right) {
return 'plus(' + left + ',' + right + ')';
}, | Class | 2 |
"12px";var M=B.getRealtimeError();B=B.getRealtimeState();var H=mxResources.get("realtimeCollaboration");1==B?(G.src=Editor.syncImage,H+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,H=null!=M&&null!=M.message?H+(" ("+M.message+")"):H+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",H);A.style.paddingRight="4px";A.appendChild(G)}}}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var A=
this.shareButton;A.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";A.className="geToolbarButton";A.innerHTML="";A.style.backgroundImage="url("+Editor.shareImage+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.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 A=document.createElement("div");A.style.display="inline-block";A.style.position="relative";A.style.marginTop="6px";A.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose? | Base | 1 |
exports.set = function(obj, path, value) {
var cachekey = 'S+' + path;
if (F.temporary.other[cachekey])
return F.temporary.other[cachekey](obj, value);
var arr = parsepath(path);
var builder = [];
for (var i = 0; i < arr.length - 1; i++) {
var type = arr[i + 1] ? (REGISARR.test(arr[i + 1]) ? '[]' : '{}') : '{}';
var p = 'w' + (arr[i][0] === '[' ? '' : '.') + arr[i];
builder.push('if(typeof(' + p + ')!==\'object\'||' + p + '==null)' + p + '=' + type + ';');
}
var v = arr[arr.length - 1];
var ispush = v.lastIndexOf('[]') !== -1;
var a = builder.join(';') + ';var v=typeof(a)===\'function\'?a(U.get(b)):a;w' + (v[0] === '[' ? '' : '.') + (ispush ? v.replace(REGREPLACEARR, '.push(v)') : (v + '=v')) + ';return v';
if ((/__proto__|constructor|prototype|eval/).test(a))
throw new Error('Potential vulnerability');
var fn = new Function('w', 'a', 'b', a);
F.temporary.other[cachekey] = fn;
fn(obj, value, path);
}; | Base | 1 |
function uploadFile(file) {
if (file.size> attachmentMaxSize) {
var message = "!!Upload should be less than " + Math.round(attachmentMaxSize/1024/1024) + " Mb!!";
onedev.server.markdown.updateUploadMessage($input, message);
} else {
var xhr = new XMLHttpRequest();
var val = $input.val();
var i=1;
var message = "[Uploading file...]";
while (val.indexOf(message) != -1) {
message = "[Uploading file" + (++i) + "...]";
}
xhr.replaceMessage = message;
if ($input.range().length == 0) {
$input.caret(message);
} else {
$input.range(message);
$input.caret($input.caret()+message.length);
}
xhr.onload = function() {
if (xhr.status == 200) {
callback("insertUrl", xhr.responseText, xhr.replaceMessage);
} else {
onedev.server.markdown.updateUploadMessage($input,
"!!" + xhr.responseText + "!!", xhr.replaceMessage);
}
};
xhr.onerror = function() {
onedev.server.markdown.updateUploadMessage($input,
"!!Unable to connect to server!!", xhr.replaceMessage);
};
xhr.open("POST", "/attachment_upload", true);
xhr.setRequestHeader("File-Name", encodeURIComponent(file.name));
xhr.setRequestHeader("Attachment-Support", attachmentSupport);
xhr.send(file);
}
} | Base | 1 |
Client.prototype.x11 = function(originAddr, originPort, cb) {
var opts = {
originAddr: originAddr,
originPort: originPort
};
return openChannel(this, 'x11', opts, cb);
}; | Base | 1 |
this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):J.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var Q=this.graph.getCellStyle(N);if(null!=Q&&"rack"==Q.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=Q.marginLeft||0;R.marginRight=Q.marginRight||0;R.marginTop=Q.marginTop||0;R.marginBottom= | Class | 2 |
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a))}; | Base | 1 |
Mocha.prototype.ui = function(name){
name = name || 'bdd';
this._ui = exports.interfaces[name];
if (!this._ui) try { this._ui = require(name); } catch (err) {};
if (!this._ui) throw new Error('invalid interface "' + name + '"');
this._ui = this._ui(this.suite);
return this;
}; | 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)} | Base | 1 |
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&& | Base | 1 |
server.onData = function(stream, session, callback) {
let chunks = [];
stream.on('data', function(chunk) {
chunks.push(chunk);
});
stream.on('end', function() {
let body = Buffer.concat(chunks);
expect(body.toString()).to.equal(message.trim().replace(/\n/g, '\r\n') + '\r\n');
callback();
});
}; | Base | 1 |
function(){return null!=q?q.readyState:3};this.getLastError=function(){return S};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(M,W){},mouseMove:function(M,W){var U,X=-1;return function(){clearTimeout(U);var u=this,E=arguments,J=function(){U=null;X=Date.now();M.apply(u,E)};Date.now()-X>W?J():U=setTimeout(J,W)}}(function(M,W){m(W)},200),mouseUp:function(M,W){m(W)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()|| | Base | 1 |
failureRedirect: '/login/index.html' + req.body.origin + (req.body.origin ? '&error' : '?error'),
failureFlash: 'Invalid username or password.'
})(req, res, next);
});
| Base | 1 |
function reqAgentFwd(chan, cb) {
var wantReply = (typeof cb === 'function');
if (chan.outgoing.state !== 'open') {
wantReply && cb(new Error('Channel is not open'));
return true;
} else if (chan._client._agentFwdEnabled) {
wantReply && cb(false);
return true;
}
chan._client._agentFwdEnabled = true;
chan._callbacks.push(function(had_err) {
if (had_err) {
chan._client._agentFwdEnabled = false;
wantReply && cb(had_err !== true
? had_err
: new Error('Unable to request agent forwarding'));
return;
}
wantReply && cb();
});
return chan._client._sshstream.openssh_agentForward(chan.outgoing.id, true);
} | Base | 1 |
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 |
"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, | Class | 2 |
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var a=this.editor.chromeless?null:this.createFooter();null!=a&&(this.footerContainer.appendChild(a),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a))}; | 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, | Base | 1 |
extMatch = function(fileName, editorExts){
if (!editorExts || !editorExts.length) {
return true;
}
var ext = fileName.replace(/^.+\.([^.]+)|(.+)$/, '$1$2').toLowerCase(),
i, l;
l = editorExts.length;
for (i = 0; i < l; i++) {
if (ext === editorExts[i].toLowerCase()) {
return true;
}
}
return false;
}; | Base | 1 |
function JSONCov(runner, output) {
var self = this
, output = 1 == arguments.length ? true : output;
Base.call(this, runner);
var tests = []
, failures = []
, passes = [];
runner.on('test end', function(test){
tests.push(test);
});
runner.on('pass', function(test){
passes.push(test);
});
runner.on('fail', function(test){
failures.push(test);
});
runner.on('end', function(){
var cov = global._$jscoverage || {};
var result = self.cov = map(cov);
result.stats = self.stats;
result.tests = tests.map(clean);
result.failures = failures.map(clean);
result.passes = passes.map(clean);
if (!output) return;
process.stdout.write(JSON.stringify(result, null, 2 ));
});
} | Base | 1 |
Graph.sanitizeHtml=function(a,c){return DOMPurify.sanitize(a,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(a){return DOMPurify.sanitize(a,{IN_PLACE:!0})}; | Base | 1 |
n.toDataURL();if(y.length<e.length){var K=document.createElement("canvas");K.width=L;K.height=M;var B=K.toDataURL();y!==B&&(e=y,x=L,A=M)}}}catch(F){}g(e,x,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode= | Base | 1 |
var doBootstrap = function() {
element = jqLite(element);
if (element.injector()) {
var tag = (element[0] === window.document) ? 'document' : startingTag(element);
// Encode angle brackets to prevent input from being sanitized to empty string #8683.
throw ngMinErr(
'btstrpd',
'App already bootstrapped with this element \'{0}\'',
tag.replace(/</,'<').replace(/>/,'>'));
}
modules = modules || [];
modules.unshift(['$provide', function($provide) {
$provide.value('$rootElement', element);
}]);
if (config.debugInfoEnabled) {
// Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
modules.push(['$compileProvider', function($compileProvider) {
$compileProvider.debugInfoEnabled(true);
}]);
}
modules.unshift('ng');
var injector = createInjector(modules, config.strictDi);
injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
function bootstrapApply(scope, element, compile, injector) {
scope.$apply(function() {
element.data('$injector', injector);
compile(element)(scope);
});
}]
);
return injector;
}; | Class | 2 |
!1;t.connectionHandler.createEdgeState=function(A){A=t.createEdge(null,null,null,null,null,D);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var c=t.getDefaultParent(),e=mxUtils.bind(this,function(A){var z=new mxCellOverlay(this.connectImage,"Add outgoing");z.cursor="hand";z.addListener(mxEvent.CLICK,function(L,M){t.connectionHandler.reset();t.clearSelection();var n=t.getCellGeometry(A),y;m(function(){y=t.insertVertex(c,null,"Entry",n.x,n.y,80,30,"rounded=1;");e(y);t.view.refresh(y); | 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"))}; | Class | 2 |
[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(V,M){var W=null!=M&&y.isTreeEdge(M);W&&0>mxUtils.indexOf(S,M)&&S.push(M);(null==M||W)&&0>mxUtils.indexOf(S,V)&&S.push(V);return null==M||W});return S};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var P=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){P.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){K.apply(this, | Class | 2 |
labels: templateInstance.topTasks.get().map((task) => task._id), | Base | 1 |
new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Pa);mxUtils.extend(Za, | Base | 1 |
20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ya);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Ua);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Ua)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ya));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Ua)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Ua)*l),c.lineTo(.5*l,(1-Ua)*l)):(c.translate((p-
l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Ua),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Ua)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(), | Base | 1 |
var callback2 = function(docList, errorMsg, searchImportCats)
{
i0 = 0;
spinner.stop();
templates = docList;
searchImportCats = searchImportCats || {};
var importListsCount = 0;
for (var cat in searchImportCats)
{
importListsCount += searchImportCats[cat].length;
}
if (errorMsg)
{
div.innerHTML = errorMsg;
}
else if (docList.length == 0 && importListsCount == 0)
{
div.innerHTML = mxUtils.htmlEntities(mxResources.get('noDiagrams', null, 'No Diagrams Found'));
}
else
{
div.innerHTML = '';
if (importListsCount > 0)
{
list.style.display = '';
div.style.left = '160px';
list.innerHTML = '';
customCatCount = 0;
categories = {'draw.io': docList};
for (var cat in searchImportCats)
{
categories[cat] = searchImportCats[cat];
}
initUi();
}
else
{
addTemplates(true);
}
}
} | Base | 1 |
labels: templateInstance.topTasks.get().map((task) => task._id), | Base | 1 |
OAuthServer.prototype.start = function(callback) {
this.server = http.createServer((req, res) => {
let data = [],
datalen = 0;
req.on('data', chunk => {
if (!chunk || !chunk.length) {
return;
}
data.push(chunk);
datalen += chunk.length;
});
req.on('end', () => {
let query = querystring.parse(Buffer.concat(data, datalen).toString()),
response = this.generateAccessToken(query.refresh_token);
res.writeHead(!response.error ? 200 : 401, {
'Content-Type': 'application/json'
});
res.end(JSON.stringify(response));
});
});
this.server.listen(this.options.port, callback);
}; | Base | 1 |
function sendPublishRequest(session, callback) {
const publishRequest = new PublishRequest({});
session.performMessageTransaction(publishRequest, function(err, response) {
callback(err, response);
});
} | Class | 2 |
Mocha.prototype.asyncOnly = function(){
this.options.asyncOnly = true;
return this;
}; | Base | 1 |
Wa,Xa,K,Ga,Ja,Ia,Ha);c.stroke()};Ea.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Ea.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Ea.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Ea.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
v):c.moveTo(ha,v)};Ea.prototype.paintNW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Ea.prototype.paintTop=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};Ea.prototype.paintNE= | Base | 1 |
document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=qa;ma.appendChild(pa);Ca.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ka(){var Ra=Ia.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ka,200)}Z=!0;var Ia=M.querySelector(".geTemplatesList");Ia.style.display="block";Ba.style.width="";Na.style.display="";Na.value="";ba=null;Ka()});fa.style.display=ha.length<=ca?"none":""}function G(ha,da,ca){function la(Qa,Ya){var Ma= | Class | 2 |
Client.prototype.openssh_forwardInStreamLocal = function(socketPath, cb) {
if (!this._sock
|| !this._sock.writable
|| !this._sshstream
|| !this._sshstream.writable)
throw new Error('Not connected');
var wantReply = (typeof cb === 'function');
var self = this;
if (!this.config.strictVendor
|| (this.config.strictVendor && RE_OPENSSH.test(this._remoteVer))) {
if (wantReply) {
this._callbacks.push(function(had_err) {
if (had_err) {
return cb(had_err !== true
? had_err
: new Error('Unable to bind to ' + socketPath));
}
self._forwardingUnix[socketPath] = true;
cb();
});
}
return this._sshstream.openssh_streamLocalForward(socketPath, wantReply);
} else if (wantReply) {
process.nextTick(function() {
cb(new Error('strictVendor enabled and server is not OpenSSH or compatible version'));
});
}
return true;
}; | Base | 1 |
this.handleError(K)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell= | Base | 1 |
"/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"==
na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(da,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Ka,
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; | Base | 1 |
c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(null!=c)try{c.close()}catch(x){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(x){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});e?c():this.handleError(v,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else m();return k};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,k=new mxGraphModel,m=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var q=0;q<c.length;q++){this.updatePageRoot(c[q]);var v=c[q].node.cloneNode(!1);v.removeAttribute("name");k.root=c[q].root; | Class | 2 |
Ya.height,Ua.y-Ya.y-Ya.height);La=mxEvent.isShiftDown(eb.getEvent());null!=Ea&&La&&(Da=Math.min(Da,Ea.height-Graph.minTableRowHeight))};za.execute=function(Ya){if(0!=Da)T.setTableRowHeight(this.state.cell,Da,!La);else if(!M.blockDelayedSelection){var Ua=T.getCellAt(Ya.getGraphX(),Ya.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Ua,Ya)}Da=0};za.reset=function(){Da=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Ta){var za=T.view.getState(Ma[Ta]),wa=T.getCellGeometry(Ma[Ta]), | Base | 1 |
process.exit = function(status){}; | Base | 1 |
"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ra);mxUtils.extend(ab,mxRectangleShape);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.isHtmlAllowed=function(){return!1};ab.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",ab); | Base | 1 |
function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient|| | Class | 2 |
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 |
"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ra);mxUtils.extend(ab,mxRectangleShape);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.isHtmlAllowed=function(){return!1};ab.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments); | Base | 1 |
null==na.viewState&&null==na.root&&u.updatePageRoot(na);null!=na.viewState&&(la=na.viewState.pageVisible,qa=na.viewState.mathEnabled,Ka=na.viewState.background,Ia=na.viewState.backgroundImage,ca.extFonts=na.viewState.extFonts);null!=Ia&&null!=Ia.originalSrc&&(Ia=u.createImageForPageLink(Ia.originalSrc,na));ca.background=Ka;ca.backgroundImage=null!=Ia?new mxImage(Ia.src,Ia.width,Ia.height,Ia.x,Ia.y):null;ca.pageVisible=la;ca.mathEnabled=qa;var Ra=ca.getGraphBounds;ca.getGraphBounds=function(){var Ja=
Ra.apply(this,arguments),Oa=this.backgroundImage;if(null!=Oa&&null!=Oa.width&&null!=Oa.height){var Pa=this.view.translate,Qa=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Pa.x+Oa.x)*Qa,(Pa.y+Oa.y)*Qa,Oa.width*Qa,Oa.height*Qa))}return Ja};var Sa=ca.getGlobalVariable;ca.getGlobalVariable=function(Ja){return"page"==Ja?na.getName():"pagenumber"==Ja?pa+1:"pagecount"==Ja?null!=u.pages?u.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ca.container);u.updatePageRoot(na); | Base | 1 |
EditorUi.prototype.setStatusText = function(value)
{
this.statusContainer.innerHTML = value;
// Wraps simple status messages in a div for styling
if (this.statusContainer.getElementsByTagName('div').length == 0)
{
this.statusContainer.innerHTML = '';
var div = this.createStatusDiv(value);
this.statusContainer.appendChild(div);
}
}; | Base | 1 |
Simditor.prototype.setValue = function(val) {
this.hidePopover();
this.textarea.val(val);
this.body.get(0).innerHTML = val;
this.formatter.format();
this.formatter.decorate();
this.util.reflow(this.body);
this.inputManager.lastCaretPosition = null;
return this.trigger('valuechanged');
}; | Base | 1 |
function processRawData(plot, series, data, datapoints){
if (!series.points.errorbars)
return;
// x,y values
var format = [
{ x: true, number: true, required: true },
{ y: true, number: true, required: true }
];
var errors = series.points.errorbars;
// error bars - first X then Y
if (errors == 'x' || errors == 'xy') {
// lower / upper error
if (series.points.xerr.asymmetric) {
format.push({ x: true, number: true, required: true });
format.push({ x: true, number: true, required: true });
} else
format.push({ x: true, number: true, required: true });
}
if (errors == 'y' || errors == 'xy') {
// lower / upper error
if (series.points.yerr.asymmetric) {
format.push({ y: true, number: true, required: true });
format.push({ y: true, number: true, required: true });
} else
format.push({ y: true, number: true, required: true });
}
datapoints.format = format;
} | Base | 1 |
La,"geMenuItem");null!=Ea?(La.style.backgroundImage="url("+Ea+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):wa||(La.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",La.style.backgroundPosition="right 6px center",La.style.backgroundRepeat="no-repeat",La.style.paddingRight="22px");return La}function X(za,wa,Ea,Da,La,Ya){var Ua=document.createElement("a");Ua.className=
"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ua.style.display="inline-block";Ua.style.boxSizing="border-box";Ua.style.height="30px";Ua.style.padding="6px";Ua.style.position="relative";Ua.style.verticalAlign="top";Ua.style.top="0px";"1"==urlParams.sketch&&(Ua.style.borderStyle="none",Ua.style.boxShadow="none",Ua.style.padding="6px",Ua.style.margin="0px");null!=U.statusContainer?V.insertBefore(Ua,U.statusContainer):V.appendChild(Ua);null!=Ya?(Ua.style.backgroundImage="url("+Ya+")",Ua.style.backgroundPosition=
"center center",Ua.style.backgroundRepeat="no-repeat",Ua.style.backgroundSize="24px 24px",Ua.style.width="34px"):mxUtils.write(Ua,za);mxEvent.addListener(Ua,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(eb){eb.preventDefault()}));mxEvent.addListener(Ua,"click",function(eb){"disabled"!=Ua.getAttribute("disabled")&&wa(eb);mxEvent.consume(eb)});null==Ea&&(Ua.style.marginRight="4px");null!=Da&&Ua.setAttribute("title",Da);null!=La&&(za=function(){La.isEnabled()?(Ua.removeAttribute("disabled"),
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"); | Base | 1 |
function onEOF() {
ending = true;
self.emit('eof');
self.emit('end');
} | Base | 1 |
function(){b.hideDialog(!0)});l.className="geBtn";c=null!=c?mxUtils.button(mxResources.get("ignore"),c):null;null!=c&&(c.className="geBtn");b.editor.cancelFirst?(x.appendChild(l),null!=c&&x.appendChild(c),x.appendChild(D),x.appendChild(t)):(x.appendChild(t),x.appendChild(D),null!=c&&x.appendChild(c),x.appendChild(l));g.appendChild(x);g.appendChild(A);this.container=g},FindWindow=function(b,f,l,d,u,t){function D(V,X,p,C){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
for(var I=0;I<X.length;I++)if("label"!=X[I].nodeName){var T=mxUtils.trim(X[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(C&&0<=T.indexOf(p)||!C&&T.substring(0,p.length)===p)||null!=V&&V.test(T))return!0}}return!1}function c(){v&&K.value?(S.removeAttribute("disabled"),U.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));K.value&&y.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}function e(V, | Base | 1 |
var T=document.createElement("tbody"),P=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(q=f.length-1;0<=q;q--){var O=function(R){var Y=new Date(R.modifiedDate),da=null;if(0<=Y.getTime()){var ha=function(ea){v.stop();D.innerHTML="";var aa=mxUtils.parseXml(ea),ua=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=ua){var la=function(Fa){null!=Fa&&(Fa=Aa(Editor.parseDiagramNode(Fa)));return Fa},Aa=function(Fa){var xa=Fa.getAttribute("background");
if(null==xa||""==xa||xa==mxConstants.NONE)xa=c.defaultPageBackgroundColor;t.style.backgroundColor=xa;(new mxCodec(Fa.ownerDocument)).decode(Fa,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Fa};Q.style.display="none";Q.innerHTML="";n=aa;y=ea;g=parseSelectFunction=null;k=0;if("mxfile"==ua.nodeName){aa=ua.getElementsByTagName("diagram");g=[];for(ea=0;ea<aa.length;ea++)g.push(aa[ea]);k=Math.min(e,g.length-1);0<g.length&&la(g[k]);if(1<g.length)for(Q.removeAttribute("disabled"),Q.style.display= | Base | 1 |
EXTENSIONS['.' + ext] = (module, filename, dirname) => {
if (vm.options.require.context !== 'sandbox') {
try {
module.exports = Contextify.readonly(host.require(filename));
} catch (e) {
throw Contextify.value(e);
}
} else {
let script;
try {
// Load module
let contents = fs.readFileSync(filename, 'utf8');
contents = vm._compiler(contents, filename);
const code = host.STRICT_MODULE_PREFIX + contents + host.MODULE_SUFFIX;
// Precompile script
script = new Script(code, {
__proto__: null,
filename: filename || 'vm.js',
displayErrors: false,
importModuleDynamically
});
} catch (ex) {
throw Contextify.value(ex);
}
const closure = script.runInContext(global, {
__proto__: null,
filename: filename || 'vm.js',
displayErrors: false,
importModuleDynamically
});
// run the script
closure(module.exports, module.require, module, filename, dirname);
}
}; | Variant | 0 |
new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Pa);mxUtils.extend(Za, | Class | 2 |
this.put("editCell",new Menu(mxUtils.bind(this,function(R,fa){var la=this.editorUi.editor.graph,ra=la.getSelectionCell();ka.call(this,R,ra,null,fa);this.addMenuItems(R,["editTooltip"],fa);la.model.isVertex(ra)&&this.addMenuItems(R,["editGeometry"],fa);this.addMenuItems(R,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(R,fa,la,ra){R.addSeparator();this.addSubmenu("editCell",R,ra,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile(); | Base | 1 |
typeof ha.getAttribute&&null!=ha.getAttribute("title")&&sa.push({img:ha.getAttribute("img"),libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;D(sa)}});var ua=function(ha,da,ca){ja.style.display="";Ea.stop();W=!1;if(U)U=!1;else if(da)aa.innerHTML=da;else{ca=ca||{};da=0;for(var la in ca)da+=ca[la].length;0==ha.length&&0==da?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):C(ha,!1,Q,0==da?null:ca)}};K(N);var xa=null;mxEvent.addListener(Na,
"keyup",S);mxEvent.addListener(Na,"search",S);mxEvent.addListener(Na,"input",S);mxEvent.addListener(za,"click",function(ha){z(!1,!1)});p&&mxEvent.addListener(Ga,"click",function(ha){z(!1,!0)});q&&mxEvent.addListener(M.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ha){z(!0)});mxEvent.addListener(M.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={}; | Base | 1 |
language: this.getConfiguration('locale').replace('_', '-'),
theme: "bootstrap",
matcher: matcher
}};
const templateResultFunc = function (state) {
console.log(state);
return jQuery('<span><span style="background-color:'+state.id+'; width: 20px; height: 20px; display: inline-block; margin-right: 10px;"> </span>' + state.text + '</span>');
};
let optionsColor = {...options, ...{
templateSelection: templateResultFunc,
templateResult: templateResultFunc
}};
jQuery(selector + ' ' + elementSelector + ':not([data-renderer=color])').select2(options);
jQuery(selector + ' ' + elementSelector + '[data-renderer=color]').select2(optionsColor);
jQuery('body').on('reset', 'form', function(event){
setTimeout(function() {
jQuery(event.target).find(elementSelector).trigger('change');
}, 10);
});
} | 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 |
value = value.replace(/href=" *javascript\:(.*?)"/gi, function(m, $1) {
return 'removed=""';
}); | Base | 1 |
this.startDrawing=function(){t(!0)};this.isDrawing=function(){return y};var z=mxUtils.bind(this,function(K){if(c){var F=d.length,H=A&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(K)}}),L=new mxCell;L.edge=!0;var C=function(){var K=b.getCurrentCellStyle(L);K=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,"#000"));"default"== | Class | 2 |
this.changeUserSettingsIndifferent = function(attr,value){
$.get(this.wwwDir+ 'user/setsettingajax/'+attr+'/'+encodeURIComponent(value)+'/(indifferent)/true');
}; | Compound | 4 |
mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(;null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;"+(null!=this.cursor?"cursor:"+this.cursor+";":""),this.node.innerHTML=""}; | Base | 1 |
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 |
"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;H.appendChild(R);mxUtils.write(H," "+F.title);l.appendChild(H);var W=function(J){if(null==J||"INPUT"!=mxEvent.getSource(J).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=F.desc){var V=document.createElement("pre");
V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);p.appendChild(V)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
J&&mxEvent.consume(J)}};mxEvent.addListener(H,"click",W);mxEvent.addListener(H,"dblclick",function(J){R.checked=!R.checked;mxEvent.consume(J)});x.push(function(){return R.checked?F.id:null});0==C&&0==I&&W()})(G.entries[I])})(B[C])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"), | Base | 1 |
c.style.width="300px";c.style.display="inline-flex";c.style.justifyContent="center";c.style.alignItems="center";c.style.position="absolute";var e=document.createElement("img");e.onload=function(){function B(){k.model.setStyle(v,x+u())}k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!1);k.setConnectable(!1);k.getRubberband().setEnabled(!1);k.graphHandler.allowLivePreview=!1;var F=k.createVertexHandler;k.createVertexHandler=function(){var I=F.apply(this,
arguments);I.livePreview=!1;return I};if(null!=l)try{if("inset"==l.substring(0,5)){var G=v.geometry,N=e.width,J=e.height,E=(300-N)/2,H=(300-J)/2,S=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(S[0]),Q=parseFloat(S[1]),W=parseFloat(S[2]),V=parseFloat(S[3]);isFinite(U)&&isFinite(Q)&&isFinite(W)&&isFinite(V)?(G.x=V/100*N+E,G.y=U/100*J+H,G.width=(100-Q)/100*N+E-G.x,G.height=(100-W)/100*J+H-G.y,"round"==S[4]?"50%"==S[5]?L.setAttribute("checked","checked"):(q=parseInt(S[5]),n.value=q,z.setAttribute("checked", | 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)} | 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 |
top : Math.max(0, parseInt((parent.height() - dialog.outerHeight())/2 - 42))+'px',
left : Math.max(0, parseInt((parent.width() - dialog.outerWidth())/2))+'px'
};
}
dialog.css(css);
}) | Base | 1 |
$.ui.ddmanager.prepareOffsets = function( t, event ) {
var isOutView = function(elem) {
if (elem.is(':hidden')) {
return true;
}
var rect = elem[0].getBoundingClientRect();
return document.elementFromPoint(rect.left, rect.top)? false : true;
}
if (event.type === 'mousedown') {
var i, d,
m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
l = m.length;
for ( i = 0; i < l; i++ ) {
d = m[ i ];
if (d.options.autoDisable && (!d.options.disabled || d.options.autoDisable > 1)) {
d.options.disabled = isOutView(d.element);
d.options.autoDisable = d.options.disabled? 2 : 1;
}
}
}
// call origin function
return origin( t, event );
}; | Base | 1 |
S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});Za.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Pa);this.graph.mathEnabled&&this.addMathCss(Pa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Pa,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Pa))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Pa,L),this.loadFonts(z)}catch(M){null!= | Class | 2 |
Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");u=U.actions.get("fullscreen");var Pa=U.actions.get("undo"),Za=U.actions.get("redo"),z=X("",Pa.funct,null,mxResources.get("undo")+" ("+Pa.shortcut+")",Pa,Editor.undoImage),L=X("",Za.funct,null,mxResources.get("redo")+" ("+Za.shortcut+")",Za,Editor.redoImage),M=X("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=W){J=function(){ma.style.display=null!=U.pages&&("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?
"inline-block":"none"};bb=function(){ma.innerHTML="";if(null!=U.currentPage){mxUtils.write(ma,U.currentPage.getName());var za=null!=U.pages?U.pages.length:1,wa=U.getPageIndex(U.currentPage);wa=null!=wa?wa+1:1;var Ea=U.currentPage.getId();ma.setAttribute("title",U.currentPage.getName()+" ("+wa+"/"+za+")"+(null!=Ea?" ["+Ea+"]":""))}};M.parentNode.removeChild(M);var T=U.actions.get("delete"),ca=X("",T.funct,null,mxResources.get("delete"),T,Editor.trashImage);ca.style.opacity="0.1";P.appendChild(ca); | Base | 1 |
protocol : $('<select/>').change(function(){
var protocol = this.value;
content.find('.elfinder-netmount-tr').hide();
content.find('.elfinder-netmount-tr-'+protocol).show();
if (typeof o[protocol].select == 'function') {
o[protocol].select(fm);
}
}) | Base | 1 |
function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" '); | Class | 2 |
items: function (schema, candidate, callback) {
if (typeof callback === 'function') {
return this.asyncItems(schema, candidate, callback);
}
if (!(schema.items instanceof Object) || !(candidate instanceof Object)) {
return;
}
var items = schema.items;
var i, l;
// If provided schema is an array
// then call validate for each case
// else it is an Object
// then call validate for each key
if (_typeIs.array(items) && _typeIs.array(candidate)) {
for (i = 0, l = items.length; i < l; i++) {
this._deeperArray(i);
this._validate(items[i], candidate[i]);
this._back();
}
}
else {
for (var key in candidate) {
if (candidate.hasOwnProperty(key)){
this._deeperArray(key);
this._validate(items, candidate[key]);
this._back();
}
}
}
} | Class | 2 |
E="")}null==J&&(J=Editor.extractGraphModelFromXref(Q));null!=J&&(J=decodeURIComponent(J.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return J};Editor.extractGraphModelFromXref=function(u){var E=u.trailer,J=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=u[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(u=u[E[1]],null!=u&&(u=u.join("\n"),J=u.substring(1,u.length-1))))));return J};Editor.extractParserError=function(u,E){var J=
null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(J=E||mxResources.get("invalidChars"),E=u[0].getElementsByTagName("div"),0<E.length&&(J=mxUtils.getTextContent(E[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(u,E){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=E))};Editor.configure=function(u,E){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors= | Base | 1 |
Oa+="@import url("+Ma+");\n":Ia+='@font-face {\nfont-family: "'+Ca+'";\nsrc: url("'+Ma+'");\n}\n'}Ka.appendChild(Ba.createTextNode(Oa+Ia));xa.getElementsByTagName("defs")[0].appendChild(Ka)}null!=la&&(this.shapeBackgroundColor=Fa,this.shapeForegroundColor=Aa,this.stylesheet=la,this.refresh());return xa};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var p=B.apply(this,arguments);if(this.mathEnabled){var C=p.drawText;p.drawText=function(I,T){if(null!=I.text&&
null!=I.text.value&&I.text.checkBounds()&&(mxUtils.isNode(I.text.value)||I.text.dialect==mxConstants.DIALECT_STRICTHTML)){var P=I.text.getContentNode();if(null!=P){P=P.cloneNode(!0);if(P.getElementsByTagNameNS)for(var O=P.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<O.length;)O[0].parentNode.removeChild(O[0]);null!=P.innerHTML&&(O=I.text.value,I.text.value=P.innerHTML,C.apply(this,arguments),I.text.value=O)}}else C.apply(this,arguments)}}return p};var F=mxCellRenderer.prototype.destroy; | Class | 2 |
!1;null!=H&&(S="1"==x.getCurrentCellStyle(H).treeMoving);return S}function t(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),S="tree"==(null!=S?S.style:x.getCellStyle(H)).containerType);return S}function D(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),x.view.getState(H),S=null!=(null!=S?S.style:x.getCellStyle(H)).childLayout);return S}function c(H){H=x.view.getState(H);if(null!=H){var S=x.getIncomingTreeEdges(H.cell);if(0<S.length&&(S=x.view.getState(S[0]),null!=S&&(S=S.absolutePoints, | 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 |
(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,za,wa){for(var Ea=[],Da=0;Da<Ta.length;Da++){var La=
Ta[Da];Ea.push(null==La?null:new mxPoint((ua+La.x+za)*ia,(ya+La.y+wa)*ia))}return Ea},M=this,T=this.graph,ca=T.model,ia=T.view.scale,ma=this.state,pa=this.selectionBorder,ua=this.state.origin.x+T.view.translate.x,ya=this.state.origin.y+T.view.translate.y;null==z&&(z=[]);var Fa=T.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Fa.length){var Ma=ca.getChildCells(Fa[0].cell,!0),Oa=T.getTableLines(this.state.cell,!1,!0),Qa=T.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Fa.length;ca++)mxUtils.bind(this, | Base | 1 |
["exportPdf"],z):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPdf"],z);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(t,["exportVsdx"],z);this.addMenuItems(t,["-","exportHtml","exportXml","exportUrl"],z);c.isOffline()||(t.addSeparator(z),this.addMenuItem(t,"export",z).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(t,z){function L(G){G.pickFile(function(P){c.spinner.spin(document.body,
mxResources.get("loading"))&&G.getFile(P,function(K){var F="data:image/"==K.getData().substring(0,11)?D(K.getTitle()):"text/xml";/\.svg$/i.test(K.getTitle())&&!c.editor.isDataSvg(K.getData())&&(K.setData(Editor.createSvgDataUri(K.getData())),F="image/svg+xml");C(K.getData(),F,K.getTitle())},function(K){c.handleError(K,null!=K?mxResources.get("errorLoadingFile"):null)},G==c.drive)},!0)}var C=mxUtils.bind(this,function(G,P,K){var F=m.view,H=m.getGraphBounds(),S=m.snap(Math.ceil(Math.max(0,H.x/F.scale- | Base | 1 |
p[C]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(p){var C=y.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[p]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var p=this.themes["default-style2"];this.defaultStylesheet=
(new mxCodec(p.ownerDocument)).decode(p)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(p,C,I,T,P,O,R,Y,da,ha,Z,ea,aa,ua){var la=null,Aa=null,Fa=null;ea||null==this.themes||"darkTheme"!=this.defaultThemeName||(la=this.stylesheet,Aa=this.shapeForegroundColor,Fa=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor= | Class | 2 |
title : this.i18n(opts.title || 'confirmReq'),
buttons : {},
close : function() {
!complete && opts.cancel.callback();
$(this).elfinderdialog('destroy');
}
},
apply = this.i18n('apllyAll'),
label, checkbox;
options.buttons[this.i18n(opts.accept.label)] = function() {
opts.accept.callback(!!(checkbox && checkbox.prop('checked')))
complete = true;
$(this).elfinderdialog('close')
};
if (opts.reject) {
options.buttons[this.i18n(opts.reject.label)] = function() {
opts.reject.callback(!!(checkbox && checkbox.prop('checked')))
complete = true;
$(this).elfinderdialog('close')
};
}
if (opts.buttons && opts.buttons.length > 0) {
$.each(opts.buttons, function(i, v){
options.buttons[self.i18n(v.label)] = function() {
v.callback(!!(checkbox && checkbox.prop('checked')))
complete = true;
$(this).elfinderdialog('close');
};
});
}
options.buttons[this.i18n(opts.cancel.label)] = function() {
$(this).elfinderdialog('close')
};
if (opts.all) {
options.create = function() {
var base = $('<div class="elfinder-dialog-confirm-applyall"/>');
checkbox = $('<input type="checkbox" />');
$(this).next().find('.ui-dialog-buttonset')
.prepend(base.append($('<label>'+apply+'</label>').prepend(checkbox)));
}
}
return this.dialog('<span class="elfinder-dialog-icon elfinder-dialog-icon-confirm"/>' + this.i18n(opts.text), options);
}, | Base | 1 |
GraphViewer.processElements = function(classname)
{
mxUtils.forEach(GraphViewer.getElementsByClassName(classname || 'mxgraph'), function(div)
{
try
{
div.innerHTML = '';
GraphViewer.createViewerForElement(div);
}
catch (e)
{
div.innerHTML = e.message;
if (window.console != null)
{
console.error(e);
}
}
});
}; | Base | 1 |
1;buttonsOpts.push({text:cattranslate("Yes"),click:function(){$.ajax({type:d,context:k,url:c,dataType:f,data:e,cache:!1,beforeSend:function(a){a.process=set_activity(b);$(".fc_popup").dialog("destroy").remove();"undefined"!=typeof g&&!1!==g&&g.call(this,a)},success:function(a,b,c){!0===a.success||0<$(a).find(".fc_success_box").size()?return_success(c.process,a.message):return_error(c.process,a.message);"undefined"!=typeof h&&!1!==h&&h.call(this,a)}})},"class":"submit"});buttonsOpts.push({text:cattranslate("No"),
click:function(){$(".fc_popup").dialog("destroy")},"class":"reset"});$(".fc_popup").dialog({modal:!0,show:"fade",closeOnEscape:!0,title:b,buttons:buttonsOpts})} | Base | 1 |
this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,J=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return J.shadowVisible},function(N){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=N;J.model.execute(Q)},{install:function(N){this.listener=function(){N(J.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption|| | Class | 2 |
module.exports.tile = function (inPath, outPath, pattern, options) {
options = options || {};
var tileSize = options.tileSize || 256;
var tmpDir = options.tmpDir || process.env.TMPDIR || '/tmp';
var tempDir = tmpDir + '/image-tiler_' + process.pid;
var zoom = 0;
var zoomToDisplay = 0;
var quality = options.quality || 100;
if (!options.invertZoom) {
var size = sizeOf(inPath);
var halvingsWidth = Math.ceil(Math.log2(Math.ceil(size.width / tileSize)));
var halvingsheight = Math.ceil(Math.log2(Math.ceil(size.height / tileSize)));
zoomToDisplay = Math.max(halvingsWidth, halvingsheight);
}
return mkdirp(tempDir)
.then(()=>tileRec(inPath, outPath, zoom, tileSize, tempDir, pattern, zoomToDisplay, options.invertZoom, quality))
.then(()=>rimraf(tempDir));
}; | Class | 2 |
(function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this); | Base | 1 |
var S=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(p=f.length-1;0<=p;p--){var P=function(T){var X=new Date(T.modifiedDate),ba=null;if(0<=X.getTime()){var ja=function(ka){v.stop();E.innerHTML="";var da=mxUtils.parseXml(ka),fa=b.editor.extractGraphModel(da.documentElement,!0);if(null!=fa){var ma=function(Ba){null!=Ba&&(Ba=ya(Editor.parseDiagramNode(Ba)));return Ba},ya=function(Ba){var Ha=Ba.getAttribute("background");
if(null==Ha||""==Ha||Ha==mxConstants.NONE)Ha=c.defaultPageBackgroundColor;u.style.backgroundColor=Ha;(new mxCodec(Ba.ownerDocument)).decode(Ba,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Ba};O.style.display="none";O.innerHTML="";K=da;q=ka;g=parseSelectFunction=null;k=0;if("mxfile"==fa.nodeName){da=fa.getElementsByTagName("diagram");g=[];for(ka=0;ka<da.length;ka++)g.push(da[ka]);k=Math.min(e,g.length-1);0<g.length&&ma(g[k]);if(1<g.length)for(O.removeAttribute("disabled"),O.style.display= | Base | 1 |
Client.prototype.unforwardIn = function(bindAddr, bindPort, cb) {
if (!this._sock
|| !this._sock.writable
|| !this._sshstream
|| !this._sshstream.writable)
throw new Error('Not connected');
// send a request to stop forwarding us new connections for a particular
// address and port
var self = this;
var wantReply = (typeof cb === 'function');
if (wantReply) {
this._callbacks.push(function(had_err) {
if (had_err) {
return cb(had_err !== true
? had_err
: new Error('Unable to unbind from '
+ bindAddr + ':' + bindPort));
}
delete self._forwarding[bindAddr + ':' + bindPort];
cb();
});
}
return this._sshstream.cancelTcpipForward(bindAddr, bindPort, wantReply);
}; | Base | 1 |
null!=sa[ua]&&(ua=sa[ua]);ua={url:oa.getAttribute("url"),libs:oa.getAttribute("libs"),title:oa.getAttribute("title"),tooltip:oa.getAttribute("name")||oa.getAttribute("url"),preview:oa.getAttribute("preview"),clibs:ua,tags:oa.getAttribute("tags")};xa.push(ua);null!=ya&&(xa=za[wa],null==xa&&(xa={},za[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ua))}oa=oa.nextSibling}S.stop();C()}})};G.appendChild(fa);G.appendChild(Ba);G.appendChild(Z);var ta=!1,ka=l;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&& | Base | 1 |
refreshTabs : function(){
"use strict";
window.console.log('refreshTabs');
var self = this;
var pltabs = '';
for(var i=0; i<this.managedPlaylists.length; i++){
var pl = this.managedPlaylists[i];
var isactive = ''
if(pl.id == this.editingPlaylist){
isactive = ' class="active" ';
} else {
isactive = ' class="playlist-tab-inactive" ';
}
pltabs += '<li '+isactive+' id="'+this.tabid2htmlid(pl.id)+'">';
var isplaying = '';
if(pl.id == this.playingPlaylist){
isplaying += '▶';
}
var isunsaved = '';
if(!pl.saved && pl.reason_open !== 'queue'){
isunsaved += ' <em>(unsaved)</em>';
}
pltabs += '<a href="#" onclick="playlistManager.showPlaylist('+pl.id+')">'+isplaying+' '+pl.name+ isunsaved;
if(pl.closable){
pltabs += '<span class="playlist-tab-closer pointer" href="#" onclick="playlistManager.closePlaylist('+pl.id+')">×</span>';
}
pltabs += '</a></li>';
}
pltabs += '<li class="playlist-tab-inactive playlist-tab-new"><a href="#" onclick="playlistManager.newPlaylist()"><b>+</b></a></li>';
$(self.cssSelectorPlaylistChooser+' ul').empty()
$(self.cssSelectorPlaylistChooser+' ul').append(pltabs);
}, | Base | 1 |
context.test.only = function(title, fn){
var test = context.test(title, fn);
var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$';
mocha.grep(new RegExp(reString));
}; | Base | 1 |
module.exports = async function remote() {
const origin = await exec('git remote get-url origin');
const nosuffix = origin.replace(/\.git$/, '');
const [ match ] = nosuffix.match(/[\w-]*\/[\w-]+$/) || [ nosuffix ];
const [ name, owner = '' ] = match.split('/').reverse();
return { name, owner };
}; | Base | 1 |
function(B){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=B?B:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var z=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(), | 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"))}; | 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.