code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
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]); | Class | 2 |
function oneTimeWatch(scope) {
return parsedExpression(scope);
} | Class | 2 |
Mocha.prototype.globals = function(globals){
this.options.globals = (this.options.globals || []).concat(globals);
return this;
}; | Base | 1 |
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)} | Class | 2 |
updateWizard: function () {
var $wizard = $('#button-wizard');
if (main.objects['system.adapter.discovery.0']) {
if (!$wizard.data('inited')) {
$wizard.data('inited', true);
$wizard/*.button({
icons: {primary: ' ui-icon-search'},
text: false
})*/.on('click', function () {
// open configuration dialog
main.navigate({
tab: 'instances',
dialog: 'config',
params: 'system.adapter.discovery.0'
});
}).attr('title', _('Device discovery'));
}
$wizard.show();
// Show wizard dialog
if (!main.systemConfig.common.wizard && main.systemConfig.common.licenseConfirmed) {
$wizard.trigger('click');
}
} else {
$wizard.hide();
}
}, | Base | 1 |
function isFunction(value) {return typeof value === 'function';} | 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, | Class | 2 |
function addToolTipToTableCell(value) {
if (value) {
return `<span class="js-tooltip" data-bs-toggle="tooltip" data-bs-placement="left" title="${value}">${value}</span>`
}
return ''
} | Base | 1 |
Graph.sanitizeHtml=function(b,e){return DOMPurify.sanitize(b,{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(b){return DOMPurify.sanitize(b,{IN_PLACE:!0})}; | Class | 2 |
labels: templateInstance.topTasks.get().map((task) => task._id),
datasets: [{
values: templateInstance.topTasks.get().map((task) => task.count),
}],
},
tooltipOptions: {
},
})
})
})
} | Base | 1 |
M.push(D);A.appendChild(D);var E=function(oa){Ba.style.display="none";fa.style.display="none";Z.style.left="30px";u(oa?-1:1);null==W&&(W=La);Z.scrollTop=0;Z.innerHTML="";S.spin(Z);var sa=function(ya,wa,ua){H=0;S.stop();La=ya;ua=ua||{};var xa=0,ha;for(ha in ua)xa+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Ba.style.display="";Z.style.left="160px";Ba.innerHTML="";
Na=0;Ca={"draw.io":ya};for(ha in ua)Ca[ha]=ua[ha];C()}else O(!0)};oa?q(J.value,sa):p(sa)};p&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){E()}),A.appendChild(D),M.push(D));if(q){D=document.createElement("span");D.style.marginLeft="10px";D.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(D);var J=document.createElement("input");J.style.marginRight="10px";J.style.marginLeft="10px";J.style.width="220px";mxEvent.addListener(J,"keypress",function(oa){13== | Class | 2 |
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(B,
C){null!=C.shortcut&&900>c&&!mxClient.IS_IOS?B.firstChild.nextSibling.setAttribute("title",C.shortcut):l.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){p.apply(this,arguments);if(null!=this.userElement){var B=this.userElement;B.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+B.style.display;B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+Editor.userImage+")";B.style.backgroundPosition="center center"; | 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= | 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 |
f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&R.headRevisionId==I&&EditorUi.debug("DriveClient: Remote Etag Changed","local",W,
"remote",R.etag,"rev",f.desc.headRevisionId,"response",[R],"file",[f]),q(Q,R)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(R){x(R)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(E){f.saveLevel=9;if(E||null==W)U(E);else{var J=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){J=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(N){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(N){window.clearTimeout(T); | Base | 1 |
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 |
function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,T,ca,ia,ma,pa,ua,ya,Fa,Ma,Oa,Qa){var Ta=null;if(null!=Qa)for(Ta=new mxDictionary,Fa=0;Fa<Qa.length;Fa++)Ta.put(Qa[Fa],!0);if(Qa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ia=null!=ia?ia:!0;ma= | Class | 2 |
b.childNodes&&0<b.childNodes.length)for(e=0;e<b.childNodes.length;e++)d.appendChild(mxUtils.importNodeImplementation(a,b.childNodes[e],c));return d;case 3:case 4:case 8:return a.createTextNode(null!=b.nodeValue?b.nodeValue:b.value)}},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument&&(a=document.implementation.createDocument("","",null));return a},parseXml:function(a){return(new DOMParser).parseFromString(a,"text/xml")},clearSelection:function(){return document.selection?
function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges()}:function(){}}(),removeWhitespace:function(a,b){for(a=b?a.previousSibling:a.nextSibling;null!=a&&a.nodeType==mxConstants.NODETYPE_TEXT;){var c=b?a.previousSibling:a.nextSibling,d=mxUtils.getTextContent(a);0==mxUtils.trim(d).length&&a.parentNode.removeChild(a);a=c}},htmlEntities:function(a,b){a= | Base | 1 |
onNodeTextChange: function(node, text, oldText) {
if (node.attributes && node.attributes.filterPanel) {
node.attributes.filterPanel.setTitle(text);
}
}, | Base | 1 |
compare = function(){
var c = '', cnt = 0, mtime = 0;
if (onlydir && polling) {
$.each(files, function(h, f) {
if (f.phash && f.phash === onlydir) {
++cnt;
mtime = Math.max(mtime, f.ts);
}
c = cnt+':'+mtime;
});
}
return c;
}, | Base | 1 |
function reject() {
if (reason === undefined) {
if (localChan === false)
reason = consts.CHANNEL_OPEN_FAILURE.RESOURCE_SHORTAGE;
else
reason = consts.CHANNEL_OPEN_FAILURE.CONNECT_FAILED;
}
self._sshstream.channelOpenFail(info.sender, reason, '', '');
} | Base | 1 |
e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(D.value)||0;F=0>F?0:100<F?100:F; | Class | 2 |
function formcheck_enrollment_code(this_DET) {
var this_button_id = this_DET.id;
var frmvalidator = new Validator("F1", this_button_id);
var sn = document.getElementById("values[new][SHORT_NAME]").value;
var t = document.getElementsByName("values[new][TYPE]")[0].value;
if (sn.trim() != "" || t != "") {
frmvalidator.addValidation(
"values[new][TITLE]",
"req",
"Title cannot be blank"
);
frmvalidator.addValidation(
"values[new][TITLE]",
"alphanumeric",
"Title allows only alphanumeric value"
);
frmvalidator.addValidation(
"values[new][TITLE]",
"maxlen=100",
"Max length for title is 100 characters"
);
} else {
frmvalidator.clearAllValidations();
}
var title = document.getElementsByName("values[new][TITLE]")[0].value;
if (title != "" && sn == "") {
frmvalidator.addValidation(
"values[new][SHORT_NAME]",
"req",
"Short name cannot be blank"
);
}
if (title != "" && t == "") {
frmvalidator.addValidation(
"values[new][TYPE]",
"req",
"Type cannot be blank"
);
}
var ar_id = document.getElementById("id_arr").value;
ar_id = ar_id.trim();
if (ar_id != 0) {
var ar_id = ar_id.split(",");
for (var i = 0; i < ar_id.length; i++) {
frmvalidator.addValidation(
"values[" + ar_id[i] + "][TITLE]",
"req",
"Title cannot be blank"
);
frmvalidator.addValidation(
"values[" + ar_id[i] + "][TITLE]",
"alphanumeric",
"Title allows only alphanumeric value"
);
frmvalidator.addValidation(
"values[" + ar_id[i] + "][TITLE]",
"maxlen=100",
"Max length for title is 100 characters"
);
frmvalidator.addValidation(
"values[" + ar_id[i] + "][SHORT_NAME]",
"req",
"Short name cannot be blank"
);
frmvalidator.addValidation(
"values[" + ar_id[i] + "][TYPE]",
"req",
"Type cannot be blank"
);
}
}
} | Base | 1 |
[];Editor.doMathJaxRender=function(R){window.setTimeout(function(){"hidden"!=R.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,R])},0)};var J=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";E=null!=E?E:{"HTML-CSS":{availableFonts:[J],imageFont:null},SVG:{font:J,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(E); | Class | 2 |
var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,E,J){function T(){for(var ja=R.getSelectionCells(),Ba=[],Ha=0;Ha<ja.length;Ha++)R.isCellVisible(ja[Ha])&&Ba.push(ja[Ha]);R.setSelectionCells(Ba)}function N(ja){R.hiddenTags=ja?[]:Y.slice();T();R.refresh()}function Q(ja,Ba){ea.innerHTML="";if(0<ja.length){var Ha=document.createElement("table"); | Base | 1 |
"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var E=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?E="mxgraph.er":"sysML"==u.substring(0,5)&&(E="mxgraph.sysml"));return E};var V=mxMarker.createMarker;mxMarker.createMarker= | Class | 2 |
const busboyOptions = deepmerge.all([{ headers: Object.assign({}, req.headers) }, options || {}, opts || {}])
const stream = busboy(busboyOptions)
let completed = false
let files = 0
req.on('error', function (err) {
stream.destroy()
if (!completed) {
completed = true
done(err)
}
})
stream.on('finish', function () {
log.debug('finished receiving stream, total %d files', files)
if (!completed) {
completed = true
setImmediate(done)
}
})
stream.on('file', wrap)
req.pipe(stream)
.on('error', function (error) {
req.emit('error', error)
})
function wrap (field, file, filename, encoding, mimetype) {
log.debug({ field, filename, encoding, mimetype }, 'parsing part')
files++
eos(file, waitForFiles)
if (field === '__proto__') {
file.destroy(new Error('__proto__ is not allowed as field name'))
return
}
handler(field, file, filename, encoding, mimetype)
}
function waitForFiles (err) {
if (err) {
completed = true
done(err)
}
}
return stream
} | Variant | 0 |
var itemClicked = function(evt)
{
if (evt == null || mxEvent.getSource(evt).nodeName != 'INPUT')
{
preview.style.textAlign = 'center';
preview.style.padding = '0px';
preview.style.color = '';
preview.innerHTML = '';
if (entry.desc != null)
{
var pre = document.createElement('pre');
pre.style.boxSizing = 'border-box';
pre.style.fontFamily = 'inherit';
pre.style.margin = '20px';
pre.style.right = '0px';
pre.style.textAlign = 'left';
mxUtils.write(pre, entry.desc);
preview.appendChild(pre);
}
if (entry.imageCallback != null)
{
entry.imageCallback(preview);
}
else if (entry.image != null)
{
preview.innerHTML += '<img border="0" src="' + entry.image + '"/>';
}
else if (entry.desc == null)
{
preview.style.padding = '20px';
preview.style.color = 'rgb(179, 179, 179)';
mxUtils.write(preview, mxResources.get('noPreview'));
}
if (currentListItem != null)
{
currentListItem.style.backgroundColor = '';
}
currentListItem = option;
currentListItem.style.backgroundColor = Editor.isDarkMode() ? '#000000' : '#ebf2f9';
if (evt != null)
{
mxEvent.consume(evt);
}
}
}; | Base | 1 |
this.shape){this.shape.stroke=0==Da?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Qa[Ta],0,Da),this.shape.updateBoundsFromLine();else{var Ya=T.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Da*ia;this.shape.bounds.x=ma.x+(Ta==Fa.length-1?0:Ya.x*ia);this.shape.bounds.width=ma.width-(Ta==Fa.length-1?0:Ya.width+Ya.x+ia)}this.shape.redraw()}};var La=!1;za.setPosition=function(Ya,Ua,eb){Da=Math.max(Graph.minTableRowHeight-
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]), | Class | 2 |
function reqEnv(chan, env) {
if (chan.outgoing.state !== 'open')
return true;
var ret = true;
var keys = Object.keys(env || {});
var key;
var val;
for (var i = 0, len = keys.length; i < len; ++i) {
key = keys[i];
val = env[key];
ret = chan._client._sshstream.env(chan.outgoing.id, key, val, false);
}
return ret;
} | Base | 1 |
exports.killByPort = function (port) {
var processId = null
try {
processId = exec(`lsof -t -i:${port}`)
} catch (e) {
}
if (processId !== null) { // if exists kill
exec(`kill ${processId}`)
}
} | Base | 1 |
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="19.0.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= | Base | 1 |
51+"px"})}).resize()})}})(jQuery);(function(a){a.fn.fc_show_popup=function(b){b=a.extend({functionOpen:!1},b);return this.each(function(){var b=a(this),e=match_class_prefix("form_",b),d=a("#"+e);b.unbind().click(function(){d.find(".fc_valid, .fc_invalid").removeClass("fc_invalid fc_valid");var b=d.find('input[name="form_title"]').val();buttonsOpts=[];0<d.find(".fc_confirm_bar").size()&&(d.find(".fc_confirm_bar input").each(function(){var b=a(this);if(b.hasClass("hidden"))var c=function(){},e="hidden";else"reset"==b.prop("type")?(c=
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 |
return res.json({ success: true, user: stripUserFields(user) })
}) | Base | 1 |
z.style.marginTop="10px";z.style.left="40px";z.style.right="40px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);g.appendChild(z);var L=new Graph(z);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var M=mxUtils.parseXml(l),n=b.editor.extractGraphModel(M.documentElement,!0),y=0,K=null,B=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
G&&null!=K&&null!=K[y]?K[y].getAttribute("name"):"pagenumber"==G?y+1:"pagecount"==G?null!=K?K.length:1:B.apply(this,arguments)};L.getLinkForCell=function(){return null};l=mxUtils.button("",function(){L.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);k=mxUtils.button("",function(){L.zoomOut()});k.className="geSprite geSprite-zoomout";k.setAttribute("title", | Base | 1 |
oauth2: new XOAuth2({
user: 'testuser',
accessToken: testtoken
})
},
function(err) {
expect(err).to.not.exist;
expect(client.authenticated).to.be.true;
done();
}
);
}); | Base | 1 |
$.fn.hideWidget = function() {
$(this).each(function() {
var widget = $(this);
// slice of the "x2widget_" from the id to get widget name
var widgetName = $(this).attr('id').slice(9);
// console.log ('widgetName = ' + widgetName);
$.post(yii.scriptUrl+'/site/hideWidget', {name: widgetName}, function(response) {
widget.slideUp(function() {
widget.remove();
if (widgetName === 'RecordViewChart') removeChartWidget ();
$('#x2-hidden-widgets-menu').replaceWith(response);
// $('.x2-widget-menu-item').draggable({revert: 'invalid', helper:'clone', revertDuration:200, appendTo:'#x2-hidden-widgets-menu',iframeFix:true});
$('.x2-hidden-widgets-menu-item').click(function() {
return handleWidgetMenuItemClick($(this));
});
$('.x2-hidden-widgets-menu-item.widget-right').click(function() {
return handleWidgetRightMenuItemClick($(this));
});
});
});
});
}; | Base | 1 |
value: self.recurse(property.value)
});
}
}); | Class | 2 |
e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,A,B,I){function O(oa){null!=oa&&(Ha=ra=oa?135:140);oa=!0;if(null!=La)for(;H<La.length&&(oa||0!=mxUtils.mod(H,30));){var sa=La[H++];sa=L(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);oa&&sa.click();oa=!1}}function t(){if(Y&&null!=x)f||b.hideDialog(),x(Y,ea,F.value);else if(c)f||b.hideDialog(),c(Q,F.value,ba,T);else{var oa=F.value;null!=oa&&
0<oa.length&&b.pickFolder(b.mode,function(sa){b.createFile(oa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=N&&0<N.length?N:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function z(oa,sa,ya,wa,ua,xa,ha){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");V.removeAttribute("disabled");Q=sa;T=ya;N=xa;R=oa;Y=wa;ba=ha;ea=ua;R.style.backgroundColor=d;R.style.border=g}function L(oa,sa,ya,wa,ua,xa,ha,da, | Base | 1 |
ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function N(Aa,ta,ka){var oa=mxUtils.getOffset(u,!0),sa=mxUtils.getOffset(Aa,!0);ta.style.position="absolute";ta.style.left=sa.x-oa.x+"px";ta.style.top=sa.y-oa.y+"px";ta.style.width=Aa.offsetWidth+"px";ta.style.height=Aa.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function Q(Aa,ta,ka){var oa=document.createElement("div");oa.style.width="32px";oa.style.height= | 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 |
this.addMenuItems(O,["copyAsImage"],null,ea)};EditorUi.prototype.toggleFormatPanel=function(O){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=O?O:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var G=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&& | Base | 1 |
eval: function (env) {
var that = this;
var value = this.value.replace(/`([^`]+)`/g, function (_, exp) {
return new(tree.JavaScript)(exp, that.index, true).eval(env).value;
}).replace(/@\{([\w-]+)\}/g, function (_, name) {
var v = new(tree.Variable)('@' + name, that.index, that.currentFileInfo).eval(env, true);
return (v instanceof tree.Quoted) ? v.value : v.toCSS();
});
return new(tree.Quoted)(this.quote + value + this.quote, value, this.escaped, this.index, this.currentFileInfo);
}, | Class | 2 |
deleteTheme: function() {
return confirm( themes.data.settings.confirmDelete );
}, | Compound | 4 |
u[E]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var E=z.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[u]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=
(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,E,J,T,N,Q,R,Y,ba,ea,Z,fa,aa,va){var ja=null,Ba=null,Ha=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ja=this.stylesheet,Ba=this.shapeForegroundColor,Ha=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor= | Base | 1 |
DotObject.prototype.copy = function (source, target, obj1, obj2, mods, merge) {
if (typeof mods === 'function' || Array.isArray(mods)) {
this.set(target,
_process(
// clone what is picked
JSON.parse(
JSON.stringify(
this.pick(source, obj1, false)
)
),
mods
), obj2, merge)
} else {
merge = mods
this.set(target, this.pick(source, obj1, false), obj2, merge)
}
return obj2
} | Class | 2 |
function isBoolean(value) {
return typeof value === 'boolean';
} | Class | 2 |
return returnValue;}},uploadifyUpload:function(ID){jQuery(this).each(function(){document.getElementById(jQuery(this).attr('id')+'Uploader').startFileUpload(ID,false);});},uploadifyCancel:function(ID){jQuery(this).each(function(){document.getElementById(jQuery(this).attr('id')+'Uploader').cancelFileUpload(ID,true,false);});},uploadifyClearQueue:function(){jQuery(this).each(function(){document.getElementById(jQuery(this).attr('id')+'Uploader').clearFileUploadQueue(false);});}})})(jQuery); | Class | 2 |
Ea.prototype.constraints=null;mxUtils.extend(Da,mxConnector);Da.prototype.origPaintEdgeShape=Da.prototype.paintEdgeShape;Da.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Da.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Da.prototype.origPaintEdgeShape.apply(this,
[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 |
this.complete = function (result) {
if (resultsBuffer.length) {
socket.emit('result', resultsBuffer)
resultsBuffer = []
}
socket.emit('complete', result || {})
if (this.config.clearContext) {
navigateContextTo('about:blank')
} else {
self.updater.updateTestStatus('complete')
}
if (returnUrl) {
if (!/^https?:\/\//.test(returnUrl)) {
throw new Error(
'Security: Navigation to '.concat(
returnUrl,
' was blocked to prevent malicious exploits.'
)
)
}
location.href = returnUrl
}
} | Base | 1 |
null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(C){}var m=function(){var C=document.createElement("div");C.className="geSidebarContainer";C.style.position="absolute";C.style.width="100%";C.style.height="100%";C.style.border="1px solid whiteSmoke";C.style.overflowX="hidden";C.style.overflowY="auto";return C},n=function(C,D,G,P,K,F,H){var S=m();H(S);this.window=new mxWindow(D,S,G,P,K,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(V,M){var W=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;V=Math.max(0,Math.min(V,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));M=Math.max(0,Math.min(M,W-U.clientHeight-2));this.getX()==V&&this.getY()==M||mxWindow.prototype.setLocation.apply(this,
arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(V){null==V&&(V=window.event);return null!=V&&C.isSelectionAllowed(V)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src; | Base | 1 |
window.ocJSON=function(json){var jsonString=parse(json);return JSON.parse(jsonString);};}(window);+function($){"use strict";if($.oc===undefined) | Base | 1 |
function allowAutoBootstrap(document) {
if (!document.currentScript) {
return true;
}
var src = document.currentScript.getAttribute('src');
var link = document.createElement('a');
link.href = src;
var scriptProtocol = link.protocol;
var docLoadProtocol = document.location.protocol;
if ((scriptProtocol === 'resource:' ||
scriptProtocol === 'chrome-extension:') &&
docLoadProtocol !== scriptProtocol) {
return false;
}
return true;
} | Class | 2 |
u,t,D,c,e),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(H){return A.isVertex(H)&&t(H)}function u(H){var S=
!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, | Class | 2 |
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 |
$scope.delete = function(foreignSource) {
bootbox.confirm('Are you sure you want to remove the requisition ' + foreignSource + '?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteRequisition(foreignSource).then(
function() { // success
growl.success('The requisition ' + foreignSource + ' has been deleted.');
},
$scope.errorHandler
);
}
});
}; | Base | 1 |
_mdChannelsAndNicks(str) {
// TODO: Make nicks clickable
return str.replace(/(^|\s)(#[a-zA-Z][\w.-]+)/g, (all, pre, channel) => {
const suffix = channel.match(/\.$/) ? '.' : '';
if (suffix) channel = channel.replace(/\.$/, '');
return pre + '<a href="./' + route.urlFor(encodeURIComponent(channel)) + '">' + channel + '</a>' + suffix;
});
} | 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 |
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!=
c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute("id");d.setAttribute("id",b);e.removeAttribute("id")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!= | Base | 1 |
S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Pa){null!=S&&S(Pa)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,F=0;8>F;F++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta=
va;va+=Ba;return sa.substring(ta,va)}function Z(sa){sa=P(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function oa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(P(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=S&&S();else if(P(u,4),"IHDR"!=P(u,4))null!=S&&S();else{P(u,17);S=u.substring(0,va);do{var Aa=Z(u);if("IDAT"== | Base | 1 |
t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),B=this.graph.getLinksForState(this.state);if(null!=z||null!=B&&0<B.length)this.updateLinkHint(z,B),this.redrawHandles()};var Ya=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ya.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,
function(){return this.graph.connectionHandler.isEnabled()})};var bb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)this.moveHandles[t].style.left=this.moveHandles[t].rowState.x+this.moveHandles[t].rowState.width-5+"px",this.moveHandles[t].style.top=this.moveHandles[t].rowState.y+this.moveHandles[t].rowState.height/2-6+"px";if(null!=this.cornerHandles){t=this.getSelectionBorderInset();var z= | Base | 1 |
d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ia(a);if("ssp"!=y(a)){wb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)xb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);yb(a)}else f(b);a.bFiltered=!0;v(a,null,"search",[a])}function yb(a){for(var b=m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,o=c.length;i<o;i++)e=c[i],d=a.aoData[e],b[f](a,
d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function xb(a,b,c,d,e,f){if(""!==b)for(var g=a.aiDisplay,d=Qa(b,d,e,f),e=g.length-1;0<=e;e--)b=a.aoData[g[e]]._aFilterData[c],d.test(b)||g.splice(e,1)}function wb(a,b,c,d,e,f){var d=Qa(b,d,e,f),e=a.oPreviousSearch.sSearch,f=a.aiDisplayMaster,g;0!==m.ext.search.length&&(c=!0);g=zb(a);if(0>=b.length)a.aiDisplay=f.slice();else{if(g||c||e.length>b.length||0!==b.indexOf(e)||a.bSorted)a.aiDisplay=f.slice();b=a.aiDisplay;for(c=b.length-1;0<= | Base | 1 |
_addFiles: function(files) {
var self = this, file_html, html = '';
file_html = '<li class="plupload_file ui-state-default plupload_delete" id="{id}" style="width:{thumb_width}px;">' +
'<div class="plupload_file_thumb plupload_thumb_toload" style="width: {thumb_width}px; height: {thumb_height}px;">' +
'<div class="plupload_file_dummy ui-widget-content" style="line-height: {thumb_height}px;"><span class="ui-state-disabled">{ext} </span></div>' +
'</div>' +
'<div class="plupload_file_status">' +
'<div class="plupload_file_progress ui-widget-header" style="width: 0%"> </div>' +
'<span class="plupload_file_percent">{percent} </span>' +
'</div>' +
'<div class="plupload_file_name" title="{name}">' +
'<span class="plupload_file_name_wrapper">{name} </span>' +
'</div>' +
'<div class="plupload_file_action">' +
'<div class="plupload_action_icon ui-icon ui-icon-circle-minus"> </div>' +
'</div>' +
'<div class="plupload_file_size">{size} </div>' +
'<div class="plupload_file_fields"> </div>' +
'</li>';
if (plupload.typeOf(files) !== 'array') {
files = [files];
}
$.each(files, function(i, file) {
var ext = o.core.utils.Mime.getFileExtension(file.name) || 'none';
html += file_html.replace(/\{(\w+)\}/g, function($0, $1) {
switch ($1) {
case 'thumb_width':
case 'thumb_height':
return self.options[$1];
case 'size':
return plupload.formatSize(file.size);
case 'ext':
return ext;
default:
return file[$1] || '';
}
});
});
self.filelist.append(html);
}, | Base | 1 |
$scope.refresh = function(requisition) {
RequisitionsService.startTiming();
RequisitionsService.updateDeployedStatsForRequisition(requisition).then(
function() { // success
growl.success('The deployed statistics for ' + requisition.foreignSource + ' has been updated.');
},
$scope.errorHandler
);
}; | Base | 1 |
"default")},ma.addListener("stateChanged",da),H.addListener("enabledChanged",da),da());return pa}function G(da,ca,la){la=document.createElement("div");la.className="geMenuItem";la.style.display="inline-block";la.style.verticalAlign="top";la.style.marginRight="6px";la.style.padding="0 4px 0 4px";la.style.height="30px";la.style.position="relative";la.style.top="0px";"1"==urlParams.sketch&&(la.style.boxShadow="none");for(var ia=0;ia<da.length;ia++)null!=da[ia]&&("1"==urlParams.sketch&&(da[ia].style.padding=
"10px 8px",da[ia].style.width="30px"),da[ia].style.margin="0px",da[ia].style.boxShadow="none",la.appendChild(da[ia]));null!=ca&&mxUtils.setOpacity(la,ca);null!=F.statusContainer&&"1"!=urlParams.sketch?S.insertBefore(la,F.statusContainer):S.appendChild(la);return la}function P(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Q.style.left=58>N.offsetTop-N.offsetHeight/2?"70px":"10px");else{for(var da=S.firstChild;null!=da;){var ca=da.nextSibling;"geMenuItem"!=da.className&&"geItem"!=da.className|| | Base | 1 |
Ca.addListener("stateChanged",function(){Ma.style.opacity=Ca.enabled?"":"0.1"});var za=function(){Oa.style.display=0<E.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Ia.style.display=Oa.style.display;Oa.style.opacity=Ba.enabled?"":"0.1";Ia.style.opacity=Ka.enabled?"":"0.1"};O.appendChild(Oa);O.appendChild(Ia);Ba.addListener("stateChanged",za);Ka.addListener("stateChanged",za);za();var ta=this.createPageMenuTab(!1,!0);ta.style.display="none";ta.style.position="";ta.style.marginLeft= | Base | 1 |
$scope.refresh = function(requisition) {
RequisitionsService.startTiming();
RequisitionsService.updateDeployedStatsForRequisition(requisition).then(
function() { // success
growl.success('The deployed statistics for ' + requisition.foreignSource + ' has been updated.');
},
$scope.errorHandler
);
}; | Base | 1 |
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerHTML="",GraphViewer.createViewerForElement(e)}catch(k){e.innerHTML=k.message,null!=window.console&&console.error(k)}})}; | Base | 1 |
exports.quote = function (xs) {
return xs.map(function (s) {
if (s && typeof s === 'object') {
return s.op.replace(/(.)/g, '\\$1');
}
else if (/["\s]/.test(s) && !/'/.test(s)) {
return "'" + s.replace(/(['\\])/g, '\\$1') + "'";
}
else if (/["'\s]/.test(s)) {
return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"';
}
else {
return String(s).replace(/([A-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '$1\\$2');
}
}).join(' ');
}; | Class | 2 |
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", | Class | 2 |
if(U==P)if("mxlibrary"==S.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=S.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(E,0==Y.length?S.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(S){H=null,Q(mxResources.get("notADiagramFile"))}}function O(){var P=y(".odFilesBreadcrumb");if(null!=P){P.innerHTML="";for(var Q=0;Q<J.length-1;Q++){var S=document.createElement("span");S.className="odBCFolder";S.innerHTML=
mxUtils.htmlEntities(J[Q].name||mxResources.get("home"));P.appendChild(S);(function(ba,da){S.addEventListener("click",function(){e(null);J=J.slice(0,da);u(ba.driveId,ba.folderId,ba.siteId,ba.name)})})(J[Q],Q);var Y=document.createElement("span");Y.innerHTML=" > ";P.appendChild(Y)}null!=J[J.length-1]&&(Q=document.createElement("span"),Q.innerHTML=mxUtils.htmlEntities(1==J.length?mxResources.get("officeSelDiag"):J[J.length-1].name||mxResources.get("home")),P.appendChild(Q))}}function M(){if(null!= | Base | 1 |
HTML.prototype.suiteURL = function(suite){
return '?grep=' + encodeURIComponent(suite.fullTitle());
}; | 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= | Class | 2 |
copy: function (from, dist, callback) {
var that = this,
cmd = '';
dist = path.resolve(dist);
fs.lstat(from, function (err, stats) {
if (err) {
callback(err);
} else {
if (stats.isDirectory()) {
that.mkdir(dist, function (err) {
if (err) {
callback(err);
} else {
if (that._win32) {
cmd = 'echo d|xcopy /s /e /y "' + path.join(from, '*') + '" "' + dist + '"';
} else {
cmd = 'cp -f -R -p ' + path.join(from, '*').replace(/ /g, '\\ ') + ' ' + dist.replace(/ /g, '\\ ');
}
child_process.exec(cmd, function (error, stdout, stderr) {
callback && callback(error);
});
}
});
} else if (stats.isFile()) {
if (that._win32) {
cmd = 'echo f|xcopy /y "' + from + '" "' + dist + '"';
} else {
cmd = 'cp -f -p ' + from.replace(/ /g, '\\ ') + ' ' + dist.replace(/ /g, '\\ ');
}
child_process.exec(cmd, function (error, stdout, stderr) {
callback && callback(error);
});
} else {
callback && callback(null);
}
}
});
}, | Class | 2 |
0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};Q.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],$a=this.style["symbol"+A+"Spacing"]||0,ib=this.style["symbol"+A+"VSpacing"]||
$a,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),$a+=db,ib+=db);db=l;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-$a):db+$a;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-ib):Ga+ib;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; | Class | 2 |
function isDate(value) {
return toString.call(value) === '[object Date]';
} | Class | 2 |
function ed(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}function fd(a){return a>1&&5>a&&1!==~~(a/10)}function gd(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"pár sekund":"pár sekundami";case"m":return b?"minuta":d?"minutu":"minutou";case"mm":return b||d?e+(fd(a)?"minuty":"minut"):e+"minutami";break;case"h":return b?"hodina":d?"hodinu":"hodinou";case"hh":return b||d?e+(fd(a)?"hodiny":"hodin"):e+"hodinami";break;case"d":return b||d?"den":"dnem";case"dd":return b||d?e+(fd(a)?"dny":"dní"):e+"dny";break;case"M":return b||d?"měsíc":"měsícem";case"MM":return b||d?e+(fd(a)?"měsíce":"měsíců"):e+"měsíci";break;case"y":return b||d?"rok":"rokem";case"yy":return b||d?e+(fd(a)?"roky":"let"):e+"lety"}} | Base | 1 |
e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});J.setAttribute("title",mxResources.get("find")+" (Enter)");J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";n.appendChild(J);var E=document.createElement("div");E.style.marginTop="10px";if(t){var H=function(V,X,p,C,I){if(null==I||"1"!=I.html)return C=V.toLowerCase().indexOf(X,C),0>C?V:V.substr(0,
C)+p+V.substr(C+X.length);var T=V;X=mxUtils.htmlEntities(X);I=[];var P=-1;for(V=V.replace(/<br>/ig,"\n");-1<(P=V.indexOf("<",P+1));)I.push(P);P=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");C=V.toLowerCase().indexOf(X,C);if(0>C)return T;T=C+X.length;p=mxUtils.htmlEntities(p);V=V.substr(0,C)+p+V.substr(T);for(var O=0,R=0;R<I.length;R++){if(I[R]-O<C)V=V.substr(0,I[R])+P[R]+V.substr(I[R]);else{var Y=I[R]-O<T?C+O:I[R]+(p.length-X.length);V=V.substr(0,Y)+P[R]+V.substr(Y)}O+=P[R].length}return V.replace(/\n/g,
"<br>")},S=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=q&&K.value){var V=q.cell,X=k.getLabel(V);k.isCellEditable(V)&&k.model.setValue(V,H(X,A,K.value,z-A.length,k.getCurrentCellStyle(V)));y.style.backgroundColor=e(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(p){b.handleError(p)}});S.setAttribute("title",mxResources.get("replFind"));S.style.float="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow= | Base | 1 |
compare : function(file1, file2) {
var self = this,
type = self.sortType,
asc = self.sortOrder == 'asc',
stick = self.sortStickFolders,
rules = self.sortRules,
sort = rules[type],
d1 = file1.mime == 'directory',
d2 = file2.mime == 'directory',
res;
if (stick) {
if (d1 && !d2) {
return -1;
} else if (!d1 && d2) {
return 1;
}
}
res = asc ? sort(file1, file2) : sort(file2, file1);
return type != 'name' && res == 0
? res = asc ? rules.name(file1, file2) : rules.name(file2, file1)
: res;
}, | Base | 1 |
function makeCheckAsync(internal) {
return (hook, args) => {
if (hook === 'function' || hook === 'generator_function' || hook === 'eval' || hook === 'run') {
const funcConstructor = internal.Function;
if (hook === 'eval') {
const script = args[0];
args = [script];
if (typeof(script) !== 'string') return args;
} else {
// Next line throws on Symbol, this is the same behavior as function constructor calls
args = args.map(arg => `${arg}`);
}
if (args.findIndex(arg => /\basync\b/.test(arg)) === -1) return args;
const asyncMapped = args.map(arg => arg.replace(/async/g, 'a\\u0073ync'));
try {
// Note: funcConstructor is a Sandbox object, however, asyncMapped are only strings.
funcConstructor(...asyncMapped);
} catch (u) {
// u is a sandbox object
// Some random syntax error or error because of async.
// First report real syntax errors
try {
// Note: funcConstructor is a Sandbox object, however, args are only strings.
funcConstructor(...args);
} catch (e) {
throw internal.Decontextify.value(e);
}
// Then async error
throw new VMError('Async not available');
}
return args;
}
throw new VMError('Async not available');
};
} | Variant | 0 |
function detectIE() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
// IE 10 or older => return version number
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
}
var trident = ua.indexOf('Trident/');
if (trident > 0) {
// IE 11 => return version number
var rv = ua.indexOf('rv:');
return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
}
var edge = ua.indexOf('Edge/');
if (edge > 0) {
// Edge (IE 12+) => return version number
return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
}
// other browser
return false;
} | Base | 1 |
Aa.style.padding="0px";Aa.style.boxShadow="none";Aa.className="geMenuItem";Aa.style.display="inline-block";Aa.style.width="40px";Aa.style.height="12px";Aa.style.marginBottom="-2px";Aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Aa.style.backgroundPosition="top center";Aa.style.backgroundRepeat="no-repeat";Aa.setAttribute("title","Minimize");var za=!1,Ca=mxUtils.bind(this,function(){W.innerHTML="";if(!za){var ua=function(Fa,Ra,db){Fa=X("",Fa.funct,null,Ra,Fa,db);Fa.style.width=
"40px";Fa.style.opacity="0.7";return ya(Fa,null,"pointer")},ya=function(Fa,Ra,db){null!=Ra&&Fa.setAttribute("title",Ra);Fa.style.cursor=null!=db?db:"default";Fa.style.margin="2px 0px";W.appendChild(Fa);mxUtils.br(W);return Fa};ya(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ya(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", | Base | 1 |
var M=mxText.prototype.redraw;mxText.prototype.redraw=function(){M.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(p,C,I){function T(){for(var la=R.getSelectionCells(),Aa=[],Fa=0;Fa<la.length;Fa++)R.isCellVisible(la[Fa])&&Aa.push(la[Fa]);R.setSelectionCells(Aa)}function P(la){R.hiddenTags=la?[]:Y.slice();T();R.refresh()}function O(la,Aa){ha.innerHTML="";if(0<la.length){var Fa=document.createElement("table"); | Class | 2 |
context.suiteSetup = function(fn){
suites[0].beforeAll(fn);
}; | Base | 1 |
Ta,Ua,Za)})})(fa[qa],Pa,Na);aa.appendChild(Pa)}}for(var Ya in ja)fa=ja[Ya],0<fa.length&&(ia=document.createElement("div"),ia.className="geTempDlgImportCat",ia.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ia),B(fa,ca,ba,null,!0))}function F(fa,ca){Da.innerHTML="";n();var ba=Math.floor(Da.offsetWidth/150)-1;ca=!ca&&fa.length>ba?ba:fa.length;for(var ja=0;ja<ca;ja++){var ia=fa[ja];ia.isCategory=!0;var ma=document.createElement("div"),qa=mxResources.get(ia.title);null==qa&&(qa=ia.title.substring(0,
1).toUpperCase()+ia.title.substring(1));ma.className="geTempDlgNewDiagramCatItem";ma.setAttribute("title",qa);qa=mxUtils.htmlEntities(qa);15<qa.length&&(qa=qa.substring(0,15)+"…");null==C&&(K(!0),n(ma,"geTempDlgNewDiagramCatItemActive",ia));var oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";var na=document.createElement("img");na.src=NEW_DIAGRAM_CATS_PATH+"/"+ia.img;oa.appendChild(na);ma.appendChild(oa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";
oa.innerHTML=qa;ma.appendChild(oa);Da.appendChild(ma);(function(Ja,Ga){mxEvent.addListener(ma,"click",function(){C!=Ga&&(K(!0),n(Ga,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(ma,"dblclick",y)})(ia,ma)}ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItem";qa=mxResources.get("showAllTemps");ma.setAttribute("title",qa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";oa.innerHTML="...";oa.style.fontSize="32px";ma.appendChild(oa);oa=
document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";oa.innerHTML=qa;ma.appendChild(oa);Da.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ja(){var Ra=Ga.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}Z=!0;var Ga=Q.querySelector(".geTemplatesList");Ga.style.display="block";Aa.style.width="";Oa.style.display="";Oa.value="";da=null;Ja()});ea.style.display=fa.length<=ba?"none":""}function G(fa,ca,ba){function ja(Qa,Ya){var La= | Base | 1 |
GraphViewer.prototype.updateTitle = function(title)
{
title = title || '';
if (this.showTitleAsTooltip && this.graph != null && this.graph.container != null)
{
this.graph.container.setAttribute('title', title);
}
if (this.filename != null)
{
this.filename.innerHTML = '';
mxUtils.write(this.filename, title);
this.filename.setAttribute('title', title);
}
}; | 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 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | Base | 1 |
function(K){var F=x.length;if(1===F%2||F>=f){var H=0,S=0,V,M=0;for(V=K;V<F;V++)M++,K=x[V],H+=K.x,S+=K.y;return{x:H/M,y:S/M}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(M,W){if(!P){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(W=JSON.stringify({from:z,id:A,type:M,sessionId:e.clientId,userId:U.id,username:U.displayName,data:W,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),K&&"cursor"!=M&&EditorUi.debug("P2PCollab: sending to socket server",[W]),A++,M=!K&&("cursor"==M||"selectionChange"==M),D&&!M&&V("message",W),M))for(p2pId in C)C[p2pId].send(W)}}function m(M){if(b.shareCursorPosition&&!l.isMouseDown){var W=
mxUtils.getOffset(l.container),U=l.view.translate,X=l.view.scale,u=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:u,x:Math.round((M.getX()-W.x+l.container.scrollLeft)/X-U.x),y:Math.round((M.getY()-W.y+l.container.scrollTop)/X-U.y)})}}function n(M,W){var U=null!=b.currentPage?b.currentPage.getId():null;if(null!=M&&null!=M.cursor&&null!=M.lastCursor)if(null!=M.lastCursor.hide||!b.isShowRemoteCursors()||null!=M.lastCursor.pageId&&M.lastCursor.pageId!=U)M.cursor.style.display="none"; | Class | 2 |
function cpOptsInData(data, opts) {
_OPTS.forEach(function (p) {
if (typeof data[p] != 'undefined') {
// Disallow setting the root opt for includes via a passed data obj
// Unsanitized, parameterized use of `render` could allow the
// include directory to be reset, opening up the possibility of
// remote code execution
if (p == 'root') {
return;
}
opts[p] = data[p];
}
});
} | Base | 1 |
function deleteDomain() {
var tr = $(this).closest("tr");
var id = tr.attr("data-id");
var domain = tr.find("#domain_" + id).text();
var type = tr.find("#type_" + id).val();
var domainRegex;
if (type === "0" || type === "1") {
domainRegex = "domain";
} else if (type === "2" || type === "3") {
domainRegex = "regex";
}
utils.disableAll();
utils.showAlert("info", "", "Deleting " + domainRegex + "...", domain);
$.ajax({
url: "scripts/pi-hole/php/groups.php",
method: "post",
dataType: "json",
data: { action: "delete_domain", id: id, token: token },
success: function (response) {
utils.enableAll();
if (response.success) {
utils.showAlert(
"success",
"far fa-trash-alt",
"Successfully deleted " + domainRegex,
domain
);
table.row(tr).remove().draw(false).ajax.reload(null, false);
} else {
utils.showAlert(
"error",
"",
"Error while deleting " + domainRegex + " with ID " + id,
response.message
);
}
},
error: function (jqXHR, exception) {
utils.enableAll();
utils.showAlert(
"error",
"",
"Error while deleting " + domainRegex + " with ID " + id,
jqXHR.responseText
);
console.log(exception); // eslint-disable-line no-console
}
});
} | Class | 2 |
r=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var A=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),E=this;this.graph.cellRenderer.redraw=function(D,B,v){if(null!=D){var y=x.get(D.cell);if(null!=y&&(y=g.getBoundingBox(y,!1),null!=y&&0<y.width&&0<y.height&&!mxUtils.intersects(A,y))||!E.isCellVisible(D.cell))return}u.apply(this,
arguments)}}a=null;try{var C=[this.getRoot()];a=new mxTemporaryCellStates(g,c,C,null,mxUtils.bind(this,function(D){return this.getLinkForCellState(D)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)C=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position= | Base | 1 |
na.style.justifyContent="center";na.style.alignItems="center";ra=document.createElement("img");ra.setAttribute("src",wa);ra.setAttribute("alt",va);ra.style.maxWidth=Fa+"px";ra.style.maxHeight=xa+"px";Sa=ra;var Ha=wa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ra);ra.onerror=function(){this.src!=Ha?this.src=Ha:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(La){y(na,null,null,pa,fa,ia)}),null,null);mxEvent.addListener(na, | 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 |
document.createElement("span");y.style["float"]="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-4px";y.appendChild(n);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(F){mxEvent.getSource(F)!=n&&(n.checked=!n.checked)});header=y}var K=localStorage.getItem(Editor.configurationKey);y=[[mxResources.get("reset"),function(F,G){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(F)?(localStorage.removeItem(Editor.settingsKey),
localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(N){d.handleError(N)}})},"Shift+Click to Reset Settings"]];var B=d.actions.get("plugins");null!=B&&"1"==urlParams.sketch&&y.push([mxResources.get("plugins"),B.funct]);EditorUi.isElectronApp||y.push([mxResources.get("share"),function(F,G){if(0<G.value.length)try{var N=JSON.parse(G.value),J=window.location.protocol+"//"+window.location.host+ | Class | 2 |
"center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ba||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function F(ca,ba,ja,ia,ma,qa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing=
"border-box";oa.style.height="30px";oa.style.padding="6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow="none",oa.style.padding="6px",oa.style.margin="0px");null!=E.statusContainer?S.insertBefore(oa,E.statusContainer):S.appendChild(oa);null!=qa?(oa.style.backgroundImage="url("+qa+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize="24px 24px",
oa.style.width="34px"):mxUtils.write(oa,ca);mxEvent.addListener(oa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(na){na.preventDefault()}));mxEvent.addListener(oa,"click",function(na){"disabled"!=oa.getAttribute("disabled")&&ba(na);mxEvent.consume(na)});null==ja&&(oa.style.marginRight="4px");null!=ia&&oa.setAttribute("title",ia);null!=ma&&(ca=function(){ma.isEnabled()?(oa.removeAttribute("disabled"),oa.style.cursor="pointer"):(oa.setAttribute("disabled","disabled"),oa.style.cursor=
"default")},ma.addListener("stateChanged",ca),H.addListener("enabledChanged",ca),ca());return oa}function G(ca,ba,ja){ja=document.createElement("div");ja.className="geMenuItem";ja.style.display="inline-block";ja.style.verticalAlign="top";ja.style.marginRight="6px";ja.style.padding="0 4px 0 4px";ja.style.height="30px";ja.style.position="relative";ja.style.top="0px";"1"==urlParams.sketch&&(ja.style.boxShadow="none");for(var ia=0;ia<ca.length;ia++)null!=ca[ia]&&("1"==urlParams.sketch&&(ca[ia].style.padding= | Class | 2 |
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, | Base | 1 |
null!=M&&(L==App.MODE_DEVICE||"download"==L||"_blank"==L?M.simulate(document,"_blank"):this.pickFolder(L,mxUtils.bind(this,function(n){q=null!=q?q:"pdf"==e?"application/pdf":"image/"+e;if(null!=k)try{this.exportFile(k,z,q,!0,L,n)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),z,q,!0,L,n)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}), | Base | 1 |
z,mxUtils.bind(this,function(){var E=null;if(!t){E=parseInt(H.value);var J=parseInt(V.value);E=K.checked||E==G&&J==G?null:{from:Math.max(0,Math.min(D-1,E-1)),to:Math.max(0,Math.min(D-1,J-1))}}c.downloadFile("pdf",null,null,!M.checked,t?!0:!K.checked&&null==E,!W.checked,null!=X&&X.checked,null,null,U.checked,null!=u&&u.checked,E)}),null,mxResources.get("export"));c.showDialog(z.container,300,L,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1< | 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 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.